[DE] Fix Bug 37059

This commit is contained in:
Julia Radzhabova 2018-03-05 12:28:37 +03:00
parent 33dac0e964
commit dc9158bc7b
3 changed files with 15 additions and 2 deletions

View file

@ -401,7 +401,7 @@ define([
fillComboView: function(record, forceSelect, forceFill) {
if (!_.isUndefined(record) && record instanceof Backbone.Model){
this.needFillComboView = false;
this.needFillComboView = !this.isVisible();
var me = this,
store = me.menuPicker.store,

View file

@ -106,7 +106,8 @@ define([
this.addListeners({
'Toolbar': {
'insert:break' : this.onClickPageBreak,
'change:compact' : this.onClickChangeCompact
'change:compact' : this.onClickChangeCompact,
'home:open' : this.onHomeOpen
},
'FileMenu': {
'menu:hide': this.onFileMenu.bind(this, 'hide'),
@ -2608,6 +2609,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({title: this._state.prstyle});
listStyles.fillComboView((styleRec) ? styleRec : listStyles.menuPicker.store.at(0), true);
}
},
_setMarkerColor: function(strcolor, h) {
var me = this;

View file

@ -1227,6 +1227,9 @@ define([
}
Common.UI.Mixtbar.prototype.onTabClick.apply(me, arguments);
if ( me.isTabActive('home'))
me.fireEvent('home:open');
},
rendererComponents: function (html) {