Browse Source

color chooser

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

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

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

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

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

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

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

Loading…
Cancel
Save