From 571bab99cdb584a0b4190eaa911e9f8295581832 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 18 Sep 2017 13:41:39 +0300 Subject: [PATCH 1/9] [SSE] Fix Bug 35854. --- apps/spreadsheeteditor/main/app/controller/Toolbar.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/controller/Toolbar.js b/apps/spreadsheeteditor/main/app/controller/Toolbar.js index eb0132201..a64a8775c 100644 --- a/apps/spreadsheeteditor/main/app/controller/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Toolbar.js @@ -1392,8 +1392,11 @@ define([ shortcuts: { 'command+l,ctrl+l': function(e) { if ( me.editMode && !me._state.multiselect ) { - var formattableinfo = me.api.asc_getCellInfo().asc_getFormatTableInfo(); - if (!formattableinfo) { + var cellinfo = me.api.asc_getCellInfo(), + filterinfo = cellinfo.asc_getAutoFilterInfo(), + formattableinfo = cellinfo.asc_getFormatTableInfo(); + filterinfo = (filterinfo) ? filterinfo.asc_getIsAutoFilter() : null; + if (filterinfo!==null && !formattableinfo) { if (_.isUndefined(me.toolbar.mnuTableTemplatePicker)) me.onApiInitTableTemplates(me.api.asc_getTablePictures(formattableinfo)); var store = me.getCollection('TableTemplates'); From f5a3a86ba0701f828506a4a7ae3c74ba276b1440 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 18 Sep 2017 14:38:24 +0300 Subject: [PATCH 2/9] Fix Bug 35860. --- apps/common/main/lib/view/Header.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/common/main/lib/view/Header.js b/apps/common/main/lib/view/Header.js index dc619af1f..8feba516e 100644 --- a/apps/common/main/lib/view/Header.js +++ b/apps/common/main/lib/view/Header.js @@ -377,6 +377,12 @@ define([ if ( role == 'left' && (!config || !config.isDesktopApp)) { $html = $(templateLeftBox); this.logo = $html.find('#header-logo'); + + if (this.branding && this.branding.logo && this.branding.logo.image && this.logo) { + this.logo.html(''); + this.logo.css({'background-image': 'none', width: 'auto'}); + } + return $html; } else if ( role == 'right' ) { From d6aeb9f679e70c7322320345093fd3ff3c03de04 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 18 Sep 2017 16:00:10 +0300 Subject: [PATCH 3/9] [SSE] Fix Bug 28388. --- apps/spreadsheeteditor/main/app/controller/DocumentHolder.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js index 6026afb7b..4a75d61cb 100644 --- a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js +++ b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js @@ -1228,7 +1228,7 @@ define([ onSelectionChanged: function(info){ if (!this.mouse.isLeftButtonDown && !this.rangeSelectionMode && this.currentMenu && this.currentMenu.isVisible()){ - (this.permissions.isEdit) ? this.fillMenuProps(info, true, event) : this.fillViewMenuProps(info, true, event); + (this.permissions.isEdit) ? this.fillMenuProps(info, true) : this.fillViewMenuProps(info, true); } }, @@ -1503,7 +1503,7 @@ define([ }, showPopupMenu: function(menu, value, event){ - if (!_.isUndefined(menu) && menu !== null){ + if (!_.isUndefined(menu) && menu !== null && event){ Common.UI.Menu.Manager.hideAll(); var me = this, From 869c47155f2a121d002203346a3cbe1a5f2aa2cf Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 18 Sep 2017 16:53:29 +0300 Subject: [PATCH 4/9] [SSE] Fix Bug 35858. --- apps/spreadsheeteditor/main/app/controller/DocumentHolder.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js index 4a75d61cb..58e3c40c1 100644 --- a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js +++ b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js @@ -1416,7 +1416,6 @@ define([ documentHolder.pmiEntireShow.setVisible(iscolmenu||isrowmenu); documentHolder.pmiFreezePanes.setVisible(!iscelledit); documentHolder.pmiFreezePanes.setCaption(this.api.asc_getSheetViewSettings().asc_getIsFreezePane() ? documentHolder.textUnFreezePanes : documentHolder.textFreezePanes); - documentHolder.pmiEntriesList.setVisible(!iscelledit); /** coauthoring begin **/ documentHolder.ssMenu.items[17].setVisible(iscellmenu && !iscelledit && this.permissions.canCoAuthoring && this.permissions.canComments); @@ -1447,6 +1446,8 @@ define([ var inPivot = !!cellinfo.asc_getPivotTableInfo(); + documentHolder.pmiEntriesList.setVisible(!iscelledit && !inPivot); + _.each(documentHolder.ssMenu.items, function(item) { item.setDisabled(isCellLocked); }); From 405fe55461e513cfc005231385a538bed9f2a6d9 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Tue, 19 Sep 2017 12:16:59 +0300 Subject: [PATCH 5/9] Open "customization->logo->url" when click on the header logo. --- apps/common/main/lib/view/Header.js | 4 ++-- apps/common/main/resources/less/header.less | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/common/main/lib/view/Header.js b/apps/common/main/lib/view/Header.js index 8feba516e..e84506cdf 100644 --- a/apps/common/main/lib/view/Header.js +++ b/apps/common/main/lib/view/Header.js @@ -216,8 +216,8 @@ define([ var _url = !!me.branding && !!me.branding.logo && !!me.branding.logo.url ? me.branding.logo.url : 'http://www.onlyoffice.com'; - // var newDocumentPage = window.open(_url); - // newDocumentPage && newDocumentPage.focus(); + var newDocumentPage = window.open(_url); + newDocumentPage && newDocumentPage.focus(); }); onResetUsers(storeUsers); diff --git a/apps/common/main/resources/less/header.less b/apps/common/main/resources/less/header.less index 59f439d00..ce53bdadd 100644 --- a/apps/common/main/resources/less/header.less +++ b/apps/common/main/resources/less/header.less @@ -126,7 +126,7 @@ #header-logo { max-width: 200px; height: 100%; - //cursor: pointer; + cursor: pointer; padding: 7px 24px 7px 12px; i { From 2d887a4a82d6664759b492d82560f6c9cdcace9b Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Tue, 19 Sep 2017 13:14:16 +0300 Subject: [PATCH 6/9] [PE] Fix Bug 35440. --- apps/presentationeditor/main/app/view/DocumentPreview.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/presentationeditor/main/app/view/DocumentPreview.js b/apps/presentationeditor/main/app/view/DocumentPreview.js index 23de00a44..c948a37bd 100644 --- a/apps/presentationeditor/main/app/view/DocumentPreview.js +++ b/apps/presentationeditor/main/app/view/DocumentPreview.js @@ -276,14 +276,17 @@ define([ var me = this; var controls = $(this.el).find('.preview-controls'); controls.css('display', 'none'); + me.$el.css('cursor', 'none'); setTimeout(function(){ me.$el.on('mousemove', function() { clearTimeout(me.timerMove); controls.css('display', ''); + me.$el.css('cursor', ''); if (!controls.hasClass('over')) me.timerMove = setTimeout(function () { controls.css('display', 'none'); + me.$el.css('cursor', 'none'); }, 3000); }); From 03fc5c6dd242c44b6b69fa472fb5955122e74eda Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Tue, 19 Sep 2017 14:13:07 +0300 Subject: [PATCH 7/9] [SSE] Fix Bug 35857. --- apps/spreadsheeteditor/main/app/controller/DocumentHolder.js | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js index 58e3c40c1..6d078577c 100644 --- a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js +++ b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js @@ -98,6 +98,7 @@ define([ this.hkComments = 'alt+h'; keymap[this.hkComments] = function() { me.onAddComment(); + return false; }; Common.util.Shortcuts.delegateShortcuts({shortcuts:keymap}); }, From 876171af9c2184fd099803251f11380fdd1dbd3d Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Tue, 19 Sep 2017 15:42:44 +0300 Subject: [PATCH 8/9] Change click on header logo: click only on the image. --- apps/common/main/lib/view/Header.js | 2 +- apps/common/main/resources/less/header.less | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/common/main/lib/view/Header.js b/apps/common/main/lib/view/Header.js index e84506cdf..42fdf831c 100644 --- a/apps/common/main/lib/view/Header.js +++ b/apps/common/main/lib/view/Header.js @@ -212,7 +212,7 @@ define([ }); if ( me.logo ) - me.logo.on('click', function (e) { + me.logo.children(0).on('click', function (e) { var _url = !!me.branding && !!me.branding.logo && !!me.branding.logo.url ? me.branding.logo.url : 'http://www.onlyoffice.com'; diff --git a/apps/common/main/resources/less/header.less b/apps/common/main/resources/less/header.less index ce53bdadd..67c665f3a 100644 --- a/apps/common/main/resources/less/header.less +++ b/apps/common/main/resources/less/header.less @@ -126,15 +126,19 @@ #header-logo { max-width: 200px; height: 100%; - cursor: pointer; padding: 7px 24px 7px 12px; i { + cursor: pointer; width: 86px; height: 20px; display: block; .background-ximage('@{common-image-path}/header/header-logo.png', '@{common-image-path}/header/header-logo@2x.png', 86px); } + + img { + cursor: pointer; + } } } From 28661417e81c7addb62b12209da125dc6ab4e485 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Tue, 19 Sep 2017 17:26:09 +0300 Subject: [PATCH 9/9] Fix Bug 35853. --- apps/common/main/lib/component/BaseView.js | 2 ++ apps/documenteditor/main/app/view/DocumentHolder.js | 4 ++-- apps/presentationeditor/main/app/view/DocumentHolder.js | 4 ++-- apps/spreadsheeteditor/main/app/controller/DocumentHolder.js | 4 ++-- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/apps/common/main/lib/component/BaseView.js b/apps/common/main/lib/component/BaseView.js index dfe578cf2..ae093ef5e 100644 --- a/apps/common/main/lib/component/BaseView.js +++ b/apps/common/main/lib/component/BaseView.js @@ -66,6 +66,7 @@ define([ PAGEUP: 33, PAGEDOWN: 34, INSERT: 45, + EQUALITY_FF:61, NUM_PLUS: 107, NUM_MINUS: 109, F1: 112, @@ -80,6 +81,7 @@ define([ F10: 121, F11: 122, F12: 123, + MINUS_FF: 173, EQUALITY: 187, MINUS: 189 }, diff --git a/apps/documenteditor/main/app/view/DocumentHolder.js b/apps/documenteditor/main/app/view/DocumentHolder.js index 7ef3b3cb6..51c8c2c72 100644 --- a/apps/documenteditor/main/app/view/DocumentHolder.js +++ b/apps/documenteditor/main/app/view/DocumentHolder.js @@ -267,13 +267,13 @@ define([ if (me.api){ var key = event.keyCode; if ((event.ctrlKey || event.metaKey) && !event.shiftKey && !event.altKey){ - if (key === Common.UI.Keys.NUM_PLUS || key === Common.UI.Keys.EQUALITY || (Common.Utils.isOpera && key == 43)){ + if (key === Common.UI.Keys.NUM_PLUS || key === Common.UI.Keys.EQUALITY || (Common.Utils.isGecko && key === Common.UI.Keys.EQUALITY_FF) || (Common.Utils.isOpera && key == 43)){ me.api.zoomIn(); event.preventDefault(); event.stopPropagation(); return false; } - else if (key === Common.UI.Keys.NUM_MINUS || key === Common.UI.Keys.MINUS || (Common.Utils.isOpera && key == 45)){ + else if (key === Common.UI.Keys.NUM_MINUS || key === Common.UI.Keys.MINUS || (Common.Utils.isGecko && key === Common.UI.Keys.MINUS_FF) || (Common.Utils.isOpera && key == 45)){ me.api.zoomOut(); event.preventDefault(); event.stopPropagation(); diff --git a/apps/presentationeditor/main/app/view/DocumentHolder.js b/apps/presentationeditor/main/app/view/DocumentHolder.js index 2a024dd7a..5f033b057 100644 --- a/apps/presentationeditor/main/app/view/DocumentHolder.js +++ b/apps/presentationeditor/main/app/view/DocumentHolder.js @@ -273,13 +273,13 @@ define([ if (me.api){ var key = event.keyCode; if ((event.ctrlKey || event.metaKey) && !event.shiftKey && !event.altKey){ - if (key === Common.UI.Keys.NUM_PLUS || key === Common.UI.Keys.EQUALITY || (Common.Utils.isOpera && key == 43)){ + if (key === Common.UI.Keys.NUM_PLUS || key === Common.UI.Keys.EQUALITY || (Common.Utils.isGecko && key === Common.UI.Keys.EQUALITY_FF) || (Common.Utils.isOpera && key == 43)){ me.api.zoomIn(); event.preventDefault(); event.stopPropagation(); return false; } - else if (key === Common.UI.Keys.NUM_MINUS || key === Common.UI.Keys.MINUS || (Common.Utils.isOpera && key == 45)){ + else if (key === Common.UI.Keys.NUM_MINUS || key === Common.UI.Keys.MINUS || (Common.Utils.isGecko && key === Common.UI.Keys.MINUS_FF) || (Common.Utils.isOpera && key == 45)){ me.api.zoomOut(); event.preventDefault(); event.stopPropagation(); diff --git a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js index 6d078577c..1ca136c2b 100644 --- a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js +++ b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js @@ -1176,7 +1176,7 @@ define([ if (this.api){ var key = event.keyCode; if ((event.ctrlKey || event.metaKey) && !event.shiftKey && !event.altKey){ - if (key === Common.UI.Keys.NUM_PLUS || key === Common.UI.Keys.EQUALITY || (Common.Utils.isOpera && key == 43)){ + if (key === Common.UI.Keys.NUM_PLUS || key === Common.UI.Keys.EQUALITY || (Common.Utils.isGecko && key === Common.UI.Keys.EQUALITY_FF) || (Common.Utils.isOpera && key == 43)){ if (!this.api.isCellEdited) { var factor = Math.floor(this.api.asc_getZoom() * 10)/10; factor += .1; @@ -1188,7 +1188,7 @@ define([ event.stopPropagation(); return false; } - } else if (key === Common.UI.Keys.NUM_MINUS || key === Common.UI.Keys.MINUS || (Common.Utils.isOpera && key == 45)){ + } else if (key === Common.UI.Keys.NUM_MINUS || key === Common.UI.Keys.MINUS || (Common.Utils.isGecko && key === Common.UI.Keys.MINUS_FF) || (Common.Utils.isOpera && key == 45)){ if (!this.api.isCellEdited) { factor = Math.ceil(this.api.asc_getZoom() * 10)/10; factor -= .1;