Browse Source

无JIRA任务 feat: widget层的watcher也提供 sync 支持

master
Dailer 5 years ago
parent
commit
e0e6868df4
  1. 1
      dist/2.0/fineui.css
  2. 1069
      dist/2.0/fineui.ie.js
  3. 40
      dist/2.0/fineui.ie.min.js
  4. 1070
      dist/2.0/fineui.js
  5. 2
      dist/2.0/fineui.min.css
  6. 40
      dist/2.0/fineui.min.js
  7. 1
      dist/base.css
  8. 1
      dist/bundle.css
  9. 1069
      dist/bundle.ie.js
  10. 40
      dist/bundle.ie.min.js
  11. 1070
      dist/bundle.js
  12. 2
      dist/bundle.min.css
  13. 40
      dist/bundle.min.js
  14. 153
      dist/case.js
  15. 1
      dist/fineui.css
  16. 1069
      dist/fineui.ie.js
  17. 40
      dist/fineui.ie.min.js
  18. 1070
      dist/fineui.js
  19. 2
      dist/fineui.min.css
  20. 41
      dist/fineui.min.js
  21. 1072
      dist/fineui_without_jquery_polyfill.js
  22. 11
      dist/fix/fix.compact.js
  23. 2
      dist/utils.min.js
  24. 854
      dist/widget.js

1
dist/2.0/fineui.css vendored

@ -3454,6 +3454,7 @@ body .bi-button.button-ignore.disabled.ghost .b-font:before,
cursor: pointer;
font-size: 100px;
z-index: 2;
margin-left: -5px;
}
.bi-textarea-editor {

1069
dist/2.0/fineui.ie.js vendored

File diff suppressed because it is too large Load Diff

40
dist/2.0/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

1070
dist/2.0/fineui.js vendored

File diff suppressed because it is too large Load Diff

2
dist/2.0/fineui.min.css vendored

File diff suppressed because one or more lines are too long

40
dist/2.0/fineui.min.js vendored

File diff suppressed because one or more lines are too long

1
dist/base.css vendored

@ -1244,6 +1244,7 @@ body .bi-button.button-ignore.disabled.ghost .b-font:before,
cursor: pointer;
font-size: 100px;
z-index: 2;
margin-left: -5px;
}
.bi-textarea-editor {

1
dist/bundle.css vendored

@ -3454,6 +3454,7 @@ body .bi-button.button-ignore.disabled.ghost .b-font:before,
cursor: pointer;
font-size: 100px;
z-index: 2;
margin-left: -5px;
}
.bi-textarea-editor {

1069
dist/bundle.ie.js vendored

File diff suppressed because it is too large Load Diff

40
dist/bundle.ie.min.js vendored

File diff suppressed because one or more lines are too long

1070
dist/bundle.js vendored

File diff suppressed because it is too large Load Diff

2
dist/bundle.min.css vendored

File diff suppressed because one or more lines are too long

40
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

153
dist/case.js vendored

@ -5297,159 +5297,6 @@ BI.shortcut("bi.small_text_value_combo", BI.SmallTextValueCombo);BI.TextValueCom
});
BI.TextValueComboPopup.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.text_value_combo_popup", BI.TextValueComboPopup);/**
* @class BI.TextValueDownListCombo
* @extend BI.Widget
*/
BI.TextValueDownListCombo = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.TextValueDownListCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-text-value-down-list-combo",
height: 24,
attributes: {
tabIndex: 0
}
});
},
_init: function () {
BI.TextValueDownListCombo.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this._createValueMap();
var value;
if(BI.isNotNull(o.value)) {
value = this._digest(o.value);
}
this.trigger = BI.createWidget({
type: "bi.down_list_select_text_trigger",
cls: "text-value-down-list-trigger",
height: o.height,
items: o.items,
text: o.text,
value: value
});
this.combo = BI.createWidget({
type: "bi.down_list_combo",
element: this,
chooseType: BI.Selection.Single,
adjustLength: 2,
height: o.height,
el: this.trigger,
value: BI.isNull(value) ? [] : [value],
items: BI.deepClone(o.items)
});
this.combo.on(BI.DownListCombo.EVENT_CHANGE, function () {
var currentVal = self.combo.getValue()[0].value;
if (currentVal !== self.value) {
self.setValue(currentVal);
self.fireEvent(BI.TextValueDownListCombo.EVENT_CHANGE);
}
});
this.combo.on(BI.DownListCombo.EVENT_SON_VALUE_CHANGE, function () {
var currentVal = self.combo.getValue()[0].childValue;
if (currentVal !== self.value) {
self.setValue(currentVal);
self.fireEvent(BI.TextValueDownListCombo.EVENT_CHANGE);
}
});
},
_createValueMap: function () {
var self = this;
this.valueMap = {};
BI.each(BI.flatten(this.options.items), function (idx, item) {
if (BI.has(item, "el")) {
BI.each(item.children, function (id, it) {
self.valueMap[it.value] = {value: item.el.value, childValue: it.value};
});
} else {
self.valueMap[item.value] = {value: item.value};
}
});
},
_digest: function (v) {
this.value = v;
return this.valueMap[v];
},
setValue: function (v) {
v = this._digest(v);
this.combo.setValue([v]);
this.trigger.setValue(v);
},
getValue: function () {
var v = this.combo.getValue()[0];
return [v.childValue || v.value];
},
populate: function (items) {
this.options.items = BI.flatten(items);
this.combo.populate(items);
this._createValueMap();
}
});
BI.TextValueDownListCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.text_value_down_list_combo", BI.TextValueDownListCombo);/**
* 选择字段trigger, downlist专用
* 显示形式为 父亲值(儿子值)
*
* @class BI.DownListSelectTextTrigger
* @extends BI.Trigger
*/
BI.DownListSelectTextTrigger = BI.inherit(BI.Trigger, {
_defaultConfig: function () {
return BI.extend(BI.DownListSelectTextTrigger.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-down-list-select-text-trigger",
height: 24,
text: ""
});
},
_init: function () {
BI.DownListSelectTextTrigger.superclass._init.apply(this, arguments);
var o = this.options;
this.trigger = BI.createWidget({
type: "bi.select_text_trigger",
element: this,
height: o.height,
items: this._formatItemArray(o.items),
text: o.text,
value: BI.isNull(o.value) ? "" : o.value.childValue || o.value.value
});
},
_formatItemArray: function () {
var sourceArray = BI.flatten(BI.deepClone(this.options.items));
var targetArray = [];
BI.each(sourceArray, function (idx, item) {
if(BI.has(item, "el")) {
BI.each(item.children, function (id, it) {
it.text = item.el.text + "(" + it.text + ")";
});
targetArray = BI.concat(targetArray, item.children);
}else{
targetArray.push(item);
}
});
return targetArray;
},
setValue: function (vals) {
this.trigger.setValue(vals.childValue || vals.value);
},
populate: function (items) {
this.trigger.populate(this._formatItemArray(items));
}
});
BI.shortcut("bi.down_list_select_text_trigger", BI.DownListSelectTextTrigger);/**
* 有清楚按钮的文本框
* Created by GUY on 2015/9/29.
* @class BI.SmallTextEditor

1
dist/fineui.css vendored

@ -3454,6 +3454,7 @@ body .bi-button.button-ignore.disabled.ghost .b-font:before,
cursor: pointer;
font-size: 100px;
z-index: 2;
margin-left: -5px;
}
.bi-textarea-editor {

1069
dist/fineui.ie.js vendored

File diff suppressed because it is too large Load Diff

40
dist/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

1070
dist/fineui.js vendored

File diff suppressed because it is too large Load Diff

2
dist/fineui.min.css vendored

File diff suppressed because one or more lines are too long

41
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

1072
dist/fineui_without_jquery_polyfill.js vendored

File diff suppressed because it is too large Load Diff

11
dist/fix/fix.compact.js vendored

@ -13,10 +13,15 @@
}
}
function createWatcher (vm, keyOrFn, handler) {
return Fix.watch(vm.model, keyOrFn, _.bind(handler, vm), {
function createWatcher(vm, keyOrFn, cb, options) {
if (BI.isPlainObject(cb)) {
options = cb;
cb = cb.handler;
}
options = options || {};
return Fix.watch(vm.model, keyOrFn, _.bind(cb, vm), BI.extend(options, {
store: vm.store
});
}));
}
var target = null;

2
dist/utils.min.js vendored

File diff suppressed because one or more lines are too long

854
dist/widget.js vendored

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save