[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() { deleteWorksheet: function() {
var me = this; var me = this;
if (this.sheets.length == 1) { if (me.sheets.length == 1) {
uiApp.alert(this.errorLastSheet); uiApp.alert(me.errorLastSheet);
} else { } else {
uiApp.confirm(this.warnDeleteSheet, undefined, function(){ uiApp.confirm(me.warnDeleteSheet, undefined, _.buffered(function() {
if ( !me.api.asc_deleteWorksheet() ) { if ( !me.api.asc_deleteWorksheet() ) {
_.defer(function(){ _.defer(function(){
uiApp.alert(me.errorRemoveSheet); uiApp.alert(me.errorRemoveSheet);
}); });
} }
}); }, 300));
} }
}, },

View file

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