Skip to content
Browse files

added handling for serveral app related unhandled states, removed onc…

…hange app listener
  • Loading branch information...
1 parent 5c423f1 commit 35568afdb95ad457f5d83558a75698efe51dc8b4 @jeads jeads committed Mar 25, 2013
View
9 datazilla/webapp/static/js/b2g_apps/AppsPage.js
@@ -102,6 +102,15 @@ var AppsPage = new Class( {
lookup['app_list'] = appList;
var app = $(view.appNameSpanSel).text();
+ //If there's only one app in the applist or the app
+ //is not in the app_list make sure the selected app
+ //is set to the first app in app_list
+ if((appList.length === 1) ||
+ (_.lastIndexOf(appList, app) === -1) ){
+
+ app = appList[0];
+ }
+
if( (app != "") && (appList.length > 0)){
params.push('app=' + app);
lookup['app'] = app;
View
15 datazilla/webapp/static/js/b2g_apps/GraphControlsComponent.js
@@ -344,16 +344,6 @@ var GraphControlsView = new Class({
//added to history
APPS_PAGE.disableSaveState = true;
- //Use the change event to synchronize saving state to after
- //the last checkbox is selected
- $(inputEls[ inputEls.length-1 ]).unbind('change');
- $(inputEls[ inputEls.length-1 ]).bind('change', function(event){
- //Reenable saveState
- APPS_PAGE.disableSaveState = false;
- //Save the new application selection state
- APPS_PAGE.saveState(true);
- });
-
for(var i=0; i<inputEls.length; i++){
var el = inputEls[i];
@@ -373,6 +363,11 @@ var GraphControlsView = new Class({
}
}
+ APPS_PAGE.disableSaveState = false;
+
+ //Save the new application selection state
+ APPS_PAGE.saveState(true);
+
},
selectApplications: function(testIds){
View
2 datazilla/webapp/static/js/b2g_apps/apps-summary-min.js
1 addition, 1 deletion not shown because the diff is too large. Please use a local Git client to view these changes.

0 comments on commit 35568af

Please sign in to comment.
Something went wrong with that request. Please try again.