[PE] Hide left comments panel by esc.
This commit is contained in:
parent
5da46ba82c
commit
57c3b5f80b
|
@ -98,6 +98,7 @@ define([
|
||||||
'search:next': _.bind(this.onQuerySearch, this, 'next')
|
'search:next': _.bind(this.onQuerySearch, this, 'next')
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Common.NotificationCenter.on('leftmenu:change', _.bind(this.onMenuChange, this));
|
||||||
},
|
},
|
||||||
|
|
||||||
onLaunch: function() {
|
onLaunch: function() {
|
||||||
|
@ -574,6 +575,18 @@ define([
|
||||||
menu.hide();
|
menu.hide();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onMenuChange: function (value) {
|
||||||
|
if ('hide' === value) {
|
||||||
|
if (this.leftMenu.btnComments.isActive() && this.api) {
|
||||||
|
this.leftMenu.btnComments.toggle(false);
|
||||||
|
this.leftMenu.onBtnMenuClick(this.leftMenu.btnComments);
|
||||||
|
|
||||||
|
// focus to sdk
|
||||||
|
this.api.asc_enableKeyEvents(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
textNoTextFound : 'Text not found',
|
textNoTextFound : 'Text not found',
|
||||||
newDocumentTitle : 'Unnamed document',
|
newDocumentTitle : 'Unnamed document',
|
||||||
requestEditRightsText : 'Requesting editing rights...'
|
requestEditRightsText : 'Requesting editing rights...'
|
||||||
|
|
|
@ -293,6 +293,10 @@ define([
|
||||||
$('ul.dropdown-menu', me.currentMenu.el).focus();
|
$('ul.dropdown-menu', me.currentMenu.el).focus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (key == Common.UI.Keys.ESC) {
|
||||||
|
Common.UI.Menu.Manager.hideAll();
|
||||||
|
Common.NotificationCenter.trigger('leftmenu:change', 'hide');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue