For Bug 59171
This commit is contained in:
parent
5b9b912625
commit
e64d33dd96
|
@ -584,7 +584,7 @@ define([
|
|||
}
|
||||
me.btnSharing && me.btnSharing.updateHint(me.tipSharing);
|
||||
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) {
|
||||
me.btnCoAuthMode.setMenu(
|
||||
|
|
|
@ -148,7 +148,7 @@ define([
|
|||
};
|
||||
|
||||
var keymap = {};
|
||||
me.hkComments = 'alt+h';
|
||||
me.hkComments = Common.Utils.isMac ? 'command+alt+a' : 'alt+h';
|
||||
keymap[me.hkComments] = function() {
|
||||
if (me.api.can_AddQuotedComment()!==false) {
|
||||
me.addComment();
|
||||
|
|
|
@ -130,21 +130,22 @@ define([
|
|||
isCommentsOnly: false
|
||||
}
|
||||
};
|
||||
Common.util.Shortcuts.delegateShortcuts({
|
||||
shortcuts: {
|
||||
'command+shift+s,ctrl+shift+s': _.bind(this.onShortcut, this, 'save'),
|
||||
'command+f,ctrl+f': _.bind(this.onShortcut, this, 'search'),
|
||||
'ctrl+h': _.bind(this.onShortcut, this, 'replace'),
|
||||
'alt+f': _.bind(this.onShortcut, this, 'file'),
|
||||
'esc': _.bind(this.onShortcut, this, 'escape'),
|
||||
/** coauthoring begin **/
|
||||
'alt+q': _.bind(this.onShortcut, this, 'chat'),
|
||||
'command+shift+h,ctrl+shift+h': _.bind(this.onShortcut, this, 'comments'),
|
||||
/** coauthoring end **/
|
||||
'f1': _.bind(this.onShortcut, this, 'help')
|
||||
}
|
||||
});
|
||||
|
||||
var keymap = {
|
||||
'command+shift+s,ctrl+shift+s': _.bind(this.onShortcut, this, 'save'),
|
||||
'command+f,ctrl+f': _.bind(this.onShortcut, this, 'search'),
|
||||
'ctrl+h': _.bind(this.onShortcut, this, 'replace'),
|
||||
'esc': _.bind(this.onShortcut, this, 'escape'),
|
||||
/** coauthoring begin **/
|
||||
'command+shift+h,ctrl+shift+h': _.bind(this.onShortcut, this, 'comments'),
|
||||
/** coauthoring end **/
|
||||
'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();
|
||||
},
|
||||
|
||||
|
|
|
@ -3166,7 +3166,8 @@ define([
|
|||
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) {
|
||||
|
|
|
@ -126,7 +126,7 @@ define([
|
|||
|
||||
this.btnChat = new Common.UI.Button({
|
||||
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,
|
||||
disabled: true,
|
||||
toggleGroup: 'leftMenuGroup'
|
||||
|
|
|
@ -130,7 +130,7 @@ define([
|
|||
// Hotkeys
|
||||
// ---------------------
|
||||
var keymap = {};
|
||||
me.hkComments = 'alt+h';
|
||||
me.hkComments = Common.Utils.isMac ? 'command+alt+a' : 'alt+h';
|
||||
keymap[me.hkComments] = function() {
|
||||
if (me.api.can_AddQuotedComment()!==false && me.documentHolder.slidesCount>0) {
|
||||
me.addComment();
|
||||
|
|
|
@ -118,21 +118,21 @@ define([
|
|||
this.leftMenu.btnThumbs.on('toggle', _.bind(this.onShowTumbnails, this));
|
||||
this.leftMenu.btnSearchBar.on('toggle', _.bind(this.onMenuSearchBar, this));
|
||||
|
||||
Common.util.Shortcuts.delegateShortcuts({
|
||||
shortcuts: {
|
||||
'command+shift+s,ctrl+shift+s': _.bind(this.onShortcut, this, 'save'),
|
||||
'command+f,ctrl+f': _.bind(this.onShortcut, this, 'search'),
|
||||
'ctrl+h': _.bind(this.onShortcut, this, 'replace'),
|
||||
'alt+f': _.bind(this.onShortcut, this, 'file'),
|
||||
'esc': _.bind(this.onShortcut, this, 'escape'),
|
||||
/** coauthoring begin **/
|
||||
'alt+q': _.bind(this.onShortcut, this, 'chat'),
|
||||
'command+shift+h,ctrl+shift+h': _.bind(this.onShortcut, this, 'comments'),
|
||||
/** coauthoring end **/
|
||||
'f1': _.bind(this.onShortcut, this, 'help')
|
||||
}
|
||||
});
|
||||
|
||||
var keymap = {
|
||||
'command+shift+s,ctrl+shift+s': _.bind(this.onShortcut, this, 'save'),
|
||||
'command+f,ctrl+f': _.bind(this.onShortcut, this, 'search'),
|
||||
'ctrl+h': _.bind(this.onShortcut, this, 'replace'),
|
||||
'esc': _.bind(this.onShortcut, this, 'escape'),
|
||||
/** coauthoring begin **/
|
||||
'command+shift+h,ctrl+shift+h': _.bind(this.onShortcut, this, 'comments'),
|
||||
/** coauthoring end **/
|
||||
'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();
|
||||
},
|
||||
|
||||
|
|
|
@ -2623,12 +2623,14 @@ define([
|
|||
|
||||
if (toolbar.btnsAddSlide) // toolbar buttons are rendered
|
||||
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) {
|
||||
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 {
|
||||
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({
|
||||
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,
|
||||
disabled: true,
|
||||
toggleGroup: 'leftMenuGroup'
|
||||
|
|
|
@ -134,7 +134,7 @@ define([
|
|||
});
|
||||
|
||||
var keymap = {};
|
||||
this.hkComments = 'alt+h';
|
||||
this.hkComments = Common.Utils.isMac ? 'command+alt+a' : 'alt+h';
|
||||
keymap[this.hkComments] = function() {
|
||||
me.onAddComment();
|
||||
return false;
|
||||
|
|
|
@ -111,21 +111,21 @@ define([
|
|||
this.leftMenu = this.createView('LeftMenu').render();
|
||||
this.leftMenu.btnSearchBar.on('toggle', _.bind(this.onMenuSearchBar, this));
|
||||
|
||||
Common.util.Shortcuts.delegateShortcuts({
|
||||
shortcuts: {
|
||||
'command+shift+s,ctrl+shift+s': _.bind(this.onShortcut, this, 'save'),
|
||||
'command+f,ctrl+f': _.bind(this.onShortcut, this, 'search'),
|
||||
'ctrl+h': _.bind(this.onShortcut, this, 'replace'),
|
||||
'alt+f': _.bind(this.onShortcut, this, 'file'),
|
||||
'esc': _.bind(this.onShortcut, this, 'escape'),
|
||||
/** coauthoring begin **/
|
||||
'alt+q': _.bind(this.onShortcut, this, 'chat'),
|
||||
'command+shift+h,ctrl+shift+h': _.bind(this.onShortcut, this, 'comments'),
|
||||
/** coauthoring end **/
|
||||
'f1': _.bind(this.onShortcut, this, 'help')
|
||||
}
|
||||
});
|
||||
|
||||
var keymap = {
|
||||
'command+shift+s,ctrl+shift+s': _.bind(this.onShortcut, this, 'save'),
|
||||
'command+f,ctrl+f': _.bind(this.onShortcut, this, 'search'),
|
||||
'ctrl+h': _.bind(this.onShortcut, this, 'replace'),
|
||||
'esc': _.bind(this.onShortcut, this, 'escape'),
|
||||
/** coauthoring begin **/
|
||||
'command+shift+h,ctrl+shift+h': _.bind(this.onShortcut, this, 'comments'),
|
||||
/** coauthoring end **/
|
||||
'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();
|
||||
|
||||
var me = this;
|
||||
|
|
|
@ -2548,9 +2548,10 @@ define([
|
|||
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);
|
||||
(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') :
|
||||
Common.util.Shortcuts.resumeEvents('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, command+1, ctrl+1, ' + hkComments);
|
||||
|
||||
if (is_cell_edited) {
|
||||
toolbar.listStyles.suspendEvents();
|
||||
|
@ -4463,12 +4464,14 @@ define([
|
|||
toolbar.$el.find('.toolbar').toggleClass('masked', disable);
|
||||
|
||||
this.toolbar.lockToolbar(Common.enumLock.menuFileOpen, disable);
|
||||
|
||||
var hkComments = Common.Utils.isMac ? 'command+alt+a' : 'alt+h';
|
||||
if(disable) {
|
||||
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 {
|
||||
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({
|
||||
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,
|
||||
disabled: true,
|
||||
toggleGroup: 'leftMenuGroup'
|
||||
|
|
Loading…
Reference in a new issue