Browse Source

BI-30870 文本下拉单选按钮加回去

es6
windy 6 years ago
parent
commit
00293e60f0
  1. 68
      dist/bundle.js
  2. 2
      dist/bundle.min.css
  3. 12
      dist/bundle.min.js
  4. 68
      dist/fineui.js
  5. 2
      dist/fineui.min.css
  6. 12
      dist/fineui.min.js
  7. 77
      dist/fineui_without_jquery_polyfill.js
  8. 2
      dist/utils.min.js
  9. 68
      dist/widget.js
  10. 67
      src/widget/singleselect/singleselect.item.js
  11. 2
      src/widget/singleselect/singleselect.loader.js

68
dist/bundle.js vendored

@ -74797,6 +74797,72 @@ BI.extend(BI.SingleSelectInsertCombo, {
BI.SingleSelectInsertCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.SingleSelectInsertCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.shortcut("bi.single_select_insert_combo", BI.SingleSelectInsertCombo);/** BI.shortcut("bi.single_select_insert_combo", BI.SingleSelectInsertCombo);/**
* guy
* 单选框item
* @type {*|void|Object}
*/
BI.SingleSelectComboItem = BI.inherit(BI.BasicButton, {
_defaultConfig: function () {
return BI.extend(BI.SingleSelectComboItem.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-single-select-radio-item",
logic: {
dynamic: false
},
height: 24
});
},
_init: function () {
BI.SingleSelectComboItem.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.radio = BI.createWidget({
type: "bi.radio"
});
this.text = BI.createWidget({
type: "bi.label",
cls: "list-item-text",
textAlign: "left",
whiteSpace: "nowrap",
textHeight: o.height,
height: o.height,
hgap: o.hgap,
text: o.text,
keyword: o.keyword,
value: o.value,
py: o.py
});
BI.createWidget(BI.extend({
element: this
}, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, {
items: BI.LogicFactory.createLogicItemsByDirection("left", {
type: "bi.center_adapt",
items: [this.radio],
width: 26
}, this.text)
}))));
},
doRedMark: function () {
this.text.doRedMark.apply(this.text, arguments);
},
unRedMark: function () {
this.text.unRedMark.apply(this.text, arguments);
},
doClick: function () {
BI.SingleSelectComboItem.superclass.doClick.apply(this, arguments);
this.radio.setSelected(this.isSelected());
},
setSelected: function (v) {
BI.SingleSelectComboItem.superclass.setSelected.apply(this, arguments);
this.radio.setSelected(v);
}
});
BI.shortcut("bi.single_select_combo.item", BI.SingleSelectComboItem);/**
* 选择列表 * 选择列表
* *
* Created by GUY on 2015/11/1. * Created by GUY on 2015/11/1.
@ -75034,7 +75100,7 @@ BI.SingleSelectLoader = BI.inherit(BI.Widget, {
_createItems: function (items) { _createItems: function (items) {
return BI.createItems(items, { return BI.createItems(items, {
type: "bi.single_select_item", type: "bi.single_select_combo.item",
logic: this.options.logic, logic: this.options.logic,
cls: "bi-list-item-active", cls: "bi-list-item-active",
height: 24, height: 24,

2
dist/bundle.min.css vendored

File diff suppressed because one or more lines are too long

12
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

68
dist/fineui.js vendored

@ -75036,6 +75036,72 @@ BI.extend(BI.SingleSelectInsertCombo, {
BI.SingleSelectInsertCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.SingleSelectInsertCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.shortcut("bi.single_select_insert_combo", BI.SingleSelectInsertCombo);/** BI.shortcut("bi.single_select_insert_combo", BI.SingleSelectInsertCombo);/**
* guy
* 单选框item
* @type {*|void|Object}
*/
BI.SingleSelectComboItem = BI.inherit(BI.BasicButton, {
_defaultConfig: function () {
return BI.extend(BI.SingleSelectComboItem.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-single-select-radio-item",
logic: {
dynamic: false
},
height: 24
});
},
_init: function () {
BI.SingleSelectComboItem.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.radio = BI.createWidget({
type: "bi.radio"
});
this.text = BI.createWidget({
type: "bi.label",
cls: "list-item-text",
textAlign: "left",
whiteSpace: "nowrap",
textHeight: o.height,
height: o.height,
hgap: o.hgap,
text: o.text,
keyword: o.keyword,
value: o.value,
py: o.py
});
BI.createWidget(BI.extend({
element: this
}, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, {
items: BI.LogicFactory.createLogicItemsByDirection("left", {
type: "bi.center_adapt",
items: [this.radio],
width: 26
}, this.text)
}))));
},
doRedMark: function () {
this.text.doRedMark.apply(this.text, arguments);
},
unRedMark: function () {
this.text.unRedMark.apply(this.text, arguments);
},
doClick: function () {
BI.SingleSelectComboItem.superclass.doClick.apply(this, arguments);
this.radio.setSelected(this.isSelected());
},
setSelected: function (v) {
BI.SingleSelectComboItem.superclass.setSelected.apply(this, arguments);
this.radio.setSelected(v);
}
});
BI.shortcut("bi.single_select_combo.item", BI.SingleSelectComboItem);/**
* 选择列表 * 选择列表
* *
* Created by GUY on 2015/11/1. * Created by GUY on 2015/11/1.
@ -75273,7 +75339,7 @@ BI.SingleSelectLoader = BI.inherit(BI.Widget, {
_createItems: function (items) { _createItems: function (items) {
return BI.createItems(items, { return BI.createItems(items, {
type: "bi.single_select_item", type: "bi.single_select_combo.item",
logic: this.options.logic, logic: this.options.logic,
cls: "bi-list-item-active", cls: "bi-list-item-active",
height: 24, height: 24,

2
dist/fineui.min.css vendored

File diff suppressed because one or more lines are too long

12
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

77
dist/fineui_without_jquery_polyfill.js vendored

@ -11783,12 +11783,6 @@ _.extend(BI.OB.prototype, {
*/ */
!(function () { !(function () {
var lazy = (typeof document !== "undefined" &&
typeof document.documentMode === "number") ||
(typeof navigator !== "undefined" &&
typeof navigator.userAgent === "string" &&
/\bEdge\/\d/.test(navigator.userAgent));
BI.Widget = BI.inherit(BI.OB, { BI.Widget = BI.inherit(BI.OB, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.Widget.superclass._defaultConfig.apply(this), { return BI.extend(BI.Widget.superclass._defaultConfig.apply(this), {
@ -11969,13 +11963,12 @@ _.extend(BI.OB.prototype, {
} }
this.beforeMount && this.beforeMount(); this.beforeMount && this.beforeMount();
this._isMounted = true; this._isMounted = true;
!lazy && this._mountChildren && this._mountChildren(); this._mountChildren && this._mountChildren();
BI.each(this._children, function (i, widget) { BI.each(this._children, function (i, widget) {
!self.isEnabled() && widget._setEnable(false); !self.isEnabled() && widget._setEnable(false);
!self.isValid() && widget._setValid(false); !self.isValid() && widget._setValid(false);
widget._mount && widget._mount(); widget._mount && widget._mount();
}); });
lazy && this._mountChildren && this._mountChildren();
this.mounted && this.mounted(); this.mounted && this.mounted();
return true; return true;
}, },
@ -58630,6 +58623,72 @@ BI.extend(BI.SingleSelectInsertCombo, {
BI.SingleSelectInsertCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.SingleSelectInsertCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.shortcut("bi.single_select_insert_combo", BI.SingleSelectInsertCombo);/** BI.shortcut("bi.single_select_insert_combo", BI.SingleSelectInsertCombo);/**
* guy
* 单选框item
* @type {*|void|Object}
*/
BI.SingleSelectComboItem = BI.inherit(BI.BasicButton, {
_defaultConfig: function () {
return BI.extend(BI.SingleSelectComboItem.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-single-select-radio-item",
logic: {
dynamic: false
},
height: 24
});
},
_init: function () {
BI.SingleSelectComboItem.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.radio = BI.createWidget({
type: "bi.radio"
});
this.text = BI.createWidget({
type: "bi.label",
cls: "list-item-text",
textAlign: "left",
whiteSpace: "nowrap",
textHeight: o.height,
height: o.height,
hgap: o.hgap,
text: o.text,
keyword: o.keyword,
value: o.value,
py: o.py
});
BI.createWidget(BI.extend({
element: this
}, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, {
items: BI.LogicFactory.createLogicItemsByDirection("left", {
type: "bi.center_adapt",
items: [this.radio],
width: 26
}, this.text)
}))));
},
doRedMark: function () {
this.text.doRedMark.apply(this.text, arguments);
},
unRedMark: function () {
this.text.unRedMark.apply(this.text, arguments);
},
doClick: function () {
BI.SingleSelectComboItem.superclass.doClick.apply(this, arguments);
this.radio.setSelected(this.isSelected());
},
setSelected: function (v) {
BI.SingleSelectComboItem.superclass.setSelected.apply(this, arguments);
this.radio.setSelected(v);
}
});
BI.shortcut("bi.single_select_combo.item", BI.SingleSelectComboItem);/**
* 选择列表 * 选择列表
* *
* Created by GUY on 2015/11/1. * Created by GUY on 2015/11/1.
@ -58867,7 +58926,7 @@ BI.SingleSelectLoader = BI.inherit(BI.Widget, {
_createItems: function (items) { _createItems: function (items) {
return BI.createItems(items, { return BI.createItems(items, {
type: "bi.single_select_item", type: "bi.single_select_combo.item",
logic: this.options.logic, logic: this.options.logic,
cls: "bi-list-item-active", cls: "bi-list-item-active",
height: 24, height: 24,

2
dist/utils.min.js vendored

File diff suppressed because one or more lines are too long

68
dist/widget.js vendored

@ -16429,6 +16429,72 @@ BI.extend(BI.SingleSelectInsertCombo, {
BI.SingleSelectInsertCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.SingleSelectInsertCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.shortcut("bi.single_select_insert_combo", BI.SingleSelectInsertCombo);/** BI.shortcut("bi.single_select_insert_combo", BI.SingleSelectInsertCombo);/**
* guy
* 单选框item
* @type {*|void|Object}
*/
BI.SingleSelectComboItem = BI.inherit(BI.BasicButton, {
_defaultConfig: function () {
return BI.extend(BI.SingleSelectComboItem.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-single-select-radio-item",
logic: {
dynamic: false
},
height: 24
});
},
_init: function () {
BI.SingleSelectComboItem.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.radio = BI.createWidget({
type: "bi.radio"
});
this.text = BI.createWidget({
type: "bi.label",
cls: "list-item-text",
textAlign: "left",
whiteSpace: "nowrap",
textHeight: o.height,
height: o.height,
hgap: o.hgap,
text: o.text,
keyword: o.keyword,
value: o.value,
py: o.py
});
BI.createWidget(BI.extend({
element: this
}, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, {
items: BI.LogicFactory.createLogicItemsByDirection("left", {
type: "bi.center_adapt",
items: [this.radio],
width: 26
}, this.text)
}))));
},
doRedMark: function () {
this.text.doRedMark.apply(this.text, arguments);
},
unRedMark: function () {
this.text.unRedMark.apply(this.text, arguments);
},
doClick: function () {
BI.SingleSelectComboItem.superclass.doClick.apply(this, arguments);
this.radio.setSelected(this.isSelected());
},
setSelected: function (v) {
BI.SingleSelectComboItem.superclass.setSelected.apply(this, arguments);
this.radio.setSelected(v);
}
});
BI.shortcut("bi.single_select_combo.item", BI.SingleSelectComboItem);/**
* 选择列表 * 选择列表
* *
* Created by GUY on 2015/11/1. * Created by GUY on 2015/11/1.
@ -16666,7 +16732,7 @@ BI.SingleSelectLoader = BI.inherit(BI.Widget, {
_createItems: function (items) { _createItems: function (items) {
return BI.createItems(items, { return BI.createItems(items, {
type: "bi.single_select_item", type: "bi.single_select_combo.item",
logic: this.options.logic, logic: this.options.logic,
cls: "bi-list-item-active", cls: "bi-list-item-active",
height: 24, height: 24,

67
src/widget/singleselect/singleselect.item.js

@ -0,0 +1,67 @@
/**
* guy
* 单选框item
* @type {*|void|Object}
*/
BI.SingleSelectComboItem = BI.inherit(BI.BasicButton, {
_defaultConfig: function () {
return BI.extend(BI.SingleSelectComboItem.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-single-select-radio-item",
logic: {
dynamic: false
},
height: 24
});
},
_init: function () {
BI.SingleSelectComboItem.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.radio = BI.createWidget({
type: "bi.radio"
});
this.text = BI.createWidget({
type: "bi.label",
cls: "list-item-text",
textAlign: "left",
whiteSpace: "nowrap",
textHeight: o.height,
height: o.height,
hgap: o.hgap,
text: o.text,
keyword: o.keyword,
value: o.value,
py: o.py
});
BI.createWidget(BI.extend({
element: this
}, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, {
items: BI.LogicFactory.createLogicItemsByDirection("left", {
type: "bi.center_adapt",
items: [this.radio],
width: 26
}, this.text)
}))));
},
doRedMark: function () {
this.text.doRedMark.apply(this.text, arguments);
},
unRedMark: function () {
this.text.unRedMark.apply(this.text, arguments);
},
doClick: function () {
BI.SingleSelectComboItem.superclass.doClick.apply(this, arguments);
this.radio.setSelected(this.isSelected());
},
setSelected: function (v) {
BI.SingleSelectComboItem.superclass.setSelected.apply(this, arguments);
this.radio.setSelected(v);
}
});
BI.shortcut("bi.single_select_combo.item", BI.SingleSelectComboItem);

2
src/widget/singleselect/singleselect.loader.js

@ -103,7 +103,7 @@ BI.SingleSelectLoader = BI.inherit(BI.Widget, {
_createItems: function (items) { _createItems: function (items) {
return BI.createItems(items, { return BI.createItems(items, {
type: "bi.single_select_item", type: "bi.single_select_combo.item",
logic: this.options.logic, logic: this.options.logic,
cls: "bi-list-item-active", cls: "bi-list-item-active",
height: 24, height: 24,

Loading…
Cancel
Save