[SSE mobile] Fixed add/remove sheets via context menu

This commit is contained in:
Alexander Yuzhin 2017-01-13 12:17:42 +03:00
parent 6023cc1cb8
commit 4297290b87
2 changed files with 11 additions and 11 deletions

View file

@ -250,16 +250,16 @@ define([
deleteWorksheet: function() {
var me = this;
if (this.sheets.length == 1) {
uiApp.alert(this.errorLastSheet);
if (me.sheets.length == 1) {
uiApp.alert(me.errorLastSheet);
} else {
uiApp.confirm(this.warnDeleteSheet, undefined, function(){
uiApp.confirm(me.warnDeleteSheet, undefined, _.buffered(function() {
if ( !me.api.asc_deleteWorksheet() ) {
_.defer(function(){
uiApp.alert(me.errorRemoveSheet);
});
}
});
}, 300));
}
},

View file

@ -72,16 +72,16 @@ define([
render: function () {
var me = this;
this.$el = $(this.template).appendTo($(this.el));
me.$el = $(me.template).appendTo($(me.el));
this.$boxTabs = this.$el.find('.box-tabs > ul');
this.$btnAddTab = this.$el.find('#box-addtab > .button');
this.$btnAddTab.on('click', function(e){
me.$boxTabs = me.$el.find('.box-tabs > ul');
me.$btnAddTab = me.$el.find('#box-addtab > .button');
me.$btnAddTab.single('click', _.buffered(function(e) {
me.fireEvent('sheet:addnew');
});
}, 300));
// this.editMode = false;
return this;
// me.editMode = false;
return me;
},
setMode: function(mode) {