From 866ef756e84c1d31619bd72ec267596afb9b50f7 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 5 Apr 2017 12:55:46 +0300 Subject: [PATCH] [SSE] Fix Bug 33478. --- apps/common/main/lib/component/ComboDataView.js | 8 ++++++-- apps/spreadsheeteditor/main/app/view/ChartSettings.js | 2 ++ apps/spreadsheeteditor/main/app/view/ChartSettingsDlg.js | 6 ++++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/apps/common/main/lib/component/ComboDataView.js b/apps/common/main/lib/component/ComboDataView.js index e6816a990..e51f05f27 100644 --- a/apps/common/main/lib/component/ComboDataView.js +++ b/apps/common/main/lib/component/ComboDataView.js @@ -59,7 +59,8 @@ define([ enableKeyEvents : false, beforeOpenHandler : null, additionalMenuItems : null, - showLast: true + showLast: true, + minWidth: -1 }, template: _.template([ @@ -86,6 +87,7 @@ define([ this.rootHeight = 0; this.rendered = false; this.needFillComboView = false; + this.minWidth = this.options.minWidth; this.fieldPicker = new Common.UI.DataView({ cls: 'field-picker', @@ -215,6 +217,8 @@ define([ width = this.cmpEl.width(), height = this.cmpEl.height(); + if (width < this.minWidth) return; + if (this.rootWidth != width || this.rootHeight != height) { this.rootWidth = width; this.rootHeight = height; @@ -420,7 +424,7 @@ define([ var indexRec = store.indexOf(record), countRec = store.length, - maxViewCount = Math.floor((fieldPickerEl.width()) / (me.itemWidth + (me.itemMarginLeft || 0) + (me.itemMarginRight || 0) + (me.itemPaddingLeft || 0) + (me.itemPaddingRight || 0) + + maxViewCount = Math.floor(Math.max(fieldPickerEl.width(), me.minWidth) / (me.itemWidth + (me.itemMarginLeft || 0) + (me.itemMarginRight || 0) + (me.itemPaddingLeft || 0) + (me.itemPaddingRight || 0) + (me.itemBorderLeft || 0) + (me.itemBorderRight || 0))), newStyles = []; diff --git a/apps/spreadsheeteditor/main/app/view/ChartSettings.js b/apps/spreadsheeteditor/main/app/view/ChartSettings.js index 57bc7883b..9f353da74 100644 --- a/apps/spreadsheeteditor/main/app/view/ChartSettings.js +++ b/apps/spreadsheeteditor/main/app/view/ChartSettings.js @@ -925,6 +925,7 @@ define([ { chartSettings: props, imageSettings: (me.isChart) ? me._originalProps : null, + sparklineStyles: me.sparklineStyles, isChart: me.isChart, api: me.api, handler: function(result, value) { @@ -1109,6 +1110,7 @@ define([ if (styles && styles.length>1){ var stylesStore = this.cmbSparkStyle.menuPicker.store, selectedIdx = styles[styles.length-1]; + this.sparklineStyles = styles; if (stylesStore.length == styles.length-1) { var data = stylesStore.models; for (var i=0; i