Skip to content
Snippets Groups Projects
Commit 85feb5ab authored by juanf's avatar juanf
Browse files

SSDM-504: Link on the title to come back to pages that change with the title.

SVN: 31740
parent 1cec7c24
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
......@@ -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({
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment