[SSE] Change width of the style list
This commit is contained in:
parent
2221747813
commit
8d6efb6c39
|
@ -1284,7 +1284,7 @@ define([
|
||||||
enableKeyEvents : true,
|
enableKeyEvents : true,
|
||||||
itemWidth : 100,
|
itemWidth : 100,
|
||||||
itemHeight : 20,
|
itemHeight : 20,
|
||||||
style: 'min-width:158px;',
|
style: 'min-width:158px; max-width:663px;',
|
||||||
groups: new Common.UI.DataViewGroupStore([
|
groups: new Common.UI.DataViewGroupStore([
|
||||||
{id: 'menu-style-group-custom', caption: this.textCustom },
|
{id: 'menu-style-group-custom', caption: this.textCustom },
|
||||||
{id: 'menu-style-group-color', caption: this.textGoodBadAndNeutral },
|
{id: 'menu-style-group-color', caption: this.textGoodBadAndNeutral },
|
||||||
|
@ -1302,8 +1302,7 @@ define([
|
||||||
delayRenderTips: true,
|
delayRenderTips: true,
|
||||||
beforeOpenHandler: function(e) {
|
beforeOpenHandler: function(e) {
|
||||||
var cmp = this,
|
var cmp = this,
|
||||||
menu = cmp.openButton.menu,
|
menu = cmp.openButton.menu;
|
||||||
minMenuColumn = 6;
|
|
||||||
|
|
||||||
if (menu.cmpEl) {
|
if (menu.cmpEl) {
|
||||||
var itemEl = $(menu.menuRoot.find('.dataview .item').get(0));
|
var itemEl = $(menu.menuRoot.find('.dataview .item').get(0));
|
||||||
|
@ -1314,10 +1313,7 @@ define([
|
||||||
(cmp.itemWidth + parseFloat(itemEl.css('padding-left')) + parseFloat(itemEl.css('padding-right')) +
|
(cmp.itemWidth + parseFloat(itemEl.css('padding-left')) + parseFloat(itemEl.css('padding-right')) +
|
||||||
parseFloat(itemEl.css('border-left-width')) + parseFloat(itemEl.css('border-right-width')));
|
parseFloat(itemEl.css('border-left-width')) + parseFloat(itemEl.css('border-right-width')));
|
||||||
|
|
||||||
var minCount = cmp.menuPicker.store.length >= minMenuColumn ? minMenuColumn : cmp.menuPicker.store.length,
|
var columnCount = 6;
|
||||||
columnCount = Math.min(cmp.menuPicker.store.length, Math.round($('.dataview', $(cmp.fieldPicker.el)).width() / (itemMargin + itemWidth) + 0.5));
|
|
||||||
|
|
||||||
columnCount = columnCount < minCount ? minCount : columnCount;
|
|
||||||
menu.menuAlignEl = cmp.cmpEl;
|
menu.menuAlignEl = cmp.cmpEl;
|
||||||
|
|
||||||
menu.menuAlign = 'tl-tl';
|
menu.menuAlign = 'tl-tl';
|
||||||
|
|
Loading…
Reference in a new issue