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/common/main/lib/view/Header.js b/apps/common/main/lib/view/Header.js index 8feba516e..42fdf831c 100644 --- a/apps/common/main/lib/view/Header.js +++ b/apps/common/main/lib/view/Header.js @@ -212,12 +212,12 @@ 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'; - // 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..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; + } } } 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/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); }); diff --git a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js index 6026afb7b..1ca136c2b 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}); }, @@ -1175,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; @@ -1187,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; @@ -1228,7 +1229,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); } }, @@ -1416,7 +1417,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 +1447,8 @@ define([ var inPivot = !!cellinfo.asc_getPivotTableInfo(); + documentHolder.pmiEntriesList.setVisible(!iscelledit && !inPivot); + _.each(documentHolder.ssMenu.items, function(item) { item.setDisabled(isCellLocked); }); @@ -1503,7 +1505,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, 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');