Browse Source

color chooser

es6
windy 4 years ago
parent
commit
2237feda61
  1. 15
      src/case/colorchooser/colorchooser.js
  2. 2
      src/case/colorchooser/colorchooser.trigger.js
  3. 2
      src/case/colorchooser/colorchooser.trigger.long.js
  4. 4
      src/widget/textvaluedownlistcombo/combo.textvaluedownlist.js

15
src/case/colorchooser/colorchooser.js

@ -9,17 +9,22 @@ BI.ColorChooser = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.ColorChooser.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-color-chooser",
baseCls: "bi-color-chooser bi-border bi-focus-shadow",
value: "",
height: 24,
el: {}
el: {},
attributes: {
tabIndex: 0
}
});
},
_init: function () {
BI.ColorChooser.superclass._init.apply(this, arguments);
var self = this, o = this.options;
if (o.height) {
this.setHeight(o.height - 2);
}
o.value = o.value || "";
this.combo = BI.createWidget({
type: "bi.combo",
@ -33,8 +38,8 @@ BI.ColorChooser = BI.inherit(BI.Widget, {
ref: function (_ref) {
self.trigger = _ref;
},
width: o.el.type ? o.width : o.width - 2,
height: o.el.type ? o.height : o.height - 2
width: o.width,
height: o.height
}, o.el),
popup: {
el: BI.extend({

2
src/case/colorchooser/colorchooser.trigger.js

@ -10,7 +10,7 @@ BI.ColorChooserTrigger = BI.inherit(BI.Trigger, {
_defaultConfig: function () {
var conf = BI.ColorChooserTrigger.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-color-chooser-trigger bi-border",
baseCls: (conf.baseCls || "") + " bi-color-chooser-trigger",
height: 22
});
},

2
src/case/colorchooser/colorchooser.trigger.long.js

@ -10,7 +10,7 @@ BI.LongColorChooserTrigger = BI.inherit(BI.Trigger, {
_defaultConfig: function () {
var conf = BI.LongColorChooserTrigger.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-color-chooser-trigger bi-border",
baseCls: (conf.baseCls || "") + " bi-color-chooser-trigger",
height: 22
});
},

4
src/widget/textvaluedownlistcombo/combo.textvaluedownlist.js

@ -16,7 +16,9 @@ BI.TextValueDownListCombo = BI.inherit(BI.Widget, {
_init: function () {
BI.TextValueDownListCombo.superclass._init.apply(this, arguments);
var self = this, o = this.options;
if (o.height) {
this.setHeight(o.height - 2);
}
this._createValueMap();
var value;

Loading…
Cancel
Save