You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by vi...@apache.org on 2012/06/07 02:39:27 UTC

svn commit: r1347222 - in /incubator/ambari/branches/ambari-186: CHANGES.txt hmc/html/bootstrapJs.htmli hmc/js/installationWizard.js

Author: vikram
Date: Thu Jun  7 00:39:27 2012
New Revision: 1347222

URL: http://svn.apache.org/viewvc?rev=1347222&view=rev
Log:
AMBARI-419. Add Basic Keyboard Action Support For HMC UI (Contributed by Varun)

Modified:
    incubator/ambari/branches/ambari-186/CHANGES.txt
    incubator/ambari/branches/ambari-186/hmc/html/bootstrapJs.htmli
    incubator/ambari/branches/ambari-186/hmc/js/installationWizard.js

Modified: incubator/ambari/branches/ambari-186/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/CHANGES.txt?rev=1347222&r1=1347221&r2=1347222&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/CHANGES.txt (original)
+++ incubator/ambari/branches/ambari-186/CHANGES.txt Thu Jun  7 00:39:27 2012
@@ -6,6 +6,8 @@ characters wide.
 
 Release 0.1.x - unreleased
 
+  AMBARI-419. Add Basic Keyboard Action Support For HMC UI (Varun via Vikram)
+
   AMBARI-418. Remove Redundant Titles From Reconfigure Panel (Varun via Vikram)
 
   AMBARI-416. Fix Inconsistent Validation Error Messages (Varun via Vikram)

Modified: incubator/ambari/branches/ambari-186/hmc/html/bootstrapJs.htmli
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/html/bootstrapJs.htmli?rev=1347222&r1=1347221&r2=1347222&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/html/bootstrapJs.htmli (original)
+++ incubator/ambari/branches/ambari-186/hmc/html/bootstrapJs.htmli Thu Jun  7 00:39:27 2012
@@ -28,7 +28,7 @@
     "node", "io", "dump", "json", "panel", "event", "arraysort", 
     "array-extras", "datasource", "datasource-io", "datasource-jsonschema", 
     "datasource-polling", "stylesheet", "dd-drop", "dd-constrain",
-    "dd-proxy", "transition", function (Y) {
+    "dd-proxy", "transition", "node-event-simulate", function (Y) {
 
       /* Kick off the sequential loading. */
       loadNextJsFile();

Modified: incubator/ambari/branches/ambari-186/hmc/js/installationWizard.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/js/installationWizard.js?rev=1347222&r1=1347221&r2=1347222&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/js/installationWizard.js (original)
+++ incubator/ambari/branches/ambari-186/hmc/js/installationWizard.js Thu Jun  7 00:39:27 2012
@@ -83,3 +83,21 @@ globalYui.one('#installationWizardProgre
     InstallationWizardStages.transitionToCachedStage( previouslyCurrentStage.get('id'), newCurrentStage.get('id') );
   }
 }, 'li' ); 
+
+globalYui.one('#installationMainFormsDivId').delegate('key', function (e) {
+    /* Prevent the refresh of the page. */
+    e.preventDefault();
+
+    /* We don't have identically structured markup around all our 
+     * 'a.btn' elements, so we need this bubble-up search logic. 
+     */
+    var currentButtonSibling = e.target.ancestor();
+
+    while( !currentButtonSibling.next('a.btn') ) {
+      currentButtonSibling = currentButtonSibling.ancestor();
+    }
+
+    /* Generate the click. */
+    currentButtonSibling.next('a.btn').simulate('click');
+
+}, 'enter' );