[Common] refactoring
This commit is contained in:
parent
2352646ec7
commit
55e48173ce
|
@ -1298,7 +1298,11 @@ define([
|
|||
// MM/dd/yyyy hh:mm AM
|
||||
|
||||
return (date.getMonth() + 1) + '/' + (date.getDate()) + '/' + date.getFullYear() + ' ' + format(date);
|
||||
}
|
||||
},
|
||||
|
||||
getView: function(name) {
|
||||
return !name && this.view ?
|
||||
this.view : Backbone.Controller.prototype.getView.call(this, name);
|
||||
}
|
||||
}, Common.Controllers.Comments || {}));
|
||||
});
|
|
@ -166,7 +166,7 @@ define([
|
|||
if ( this.mode.canCoAuthoring ) {
|
||||
this.leftMenu.btnComments[(this.mode.isEdit && this.mode.canComments && !this.mode.isLightVersion) ? 'show' : 'hide']();
|
||||
if (this.mode.canComments)
|
||||
this.leftMenu.setOptionsPanel('comment', this.getApplication().getController('Common.Controllers.Comments').getView('Common.Views.Comments'));
|
||||
this.leftMenu.setOptionsPanel('comment', this.getApplication().getController('Common.Controllers.Comments').getView());
|
||||
|
||||
this.leftMenu.btnChat[(this.mode.canChat && !this.mode.isLightVersion) ? 'show' : 'hide']();
|
||||
if (this.mode.canChat)
|
||||
|
|
|
@ -157,7 +157,7 @@ define([
|
|||
if ( this.mode.canCoAuthoring ) {
|
||||
this.leftMenu.btnComments[(this.mode.isEdit&&this.mode.canComments && !this.mode.isLightVersion) ? 'show' : 'hide']();
|
||||
if (this.mode.canComments)
|
||||
this.leftMenu.setOptionsPanel('comment', this.getApplication().getController('Common.Controllers.Comments').getView('Common.Views.Comments'));
|
||||
this.leftMenu.setOptionsPanel('comment', this.getApplication().getController('Common.Controllers.Comments').getView());
|
||||
|
||||
this.leftMenu.btnChat[(this.mode.canChat && !this.mode.isLightVersion) ? 'show' : 'hide']();
|
||||
if (this.mode.canChat)
|
||||
|
|
|
@ -165,7 +165,7 @@ define([
|
|||
if ( this.mode.canCoAuthoring ) {
|
||||
this.leftMenu.btnComments[(this.mode.isEdit&&this.mode.canComments && !this.mode.isLightVersion) ? 'show' : 'hide']();
|
||||
if (this.mode.canComments)
|
||||
this.leftMenu.setOptionsPanel('comment', this.getApplication().getController('Common.Controllers.Comments').getView('Common.Views.Comments'));
|
||||
this.leftMenu.setOptionsPanel('comment', this.getApplication().getController('Common.Controllers.Comments').getView());
|
||||
|
||||
this.leftMenu.btnChat[(this.mode.canChat && !this.mode.isLightVersion) ? 'show' : 'hide']();
|
||||
if (this.mode.canChat)
|
||||
|
|
Loading…
Reference in a new issue