Browse Source

Merge pull request #149 in ~GUY/fineui from ~WINDY/fineui:master to master

* commit '872ec56231e4b1726541a4811852ea0ad8a7da45':
  icon_text_trigger
es6
windy 7 years ago
parent
commit
f12a7e3312
  1. 75
      bi/case.js
  2. 75
      dist/bundle.js
  3. 22
      dist/bundle.min.js
  4. 75
      dist/case.js
  5. 76
      src/case/trigger/trigger.icon.text.js

75
bi/case.js

@ -12545,6 +12545,81 @@ BI.IconTrigger = BI.inherit(BI.Trigger, {
}
});
BI.shortcut('bi.icon_trigger', BI.IconTrigger);/**
* 文字trigger
*
* Created by GUY on 2015/9/15.
* @class BI.IconTextTrigger
* @extends BI.Trigger
*/
BI.IconTextTrigger = BI.inherit(BI.Trigger, {
_const: {
hgap: 4,
triggerWidth: 30
},
_defaultConfig: function () {
var conf = BI.IconTextTrigger.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-text-trigger",
height: 30
});
},
_init: function () {
BI.IconTextTrigger.superclass._init.apply(this, arguments);
var self = this, o = this.options, c = this._const;
this.text = BI.createWidget({
type: "bi.label",
textAlign: "left",
height: o.height,
text: o.text,
hgap: c.hgap
});
this.trigerButton = BI.createWidget({
type: "bi.trigger_icon_button",
cls: "bi-border-left",
width: c.triggerWidth
});
BI.createWidget({
element: this,
type: 'bi.htape',
items: [{
el: {
type: "bi.icon_change_button",
cls: "icon-combo-trigger-icon " + o.iconClass,
ref: function (_ref) {
self.icon = _ref;
},
disableSelected: true
},
width: 24
},
{
el: this.text
}, {
el: this.trigerButton,
width: c.triggerWidth
}
]
});
},
setValue: function (value) {
this.text.setValue(value);
this.text.setTitle(value);
},
setIcon: function (iconCls) {
this.icon.setIcon(iconCls);
},
setText: function (text) {
this.text.setText(text);
this.text.setTitle(text);
}
});
BI.shortcut("bi.icon_text_trigger", BI.IconTextTrigger);/**
* 文字trigger
*
* Created by GUY on 2015/9/15.

75
dist/bundle.js vendored

@ -76860,6 +76860,81 @@ BI.IconTrigger = BI.inherit(BI.Trigger, {
}
});
BI.shortcut('bi.icon_trigger', BI.IconTrigger);/**
* 文字trigger
*
* Created by GUY on 2015/9/15.
* @class BI.IconTextTrigger
* @extends BI.Trigger
*/
BI.IconTextTrigger = BI.inherit(BI.Trigger, {
_const: {
hgap: 4,
triggerWidth: 30
},
_defaultConfig: function () {
var conf = BI.IconTextTrigger.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-text-trigger",
height: 30
});
},
_init: function () {
BI.IconTextTrigger.superclass._init.apply(this, arguments);
var self = this, o = this.options, c = this._const;
this.text = BI.createWidget({
type: "bi.label",
textAlign: "left",
height: o.height,
text: o.text,
hgap: c.hgap
});
this.trigerButton = BI.createWidget({
type: "bi.trigger_icon_button",
cls: "bi-border-left",
width: c.triggerWidth
});
BI.createWidget({
element: this,
type: 'bi.htape',
items: [{
el: {
type: "bi.icon_change_button",
cls: "icon-combo-trigger-icon " + o.iconClass,
ref: function (_ref) {
self.icon = _ref;
},
disableSelected: true
},
width: 24
},
{
el: this.text
}, {
el: this.trigerButton,
width: c.triggerWidth
}
]
});
},
setValue: function (value) {
this.text.setValue(value);
this.text.setTitle(value);
},
setIcon: function (iconCls) {
this.icon.setIcon(iconCls);
},
setText: function (text) {
this.text.setText(text);
this.text.setTitle(text);
}
});
BI.shortcut("bi.icon_text_trigger", BI.IconTextTrigger);/**
* 文字trigger
*
* Created by GUY on 2015/9/15.

22
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

75
dist/case.js vendored

@ -12545,6 +12545,81 @@ BI.IconTrigger = BI.inherit(BI.Trigger, {
}
});
BI.shortcut('bi.icon_trigger', BI.IconTrigger);/**
* 文字trigger
*
* Created by GUY on 2015/9/15.
* @class BI.IconTextTrigger
* @extends BI.Trigger
*/
BI.IconTextTrigger = BI.inherit(BI.Trigger, {
_const: {
hgap: 4,
triggerWidth: 30
},
_defaultConfig: function () {
var conf = BI.IconTextTrigger.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-text-trigger",
height: 30
});
},
_init: function () {
BI.IconTextTrigger.superclass._init.apply(this, arguments);
var self = this, o = this.options, c = this._const;
this.text = BI.createWidget({
type: "bi.label",
textAlign: "left",
height: o.height,
text: o.text,
hgap: c.hgap
});
this.trigerButton = BI.createWidget({
type: "bi.trigger_icon_button",
cls: "bi-border-left",
width: c.triggerWidth
});
BI.createWidget({
element: this,
type: 'bi.htape',
items: [{
el: {
type: "bi.icon_change_button",
cls: "icon-combo-trigger-icon " + o.iconClass,
ref: function (_ref) {
self.icon = _ref;
},
disableSelected: true
},
width: 24
},
{
el: this.text
}, {
el: this.trigerButton,
width: c.triggerWidth
}
]
});
},
setValue: function (value) {
this.text.setValue(value);
this.text.setTitle(value);
},
setIcon: function (iconCls) {
this.icon.setIcon(iconCls);
},
setText: function (text) {
this.text.setText(text);
this.text.setTitle(text);
}
});
BI.shortcut("bi.icon_text_trigger", BI.IconTextTrigger);/**
* 文字trigger
*
* Created by GUY on 2015/9/15.

76
src/case/trigger/trigger.icon.text.js

@ -0,0 +1,76 @@
/**
* 文字trigger
*
* Created by GUY on 2015/9/15.
* @class BI.IconTextTrigger
* @extends BI.Trigger
*/
BI.IconTextTrigger = BI.inherit(BI.Trigger, {
_const: {
hgap: 4,
triggerWidth: 30
},
_defaultConfig: function () {
var conf = BI.IconTextTrigger.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-text-trigger",
height: 30
});
},
_init: function () {
BI.IconTextTrigger.superclass._init.apply(this, arguments);
var self = this, o = this.options, c = this._const;
this.text = BI.createWidget({
type: "bi.label",
textAlign: "left",
height: o.height,
text: o.text,
hgap: c.hgap
});
this.trigerButton = BI.createWidget({
type: "bi.trigger_icon_button",
cls: "bi-border-left",
width: c.triggerWidth
});
BI.createWidget({
element: this,
type: 'bi.htape',
items: [{
el: {
type: "bi.icon_change_button",
cls: "icon-combo-trigger-icon " + o.iconClass,
ref: function (_ref) {
self.icon = _ref;
},
disableSelected: true
},
width: 24
},
{
el: this.text
}, {
el: this.trigerButton,
width: c.triggerWidth
}
]
});
},
setValue: function (value) {
this.text.setValue(value);
this.text.setTitle(value);
},
setIcon: function (iconCls) {
this.icon.setIcon(iconCls);
},
setText: function (text) {
this.text.setText(text);
this.text.setTitle(text);
}
});
BI.shortcut("bi.icon_text_trigger", BI.IconTextTrigger);
Loading…
Cancel
Save