Merge pull request #9 from ONLYOFFICE/feature/bugfix

Feature/bugfix
This commit is contained in:
Julia Radzhabova 2017-09-20 10:24:14 +03:00 committed by GitHub
commit 49b4759129
8 changed files with 29 additions and 15 deletions

View file

@ -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
},

View file

@ -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);

View file

@ -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;
}
}
}

View file

@ -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();

View file

@ -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();

View file

@ -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);
});

View file

@ -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,

View file

@ -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');