[Rt-commit] r18436 - in rt/3.999/trunk/share: html/Approvals/Elements html/Elements

falcone at bestpractical.com falcone at bestpractical.com
Tue Feb 17 15:25:27 EST 2009


Author: falcone
Date: Tue Feb 17 15:25:26 2009
New Revision: 18436

Modified:
   rt/3.999/trunk/share/html/Approvals/Elements/PendingMyApproval
   rt/3.999/trunk/share/html/Elements/SelectDate
   rt/3.999/trunk/share/web/static/js/util.js

Log:
* kill really old onLoadHook js code that we replaced with doOnLoad
* remove uses of the old popup calendar code

Modified: rt/3.999/trunk/share/html/Approvals/Elements/PendingMyApproval
==============================================================================
--- rt/3.999/trunk/share/html/Approvals/Elements/PendingMyApproval	(original)
+++ rt/3.999/trunk/share/html/Approvals/Elements/PendingMyApproval	Tue Feb 17 15:25:26 2009
@@ -45,10 +45,6 @@
 %# those contributions and any derivatives thereof.
 %# 
 %# END BPS TAGGED BLOCK }}}
-<script type="text/javascript"><!--
-    onLoadHook('createCalendarLink("CreatedBefore");');
-    onLoadHook('createCalendarLink("CreatedAfter");');
---></script>
 % my %done;
 % foreach ($tickets, $group_tickets) {
 %   while (my $ticket = $_->next() ) {
@@ -67,9 +63,9 @@
 <input type="checkbox" class="checkbox" value="1" name="show_rejected" <% defined($ARGS{'show_rejected'}) && $ARGS{'show_rejected'} && qq[checked="checked"] |n%> /> <&|/l&>Show denied requests</&><br />
 <input type="checkbox" class="checkbox" value="1" name="show_dependent" <% defined($ARGS{'show_dependent'}) && $ARGS{'show_dependent'} && qq[checked="checked"] |n%> /> <&|/l&>Show requests awaiting other approvals</&><br />
 
-<&|/l,"<input size='15' value='".($Created_before->unix > 0 &&$Created_before->iso)."' name='created_before' id='CreatedBefore' />"&>Only show approvals for requests Created before %1</&><br />
+<&|/l,"<input size='15' value='".($Created_before->unix > 0 &&$Created_before->iso)."' name='created_before' id='CreatedBefore' class='datetime' />"&>Only show approvals for requests Created before %1</&><br />
 
-<&|/l, "<input size='15' value='".( $Created_after->unix >0 && $Created_after->iso)."' name='created_after' id='CreatedAfter' />"&>Only show approvals for requests Created after %1</&>
+<&|/l, "<input size='15' value='".( $Created_after->unix >0 && $Created_after->iso)."' name='created_after' id='CreatedAfter' class='datetime' />"&>Only show approvals for requests Created after %1</&>
 </&>
 
 <%init>

Modified: rt/3.999/trunk/share/html/Elements/SelectDate
==============================================================================
--- rt/3.999/trunk/share/html/Elements/SelectDate	(original)
+++ rt/3.999/trunk/share/html/Elements/SelectDate	Tue Feb 17 15:25:26 2009
@@ -45,10 +45,7 @@
 %# those contributions and any derivatives thereof.
 %# 
 %# END BPS TAGGED BLOCK }}}
-<script type="text/javascript"><!--
-    onLoadHook('createCalendarLink("<% $name %>");');
---></script>
-<input type="text" id="<% $name %>" name="<% $name %>" value="<% $value %>" size="<% $size %>" />
+<input type="text" id="<% $name %>" name="<% $name %>" class="datetime" value="<% $value %>" size="<% $size %>" />
 <%init>
 unless ((defined $default) or 
 	($current <= 0)) {

Modified: rt/3.999/trunk/share/web/static/js/util.js
==============================================================================
--- rt/3.999/trunk/share/web/static/js/util.js	(original)
+++ rt/3.999/trunk/share/web/static/js/util.js	Tue Feb 17 15:25:26 2009
@@ -142,45 +142,6 @@
     }
 }
 
-
-/* onload handlers */
-
-var onLoadStack     = new Array();
-var onLoadLastStack = new Array();
-var onLoadExecuted  = 0;
-
-function onLoadHook(commandStr) {
-    if(typeof(commandStr) == "string") {
-        onLoadStack[ onLoadStack.length ] = commandStr;
-        return true;
-    }
-    return false;
-}
-
-// some things *really* need to be done after everything else
-function onLoadLastHook(commandStr) {
-    if(typeof(commandStr) == "string"){
-        onLoadLastStack[onLoadLastStack.length] = commandStr;
-        return true;
-    }
-    return false;
-}
-
-function doOnLoadHooks() {
-    if(onLoadExecuted) return;
-
-    var i;
-    for ( i in onLoadStack ) { 
-        eval( onLoadStack[i] );
-    }
-    for ( i in onLoadLastStack ) { 
-        eval( onLoadLastStack[i] );
-    }
-    onLoadExecuted = 1;
-}
-
-window.onload = doOnLoadHooks;
-
 function doOnLoad(handler) {
     Event.observe(window, 'load', handler);
 }


More information about the Rt-commit mailing list