Merge pull request #509 from ONLYOFFICE/fix/bug-37059

[SSE] Fix Bug 37059
This commit is contained in:
Julia Radzhabova 2020-09-17 13:10:37 +03:00 committed by GitHub
commit b03be27821
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 1 deletions

View file

@ -80,7 +80,8 @@ define([
'add:chart' : this.onSelectChart,
'insert:textart': this.onInsertTextart,
'change:scalespn': this.onClickChangeScaleInMenu.bind(me),
'click:customscale': this.onScaleClick.bind(me)
'click:customscale': this.onScaleClick.bind(me),
'home:open' : this.onHomeOpen
},
'FileMenu': {
'menu:hide': me.onFileMenu.bind(me, 'hide'),
@ -1761,6 +1762,15 @@ define([
window.styles_loaded = true;
},
onHomeOpen: function() {
var listStyles = this.toolbar.listStyles;
if (listStyles && listStyles.needFillComboView && listStyles.menuPicker.store.length > 0 && listStyles.rendered){
var styleRec;
if (this._state.prstyle) styleRec = listStyles.menuPicker.store.findWhere({name: this._state.prstyle});
listStyles.fillComboView((styleRec) ? styleRec : listStyles.menuPicker.store.at(0), true);
}
},
onApiCoAuthoringDisconnect: function(enableDownload) {
this.toolbar.setMode({isDisconnected:true, enableDownload: !!enableDownload});
this.editMode = false;

View file

@ -1553,6 +1553,8 @@ define([
me.fireEvent('file:open');
me.setTab(tab);
}
if ( me.isTabActive('home'))
me.fireEvent('home:open');
},
rendererComponents: function(html) {