Browse Source

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

es6
windy 6 years ago
parent
commit
84733e762a
  1. 24
      dist/_fineui.min.js
  2. 31
      dist/bundle.js
  3. 24
      dist/bundle.min.js
  4. 20
      dist/core.js
  5. 24
      dist/fineui.min.js
  6. 3
      dist/fix/fix.compact.js
  7. 8
      dist/widget.js
  8. 3
      src/component/valuechooser/abstract.valuechooser.js
  9. 18
      src/core/inject.js
  10. 2
      src/core/shortcut.js
  11. 5
      src/widget/multiselect/trigger/searcher.multiselect.js
  12. 18
      utils/utils.js

24
dist/_fineui.min.js vendored

File diff suppressed because one or more lines are too long

31
dist/bundle.js vendored

@ -21706,7 +21706,7 @@ BI.Widget = BI.inherit(BI.OB, {
var kv = {}; var kv = {};
BI.shortcut = function (xtype, cls) { BI.shortcut = function (xtype, cls) {
if (kv[xtype] != null) { if (kv[xtype] != null) {
throw ("shortcut:[" + xtype + "] has been registed"); console.error("shortcut:[" + xtype + "] has been registed");
} }
kv[xtype] = cls; kv[xtype] = cls;
}; };
@ -28740,7 +28740,7 @@ BI.extend(BI.DOM, {
var constantInjection = {}; var constantInjection = {};
BI.constant = function (xtype, cls) { BI.constant = function (xtype, cls) {
if (constantInjection[xtype] != null) { if (constantInjection[xtype] != null) {
throw ("constant:[" + xtype + "] has been registed"); console.error("constant:[" + xtype + "] has been registed");
} }
constantInjection[xtype] = cls; constantInjection[xtype] = cls;
}; };
@ -28748,7 +28748,7 @@ BI.extend(BI.DOM, {
var modelInjection = {}; var modelInjection = {};
BI.model = function (xtype, cls) { BI.model = function (xtype, cls) {
if (modelInjection[xtype] != null) { if (modelInjection[xtype] != null) {
throw ("model:[" + xtype + "] has been registed"); console.error("model:[" + xtype + "] has been registed");
} }
modelInjection[xtype] = cls; modelInjection[xtype] = cls;
}; };
@ -28756,7 +28756,7 @@ BI.extend(BI.DOM, {
var storeInjection = {}; var storeInjection = {};
BI.store = function (xtype, cls) { BI.store = function (xtype, cls) {
if (storeInjection[xtype] != null) { if (storeInjection[xtype] != null) {
throw ("store:[" + xtype + "] has been registed"); console.error("store:[" + xtype + "] has been registed");
} }
storeInjection[xtype] = cls; storeInjection[xtype] = cls;
}; };
@ -28764,7 +28764,7 @@ BI.extend(BI.DOM, {
var serviceInjection = {}; var serviceInjection = {};
BI.service = function (xtype, cls) { BI.service = function (xtype, cls) {
if (serviceInjection[xtype] != null) { if (serviceInjection[xtype] != null) {
throw ("service:[" + xtype + "] has been registed"); console.error("service:[" + xtype + "] has been registed");
} }
serviceInjection[xtype] = cls; serviceInjection[xtype] = cls;
}; };
@ -28772,7 +28772,7 @@ BI.extend(BI.DOM, {
var providerInjection = {}; var providerInjection = {};
BI.provider = function (xtype, cls) { BI.provider = function (xtype, cls) {
if (providerInjection[xtype] != null) { if (providerInjection[xtype] != null) {
throw ("provider:[" + xtype + "] has been registed"); console.error("provider:[" + xtype + "] has been registed");
} }
providerInjection[xtype] = cls; providerInjection[xtype] = cls;
}; };
@ -28917,13 +28917,21 @@ BI.extend(BI.DOM, {
BI.Actions = { BI.Actions = {
runAction: function (type, config) { runAction: function (type, config) {
BI.each(actions[type], function (i, act) { BI.each(actions[type], function (i, act) {
try {
act(config); act(config);
} catch (e) {
console.error(e);
}
}); });
}, },
runGlobalAction: function () { runGlobalAction: function () {
var args = [].slice.call(arguments); var args = [].slice.call(arguments);
BI.each(globalAction, function (i, act) { BI.each(globalAction, function (i, act) {
try {
act.apply(null, args); act.apply(null, args);
} catch (e) {
console.error(e);
}
}); });
} }
}; };
@ -98734,8 +98742,9 @@ BI.MultiSelectSearcher = BI.inherit(BI.Widget, {
return self.editor.getValue(); return self.editor.getValue();
}, },
itemsCreator: function (op, callback) { itemsCreator: function (op, callback) {
op.keyword = self.editor.getValue(); var keyword = self.editor.getValue();
this.setKeyword(op.keyword); op.keywords = [keyword];
this.setKeyword(keyword);
o.itemsCreator(op, callback); o.itemsCreator(op, callback);
}, },
value: o.value value: o.value
@ -111332,9 +111341,6 @@ BI.AbstractValueChooser = BI.inherit(BI.Widget, {
} }
function call (items) { function call (items) {
var keywords = (options.keywords || []).slice(); var keywords = (options.keywords || []).slice();
if (options.keyword) {
keywords.push(options.keyword);
}
BI.each(keywords, function (i, kw) { BI.each(keywords, function (i, kw) {
var search = BI.Func.getSearchResult(items, kw); var search = BI.Func.getSearchResult(items, kw);
items = search.match.concat(search.find); items = search.match.concat(search.find);
@ -111695,6 +111701,9 @@ BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);;(function () {
BI.isEmptyObject = function (ob) { BI.isEmptyObject = function (ob) {
return BI.size(ob) === 0; return BI.size(ob) === 0;
}; };
BI.deepClone = function (ob) {
return Fix.toJSON(ob);
};
} }
BI.watch = Fix.watch; BI.watch = Fix.watch;
}());(function () { }());(function () {

24
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

20
dist/core.js vendored

@ -21706,7 +21706,7 @@ BI.Widget = BI.inherit(BI.OB, {
var kv = {}; var kv = {};
BI.shortcut = function (xtype, cls) { BI.shortcut = function (xtype, cls) {
if (kv[xtype] != null) { if (kv[xtype] != null) {
throw ("shortcut:[" + xtype + "] has been registed"); console.error("shortcut:[" + xtype + "] has been registed");
} }
kv[xtype] = cls; kv[xtype] = cls;
}; };
@ -28740,7 +28740,7 @@ BI.extend(BI.DOM, {
var constantInjection = {}; var constantInjection = {};
BI.constant = function (xtype, cls) { BI.constant = function (xtype, cls) {
if (constantInjection[xtype] != null) { if (constantInjection[xtype] != null) {
throw ("constant:[" + xtype + "] has been registed"); console.error("constant:[" + xtype + "] has been registed");
} }
constantInjection[xtype] = cls; constantInjection[xtype] = cls;
}; };
@ -28748,7 +28748,7 @@ BI.extend(BI.DOM, {
var modelInjection = {}; var modelInjection = {};
BI.model = function (xtype, cls) { BI.model = function (xtype, cls) {
if (modelInjection[xtype] != null) { if (modelInjection[xtype] != null) {
throw ("model:[" + xtype + "] has been registed"); console.error("model:[" + xtype + "] has been registed");
} }
modelInjection[xtype] = cls; modelInjection[xtype] = cls;
}; };
@ -28756,7 +28756,7 @@ BI.extend(BI.DOM, {
var storeInjection = {}; var storeInjection = {};
BI.store = function (xtype, cls) { BI.store = function (xtype, cls) {
if (storeInjection[xtype] != null) { if (storeInjection[xtype] != null) {
throw ("store:[" + xtype + "] has been registed"); console.error("store:[" + xtype + "] has been registed");
} }
storeInjection[xtype] = cls; storeInjection[xtype] = cls;
}; };
@ -28764,7 +28764,7 @@ BI.extend(BI.DOM, {
var serviceInjection = {}; var serviceInjection = {};
BI.service = function (xtype, cls) { BI.service = function (xtype, cls) {
if (serviceInjection[xtype] != null) { if (serviceInjection[xtype] != null) {
throw ("service:[" + xtype + "] has been registed"); console.error("service:[" + xtype + "] has been registed");
} }
serviceInjection[xtype] = cls; serviceInjection[xtype] = cls;
}; };
@ -28772,7 +28772,7 @@ BI.extend(BI.DOM, {
var providerInjection = {}; var providerInjection = {};
BI.provider = function (xtype, cls) { BI.provider = function (xtype, cls) {
if (providerInjection[xtype] != null) { if (providerInjection[xtype] != null) {
throw ("provider:[" + xtype + "] has been registed"); console.error("provider:[" + xtype + "] has been registed");
} }
providerInjection[xtype] = cls; providerInjection[xtype] = cls;
}; };
@ -28917,13 +28917,21 @@ BI.extend(BI.DOM, {
BI.Actions = { BI.Actions = {
runAction: function (type, config) { runAction: function (type, config) {
BI.each(actions[type], function (i, act) { BI.each(actions[type], function (i, act) {
try {
act(config); act(config);
} catch (e) {
console.error(e);
}
}); });
}, },
runGlobalAction: function () { runGlobalAction: function () {
var args = [].slice.call(arguments); var args = [].slice.call(arguments);
BI.each(globalAction, function (i, act) { BI.each(globalAction, function (i, act) {
try {
act.apply(null, args); act.apply(null, args);
} catch (e) {
console.error(e);
}
}); });
} }
}; };

24
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

3
dist/fix/fix.compact.js vendored

@ -219,6 +219,9 @@
BI.isEmptyObject = function (ob) { BI.isEmptyObject = function (ob) {
return BI.size(ob) === 0; return BI.size(ob) === 0;
}; };
BI.deepClone = function (ob) {
return Fix.toJSON(ob);
};
} }
BI.watch = Fix.watch; BI.watch = Fix.watch;
}()); }());

8
dist/widget.js vendored

@ -11605,8 +11605,9 @@ BI.MultiSelectSearcher = BI.inherit(BI.Widget, {
return self.editor.getValue(); return self.editor.getValue();
}, },
itemsCreator: function (op, callback) { itemsCreator: function (op, callback) {
op.keyword = self.editor.getValue(); var keyword = self.editor.getValue();
this.setKeyword(op.keyword); op.keywords = [keyword];
this.setKeyword(keyword);
o.itemsCreator(op, callback); o.itemsCreator(op, callback);
}, },
value: o.value value: o.value
@ -24203,9 +24204,6 @@ BI.AbstractValueChooser = BI.inherit(BI.Widget, {
} }
function call (items) { function call (items) {
var keywords = (options.keywords || []).slice(); var keywords = (options.keywords || []).slice();
if (options.keyword) {
keywords.push(options.keyword);
}
BI.each(keywords, function (i, kw) { BI.each(keywords, function (i, kw) {
var search = BI.Func.getSearchResult(items, kw); var search = BI.Func.getSearchResult(items, kw);
items = search.match.concat(search.find); items = search.match.concat(search.find);

3
src/component/valuechooser/abstract.valuechooser.js

@ -58,9 +58,6 @@ BI.AbstractValueChooser = BI.inherit(BI.Widget, {
} }
function call (items) { function call (items) {
var keywords = (options.keywords || []).slice(); var keywords = (options.keywords || []).slice();
if (options.keyword) {
keywords.push(options.keyword);
}
BI.each(keywords, function (i, kw) { BI.each(keywords, function (i, kw) {
var search = BI.Func.getSearchResult(items, kw); var search = BI.Func.getSearchResult(items, kw);
items = search.match.concat(search.find); items = search.match.concat(search.find);

18
src/core/inject.js

@ -2,7 +2,7 @@
var constantInjection = {}; var constantInjection = {};
BI.constant = function (xtype, cls) { BI.constant = function (xtype, cls) {
if (constantInjection[xtype] != null) { if (constantInjection[xtype] != null) {
throw ("constant:[" + xtype + "] has been registed"); console.error("constant:[" + xtype + "] has been registed");
} }
constantInjection[xtype] = cls; constantInjection[xtype] = cls;
}; };
@ -10,7 +10,7 @@
var modelInjection = {}; var modelInjection = {};
BI.model = function (xtype, cls) { BI.model = function (xtype, cls) {
if (modelInjection[xtype] != null) { if (modelInjection[xtype] != null) {
throw ("model:[" + xtype + "] has been registed"); console.error("model:[" + xtype + "] has been registed");
} }
modelInjection[xtype] = cls; modelInjection[xtype] = cls;
}; };
@ -18,7 +18,7 @@
var storeInjection = {}; var storeInjection = {};
BI.store = function (xtype, cls) { BI.store = function (xtype, cls) {
if (storeInjection[xtype] != null) { if (storeInjection[xtype] != null) {
throw ("store:[" + xtype + "] has been registed"); console.error("store:[" + xtype + "] has been registed");
} }
storeInjection[xtype] = cls; storeInjection[xtype] = cls;
}; };
@ -26,7 +26,7 @@
var serviceInjection = {}; var serviceInjection = {};
BI.service = function (xtype, cls) { BI.service = function (xtype, cls) {
if (serviceInjection[xtype] != null) { if (serviceInjection[xtype] != null) {
throw ("service:[" + xtype + "] has been registed"); console.error("service:[" + xtype + "] has been registed");
} }
serviceInjection[xtype] = cls; serviceInjection[xtype] = cls;
}; };
@ -34,7 +34,7 @@
var providerInjection = {}; var providerInjection = {};
BI.provider = function (xtype, cls) { BI.provider = function (xtype, cls) {
if (providerInjection[xtype] != null) { if (providerInjection[xtype] != null) {
throw ("provider:[" + xtype + "] has been registed"); console.error("provider:[" + xtype + "] has been registed");
} }
providerInjection[xtype] = cls; providerInjection[xtype] = cls;
}; };
@ -179,13 +179,21 @@
BI.Actions = { BI.Actions = {
runAction: function (type, config) { runAction: function (type, config) {
BI.each(actions[type], function (i, act) { BI.each(actions[type], function (i, act) {
try {
act(config); act(config);
} catch (e) {
console.error(e);
}
}); });
}, },
runGlobalAction: function () { runGlobalAction: function () {
var args = [].slice.call(arguments); var args = [].slice.call(arguments);
BI.each(globalAction, function (i, act) { BI.each(globalAction, function (i, act) {
try {
act.apply(null, args); act.apply(null, args);
} catch (e) {
console.error(e);
}
}); });
} }
}; };

2
src/core/shortcut.js

@ -2,7 +2,7 @@
var kv = {}; var kv = {};
BI.shortcut = function (xtype, cls) { BI.shortcut = function (xtype, cls) {
if (kv[xtype] != null) { if (kv[xtype] != null) {
throw ("shortcut:[" + xtype + "] has been registed"); console.error("shortcut:[" + xtype + "] has been registed");
} }
kv[xtype] = cls; kv[xtype] = cls;
}; };

5
src/widget/multiselect/trigger/searcher.multiselect.js

@ -44,8 +44,9 @@ BI.MultiSelectSearcher = BI.inherit(BI.Widget, {
return self.editor.getValue(); return self.editor.getValue();
}, },
itemsCreator: function (op, callback) { itemsCreator: function (op, callback) {
op.keyword = self.editor.getValue(); var keyword = self.editor.getValue();
this.setKeyword(op.keyword); op.keywords = [keyword];
this.setKeyword(keyword);
o.itemsCreator(op, callback); o.itemsCreator(op, callback);
}, },
value: o.value value: o.value

18
utils/utils.js

@ -13188,7 +13188,7 @@ _.extend(BI.OB.prototype, {
var constantInjection = {}; var constantInjection = {};
BI.constant = function (xtype, cls) { BI.constant = function (xtype, cls) {
if (constantInjection[xtype] != null) { if (constantInjection[xtype] != null) {
throw ("constant:[" + xtype + "] has been registed"); console.error("constant:[" + xtype + "] has been registed");
} }
constantInjection[xtype] = cls; constantInjection[xtype] = cls;
}; };
@ -13196,7 +13196,7 @@ _.extend(BI.OB.prototype, {
var modelInjection = {}; var modelInjection = {};
BI.model = function (xtype, cls) { BI.model = function (xtype, cls) {
if (modelInjection[xtype] != null) { if (modelInjection[xtype] != null) {
throw ("model:[" + xtype + "] has been registed"); console.error("model:[" + xtype + "] has been registed");
} }
modelInjection[xtype] = cls; modelInjection[xtype] = cls;
}; };
@ -13204,7 +13204,7 @@ _.extend(BI.OB.prototype, {
var storeInjection = {}; var storeInjection = {};
BI.store = function (xtype, cls) { BI.store = function (xtype, cls) {
if (storeInjection[xtype] != null) { if (storeInjection[xtype] != null) {
throw ("store:[" + xtype + "] has been registed"); console.error("store:[" + xtype + "] has been registed");
} }
storeInjection[xtype] = cls; storeInjection[xtype] = cls;
}; };
@ -13212,7 +13212,7 @@ _.extend(BI.OB.prototype, {
var serviceInjection = {}; var serviceInjection = {};
BI.service = function (xtype, cls) { BI.service = function (xtype, cls) {
if (serviceInjection[xtype] != null) { if (serviceInjection[xtype] != null) {
throw ("service:[" + xtype + "] has been registed"); console.error("service:[" + xtype + "] has been registed");
} }
serviceInjection[xtype] = cls; serviceInjection[xtype] = cls;
}; };
@ -13220,7 +13220,7 @@ _.extend(BI.OB.prototype, {
var providerInjection = {}; var providerInjection = {};
BI.provider = function (xtype, cls) { BI.provider = function (xtype, cls) {
if (providerInjection[xtype] != null) { if (providerInjection[xtype] != null) {
throw ("provider:[" + xtype + "] has been registed"); console.error("provider:[" + xtype + "] has been registed");
} }
providerInjection[xtype] = cls; providerInjection[xtype] = cls;
}; };
@ -13365,13 +13365,21 @@ _.extend(BI.OB.prototype, {
BI.Actions = { BI.Actions = {
runAction: function (type, config) { runAction: function (type, config) {
BI.each(actions[type], function (i, act) { BI.each(actions[type], function (i, act) {
try {
act(config); act(config);
} catch (e) {
console.error(e);
}
}); });
}, },
runGlobalAction: function () { runGlobalAction: function () {
var args = [].slice.call(arguments); var args = [].slice.call(arguments);
BI.each(globalAction, function (i, act) { BI.each(globalAction, function (i, act) {
try {
act.apply(null, args); act.apply(null, args);
} catch (e) {
console.error(e);
}
}); });
} }
}; };

Loading…
Cancel
Save