Fix Bug 35525. + Set focus to document after "insert table" dialog is closed.

This commit is contained in:
Julia Radzhabova 2017-08-23 11:02:04 +03:00
parent f0cdbe2860
commit 13b623ef0c
8 changed files with 35 additions and 8 deletions

View file

@ -1306,6 +1306,20 @@ define([
this.api.asc_DownloadAs();
else
(this.appOptions.canDownload) ? this.getApplication().getController('LeftMenu').leftMenu.showMenu('file:saveas') : this.api.asc_DownloadOrigin();
} else if (id == Asc.c_oAscError.ID.SplitCellMaxRows || id == Asc.c_oAscError.ID.SplitCellMaxCols || id == Asc.c_oAscError.ID.SplitCellRowsDivider) {
var me = this;
setTimeout(function(){
(new Common.Views.InsertTableDialog({
split: true,
handler: function(result, value) {
if (result == 'ok') {
if (me.api)
me.api.SplitCell(value.columns, value.rows);
}
me.onEditComplete();
}
})).show();
},10);
}
this._state.lostEditingRights = false;
this.onEditComplete();
@ -1760,7 +1774,7 @@ define([
Common.localStorage.setItem("de-settings-showchanges-strict", 'last');
this.api.SetCollaborativeMarksShowType(Asc.c_oAscCollaborativeMarksShowType.LastChanges);
}
this.fireEvent('editcomplete', this);
this.onEditComplete();
}, this)
});
},

View file

@ -1363,9 +1363,9 @@ define([
me.api.put_Table(value.columns, value.rows);
}
Common.NotificationCenter.trigger('edit:complete', me.toolbar);
Common.component.Analytics.trackEvent('ToolBar', 'Table');
}
Common.NotificationCenter.trigger('edit:complete', me.toolbar);
}
})).show();
}

View file

@ -2314,10 +2314,9 @@ define([
if (me.api) {
me.api.SplitCell(value.columns, value.rows);
}
me.fireEvent('editcomplete', me);
Common.component.Analytics.trackEvent('DocumentHolder', 'Table');
}
me.fireEvent('editcomplete', me);
}
})).show();
}

View file

@ -243,8 +243,8 @@ define([
if (me.api) {
me.api.SplitCell(value.columns, value.rows);
}
me.fireEvent('editcomplete', me);
}
me.fireEvent('editcomplete', me);
}
})).show();
},

View file

@ -1061,6 +1061,20 @@ define([
if (id == Asc.c_oAscError.ID.Warning && btn == 'ok' && this.appOptions.canDownload) {
Common.UI.Menu.Manager.hideAll();
(this.appOptions.isDesktopApp && this.appOptions.isOffline) ? this.api.asc_DownloadAs() : this.getApplication().getController('LeftMenu').leftMenu.showMenu('file:saveas');
} else if (id == Asc.c_oAscError.ID.SplitCellMaxRows || id == Asc.c_oAscError.ID.SplitCellMaxCols || id == Asc.c_oAscError.ID.SplitCellRowsDivider) {
var me = this;
setTimeout(function(){
(new Common.Views.InsertTableDialog({
split: true,
handler: function(result, value) {
if (result == 'ok') {
if (me.api)
me.api.SplitCell(value.columns, value.rows);
}
me.onEditComplete();
}
})).show();
},10);
}
this._state.lostEditingRights = false;
this.onEditComplete();

View file

@ -1328,9 +1328,9 @@ define([
me.api.put_Table(value.columns, value.rows);
}
Common.NotificationCenter.trigger('edit:complete', me.toolbar);
Common.component.Analytics.trackEvent('ToolBar', 'Table');
}
Common.NotificationCenter.trigger('edit:complete', me.toolbar);
}
})).show();
}

View file

@ -1981,9 +1981,9 @@ define([
if (me.api) {
me.api.SplitCell(value.columns, value.rows);
}
me.fireEvent('editcomplete', me);
Common.component.Analytics.trackEvent('DocumentHolder', 'Table Split');
}
me.fireEvent('editcomplete', me);
}
})).show();
}

View file

@ -209,8 +209,8 @@ define([
if (me.api) {
me.api.SplitCell(value.columns, value.rows);
}
me.fireEvent('editcomplete', me);
}
me.fireEvent('editcomplete', me);
}
})).show();
},