[DE] File menu refactoring (open version history)

This commit is contained in:
Julia Radzhabova 2019-08-22 17:41:41 +03:00
parent ef0efaf919
commit fa9e831df6
2 changed files with 10 additions and 7 deletions

View file

@ -422,6 +422,9 @@ define([
} else { } else {
if (type == 'save') { if (type == 'save') {
return this.miSave; return this.miSave;
} else
if (type == 'rename') {
return this.miRename;
} }
} }
}, },

View file

@ -148,7 +148,7 @@ define([
}, },
render: function() { render: function() {
$(this.el).html(this.template({rows:this.formats})); this.$el.html(this.template({rows:this.formats}));
$('.btn-doc-format',this.el).on('click', _.bind(this.onFormatClick,this)); $('.btn-doc-format',this.el).on('click', _.bind(this.onFormatClick,this));
if (_.isUndefined(this.scroller)) { if (_.isUndefined(this.scroller)) {
@ -566,7 +566,7 @@ define([
}, },
render: function() { render: function() {
$(this.el).html(this.template()); this.$el.html(this.template());
this.viewRecentPicker = new Common.UI.DataView({ this.viewRecentPicker = new Common.UI.DataView({
el: $('#id-recent-view'), el: $('#id-recent-view'),
@ -584,7 +584,7 @@ define([
if (_.isUndefined(this.scroller)) { if (_.isUndefined(this.scroller)) {
this.scroller = new Common.UI.Scroller({ this.scroller = new Common.UI.Scroller({
el: $(this.el), el: this.$el,
suppressScrollX: true suppressScrollX: true
}); });
} }
@ -646,14 +646,14 @@ define([
}, },
render: function() { render: function() {
$(this.el).html(this.template({ this.$el.html(this.template({
scope: this, scope: this,
docs: this.options[0].docs docs: this.options[0].docs
})); }));
if (_.isUndefined(this.scroller)) { if (_.isUndefined(this.scroller)) {
this.scroller = new Common.UI.Scroller({ this.scroller = new Common.UI.Scroller({
el: $(this.el), el: this.$el,
suppressScrollX: true suppressScrollX: true
}); });
} }
@ -1348,7 +1348,7 @@ define([
render: function() { render: function() {
var me = this; var me = this;
$(this.el).html(this.template()); this.$el.html(this.template());
this.viewHelpPicker = new Common.UI.DataView({ this.viewHelpPicker = new Common.UI.DataView({
el: $('#id-help-contents'), el: $('#id-help-contents'),
@ -1488,7 +1488,7 @@ define([
}, },
render: function() { render: function() {
$(this.el).html(this.template({scope: this})); this.$el.html(this.template({scope: this}));
var protection = DE.getController('Common.Controllers.Protection').getView(); var protection = DE.getController('Common.Controllers.Protection').getView();