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/06 00:34:15 UTC

svn commit: r1346634 - in /incubator/ambari/branches/ambari-186: CHANGES.txt hmc/js/utils.js

Author: vikram
Date: Tue Jun  5 22:34:15 2012
New Revision: 1346634

URL: http://svn.apache.org/viewvc?rev=1346634&view=rev
Log:
AMBARI-339. Making transitionToNextStage more robust  (Contributed by Vikram)

Modified:
    incubator/ambari/branches/ambari-186/CHANGES.txt
    incubator/ambari/branches/ambari-186/hmc/js/utils.js

Modified: incubator/ambari/branches/ambari-186/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/CHANGES.txt?rev=1346634&r1=1346633&r2=1346634&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/CHANGES.txt (original)
+++ incubator/ambari/branches/ambari-186/CHANGES.txt Tue Jun  5 22:34:15 2012
@@ -6,6 +6,8 @@ characters wide.
 
 Release 0.1.x - unreleased
 
+  AMBARI-339. Making transitionToNextStage more robust (Vikram)
+
   AMBARI-345. Make TxnProgressWidget More Robust In The Face Of Un-Ready Txn Stages (Varun via Vikram)
 
   AMBARI-346. user should not be allowed to change the paths to various directories on the advance config page (Hitesh via Vikram)

Modified: incubator/ambari/branches/ambari-186/hmc/js/utils.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/js/utils.js?rev=1346634&r1=1346633&r2=1346634&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/js/utils.js (original)
+++ incubator/ambari/branches/ambari-186/hmc/js/utils.js Tue Jun  5 22:34:15 2012
@@ -160,16 +160,18 @@ function transitionToNextStage( currentS
   /* There can be only one 'current' stage at a time. */
   var currentStage = globalYui.one('.installationWizardCurrentStage');
 
-  var nextStage = null;
+  if ( currentStage ) {
+    var nextStage = null;
 
-  /* Check to make sure we haven't reached the last stage. */
-  if( nextStage = currentStage.next('.installationWizardUnvisitedStage') ) {
+    /* Check to make sure we haven't reached the last stage. */
+    if( nextStage = currentStage.next('.installationWizardUnvisitedStage') ) {
 
-    /* Mark this up-until-now 'current' stage as 'visited'. */
-    currentStage.replaceClass( 'installationWizardCurrentStage', 'installationWizardVisitedStage' );
+      /* Mark this up-until-now 'current' stage as 'visited'. */
+      currentStage.replaceClass( 'installationWizardCurrentStage', 'installationWizardVisitedStage' );
 
-    /* Mark the stage after that as the new 'current' stage. */
-    nextStage.replaceClass( 'installationWizardUnvisitedStage', 'installationWizardCurrentStage' );
+      /* Mark the stage after that as the new 'current' stage. */
+      nextStage.replaceClass( 'installationWizardUnvisitedStage', 'installationWizardCurrentStage' );
+    }
   }
 }