|
|
|
@ -16,8 +16,7 @@ BI.HexColorChooserPopup = BI.inherit(BI.Widget, {
|
|
|
|
|
var self = this, o = this.options; |
|
|
|
|
var hasRecommendColors = BI.isNotNull(o.recommendColorsGetter()); |
|
|
|
|
return [{ |
|
|
|
|
el: { |
|
|
|
|
type: 'bi.vertical', |
|
|
|
|
type: "bi.vertical", |
|
|
|
|
items: [{ |
|
|
|
|
el: { |
|
|
|
|
type: "bi.vertical", |
|
|
|
@ -60,12 +59,12 @@ BI.HexColorChooserPopup = BI.inherit(BI.Widget, {
|
|
|
|
|
height: 22 |
|
|
|
|
}, { |
|
|
|
|
el: hasRecommendColors ? { |
|
|
|
|
type: 'bi.vertical', |
|
|
|
|
type: "bi.vertical", |
|
|
|
|
items: [{ |
|
|
|
|
type: 'bi.label', |
|
|
|
|
text: BI.i18nText('BI-Basic_Recommend_Color'), |
|
|
|
|
textAlign: 'left', |
|
|
|
|
height: 24, |
|
|
|
|
type: "bi.label", |
|
|
|
|
text: BI.i18nText("BI-Basic_Recommend_Color"), |
|
|
|
|
textAlign: "left", |
|
|
|
|
height: 24 |
|
|
|
|
}, { |
|
|
|
|
type: "bi.hex_color_picker", |
|
|
|
|
cls: "bi-border-bottom bi-border-right", |
|
|
|
@ -84,18 +83,18 @@ BI.HexColorChooserPopup = BI.inherit(BI.Widget, {
|
|
|
|
|
self.recommendColors = _ref; |
|
|
|
|
} |
|
|
|
|
}] |
|
|
|
|
} : { type: 'bi.layout' }, |
|
|
|
|
} : {type: "bi.layout"}, |
|
|
|
|
tgap: hasRecommendColors ? 10 : 0, |
|
|
|
|
height: hasRecommendColors ? 47 : 0 |
|
|
|
|
}, { |
|
|
|
|
el: { |
|
|
|
|
type: 'bi.layout', |
|
|
|
|
cls: 'bi-border-top', |
|
|
|
|
type: "bi.layout", |
|
|
|
|
cls: "bi-border-top" |
|
|
|
|
}, |
|
|
|
|
vgap: 10, |
|
|
|
|
height: 1 |
|
|
|
|
}, { |
|
|
|
|
type: 'bi.absolute', |
|
|
|
|
type: "bi.absolute", |
|
|
|
|
items: [{ |
|
|
|
|
el: { |
|
|
|
|
type: "bi.hex_color_picker", |
|
|
|
@ -111,14 +110,14 @@ BI.HexColorChooserPopup = BI.inherit(BI.Widget, {
|
|
|
|
|
}], |
|
|
|
|
ref: function (_ref) { |
|
|
|
|
self.colorPicker = _ref; |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
top: 0, |
|
|
|
|
left: 0, |
|
|
|
|
right: 0, |
|
|
|
|
bottom: 1, |
|
|
|
|
bottom: 1 |
|
|
|
|
}], |
|
|
|
|
height: 80, |
|
|
|
|
height: 80 |
|
|
|
|
}] |
|
|
|
|
} |
|
|
|
|
}, { |
|
|
|
@ -186,11 +185,6 @@ BI.HexColorChooserPopup = BI.inherit(BI.Widget, {
|
|
|
|
|
tgap: 10, |
|
|
|
|
height: 24 |
|
|
|
|
}] |
|
|
|
|
}, |
|
|
|
|
left: 0, |
|
|
|
|
right: 0, |
|
|
|
|
top: 0, |
|
|
|
|
bottom: 0 |
|
|
|
|
}, { |
|
|
|
|
type: "bi.absolute", |
|
|
|
|
items: [{ |
|
|
|
@ -212,7 +206,6 @@ BI.HexColorChooserPopup = BI.inherit(BI.Widget, {
|
|
|
|
|
|
|
|
|
|
// 这里就实现的不好了,setValue里面有个editor,editor的setValue会检测错误然后出bubble提示
|
|
|
|
|
mounted: function () { |
|
|
|
|
var self = this; |
|
|
|
|
var o = this.options; |
|
|
|
|
if (BI.isNotNull(o.value)) { |
|
|
|
|
this.setValue(o.value); |
|
|
|
@ -251,7 +244,7 @@ BI.HexColorChooserPopup = BI.inherit(BI.Widget, {
|
|
|
|
|
return items; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_getStoreColors: function() { |
|
|
|
|
_getStoreColors: function () { |
|
|
|
|
var self = this, o = this.options; |
|
|
|
|
var colorsArray = BI.string2Array(BI.Cache.getItem("colors") || ""); |
|
|
|
|
return BI.filter(colorsArray, function (idx, color) { |
|
|
|
|