From 1058d48f460e5cd2edbd42a1b442836af88281e7 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 21 Oct 2016 16:47:46 +0300 Subject: [PATCH] Add parameters to config for hiding toolbar, left menu, right menu. --- apps/api/documents/api.js | 5 ++++- apps/documenteditor/main/app/controller/Main.js | 5 ++++- apps/documenteditor/main/app/view/LeftMenu.js | 2 +- apps/presentationeditor/main/app/controller/Main.js | 5 ++++- apps/presentationeditor/main/app/view/LeftMenu.js | 2 +- apps/spreadsheeteditor/main/app/controller/Main.js | 5 ++++- apps/spreadsheeteditor/main/app/view/LeftMenu.js | 2 +- 7 files changed, 19 insertions(+), 7 deletions(-) diff --git a/apps/api/documents/api.js b/apps/api/documents/api.js index c05990e5a..fd4894e55 100644 --- a/apps/api/documents/api.js +++ b/apps/api/documents/api.js @@ -105,7 +105,10 @@ text: 'Go to London' }, chat: false, - comments: false + comments: false, + leftMenu: true, + rightMenu: true, + toolbar: true }, plugins: { url: '../../../../sdkjs-plugins/', diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index c591b3b68..bb29b3882 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -61,7 +61,10 @@ define([ var mapCustomizationElements = { about: 'button#left-btn-about', feedback: 'button#left-btn-support', - goback: '#fm-btn-back > a, #header-back > div' + goback: '#fm-btn-back > a, #header-back > div', + toolbar: '#viewport #toolbar', + leftMenu: '#viewport #left-menu', + rightMenu: '#viewport #right-menu' }; Common.localStorage.setId('text'); diff --git a/apps/documenteditor/main/app/view/LeftMenu.js b/apps/documenteditor/main/app/view/LeftMenu.js index 8b9679064..aaeefbbc4 100644 --- a/apps/documenteditor/main/app/view/LeftMenu.js +++ b/apps/documenteditor/main/app/view/LeftMenu.js @@ -309,7 +309,7 @@ define([ showMenu: function(menu, opts) { var re = /^(\w+):?(\w*)$/.exec(menu); - if (re[1] == 'file') { + if (re[1] == 'file' && this.btnFile.isVisible() ) { if (!this.btnFile.pressed) { this.btnFile.toggle(true); // this.onBtnMenuClick(this.btnFile); diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index 81fc7760b..5a573bd0e 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -59,7 +59,10 @@ define([ var mapCustomizationElements = { about: 'button#left-btn-about', feedback: 'button#left-btn-support', - goback: '#fm-btn-back > a, #header-back > div' + goback: '#fm-btn-back > a, #header-back > div', + toolbar: '#viewport #toolbar', + leftMenu: '#viewport #left-menu', + rightMenu: '#viewport #right-menu' }; Common.localStorage.setId('presentation'); diff --git a/apps/presentationeditor/main/app/view/LeftMenu.js b/apps/presentationeditor/main/app/view/LeftMenu.js index 2d246bb06..a3d0624d0 100644 --- a/apps/presentationeditor/main/app/view/LeftMenu.js +++ b/apps/presentationeditor/main/app/view/LeftMenu.js @@ -330,7 +330,7 @@ define([ showMenu: function(menu) { var re = /^(\w+):?(\w*)$/.exec(menu); - if (re[1] == 'file') { + if (re[1] == 'file' && this.btnFile.isVisible()) { if (!this.btnFile.pressed) { this.btnFile.toggle(true); // this.onBtnMenuClick(this.btnFile); diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index f8550ddb8..f5fbf3567 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -65,7 +65,10 @@ define([ var mapCustomizationElements = { about: 'button#left-btn-about', feedback: 'button#left-btn-support', - goback: '#fm-btn-back > a, #header-back > div' + goback: '#fm-btn-back > a, #header-back > div', + toolbar: '#viewport #toolbar', + leftMenu: '#viewport #left-menu', + rightMenu: '#viewport #right-menu' }; Common.localStorage.setId('table'); diff --git a/apps/spreadsheeteditor/main/app/view/LeftMenu.js b/apps/spreadsheeteditor/main/app/view/LeftMenu.js index 6e63ce136..4eb41ca9b 100644 --- a/apps/spreadsheeteditor/main/app/view/LeftMenu.js +++ b/apps/spreadsheeteditor/main/app/view/LeftMenu.js @@ -294,7 +294,7 @@ define([ showMenu: function(menu) { var re = /^(\w+):?(\w*)$/.exec(menu); - if (re[1] == 'file') { + if (re[1] == 'file' && this.btnFile.isVisible()) { if (!this.btnFile.pressed) { this.btnFile.toggle(true); this.btnFile.$el.focus();