refactoring
This commit is contained in:
parent
dbf06b62fe
commit
456f4dcc2d
|
@ -140,9 +140,10 @@ define([
|
||||||
el.html(this.template(this.model.toJSON()));
|
el.html(this.template(this.model.toJSON()));
|
||||||
el.addClass('item');
|
el.addClass('item');
|
||||||
el.toggleClass('selected', this.model.get('selected') && this.model.get('allowSelected'));
|
el.toggleClass('selected', this.model.get('selected') && this.model.get('allowSelected'));
|
||||||
el.off('click').on('click', _.bind(this.onClick, this));
|
el.off('click dblclick contextmenu');
|
||||||
el.off('dblclick').on('dblclick', _.bind(this.onDblClick, this));
|
el.on({ 'click': _.bind(this.onClick, this),
|
||||||
el.off('contextmenu').on('contextmenu', _.bind(this.onContextMenu, this));
|
'dblclick': _.bind(this.onDblClick, this),
|
||||||
|
'contextmenu': _.bind(this.onContextMenu, this) });
|
||||||
el.toggleClass('disabled', !!this.model.get('disabled'));
|
el.toggleClass('disabled', !!this.model.get('disabled'));
|
||||||
|
|
||||||
if (!_.isUndefined(this.model.get('cls')))
|
if (!_.isUndefined(this.model.get('cls')))
|
||||||
|
|
|
@ -909,15 +909,12 @@ define([
|
||||||
applyModeCommonElements: function() {
|
applyModeCommonElements: function() {
|
||||||
window.editor_elements_prepared = true;
|
window.editor_elements_prepared = true;
|
||||||
|
|
||||||
var value = Common.localStorage.getItem("sse-hidden-title");
|
|
||||||
value = this.appOptions.isEdit && (value!==null && parseInt(value) == 1);
|
|
||||||
|
|
||||||
var app = this.getApplication(),
|
var app = this.getApplication(),
|
||||||
viewport = app.getController('Viewport').getView('Viewport'),
|
viewport = app.getController('Viewport').getView('Viewport'),
|
||||||
statusbarView = app.getController('Statusbar').getView('Statusbar');
|
statusbarView = app.getController('Statusbar').getView('Statusbar');
|
||||||
|
|
||||||
if (this.headerView) {
|
if (this.headerView) {
|
||||||
this.headerView.setVisible(!this.appOptions.nativeApp && !value && !this.appOptions.isEditMailMerge &&
|
this.headerView.setVisible(!this.appOptions.nativeApp && !this.appOptions.isEditMailMerge &&
|
||||||
!this.appOptions.isDesktopApp && !this.appOptions.isEditDiagram);
|
!this.appOptions.isDesktopApp && !this.appOptions.isEditDiagram);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue