[Rt-commit] r2700 - in rt/branches/PLATANO-EXPERIMENTAL-CSS: . html/NoAuth html/Prefs html/Search html/Widgets lib/t/regression

jesse at bestpractical.com jesse at bestpractical.com
Sat Apr 16 04:15:57 EDT 2005


Author: jesse
Date: Sat Apr 16 04:15:57 2005
New Revision: 2700

Modified:
   rt/branches/PLATANO-EXPERIMENTAL-CSS/   (props changed)
   rt/branches/PLATANO-EXPERIMENTAL-CSS/html/NoAuth/list.js
   rt/branches/PLATANO-EXPERIMENTAL-CSS/html/Prefs/MyRT.html
   rt/branches/PLATANO-EXPERIMENTAL-CSS/html/Search/Bulk.html
   rt/branches/PLATANO-EXPERIMENTAL-CSS/html/Widgets/SelectionBox
   rt/branches/PLATANO-EXPERIMENTAL-CSS/lib/t/regression/18custom_frontpage.t
Log:
 r13089 at hualien:  jesse | 2005-04-16 03:07:53 -0400
  r12986 at hualien:  jesse | 2005-04-16 02:23:22 -0400
   r9575 at hualien:  jesse | 2005-03-23 03:46:50 -0500
    r9573 at hualien (orig r2496):  clkao | 2005-03-23 13:22:08 +0800
    Fix js (still disabled for now).
    Make test pass.
    r9574 at hualien (orig r2497):  clkao | 2005-03-23 14:58:16 +0800
    Fix the regexp injecting checkbox into bulk edit format.
   
  
 


Modified: rt/branches/PLATANO-EXPERIMENTAL-CSS/html/NoAuth/list.js
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL-CSS/html/NoAuth/list.js	(original)
+++ rt/branches/PLATANO-EXPERIMENTAL-CSS/html/NoAuth/list.js	Sat Apr 16 04:15:57 2005
@@ -1,5 +1,4 @@
 /* by TKirby, released under GPL */
-
 /* Define the "list" Class */
 Class("list").define({
  name : null,
@@ -43,8 +42,13 @@
 	 if((src.childNodes[i].nodeName=="input" || src.childNodes[i].nodeName=="INPUT")
 	    && (src.childNodes[i].type=="submit" || src.childNodes[i].type=="SUBMIT")) {
 
-	     if (src.childNodes[i].name.indexOf("Save") < 0)
-		 src.childNodes[i].type = "button";
+	     if (src.childNodes[i].name.indexOf("Save") < 0) {
+		 var tmp	= document.createElement("input");
+		 tmp.type	= "button";
+		 tmp.name	= src.childNodes[i].name;
+		 tmp.value	= src.childNodes[i].value;
+		 src.replaceChild(tmp,src.childNodes[i]);
+	     }
 
 	     if(src.childNodes[i].name=="add")
 		 src.childNodes[i].onclick = new Function(this.name+".add();");
@@ -106,5 +110,3 @@
   for(i=0;i<this.sels[1].length;i++) this.sels[1][i].selected = true;
  }
 });
-
-

Modified: rt/branches/PLATANO-EXPERIMENTAL-CSS/html/Prefs/MyRT.html
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL-CSS/html/Prefs/MyRT.html	(original)
+++ rt/branches/PLATANO-EXPERIMENTAL-CSS/html/Prefs/MyRT.html	Sat Apr 16 04:15:57 2005
@@ -50,13 +50,13 @@
     Searches => \@sys_searches
 &>
 
-<& /Widgets/SelectionBox:header &>
+<& /Widgets/SelectionBox:header, nojs => 1 &>
 
 <& /Elements/ListActions, actions => \@actions &>
 <br />
 % for my $pane (@panes) {
 <&|/Elements/TitleBox, title => loc('RT at a glance').': '.loc($pane->{Name}), bodyclass => "" &>
-<& /Widgets/SelectionBox:show, self => $pane &></&>
+<& /Widgets/SelectionBox:show, self => $pane, nojs => 1 &></&>
 <br />
 % }
 <&|/Elements/TitleBox, title => loc('Options'), bodyclass => "" &>
@@ -142,6 +142,6 @@
 		  Selected => [map {join('-',@{$_}{qw/type name/})} @{$portlets->{$pane}}]);
 }
 
-$m->comp ('/Widgets/SelectionBox:process', %ARGS, self => $_) for @panes;
+$m->comp ('/Widgets/SelectionBox:process', %ARGS, self => $_, nojs => 1) for @panes;
 
 </%INIT>

Modified: rt/branches/PLATANO-EXPERIMENTAL-CSS/html/Search/Bulk.html
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL-CSS/html/Search/Bulk.html	(original)
+++ rt/branches/PLATANO-EXPERIMENTAL-CSS/html/Search/Bulk.html	Sat Apr 16 04:15:57 2005
@@ -227,7 +227,8 @@
 my @cols = qw(id Status Priority Subject QueueObj->Name OwnerObj->Name RequestorAddresses DueAsString );
 
 $Format ||= $RT::DefaultSearchResultFormat;
-$Format =~ s/^'\s+/'___CHECKBOX__/;
+# inject _CHECKBOX to the first field.
+$Format =~ s/'?([^']+)'?,/'___CHECKBOX__$1',/;
 
 
 my $Tickets = RT::Tickets->new($session{'CurrentUser'});

Modified: rt/branches/PLATANO-EXPERIMENTAL-CSS/html/Widgets/SelectionBox
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL-CSS/html/Widgets/SelectionBox	(original)
+++ rt/branches/PLATANO-EXPERIMENTAL-CSS/html/Widgets/SelectionBox	Sat Apr 16 04:15:57 2005
@@ -72,11 +72,13 @@
 %# if the SelectionBox is created with AutoSave option, OnSubmit will be called
 %# on every button clicked in non-js mode.
 <%method header>
-% if (0) {
-% # no javascript for now. it's broken in ie
+% unless ($nojs) {
 <script type="text/javascript" src="<%$RT::WebPath%>/NoAuth/class.js"></script>
 <script type="text/javascript" src="<%$RT::WebPath%>/NoAuth/list.js"></script>
 % }
+<%ARGS>
+$nojs => 0
+</%ARGS>
 </%method>
 
 <%method new>
@@ -174,7 +176,11 @@
 </%method>
 
 <%method show>
-<FORM METHOD="POST" ACTION="<%$self->{Action}%>" name="SelectionBox-<% $name %>" id="SelectionBox-<% $name %>" onSubmit="//list_<% $name %>.selectAll();">
+<FORM METHOD="POST" ACTION="<%$self->{Action}%>" name="SelectionBox-<% $name %>" id="SelectionBox-<% $name %>"
+% unless ($nojs) {
+onSubmit="list_<% $name %>.selectAll();"
+% }
+>
 <input type="hidden" name="<% $self->{Name} %>-Submit" value="1">
 <& SelectionBox:current, self => $self &>
 <input type="hidden" name="fromjs" value="0">
@@ -208,12 +214,15 @@
 % }
 </form>
 
+% unless ($nojs) {
 <script type="text/javascript">
-//var list_<%$name%> = new list(document.getElementById("SelectionBox-<% $name %>"), 0, "list_<%$name%>");
+var list_<%$name%> = new list(document.getElementById("SelectionBox-<% $name %>"), 0, "list_<%$name%>");
 </script>
+% }
 <%ARGS>
 $self => undef
 $size => 10
+$nojs => 0
 </%ARGS>
 <%INIT>
 my $name = $self->{Name};

Modified: rt/branches/PLATANO-EXPERIMENTAL-CSS/lib/t/regression/18custom_frontpage.t
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL-CSS/lib/t/regression/18custom_frontpage.t	(original)
+++ rt/branches/PLATANO-EXPERIMENTAL-CSS/lib/t/regression/18custom_frontpage.t	Sat Apr 16 04:15:57 2005
@@ -54,7 +54,7 @@
 $m->field ('body-Selected' => ['component-QuickCreate', 'system-Unowned Tickets', 'system-My Tickets']);
 $m->click_button (name => 'remove');
 $m->form_name ('SelectionBox-body');
-$m->click_button (name => 'body-Save');
+#$m->click_button (name => 'body-Save');
 $m->get ( BaseURL );
 $m->content_lacks ('highest priority tickets', 'remove everything from body pane');
 
@@ -71,6 +71,6 @@
 $m->click_button (name => 'movedown');
 
 $m->form_name ('SelectionBox-body');
-$m->click_button (name => 'body-Save');
+#$m->click_button (name => 'body-Save');
 $m->get ( BaseURL );
 $m->content_like (qr'highest priority tickets', 'adds them back');


More information about the Rt-commit mailing list