[SSE] Open table settings after table is added

This commit is contained in:
Julia Radzhabova 2018-06-14 16:40:27 +03:00
parent 1264ceb07a
commit c525a79362
2 changed files with 22 additions and 6 deletions

View file

@ -61,7 +61,8 @@ define([
'insertimage': this.onInsertImage.bind(this),
'insertshape': this.onInsertShape.bind(this),
'insertchart': this.onInsertChart.bind(this),
'inserttextart': this.onInsertTextArt.bind(this)
'inserttextart': this.onInsertTextArt.bind(this),
'inserttable': this.onInsertTable.bind(this)
},
'RightMenu': {
'rightmenuclick': this.onRightMenuClick
@ -257,6 +258,7 @@ define([
this._settings[Common.Utils.documentSettingsType.Image].needShow = false;
this._settings[Common.Utils.documentSettingsType.Chart].needShow = false;
this._settings[Common.Utils.documentSettingsType.Table].needShow = false;
},
onCoAuthoringDisconnect: function() {
@ -279,7 +281,11 @@ define([
onInsertTextArt: function() {
this._settings[Common.Utils.documentSettingsType.TextArt].needShow = true;
},
onInsertTable: function() {
this._settings[Common.Utils.documentSettingsType.Table].needShow = true;
},
UpdateThemeColors: function() {
this.rightmenu.shapeSettings.UpdateThemeColors();
this.rightmenu.textartSettings.UpdateThemeColors();

View file

@ -2806,12 +2806,17 @@ define([
buttons: ['ok', 'cancel'],
callback: function(btn) {
if (btn == 'ok')
setTimeout(function() { me.api.asc_addAutoFilter(fmtname, settings.range)}, 1);
setTimeout(function() {
me.toolbar.fireEvent('inserttable', me.toolbar);
me.api.asc_addAutoFilter(fmtname, settings.range);
}, 1);
Common.NotificationCenter.trigger('edit:complete', me.toolbar);
}
});
else
else {
me.toolbar.fireEvent('inserttable', me.toolbar);
me.api.asc_addAutoFilter(fmtname, settings.range);
}
}
}
@ -2841,12 +2846,17 @@ define([
buttons: ['ok', 'cancel'],
callback: function(btn) {
if (btn == 'ok')
setTimeout(function() { me.api.asc_addAutoFilter(fmtname)}, 1);
setTimeout(function() {
me.toolbar.fireEvent('inserttable', me.toolbar);
me.api.asc_addAutoFilter(fmtname);
}, 1);
Common.NotificationCenter.trigger('edit:complete', me.toolbar);
}
});
else
else {
me.toolbar.fireEvent('inserttable', me.toolbar);
me.api.asc_addAutoFilter(fmtname);
}
}
}
}