Author: ndkhoiits
Date: 2011-01-11 04:01:13 -0500 (Tue, 11 Jan 2011)
New Revision: 5724
Modified:
exo/portal/branches/3.1.x/web/eXoResources/src/main/webapp/javascript/eXo/webui/UICalendar.js
exo/portal/branches/3.1.x/webui/core/src/main/java/org/exoplatform/webui/form/UIFormDateTimeInput.java
Log:
EXOGTN-234 Calendar appearing even on non-focus
Modified:
exo/portal/branches/3.1.x/web/eXoResources/src/main/webapp/javascript/eXo/webui/UICalendar.js
===================================================================
---
exo/portal/branches/3.1.x/web/eXoResources/src/main/webapp/javascript/eXo/webui/UICalendar.js 2011-01-11
07:07:59 UTC (rev 5723)
+++
exo/portal/branches/3.1.x/web/eXoResources/src/main/webapp/javascript/eXo/webui/UICalendar.js 2011-01-11
09:01:13 UTC (rev 5724)
@@ -162,6 +162,15 @@
}
}
+UICalendar.prototype.onTabOut = function(event) {
+ var keyCode = event.keyCode;
+
+ // identify the tab key
+ if (keyCode == 9) {
+ eXo.webui.UICalendar.hide();
+ }
+};
+
UICalendar.prototype.hide = function() {
if (this.dateField) {
document.getElementById(this.calendarId).firstChild.style.display = 'none' ;
Modified:
exo/portal/branches/3.1.x/webui/core/src/main/java/org/exoplatform/webui/form/UIFormDateTimeInput.java
===================================================================
---
exo/portal/branches/3.1.x/webui/core/src/main/java/org/exoplatform/webui/form/UIFormDateTimeInput.java 2011-01-11
07:07:59 UTC (rev 5723)
+++
exo/portal/branches/3.1.x/webui/core/src/main/java/org/exoplatform/webui/form/UIFormDateTimeInput.java 2011-01-11
09:01:13 UTC (rev 5724)
@@ -234,6 +234,6 @@
w.write(value_.toString());
w.write('\'');
}
- w.write(" onclick='event.cancelBubble = true'/>");
+ w.write(" onclick='event.cancelBubble = true'
onkeydown='eXo.webui.UICalendar.onTabOut(event)'/>");
}
}
Show replies by date