fix the date picker in RT to use jscalendar instead of an HTML popup (that had acquir...
authorivan <ivan>
Sun, 26 Jul 2009 19:36:08 +0000 (19:36 +0000)
committerivan <ivan>
Sun, 26 Jul 2009 19:36:08 +0000 (19:36 +0000)
rt/FREESIDE_MODIFIED
rt/html/Elements/PageLayout
rt/html/Elements/SelectDate

index dc5e2bc..e820789 100644 (file)
@@ -12,6 +12,7 @@ lib/RT/URI/freeside/XMLRPC.pm
  html/Elements/Menu
  html/Elements/PageLayout
  html/Elements/QuickCreate
+ html/Elements/SelectDate
  html/Elements/SimpleSearch
  html/Elements/Tabs
  html/Elements/Footer
index 3210b4e..b9d15e9 100644 (file)
@@ -127,6 +127,7 @@ a:visited:hover.fsdarkbutton {
          filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr='#ff330033',EndColorStr='#ff7e0079')
 }
 </style>
+<% include('/elements/init_calendar.html') |n %>
 <table border=0 cellspacing=0 cellpadding=0 width="100%" height="100%">
     <TR HEIGHT="100%">
       <TD valign="top">
index b43f324..23df246 100644 (file)
 %# those contributions and any derivatives thereof.
 %# 
 %# END BPS TAGGED BLOCK }}}
+%# in PageLayout instead, once <% include('/elements/init_calendar.html') |n %>
+<input type="text" id="<% $Name %>" name="<% $Name %>" value="<% $Default %>" size="<% $Size %>" />
+<IMG SRC="<%$fsurl%>images/calendar.png" ID="<% $Name %>_date_button" STYLE="cursor: pointer" TITLE="Select date">
 <script type="text/javascript"><!--
-    onLoadHook('createCalendarLink("<% $Name %>");');
+Calendar.setup({
+    inputField: "<%$Name%>",
+% if ( defined($ShowTime) && $ShowTime ) {
+    ifFormat:   "%Y-%m-%d %H:%M",
+    showsTime:  true,
+% } else {
+    ifFormat:   "%Y-%m-%d",
+% }
+    button:     "<%$Name%>_date_button",
+});
 --></script>
-<input type="text" id="<% $Name %>" name="<% $Name %>" value="<% $Default %>" size="<% $Size %>" />
 <%init>
 unless ((defined $Default) or 
        ($current <= 0)) {