windy 7 years ago
parent
commit
c0075cce75
  1. 4
      demo/js/case/combo/demo.icon_text_value_combo.js
  2. 2
      demo/js/widget/multiselect/demo.multi_select_combo.js
  3. 2
      demo/js/widget/singleselct/demo.single_select_combo.js
  4. 6
      dist/base.js
  5. 443
      dist/bundle.js
  6. 2
      dist/bundle.min.css
  7. 81
      dist/bundle.min.js
  8. 36
      dist/case.js
  9. 369
      dist/core.js
  10. 4
      dist/demo.js
  11. 443
      dist/fineui.js
  12. 2
      dist/fineui.min.css
  13. 80
      dist/fineui.min.js
  14. 32
      dist/widget.js
  15. 4
      src/base/combination/searcher.js
  16. 2
      src/base/single/label/label.js
  17. 10
      src/case/combo/icontextvaluecombo/combo.icontextvalue.js
  18. 4
      src/case/combo/icontextvaluecombo/popup.icontextvalue.js
  19. 4
      src/case/combo/searchtextvaluecombo/popup.searchtextvalue.js
  20. 4
      src/case/combo/searchtextvaluecombo/trigger.searchtextvalue.js
  21. 6
      src/case/trigger/trigger.icon.text.js
  22. 8
      src/case/trigger/trigger.icon.text.select.js
  23. 2
      src/component/allvaluechooser/abstract.allvaluechooser.js
  24. 22
      src/component/treevaluechooser/abstract.treevaluechooser.js
  25. 2
      src/component/valuechooser/abstract.valuechooser.js
  26. 14
      src/core/func/function.js
  27. 353
      src/core/utils/xml.js
  28. 2
      src/css/base/layer/panel.css
  29. 14
      src/css/base/pager/pager.css
  30. 67
      src/css/base/single/tip/tip.css
  31. 196
      src/css/base/table/table.css
  32. 14
      src/css/base/trigger/trigger.css
  33. 2
      src/css/core/utils/common.css
  34. 2
      src/css/theme/dark.css
  35. 5
      src/css/widget/exceltable/exceltable.css
  36. 2
      src/widget/multiselect/search/multiselect.search.loader.js
  37. 2
      src/widget/singleselect/search/singleselect.search.loader.js
  38. 2
      src/widget/singleselectaddsearch/search/singleselect.search.loader.js
  39. 355
      utils/utils.js

4
demo/js/case/combo/demo.icon_text_value_combo.js

@ -14,9 +14,11 @@ Demo.IconTextValueCombo = BI.inherit(BI.Widget, {
text: "默认值",
value: 1,
width: 300,
iconHeight: 16,
iconWidth: 16,
items: [{
text: "MVC-1",
iconCls: "close-font",
iconCls: "check-box-icon",
value: 1
}, {
text: "MVC-2",

2
demo/js/widget/multiselect/demo.multi_select_combo.js

@ -46,7 +46,7 @@ Demo.MultiSelectCombo = BI.inherit(BI.Widget, {
}
BI.each(keywords, function (i, kw) {
var search = BI.Func.getSearchResult(items, kw);
items = search.matched.concat(search.finded);
items = search.match.concat(search.find);
});
if (options.selectedValues) {// 过滤
var filter = BI.makeObject(options.selectedValues, true);

2
demo/js/widget/singleselct/demo.single_select_combo.js

@ -45,7 +45,7 @@ Demo.SingleSelectCombo = BI.inherit(BI.Widget, {
}
BI.each(keywords, function (i, kw) {
var search = BI.Func.getSearchResult(items, kw);
items = search.matched.concat(search.finded);
items = search.match.concat(search.find);
});
if (options.selectedValues) {// 过滤
var filter = BI.makeObject(options.selectedValues, true);

6
dist/base.js vendored

@ -4546,8 +4546,8 @@ BI.Searcher = BI.inherit(BI.Widget, {
if (o.isAutoSearch) {
var items = (o.adapter && ((o.adapter.getItems && o.adapter.getItems()) || o.adapter.attr("items"))) || [];
var finding = BI.Func.getSearchResult(items, keyword);
var matched = finding.matched, finded = finding.finded;
this.popupView.populate(finded, matched, keyword);
var match = finding.match, find = finding.find;
this.popupView.populate(find, match, keyword);
o.isAutoSync && o.adapter && o.adapter.getValue && this.popupView.setValue(o.adapter.getValue());
self.fireEvent(BI.Searcher.EVENT_SEARCHING);
return;
@ -20080,6 +20080,7 @@ BI.Label = BI.inherit(BI.Single, {
var json = this._createJson();
if (BI.isNumber(o.width) && o.width > 0) {
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
if (BI.isNumber(o.height) && o.height > 0) {
BI.createWidget({
type: "bi.adaptive",
@ -20099,7 +20100,6 @@ BI.Label = BI.inherit(BI.Single, {
this.element.css({"line-height": o.height + "px"});
return;
}
json.width = o.textWidth;
BI.createWidget({
type: "bi.vertical_adapt",
scrollable: o.whiteSpace === "normal",

443
dist/bundle.js vendored

@ -16171,360 +16171,7 @@ BI.Region.prototype = {
pos.push(this.y + this.h / 2);
return pos;
}
};// ;
// !(function (BI) {
//
// if (BI.isIE()) {
// XMLSerializer = null;
// DOMParser = null;
// }
//
//
// var XML = {
// Document: {
// NodeType: {
// ELEMENT: 1,
// ATTRIBUTE: 2,
// TEXT: 3,
// CDATA_SECTION: 4,
// ENTITY_REFERENCE: 5,
// ENTITY: 6,
// PROCESSING_INSTRUCTION: 7,
// COMMENT: 8,
// DOCUMENT: 9,
// DOCUMENT_TYPE: 10,
// DOCUMENT_FRAGMENT: 11,
// NOTATION: 12
// }
// }
// };
//
// XML.ResultType = {
// single: 'single',
// array: 'array'
// };
//
// XML.fromString = function (xmlStr) {
// try {
// var parser = new DOMParser();
// return parser.parseFromString(xmlStr, "text/xml");
// } catch (e) {
// var arrMSXML = ["MSXML2.DOMDocument.6.0", "MSXML2.DOMDocument.3.0"];
// for (var i = 0; i < arrMSXML.length; i++) {
// try {
// var xmlDoc = new ActiveXObject(arrMSXML[i]);
// xmlDoc.setProperty("SelectionLanguage", "XPath");
// xmlDoc.async = false;
// xmlDoc.loadXML(xmlStr);
// return xmlDoc;
// } catch (xmlError) {
// }
// }
// }
// };
//
// XML.toString = function (xmlNode) {
// if (!BI.isIE()) {
// var xmlSerializer = new XMLSerializer();
// return xmlSerializer.serializeToString(xmlNode);
// } else
// return xmlNode.xml;
// };
//
// XML.getNSResolver = function (str) {
// if (!str) {
// return null;
// }
// var list = str.split(' ');
// var namespaces = {};
// for (var i = 0; i < list.length; i++) {
// var pair = list[i].split('=');
// var fix = BI.trim(pair[0]).replace("xmlns:", "");
// namespaces[fix] = BI.trim(pair[1]).replace(/"/g, "").replace(/'/g, "");
// }
// return function (prefix) {
// return namespaces[prefix];
// };
// };
//
// XML.eval = function (context, xpathExp, resultType, namespaces) {
// if ((BI.isIE() && ('undefined' === typeof(context.selectSingleNode) || 'undefined' === typeof(context.selectNodes)))) {
// return XML.eval2(context, xpathExp, resultType, namespaces);
// } else {
// if (BI.isIE()) {
// namespaces = namespaces ? namespaces : "";
// var doc = (context.nodeType == XML.Document.NodeType.DOCUMENT) ? context : context.ownerDocument;
// doc.setProperty("SelectionNamespaces", namespaces);
// var result;
// if (resultType == this.ResultType.single) {
// result = context.selectSingleNode(xpathExp);
// } else {
// result = context.selectNodes(xpathExp) || [];
// }
// doc.setProperty("SelectionNamespaces", "");
// return result;
// } else {
// var node = context;
// var xmlDoc = (context.nodeName.indexOf("document") == -1) ? context.ownerDocument : context;
// var retType = (resultType == this.ResultType.single) ? XPathResult.FIRST_ORDERED_NODE_TYPE : XPathResult.ANY_TYPE;
// var col = xmlDoc.evaluate(xpathExp, node, XML.getNSResolver(namespaces), retType, null);
//
// if (retType == XPathResult.FIRST_ORDERED_NODE_TYPE) {
// return col.singleNodeValue;
// } else {
// var thisColMemb = col.iterateNext();
// var rowsCol = [];
// while (thisColMemb) {
// rowsCol[rowsCol.length] = thisColMemb;
// thisColMemb = col.iterateNext();
// }
// return rowsCol;
// }
// }
// }
// };
//
// XML.eval2 = function (context, xpathExp, resultType, namespaces) {
// if (resultType !== "single" && resultType !== undefined && resultType !== null) {
// throw new Error("justep.SimpleXML.eval only be resultType='single', not" + resultType);
// }
//
// if (context === null || context === undefined || xpathExp === null || xpathExp === undefined) {
// return context;
// }
//
// if (context.nodeType == XML.Document.NodeType.DOCUMENT) {
// context = context.documentElement;
// }
//
// var childs, i;
// if (xpathExp.indexOf("/") != -1) {
// var items = xpathExp.split("/");
// var isAbs = xpathExp.substring(0, 1) == "/";
// for (i = 0; i < items.length; i++) {
// var item = items[i];
// if (item === "") {
// continue;
// } else {
// var next = null;
// var ii = i + 1;
// for (; ii < items.length; ii++) {
// if (next === null) {
// next = items[ii];
// } else {
// next = next + "/" + items[ii];
// }
// }
//
// if (item == ".") {
// return this.eval(context, next, resultType);
//
// } else if (item == "..") {
// return this.eval2(context.parentNode, next, resultType);
//
// } else if (item == "*") {
// if (isAbs) {
// return this.eval2(context, next, resultType);
//
// } else {
// childs = context.childNodes;
// for (var j = 0; j < childs.length; j++) {
// var tmp = this.eval2(childs[j], next, resultType);
// if (tmp !== null) {
// return tmp;
// }
// }
// return null;
// }
//
// } else {
// if (isAbs) {
// if (context.nodeName == item) {
// return this.eval2(context, next, resultType);
// } else {
// return null;
// }
// } else {
// var child = this.getChildByName(context, item);
// if (child !== null) {
// return this.eval2(child, next, resultType);
// } else {
// return null;
// }
//
// }
// }
//
// }
// }
//
// return null;
//
// } else {
// if ("text()" == xpathExp) {
// childs = context.childNodes;
// for (i = 0; i < childs.length; i++) {
// if (childs[i].nodeType == XML.Document.NodeType.TEXT) {
// return childs[i];
// }
// }
// return null;
// } else {
// return this.getChildByName(context, xpathExp);
// }
// }
// };
//
// XML.getChildByName = function (context, name) {
// if (context === null || context === undefined || name === null || name === undefined) {
// return null;
// }
//
// if (context.nodeType == XML.Document.NodeType.DOCUMENT) {
// context = context.documentElement;
// }
//
// var childs = context.childNodes;
// for (var i = 0; i < childs.length; i++) {
// if (childs[i].nodeType == XML.Document.NodeType.ELEMENT && (childs[i].nodeName == name || name == "*")) {
// return childs[i];
// }
// }
//
// return null;
// };
//
// XML.appendChildren = function (context, xpathExp, nodes, isBefore) {
// nodes = (typeof nodes.length != "undefined") ? nodes : [nodes];
// var finded = this.eval(context, xpathExp);
// var count = finded.length;
// for (var i = 0; i < count; i++) {
// if (isBefore && finded[i].firstNode) {
// this._insertBefore(finded[i], nodes, finded[i].firstNode);
// } else {
// for (var j = 0; j < nodes.length; j++) {
// finded[i].appendChild(nodes[j]);
// }
// }
// }
// return count;
// };
//
// XML.removeNodes = function (context, xpathExp) {
// var nodes = this.eval(context, xpathExp);
// for (var i = 0; i < nodes.length; i++) {
// nodes[i].parentNode.removeChild(nodes[i]);
// }
// };
//
// XML._insertBefore = function (parent, newchildren, refchild) {
// for (var i = 0; i < newchildren.length; i++) {
// parent.insertBefore(newchildren[i], refchild);
// }
// };
//
// XML.insertNodes = function (context, xpathExp, nodes, isBefore) {
// nodes = (typeof nodes.length != "undefined") ? nodes : [nodes];
// var finded = this.eval(context, xpathExp);
// var count = finded.length;
// for (var i = 0; i < count; i++) {
// var refnode = (isBefore) ? finded[i] : finded[i].nextSibling;
// this._insertBefore(finded[i].parentNode, nodes, refnode);
// }
// return count;
// };
//
// XML.replaceNodes = function (context, xpathExp, nodes) {
// nodes = (typeof nodes.length != "undefined") ? nodes : [nodes];
// var finded = this.eval(context, xpathExp);
// var count = finded.length;
// for (var i = 0; i < count; i++) {
// var refnode = finded[i];
// var parent = refnode.parentNode;
// this._insertBefore(parent, nodes, refnode);
// parent.removeChild(refnode);
// }
// return count;
// };
//
// XML.setNodeText = function (context, xpathExp, text) {
// var finded = this.eval(context, xpathExp, this.ResultType.single);
// if (finded === null) {
// return;
// }
// if (finded.nodeType == XML.Document.NodeType.ELEMENT) {
// var textNode = this.eval(finded, "./text()", this.ResultType.single);
// if (!textNode) {
// textNode = finded.ownerDocument.createTextNode("");
// finded.appendChild(textNode);
// }
// textNode.nodeValue = text;
// } else {
// finded.nodeValue = text;
// }
// return;
// };
//
// XML.getNodeText = function (context, xpathExp, defaultValue) {
// var finded = xpathExp ? this.eval(context, xpathExp, this.ResultType.single) : context;
// if (finded && (finded.nodeType == XML.Document.NodeType.ELEMENT)) {
// finded = this.eval(finded, "./text()", this.ResultType.single);
// }
// return (finded && finded.nodeValue) ? "" + finded.nodeValue : (defaultValue !== undefined) ? defaultValue : null;
// };
//
// XML.Namespaces = {
// XMLSCHEMA: "http://www.w3.org/2001/XMLSchema#",
// XMLSCHEMA_STRING: "http://www.w3.org/2001/XMLSchema#String",
// XMLSCHEMA_LONG: "http://www.w3.org/2001/XMLSchema#Long",
// XMLSCHEMA_INTEGER: 'http://www.w3.org/2001/XMLSchema#Integer',
// XMLSCHEMA_FLOAT: 'http://www.w3.org/2001/XMLSchema#Float',
// XMLSCHEMA_DOUBLE: 'http://www.w3.org/2001/XMLSchema#Double',
// XMLSCHEMA_DECIMAL: 'http://www.w3.org/2001/XMLSchema#Decimal',
// XMLSCHEMA_DATE: 'http://www.w3.org/2001/XMLSchema#Date',
// XMLSCHEMA_TIME: 'http://www.w3.org/2001/XMLSchema#Time',
// XMLSCHEMA_DATETIME: 'http://www.w3.org/2001/XMLSchema#DateTime',
// XMLSCHEMA_BOOLEAN: 'http://www.w3.org/2001/XMLSchema#Boolean',
// XMLSCHEMA_SYMBOL: 'http://www.w3.org/2001/XMLSchema#Symbol',
// JUSTEPSCHEMA: "http://www.justep.com/xbiz#",
// RDF: "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
// JUSTEP: "http://www.justep.com/x5#",
// 'get': function (type) {
// type = type ? type.toLowerCase() : "string";
// if ("string" == type) {
// return XML.Namespaces.XMLSCHEMA_STRING;
// }
// else if ("integer" == type) {
// return XML.Namespaces.XMLSCHEMA_INTEGER;
// }
// else if ("long" == type) {
// return XML.Namespaces.XMLSCHEMA_LONG;
// }
// else if ("float" == type) {
// return XML.Namespaces.XMLSCHEMA_FLOAT;
// }
// else if ("double" == type) {
// return XML.Namespaces.XMLSCHEMA_DOUBLE;
// }
// else if ("decimal" == type) {
// return XML.Namespaces.XMLSCHEMA_DECIMAL;
// }
// else if ("date" == type) {
// return XML.Namespaces.XMLSCHEMA_DATE;
// }
// else if ("time" == type) {
// return XML.Namespaces.XMLSCHEMA_TIME;
// }
// else if ("datetime" == type) {
// return XML.Namespaces.XMLSCHEMA_DATETIME;
// }
// else if ("boolean" == type) {
// return XML.Namespaces.XMLSCHEMA_BOOLEAN;
// }
// }
// };
// })(BI);
BI.BehaviorFactory = {
};BI.BehaviorFactory = {
createBehavior: function (key, options) {
var behavior;
switch (key) {
@ -20011,13 +19658,13 @@ BI.extend(BI.Func, {
param || (param = "text");
if (!BI.isKey(keyword)) {
return {
finded: BI.deepClone(items),
matched: isArray ? [] : {}
find: BI.deepClone(items),
match: isArray ? [] : {}
};
}
var t, text, py;
keyword = BI.toUpperCase(keyword);
var matched = isArray ? [] : {}, finded = isArray ? [] : {};
var matched = isArray ? [] : {}, find = isArray ? [] : {};
BI.each(items, function (i, item) {
item = BI.deepClone(item);
t = BI.stripEL(item);
@ -20030,19 +19677,19 @@ BI.extend(BI.Func, {
if (text === keyword) {
isArray ? matched.push(item) : (matched[i] = item);
} else {
isArray ? finded.push(item) : (finded[i] = item);
isArray ? find.push(item) : (find[i] = item);
}
} else if (pidx = py.indexOf(keyword), (pidx > -1 && Math.floor(pidx / text.length) === Math.floor((pidx + keyword.length - 1) / text.length))) {
if (text === keyword || keyword.length === text.length) {
isArray ? matched.push(item) : (matched[i] = item);
} else {
isArray ? finded.push(item) : (finded[i] = item);
isArray ? find.push(item) : (find[i] = item);
}
}
});
return {
matched: matched,
finded: finded
match: matched,
find: find
};
}
});
@ -30598,8 +30245,8 @@ BI.Searcher = BI.inherit(BI.Widget, {
if (o.isAutoSearch) {
var items = (o.adapter && ((o.adapter.getItems && o.adapter.getItems()) || o.adapter.attr("items"))) || [];
var finding = BI.Func.getSearchResult(items, keyword);
var matched = finding.matched, finded = finding.finded;
this.popupView.populate(finded, matched, keyword);
var match = finding.match, find = finding.find;
this.popupView.populate(find, match, keyword);
o.isAutoSync && o.adapter && o.adapter.getValue && this.popupView.setValue(o.adapter.getValue());
self.fireEvent(BI.Searcher.EVENT_SEARCHING);
return;
@ -46132,6 +45779,7 @@ BI.Label = BI.inherit(BI.Single, {
var json = this._createJson();
if (BI.isNumber(o.width) && o.width > 0) {
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
if (BI.isNumber(o.height) && o.height > 0) {
BI.createWidget({
type: "bi.adaptive",
@ -46151,7 +45799,6 @@ BI.Label = BI.inherit(BI.Single, {
this.element.css({"line-height": o.height + "px"});
return;
}
json.width = o.textWidth;
BI.createWidget({
type: "bi.vertical_adapt",
scrollable: o.whiteSpace === "normal",
@ -68125,6 +67772,8 @@ BI.IconTextValueCombo = BI.inherit(BI.Widget, {
return BI.extend(BI.IconTextValueCombo.superclass._defaultConfig.apply(this, arguments), {
baseClass: "bi-icon-text-value-combo",
height: 30,
iconHeight: null,
iconWidth: null,
value: ""
});
},
@ -68137,12 +67786,16 @@ BI.IconTextValueCombo = BI.inherit(BI.Widget, {
items: o.items,
height: o.height,
text: o.text,
value: o.value
value: o.value,
iconHeight: o.iconHeight,
iconWidth: o.iconWidth
});
this.popup = BI.createWidget({
type: "bi.icon_text_value_combo_popup",
items: o.items,
value: o.value
value: o.value,
iconHeight: o.iconHeight,
iconWidth: o.iconWidth
});
this.popup.on(BI.IconTextValueComboPopup.EVENT_CHANGE, function () {
self.setValue(self.popup.getValue());
@ -68200,7 +67853,9 @@ BI.IconTextValueComboPopup = BI.inherit(BI.Pane, {
type: "bi.button_group",
items: BI.createItems(o.items, {
type: "bi.single_select_icon_text_item",
height: 30
height: 30,
iconHeight: o.iconHeight,
iconWidth: o.iconWidth
}),
chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,
layouts: [{
@ -68403,8 +68058,8 @@ BI.SearchTextValueComboPopup = BI.inherit(BI.Pane, {
};
},
populate: function (finded, matched, keyword) {
var items = BI.concat(finded, matched);
populate: function (find, match, keyword) {
var items = BI.concat(find, match);
BI.SearchTextValueComboPopup.superclass.populate.apply(this, items);
items = BI.createItems(items, {
type: "bi.single_select_item",
@ -68462,8 +68117,8 @@ BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, {
onSearch: function (obj, callback) {
var keyword = obj.keyword;
var finding = BI.Func.getSearchResult(o.items, keyword);
var matched = finding.matched, finded = finding.finded;
callback(finded, matched);
var matched = finding.match, find = finding.find;
callback(find, matched);
},
listeners: [{
eventName: BI.Searcher.EVENT_CHANGE,
@ -76670,7 +76325,9 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, {
var conf = BI.IconTextTrigger.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-text-trigger",
height: 24
height: 24,
iconHeight: null,
iconWidth: null
});
},
@ -76702,6 +76359,8 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, {
ref: function (_ref) {
self.icon = _ref;
},
iconHeight: o.iconHeight,
iconWidth: o.iconWidth,
disableSelected: true
},
width: BI.isEmptyString(o.iconCls)? 0 : (o.triggerWidth || o.height)
@ -76749,7 +76408,9 @@ BI.SelectIconTextTrigger = BI.inherit(BI.Trigger, {
_defaultConfig: function () {
return BI.extend(BI.SelectIconTextTrigger.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-select-text-trigger bi-border",
height: 24
height: 24,
iconHeight: null,
iconWidth: null
});
},
@ -76763,7 +76424,9 @@ BI.SelectIconTextTrigger = BI.inherit(BI.Trigger, {
element: this,
text: obj.text,
iconCls: obj.iconCls,
height: o.height
height: o.height,
iconHeight: o.iconHeight,
iconWidth: o.iconWidth
});
},
@ -85447,7 +85110,7 @@ BI.MultiSelectSearchLoader = BI.inherit(BI.Widget, {
});
if (BI.isKey(keyword)) {
var search = BI.Func.getSearchResult(newValues, keyword);
values = search.matched.concat(search.finded);
values = search.matched.concat(search.find);
}
return BI.map(values, function (i, v) {
return {
@ -90702,7 +90365,7 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {
});
if (BI.isKey(keyword)) {
var search = BI.Func.getSearchResult(newValues, keyword);
values = search.matched.concat(search.finded);
values = search.match.concat(search.find);
}
return BI.map(values, function (i, v) {
return {
@ -92019,7 +91682,7 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {
});
if (BI.isKey(keyword)) {
var search = BI.Func.getSearchResult(newValues, keyword);
values = search.matched.concat(search.finded);
values = search.match.concat(search.find);
}
return BI.map(values, function (i, v) {
return {
@ -94912,7 +94575,7 @@ BI.AbstractAllValueChooser = BI.inherit(BI.Widget, {
}
BI.each(keywords, function (i, kw) {
var search = BI.Func.getSearchResult(items, kw);
items = search.matched.concat(search.finded);
items = search.match.concat(search.find);
});
if (options.selectedValues) {// 过滤
var filter = BI.makeObject(options.selectedValues, true);
@ -95199,8 +94862,8 @@ BI.shortcut("bi.all_value_chooser_pane", BI.AllValueChooserPane);BI.AbstractTree
self._deleteNode(selectedValues, p);
} else {
var searched = [];
var finded = search(parentValues, notSelectedValue, [], searched);
if (finded && BI.isNotEmptyArray(searched)) {
var find = search(parentValues, notSelectedValue, [], searched);
if (find && BI.isNotEmptyArray(searched)) {
BI.each(searched, function (i, arr) {
var node = self._getNode(selectedValues, arr);
if (node) {
@ -95219,17 +94882,17 @@ BI.shortcut("bi.all_value_chooser_pane", BI.AllValueChooserPane);BI.AbstractTree
// 例如选中了中国-江苏,取消南京
// important 选中了中国-江苏,取消了江苏,但是搜索的是南京
if (isChild(selectedValues, p)) {
var result = [], finded = false;
var result = [], find = false;
// 如果parentValues中有匹配的值,说明搜索结果不在当前值下
if (isSearchValueInParent(p)) {
finded = true;
find = true;
} else {
// 从当前值开始搜
finded = search(parentValues, notSelectedValue, result);
find = search(parentValues, notSelectedValue, result);
p = parentValues;
}
if (finded === true) {
if (find === true) {
// 去掉点击的节点之后的结果集
expandSelectedValue(selectedValues, p, notSelectedValue);
// 添加去掉搜索的结果集
@ -95678,13 +95341,13 @@ BI.shortcut("bi.all_value_chooser_pane", BI.AllValueChooserPane);BI.AbstractTree
_isMatch: function (parentValues, value, keyword) {
var node = this._getTreeNode(parentValues, value);
var finded = BI.Func.getSearchResult([node.text || node.value], keyword);
return finded.finded.length > 0 || finded.matched.length > 0;
var find = BI.Func.getSearchResult([node.text || node.value], keyword);
return find.find.length > 0 || find.match.length > 0;
},
_getTreeNode: function (parentValues, v) {
var self = this;
var findedParentNode;
var findParentNode;
var index = 0;
this.tree.traverse(function (node) {
if (self.tree.isRoot(node)) {
@ -95694,7 +95357,7 @@ BI.shortcut("bi.all_value_chooser_pane", BI.AllValueChooserPane);BI.AbstractTree
return false;
}
if (index === parentValues.length && node.value === v) {
findedParentNode = node;
findParentNode = node;
return false;
}
if (node.value === parentValues[index]) {
@ -95703,7 +95366,7 @@ BI.shortcut("bi.all_value_chooser_pane", BI.AllValueChooserPane);BI.AbstractTree
}
return true;
});
return findedParentNode;
return findParentNode;
},
_getChildren: function (parentValues) {
@ -95886,7 +95549,7 @@ BI.AbstractValueChooser = BI.inherit(BI.Widget, {
}
BI.each(keywords, function (i, kw) {
var search = BI.Func.getSearchResult(items, kw);
items = search.matched.concat(search.finded);
items = search.match.concat(search.find);
});
if (options.selectedValues) {// 过滤
var filter = BI.makeObject(options.selectedValues, true);

2
dist/bundle.min.css vendored

File diff suppressed because one or more lines are too long

81
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

36
dist/case.js vendored

@ -5493,6 +5493,8 @@ BI.IconTextValueCombo = BI.inherit(BI.Widget, {
return BI.extend(BI.IconTextValueCombo.superclass._defaultConfig.apply(this, arguments), {
baseClass: "bi-icon-text-value-combo",
height: 30,
iconHeight: null,
iconWidth: null,
value: ""
});
},
@ -5505,12 +5507,16 @@ BI.IconTextValueCombo = BI.inherit(BI.Widget, {
items: o.items,
height: o.height,
text: o.text,
value: o.value
value: o.value,
iconHeight: o.iconHeight,
iconWidth: o.iconWidth
});
this.popup = BI.createWidget({
type: "bi.icon_text_value_combo_popup",
items: o.items,
value: o.value
value: o.value,
iconHeight: o.iconHeight,
iconWidth: o.iconWidth
});
this.popup.on(BI.IconTextValueComboPopup.EVENT_CHANGE, function () {
self.setValue(self.popup.getValue());
@ -5568,7 +5574,9 @@ BI.IconTextValueComboPopup = BI.inherit(BI.Pane, {
type: "bi.button_group",
items: BI.createItems(o.items, {
type: "bi.single_select_icon_text_item",
height: 30
height: 30,
iconHeight: o.iconHeight,
iconWidth: o.iconWidth
}),
chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,
layouts: [{
@ -5771,8 +5779,8 @@ BI.SearchTextValueComboPopup = BI.inherit(BI.Pane, {
};
},
populate: function (finded, matched, keyword) {
var items = BI.concat(finded, matched);
populate: function (find, match, keyword) {
var items = BI.concat(find, match);
BI.SearchTextValueComboPopup.superclass.populate.apply(this, items);
items = BI.createItems(items, {
type: "bi.single_select_item",
@ -5830,8 +5838,8 @@ BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, {
onSearch: function (obj, callback) {
var keyword = obj.keyword;
var finding = BI.Func.getSearchResult(o.items, keyword);
var matched = finding.matched, finded = finding.finded;
callback(finded, matched);
var matched = finding.match, find = finding.find;
callback(find, matched);
},
listeners: [{
eventName: BI.Searcher.EVENT_CHANGE,
@ -14038,7 +14046,9 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, {
var conf = BI.IconTextTrigger.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-text-trigger",
height: 24
height: 24,
iconHeight: null,
iconWidth: null
});
},
@ -14070,6 +14080,8 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, {
ref: function (_ref) {
self.icon = _ref;
},
iconHeight: o.iconHeight,
iconWidth: o.iconWidth,
disableSelected: true
},
width: BI.isEmptyString(o.iconCls)? 0 : (o.triggerWidth || o.height)
@ -14117,7 +14129,9 @@ BI.SelectIconTextTrigger = BI.inherit(BI.Trigger, {
_defaultConfig: function () {
return BI.extend(BI.SelectIconTextTrigger.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-select-text-trigger bi-border",
height: 24
height: 24,
iconHeight: null,
iconWidth: null
});
},
@ -14131,7 +14145,9 @@ BI.SelectIconTextTrigger = BI.inherit(BI.Trigger, {
element: this,
text: obj.text,
iconCls: obj.iconCls,
height: o.height
height: o.height,
iconHeight: o.iconHeight,
iconWidth: o.iconWidth
});
},

369
dist/core.js vendored

@ -16171,360 +16171,7 @@ BI.Region.prototype = {
pos.push(this.y + this.h / 2);
return pos;
}
};// ;
// !(function (BI) {
//
// if (BI.isIE()) {
// XMLSerializer = null;
// DOMParser = null;
// }
//
//
// var XML = {
// Document: {
// NodeType: {
// ELEMENT: 1,
// ATTRIBUTE: 2,
// TEXT: 3,
// CDATA_SECTION: 4,
// ENTITY_REFERENCE: 5,
// ENTITY: 6,
// PROCESSING_INSTRUCTION: 7,
// COMMENT: 8,
// DOCUMENT: 9,
// DOCUMENT_TYPE: 10,
// DOCUMENT_FRAGMENT: 11,
// NOTATION: 12
// }
// }
// };
//
// XML.ResultType = {
// single: 'single',
// array: 'array'
// };
//
// XML.fromString = function (xmlStr) {
// try {
// var parser = new DOMParser();
// return parser.parseFromString(xmlStr, "text/xml");
// } catch (e) {
// var arrMSXML = ["MSXML2.DOMDocument.6.0", "MSXML2.DOMDocument.3.0"];
// for (var i = 0; i < arrMSXML.length; i++) {
// try {
// var xmlDoc = new ActiveXObject(arrMSXML[i]);
// xmlDoc.setProperty("SelectionLanguage", "XPath");
// xmlDoc.async = false;
// xmlDoc.loadXML(xmlStr);
// return xmlDoc;
// } catch (xmlError) {
// }
// }
// }
// };
//
// XML.toString = function (xmlNode) {
// if (!BI.isIE()) {
// var xmlSerializer = new XMLSerializer();
// return xmlSerializer.serializeToString(xmlNode);
// } else
// return xmlNode.xml;
// };
//
// XML.getNSResolver = function (str) {
// if (!str) {
// return null;
// }
// var list = str.split(' ');
// var namespaces = {};
// for (var i = 0; i < list.length; i++) {
// var pair = list[i].split('=');
// var fix = BI.trim(pair[0]).replace("xmlns:", "");
// namespaces[fix] = BI.trim(pair[1]).replace(/"/g, "").replace(/'/g, "");
// }
// return function (prefix) {
// return namespaces[prefix];
// };
// };
//
// XML.eval = function (context, xpathExp, resultType, namespaces) {
// if ((BI.isIE() && ('undefined' === typeof(context.selectSingleNode) || 'undefined' === typeof(context.selectNodes)))) {
// return XML.eval2(context, xpathExp, resultType, namespaces);
// } else {
// if (BI.isIE()) {
// namespaces = namespaces ? namespaces : "";
// var doc = (context.nodeType == XML.Document.NodeType.DOCUMENT) ? context : context.ownerDocument;
// doc.setProperty("SelectionNamespaces", namespaces);
// var result;
// if (resultType == this.ResultType.single) {
// result = context.selectSingleNode(xpathExp);
// } else {
// result = context.selectNodes(xpathExp) || [];
// }
// doc.setProperty("SelectionNamespaces", "");
// return result;
// } else {
// var node = context;
// var xmlDoc = (context.nodeName.indexOf("document") == -1) ? context.ownerDocument : context;
// var retType = (resultType == this.ResultType.single) ? XPathResult.FIRST_ORDERED_NODE_TYPE : XPathResult.ANY_TYPE;
// var col = xmlDoc.evaluate(xpathExp, node, XML.getNSResolver(namespaces), retType, null);
//
// if (retType == XPathResult.FIRST_ORDERED_NODE_TYPE) {
// return col.singleNodeValue;
// } else {
// var thisColMemb = col.iterateNext();
// var rowsCol = [];
// while (thisColMemb) {
// rowsCol[rowsCol.length] = thisColMemb;
// thisColMemb = col.iterateNext();
// }
// return rowsCol;
// }
// }
// }
// };
//
// XML.eval2 = function (context, xpathExp, resultType, namespaces) {
// if (resultType !== "single" && resultType !== undefined && resultType !== null) {
// throw new Error("justep.SimpleXML.eval only be resultType='single', not" + resultType);
// }
//
// if (context === null || context === undefined || xpathExp === null || xpathExp === undefined) {
// return context;
// }
//
// if (context.nodeType == XML.Document.NodeType.DOCUMENT) {
// context = context.documentElement;
// }
//
// var childs, i;
// if (xpathExp.indexOf("/") != -1) {
// var items = xpathExp.split("/");
// var isAbs = xpathExp.substring(0, 1) == "/";
// for (i = 0; i < items.length; i++) {
// var item = items[i];
// if (item === "") {
// continue;
// } else {
// var next = null;
// var ii = i + 1;
// for (; ii < items.length; ii++) {
// if (next === null) {
// next = items[ii];
// } else {
// next = next + "/" + items[ii];
// }
// }
//
// if (item == ".") {
// return this.eval(context, next, resultType);
//
// } else if (item == "..") {
// return this.eval2(context.parentNode, next, resultType);
//
// } else if (item == "*") {
// if (isAbs) {
// return this.eval2(context, next, resultType);
//
// } else {
// childs = context.childNodes;
// for (var j = 0; j < childs.length; j++) {
// var tmp = this.eval2(childs[j], next, resultType);
// if (tmp !== null) {
// return tmp;
// }
// }
// return null;
// }
//
// } else {
// if (isAbs) {
// if (context.nodeName == item) {
// return this.eval2(context, next, resultType);
// } else {
// return null;
// }
// } else {
// var child = this.getChildByName(context, item);
// if (child !== null) {
// return this.eval2(child, next, resultType);
// } else {
// return null;
// }
//
// }
// }
//
// }
// }
//
// return null;
//
// } else {
// if ("text()" == xpathExp) {
// childs = context.childNodes;
// for (i = 0; i < childs.length; i++) {
// if (childs[i].nodeType == XML.Document.NodeType.TEXT) {
// return childs[i];
// }
// }
// return null;
// } else {
// return this.getChildByName(context, xpathExp);
// }
// }
// };
//
// XML.getChildByName = function (context, name) {
// if (context === null || context === undefined || name === null || name === undefined) {
// return null;
// }
//
// if (context.nodeType == XML.Document.NodeType.DOCUMENT) {
// context = context.documentElement;
// }
//
// var childs = context.childNodes;
// for (var i = 0; i < childs.length; i++) {
// if (childs[i].nodeType == XML.Document.NodeType.ELEMENT && (childs[i].nodeName == name || name == "*")) {
// return childs[i];
// }
// }
//
// return null;
// };
//
// XML.appendChildren = function (context, xpathExp, nodes, isBefore) {
// nodes = (typeof nodes.length != "undefined") ? nodes : [nodes];
// var finded = this.eval(context, xpathExp);
// var count = finded.length;
// for (var i = 0; i < count; i++) {
// if (isBefore && finded[i].firstNode) {
// this._insertBefore(finded[i], nodes, finded[i].firstNode);
// } else {
// for (var j = 0; j < nodes.length; j++) {
// finded[i].appendChild(nodes[j]);
// }
// }
// }
// return count;
// };
//
// XML.removeNodes = function (context, xpathExp) {
// var nodes = this.eval(context, xpathExp);
// for (var i = 0; i < nodes.length; i++) {
// nodes[i].parentNode.removeChild(nodes[i]);
// }
// };
//
// XML._insertBefore = function (parent, newchildren, refchild) {
// for (var i = 0; i < newchildren.length; i++) {
// parent.insertBefore(newchildren[i], refchild);
// }
// };
//
// XML.insertNodes = function (context, xpathExp, nodes, isBefore) {
// nodes = (typeof nodes.length != "undefined") ? nodes : [nodes];
// var finded = this.eval(context, xpathExp);
// var count = finded.length;
// for (var i = 0; i < count; i++) {
// var refnode = (isBefore) ? finded[i] : finded[i].nextSibling;
// this._insertBefore(finded[i].parentNode, nodes, refnode);
// }
// return count;
// };
//
// XML.replaceNodes = function (context, xpathExp, nodes) {
// nodes = (typeof nodes.length != "undefined") ? nodes : [nodes];
// var finded = this.eval(context, xpathExp);
// var count = finded.length;
// for (var i = 0; i < count; i++) {
// var refnode = finded[i];
// var parent = refnode.parentNode;
// this._insertBefore(parent, nodes, refnode);
// parent.removeChild(refnode);
// }
// return count;
// };
//
// XML.setNodeText = function (context, xpathExp, text) {
// var finded = this.eval(context, xpathExp, this.ResultType.single);
// if (finded === null) {
// return;
// }
// if (finded.nodeType == XML.Document.NodeType.ELEMENT) {
// var textNode = this.eval(finded, "./text()", this.ResultType.single);
// if (!textNode) {
// textNode = finded.ownerDocument.createTextNode("");
// finded.appendChild(textNode);
// }
// textNode.nodeValue = text;
// } else {
// finded.nodeValue = text;
// }
// return;
// };
//
// XML.getNodeText = function (context, xpathExp, defaultValue) {
// var finded = xpathExp ? this.eval(context, xpathExp, this.ResultType.single) : context;
// if (finded && (finded.nodeType == XML.Document.NodeType.ELEMENT)) {
// finded = this.eval(finded, "./text()", this.ResultType.single);
// }
// return (finded && finded.nodeValue) ? "" + finded.nodeValue : (defaultValue !== undefined) ? defaultValue : null;
// };
//
// XML.Namespaces = {
// XMLSCHEMA: "http://www.w3.org/2001/XMLSchema#",
// XMLSCHEMA_STRING: "http://www.w3.org/2001/XMLSchema#String",
// XMLSCHEMA_LONG: "http://www.w3.org/2001/XMLSchema#Long",
// XMLSCHEMA_INTEGER: 'http://www.w3.org/2001/XMLSchema#Integer',
// XMLSCHEMA_FLOAT: 'http://www.w3.org/2001/XMLSchema#Float',
// XMLSCHEMA_DOUBLE: 'http://www.w3.org/2001/XMLSchema#Double',
// XMLSCHEMA_DECIMAL: 'http://www.w3.org/2001/XMLSchema#Decimal',
// XMLSCHEMA_DATE: 'http://www.w3.org/2001/XMLSchema#Date',
// XMLSCHEMA_TIME: 'http://www.w3.org/2001/XMLSchema#Time',
// XMLSCHEMA_DATETIME: 'http://www.w3.org/2001/XMLSchema#DateTime',
// XMLSCHEMA_BOOLEAN: 'http://www.w3.org/2001/XMLSchema#Boolean',
// XMLSCHEMA_SYMBOL: 'http://www.w3.org/2001/XMLSchema#Symbol',
// JUSTEPSCHEMA: "http://www.justep.com/xbiz#",
// RDF: "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
// JUSTEP: "http://www.justep.com/x5#",
// 'get': function (type) {
// type = type ? type.toLowerCase() : "string";
// if ("string" == type) {
// return XML.Namespaces.XMLSCHEMA_STRING;
// }
// else if ("integer" == type) {
// return XML.Namespaces.XMLSCHEMA_INTEGER;
// }
// else if ("long" == type) {
// return XML.Namespaces.XMLSCHEMA_LONG;
// }
// else if ("float" == type) {
// return XML.Namespaces.XMLSCHEMA_FLOAT;
// }
// else if ("double" == type) {
// return XML.Namespaces.XMLSCHEMA_DOUBLE;
// }
// else if ("decimal" == type) {
// return XML.Namespaces.XMLSCHEMA_DECIMAL;
// }
// else if ("date" == type) {
// return XML.Namespaces.XMLSCHEMA_DATE;
// }
// else if ("time" == type) {
// return XML.Namespaces.XMLSCHEMA_TIME;
// }
// else if ("datetime" == type) {
// return XML.Namespaces.XMLSCHEMA_DATETIME;
// }
// else if ("boolean" == type) {
// return XML.Namespaces.XMLSCHEMA_BOOLEAN;
// }
// }
// };
// })(BI);
BI.BehaviorFactory = {
};BI.BehaviorFactory = {
createBehavior: function (key, options) {
var behavior;
switch (key) {
@ -20011,13 +19658,13 @@ BI.extend(BI.Func, {
param || (param = "text");
if (!BI.isKey(keyword)) {
return {
finded: BI.deepClone(items),
matched: isArray ? [] : {}
find: BI.deepClone(items),
match: isArray ? [] : {}
};
}
var t, text, py;
keyword = BI.toUpperCase(keyword);
var matched = isArray ? [] : {}, finded = isArray ? [] : {};
var matched = isArray ? [] : {}, find = isArray ? [] : {};
BI.each(items, function (i, item) {
item = BI.deepClone(item);
t = BI.stripEL(item);
@ -20030,19 +19677,19 @@ BI.extend(BI.Func, {
if (text === keyword) {
isArray ? matched.push(item) : (matched[i] = item);
} else {
isArray ? finded.push(item) : (finded[i] = item);
isArray ? find.push(item) : (find[i] = item);
}
} else if (pidx = py.indexOf(keyword), (pidx > -1 && Math.floor(pidx / text.length) === Math.floor((pidx + keyword.length - 1) / text.length))) {
if (text === keyword || keyword.length === text.length) {
isArray ? matched.push(item) : (matched[i] = item);
} else {
isArray ? finded.push(item) : (finded[i] = item);
isArray ? find.push(item) : (find[i] = item);
}
}
});
return {
matched: matched,
finded: finded
match: matched,
find: find
};
}
});

4
dist/demo.js vendored

@ -12333,7 +12333,7 @@ Demo.MultiSelectCombo = BI.inherit(BI.Widget, {
}
BI.each(keywords, function (i, kw) {
var search = BI.Func.getSearchResult(items, kw);
items = search.matched.concat(search.finded);
items = search.match.concat(search.find);
});
if (options.selectedValues) {// 过滤
var filter = BI.makeObject(options.selectedValues, true);
@ -12674,7 +12674,7 @@ Demo.SingleSelectCombo = BI.inherit(BI.Widget, {
}
BI.each(keywords, function (i, kw) {
var search = BI.Func.getSearchResult(items, kw);
items = search.matched.concat(search.finded);
items = search.match.concat(search.find);
});
if (options.selectedValues) {// 过滤
var filter = BI.makeObject(options.selectedValues, true);

443
dist/fineui.js vendored

@ -16372,360 +16372,7 @@ BI.Region.prototype = {
pos.push(this.y + this.h / 2);
return pos;
}
};// ;
// !(function (BI) {
//
// if (BI.isIE()) {
// XMLSerializer = null;
// DOMParser = null;
// }
//
//
// var XML = {
// Document: {
// NodeType: {
// ELEMENT: 1,
// ATTRIBUTE: 2,
// TEXT: 3,
// CDATA_SECTION: 4,
// ENTITY_REFERENCE: 5,
// ENTITY: 6,
// PROCESSING_INSTRUCTION: 7,
// COMMENT: 8,
// DOCUMENT: 9,
// DOCUMENT_TYPE: 10,
// DOCUMENT_FRAGMENT: 11,
// NOTATION: 12
// }
// }
// };
//
// XML.ResultType = {
// single: 'single',
// array: 'array'
// };
//
// XML.fromString = function (xmlStr) {
// try {
// var parser = new DOMParser();
// return parser.parseFromString(xmlStr, "text/xml");
// } catch (e) {
// var arrMSXML = ["MSXML2.DOMDocument.6.0", "MSXML2.DOMDocument.3.0"];
// for (var i = 0; i < arrMSXML.length; i++) {
// try {
// var xmlDoc = new ActiveXObject(arrMSXML[i]);
// xmlDoc.setProperty("SelectionLanguage", "XPath");
// xmlDoc.async = false;
// xmlDoc.loadXML(xmlStr);
// return xmlDoc;
// } catch (xmlError) {
// }
// }
// }
// };
//
// XML.toString = function (xmlNode) {
// if (!BI.isIE()) {
// var xmlSerializer = new XMLSerializer();
// return xmlSerializer.serializeToString(xmlNode);
// } else
// return xmlNode.xml;
// };
//
// XML.getNSResolver = function (str) {
// if (!str) {
// return null;
// }
// var list = str.split(' ');
// var namespaces = {};
// for (var i = 0; i < list.length; i++) {
// var pair = list[i].split('=');
// var fix = BI.trim(pair[0]).replace("xmlns:", "");
// namespaces[fix] = BI.trim(pair[1]).replace(/"/g, "").replace(/'/g, "");
// }
// return function (prefix) {
// return namespaces[prefix];
// };
// };
//
// XML.eval = function (context, xpathExp, resultType, namespaces) {
// if ((BI.isIE() && ('undefined' === typeof(context.selectSingleNode) || 'undefined' === typeof(context.selectNodes)))) {
// return XML.eval2(context, xpathExp, resultType, namespaces);
// } else {
// if (BI.isIE()) {
// namespaces = namespaces ? namespaces : "";
// var doc = (context.nodeType == XML.Document.NodeType.DOCUMENT) ? context : context.ownerDocument;
// doc.setProperty("SelectionNamespaces", namespaces);
// var result;
// if (resultType == this.ResultType.single) {
// result = context.selectSingleNode(xpathExp);
// } else {
// result = context.selectNodes(xpathExp) || [];
// }
// doc.setProperty("SelectionNamespaces", "");
// return result;
// } else {
// var node = context;
// var xmlDoc = (context.nodeName.indexOf("document") == -1) ? context.ownerDocument : context;
// var retType = (resultType == this.ResultType.single) ? XPathResult.FIRST_ORDERED_NODE_TYPE : XPathResult.ANY_TYPE;
// var col = xmlDoc.evaluate(xpathExp, node, XML.getNSResolver(namespaces), retType, null);
//
// if (retType == XPathResult.FIRST_ORDERED_NODE_TYPE) {
// return col.singleNodeValue;
// } else {
// var thisColMemb = col.iterateNext();
// var rowsCol = [];
// while (thisColMemb) {
// rowsCol[rowsCol.length] = thisColMemb;
// thisColMemb = col.iterateNext();
// }
// return rowsCol;
// }
// }
// }
// };
//
// XML.eval2 = function (context, xpathExp, resultType, namespaces) {
// if (resultType !== "single" && resultType !== undefined && resultType !== null) {
// throw new Error("justep.SimpleXML.eval only be resultType='single', not" + resultType);
// }
//
// if (context === null || context === undefined || xpathExp === null || xpathExp === undefined) {
// return context;
// }
//
// if (context.nodeType == XML.Document.NodeType.DOCUMENT) {
// context = context.documentElement;
// }
//
// var childs, i;
// if (xpathExp.indexOf("/") != -1) {
// var items = xpathExp.split("/");
// var isAbs = xpathExp.substring(0, 1) == "/";
// for (i = 0; i < items.length; i++) {
// var item = items[i];
// if (item === "") {
// continue;
// } else {
// var next = null;
// var ii = i + 1;
// for (; ii < items.length; ii++) {
// if (next === null) {
// next = items[ii];
// } else {
// next = next + "/" + items[ii];
// }
// }
//
// if (item == ".") {
// return this.eval(context, next, resultType);
//
// } else if (item == "..") {
// return this.eval2(context.parentNode, next, resultType);
//
// } else if (item == "*") {
// if (isAbs) {
// return this.eval2(context, next, resultType);
//
// } else {
// childs = context.childNodes;
// for (var j = 0; j < childs.length; j++) {
// var tmp = this.eval2(childs[j], next, resultType);
// if (tmp !== null) {
// return tmp;
// }
// }
// return null;
// }
//
// } else {
// if (isAbs) {
// if (context.nodeName == item) {
// return this.eval2(context, next, resultType);
// } else {
// return null;
// }
// } else {
// var child = this.getChildByName(context, item);
// if (child !== null) {
// return this.eval2(child, next, resultType);
// } else {
// return null;
// }
//
// }
// }
//
// }
// }
//
// return null;
//
// } else {
// if ("text()" == xpathExp) {
// childs = context.childNodes;
// for (i = 0; i < childs.length; i++) {
// if (childs[i].nodeType == XML.Document.NodeType.TEXT) {
// return childs[i];
// }
// }
// return null;
// } else {
// return this.getChildByName(context, xpathExp);
// }
// }
// };
//
// XML.getChildByName = function (context, name) {
// if (context === null || context === undefined || name === null || name === undefined) {
// return null;
// }
//
// if (context.nodeType == XML.Document.NodeType.DOCUMENT) {
// context = context.documentElement;
// }
//
// var childs = context.childNodes;
// for (var i = 0; i < childs.length; i++) {
// if (childs[i].nodeType == XML.Document.NodeType.ELEMENT && (childs[i].nodeName == name || name == "*")) {
// return childs[i];
// }
// }
//
// return null;
// };
//
// XML.appendChildren = function (context, xpathExp, nodes, isBefore) {
// nodes = (typeof nodes.length != "undefined") ? nodes : [nodes];
// var finded = this.eval(context, xpathExp);
// var count = finded.length;
// for (var i = 0; i < count; i++) {
// if (isBefore && finded[i].firstNode) {
// this._insertBefore(finded[i], nodes, finded[i].firstNode);
// } else {
// for (var j = 0; j < nodes.length; j++) {
// finded[i].appendChild(nodes[j]);
// }
// }
// }
// return count;
// };
//
// XML.removeNodes = function (context, xpathExp) {
// var nodes = this.eval(context, xpathExp);
// for (var i = 0; i < nodes.length; i++) {
// nodes[i].parentNode.removeChild(nodes[i]);
// }
// };
//
// XML._insertBefore = function (parent, newchildren, refchild) {
// for (var i = 0; i < newchildren.length; i++) {
// parent.insertBefore(newchildren[i], refchild);
// }
// };
//
// XML.insertNodes = function (context, xpathExp, nodes, isBefore) {
// nodes = (typeof nodes.length != "undefined") ? nodes : [nodes];
// var finded = this.eval(context, xpathExp);
// var count = finded.length;
// for (var i = 0; i < count; i++) {
// var refnode = (isBefore) ? finded[i] : finded[i].nextSibling;
// this._insertBefore(finded[i].parentNode, nodes, refnode);
// }
// return count;
// };
//
// XML.replaceNodes = function (context, xpathExp, nodes) {
// nodes = (typeof nodes.length != "undefined") ? nodes : [nodes];
// var finded = this.eval(context, xpathExp);
// var count = finded.length;
// for (var i = 0; i < count; i++) {
// var refnode = finded[i];
// var parent = refnode.parentNode;
// this._insertBefore(parent, nodes, refnode);
// parent.removeChild(refnode);
// }
// return count;
// };
//
// XML.setNodeText = function (context, xpathExp, text) {
// var finded = this.eval(context, xpathExp, this.ResultType.single);
// if (finded === null) {
// return;
// }
// if (finded.nodeType == XML.Document.NodeType.ELEMENT) {
// var textNode = this.eval(finded, "./text()", this.ResultType.single);
// if (!textNode) {
// textNode = finded.ownerDocument.createTextNode("");
// finded.appendChild(textNode);
// }
// textNode.nodeValue = text;
// } else {
// finded.nodeValue = text;
// }
// return;
// };
//
// XML.getNodeText = function (context, xpathExp, defaultValue) {
// var finded = xpathExp ? this.eval(context, xpathExp, this.ResultType.single) : context;
// if (finded && (finded.nodeType == XML.Document.NodeType.ELEMENT)) {
// finded = this.eval(finded, "./text()", this.ResultType.single);
// }
// return (finded && finded.nodeValue) ? "" + finded.nodeValue : (defaultValue !== undefined) ? defaultValue : null;
// };
//
// XML.Namespaces = {
// XMLSCHEMA: "http://www.w3.org/2001/XMLSchema#",
// XMLSCHEMA_STRING: "http://www.w3.org/2001/XMLSchema#String",
// XMLSCHEMA_LONG: "http://www.w3.org/2001/XMLSchema#Long",
// XMLSCHEMA_INTEGER: 'http://www.w3.org/2001/XMLSchema#Integer',
// XMLSCHEMA_FLOAT: 'http://www.w3.org/2001/XMLSchema#Float',
// XMLSCHEMA_DOUBLE: 'http://www.w3.org/2001/XMLSchema#Double',
// XMLSCHEMA_DECIMAL: 'http://www.w3.org/2001/XMLSchema#Decimal',
// XMLSCHEMA_DATE: 'http://www.w3.org/2001/XMLSchema#Date',
// XMLSCHEMA_TIME: 'http://www.w3.org/2001/XMLSchema#Time',
// XMLSCHEMA_DATETIME: 'http://www.w3.org/2001/XMLSchema#DateTime',
// XMLSCHEMA_BOOLEAN: 'http://www.w3.org/2001/XMLSchema#Boolean',
// XMLSCHEMA_SYMBOL: 'http://www.w3.org/2001/XMLSchema#Symbol',
// JUSTEPSCHEMA: "http://www.justep.com/xbiz#",
// RDF: "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
// JUSTEP: "http://www.justep.com/x5#",
// 'get': function (type) {
// type = type ? type.toLowerCase() : "string";
// if ("string" == type) {
// return XML.Namespaces.XMLSCHEMA_STRING;
// }
// else if ("integer" == type) {
// return XML.Namespaces.XMLSCHEMA_INTEGER;
// }
// else if ("long" == type) {
// return XML.Namespaces.XMLSCHEMA_LONG;
// }
// else if ("float" == type) {
// return XML.Namespaces.XMLSCHEMA_FLOAT;
// }
// else if ("double" == type) {
// return XML.Namespaces.XMLSCHEMA_DOUBLE;
// }
// else if ("decimal" == type) {
// return XML.Namespaces.XMLSCHEMA_DECIMAL;
// }
// else if ("date" == type) {
// return XML.Namespaces.XMLSCHEMA_DATE;
// }
// else if ("time" == type) {
// return XML.Namespaces.XMLSCHEMA_TIME;
// }
// else if ("datetime" == type) {
// return XML.Namespaces.XMLSCHEMA_DATETIME;
// }
// else if ("boolean" == type) {
// return XML.Namespaces.XMLSCHEMA_BOOLEAN;
// }
// }
// };
// })(BI);
BI.BehaviorFactory = {
};BI.BehaviorFactory = {
createBehavior: function (key, options) {
var behavior;
switch (key) {
@ -20212,13 +19859,13 @@ BI.extend(BI.Func, {
param || (param = "text");
if (!BI.isKey(keyword)) {
return {
finded: BI.deepClone(items),
matched: isArray ? [] : {}
find: BI.deepClone(items),
match: isArray ? [] : {}
};
}
var t, text, py;
keyword = BI.toUpperCase(keyword);
var matched = isArray ? [] : {}, finded = isArray ? [] : {};
var matched = isArray ? [] : {}, find = isArray ? [] : {};
BI.each(items, function (i, item) {
item = BI.deepClone(item);
t = BI.stripEL(item);
@ -20231,19 +19878,19 @@ BI.extend(BI.Func, {
if (text === keyword) {
isArray ? matched.push(item) : (matched[i] = item);
} else {
isArray ? finded.push(item) : (finded[i] = item);
isArray ? find.push(item) : (find[i] = item);
}
} else if (pidx = py.indexOf(keyword), (pidx > -1 && Math.floor(pidx / text.length) === Math.floor((pidx + keyword.length - 1) / text.length))) {
if (text === keyword || keyword.length === text.length) {
isArray ? matched.push(item) : (matched[i] = item);
} else {
isArray ? finded.push(item) : (finded[i] = item);
isArray ? find.push(item) : (find[i] = item);
}
}
});
return {
matched: matched,
finded: finded
match: matched,
find: find
};
}
});
@ -32362,8 +32009,8 @@ BI.Searcher = BI.inherit(BI.Widget, {
if (o.isAutoSearch) {
var items = (o.adapter && ((o.adapter.getItems && o.adapter.getItems()) || o.adapter.attr("items"))) || [];
var finding = BI.Func.getSearchResult(items, keyword);
var matched = finding.matched, finded = finding.finded;
this.popupView.populate(finded, matched, keyword);
var match = finding.match, find = finding.find;
this.popupView.populate(find, match, keyword);
o.isAutoSync && o.adapter && o.adapter.getValue && this.popupView.setValue(o.adapter.getValue());
self.fireEvent(BI.Searcher.EVENT_SEARCHING);
return;
@ -47896,6 +47543,7 @@ BI.Label = BI.inherit(BI.Single, {
var json = this._createJson();
if (BI.isNumber(o.width) && o.width > 0) {
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
if (BI.isNumber(o.height) && o.height > 0) {
BI.createWidget({
type: "bi.adaptive",
@ -47915,7 +47563,6 @@ BI.Label = BI.inherit(BI.Single, {
this.element.css({"line-height": o.height + "px"});
return;
}
json.width = o.textWidth;
BI.createWidget({
type: "bi.vertical_adapt",
scrollable: o.whiteSpace === "normal",
@ -69889,6 +69536,8 @@ BI.IconTextValueCombo = BI.inherit(BI.Widget, {
return BI.extend(BI.IconTextValueCombo.superclass._defaultConfig.apply(this, arguments), {
baseClass: "bi-icon-text-value-combo",
height: 30,
iconHeight: null,
iconWidth: null,
value: ""
});
},
@ -69901,12 +69550,16 @@ BI.IconTextValueCombo = BI.inherit(BI.Widget, {
items: o.items,
height: o.height,
text: o.text,
value: o.value
value: o.value,
iconHeight: o.iconHeight,
iconWidth: o.iconWidth
});
this.popup = BI.createWidget({
type: "bi.icon_text_value_combo_popup",
items: o.items,
value: o.value
value: o.value,
iconHeight: o.iconHeight,
iconWidth: o.iconWidth
});
this.popup.on(BI.IconTextValueComboPopup.EVENT_CHANGE, function () {
self.setValue(self.popup.getValue());
@ -69964,7 +69617,9 @@ BI.IconTextValueComboPopup = BI.inherit(BI.Pane, {
type: "bi.button_group",
items: BI.createItems(o.items, {
type: "bi.single_select_icon_text_item",
height: 30
height: 30,
iconHeight: o.iconHeight,
iconWidth: o.iconWidth
}),
chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,
layouts: [{
@ -70167,8 +69822,8 @@ BI.SearchTextValueComboPopup = BI.inherit(BI.Pane, {
};
},
populate: function (finded, matched, keyword) {
var items = BI.concat(finded, matched);
populate: function (find, match, keyword) {
var items = BI.concat(find, match);
BI.SearchTextValueComboPopup.superclass.populate.apply(this, items);
items = BI.createItems(items, {
type: "bi.single_select_item",
@ -70226,8 +69881,8 @@ BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, {
onSearch: function (obj, callback) {
var keyword = obj.keyword;
var finding = BI.Func.getSearchResult(o.items, keyword);
var matched = finding.matched, finded = finding.finded;
callback(finded, matched);
var matched = finding.match, find = finding.find;
callback(find, matched);
},
listeners: [{
eventName: BI.Searcher.EVENT_CHANGE,
@ -78434,7 +78089,9 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, {
var conf = BI.IconTextTrigger.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-text-trigger",
height: 24
height: 24,
iconHeight: null,
iconWidth: null
});
},
@ -78466,6 +78123,8 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, {
ref: function (_ref) {
self.icon = _ref;
},
iconHeight: o.iconHeight,
iconWidth: o.iconWidth,
disableSelected: true
},
width: BI.isEmptyString(o.iconCls)? 0 : (o.triggerWidth || o.height)
@ -78513,7 +78172,9 @@ BI.SelectIconTextTrigger = BI.inherit(BI.Trigger, {
_defaultConfig: function () {
return BI.extend(BI.SelectIconTextTrigger.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-select-text-trigger bi-border",
height: 24
height: 24,
iconHeight: null,
iconWidth: null
});
},
@ -78527,7 +78188,9 @@ BI.SelectIconTextTrigger = BI.inherit(BI.Trigger, {
element: this,
text: obj.text,
iconCls: obj.iconCls,
height: o.height
height: o.height,
iconHeight: o.iconHeight,
iconWidth: o.iconWidth
});
},
@ -87211,7 +86874,7 @@ BI.MultiSelectSearchLoader = BI.inherit(BI.Widget, {
});
if (BI.isKey(keyword)) {
var search = BI.Func.getSearchResult(newValues, keyword);
values = search.matched.concat(search.finded);
values = search.matched.concat(search.find);
}
return BI.map(values, function (i, v) {
return {
@ -92466,7 +92129,7 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {
});
if (BI.isKey(keyword)) {
var search = BI.Func.getSearchResult(newValues, keyword);
values = search.matched.concat(search.finded);
values = search.match.concat(search.find);
}
return BI.map(values, function (i, v) {
return {
@ -93783,7 +93446,7 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {
});
if (BI.isKey(keyword)) {
var search = BI.Func.getSearchResult(newValues, keyword);
values = search.matched.concat(search.finded);
values = search.match.concat(search.find);
}
return BI.map(values, function (i, v) {
return {
@ -96676,7 +96339,7 @@ BI.AbstractAllValueChooser = BI.inherit(BI.Widget, {
}
BI.each(keywords, function (i, kw) {
var search = BI.Func.getSearchResult(items, kw);
items = search.matched.concat(search.finded);
items = search.match.concat(search.find);
});
if (options.selectedValues) {// 过滤
var filter = BI.makeObject(options.selectedValues, true);
@ -96963,8 +96626,8 @@ BI.shortcut("bi.all_value_chooser_pane", BI.AllValueChooserPane);BI.AbstractTree
self._deleteNode(selectedValues, p);
} else {
var searched = [];
var finded = search(parentValues, notSelectedValue, [], searched);
if (finded && BI.isNotEmptyArray(searched)) {
var find = search(parentValues, notSelectedValue, [], searched);
if (find && BI.isNotEmptyArray(searched)) {
BI.each(searched, function (i, arr) {
var node = self._getNode(selectedValues, arr);
if (node) {
@ -96983,17 +96646,17 @@ BI.shortcut("bi.all_value_chooser_pane", BI.AllValueChooserPane);BI.AbstractTree
// 例如选中了中国-江苏,取消南京
// important 选中了中国-江苏,取消了江苏,但是搜索的是南京
if (isChild(selectedValues, p)) {
var result = [], finded = false;
var result = [], find = false;
// 如果parentValues中有匹配的值,说明搜索结果不在当前值下
if (isSearchValueInParent(p)) {
finded = true;
find = true;
} else {
// 从当前值开始搜
finded = search(parentValues, notSelectedValue, result);
find = search(parentValues, notSelectedValue, result);
p = parentValues;
}
if (finded === true) {
if (find === true) {
// 去掉点击的节点之后的结果集
expandSelectedValue(selectedValues, p, notSelectedValue);
// 添加去掉搜索的结果集
@ -97442,13 +97105,13 @@ BI.shortcut("bi.all_value_chooser_pane", BI.AllValueChooserPane);BI.AbstractTree
_isMatch: function (parentValues, value, keyword) {
var node = this._getTreeNode(parentValues, value);
var finded = BI.Func.getSearchResult([node.text || node.value], keyword);
return finded.finded.length > 0 || finded.matched.length > 0;
var find = BI.Func.getSearchResult([node.text || node.value], keyword);
return find.find.length > 0 || find.match.length > 0;
},
_getTreeNode: function (parentValues, v) {
var self = this;
var findedParentNode;
var findParentNode;
var index = 0;
this.tree.traverse(function (node) {
if (self.tree.isRoot(node)) {
@ -97458,7 +97121,7 @@ BI.shortcut("bi.all_value_chooser_pane", BI.AllValueChooserPane);BI.AbstractTree
return false;
}
if (index === parentValues.length && node.value === v) {
findedParentNode = node;
findParentNode = node;
return false;
}
if (node.value === parentValues[index]) {
@ -97467,7 +97130,7 @@ BI.shortcut("bi.all_value_chooser_pane", BI.AllValueChooserPane);BI.AbstractTree
}
return true;
});
return findedParentNode;
return findParentNode;
},
_getChildren: function (parentValues) {
@ -97650,7 +97313,7 @@ BI.AbstractValueChooser = BI.inherit(BI.Widget, {
}
BI.each(keywords, function (i, kw) {
var search = BI.Func.getSearchResult(items, kw);
items = search.matched.concat(search.finded);
items = search.match.concat(search.find);
});
if (options.selectedValues) {// 过滤
var filter = BI.makeObject(options.selectedValues, true);

2
dist/fineui.min.css vendored

File diff suppressed because one or more lines are too long

80
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

32
dist/widget.js vendored

@ -8411,7 +8411,7 @@ BI.MultiSelectSearchLoader = BI.inherit(BI.Widget, {
});
if (BI.isKey(keyword)) {
var search = BI.Func.getSearchResult(newValues, keyword);
values = search.matched.concat(search.finded);
values = search.matched.concat(search.find);
}
return BI.map(values, function (i, v) {
return {
@ -13666,7 +13666,7 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {
});
if (BI.isKey(keyword)) {
var search = BI.Func.getSearchResult(newValues, keyword);
values = search.matched.concat(search.finded);
values = search.match.concat(search.find);
}
return BI.map(values, function (i, v) {
return {
@ -14983,7 +14983,7 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {
});
if (BI.isKey(keyword)) {
var search = BI.Func.getSearchResult(newValues, keyword);
values = search.matched.concat(search.finded);
values = search.match.concat(search.find);
}
return BI.map(values, function (i, v) {
return {
@ -17876,7 +17876,7 @@ BI.AbstractAllValueChooser = BI.inherit(BI.Widget, {
}
BI.each(keywords, function (i, kw) {
var search = BI.Func.getSearchResult(items, kw);
items = search.matched.concat(search.finded);
items = search.match.concat(search.find);
});
if (options.selectedValues) {// 过滤
var filter = BI.makeObject(options.selectedValues, true);
@ -18163,8 +18163,8 @@ BI.shortcut("bi.all_value_chooser_pane", BI.AllValueChooserPane);BI.AbstractTree
self._deleteNode(selectedValues, p);
} else {
var searched = [];
var finded = search(parentValues, notSelectedValue, [], searched);
if (finded && BI.isNotEmptyArray(searched)) {
var find = search(parentValues, notSelectedValue, [], searched);
if (find && BI.isNotEmptyArray(searched)) {
BI.each(searched, function (i, arr) {
var node = self._getNode(selectedValues, arr);
if (node) {
@ -18183,17 +18183,17 @@ BI.shortcut("bi.all_value_chooser_pane", BI.AllValueChooserPane);BI.AbstractTree
// 例如选中了中国-江苏,取消南京
// important 选中了中国-江苏,取消了江苏,但是搜索的是南京
if (isChild(selectedValues, p)) {
var result = [], finded = false;
var result = [], find = false;
// 如果parentValues中有匹配的值,说明搜索结果不在当前值下
if (isSearchValueInParent(p)) {
finded = true;
find = true;
} else {
// 从当前值开始搜
finded = search(parentValues, notSelectedValue, result);
find = search(parentValues, notSelectedValue, result);
p = parentValues;
}
if (finded === true) {
if (find === true) {
// 去掉点击的节点之后的结果集
expandSelectedValue(selectedValues, p, notSelectedValue);
// 添加去掉搜索的结果集
@ -18642,13 +18642,13 @@ BI.shortcut("bi.all_value_chooser_pane", BI.AllValueChooserPane);BI.AbstractTree
_isMatch: function (parentValues, value, keyword) {
var node = this._getTreeNode(parentValues, value);
var finded = BI.Func.getSearchResult([node.text || node.value], keyword);
return finded.finded.length > 0 || finded.matched.length > 0;
var find = BI.Func.getSearchResult([node.text || node.value], keyword);
return find.find.length > 0 || find.match.length > 0;
},
_getTreeNode: function (parentValues, v) {
var self = this;
var findedParentNode;
var findParentNode;
var index = 0;
this.tree.traverse(function (node) {
if (self.tree.isRoot(node)) {
@ -18658,7 +18658,7 @@ BI.shortcut("bi.all_value_chooser_pane", BI.AllValueChooserPane);BI.AbstractTree
return false;
}
if (index === parentValues.length && node.value === v) {
findedParentNode = node;
findParentNode = node;
return false;
}
if (node.value === parentValues[index]) {
@ -18667,7 +18667,7 @@ BI.shortcut("bi.all_value_chooser_pane", BI.AllValueChooserPane);BI.AbstractTree
}
return true;
});
return findedParentNode;
return findParentNode;
},
_getChildren: function (parentValues) {
@ -18850,7 +18850,7 @@ BI.AbstractValueChooser = BI.inherit(BI.Widget, {
}
BI.each(keywords, function (i, kw) {
var search = BI.Func.getSearchResult(items, kw);
items = search.matched.concat(search.finded);
items = search.match.concat(search.find);
});
if (options.selectedValues) {// 过滤
var filter = BI.makeObject(options.selectedValues, true);

4
src/base/combination/searcher.js

@ -168,8 +168,8 @@ BI.Searcher = BI.inherit(BI.Widget, {
if (o.isAutoSearch) {
var items = (o.adapter && ((o.adapter.getItems && o.adapter.getItems()) || o.adapter.attr("items"))) || [];
var finding = BI.Func.getSearchResult(items, keyword);
var matched = finding.matched, finded = finding.finded;
this.popupView.populate(finded, matched, keyword);
var match = finding.match, find = finding.find;
this.popupView.populate(find, match, keyword);
o.isAutoSync && o.adapter && o.adapter.getValue && this.popupView.setValue(o.adapter.getValue());
self.fireEvent(BI.Searcher.EVENT_SEARCHING);
return;

2
src/base/single/label/label.js

@ -234,6 +234,7 @@ BI.Label = BI.inherit(BI.Single, {
var json = this._createJson();
if (BI.isNumber(o.width) && o.width > 0) {
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
if (BI.isNumber(o.height) && o.height > 0) {
BI.createWidget({
type: "bi.adaptive",
@ -253,7 +254,6 @@ BI.Label = BI.inherit(BI.Single, {
this.element.css({"line-height": o.height + "px"});
return;
}
json.width = o.textWidth;
BI.createWidget({
type: "bi.vertical_adapt",
scrollable: o.whiteSpace === "normal",

10
src/case/combo/icontextvaluecombo/combo.icontextvalue.js

@ -7,6 +7,8 @@ BI.IconTextValueCombo = BI.inherit(BI.Widget, {
return BI.extend(BI.IconTextValueCombo.superclass._defaultConfig.apply(this, arguments), {
baseClass: "bi-icon-text-value-combo",
height: 30,
iconHeight: null,
iconWidth: null,
value: ""
});
},
@ -19,12 +21,16 @@ BI.IconTextValueCombo = BI.inherit(BI.Widget, {
items: o.items,
height: o.height,
text: o.text,
value: o.value
value: o.value,
iconHeight: o.iconHeight,
iconWidth: o.iconWidth
});
this.popup = BI.createWidget({
type: "bi.icon_text_value_combo_popup",
items: o.items,
value: o.value
value: o.value,
iconHeight: o.iconHeight,
iconWidth: o.iconWidth
});
this.popup.on(BI.IconTextValueComboPopup.EVENT_CHANGE, function () {
self.setValue(self.popup.getValue());

4
src/case/combo/icontextvaluecombo/popup.icontextvalue.js

@ -15,7 +15,9 @@ BI.IconTextValueComboPopup = BI.inherit(BI.Pane, {
type: "bi.button_group",
items: BI.createItems(o.items, {
type: "bi.single_select_icon_text_item",
height: 30
height: 30,
iconHeight: o.iconHeight,
iconWidth: o.iconWidth
}),
chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,
layouts: [{

4
src/case/combo/searchtextvaluecombo/popup.searchtextvalue.js

@ -44,8 +44,8 @@ BI.SearchTextValueComboPopup = BI.inherit(BI.Pane, {
};
},
populate: function (finded, matched, keyword) {
var items = BI.concat(finded, matched);
populate: function (find, match, keyword) {
var items = BI.concat(find, match);
BI.SearchTextValueComboPopup.superclass.populate.apply(this, items);
items = BI.createItems(items, {
type: "bi.single_select_item",

4
src/case/combo/searchtextvaluecombo/trigger.searchtextvalue.js

@ -37,8 +37,8 @@ BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, {
onSearch: function (obj, callback) {
var keyword = obj.keyword;
var finding = BI.Func.getSearchResult(o.items, keyword);
var matched = finding.matched, finded = finding.finded;
callback(finded, matched);
var matched = finding.match, find = finding.find;
callback(find, matched);
},
listeners: [{
eventName: BI.Searcher.EVENT_CHANGE,

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

@ -14,7 +14,9 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, {
var conf = BI.IconTextTrigger.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-text-trigger",
height: 24
height: 24,
iconHeight: null,
iconWidth: null
});
},
@ -46,6 +48,8 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, {
ref: function (_ref) {
self.icon = _ref;
},
iconHeight: o.iconHeight,
iconWidth: o.iconWidth,
disableSelected: true
},
width: BI.isEmptyString(o.iconCls)? 0 : (o.triggerWidth || o.height)

8
src/case/trigger/trigger.icon.text.select.js

@ -6,7 +6,9 @@ BI.SelectIconTextTrigger = BI.inherit(BI.Trigger, {
_defaultConfig: function () {
return BI.extend(BI.SelectIconTextTrigger.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-select-text-trigger bi-border",
height: 24
height: 24,
iconHeight: null,
iconWidth: null
});
},
@ -20,7 +22,9 @@ BI.SelectIconTextTrigger = BI.inherit(BI.Trigger, {
element: this,
text: obj.text,
iconCls: obj.iconCls,
height: o.height
height: o.height,
iconHeight: o.iconHeight,
iconWidth: o.iconWidth
});
},

2
src/component/allvaluechooser/abstract.allvaluechooser.js

@ -52,7 +52,7 @@ BI.AbstractAllValueChooser = BI.inherit(BI.Widget, {
}
BI.each(keywords, function (i, kw) {
var search = BI.Func.getSearchResult(items, kw);
items = search.matched.concat(search.finded);
items = search.match.concat(search.find);
});
if (options.selectedValues) {// 过滤
var filter = BI.makeObject(options.selectedValues, true);

22
src/component/treevaluechooser/abstract.treevaluechooser.js

@ -135,8 +135,8 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
self._deleteNode(selectedValues, p);
} else {
var searched = [];
var finded = search(parentValues, notSelectedValue, [], searched);
if (finded && BI.isNotEmptyArray(searched)) {
var find = search(parentValues, notSelectedValue, [], searched);
if (find && BI.isNotEmptyArray(searched)) {
BI.each(searched, function (i, arr) {
var node = self._getNode(selectedValues, arr);
if (node) {
@ -155,17 +155,17 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
// 例如选中了中国-江苏,取消南京
// important 选中了中国-江苏,取消了江苏,但是搜索的是南京
if (isChild(selectedValues, p)) {
var result = [], finded = false;
var result = [], find = false;
// 如果parentValues中有匹配的值,说明搜索结果不在当前值下
if (isSearchValueInParent(p)) {
finded = true;
find = true;
} else {
// 从当前值开始搜
finded = search(parentValues, notSelectedValue, result);
find = search(parentValues, notSelectedValue, result);
p = parentValues;
}
if (finded === true) {
if (find === true) {
// 去掉点击的节点之后的结果集
expandSelectedValue(selectedValues, p, notSelectedValue);
// 添加去掉搜索的结果集
@ -614,13 +614,13 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
_isMatch: function (parentValues, value, keyword) {
var node = this._getTreeNode(parentValues, value);
var finded = BI.Func.getSearchResult([node.text || node.value], keyword);
return finded.finded.length > 0 || finded.matched.length > 0;
var find = BI.Func.getSearchResult([node.text || node.value], keyword);
return find.find.length > 0 || find.match.length > 0;
},
_getTreeNode: function (parentValues, v) {
var self = this;
var findedParentNode;
var findParentNode;
var index = 0;
this.tree.traverse(function (node) {
if (self.tree.isRoot(node)) {
@ -630,7 +630,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
return false;
}
if (index === parentValues.length && node.value === v) {
findedParentNode = node;
findParentNode = node;
return false;
}
if (node.value === parentValues[index]) {
@ -639,7 +639,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
}
return true;
});
return findedParentNode;
return findParentNode;
},
_getChildren: function (parentValues) {

2
src/component/valuechooser/abstract.valuechooser.js

@ -62,7 +62,7 @@ BI.AbstractValueChooser = BI.inherit(BI.Widget, {
}
BI.each(keywords, function (i, kw) {
var search = BI.Func.getSearchResult(items, kw);
items = search.matched.concat(search.finded);
items = search.match.concat(search.find);
});
if (options.selectedValues) {// 过滤
var filter = BI.makeObject(options.selectedValues, true);

14
src/core/func/function.js

@ -35,13 +35,13 @@ BI.extend(BI.Func, {
param || (param = "text");
if (!BI.isKey(keyword)) {
return {
finded: BI.deepClone(items),
matched: isArray ? [] : {}
find: BI.deepClone(items),
match: isArray ? [] : {}
};
}
var t, text, py;
keyword = BI.toUpperCase(keyword);
var matched = isArray ? [] : {}, finded = isArray ? [] : {};
var matched = isArray ? [] : {}, find = isArray ? [] : {};
BI.each(items, function (i, item) {
item = BI.deepClone(item);
t = BI.stripEL(item);
@ -54,19 +54,19 @@ BI.extend(BI.Func, {
if (text === keyword) {
isArray ? matched.push(item) : (matched[i] = item);
} else {
isArray ? finded.push(item) : (finded[i] = item);
isArray ? find.push(item) : (find[i] = item);
}
} else if (pidx = py.indexOf(keyword), (pidx > -1 && Math.floor(pidx / text.length) === Math.floor((pidx + keyword.length - 1) / text.length))) {
if (text === keyword || keyword.length === text.length) {
isArray ? matched.push(item) : (matched[i] = item);
} else {
isArray ? finded.push(item) : (finded[i] = item);
isArray ? find.push(item) : (find[i] = item);
}
}
});
return {
matched: matched,
finded: finded
match: matched,
find: find
};
}
});

353
src/core/utils/xml.js

@ -1,353 +0,0 @@
// ;
// !(function (BI) {
//
// if (BI.isIE()) {
// XMLSerializer = null;
// DOMParser = null;
// }
//
//
// var XML = {
// Document: {
// NodeType: {
// ELEMENT: 1,
// ATTRIBUTE: 2,
// TEXT: 3,
// CDATA_SECTION: 4,
// ENTITY_REFERENCE: 5,
// ENTITY: 6,
// PROCESSING_INSTRUCTION: 7,
// COMMENT: 8,
// DOCUMENT: 9,
// DOCUMENT_TYPE: 10,
// DOCUMENT_FRAGMENT: 11,
// NOTATION: 12
// }
// }
// };
//
// XML.ResultType = {
// single: 'single',
// array: 'array'
// };
//
// XML.fromString = function (xmlStr) {
// try {
// var parser = new DOMParser();
// return parser.parseFromString(xmlStr, "text/xml");
// } catch (e) {
// var arrMSXML = ["MSXML2.DOMDocument.6.0", "MSXML2.DOMDocument.3.0"];
// for (var i = 0; i < arrMSXML.length; i++) {
// try {
// var xmlDoc = new ActiveXObject(arrMSXML[i]);
// xmlDoc.setProperty("SelectionLanguage", "XPath");
// xmlDoc.async = false;
// xmlDoc.loadXML(xmlStr);
// return xmlDoc;
// } catch (xmlError) {
// }
// }
// }
// };
//
// XML.toString = function (xmlNode) {
// if (!BI.isIE()) {
// var xmlSerializer = new XMLSerializer();
// return xmlSerializer.serializeToString(xmlNode);
// } else
// return xmlNode.xml;
// };
//
// XML.getNSResolver = function (str) {
// if (!str) {
// return null;
// }
// var list = str.split(' ');
// var namespaces = {};
// for (var i = 0; i < list.length; i++) {
// var pair = list[i].split('=');
// var fix = BI.trim(pair[0]).replace("xmlns:", "");
// namespaces[fix] = BI.trim(pair[1]).replace(/"/g, "").replace(/'/g, "");
// }
// return function (prefix) {
// return namespaces[prefix];
// };
// };
//
// XML.eval = function (context, xpathExp, resultType, namespaces) {
// if ((BI.isIE() && ('undefined' === typeof(context.selectSingleNode) || 'undefined' === typeof(context.selectNodes)))) {
// return XML.eval2(context, xpathExp, resultType, namespaces);
// } else {
// if (BI.isIE()) {
// namespaces = namespaces ? namespaces : "";
// var doc = (context.nodeType == XML.Document.NodeType.DOCUMENT) ? context : context.ownerDocument;
// doc.setProperty("SelectionNamespaces", namespaces);
// var result;
// if (resultType == this.ResultType.single) {
// result = context.selectSingleNode(xpathExp);
// } else {
// result = context.selectNodes(xpathExp) || [];
// }
// doc.setProperty("SelectionNamespaces", "");
// return result;
// } else {
// var node = context;
// var xmlDoc = (context.nodeName.indexOf("document") == -1) ? context.ownerDocument : context;
// var retType = (resultType == this.ResultType.single) ? XPathResult.FIRST_ORDERED_NODE_TYPE : XPathResult.ANY_TYPE;
// var col = xmlDoc.evaluate(xpathExp, node, XML.getNSResolver(namespaces), retType, null);
//
// if (retType == XPathResult.FIRST_ORDERED_NODE_TYPE) {
// return col.singleNodeValue;
// } else {
// var thisColMemb = col.iterateNext();
// var rowsCol = [];
// while (thisColMemb) {
// rowsCol[rowsCol.length] = thisColMemb;
// thisColMemb = col.iterateNext();
// }
// return rowsCol;
// }
// }
// }
// };
//
// XML.eval2 = function (context, xpathExp, resultType, namespaces) {
// if (resultType !== "single" && resultType !== undefined && resultType !== null) {
// throw new Error("justep.SimpleXML.eval only be resultType='single', not" + resultType);
// }
//
// if (context === null || context === undefined || xpathExp === null || xpathExp === undefined) {
// return context;
// }
//
// if (context.nodeType == XML.Document.NodeType.DOCUMENT) {
// context = context.documentElement;
// }
//
// var childs, i;
// if (xpathExp.indexOf("/") != -1) {
// var items = xpathExp.split("/");
// var isAbs = xpathExp.substring(0, 1) == "/";
// for (i = 0; i < items.length; i++) {
// var item = items[i];
// if (item === "") {
// continue;
// } else {
// var next = null;
// var ii = i + 1;
// for (; ii < items.length; ii++) {
// if (next === null) {
// next = items[ii];
// } else {
// next = next + "/" + items[ii];
// }
// }
//
// if (item == ".") {
// return this.eval(context, next, resultType);
//
// } else if (item == "..") {
// return this.eval2(context.parentNode, next, resultType);
//
// } else if (item == "*") {
// if (isAbs) {
// return this.eval2(context, next, resultType);
//
// } else {
// childs = context.childNodes;
// for (var j = 0; j < childs.length; j++) {
// var tmp = this.eval2(childs[j], next, resultType);
// if (tmp !== null) {
// return tmp;
// }
// }
// return null;
// }
//
// } else {
// if (isAbs) {
// if (context.nodeName == item) {
// return this.eval2(context, next, resultType);
// } else {
// return null;
// }
// } else {
// var child = this.getChildByName(context, item);
// if (child !== null) {
// return this.eval2(child, next, resultType);
// } else {
// return null;
// }
//
// }
// }
//
// }
// }
//
// return null;
//
// } else {
// if ("text()" == xpathExp) {
// childs = context.childNodes;
// for (i = 0; i < childs.length; i++) {
// if (childs[i].nodeType == XML.Document.NodeType.TEXT) {
// return childs[i];
// }
// }
// return null;
// } else {
// return this.getChildByName(context, xpathExp);
// }
// }
// };
//
// XML.getChildByName = function (context, name) {
// if (context === null || context === undefined || name === null || name === undefined) {
// return null;
// }
//
// if (context.nodeType == XML.Document.NodeType.DOCUMENT) {
// context = context.documentElement;
// }
//
// var childs = context.childNodes;
// for (var i = 0; i < childs.length; i++) {
// if (childs[i].nodeType == XML.Document.NodeType.ELEMENT && (childs[i].nodeName == name || name == "*")) {
// return childs[i];
// }
// }
//
// return null;
// };
//
// XML.appendChildren = function (context, xpathExp, nodes, isBefore) {
// nodes = (typeof nodes.length != "undefined") ? nodes : [nodes];
// var finded = this.eval(context, xpathExp);
// var count = finded.length;
// for (var i = 0; i < count; i++) {
// if (isBefore && finded[i].firstNode) {
// this._insertBefore(finded[i], nodes, finded[i].firstNode);
// } else {
// for (var j = 0; j < nodes.length; j++) {
// finded[i].appendChild(nodes[j]);
// }
// }
// }
// return count;
// };
//
// XML.removeNodes = function (context, xpathExp) {
// var nodes = this.eval(context, xpathExp);
// for (var i = 0; i < nodes.length; i++) {
// nodes[i].parentNode.removeChild(nodes[i]);
// }
// };
//
// XML._insertBefore = function (parent, newchildren, refchild) {
// for (var i = 0; i < newchildren.length; i++) {
// parent.insertBefore(newchildren[i], refchild);
// }
// };
//
// XML.insertNodes = function (context, xpathExp, nodes, isBefore) {
// nodes = (typeof nodes.length != "undefined") ? nodes : [nodes];
// var finded = this.eval(context, xpathExp);
// var count = finded.length;
// for (var i = 0; i < count; i++) {
// var refnode = (isBefore) ? finded[i] : finded[i].nextSibling;
// this._insertBefore(finded[i].parentNode, nodes, refnode);
// }
// return count;
// };
//
// XML.replaceNodes = function (context, xpathExp, nodes) {
// nodes = (typeof nodes.length != "undefined") ? nodes : [nodes];
// var finded = this.eval(context, xpathExp);
// var count = finded.length;
// for (var i = 0; i < count; i++) {
// var refnode = finded[i];
// var parent = refnode.parentNode;
// this._insertBefore(parent, nodes, refnode);
// parent.removeChild(refnode);
// }
// return count;
// };
//
// XML.setNodeText = function (context, xpathExp, text) {
// var finded = this.eval(context, xpathExp, this.ResultType.single);
// if (finded === null) {
// return;
// }
// if (finded.nodeType == XML.Document.NodeType.ELEMENT) {
// var textNode = this.eval(finded, "./text()", this.ResultType.single);
// if (!textNode) {
// textNode = finded.ownerDocument.createTextNode("");
// finded.appendChild(textNode);
// }
// textNode.nodeValue = text;
// } else {
// finded.nodeValue = text;
// }
// return;
// };
//
// XML.getNodeText = function (context, xpathExp, defaultValue) {
// var finded = xpathExp ? this.eval(context, xpathExp, this.ResultType.single) : context;
// if (finded && (finded.nodeType == XML.Document.NodeType.ELEMENT)) {
// finded = this.eval(finded, "./text()", this.ResultType.single);
// }
// return (finded && finded.nodeValue) ? "" + finded.nodeValue : (defaultValue !== undefined) ? defaultValue : null;
// };
//
// XML.Namespaces = {
// XMLSCHEMA: "http://www.w3.org/2001/XMLSchema#",
// XMLSCHEMA_STRING: "http://www.w3.org/2001/XMLSchema#String",
// XMLSCHEMA_LONG: "http://www.w3.org/2001/XMLSchema#Long",
// XMLSCHEMA_INTEGER: 'http://www.w3.org/2001/XMLSchema#Integer',
// XMLSCHEMA_FLOAT: 'http://www.w3.org/2001/XMLSchema#Float',
// XMLSCHEMA_DOUBLE: 'http://www.w3.org/2001/XMLSchema#Double',
// XMLSCHEMA_DECIMAL: 'http://www.w3.org/2001/XMLSchema#Decimal',
// XMLSCHEMA_DATE: 'http://www.w3.org/2001/XMLSchema#Date',
// XMLSCHEMA_TIME: 'http://www.w3.org/2001/XMLSchema#Time',
// XMLSCHEMA_DATETIME: 'http://www.w3.org/2001/XMLSchema#DateTime',
// XMLSCHEMA_BOOLEAN: 'http://www.w3.org/2001/XMLSchema#Boolean',
// XMLSCHEMA_SYMBOL: 'http://www.w3.org/2001/XMLSchema#Symbol',
// JUSTEPSCHEMA: "http://www.justep.com/xbiz#",
// RDF: "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
// JUSTEP: "http://www.justep.com/x5#",
// 'get': function (type) {
// type = type ? type.toLowerCase() : "string";
// if ("string" == type) {
// return XML.Namespaces.XMLSCHEMA_STRING;
// }
// else if ("integer" == type) {
// return XML.Namespaces.XMLSCHEMA_INTEGER;
// }
// else if ("long" == type) {
// return XML.Namespaces.XMLSCHEMA_LONG;
// }
// else if ("float" == type) {
// return XML.Namespaces.XMLSCHEMA_FLOAT;
// }
// else if ("double" == type) {
// return XML.Namespaces.XMLSCHEMA_DOUBLE;
// }
// else if ("decimal" == type) {
// return XML.Namespaces.XMLSCHEMA_DECIMAL;
// }
// else if ("date" == type) {
// return XML.Namespaces.XMLSCHEMA_DATE;
// }
// else if ("time" == type) {
// return XML.Namespaces.XMLSCHEMA_TIME;
// }
// else if ("datetime" == type) {
// return XML.Namespaces.XMLSCHEMA_DATETIME;
// }
// else if ("boolean" == type) {
// return XML.Namespaces.XMLSCHEMA_BOOLEAN;
// }
// }
// };
// })(BI);

2
src/css/base/layer/panel.css

@ -4,7 +4,7 @@
border-radius: 2px;
}
.bi-panel .panel-title {
background-color: #f2f4f7;
background-color: #F2F4F7;
}
.bi-panel .panel-title .panel-title-text {
cursor: text;

14
src/css/base/pager/pager.css

@ -1,3 +1,17 @@
.bi-all-count-pager .all-pager-prev {
font-size: 16px;
}
.bi-all-count-pager .all-pager-next {
font-size: 16px;
}
.bi-direction-pager .direction-pager-prev {
font-size: 16px;
}
.bi-direction-pager .direction-pager-next {
font-size: 16px;
}
.bi-pager .page-item {
-webkit-border-radius: 2px;
-moz-border-radius: 2px;

67
src/css/base/single/tip/tip.css

@ -1,3 +1,70 @@
.bi-bubble {
font-size: 14px;
}
.bi-bubble .bubble-text {
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
}
.bi-bubble .bubble-error {
background: #ffecec;
color: #ff4949;
}
.bi-bubble .bubble-common {
background: #eaf2fd;
color: #3685f2;
}
.bi-bubble .bubble-success {
background: #e1f4e7;
color: #5cb75d;
}
.bi-bubble .bubble-warning {
background: #feeed7;
color: #faaa39;
}
.bi-tip {
position: fixed !important;
}
.bi-toast {
font-size: 14px;
color: #ffffff;
max-width: 400px;
min-width: 150px;
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
}
.bi-toast.toast-success {
background: #58cc7d;
}
.bi-toast.toast-warning {
background: #faaa39;
}
.bi-toast.toast-error {
background: #ff4949;
}
.bi-toast.toast-normal {
background: #3f8ce8;
}
.bi-toast .toast-icon {
font-size: 16px;
}
.bi-tooltip {
max-width: 250px;
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
font-size: 12px;
color: #ffffff;
}
.bi-tooltip.tooltip-success {
background: #647185;
border: 1px solid #647185;
}
.bi-tooltip.tooltip-warning {
background: #ff4949;
border: 1px solid #e85050;
}

196
src/css/base/table/table.css

@ -1,3 +1,169 @@
.bi-collection-table-cell {
-webkit-box-sizing: border-box;
/*Safari3.2+*/
-moz-box-sizing: border-box;
/*Firefox3.5+*/
-ms-box-sizing: border-box;
/*IE8*/
box-sizing: border-box;
/*W3C标准(IE9+,Safari5.1+,Chrome10.0+,Opera10.6+都符合box-sizing的w3c标准语法)*/
}
.bi-collection-table-cell.first-row {
border-top: 1px solid #d4dadd;
}
.bi-collection-table-cell.first-col {
border-left: 1px solid #d4dadd;
}
.bi-theme-dark .bi-collection-table-cell.first-row {
border-top: 1px solid #525466;
}
.bi-theme-dark .bi-collection-table-cell.first-col {
border-left: 1px solid #525466;
}
.bi-quick-collection-table > div > .bi-collection {
overflow: hidden !important;
overflow-x: hidden !important;
overflow-y: hidden !important;
}
.bi-grid-table-cell {
-webkit-box-sizing: border-box;
/*Safari3.2+*/
-moz-box-sizing: border-box;
/*Firefox3.5+*/
-ms-box-sizing: border-box;
/*IE8*/
box-sizing: border-box;
/*W3C标准(IE9+,Safari5.1+,Chrome10.0+,Opera10.6+都符合box-sizing的w3c标准语法)*/
}
.bi-grid-table-cell.first-row {
border-top: 1px solid #d4dadd;
}
.bi-grid-table-cell.first-col {
border-left: 1px solid #d4dadd;
}
.bi-theme-dark .bi-grid-table-cell.first-row {
border-top: 1px solid #525466;
}
.bi-theme-dark .bi-grid-table-cell.first-col {
border-left: 1px solid #525466;
}
.scrollbar-layout-main {
box-sizing: border-box;
outline: none;
overflow: hidden;
position: absolute;
transition-duration: 250ms;
transition-timing-function: ease;
user-select: none;
background-color: rgba(102, 102, 102, 0.05);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d666666,endColorstr=#0d666666);
border-radius: 5px;
}
.bi-theme-dark .scrollbar-layout-main {
background-color: rgba(204, 204, 204, 0.05);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dcccccc,endColorstr=#0dcccccc);
}
.scrollbar-layout-main-vertical {
bottom: 0;
right: 0;
top: 0;
transition-property: background-color;
width: 10px;
}
.scrollbar-layout-main-vertical.public-scrollbar-main-active,
.scrollbar-layout-main-vertical:hover {
width: 10px;
}
.scrollbar-layout-main-horizontal {
bottom: 0;
height: 10px;
left: 0;
transition-property: background-color;
background-color: rgba(102, 102, 102, 0.05);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d666666,endColorstr=#0d666666);
}
.bi-theme-dark .scrollbar-layout-main-horizontal {
background-color: rgba(204, 204, 204, 0.05);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dcccccc,endColorstr=#0dcccccc);
}
/* Touching the scroll-track directly makes the scroll-track bolder */
.scrollbar-layout-main-horizontal.public-scrollbar-main-active,
.scrollbar-layout-main-horizontal:hover {
height: 10px;
}
.scrollbar-layout-face {
left: 0;
overflow: hidden;
position: absolute;
z-index: 1;
}
/**
* This selector renders the "nub" of the scrollface. The nub must
* be rendered as pseudo-element so that it won't receive any UI events then
* we can get the correct `event.offsetX` and `event.offsetY` from the
* scrollface element while dragging it.
*/
.scrollbar-layout-face:after {
border-radius: 6px;
content: '';
display: block;
position: absolute;
transition: background-color 250ms ease;
}
.scrollbar-layout-face-horizontal {
bottom: 0;
left: 0;
top: 0;
}
.scrollbar-layout-face-horizontal:after {
bottom: 2px;
left: 0;
top: 2px;
width: 100%;
}
.scrollbar-layout-face-vertical {
left: 0;
right: 0;
top: 0;
}
.scrollbar-layout-face-vertical:after {
height: 100%;
left: 2px;
right: 2px;
top: 0;
}
/**
* scrollbars.
*/
/* Touching the scroll-track directly makes the scroll-track bolder */
.public-scrollbar-face:after {
background-color: rgba(102, 102, 102, 0.3);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d666666,endColorstr=#4d666666);
}
.bi-theme-dark .public-scrollbar-face:after {
background-color: rgba(204, 204, 204, 0.3);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4dcccccc,endColorstr=#4dcccccc);
}
.public-scrollbar-main:hover .public-scrollbar-face:after,
.public-scrollbar-main-active .public-scrollbar-face:after,
.public-scrollbar-face-active:after {
background-color: rgba(102, 102, 102, 0.7);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3666666,endColorstr=#b3666666);
}
.bi-theme-dark .public-scrollbar-main:hover .public-scrollbar-face:after,
.bi-theme-dark .public-scrollbar-main-active .public-scrollbar-face:after,
.bi-theme-dark .public-scrollbar-face-active:after {
background-color: rgba(204, 204, 204, 0.7);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3cccccc,endColorstr=#b3cccccc);
}
.horizontal-scrollbar {
bottom: 0;
position: absolute;
}
.bi-table > .first-col {
border-left: none;
}
@ -76,3 +242,33 @@
border-top: 1px solid #525466;
border-left: 1px solid #525466;
}
.bi-resizable-table-cell .resizable-table-cell-resizer-container {
cursor: ew-resize;
z-index: 1;
}
.bi-resizable-table-cell .resizable-table-cell-resizer-container:hover .resizable-table-cell-resizer-knob,
.bi-resizable-table-cell .resizable-table-cell-resizer-container.dragging .resizable-table-cell-resizer-knob {
background-color: #3f8ce8;
}
.bi-resizable-table-cell .resizable-table-cell-resizer-container.suitable .resizable-table-cell-resizer-knob {
background-color: #58cc7d;
}
.bi-resizable-table .resizable-table-resizer {
cursor: ew-resize;
z-index: 1;
background-color: #3f8ce8;
}
.bi-resizable-table .resizable-table-resizer.suitable {
background-color: #58cc7d;
}
.bi-resizable-table .resizable-table-region-resizer {
cursor: ew-resize;
z-index: 1;
}
.bi-resizable-table .resizable-table-region-resizer:hover .resizable-table-region-resizer-knob,
.bi-resizable-table .resizable-table-region-resizer.dragging .resizable-table-region-resizer-knob {
background-color: #3f8ce8;
}

14
src/css/base/trigger/trigger.css

@ -1,3 +1,17 @@
.bi-trigger .bi-trigger-icon-button {
font-size: 16px;
}
.bi-select-text-trigger {
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
}
.bi-small-select-text-trigger {
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
}

2
src/css/core/utils/common.css

@ -57,7 +57,7 @@ textarea {
color: #3d4d66;
}
.bi-theme-dark .bi-background {
background-color: #191b2b;
background-color: #191B2B;
color: #cccccc;
}
.bi-theme-dark .bi-background .bi-input {

2
src/css/theme/dark.css

@ -1,5 +1,5 @@
.bi-theme-dark {
background-color: #191b2b;
background-color: #191B2B;
color: #cccccc;
}
.bi-theme-dark .bi-input {

5
src/css/widget/exceltable/exceltable.css

@ -1,3 +1,8 @@
.bi-excel-table-header-cell {
font-weight: bold;
}
.bi-excel-table > div.bottom-right > div > div > table {
border-right: 1px solid #d4dadd;
}

2
src/widget/multiselect/search/multiselect.search.loader.js

@ -107,7 +107,7 @@ BI.MultiSelectSearchLoader = BI.inherit(BI.Widget, {
});
if (BI.isKey(keyword)) {
var search = BI.Func.getSearchResult(newValues, keyword);
values = search.matched.concat(search.finded);
values = search.matched.concat(search.find);
}
return BI.map(values, function (i, v) {
return {

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

@ -110,7 +110,7 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {
});
if (BI.isKey(keyword)) {
var search = BI.Func.getSearchResult(newValues, keyword);
values = search.matched.concat(search.finded);
values = search.match.concat(search.find);
}
return BI.map(values, function (i, v) {
return {

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

@ -127,7 +127,7 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {
});
if (BI.isKey(keyword)) {
var search = BI.Func.getSearchResult(newValues, keyword);
values = search.matched.concat(search.finded);
values = search.match.concat(search.find);
}
return BI.map(values, function (i, v) {
return {

355
utils/utils.js

@ -8077,360 +8077,7 @@ BI.Region.prototype = {
pos.push(this.y + this.h / 2);
return pos;
}
};// ;
// !(function (BI) {
//
// if (BI.isIE()) {
// XMLSerializer = null;
// DOMParser = null;
// }
//
//
// var XML = {
// Document: {
// NodeType: {
// ELEMENT: 1,
// ATTRIBUTE: 2,
// TEXT: 3,
// CDATA_SECTION: 4,
// ENTITY_REFERENCE: 5,
// ENTITY: 6,
// PROCESSING_INSTRUCTION: 7,
// COMMENT: 8,
// DOCUMENT: 9,
// DOCUMENT_TYPE: 10,
// DOCUMENT_FRAGMENT: 11,
// NOTATION: 12
// }
// }
// };
//
// XML.ResultType = {
// single: 'single',
// array: 'array'
// };
//
// XML.fromString = function (xmlStr) {
// try {
// var parser = new DOMParser();
// return parser.parseFromString(xmlStr, "text/xml");
// } catch (e) {
// var arrMSXML = ["MSXML2.DOMDocument.6.0", "MSXML2.DOMDocument.3.0"];
// for (var i = 0; i < arrMSXML.length; i++) {
// try {
// var xmlDoc = new ActiveXObject(arrMSXML[i]);
// xmlDoc.setProperty("SelectionLanguage", "XPath");
// xmlDoc.async = false;
// xmlDoc.loadXML(xmlStr);
// return xmlDoc;
// } catch (xmlError) {
// }
// }
// }
// };
//
// XML.toString = function (xmlNode) {
// if (!BI.isIE()) {
// var xmlSerializer = new XMLSerializer();
// return xmlSerializer.serializeToString(xmlNode);
// } else
// return xmlNode.xml;
// };
//
// XML.getNSResolver = function (str) {
// if (!str) {
// return null;
// }
// var list = str.split(' ');
// var namespaces = {};
// for (var i = 0; i < list.length; i++) {
// var pair = list[i].split('=');
// var fix = BI.trim(pair[0]).replace("xmlns:", "");
// namespaces[fix] = BI.trim(pair[1]).replace(/"/g, "").replace(/'/g, "");
// }
// return function (prefix) {
// return namespaces[prefix];
// };
// };
//
// XML.eval = function (context, xpathExp, resultType, namespaces) {
// if ((BI.isIE() && ('undefined' === typeof(context.selectSingleNode) || 'undefined' === typeof(context.selectNodes)))) {
// return XML.eval2(context, xpathExp, resultType, namespaces);
// } else {
// if (BI.isIE()) {
// namespaces = namespaces ? namespaces : "";
// var doc = (context.nodeType == XML.Document.NodeType.DOCUMENT) ? context : context.ownerDocument;
// doc.setProperty("SelectionNamespaces", namespaces);
// var result;
// if (resultType == this.ResultType.single) {
// result = context.selectSingleNode(xpathExp);
// } else {
// result = context.selectNodes(xpathExp) || [];
// }
// doc.setProperty("SelectionNamespaces", "");
// return result;
// } else {
// var node = context;
// var xmlDoc = (context.nodeName.indexOf("document") == -1) ? context.ownerDocument : context;
// var retType = (resultType == this.ResultType.single) ? XPathResult.FIRST_ORDERED_NODE_TYPE : XPathResult.ANY_TYPE;
// var col = xmlDoc.evaluate(xpathExp, node, XML.getNSResolver(namespaces), retType, null);
//
// if (retType == XPathResult.FIRST_ORDERED_NODE_TYPE) {
// return col.singleNodeValue;
// } else {
// var thisColMemb = col.iterateNext();
// var rowsCol = [];
// while (thisColMemb) {
// rowsCol[rowsCol.length] = thisColMemb;
// thisColMemb = col.iterateNext();
// }
// return rowsCol;
// }
// }
// }
// };
//
// XML.eval2 = function (context, xpathExp, resultType, namespaces) {
// if (resultType !== "single" && resultType !== undefined && resultType !== null) {
// throw new Error("justep.SimpleXML.eval only be resultType='single', not" + resultType);
// }
//
// if (context === null || context === undefined || xpathExp === null || xpathExp === undefined) {
// return context;
// }
//
// if (context.nodeType == XML.Document.NodeType.DOCUMENT) {
// context = context.documentElement;
// }
//
// var childs, i;
// if (xpathExp.indexOf("/") != -1) {
// var items = xpathExp.split("/");
// var isAbs = xpathExp.substring(0, 1) == "/";
// for (i = 0; i < items.length; i++) {
// var item = items[i];
// if (item === "") {
// continue;
// } else {
// var next = null;
// var ii = i + 1;
// for (; ii < items.length; ii++) {
// if (next === null) {
// next = items[ii];
// } else {
// next = next + "/" + items[ii];
// }
// }
//
// if (item == ".") {
// return this.eval(context, next, resultType);
//
// } else if (item == "..") {
// return this.eval2(context.parentNode, next, resultType);
//
// } else if (item == "*") {
// if (isAbs) {
// return this.eval2(context, next, resultType);
//
// } else {
// childs = context.childNodes;
// for (var j = 0; j < childs.length; j++) {
// var tmp = this.eval2(childs[j], next, resultType);
// if (tmp !== null) {
// return tmp;
// }
// }
// return null;
// }
//
// } else {
// if (isAbs) {
// if (context.nodeName == item) {
// return this.eval2(context, next, resultType);
// } else {
// return null;
// }
// } else {
// var child = this.getChildByName(context, item);
// if (child !== null) {
// return this.eval2(child, next, resultType);
// } else {
// return null;
// }
//
// }
// }
//
// }
// }
//
// return null;
//
// } else {
// if ("text()" == xpathExp) {
// childs = context.childNodes;
// for (i = 0; i < childs.length; i++) {
// if (childs[i].nodeType == XML.Document.NodeType.TEXT) {
// return childs[i];
// }
// }
// return null;
// } else {
// return this.getChildByName(context, xpathExp);
// }
// }
// };
//
// XML.getChildByName = function (context, name) {
// if (context === null || context === undefined || name === null || name === undefined) {
// return null;
// }
//
// if (context.nodeType == XML.Document.NodeType.DOCUMENT) {
// context = context.documentElement;
// }
//
// var childs = context.childNodes;
// for (var i = 0; i < childs.length; i++) {
// if (childs[i].nodeType == XML.Document.NodeType.ELEMENT && (childs[i].nodeName == name || name == "*")) {
// return childs[i];
// }
// }
//
// return null;
// };
//
// XML.appendChildren = function (context, xpathExp, nodes, isBefore) {
// nodes = (typeof nodes.length != "undefined") ? nodes : [nodes];
// var finded = this.eval(context, xpathExp);
// var count = finded.length;
// for (var i = 0; i < count; i++) {
// if (isBefore && finded[i].firstNode) {
// this._insertBefore(finded[i], nodes, finded[i].firstNode);
// } else {
// for (var j = 0; j < nodes.length; j++) {
// finded[i].appendChild(nodes[j]);
// }
// }
// }
// return count;
// };
//
// XML.removeNodes = function (context, xpathExp) {
// var nodes = this.eval(context, xpathExp);
// for (var i = 0; i < nodes.length; i++) {
// nodes[i].parentNode.removeChild(nodes[i]);
// }
// };
//
// XML._insertBefore = function (parent, newchildren, refchild) {
// for (var i = 0; i < newchildren.length; i++) {
// parent.insertBefore(newchildren[i], refchild);
// }
// };
//
// XML.insertNodes = function (context, xpathExp, nodes, isBefore) {
// nodes = (typeof nodes.length != "undefined") ? nodes : [nodes];
// var finded = this.eval(context, xpathExp);
// var count = finded.length;
// for (var i = 0; i < count; i++) {
// var refnode = (isBefore) ? finded[i] : finded[i].nextSibling;
// this._insertBefore(finded[i].parentNode, nodes, refnode);
// }
// return count;
// };
//
// XML.replaceNodes = function (context, xpathExp, nodes) {
// nodes = (typeof nodes.length != "undefined") ? nodes : [nodes];
// var finded = this.eval(context, xpathExp);
// var count = finded.length;
// for (var i = 0; i < count; i++) {
// var refnode = finded[i];
// var parent = refnode.parentNode;
// this._insertBefore(parent, nodes, refnode);
// parent.removeChild(refnode);
// }
// return count;
// };
//
// XML.setNodeText = function (context, xpathExp, text) {
// var finded = this.eval(context, xpathExp, this.ResultType.single);
// if (finded === null) {
// return;
// }
// if (finded.nodeType == XML.Document.NodeType.ELEMENT) {
// var textNode = this.eval(finded, "./text()", this.ResultType.single);
// if (!textNode) {
// textNode = finded.ownerDocument.createTextNode("");
// finded.appendChild(textNode);
// }
// textNode.nodeValue = text;
// } else {
// finded.nodeValue = text;
// }
// return;
// };
//
// XML.getNodeText = function (context, xpathExp, defaultValue) {
// var finded = xpathExp ? this.eval(context, xpathExp, this.ResultType.single) : context;
// if (finded && (finded.nodeType == XML.Document.NodeType.ELEMENT)) {
// finded = this.eval(finded, "./text()", this.ResultType.single);
// }
// return (finded && finded.nodeValue) ? "" + finded.nodeValue : (defaultValue !== undefined) ? defaultValue : null;
// };
//
// XML.Namespaces = {
// XMLSCHEMA: "http://www.w3.org/2001/XMLSchema#",
// XMLSCHEMA_STRING: "http://www.w3.org/2001/XMLSchema#String",
// XMLSCHEMA_LONG: "http://www.w3.org/2001/XMLSchema#Long",
// XMLSCHEMA_INTEGER: 'http://www.w3.org/2001/XMLSchema#Integer',
// XMLSCHEMA_FLOAT: 'http://www.w3.org/2001/XMLSchema#Float',
// XMLSCHEMA_DOUBLE: 'http://www.w3.org/2001/XMLSchema#Double',
// XMLSCHEMA_DECIMAL: 'http://www.w3.org/2001/XMLSchema#Decimal',
// XMLSCHEMA_DATE: 'http://www.w3.org/2001/XMLSchema#Date',
// XMLSCHEMA_TIME: 'http://www.w3.org/2001/XMLSchema#Time',
// XMLSCHEMA_DATETIME: 'http://www.w3.org/2001/XMLSchema#DateTime',
// XMLSCHEMA_BOOLEAN: 'http://www.w3.org/2001/XMLSchema#Boolean',
// XMLSCHEMA_SYMBOL: 'http://www.w3.org/2001/XMLSchema#Symbol',
// JUSTEPSCHEMA: "http://www.justep.com/xbiz#",
// RDF: "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
// JUSTEP: "http://www.justep.com/x5#",
// 'get': function (type) {
// type = type ? type.toLowerCase() : "string";
// if ("string" == type) {
// return XML.Namespaces.XMLSCHEMA_STRING;
// }
// else if ("integer" == type) {
// return XML.Namespaces.XMLSCHEMA_INTEGER;
// }
// else if ("long" == type) {
// return XML.Namespaces.XMLSCHEMA_LONG;
// }
// else if ("float" == type) {
// return XML.Namespaces.XMLSCHEMA_FLOAT;
// }
// else if ("double" == type) {
// return XML.Namespaces.XMLSCHEMA_DOUBLE;
// }
// else if ("decimal" == type) {
// return XML.Namespaces.XMLSCHEMA_DECIMAL;
// }
// else if ("date" == type) {
// return XML.Namespaces.XMLSCHEMA_DATE;
// }
// else if ("time" == type) {
// return XML.Namespaces.XMLSCHEMA_TIME;
// }
// else if ("datetime" == type) {
// return XML.Namespaces.XMLSCHEMA_DATETIME;
// }
// else if ("boolean" == type) {
// return XML.Namespaces.XMLSCHEMA_BOOLEAN;
// }
// }
// };
// })(BI);
/**
};/**
* 保存数据将js里面用到的常量数据都分离
*
*/

Loading…
Cancel
Save