Browse Source

Merge branch 'master' of ssh://cloud.finedevelop.com:7999/~windy/fui

master
windy 7 years ago
parent
commit
e1d892a2d7
  1. 40
      dist/_fineui.min.js
  2. 88
      dist/bundle.js
  3. 38
      dist/bundle.min.js
  4. 3
      dist/case.js
  5. 40
      dist/fineui.min.js
  6. 28
      dist/fix/fix.js
  7. 57
      dist/widget.js
  8. 3
      src/case/toolbar/toolbar.multiselect.js
  9. 21
      src/widget/filter/filter.constant.js
  10. 25
      src/widget/filter/operation/filter.operation.js
  11. 12
      src/widget/multitree/trigger/searcher.multi.tree.js

40
dist/_fineui.min.js vendored

File diff suppressed because one or more lines are too long

88
dist/bundle.js vendored

@ -34527,10 +34527,11 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
var _resolve = void 0;
callbacks.push(function () {
if (cb) {
// try {
try {
cb.call(ctx);
// } catch (e) {
// }
} catch (e) {
console.error(e);
}
} else if (_resolve) {
_resolve(ctx);
}
@ -35147,7 +35148,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
} catch (e) {
// if (this.user) {
// } else {
throw e;
console.error(e);
// }
} finally {
// "touch" every property so they are all tracked as
@ -35213,12 +35214,17 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
var oldValue = this.value;
this.value = value;
if (this.user) {
// try {
try {
this.cb.call(this.vm, value, oldValue, options);
// } catch (e) {
// }
} catch (e) {
console.log(e);
}
} else {
try {
this.cb.call(this.vm, value, oldValue, options);
} catch (e) {
console.log(e);
}
}
}
}
@ -35384,7 +35390,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
return NaN;
}, function (newValue, oldValue, opt) {
callback(i, newValue, oldValue, _.extend({ index: i }, opt));
});
}, options);
watchers.push(function unwatchFn() {
w.teardown();
v.__ob__._scopeDeps && remove(v.__ob__._scopeDeps, dep);
@ -35425,7 +35431,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
return NaN;
}, function (newValue, oldValue, opt) {
callback(i, newValue, oldValue, _.extend({ index: i }, opt));
});
}, options);
watchers.push(function unwatchFn() {
_w.teardown();
root._globalDeps && delete root._globalDeps[regStr];
@ -35537,9 +35543,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
if (typeof cb === 'string') {
cb = vm[cb];
}
return watch(vm.model, keyOrFn, _.bind(cb, vm.$$model ? vm.model : vm), _.extend({
sync: true
}, options));
return watch(vm.model, keyOrFn, _.bind(cb, vm.$$model ? vm.model : vm), options);
}
function initMethods(vm, methods) {
@ -85542,6 +85546,9 @@ BI.MultiSelectBar = BI.inherit(BI.BasicButton, {
this.checkbox.on(BI.Controller.EVENT_CHANGE, function () {
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CLICK, self.isSelected(), self);
});
this.checkbox.on(BI.Checkbox.EVENT_CHANGE, function () {
self.fireEvent(BI.MultiSelectBar.EVENT_CHANGE, self.isSelected(), self);
});
this.half.on(BI.Controller.EVENT_CHANGE, function () {
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CLICK, self.isSelected(), self);
});
@ -93595,26 +93602,6 @@ BI.extend(BI.AbstractFilterItem, {
}
});
BI.shortcut("bi.filter_expander", FilterExpander);
}());/**
* Created by Urthur on 2017/12/21.
*/
!(function () {
BI.constant("bi.constant.component.filter", {
FORMULA_COMBO: [{
text: BI.i18nText("BI-Conf_Formula_And"),
value: BI.AbstractFilterItem.FILTER_OPERATION_FORMULA_AND
}, {
text: BI.i18nText("BI-Conf_Formula_Or"),
value: BI.AbstractFilterItem.FILTER_OPERATION_FORMULA_OR
}],
CONDITION_COMBO: [{
text: BI.i18nText("BI-Conf_Condition_And"),
value: BI.AbstractFilterItem.FILTER_OPERATION_CONDITION_AND
}, {
text: BI.i18nText("BI-Conf_Condition_Or"),
value: BI.AbstractFilterItem.FILTER_OPERATION_CONDITION_OR
}]
});
}());/**
* 过滤
*
@ -93920,6 +93907,27 @@ BI.Filter.FILTER_TYPE.EMPTY_CONDITION = 37;
!(function () {
var OPERATION_ADD_CONDITION = 0, OPERATION_ADD_ANDOR_CONDITION = 1;
var FilterOperation = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(FilterOperation.superclass._defaultConfig.apply(this, arguments), {
constants: {
FORMULA_COMBO: [{
text: BI.i18nText("BI-Conf_Formula_And"),
value: BI.AbstractFilterItem.FILTER_OPERATION_FORMULA_AND
}, {
text: BI.i18nText("BI-Conf_Formula_Or"),
value: BI.AbstractFilterItem.FILTER_OPERATION_FORMULA_OR
}],
CONDITION_COMBO: [{
text: BI.i18nText("BI-Conf_Condition_And"),
value: BI.AbstractFilterItem.FILTER_OPERATION_CONDITION_AND
}, {
text: BI.i18nText("BI-Conf_Condition_Or"),
value: BI.AbstractFilterItem.FILTER_OPERATION_CONDITION_OR
}]
}
});
},
props: {
baseCls: "bi-filter-operation",
expander: {},
@ -94070,13 +94078,13 @@ BI.Filter.FILTER_TYPE.EMPTY_CONDITION = 37;
case BI.AbstractFilterItem.FILTER_OPERATION_FORMULA:
text = BI.i18nText("BI-Conf_Add_Formula");
cls = "filter-formula-font";
items = BI.Constants.getConstant("bi.constant.component.filter").FORMULA_COMBO;
items = this.options.constants.FORMULA_COMBO;
break;
case BI.AbstractFilterItem.FILTER_OPERATION_CONDITION:
default:
text = BI.i18nText("BI-Conf_Add_Condition");
cls = "filter-condition-font";
items = BI.Constants.getConstant("bi.constant.component.filter").CONDITION_COMBO;
items = this.options.constants.CONDITION_COMBO;
break;
}
@ -100657,6 +100665,7 @@ BI.MultiTreeSearcher = BI.inherit(BI.Widget, {
var o = this.options;
ob || (ob = {});
ob.value || (ob.value = {});
var count = 0;
if (BI.isNumber(ob)) {
this.editor.setState(ob);
} else if (BI.size(ob.value) === 0) {
@ -100666,9 +100675,17 @@ BI.MultiTreeSearcher = BI.inherit(BI.Widget, {
BI.each(ob.value, function (name, children) {
var childNodes = getChildrenNode(children);
text += (o.valueFormatter(name + "") || name) + (childNodes === "" ? "" : (":" + childNodes)) + "; ";
if (childNodes === "") {
count++;
}
});
if (count > 20) {
this.editor.setState(BI.Selection.Multi);
} else {
this.editor.setState(text);
}
}
function getChildrenNode (ob) {
var text = "";
@ -100677,6 +100694,9 @@ BI.MultiTreeSearcher = BI.inherit(BI.Widget, {
index++;
var childNodes = getChildrenNode(children);
text += (o.valueFormatter(name + "") || name) + (childNodes === "" ? "" : (":" + childNodes)) + (index === size ? "" : ",");
if (childNodes === "") {
count++;
}
});
return text;
}

38
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

3
dist/case.js vendored

@ -13097,6 +13097,9 @@ BI.MultiSelectBar = BI.inherit(BI.BasicButton, {
this.checkbox.on(BI.Controller.EVENT_CHANGE, function () {
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CLICK, self.isSelected(), self);
});
this.checkbox.on(BI.Checkbox.EVENT_CHANGE, function () {
self.fireEvent(BI.MultiSelectBar.EVENT_CHANGE, self.isSelected(), self);
});
this.half.on(BI.Controller.EVENT_CHANGE, function () {
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CLICK, self.isSelected(), self);
});

40
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

28
dist/fix/fix.js vendored

@ -132,10 +132,11 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
var _resolve = void 0;
callbacks.push(function () {
if (cb) {
// try {
try {
cb.call(ctx);
// } catch (e) {
// }
} catch (e) {
console.error(e);
}
} else if (_resolve) {
_resolve(ctx);
}
@ -752,7 +753,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
} catch (e) {
// if (this.user) {
// } else {
throw e;
console.error(e);
// }
} finally {
// "touch" every property so they are all tracked as
@ -818,12 +819,17 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
var oldValue = this.value;
this.value = value;
if (this.user) {
// try {
try {
this.cb.call(this.vm, value, oldValue, options);
// } catch (e) {
// }
} catch (e) {
console.log(e);
}
} else {
try {
this.cb.call(this.vm, value, oldValue, options);
} catch (e) {
console.log(e);
}
}
}
}
@ -989,7 +995,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
return NaN;
}, function (newValue, oldValue, opt) {
callback(i, newValue, oldValue, _.extend({ index: i }, opt));
});
}, options);
watchers.push(function unwatchFn() {
w.teardown();
v.__ob__._scopeDeps && remove(v.__ob__._scopeDeps, dep);
@ -1030,7 +1036,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
return NaN;
}, function (newValue, oldValue, opt) {
callback(i, newValue, oldValue, _.extend({ index: i }, opt));
});
}, options);
watchers.push(function unwatchFn() {
_w.teardown();
root._globalDeps && delete root._globalDeps[regStr];
@ -1142,9 +1148,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
if (typeof cb === 'string') {
cb = vm[cb];
}
return watch(vm.model, keyOrFn, _.bind(cb, vm.$$model ? vm.model : vm), _.extend({
sync: true
}, options));
return watch(vm.model, keyOrFn, _.bind(cb, vm.$$model ? vm.model : vm), options);
}
function initMethods(vm, methods) {

57
dist/widget.js vendored

@ -6448,26 +6448,6 @@ BI.extend(BI.AbstractFilterItem, {
}
});
BI.shortcut("bi.filter_expander", FilterExpander);
}());/**
* Created by Urthur on 2017/12/21.
*/
!(function () {
BI.constant("bi.constant.component.filter", {
FORMULA_COMBO: [{
text: BI.i18nText("BI-Conf_Formula_And"),
value: BI.AbstractFilterItem.FILTER_OPERATION_FORMULA_AND
}, {
text: BI.i18nText("BI-Conf_Formula_Or"),
value: BI.AbstractFilterItem.FILTER_OPERATION_FORMULA_OR
}],
CONDITION_COMBO: [{
text: BI.i18nText("BI-Conf_Condition_And"),
value: BI.AbstractFilterItem.FILTER_OPERATION_CONDITION_AND
}, {
text: BI.i18nText("BI-Conf_Condition_Or"),
value: BI.AbstractFilterItem.FILTER_OPERATION_CONDITION_OR
}]
});
}());/**
* 过滤
*
@ -6773,6 +6753,27 @@ BI.Filter.FILTER_TYPE.EMPTY_CONDITION = 37;
!(function () {
var OPERATION_ADD_CONDITION = 0, OPERATION_ADD_ANDOR_CONDITION = 1;
var FilterOperation = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(FilterOperation.superclass._defaultConfig.apply(this, arguments), {
constants: {
FORMULA_COMBO: [{
text: BI.i18nText("BI-Conf_Formula_And"),
value: BI.AbstractFilterItem.FILTER_OPERATION_FORMULA_AND
}, {
text: BI.i18nText("BI-Conf_Formula_Or"),
value: BI.AbstractFilterItem.FILTER_OPERATION_FORMULA_OR
}],
CONDITION_COMBO: [{
text: BI.i18nText("BI-Conf_Condition_And"),
value: BI.AbstractFilterItem.FILTER_OPERATION_CONDITION_AND
}, {
text: BI.i18nText("BI-Conf_Condition_Or"),
value: BI.AbstractFilterItem.FILTER_OPERATION_CONDITION_OR
}]
}
});
},
props: {
baseCls: "bi-filter-operation",
expander: {},
@ -6923,13 +6924,13 @@ BI.Filter.FILTER_TYPE.EMPTY_CONDITION = 37;
case BI.AbstractFilterItem.FILTER_OPERATION_FORMULA:
text = BI.i18nText("BI-Conf_Add_Formula");
cls = "filter-formula-font";
items = BI.Constants.getConstant("bi.constant.component.filter").FORMULA_COMBO;
items = this.options.constants.FORMULA_COMBO;
break;
case BI.AbstractFilterItem.FILTER_OPERATION_CONDITION:
default:
text = BI.i18nText("BI-Conf_Add_Condition");
cls = "filter-condition-font";
items = BI.Constants.getConstant("bi.constant.component.filter").CONDITION_COMBO;
items = this.options.constants.CONDITION_COMBO;
break;
}
@ -13510,6 +13511,7 @@ BI.MultiTreeSearcher = BI.inherit(BI.Widget, {
var o = this.options;
ob || (ob = {});
ob.value || (ob.value = {});
var count = 0;
if (BI.isNumber(ob)) {
this.editor.setState(ob);
} else if (BI.size(ob.value) === 0) {
@ -13519,9 +13521,17 @@ BI.MultiTreeSearcher = BI.inherit(BI.Widget, {
BI.each(ob.value, function (name, children) {
var childNodes = getChildrenNode(children);
text += (o.valueFormatter(name + "") || name) + (childNodes === "" ? "" : (":" + childNodes)) + "; ";
if (childNodes === "") {
count++;
}
});
if (count > 20) {
this.editor.setState(BI.Selection.Multi);
} else {
this.editor.setState(text);
}
}
function getChildrenNode (ob) {
var text = "";
@ -13530,6 +13540,9 @@ BI.MultiTreeSearcher = BI.inherit(BI.Widget, {
index++;
var childNodes = getChildrenNode(children);
text += (o.valueFormatter(name + "") || name) + (childNodes === "" ? "" : (":" + childNodes)) + (index === size ? "" : ",");
if (childNodes === "") {
count++;
}
});
return text;
}

3
src/case/toolbar/toolbar.multiselect.js

@ -45,6 +45,9 @@ BI.MultiSelectBar = BI.inherit(BI.BasicButton, {
this.checkbox.on(BI.Controller.EVENT_CHANGE, function () {
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CLICK, self.isSelected(), self);
});
this.checkbox.on(BI.Checkbox.EVENT_CHANGE, function () {
self.fireEvent(BI.MultiSelectBar.EVENT_CHANGE, self.isSelected(), self);
});
this.half.on(BI.Controller.EVENT_CHANGE, function () {
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CLICK, self.isSelected(), self);
});

21
src/widget/filter/filter.constant.js

@ -1,21 +0,0 @@
/**
* Created by Urthur on 2017/12/21.
*/
!(function () {
BI.constant("bi.constant.component.filter", {
FORMULA_COMBO: [{
text: BI.i18nText("BI-Conf_Formula_And"),
value: BI.AbstractFilterItem.FILTER_OPERATION_FORMULA_AND
}, {
text: BI.i18nText("BI-Conf_Formula_Or"),
value: BI.AbstractFilterItem.FILTER_OPERATION_FORMULA_OR
}],
CONDITION_COMBO: [{
text: BI.i18nText("BI-Conf_Condition_And"),
value: BI.AbstractFilterItem.FILTER_OPERATION_CONDITION_AND
}, {
text: BI.i18nText("BI-Conf_Condition_Or"),
value: BI.AbstractFilterItem.FILTER_OPERATION_CONDITION_OR
}]
});
}());

25
src/widget/filter/operation/filter.operation.js

@ -8,6 +8,27 @@
!(function () {
var OPERATION_ADD_CONDITION = 0, OPERATION_ADD_ANDOR_CONDITION = 1;
var FilterOperation = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(FilterOperation.superclass._defaultConfig.apply(this, arguments), {
constants: {
FORMULA_COMBO: [{
text: BI.i18nText("BI-Conf_Formula_And"),
value: BI.AbstractFilterItem.FILTER_OPERATION_FORMULA_AND
}, {
text: BI.i18nText("BI-Conf_Formula_Or"),
value: BI.AbstractFilterItem.FILTER_OPERATION_FORMULA_OR
}],
CONDITION_COMBO: [{
text: BI.i18nText("BI-Conf_Condition_And"),
value: BI.AbstractFilterItem.FILTER_OPERATION_CONDITION_AND
}, {
text: BI.i18nText("BI-Conf_Condition_Or"),
value: BI.AbstractFilterItem.FILTER_OPERATION_CONDITION_OR
}]
}
});
},
props: {
baseCls: "bi-filter-operation",
expander: {},
@ -158,13 +179,13 @@
case BI.AbstractFilterItem.FILTER_OPERATION_FORMULA:
text = BI.i18nText("BI-Conf_Add_Formula");
cls = "filter-formula-font";
items = BI.Constants.getConstant("bi.constant.component.filter").FORMULA_COMBO;
items = this.options.constants.FORMULA_COMBO;
break;
case BI.AbstractFilterItem.FILTER_OPERATION_CONDITION:
default:
text = BI.i18nText("BI-Conf_Add_Condition");
cls = "filter-condition-font";
items = BI.Constants.getConstant("bi.constant.component.filter").CONDITION_COMBO;
items = this.options.constants.CONDITION_COMBO;
break;
}

12
src/widget/multitree/trigger/searcher.multi.tree.js

@ -111,6 +111,7 @@ BI.MultiTreeSearcher = BI.inherit(BI.Widget, {
var o = this.options;
ob || (ob = {});
ob.value || (ob.value = {});
var count = 0;
if (BI.isNumber(ob)) {
this.editor.setState(ob);
} else if (BI.size(ob.value) === 0) {
@ -120,9 +121,17 @@ BI.MultiTreeSearcher = BI.inherit(BI.Widget, {
BI.each(ob.value, function (name, children) {
var childNodes = getChildrenNode(children);
text += (o.valueFormatter(name + "") || name) + (childNodes === "" ? "" : (":" + childNodes)) + "; ";
if (childNodes === "") {
count++;
}
});
if (count > 20) {
this.editor.setState(BI.Selection.Multi);
} else {
this.editor.setState(text);
}
}
function getChildrenNode (ob) {
var text = "";
@ -131,6 +140,9 @@ BI.MultiTreeSearcher = BI.inherit(BI.Widget, {
index++;
var childNodes = getChildrenNode(children);
text += (o.valueFormatter(name + "") || name) + (childNodes === "" ? "" : (":" + childNodes)) + (index === size ? "" : ",");
if (childNodes === "") {
count++;
}
});
return text;
}

Loading…
Cancel
Save