diff --git a/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/controllers/MainController.js b/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/controllers/MainController.js index 70724ece792448a43b95ce76ad3c819036784f95..fd8f51823d6c60846f57e036ccfd2249d583869b 100644 --- a/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/controllers/MainController.js +++ b/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/controllers/MainController.js @@ -117,7 +117,7 @@ function MainController(profile) { localReference.sideMenu.hideSideMenu(); } } else { - localReference.changeView("showHelloPage", null); + localReference.changeView("showBlancPage", null); } Util.unblockUI(); @@ -168,9 +168,9 @@ function MainController(profile) { this._showInspectors(); window.scrollTo(0,0); break; - case "showHelloPage": - document.title = "Main Menu"; - this._showHelloPage(); + case "showBlancPage": + document.title = ""; + this._showBlancPage(); window.scrollTo(0,0); break; case "showSearchPage": @@ -279,7 +279,7 @@ function MainController(profile) { this.inspector.repaint(); } - this._showHelloPage = function() { + this._showBlancPage = function() { //Show Hello Page $("#mainContainer").empty(); this.currentView = null; diff --git a/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/widgets/SideMenuWidget.js b/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/widgets/SideMenuWidget.js index 9726b3a4159f42a6e63b2552e41a4cce2c26a874..6a29716bfa66c4b37f0e562726e3d38c8d4a1462 100644 --- a/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/widgets/SideMenuWidget.js +++ b/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/widgets/SideMenuWidget.js @@ -29,7 +29,7 @@ function SideMenuWidget(mainController, containerId, serverFacade) { this._serverFacade = serverFacade; this._menuDOMTitle = null; this._menuDOMBody = null; - this._menuStructure = new SideMenuWidgetComponent(false, true, "Main Menu", null, { children : [] }, 'showHelloPage', null, ""); + this._menuStructure = new SideMenuWidgetComponent(false, true, "Main Menu", null, { children : [] }, 'showBlancPage', null, ""); this._pointerToMenuNode = this._menuStructure; this.isHidden = false; @@ -108,7 +108,7 @@ function SideMenuWidget(mainController, containerId, serverFacade) { var newMenuIfSelectedSpace = { children : [] } - var menuItemSpace = new SideMenuWidgetComponent(true, false, space.code, _this._menuStructure, newMenuIfSelectedSpace, 'showHelloPage', null, "(Space)"); + var menuItemSpace = new SideMenuWidgetComponent(true, false, space.code, _this._menuStructure, newMenuIfSelectedSpace, 'showBlancPage', null, "(Space)"); _this._menuStructure.newMenuIfSelected.children.push(menuItemSpace); //Fill Projects @@ -336,7 +336,22 @@ function SideMenuWidget(mainController, containerId, serverFacade) { this._menuDOMTitle.append(backButton); } - var $mainTitle = $("<span>").append(menuToPaint.displayName + " " + menuToPaint.contextTitle); + var $titleAsTextOrLink = null; + if(menuToPaint.newViewIfSelected && menuToPaint.newViewIfSelected != "showBlancPage") { + $titleAsTextOrLink = $("<a>", { "href" : "javascript:void(0);" }).append(menuToPaint.displayName + " " + menuToPaint.contextTitle) + + var clickFunction = function(menuToPaint) { + return function() { + _this._mainController.changeView(menuToPaint.newViewIfSelected, menuToPaint.newViewIfSelectedData); + } + }; + + $titleAsTextOrLink.click(clickFunction(menuToPaint)); + } else { + $titleAsTextOrLink = menuToPaint.displayName + " " + menuToPaint.contextTitle; + } + + var $mainTitle = $("<span>").append($titleAsTextOrLink); if(isBackButtonShown) { $mainTitle.css({