Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix tab handling for walls

  • Loading branch information...
commit 24138ce0f506cb6de831277f13ef9ccfbb543fa0 1 parent 8712ef6
@birtles birtles authored
View
7 wall/public/wall-maker/js/manage-wall.js
@@ -32,6 +32,13 @@ var ManageWallController =
},
show: function(wallId, tabName) {
+ // If we're already showing the correct page, just switch tab
+ if (wallId == this.wallId) {
+ this.selectTab(tabName);
+ return;
+ }
+
+ // Load the wall
this.wallId = wallId;
// Show loading screen
View
15 wall/public/wall-maker/js/navi.js
@@ -80,23 +80,14 @@ var Navigation =
} else if (path.match(/wall\/(\d+)$/)) {
var wallId = RegExp.$1;
var tab = document.location.hash.substr(1);
- // If we are already on the manage screen just update the tab
- // XXX This is not right. The wallId may be different
- if (Navigation._getCurrentlyShowingScreenId() == 'screen-manage') {
- ManageWallController.selectTab(tab);
- screenId = null;
- } else {
- ManageWallController.show(wallId, tab);
- screenId = "screen-manage";
- }
+ ManageWallController.show(wallId, tab);
+ screenId = "screen-manage";
// other
} else {
screenId = "screen-home";
}
- if (screenId) {
- Navigation.showScreen(screenId);
- }
+ Navigation.showScreen(screenId);
},
// Displays the selected screen
Please sign in to comment.
Something went wrong with that request. Please try again.