From 021f2b1237571feedf4f0278b7f63a7daec3f347 Mon Sep 17 00:00:00 2001 From: "Fuentes Serna Juan Mariano (ID SIS)" <juanf@bs-mbpr28.d.ethz.ch> Date: Fri, 9 Feb 2018 11:48:48 +0100 Subject: [PATCH] SSDM-6017 : Full screen mode --- .../html/js/controllers/LayoutManager.js | 18 ++++++++++++++++++ .../views/StorageManager/StorageManagerView.js | 17 +++++++++++++++-- 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/controllers/LayoutManager.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/controllers/LayoutManager.js index a9efab1dbbd..ff5ae8a80df 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/controllers/LayoutManager.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/controllers/LayoutManager.js @@ -371,6 +371,24 @@ var LayoutManager = { alert("Layout manager unable to know the layout, this should never happen."); } }, + fullScreen : function() { + var width = $( window ).width(); + if (width > this.DESKTOP_SIZE) { + this.firstColumn.hide(); + this.thirdColumn.hide(); + this.secondColumn.width(width); + } else if (width > this.TABLET_SIZE) { + this.firstColumn.hide(); + this.secondColumn.width(width); + } else if (width > this.MOBILE_SIZE) { + this.secondColumn.width(width); + } else { + alert("Layout manager unable to go fullScreen, this should never happen."); + } + }, + restoreStandardSize : function() { + LayoutManager.resize(mainController.views, true); + }, reloadView : function(view, forceFirstTime) { var _this = this; this.isLoadingView = true; diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/StorageManager/StorageManagerView.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/StorageManager/StorageManagerView.js index 7c906161cb5..85d703add3b 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/StorageManager/StorageManagerView.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/StorageManager/StorageManagerView.js @@ -23,7 +23,20 @@ function StorageManagerView(storageManagerController, storageManagerModel, stora this._changeLogContainer = $("<div>").append("None"); this._moveBtn = FormUtil.getButtonWithIcon("glyphicon-floppy-disk", null, "Save Changes"); - this._showHideStorageToBtn = FormUtil.getButtonWithIcon("glyphicon-eye-open", null, "Show/Hide Storage B"); + this._showHideStorageToBtn = FormUtil.getButtonWithIcon("glyphicon-eye-open", null, "Toggle Storage B"); + this._showHideMenuBtn = FormUtil.getButtonWithIcon("glyphicon-resize-full", function() { + var iconSpan = $(this.children[0]); + if(iconSpan.hasClass("glyphicon-resize-full")) { + iconSpan.removeClass("glyphicon-resize-full"); + iconSpan.addClass("glyphicon-resize-small"); + LayoutManager.fullScreen(); + } else if(iconSpan.hasClass("glyphicon-resize-small")) { + iconSpan.removeClass("glyphicon-resize-small"); + iconSpan.addClass("glyphicon-resize-full"); + LayoutManager.restoreStandardSize(); + } + }, "Toggle Full Screen"); + this._moveBtn.removeClass("btn-default"); this._moveBtn.addClass("btn-primary"); @@ -32,7 +45,7 @@ function StorageManagerView(storageManagerController, storageManagerModel, stora var $container = views.content; $header.append($("<h2>").append("Storage Manager")); - $header.append(this._showHideStorageToBtn).append(" ").append(this._moveBtn); + $header.append(this._moveBtn).append(" ").append(this._showHideStorageToBtn).append(" ").append(this._showHideMenuBtn); var $containerColumn = $("<form>", { 'role' : "form", -- GitLab