[Rt-commit] r4222 - in rt/branches/CHALDEA-EXPERIMENTAL: . html/Elements html/NoAuth html/Search

jesse at bestpractical.com jesse at bestpractical.com
Fri Dec 2 18:07:36 EST 2005


Author: jesse
Date: Fri Dec  2 18:07:34 2005
New Revision: 4222

Added:
   rt/branches/CHALDEA-EXPERIMENTAL/html/NoAuth/printrt.css
Modified:
   rt/branches/CHALDEA-EXPERIMENTAL/   (props changed)
   rt/branches/CHALDEA-EXPERIMENTAL/html/Elements/Header
   rt/branches/CHALDEA-EXPERIMENTAL/html/Search/Build.html
   rt/branches/CHALDEA-EXPERIMENTAL/releng.cnf
Log:
 r19698 at truegrounds:  jesse | 2005-12-02 18:00:25 -0500
  r19693 at truegrounds:  jesse | 2005-12-02 17:48:24 -0500
   r19588 at truegrounds:  jesse | 2005-11-30 16:00:10 -0500
   * Bump to 3.4.5rc1
   r19674 at truegrounds:  jesse | 2005-12-01 23:13:50 -0500
    * Added a print stylesheet from Koos van den Hout
   r19688 at truegrounds:  jesse | 2005-12-02 17:01:28 -0500
   RT-Ticket: 6962
   RT-Status: resolved
   RT-Update: correspond
   
   * Patch from Rolf Grossmann to fix some bogosity in the query builder
   
  
 


Modified: rt/branches/CHALDEA-EXPERIMENTAL/html/Elements/Header
==============================================================================
--- rt/branches/CHALDEA-EXPERIMENTAL/html/Elements/Header	(original)
+++ rt/branches/CHALDEA-EXPERIMENTAL/html/Elements/Header	Fri Dec  2 18:07:34 2005
@@ -51,8 +51,10 @@
 <META HTTP-EQUIV="REFRESH" CONTENT="<%$Refresh%>">
 % }
 
-<link rel="shortcut icon" href="<%$RT::WebImagesURL%>/favicon.png" type="image/png">
-<link rel="stylesheet" href="<%$RT::WebPath%>/NoAuth/webrt.css" type="text/css">
+<link rel="shortcut icon" href="<%$RT::WebImagesURL%>/favicon.png" type="image/png" />
+<link media="all" rel="stylesheet" href="<%$RT::WebPath%>/NoAuth/webrt.css" type="text/css" />
+<link media="print" rel="stylesheet" href="<%$RT::WebPath%>/NoAuth/printrt.css" type="text/css" />
+
 <script type="text/javascript" src="<%$RT::WebPath%>/rt.js"></script>
 <& /Elements/Callback, _CallbackName => 'Head', %ARGS &>
 </HEAD>

Added: rt/branches/CHALDEA-EXPERIMENTAL/html/NoAuth/printrt.css
==============================================================================
--- (empty file)
+++ rt/branches/CHALDEA-EXPERIMENTAL/html/NoAuth/printrt.css	Fri Dec  2 18:07:34 2005
@@ -0,0 +1,77 @@
+%# {{{ BEGIN BPS TAGGED BLOCK
+%# 
+%# 
+%# 
+%# LICENSE:
+%# 
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%# 
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+%# General Public License for more details.
+%# 
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# 
+%# 
+%# CONTRIBUTION SUBMISSION POLICY:
+%# 
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%# 
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions,  LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%# 
+%# }}} END BPS TAGGED BLOCK
+%#
+%# Special stylesheet for printing tickets
+%# Koos van den Hout koos at cs.uu.nl 2005-11-21
+%#
+
+SPAN.nav { display: none !important; }
+.nav2 { display: none !important; }
+.nav { display: none !important; }
+.topnav { display: none !important; }
+.blue { display: none !important; }
+.darkblue { display: none !important; }
+.blueright { display: none !important; }
+.currentnav { display: none !important; }
+th.titlebox { border-top: none; border-bottom: none; }
+th.titleboxright { display:none !important; border-top: none; border-bottom: none; }
+.titlebox { border-top: none; border-bottom: none; }
+
+div.downloadattachment, div.downloadcontenttype {
+       display: none !important;
+}
+
+
+a[href$="Respond"], a[href$="Comment"], a[href*="ShowEmailRecord"] {
+       display: none !important;
+}
+
+
+%# Provide a callback for adding/modifying the style sheet.
+%# http://www.w3.org/TR/REC-CSS1 - section 3.2, says:
+%#   "latter specified rule wins"
+<& /Elements/Callback &>
+<%flags>
+inherit => undef
+</%flags>
+<%init>
+$r->content_type('text/css');
+$r->headers_out->{'Expires'} = '+30m';
+</%init>

Modified: rt/branches/CHALDEA-EXPERIMENTAL/html/Search/Build.html
==============================================================================
--- rt/branches/CHALDEA-EXPERIMENTAL/html/Search/Build.html	(original)
+++ rt/branches/CHALDEA-EXPERIMENTAL/html/Search/Build.html	Fri Dec  2 18:07:34 2005
@@ -440,88 +440,6 @@
 
 my @current_values = grep { defined } @options[@clauses];
 
-# {{{ Try to find if we're adding a clause
-foreach my $arg ( keys %ARGS ) {
-    if (
-        $arg =~ m/^ValueOf(\w+|'CF.{.*?}')$/
-        && ( ref $ARGS{$arg} eq "ARRAY"
-            ? grep { $_ ne "" } @{ $ARGS{$arg} }
-            : $ARGS{$arg} ne "" )
-      )
-    {
-
-        # We're adding a $1 clause
-        my $field = $1;
-        my ( $keyword, $op, $value );
-
-        #figure out if it's a grouping
-        if ( $ARGS{ $field . "Field" } ) {
-            $keyword = $ARGS{ $field . "Field" };
-        }
-        else {
-            $keyword = $field;
-        }
-
-        my ( @ops, @values );
-        if ( ref $ARGS{ 'ValueOf' . $field } eq "ARRAY" ) {
-
-            # we have many keys/values to iterate over, because there is
-            # more than one CF with the same name.
-            @ops    = @{ $ARGS{ $field . 'Op' } };
-            @values = @{ $ARGS{ 'ValueOf' . $field } };
-        }
-        else {
-            @ops    = ( $ARGS{ $field . 'Op' } );
-            @values = ( $ARGS{ 'ValueOf' . $field } );
-        }
-        $RT::Logger->error("Bad Parameters passed into Query Builder")
-          unless @ops == @values;
-
-        for my $i ( 0 .. @ops - 1 ) {
-            my ( $op, $value ) = ( $ops[$i], $values[$i] );
-            next if $value eq "";
-
-            if ( $value eq 'NULL' && $op =~ /=/ ) {
-                if ( $op eq '=' ) {
-                    $op = "IS";
-                }
-                elsif ( $op eq '!=' ) {
-                    $op = "IS NOT";
-                }
-
-                # This isn't "right", but...
-                # It has to be this way until #5182 is fixed
-                $value = "'NULL'";
-            }
-            else {
-                $value = "'$value'";
-            }
-
-            my $clause = {
-                Key   => $keyword,
-                Op    => $op,
-                Value => $value
-            };
-
-            my $newnode = RT::Interface::Web::QueryBuilder::Tree->new($clause);
-            if (@current_values) {
-                foreach my $value (@current_values) {
-                    my $newindex = $value->getIndex() + 1;
-                    $value->insertSibling( $newindex, $newnode );
-                    $value = $newnode;
-                }
-            }
-            else {
-                $tree->getChild(0)->addChild($newnode);
-                @current_values = $newnode;
-            }
-            $newnode->getParent()->setNodeValue( $ARGS{'AndOr'} );
-        }
-    }
-}
-
-# }}}
-
 # {{{ Move things around
 if ( $ARGS{"Up"} ) {
     if (@current_values) {
@@ -615,6 +533,7 @@
 elsif ( $ARGS{"DeleteClause"} ) {
     if (@current_values) {
         $_->getParent()->removeChild($_) for @current_values;
+		@current_values = ();
     }
     else {
         push( @actions, [ loc("error: nothing to delete"), -1 ] );
@@ -639,6 +558,88 @@
     }
 }
 
+# {{{ Try to find if we're adding a clause
+foreach my $arg ( keys %ARGS ) {
+    if (
+            $arg =~ m/^ValueOf(\w+|'CF.{.*?}')$/
+        && ( ref $ARGS{$arg} eq "ARRAY"
+            ? grep { $_ ne "" } @{ $ARGS{$arg} }
+            : $ARGS{$arg} ne "" )
+      )
+    {
+
+        # We're adding a $1 clause
+        my $field = $1;
+        my ( $keyword, $op, $value );
+
+        #figure out if it's a grouping
+        if ( $ARGS{ $field . "Field" } ) {
+            $keyword = $ARGS{ $field . "Field" };
+        }
+        else {
+            $keyword = $field;
+        }
+
+        my ( @ops, @values );
+        if ( ref $ARGS{ 'ValueOf' . $field } eq "ARRAY" ) {
+
+            # we have many keys/values to iterate over, because there is
+            # more than one CF with the same name.
+            @ops    = @{ $ARGS{ $field . 'Op' } };
+            @values = @{ $ARGS{ 'ValueOf' . $field } };
+        }
+        else {
+            @ops    = ( $ARGS{ $field . 'Op' } );
+            @values = ( $ARGS{ 'ValueOf' . $field } );
+        }
+        $RT::Logger->error("Bad Parameters passed into Query Builder")
+          unless @ops == @values;
+
+        for my $i ( 0 .. @ops - 1 ) {
+            my ( $op, $value ) = ( $ops[$i], $values[$i] );
+            next if $value eq "";
+
+            if ( $value eq 'NULL' && $op =~ /=/ ) {
+                if ( $op eq '=' ) {
+                    $op = "IS";
+                }
+                elsif ( $op eq '!=' ) {
+                    $op = "IS NOT";
+                }
+
+                # This isn't "right", but...
+                # It has to be this way until #5182 is fixed
+                $value = "'NULL'";
+            }
+            else {
+                $value = "'$value'";
+            }
+
+            my $clause = {
+                Key   => $keyword,
+                Op    => $op,
+                Value => $value
+            };
+
+            my $newnode = RT::Interface::Web::QueryBuilder::Tree->new($clause);
+            if (@current_values) {
+                foreach my $value (@current_values) {
+                    my $newindex = $value->getIndex() + 1;
+                    $value->insertSibling( $newindex, $newnode );
+                    $value = $newnode;
+                }
+            }
+            else {
+                $tree->getChild(0)->addChild($newnode);
+                @current_values = $newnode;
+            }
+            $newnode->getParent()->setNodeValue( $ARGS{'AndOr'} );
+        }
+    }
+}
+
+# }}}
+
 $tree->PruneChildlessAggregators;
 
 # }}}

Modified: rt/branches/CHALDEA-EXPERIMENTAL/releng.cnf
==============================================================================
--- rt/branches/CHALDEA-EXPERIMENTAL/releng.cnf	(original)
+++ rt/branches/CHALDEA-EXPERIMENTAL/releng.cnf	Fri Dec  2 18:07:34 2005
@@ -1,5 +1,5 @@
 PRODUCT			        = rt
-TAG			            = 3.4.5pre1
+TAG			            = 3.4.5rc1
 CANONICAL_REPO		    = svn+ssh://svn.bestpractical.com/svn/bps-public/rt/
 TAGS		            = tags/
 TRUNK	                = branches/3.4-RELEASE


More information about the Rt-commit mailing list