[DE] refactoring
This commit is contained in:
parent
360cca6601
commit
c8e40f6d03
|
@ -300,9 +300,11 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
Common.NotificationCenter.on('app:ready', function(mode) {
|
||||||
(new Promise(function (accept, reject) {
|
(new Promise(function (accept, reject) {
|
||||||
Common.NotificationCenter.on('app:ready', function(mode) { accept(mode); });
|
accept(mode);
|
||||||
})).then(onAppReady.bind(me));
|
})).then(onAppReady.bind(me));
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
render: function (el, role) {
|
render: function (el, role) {
|
||||||
|
|
|
@ -2769,8 +2769,10 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
if ( _btnsComment.length ) {
|
if ( _btnsComment.length ) {
|
||||||
|
var _comments = DE.getController('Common.Controllers.Comments').getView();
|
||||||
Array.prototype.push.apply(me.toolbar.toolbarControls, _btnsComment);
|
Array.prototype.push.apply(me.toolbar.toolbarControls, _btnsComment);
|
||||||
_btnsComment.forEach(function (btn) {
|
_btnsComment.forEach(function (btn) {
|
||||||
|
btn.updateHint( _comments.textAddComment );
|
||||||
btn.on('click', function (btn, e) {
|
btn.on('click', function (btn, e) {
|
||||||
Common.NotificationCenter.trigger('app:comment:add', 'toolbar');
|
Common.NotificationCenter.trigger('app:comment:add', 'toolbar');
|
||||||
});
|
});
|
||||||
|
|
|
@ -1349,8 +1349,7 @@ define([
|
||||||
me.isCompactView = Common.localStorage.getBool("de-compact-toolbar");
|
me.isCompactView = Common.localStorage.getBool("de-compact-toolbar");
|
||||||
|
|
||||||
/** coauthoring begin **/
|
/** coauthoring begin **/
|
||||||
value = Common.localStorage.getItem("de-hide-synch");
|
this.showSynchTip = !Common.localStorage.getBool("de-hide-synch");
|
||||||
this.showSynchTip = !(value && parseInt(value) == 1);
|
|
||||||
this.needShowSynchTip = false;
|
this.needShowSynchTip = false;
|
||||||
/** coauthoring end **/
|
/** coauthoring end **/
|
||||||
|
|
||||||
|
@ -2158,9 +2157,9 @@ define([
|
||||||
this.mnuitemCompactToolbar.setChecked(this.isCompactView, true);
|
this.mnuitemCompactToolbar.setChecked(this.isCompactView, true);
|
||||||
this.mnuitemCompactToolbar.on('toggle', _.bind(this.changeViewMode, this));
|
this.mnuitemCompactToolbar.on('toggle', _.bind(this.changeViewMode, this));
|
||||||
|
|
||||||
this.mnuitemHideTitleBar.setChecked(valueTitle, true);
|
this.mnuitemHideTitleBar.setChecked( Common.localStorage.getBool("de-hidden-title"), true );
|
||||||
this.mnuitemHideStatusBar.setChecked(valueStatus, true);
|
this.mnuitemHideStatusBar.setChecked( Common.localStorage.getBool("de-hidden-status"), true );
|
||||||
this.mnuitemHideRulers.setChecked(valueRulers, true);
|
this.mnuitemHideRulers.setChecked( Common.localStorage.getBool("de-hidden-rulers"), true );
|
||||||
/**/
|
/**/
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2535,6 +2534,10 @@ define([
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
isCompact: function () {
|
||||||
|
return isFolded;
|
||||||
|
},
|
||||||
|
|
||||||
textBold: 'Bold',
|
textBold: 'Bold',
|
||||||
textItalic: 'Italic',
|
textItalic: 'Italic',
|
||||||
textUnderline: 'Underline',
|
textUnderline: 'Underline',
|
||||||
|
|
Loading…
Reference in a new issue