commit
c203e8aac6
|
@ -584,7 +584,7 @@ define([
|
||||||
}
|
}
|
||||||
me.btnSharing && me.btnSharing.updateHint(me.tipSharing);
|
me.btnSharing && me.btnSharing.updateHint(me.tipSharing);
|
||||||
me.btnHistory && me.btnHistory.updateHint(me.tipHistory);
|
me.btnHistory && me.btnHistory.updateHint(me.tipHistory);
|
||||||
me.btnChat && me.btnChat.updateHint(me.txtChat + Common.Utils.String.platformKey('Alt+Q'));
|
me.btnChat && me.btnChat.updateHint(me.txtChat + (!Common.Utils.isMac ? Common.Utils.String.platformKey('Alt+Q') : ''));
|
||||||
|
|
||||||
if (me.btnCoAuthMode) {
|
if (me.btnCoAuthMode) {
|
||||||
me.btnCoAuthMode.setMenu(
|
me.btnCoAuthMode.setMenu(
|
||||||
|
|
|
@ -148,7 +148,7 @@ define([
|
||||||
};
|
};
|
||||||
|
|
||||||
var keymap = {};
|
var keymap = {};
|
||||||
me.hkComments = 'alt+h';
|
me.hkComments = Common.Utils.isMac ? 'command+alt+a' : 'alt+h';
|
||||||
keymap[me.hkComments] = function() {
|
keymap[me.hkComments] = function() {
|
||||||
if (me.api.can_AddQuotedComment()!==false) {
|
if (me.api.can_AddQuotedComment()!==false) {
|
||||||
me.addComment();
|
me.addComment();
|
||||||
|
|
|
@ -130,21 +130,22 @@ define([
|
||||||
isCommentsOnly: false
|
isCommentsOnly: false
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
Common.util.Shortcuts.delegateShortcuts({
|
|
||||||
shortcuts: {
|
var keymap = {
|
||||||
'command+shift+s,ctrl+shift+s': _.bind(this.onShortcut, this, 'save'),
|
'command+shift+s,ctrl+shift+s': _.bind(this.onShortcut, this, 'save'),
|
||||||
'command+f,ctrl+f': _.bind(this.onShortcut, this, 'search'),
|
'command+f,ctrl+f': _.bind(this.onShortcut, this, 'search'),
|
||||||
'ctrl+h': _.bind(this.onShortcut, this, 'replace'),
|
'ctrl+h': _.bind(this.onShortcut, this, 'replace'),
|
||||||
'alt+f': _.bind(this.onShortcut, this, 'file'),
|
|
||||||
'esc': _.bind(this.onShortcut, this, 'escape'),
|
'esc': _.bind(this.onShortcut, this, 'escape'),
|
||||||
/** coauthoring begin **/
|
/** coauthoring begin **/
|
||||||
'alt+q': _.bind(this.onShortcut, this, 'chat'),
|
|
||||||
'command+shift+h,ctrl+shift+h': _.bind(this.onShortcut, this, 'comments'),
|
'command+shift+h,ctrl+shift+h': _.bind(this.onShortcut, this, 'comments'),
|
||||||
/** coauthoring end **/
|
/** coauthoring end **/
|
||||||
'f1': _.bind(this.onShortcut, this, 'help')
|
'f1': _.bind(this.onShortcut, this, 'help')
|
||||||
|
};
|
||||||
|
if (!Common.Utils.isMac) {
|
||||||
|
keymap['alt+f'] = _.bind(this.onShortcut, this, 'file');
|
||||||
|
keymap['alt+q'] = _.bind(this.onShortcut, this, 'chat');
|
||||||
}
|
}
|
||||||
});
|
Common.util.Shortcuts.delegateShortcuts({shortcuts:keymap});
|
||||||
|
|
||||||
Common.util.Shortcuts.suspendEvents();
|
Common.util.Shortcuts.suspendEvents();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -3166,7 +3166,8 @@ define([
|
||||||
toolbar.onCollaborativeChanges();
|
toolbar.onCollaborativeChanges();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
disable ? Common.util.Shortcuts.suspendEvents('alt+h') : Common.util.Shortcuts.resumeEvents('alt+h');
|
var hkComments = Common.Utils.isMac ? 'command+alt+a' : 'alt+h';
|
||||||
|
disable ? Common.util.Shortcuts.suspendEvents(hkComments) : Common.util.Shortcuts.resumeEvents(hkComments);
|
||||||
},
|
},
|
||||||
|
|
||||||
onSelectRecepientsClick: function(menu, item, e) {
|
onSelectRecepientsClick: function(menu, item, e) {
|
||||||
|
|
|
@ -126,7 +126,7 @@ define([
|
||||||
|
|
||||||
this.btnChat = new Common.UI.Button({
|
this.btnChat = new Common.UI.Button({
|
||||||
el: $markup.elementById('#left-btn-chat'),
|
el: $markup.elementById('#left-btn-chat'),
|
||||||
hint: this.tipChat + Common.Utils.String.platformKey('Alt+Q'),
|
hint: this.tipChat + (!Common.Utils.isMac ? Common.Utils.String.platformKey('Alt+Q') : ''),
|
||||||
enableToggle: true,
|
enableToggle: true,
|
||||||
disabled: true,
|
disabled: true,
|
||||||
toggleGroup: 'leftMenuGroup'
|
toggleGroup: 'leftMenuGroup'
|
||||||
|
|
|
@ -1113,7 +1113,7 @@ define([
|
||||||
|
|
||||||
if (w!==null) w = this._mm2pt(w);
|
if (w!==null) w = this._mm2pt(w);
|
||||||
var _selectedItem = (w===null) ? w : _.find(this.cmbBorderSize.store.models, function(item) {
|
var _selectedItem = (w===null) ? w : _.find(this.cmbBorderSize.store.models, function(item) {
|
||||||
if ( w<item.attributes.value+0.00001 && w>item.attributes.value-0.00001) {
|
if ( w<item.attributes.value+0.0001 && w>item.attributes.value-0.0001) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -773,7 +773,7 @@ define([
|
||||||
|
|
||||||
if (w!==null) w = this._mm2pt(w);
|
if (w!==null) w = this._mm2pt(w);
|
||||||
var _selectedItem = (w===null) ? w : _.find(this.cmbBorderSize.store.models, function(item) {
|
var _selectedItem = (w===null) ? w : _.find(this.cmbBorderSize.store.models, function(item) {
|
||||||
if ( w<item.attributes.value+0.00001 && w>item.attributes.value-0.00001) {
|
if ( w<item.attributes.value+0.0001 && w>item.attributes.value-0.0001) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -130,7 +130,7 @@ define([
|
||||||
// Hotkeys
|
// Hotkeys
|
||||||
// ---------------------
|
// ---------------------
|
||||||
var keymap = {};
|
var keymap = {};
|
||||||
me.hkComments = 'alt+h';
|
me.hkComments = Common.Utils.isMac ? 'command+alt+a' : 'alt+h';
|
||||||
keymap[me.hkComments] = function() {
|
keymap[me.hkComments] = function() {
|
||||||
if (me.api.can_AddQuotedComment()!==false && me.documentHolder.slidesCount>0) {
|
if (me.api.can_AddQuotedComment()!==false && me.documentHolder.slidesCount>0) {
|
||||||
me.addComment();
|
me.addComment();
|
||||||
|
|
|
@ -118,21 +118,21 @@ define([
|
||||||
this.leftMenu.btnThumbs.on('toggle', _.bind(this.onShowTumbnails, this));
|
this.leftMenu.btnThumbs.on('toggle', _.bind(this.onShowTumbnails, this));
|
||||||
this.leftMenu.btnSearchBar.on('toggle', _.bind(this.onMenuSearchBar, this));
|
this.leftMenu.btnSearchBar.on('toggle', _.bind(this.onMenuSearchBar, this));
|
||||||
|
|
||||||
Common.util.Shortcuts.delegateShortcuts({
|
var keymap = {
|
||||||
shortcuts: {
|
|
||||||
'command+shift+s,ctrl+shift+s': _.bind(this.onShortcut, this, 'save'),
|
'command+shift+s,ctrl+shift+s': _.bind(this.onShortcut, this, 'save'),
|
||||||
'command+f,ctrl+f': _.bind(this.onShortcut, this, 'search'),
|
'command+f,ctrl+f': _.bind(this.onShortcut, this, 'search'),
|
||||||
'ctrl+h': _.bind(this.onShortcut, this, 'replace'),
|
'ctrl+h': _.bind(this.onShortcut, this, 'replace'),
|
||||||
'alt+f': _.bind(this.onShortcut, this, 'file'),
|
|
||||||
'esc': _.bind(this.onShortcut, this, 'escape'),
|
'esc': _.bind(this.onShortcut, this, 'escape'),
|
||||||
/** coauthoring begin **/
|
/** coauthoring begin **/
|
||||||
'alt+q': _.bind(this.onShortcut, this, 'chat'),
|
|
||||||
'command+shift+h,ctrl+shift+h': _.bind(this.onShortcut, this, 'comments'),
|
'command+shift+h,ctrl+shift+h': _.bind(this.onShortcut, this, 'comments'),
|
||||||
/** coauthoring end **/
|
/** coauthoring end **/
|
||||||
'f1': _.bind(this.onShortcut, this, 'help')
|
'f1': _.bind(this.onShortcut, this, 'help')
|
||||||
|
};
|
||||||
|
if (!Common.Utils.isMac) {
|
||||||
|
keymap['alt+f'] = _.bind(this.onShortcut, this, 'file');
|
||||||
|
keymap['alt+q'] = _.bind(this.onShortcut, this, 'chat');
|
||||||
}
|
}
|
||||||
});
|
Common.util.Shortcuts.delegateShortcuts({shortcuts:keymap});
|
||||||
|
|
||||||
Common.util.Shortcuts.suspendEvents();
|
Common.util.Shortcuts.suspendEvents();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -2623,12 +2623,14 @@ define([
|
||||||
|
|
||||||
if (toolbar.btnsAddSlide) // toolbar buttons are rendered
|
if (toolbar.btnsAddSlide) // toolbar buttons are rendered
|
||||||
this.toolbar.lockToolbar(Common.enumLock.menuFileOpen, disable, {array: toolbar.btnsAddSlide.concat(toolbar.btnChangeSlide, toolbar.btnPreview)});
|
this.toolbar.lockToolbar(Common.enumLock.menuFileOpen, disable, {array: toolbar.btnsAddSlide.concat(toolbar.btnChangeSlide, toolbar.btnPreview)});
|
||||||
|
|
||||||
|
var hkComments = Common.Utils.isMac ? 'command+alt+a' : 'alt+h';
|
||||||
if(disable) {
|
if(disable) {
|
||||||
mask = $("<div class='toolbar-mask'>").appendTo(toolbar.$el.find('.toolbar'));
|
mask = $("<div class='toolbar-mask'>").appendTo(toolbar.$el.find('.toolbar'));
|
||||||
Common.util.Shortcuts.suspendEvents('command+k, ctrl+k, alt+h, command+f5, ctrl+f5');
|
Common.util.Shortcuts.suspendEvents('command+k, ctrl+k, command+f5, ctrl+f5, ' + hkComments);
|
||||||
} else {
|
} else {
|
||||||
mask.remove();
|
mask.remove();
|
||||||
Common.util.Shortcuts.resumeEvents('command+k, ctrl+k, alt+h, command+f5, ctrl+f5');
|
Common.util.Shortcuts.resumeEvents('command+k, ctrl+k, command+f5, ctrl+f5, ' + hkComments);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -134,7 +134,7 @@ define([
|
||||||
|
|
||||||
this.btnChat = new Common.UI.Button({
|
this.btnChat = new Common.UI.Button({
|
||||||
el: $markup.elementById('#left-btn-chat'),
|
el: $markup.elementById('#left-btn-chat'),
|
||||||
hint: this.tipChat + Common.Utils.String.platformKey('Alt+Q'),
|
hint: this.tipChat + (!Common.Utils.isMac ? Common.Utils.String.platformKey('Alt+Q') : ''),
|
||||||
enableToggle: true,
|
enableToggle: true,
|
||||||
disabled: true,
|
disabled: true,
|
||||||
toggleGroup: 'leftMenuGroup'
|
toggleGroup: 'leftMenuGroup'
|
||||||
|
|
|
@ -1043,7 +1043,7 @@ define([
|
||||||
|
|
||||||
if (w!==null) w = this._mm2pt(w);
|
if (w!==null) w = this._mm2pt(w);
|
||||||
var _selectedItem = (w===null) ? w : _.find(this.cmbBorderSize.store.models, function(item) {
|
var _selectedItem = (w===null) ? w : _.find(this.cmbBorderSize.store.models, function(item) {
|
||||||
if ( w<item.attributes.value+0.00001 && w>item.attributes.value-0.00001) {
|
if ( w<item.attributes.value+0.0001 && w>item.attributes.value-0.0001) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -976,7 +976,7 @@ define([
|
||||||
|
|
||||||
if (w!==null) w = this._mm2pt(w);
|
if (w!==null) w = this._mm2pt(w);
|
||||||
var _selectedItem = (w===null) ? w : _.find(this.cmbBorderSize.store.models, function(item) {
|
var _selectedItem = (w===null) ? w : _.find(this.cmbBorderSize.store.models, function(item) {
|
||||||
if ( w<item.attributes.value+0.00001 && w>item.attributes.value-0.00001) {
|
if ( w<item.attributes.value+0.0001 && w>item.attributes.value-0.0001) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -134,7 +134,7 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
var keymap = {};
|
var keymap = {};
|
||||||
this.hkComments = 'alt+h';
|
this.hkComments = Common.Utils.isMac ? 'command+alt+a' : 'alt+h';
|
||||||
keymap[this.hkComments] = function() {
|
keymap[this.hkComments] = function() {
|
||||||
me.onAddComment();
|
me.onAddComment();
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -111,21 +111,21 @@ define([
|
||||||
this.leftMenu = this.createView('LeftMenu').render();
|
this.leftMenu = this.createView('LeftMenu').render();
|
||||||
this.leftMenu.btnSearchBar.on('toggle', _.bind(this.onMenuSearchBar, this));
|
this.leftMenu.btnSearchBar.on('toggle', _.bind(this.onMenuSearchBar, this));
|
||||||
|
|
||||||
Common.util.Shortcuts.delegateShortcuts({
|
var keymap = {
|
||||||
shortcuts: {
|
|
||||||
'command+shift+s,ctrl+shift+s': _.bind(this.onShortcut, this, 'save'),
|
'command+shift+s,ctrl+shift+s': _.bind(this.onShortcut, this, 'save'),
|
||||||
'command+f,ctrl+f': _.bind(this.onShortcut, this, 'search'),
|
'command+f,ctrl+f': _.bind(this.onShortcut, this, 'search'),
|
||||||
'ctrl+h': _.bind(this.onShortcut, this, 'replace'),
|
'ctrl+h': _.bind(this.onShortcut, this, 'replace'),
|
||||||
'alt+f': _.bind(this.onShortcut, this, 'file'),
|
|
||||||
'esc': _.bind(this.onShortcut, this, 'escape'),
|
'esc': _.bind(this.onShortcut, this, 'escape'),
|
||||||
/** coauthoring begin **/
|
/** coauthoring begin **/
|
||||||
'alt+q': _.bind(this.onShortcut, this, 'chat'),
|
|
||||||
'command+shift+h,ctrl+shift+h': _.bind(this.onShortcut, this, 'comments'),
|
'command+shift+h,ctrl+shift+h': _.bind(this.onShortcut, this, 'comments'),
|
||||||
/** coauthoring end **/
|
/** coauthoring end **/
|
||||||
'f1': _.bind(this.onShortcut, this, 'help')
|
'f1': _.bind(this.onShortcut, this, 'help')
|
||||||
|
};
|
||||||
|
if (!Common.Utils.isMac) {
|
||||||
|
keymap['alt+f'] = _.bind(this.onShortcut, this, 'file');
|
||||||
|
keymap['alt+q'] = _.bind(this.onShortcut, this, 'chat');
|
||||||
}
|
}
|
||||||
});
|
Common.util.Shortcuts.delegateShortcuts({shortcuts:keymap});
|
||||||
|
|
||||||
Common.util.Shortcuts.suspendEvents();
|
Common.util.Shortcuts.suspendEvents();
|
||||||
|
|
||||||
var me = this;
|
var me = this;
|
||||||
|
|
|
@ -2548,9 +2548,10 @@ define([
|
||||||
clear: [Common.enumLock.editFormula, Common.enumLock.editText]
|
clear: [Common.enumLock.editFormula, Common.enumLock.editText]
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var hkComments = Common.Utils.isMac ? 'command+alt+a' : 'alt+h';
|
||||||
var is_cell_edited = (state == Asc.c_oAscCellEditorState.editStart);
|
var is_cell_edited = (state == Asc.c_oAscCellEditorState.editStart);
|
||||||
(is_cell_edited) ? Common.util.Shortcuts.suspendEvents('command+l, ctrl+l, command+shift+l, ctrl+shift+l, command+k, ctrl+k, alt+h, command+1, ctrl+1') :
|
(is_cell_edited) ? Common.util.Shortcuts.suspendEvents('command+l, ctrl+l, command+shift+l, ctrl+shift+l, command+k, ctrl+k, command+1, ctrl+1, ' + hkComments) :
|
||||||
Common.util.Shortcuts.resumeEvents('command+l, ctrl+l, command+shift+l, ctrl+shift+l, command+k, ctrl+k, alt+h, command+1, ctrl+1');
|
Common.util.Shortcuts.resumeEvents('command+l, ctrl+l, command+shift+l, ctrl+shift+l, command+k, ctrl+k, command+1, ctrl+1, ' + hkComments);
|
||||||
|
|
||||||
if (is_cell_edited) {
|
if (is_cell_edited) {
|
||||||
toolbar.listStyles.suspendEvents();
|
toolbar.listStyles.suspendEvents();
|
||||||
|
@ -4463,12 +4464,14 @@ define([
|
||||||
toolbar.$el.find('.toolbar').toggleClass('masked', disable);
|
toolbar.$el.find('.toolbar').toggleClass('masked', disable);
|
||||||
|
|
||||||
this.toolbar.lockToolbar(Common.enumLock.menuFileOpen, disable);
|
this.toolbar.lockToolbar(Common.enumLock.menuFileOpen, disable);
|
||||||
|
|
||||||
|
var hkComments = Common.Utils.isMac ? 'command+alt+a' : 'alt+h';
|
||||||
if(disable) {
|
if(disable) {
|
||||||
mask = $("<div class='toolbar-mask'>").appendTo(toolbar.$el.find('.toolbar'));
|
mask = $("<div class='toolbar-mask'>").appendTo(toolbar.$el.find('.toolbar'));
|
||||||
Common.util.Shortcuts.suspendEvents('command+l, ctrl+l, command+shift+l, ctrl+shift+l, command+k, ctrl+k, command+alt+h, ctrl+alt+h, command+1, ctrl+1');
|
Common.util.Shortcuts.suspendEvents('command+l, ctrl+l, command+shift+l, ctrl+shift+l, command+k, ctrl+k, command+1, ctrl+1, ' + hkComments);
|
||||||
} else {
|
} else {
|
||||||
mask.remove();
|
mask.remove();
|
||||||
Common.util.Shortcuts.resumeEvents('command+l, ctrl+l, command+shift+l, ctrl+shift+l, command+k, ctrl+k, command+alt+h, ctrl+alt+h, command+1, ctrl+1');
|
Common.util.Shortcuts.resumeEvents('command+l, ctrl+l, command+shift+l, ctrl+shift+l, command+k, ctrl+k, command+1, ctrl+1, ' + hkComments);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -116,7 +116,7 @@ define([
|
||||||
|
|
||||||
this.btnChat = new Common.UI.Button({
|
this.btnChat = new Common.UI.Button({
|
||||||
el: $markup.elementById('#left-btn-chat'),
|
el: $markup.elementById('#left-btn-chat'),
|
||||||
hint: this.tipChat + Common.Utils.String.platformKey('Alt+Q'),
|
hint: this.tipChat + (!Common.Utils.isMac ? Common.Utils.String.platformKey('Alt+Q') : ''),
|
||||||
enableToggle: true,
|
enableToggle: true,
|
||||||
disabled: true,
|
disabled: true,
|
||||||
toggleGroup: 'leftMenuGroup'
|
toggleGroup: 'leftMenuGroup'
|
||||||
|
|
|
@ -1039,7 +1039,7 @@ define([
|
||||||
|
|
||||||
if (w!==null) w = this._mm2pt(w);
|
if (w!==null) w = this._mm2pt(w);
|
||||||
var _selectedItem = (w===null) ? w : _.find(this.cmbBorderSize.store.models, function(item) {
|
var _selectedItem = (w===null) ? w : _.find(this.cmbBorderSize.store.models, function(item) {
|
||||||
if ( w<item.attributes.value+0.00001 && w>item.attributes.value-0.00001) {
|
if ( w<item.attributes.value+0.0001 && w>item.attributes.value-0.0001) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -973,7 +973,7 @@ define([
|
||||||
|
|
||||||
if (w!==null) w = this._mm2pt(w);
|
if (w!==null) w = this._mm2pt(w);
|
||||||
var _selectedItem = (w===null) ? w : _.find(this.cmbBorderSize.store.models, function(item) {
|
var _selectedItem = (w===null) ? w : _.find(this.cmbBorderSize.store.models, function(item) {
|
||||||
if ( w<item.attributes.value+0.00001 && w>item.attributes.value-0.00001) {
|
if ( w<item.attributes.value+0.0001 && w>item.attributes.value-0.0001) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue