[Jifty-commit] r1466 - in jifty/trunk: share/web/static/js
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Mon Jul 3 21:16:05 EDT 2006
Author: trs
Date: Mon Jul 3 21:16:05 2006
New Revision: 1466
Modified:
jifty/trunk/ (props changed)
jifty/trunk/share/web/static/js/calendar.js
Log:
r13902 at zot: tom | 2006-07-03 21:15:54 -0400
Defer the ajax canonicalization/validation of date fields until after the calendar popup goes away (either from user date selection or moving on to another field)
Modified: jifty/trunk/share/web/static/js/calendar.js
==============================================================================
--- jifty/trunk/share/web/static/js/calendar.js (original)
+++ jifty/trunk/share/web/static/js/calendar.js Mon Jul 3 21:16:05 2006
@@ -25,6 +25,11 @@
Jifty.Calendar.hideOpenCalendar();
+ /* We need to delay Jifty's canonicalization until after we've
+ selected a value via the calendar */
+ input["_onblur"] = input.onblur;
+ input.onblur = null;
+
if ( wrap ) {
wrap.style.display = "block";
Jifty.Calendar.openCalendar = wrapId;
@@ -69,6 +74,18 @@
hideOpenCalendar: function() {
if ( Jifty.Calendar.openCalendar ) {
$( Jifty.Calendar.openCalendar ).style.display = "none";
+
+ /* Get the input's ID */
+ var inputId = Jifty.Calendar.openCalendar;
+ inputId = inputId.replace(/^cal_/, '');
+ inputId = inputId.replace(/_wrap$/, '');
+
+ var input = $( inputId );
+
+ /* Restore the original onblur */
+ input.onblur = input["_onblur"];
+ input["_onblur"] = null;
+
Jifty.Calendar.openCalendar = "";
}
}
More information about the Jifty-commit
mailing list