[gatein-commits] gatein SVN: r8548 - in epp/portal/branches/EPP_5_2_Branch: webui/core/src/main/java/org/exoplatform/webui/form and 1 other directory.

do-not-reply at jboss.org do-not-reply at jboss.org
Thu Mar 8 11:34:48 EST 2012


Author: hfnukal
Date: 2012-03-08 11:34:47 -0500 (Thu, 08 Mar 2012)
New Revision: 8548

Modified:
   epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/webui/UICalendar.js
   epp/portal/branches/EPP_5_2_Branch/webui/core/src/main/java/org/exoplatform/webui/form/UIFormDateTimeInput.java
Log:
bug 793910 calender doesnt disappear if tab is used for navigation

Modified: epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/webui/UICalendar.js
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/webui/UICalendar.js	2012-03-08 16:18:24 UTC (rev 8547)
+++ epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/webui/UICalendar.js	2012-03-08 16:34:47 UTC (rev 8548)
@@ -162,6 +162,16 @@
   }
 }
 
+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: epp/portal/branches/EPP_5_2_Branch/webui/core/src/main/java/org/exoplatform/webui/form/UIFormDateTimeInput.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/webui/core/src/main/java/org/exoplatform/webui/form/UIFormDateTimeInput.java	2012-03-08 16:18:24 UTC (rev 8547)
+++ epp/portal/branches/EPP_5_2_Branch/webui/core/src/main/java/org/exoplatform/webui/form/UIFormDateTimeInput.java	2012-03-08 16:34:47 UTC (rev 8548)
@@ -239,6 +239,6 @@
       w.write(" value=\"");
       w.write(value);
       w.write('\"');
-      w.write(" onclick='event.cancelBubble = true'/>");
+      w.write(" onclick='event.cancelBubble = true' onkeydown='eXo.webui.UICalendar.onTabOut(event)'/>");
    }
 }



More information about the gatein-commits mailing list