Browse Source

Merge pull request #1152 in VISUAL/fineui from ~GUY/fineui:master to master

* commit '5704c1a378d7b17f1c4ec9a772bce91fca28a04c':
  bugfix
es6
guy 5 years ago
parent
commit
4a728967f3
  1. 2
      demo/app.js
  2. 4
      demo/js/north.js
  3. 68
      dist/2.0/fineui.ie.js
  4. 72
      dist/2.0/fineui.ie.min.js
  5. 68
      dist/2.0/fineui.js
  6. 2
      dist/2.0/fineui.min.css
  7. 72
      dist/2.0/fineui.min.js
  8. 26
      dist/base.js
  9. 68
      dist/bundle.ie.js
  10. 72
      dist/bundle.ie.min.js
  11. 68
      dist/bundle.js
  12. 2
      dist/bundle.min.css
  13. 72
      dist/bundle.min.js
  14. 4
      dist/case.js
  15. 38
      dist/core.js
  16. 6
      dist/demo.js
  17. 68
      dist/fineui.ie.js
  18. 20
      dist/fineui.ie.min.js
  19. 68
      dist/fineui.js
  20. 2
      dist/fineui.min.css
  21. 70
      dist/fineui.min.js
  22. 8
      dist/fineui_without_jquery_polyfill.js
  23. 2
      dist/utils.js
  24. 4
      dist/utils.min.js
  25. 4
      src/base/tree/ztree/asynctree.js
  26. 2
      src/base/tree/ztree/jquery.ztree.core-3.5.js
  27. 2
      src/base/tree/ztree/jquery.ztree.excheck-3.5.js
  28. 2
      src/base/tree/ztree/list/listasynctree.js
  29. 2
      src/base/tree/ztree/list/listparttree.js
  30. 2
      src/base/tree/ztree/list/listtreeview.js
  31. 2
      src/base/tree/ztree/parttree.js
  32. 8
      src/base/tree/ztree/treeview.js
  33. 2
      src/case/tree/ztree/tree.display.js
  34. 2
      src/case/tree/ztree/tree.list.display.js
  35. 2
      src/core/alias.js
  36. 2
      src/core/platform/web/jquery/_jquery.js
  37. 2
      src/core/platform/web/jquery/event.js
  38. 14
      src/core/platform/web/jquery/fn.js
  39. 12
      src/core/platform/web/load.js
  40. 6
      src/core/widget.js
  41. 2
      src/third/jquery.mousewheel.js
  42. 8
      test/utils.js

2
demo/app.js

@ -1,7 +1,7 @@
Demo = {
version: 1.0
};
$(function () {
BI.$(function () {
var ref;
BI.each(Demo.CONFIG, function (index, item) {

4
demo/js/north.js

@ -28,13 +28,13 @@ Demo.North = BI.inherit(BI.Widget, {
type: "bi.text_button",
text: "星空蓝",
handler: function () {
$("html").removeClass("bi-theme-default").addClass("bi-theme-dark");
BI.$("html").removeClass("bi-theme-default").addClass("bi-theme-dark");
}
}, {
type: "bi.text_button",
text: "典雅白",
handler: function () {
$("html").removeClass("bi-theme-dark").addClass("bi-theme-default");
BI.$("html").removeClass("bi-theme-dark").addClass("bi-theme-default");
}
}]
}

68
dist/2.0/fineui.ie.js vendored

@ -12131,11 +12131,11 @@ if (!_global.BI) {
if (BI.isWidget(widget)) {
var o = widget.options;
if (o.element) {
return $(o.element);
return BI.$(o.element);
}
return $(document.createElement(o.tagName));
return BI.$(document.createElement(o.tagName));
}
return $(widget);
return BI.$(widget);
},
createFragment: function () {
return document.createDocumentFragment();
@ -18360,7 +18360,7 @@ BI.ShowAction = BI.inherit(BI.Action, {
try {
// 注意0啊
// var jo = $.parseJSON(text) || {};
var jo = _global.$ ? _global.$.parseJSON(text) : _global.JSON.parse(text);
var jo = BI.$ ? BI.$.parseJSON(text) : _global.JSON.parse(text);
if (jo == null) {
jo = {};
}
@ -32336,7 +32336,7 @@ jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
// })();
// Expose jQuery to the global object
window.jQuery = window.$ = jQuery;
BI.jQuery = BI.$ = jQuery;
// Expose jQuery as an AMD module, but only for AMD loaders that
// understand the issues with loading multiple versions of jQuery
@ -32357,13 +32357,13 @@ if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
})( window );/*
* 给jQuery.Event对象添加的工具方法
*/
$.extend($.Event.prototype, {
BI.$.extend(BI.$.Event.prototype, {
// event.stopEvent
stopEvent: function () {
this.stopPropagation();
this.preventDefault();
}
});if (jQuery) {
});if (BI.jQuery) {
(function ($) {
// richer:容器在其各个边缘留出的空间
if (!$.fn.insets) {
@ -32419,9 +32419,9 @@ $.extend($.Event.prototype, {
};
}
})(jQuery);
})(BI.jQuery);
BI.extend(jQuery.fn, {
BI.extend(BI.jQuery.fn, {
destroy: function () {
this.remove();
@ -32464,7 +32464,7 @@ $.extend($.Event.prototype, {
if (tidx >= 0) {
// 标红的text未encode
this.append(BI.htmlEncode(textLeft.substr(0, tidx)));
this.append($("<span>").addClass("bi-keyword-red-mark")
this.append(BI.$("<span>").addClass("bi-keyword-red-mark")
.html(BI.htmlEncode(textLeft.substr(tidx, keyword.length))));
textLeft = textLeft.substr(tidx + keyword.length);
@ -32474,7 +32474,7 @@ $.extend($.Event.prototype, {
} else if (pidx != null && pidx >= 0 && Math.floor(pidx / text.length) === Math.floor((pidx + keyword.length - 1) / text.length)) {
// 标红的text未encode
this.append(BI.htmlEncode(textLeft.substr(0, pidx)));
this.append($("<span>").addClass("bi-keyword-red-mark")
this.append(BI.$("<span>").addClass("bi-keyword-red-mark")
.html(BI.htmlEncode(textLeft.substr(pidx, keyword.length))));
if (py != null) {
py = py.substr(pidx + keyword.length);
@ -32491,8 +32491,8 @@ $.extend($.Event.prototype, {
},
getDomHeight: function (parent) {
var clone = $(this).clone();
clone.appendTo($(parent || "body"));
var clone = BI.$(this).clone();
clone.appendTo(BI.$(parent || "body"));
var height = clone.height();
clone.remove();
return height;
@ -32597,17 +32597,17 @@ _.extend(BI, {
$import: function () {
var _LOADED = {}; // alex:保存加载过的
function loadReady (src, must) {
var $scripts = $("head script, body script");
$.each($scripts, function (i, item) {
var $scripts = BI.$("head script, body script");
BI.$.each($scripts, function (i, item) {
if (item.src.indexOf(src) != -1) {
_LOADED[src] = true;
}
});
var $links = $("head link");
$.each($links, function (i, item) {
var $links = BI.$("head link");
BI.$.each($links, function (i, item) {
if (item.href.indexOf(src) != -1 && must) {
_LOADED[src] = false;
$(item).remove();
BI.$(item).remove();
}
});
}
@ -32629,7 +32629,7 @@ _.extend(BI, {
_LOADED[src] = true;
} else {
// alex:这里用同步调用的方式,必须等待ajax完成
$.ajax({
BI.$.ajax({
url: src,
dataType: "script", // alex:指定dataType为script,jquery会帮忙做globalEval的事情
async: false,
@ -37914,7 +37914,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
module.exports = factory;
} else {
// Browser globals
factory(jQuery);
factory(BI.jQuery);
}
}(function ($) {
@ -39768,7 +39768,7 @@ BI.TreeView = BI.inherit(BI.Pane, {
track(treeNode.children);
var treeObj = self.nodes;
var nodes = treeObj.getSelectedNodes();
$.each(nodes, function (index, node) {
BI.$.each(nodes, function (index, node) {
node.halfCheck = false;
});
}
@ -39905,7 +39905,7 @@ BI.TreeView = BI.inherit(BI.Pane, {
n.isParent = n.isParent || n.parent;
// 处理标红
if (BI.isKey(o.paras.keyword)) {
n.text = $("<div>").__textKeywordMarked__(n.text, o.paras.keyword, n.py).html();
n.text = BI.$("<div>").__textKeywordMarked__(n.text, o.paras.keyword, n.py).html();
} else {
n.text = BI.htmlEncode(n.text + "");
}
@ -39949,7 +39949,7 @@ BI.TreeView = BI.inherit(BI.Pane, {
if (self._stop === true) {
return;
}
self.nodes = $.fn.zTree.init(tree.element, setting, nodes);
self.nodes = BI.$.fn.zTree.init(tree.element, setting, nodes);
};
var op = BI.extend({}, o.paras, {
times: 1
@ -39999,7 +39999,7 @@ BI.TreeView = BI.inherit(BI.Pane, {
},
callback: {}
};
this.nodes = $.fn.zTree.init(this.tree.element, setting, nodes);
this.nodes = BI.$.fn.zTree.init(this.tree.element, setting, nodes);
},
start: function () {
@ -40157,7 +40157,7 @@ BI.AsyncTree = BI.inherit(BI.TreeView, {
};
function onClick (event, treeId, treeNode) {
var zTree = $.fn.zTree.getZTreeObj(treeId);
var zTree = BI.$.fn.zTree.getZTreeObj(treeId);
// 当前点击节点的状态是半选,且为true_part, 则将其改为false_part,使得点击半选后切换到的是全选
var checked = treeNode.checked;
var status = treeNode.getCheckStatus();
@ -40183,7 +40183,7 @@ BI.AsyncTree = BI.inherit(BI.TreeView, {
track(treeNode.children);
var treeObj = $.fn.zTree.getZTreeObj(treeId);
var treeObj = BI.$.fn.zTree.getZTreeObj(treeId);
var nodes = treeObj.getSelectedNodes();
BI.each(nodes, function (index, node) {
node.halfCheck = false;
@ -40478,7 +40478,7 @@ BI.PartTree = BI.inherit(BI.AsyncTree, {
if (self._stop === true) {
return;
}
self.nodes = $.fn.zTree.init(tree.element, setting, nodes);
self.nodes = BI.$.fn.zTree.init(tree.element, setting, nodes);
}
BI.delay(function () {
@ -40557,7 +40557,7 @@ BI.ListTreeView = BI.inherit(BI.TreeView, {
};
function onClick (event, treeId, treeNode) {
var zTree = $.fn.zTree.getZTreeObj(treeId);
var zTree = BI.$.fn.zTree.getZTreeObj(treeId);
var checked = treeNode.checked;
self._checkValue(treeNode, !checked);
zTree.checkNode(treeNode, !checked, true, true);
@ -40670,7 +40670,7 @@ BI.ListAsyncTree = BI.inherit(BI.ListTreeView, {
}
function onClick (event, treeId, treeNode) {
var zTree = $.fn.zTree.getZTreeObj(treeId);
var zTree = BI.$.fn.zTree.getZTreeObj(treeId);
var checked = treeNode.checked;
self._checkValue(treeNode, !checked);
zTree.checkNode(treeNode, !checked, true, true);
@ -40808,7 +40808,7 @@ BI.ListPartTree = BI.inherit(BI.ListAsyncTree, {
if (self._stop === true) {
return;
}
self.nodes = $.fn.zTree.init(tree.element, setting, nodes);
self.nodes = BI.$.fn.zTree.init(tree.element, setting, nodes);
}
BI.delay(function () {
@ -51422,7 +51422,7 @@ BI.shortcut("bi.custom_tree", BI.CustomTree);/*
var zt = $.fn.zTree,
$$ = tools.$,
consts = zt.consts;
})(jQuery);/*
})(BI.jQuery);/*
* JQuery zTree excheck v3.5.18
* http://zTree.me/
*
@ -52051,7 +52051,7 @@ BI.shortcut("bi.custom_tree", BI.CustomTree);/*
}
return html;
}
})(jQuery);/**
})(BI.jQuery);/**
* 可以改变图标的button
*
* Created by GUY on 2016/2/2.
@ -61205,7 +61205,7 @@ BI.DisplayTree = BI.inherit(BI.TreeView, {
initTree: function (nodes, setting) {
var setting = setting || this._configSetting();
this.nodes = $.fn.zTree.init(this.tree.element, setting, nodes);
this.nodes = BI.$.fn.zTree.init(this.tree.element, setting, nodes);
},
destroy: function () {
@ -61282,7 +61282,7 @@ BI.ListDisplayTree = BI.inherit(BI.ListTreeView, {
initTree: function (nodes, setting) {
var setting = setting || this._configSetting();
this.nodes = $.fn.zTree.init(this.tree.element, setting, nodes);
this.nodes = BI.$.fn.zTree.init(this.tree.element, setting, nodes);
},
destroy: function () {

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

File diff suppressed because one or more lines are too long

68
dist/2.0/fineui.js vendored

@ -12131,11 +12131,11 @@ if (!_global.BI) {
if (BI.isWidget(widget)) {
var o = widget.options;
if (o.element) {
return $(o.element);
return BI.$(o.element);
}
return $(document.createElement(o.tagName));
return BI.$(document.createElement(o.tagName));
}
return $(widget);
return BI.$(widget);
},
createFragment: function () {
return document.createDocumentFragment();
@ -18360,7 +18360,7 @@ BI.ShowAction = BI.inherit(BI.Action, {
try {
// 注意0啊
// var jo = $.parseJSON(text) || {};
var jo = _global.$ ? _global.$.parseJSON(text) : _global.JSON.parse(text);
var jo = BI.$ ? BI.$.parseJSON(text) : _global.JSON.parse(text);
if (jo == null) {
jo = {};
}
@ -32336,7 +32336,7 @@ jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
// })();
// Expose jQuery to the global object
window.jQuery = window.$ = jQuery;
BI.jQuery = BI.$ = jQuery;
// Expose jQuery as an AMD module, but only for AMD loaders that
// understand the issues with loading multiple versions of jQuery
@ -32357,13 +32357,13 @@ if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
})( window );/*
* 给jQuery.Event对象添加的工具方法
*/
$.extend($.Event.prototype, {
BI.$.extend(BI.$.Event.prototype, {
// event.stopEvent
stopEvent: function () {
this.stopPropagation();
this.preventDefault();
}
});if (jQuery) {
});if (BI.jQuery) {
(function ($) {
// richer:容器在其各个边缘留出的空间
if (!$.fn.insets) {
@ -32419,9 +32419,9 @@ $.extend($.Event.prototype, {
};
}
})(jQuery);
})(BI.jQuery);
BI.extend(jQuery.fn, {
BI.extend(BI.jQuery.fn, {
destroy: function () {
this.remove();
@ -32464,7 +32464,7 @@ $.extend($.Event.prototype, {
if (tidx >= 0) {
// 标红的text未encode
this.append(BI.htmlEncode(textLeft.substr(0, tidx)));
this.append($("<span>").addClass("bi-keyword-red-mark")
this.append(BI.$("<span>").addClass("bi-keyword-red-mark")
.html(BI.htmlEncode(textLeft.substr(tidx, keyword.length))));
textLeft = textLeft.substr(tidx + keyword.length);
@ -32474,7 +32474,7 @@ $.extend($.Event.prototype, {
} else if (pidx != null && pidx >= 0 && Math.floor(pidx / text.length) === Math.floor((pidx + keyword.length - 1) / text.length)) {
// 标红的text未encode
this.append(BI.htmlEncode(textLeft.substr(0, pidx)));
this.append($("<span>").addClass("bi-keyword-red-mark")
this.append(BI.$("<span>").addClass("bi-keyword-red-mark")
.html(BI.htmlEncode(textLeft.substr(pidx, keyword.length))));
if (py != null) {
py = py.substr(pidx + keyword.length);
@ -32491,8 +32491,8 @@ $.extend($.Event.prototype, {
},
getDomHeight: function (parent) {
var clone = $(this).clone();
clone.appendTo($(parent || "body"));
var clone = BI.$(this).clone();
clone.appendTo(BI.$(parent || "body"));
var height = clone.height();
clone.remove();
return height;
@ -32597,17 +32597,17 @@ _.extend(BI, {
$import: function () {
var _LOADED = {}; // alex:保存加载过的
function loadReady (src, must) {
var $scripts = $("head script, body script");
$.each($scripts, function (i, item) {
var $scripts = BI.$("head script, body script");
BI.$.each($scripts, function (i, item) {
if (item.src.indexOf(src) != -1) {
_LOADED[src] = true;
}
});
var $links = $("head link");
$.each($links, function (i, item) {
var $links = BI.$("head link");
BI.$.each($links, function (i, item) {
if (item.href.indexOf(src) != -1 && must) {
_LOADED[src] = false;
$(item).remove();
BI.$(item).remove();
}
});
}
@ -32629,7 +32629,7 @@ _.extend(BI, {
_LOADED[src] = true;
} else {
// alex:这里用同步调用的方式,必须等待ajax完成
$.ajax({
BI.$.ajax({
url: src,
dataType: "script", // alex:指定dataType为script,jquery会帮忙做globalEval的事情
async: false,
@ -38318,7 +38318,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
module.exports = factory;
} else {
// Browser globals
factory(jQuery);
factory(BI.jQuery);
}
}(function ($) {
@ -40172,7 +40172,7 @@ BI.TreeView = BI.inherit(BI.Pane, {
track(treeNode.children);
var treeObj = self.nodes;
var nodes = treeObj.getSelectedNodes();
$.each(nodes, function (index, node) {
BI.$.each(nodes, function (index, node) {
node.halfCheck = false;
});
}
@ -40309,7 +40309,7 @@ BI.TreeView = BI.inherit(BI.Pane, {
n.isParent = n.isParent || n.parent;
// 处理标红
if (BI.isKey(o.paras.keyword)) {
n.text = $("<div>").__textKeywordMarked__(n.text, o.paras.keyword, n.py).html();
n.text = BI.$("<div>").__textKeywordMarked__(n.text, o.paras.keyword, n.py).html();
} else {
n.text = BI.htmlEncode(n.text + "");
}
@ -40353,7 +40353,7 @@ BI.TreeView = BI.inherit(BI.Pane, {
if (self._stop === true) {
return;
}
self.nodes = $.fn.zTree.init(tree.element, setting, nodes);
self.nodes = BI.$.fn.zTree.init(tree.element, setting, nodes);
};
var op = BI.extend({}, o.paras, {
times: 1
@ -40403,7 +40403,7 @@ BI.TreeView = BI.inherit(BI.Pane, {
},
callback: {}
};
this.nodes = $.fn.zTree.init(this.tree.element, setting, nodes);
this.nodes = BI.$.fn.zTree.init(this.tree.element, setting, nodes);
},
start: function () {
@ -40561,7 +40561,7 @@ BI.AsyncTree = BI.inherit(BI.TreeView, {
};
function onClick (event, treeId, treeNode) {
var zTree = $.fn.zTree.getZTreeObj(treeId);
var zTree = BI.$.fn.zTree.getZTreeObj(treeId);
// 当前点击节点的状态是半选,且为true_part, 则将其改为false_part,使得点击半选后切换到的是全选
var checked = treeNode.checked;
var status = treeNode.getCheckStatus();
@ -40587,7 +40587,7 @@ BI.AsyncTree = BI.inherit(BI.TreeView, {
track(treeNode.children);
var treeObj = $.fn.zTree.getZTreeObj(treeId);
var treeObj = BI.$.fn.zTree.getZTreeObj(treeId);
var nodes = treeObj.getSelectedNodes();
BI.each(nodes, function (index, node) {
node.halfCheck = false;
@ -40882,7 +40882,7 @@ BI.PartTree = BI.inherit(BI.AsyncTree, {
if (self._stop === true) {
return;
}
self.nodes = $.fn.zTree.init(tree.element, setting, nodes);
self.nodes = BI.$.fn.zTree.init(tree.element, setting, nodes);
}
BI.delay(function () {
@ -40961,7 +40961,7 @@ BI.ListTreeView = BI.inherit(BI.TreeView, {
};
function onClick (event, treeId, treeNode) {
var zTree = $.fn.zTree.getZTreeObj(treeId);
var zTree = BI.$.fn.zTree.getZTreeObj(treeId);
var checked = treeNode.checked;
self._checkValue(treeNode, !checked);
zTree.checkNode(treeNode, !checked, true, true);
@ -41074,7 +41074,7 @@ BI.ListAsyncTree = BI.inherit(BI.ListTreeView, {
}
function onClick (event, treeId, treeNode) {
var zTree = $.fn.zTree.getZTreeObj(treeId);
var zTree = BI.$.fn.zTree.getZTreeObj(treeId);
var checked = treeNode.checked;
self._checkValue(treeNode, !checked);
zTree.checkNode(treeNode, !checked, true, true);
@ -41212,7 +41212,7 @@ BI.ListPartTree = BI.inherit(BI.ListAsyncTree, {
if (self._stop === true) {
return;
}
self.nodes = $.fn.zTree.init(tree.element, setting, nodes);
self.nodes = BI.$.fn.zTree.init(tree.element, setting, nodes);
}
BI.delay(function () {
@ -51826,7 +51826,7 @@ BI.shortcut("bi.custom_tree", BI.CustomTree);/*
var zt = $.fn.zTree,
$$ = tools.$,
consts = zt.consts;
})(jQuery);/*
})(BI.jQuery);/*
* JQuery zTree excheck v3.5.18
* http://zTree.me/
*
@ -52455,7 +52455,7 @@ BI.shortcut("bi.custom_tree", BI.CustomTree);/*
}
return html;
}
})(jQuery);/**
})(BI.jQuery);/**
* 可以改变图标的button
*
* Created by GUY on 2016/2/2.
@ -61609,7 +61609,7 @@ BI.DisplayTree = BI.inherit(BI.TreeView, {
initTree: function (nodes, setting) {
var setting = setting || this._configSetting();
this.nodes = $.fn.zTree.init(this.tree.element, setting, nodes);
this.nodes = BI.$.fn.zTree.init(this.tree.element, setting, nodes);
},
destroy: function () {
@ -61686,7 +61686,7 @@ BI.ListDisplayTree = BI.inherit(BI.ListTreeView, {
initTree: function (nodes, setting) {
var setting = setting || this._configSetting();
this.nodes = $.fn.zTree.init(this.tree.element, setting, nodes);
this.nodes = BI.$.fn.zTree.init(this.tree.element, setting, nodes);
},
destroy: function () {

2
dist/2.0/fineui.min.css vendored

File diff suppressed because one or more lines are too long

72
dist/2.0/fineui.min.js vendored

File diff suppressed because one or more lines are too long

26
dist/base.js vendored

@ -15,7 +15,7 @@
module.exports = factory;
} else {
// Browser globals
factory(jQuery);
factory(BI.jQuery);
}
}(function ($) {
@ -1869,7 +1869,7 @@ BI.TreeView = BI.inherit(BI.Pane, {
track(treeNode.children);
var treeObj = self.nodes;
var nodes = treeObj.getSelectedNodes();
$.each(nodes, function (index, node) {
BI.$.each(nodes, function (index, node) {
node.halfCheck = false;
});
}
@ -2006,7 +2006,7 @@ BI.TreeView = BI.inherit(BI.Pane, {
n.isParent = n.isParent || n.parent;
// 处理标红
if (BI.isKey(o.paras.keyword)) {
n.text = $("<div>").__textKeywordMarked__(n.text, o.paras.keyword, n.py).html();
n.text = BI.$("<div>").__textKeywordMarked__(n.text, o.paras.keyword, n.py).html();
} else {
n.text = BI.htmlEncode(n.text + "");
}
@ -2050,7 +2050,7 @@ BI.TreeView = BI.inherit(BI.Pane, {
if (self._stop === true) {
return;
}
self.nodes = $.fn.zTree.init(tree.element, setting, nodes);
self.nodes = BI.$.fn.zTree.init(tree.element, setting, nodes);
};
var op = BI.extend({}, o.paras, {
times: 1
@ -2100,7 +2100,7 @@ BI.TreeView = BI.inherit(BI.Pane, {
},
callback: {}
};
this.nodes = $.fn.zTree.init(this.tree.element, setting, nodes);
this.nodes = BI.$.fn.zTree.init(this.tree.element, setting, nodes);
},
start: function () {
@ -2258,7 +2258,7 @@ BI.AsyncTree = BI.inherit(BI.TreeView, {
};
function onClick (event, treeId, treeNode) {
var zTree = $.fn.zTree.getZTreeObj(treeId);
var zTree = BI.$.fn.zTree.getZTreeObj(treeId);
// 当前点击节点的状态是半选,且为true_part, 则将其改为false_part,使得点击半选后切换到的是全选
var checked = treeNode.checked;
var status = treeNode.getCheckStatus();
@ -2284,7 +2284,7 @@ BI.AsyncTree = BI.inherit(BI.TreeView, {
track(treeNode.children);
var treeObj = $.fn.zTree.getZTreeObj(treeId);
var treeObj = BI.$.fn.zTree.getZTreeObj(treeId);
var nodes = treeObj.getSelectedNodes();
BI.each(nodes, function (index, node) {
node.halfCheck = false;
@ -2579,7 +2579,7 @@ BI.PartTree = BI.inherit(BI.AsyncTree, {
if (self._stop === true) {
return;
}
self.nodes = $.fn.zTree.init(tree.element, setting, nodes);
self.nodes = BI.$.fn.zTree.init(tree.element, setting, nodes);
}
BI.delay(function () {
@ -2658,7 +2658,7 @@ BI.ListTreeView = BI.inherit(BI.TreeView, {
};
function onClick (event, treeId, treeNode) {
var zTree = $.fn.zTree.getZTreeObj(treeId);
var zTree = BI.$.fn.zTree.getZTreeObj(treeId);
var checked = treeNode.checked;
self._checkValue(treeNode, !checked);
zTree.checkNode(treeNode, !checked, true, true);
@ -2771,7 +2771,7 @@ BI.ListAsyncTree = BI.inherit(BI.ListTreeView, {
}
function onClick (event, treeId, treeNode) {
var zTree = $.fn.zTree.getZTreeObj(treeId);
var zTree = BI.$.fn.zTree.getZTreeObj(treeId);
var checked = treeNode.checked;
self._checkValue(treeNode, !checked);
zTree.checkNode(treeNode, !checked, true, true);
@ -2909,7 +2909,7 @@ BI.ListPartTree = BI.inherit(BI.ListAsyncTree, {
if (self._stop === true) {
return;
}
self.nodes = $.fn.zTree.init(tree.element, setting, nodes);
self.nodes = BI.$.fn.zTree.init(tree.element, setting, nodes);
}
BI.delay(function () {
@ -13523,7 +13523,7 @@ BI.shortcut("bi.custom_tree", BI.CustomTree);/*
var zt = $.fn.zTree,
$$ = tools.$,
consts = zt.consts;
})(jQuery);/*
})(BI.jQuery);/*
* JQuery zTree excheck v3.5.18
* http://zTree.me/
*
@ -14152,4 +14152,4 @@ BI.shortcut("bi.custom_tree", BI.CustomTree);/*
}
return html;
}
})(jQuery);
})(BI.jQuery);

68
dist/bundle.ie.js vendored

@ -12131,11 +12131,11 @@ if (!_global.BI) {
if (BI.isWidget(widget)) {
var o = widget.options;
if (o.element) {
return $(o.element);
return BI.$(o.element);
}
return $(document.createElement(o.tagName));
return BI.$(document.createElement(o.tagName));
}
return $(widget);
return BI.$(widget);
},
createFragment: function () {
return document.createDocumentFragment();
@ -18360,7 +18360,7 @@ BI.ShowAction = BI.inherit(BI.Action, {
try {
// 注意0啊
// var jo = $.parseJSON(text) || {};
var jo = _global.$ ? _global.$.parseJSON(text) : _global.JSON.parse(text);
var jo = BI.$ ? BI.$.parseJSON(text) : _global.JSON.parse(text);
if (jo == null) {
jo = {};
}
@ -32336,7 +32336,7 @@ jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
// })();
// Expose jQuery to the global object
window.jQuery = window.$ = jQuery;
BI.jQuery = BI.$ = jQuery;
// Expose jQuery as an AMD module, but only for AMD loaders that
// understand the issues with loading multiple versions of jQuery
@ -32357,13 +32357,13 @@ if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
})( window );/*
* 给jQuery.Event对象添加的工具方法
*/
$.extend($.Event.prototype, {
BI.$.extend(BI.$.Event.prototype, {
// event.stopEvent
stopEvent: function () {
this.stopPropagation();
this.preventDefault();
}
});if (jQuery) {
});if (BI.jQuery) {
(function ($) {
// richer:容器在其各个边缘留出的空间
if (!$.fn.insets) {
@ -32419,9 +32419,9 @@ $.extend($.Event.prototype, {
};
}
})(jQuery);
})(BI.jQuery);
BI.extend(jQuery.fn, {
BI.extend(BI.jQuery.fn, {
destroy: function () {
this.remove();
@ -32464,7 +32464,7 @@ $.extend($.Event.prototype, {
if (tidx >= 0) {
// 标红的text未encode
this.append(BI.htmlEncode(textLeft.substr(0, tidx)));
this.append($("<span>").addClass("bi-keyword-red-mark")
this.append(BI.$("<span>").addClass("bi-keyword-red-mark")
.html(BI.htmlEncode(textLeft.substr(tidx, keyword.length))));
textLeft = textLeft.substr(tidx + keyword.length);
@ -32474,7 +32474,7 @@ $.extend($.Event.prototype, {
} else if (pidx != null && pidx >= 0 && Math.floor(pidx / text.length) === Math.floor((pidx + keyword.length - 1) / text.length)) {
// 标红的text未encode
this.append(BI.htmlEncode(textLeft.substr(0, pidx)));
this.append($("<span>").addClass("bi-keyword-red-mark")
this.append(BI.$("<span>").addClass("bi-keyword-red-mark")
.html(BI.htmlEncode(textLeft.substr(pidx, keyword.length))));
if (py != null) {
py = py.substr(pidx + keyword.length);
@ -32491,8 +32491,8 @@ $.extend($.Event.prototype, {
},
getDomHeight: function (parent) {
var clone = $(this).clone();
clone.appendTo($(parent || "body"));
var clone = BI.$(this).clone();
clone.appendTo(BI.$(parent || "body"));
var height = clone.height();
clone.remove();
return height;
@ -32597,17 +32597,17 @@ _.extend(BI, {
$import: function () {
var _LOADED = {}; // alex:保存加载过的
function loadReady (src, must) {
var $scripts = $("head script, body script");
$.each($scripts, function (i, item) {
var $scripts = BI.$("head script, body script");
BI.$.each($scripts, function (i, item) {
if (item.src.indexOf(src) != -1) {
_LOADED[src] = true;
}
});
var $links = $("head link");
$.each($links, function (i, item) {
var $links = BI.$("head link");
BI.$.each($links, function (i, item) {
if (item.href.indexOf(src) != -1 && must) {
_LOADED[src] = false;
$(item).remove();
BI.$(item).remove();
}
});
}
@ -32629,7 +32629,7 @@ _.extend(BI, {
_LOADED[src] = true;
} else {
// alex:这里用同步调用的方式,必须等待ajax完成
$.ajax({
BI.$.ajax({
url: src,
dataType: "script", // alex:指定dataType为script,jquery会帮忙做globalEval的事情
async: false,
@ -37914,7 +37914,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
module.exports = factory;
} else {
// Browser globals
factory(jQuery);
factory(BI.jQuery);
}
}(function ($) {
@ -39768,7 +39768,7 @@ BI.TreeView = BI.inherit(BI.Pane, {
track(treeNode.children);
var treeObj = self.nodes;
var nodes = treeObj.getSelectedNodes();
$.each(nodes, function (index, node) {
BI.$.each(nodes, function (index, node) {
node.halfCheck = false;
});
}
@ -39905,7 +39905,7 @@ BI.TreeView = BI.inherit(BI.Pane, {
n.isParent = n.isParent || n.parent;
// 处理标红
if (BI.isKey(o.paras.keyword)) {
n.text = $("<div>").__textKeywordMarked__(n.text, o.paras.keyword, n.py).html();
n.text = BI.$("<div>").__textKeywordMarked__(n.text, o.paras.keyword, n.py).html();
} else {
n.text = BI.htmlEncode(n.text + "");
}
@ -39949,7 +39949,7 @@ BI.TreeView = BI.inherit(BI.Pane, {
if (self._stop === true) {
return;
}
self.nodes = $.fn.zTree.init(tree.element, setting, nodes);
self.nodes = BI.$.fn.zTree.init(tree.element, setting, nodes);
};
var op = BI.extend({}, o.paras, {
times: 1
@ -39999,7 +39999,7 @@ BI.TreeView = BI.inherit(BI.Pane, {
},
callback: {}
};
this.nodes = $.fn.zTree.init(this.tree.element, setting, nodes);
this.nodes = BI.$.fn.zTree.init(this.tree.element, setting, nodes);
},
start: function () {
@ -40157,7 +40157,7 @@ BI.AsyncTree = BI.inherit(BI.TreeView, {
};
function onClick (event, treeId, treeNode) {
var zTree = $.fn.zTree.getZTreeObj(treeId);
var zTree = BI.$.fn.zTree.getZTreeObj(treeId);
// 当前点击节点的状态是半选,且为true_part, 则将其改为false_part,使得点击半选后切换到的是全选
var checked = treeNode.checked;
var status = treeNode.getCheckStatus();
@ -40183,7 +40183,7 @@ BI.AsyncTree = BI.inherit(BI.TreeView, {
track(treeNode.children);
var treeObj = $.fn.zTree.getZTreeObj(treeId);
var treeObj = BI.$.fn.zTree.getZTreeObj(treeId);
var nodes = treeObj.getSelectedNodes();
BI.each(nodes, function (index, node) {
node.halfCheck = false;
@ -40478,7 +40478,7 @@ BI.PartTree = BI.inherit(BI.AsyncTree, {
if (self._stop === true) {
return;
}
self.nodes = $.fn.zTree.init(tree.element, setting, nodes);
self.nodes = BI.$.fn.zTree.init(tree.element, setting, nodes);
}
BI.delay(function () {
@ -40557,7 +40557,7 @@ BI.ListTreeView = BI.inherit(BI.TreeView, {
};
function onClick (event, treeId, treeNode) {
var zTree = $.fn.zTree.getZTreeObj(treeId);
var zTree = BI.$.fn.zTree.getZTreeObj(treeId);
var checked = treeNode.checked;
self._checkValue(treeNode, !checked);
zTree.checkNode(treeNode, !checked, true, true);
@ -40670,7 +40670,7 @@ BI.ListAsyncTree = BI.inherit(BI.ListTreeView, {
}
function onClick (event, treeId, treeNode) {
var zTree = $.fn.zTree.getZTreeObj(treeId);
var zTree = BI.$.fn.zTree.getZTreeObj(treeId);
var checked = treeNode.checked;
self._checkValue(treeNode, !checked);
zTree.checkNode(treeNode, !checked, true, true);
@ -40808,7 +40808,7 @@ BI.ListPartTree = BI.inherit(BI.ListAsyncTree, {
if (self._stop === true) {
return;
}
self.nodes = $.fn.zTree.init(tree.element, setting, nodes);
self.nodes = BI.$.fn.zTree.init(tree.element, setting, nodes);
}
BI.delay(function () {
@ -51422,7 +51422,7 @@ BI.shortcut("bi.custom_tree", BI.CustomTree);/*
var zt = $.fn.zTree,
$$ = tools.$,
consts = zt.consts;
})(jQuery);/*
})(BI.jQuery);/*
* JQuery zTree excheck v3.5.18
* http://zTree.me/
*
@ -52051,7 +52051,7 @@ BI.shortcut("bi.custom_tree", BI.CustomTree);/*
}
return html;
}
})(jQuery);/**
})(BI.jQuery);/**
* 可以改变图标的button
*
* Created by GUY on 2016/2/2.
@ -61205,7 +61205,7 @@ BI.DisplayTree = BI.inherit(BI.TreeView, {
initTree: function (nodes, setting) {
var setting = setting || this._configSetting();
this.nodes = $.fn.zTree.init(this.tree.element, setting, nodes);
this.nodes = BI.$.fn.zTree.init(this.tree.element, setting, nodes);
},
destroy: function () {
@ -61282,7 +61282,7 @@ BI.ListDisplayTree = BI.inherit(BI.ListTreeView, {
initTree: function (nodes, setting) {
var setting = setting || this._configSetting();
this.nodes = $.fn.zTree.init(this.tree.element, setting, nodes);
this.nodes = BI.$.fn.zTree.init(this.tree.element, setting, nodes);
},
destroy: function () {

72
dist/bundle.ie.min.js vendored

File diff suppressed because one or more lines are too long

68
dist/bundle.js vendored

@ -12131,11 +12131,11 @@ if (!_global.BI) {
if (BI.isWidget(widget)) {
var o = widget.options;
if (o.element) {
return $(o.element);
return BI.$(o.element);
}
return $(document.createElement(o.tagName));
return BI.$(document.createElement(o.tagName));
}
return $(widget);
return BI.$(widget);
},
createFragment: function () {
return document.createDocumentFragment();
@ -18360,7 +18360,7 @@ BI.ShowAction = BI.inherit(BI.Action, {
try {
// 注意0啊
// var jo = $.parseJSON(text) || {};
var jo = _global.$ ? _global.$.parseJSON(text) : _global.JSON.parse(text);
var jo = BI.$ ? BI.$.parseJSON(text) : _global.JSON.parse(text);
if (jo == null) {
jo = {};
}
@ -32336,7 +32336,7 @@ jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
// })();
// Expose jQuery to the global object
window.jQuery = window.$ = jQuery;
BI.jQuery = BI.$ = jQuery;
// Expose jQuery as an AMD module, but only for AMD loaders that
// understand the issues with loading multiple versions of jQuery
@ -32357,13 +32357,13 @@ if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
})( window );/*
* 给jQuery.Event对象添加的工具方法
*/
$.extend($.Event.prototype, {
BI.$.extend(BI.$.Event.prototype, {
// event.stopEvent
stopEvent: function () {
this.stopPropagation();
this.preventDefault();
}
});if (jQuery) {
});if (BI.jQuery) {
(function ($) {
// richer:容器在其各个边缘留出的空间
if (!$.fn.insets) {
@ -32419,9 +32419,9 @@ $.extend($.Event.prototype, {
};
}
})(jQuery);
})(BI.jQuery);
BI.extend(jQuery.fn, {
BI.extend(BI.jQuery.fn, {
destroy: function () {
this.remove();
@ -32464,7 +32464,7 @@ $.extend($.Event.prototype, {
if (tidx >= 0) {
// 标红的text未encode
this.append(BI.htmlEncode(textLeft.substr(0, tidx)));
this.append($("<span>").addClass("bi-keyword-red-mark")
this.append(BI.$("<span>").addClass("bi-keyword-red-mark")
.html(BI.htmlEncode(textLeft.substr(tidx, keyword.length))));
textLeft = textLeft.substr(tidx + keyword.length);
@ -32474,7 +32474,7 @@ $.extend($.Event.prototype, {
} else if (pidx != null && pidx >= 0 && Math.floor(pidx / text.length) === Math.floor((pidx + keyword.length - 1) / text.length)) {
// 标红的text未encode
this.append(BI.htmlEncode(textLeft.substr(0, pidx)));
this.append($("<span>").addClass("bi-keyword-red-mark")
this.append(BI.$("<span>").addClass("bi-keyword-red-mark")
.html(BI.htmlEncode(textLeft.substr(pidx, keyword.length))));
if (py != null) {
py = py.substr(pidx + keyword.length);
@ -32491,8 +32491,8 @@ $.extend($.Event.prototype, {
},
getDomHeight: function (parent) {
var clone = $(this).clone();
clone.appendTo($(parent || "body"));
var clone = BI.$(this).clone();
clone.appendTo(BI.$(parent || "body"));
var height = clone.height();
clone.remove();
return height;
@ -32597,17 +32597,17 @@ _.extend(BI, {
$import: function () {
var _LOADED = {}; // alex:保存加载过的
function loadReady (src, must) {
var $scripts = $("head script, body script");
$.each($scripts, function (i, item) {
var $scripts = BI.$("head script, body script");
BI.$.each($scripts, function (i, item) {
if (item.src.indexOf(src) != -1) {
_LOADED[src] = true;
}
});
var $links = $("head link");
$.each($links, function (i, item) {
var $links = BI.$("head link");
BI.$.each($links, function (i, item) {
if (item.href.indexOf(src) != -1 && must) {
_LOADED[src] = false;
$(item).remove();
BI.$(item).remove();
}
});
}
@ -32629,7 +32629,7 @@ _.extend(BI, {
_LOADED[src] = true;
} else {
// alex:这里用同步调用的方式,必须等待ajax完成
$.ajax({
BI.$.ajax({
url: src,
dataType: "script", // alex:指定dataType为script,jquery会帮忙做globalEval的事情
async: false,
@ -38318,7 +38318,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
module.exports = factory;
} else {
// Browser globals
factory(jQuery);
factory(BI.jQuery);
}
}(function ($) {
@ -40172,7 +40172,7 @@ BI.TreeView = BI.inherit(BI.Pane, {
track(treeNode.children);
var treeObj = self.nodes;
var nodes = treeObj.getSelectedNodes();
$.each(nodes, function (index, node) {
BI.$.each(nodes, function (index, node) {
node.halfCheck = false;
});
}
@ -40309,7 +40309,7 @@ BI.TreeView = BI.inherit(BI.Pane, {
n.isParent = n.isParent || n.parent;
// 处理标红
if (BI.isKey(o.paras.keyword)) {
n.text = $("<div>").__textKeywordMarked__(n.text, o.paras.keyword, n.py).html();
n.text = BI.$("<div>").__textKeywordMarked__(n.text, o.paras.keyword, n.py).html();
} else {
n.text = BI.htmlEncode(n.text + "");
}
@ -40353,7 +40353,7 @@ BI.TreeView = BI.inherit(BI.Pane, {
if (self._stop === true) {
return;
}
self.nodes = $.fn.zTree.init(tree.element, setting, nodes);
self.nodes = BI.$.fn.zTree.init(tree.element, setting, nodes);
};
var op = BI.extend({}, o.paras, {
times: 1
@ -40403,7 +40403,7 @@ BI.TreeView = BI.inherit(BI.Pane, {
},
callback: {}
};
this.nodes = $.fn.zTree.init(this.tree.element, setting, nodes);
this.nodes = BI.$.fn.zTree.init(this.tree.element, setting, nodes);
},
start: function () {
@ -40561,7 +40561,7 @@ BI.AsyncTree = BI.inherit(BI.TreeView, {
};
function onClick (event, treeId, treeNode) {
var zTree = $.fn.zTree.getZTreeObj(treeId);
var zTree = BI.$.fn.zTree.getZTreeObj(treeId);
// 当前点击节点的状态是半选,且为true_part, 则将其改为false_part,使得点击半选后切换到的是全选
var checked = treeNode.checked;
var status = treeNode.getCheckStatus();
@ -40587,7 +40587,7 @@ BI.AsyncTree = BI.inherit(BI.TreeView, {
track(treeNode.children);
var treeObj = $.fn.zTree.getZTreeObj(treeId);
var treeObj = BI.$.fn.zTree.getZTreeObj(treeId);
var nodes = treeObj.getSelectedNodes();
BI.each(nodes, function (index, node) {
node.halfCheck = false;
@ -40882,7 +40882,7 @@ BI.PartTree = BI.inherit(BI.AsyncTree, {
if (self._stop === true) {
return;
}
self.nodes = $.fn.zTree.init(tree.element, setting, nodes);
self.nodes = BI.$.fn.zTree.init(tree.element, setting, nodes);
}
BI.delay(function () {
@ -40961,7 +40961,7 @@ BI.ListTreeView = BI.inherit(BI.TreeView, {
};
function onClick (event, treeId, treeNode) {
var zTree = $.fn.zTree.getZTreeObj(treeId);
var zTree = BI.$.fn.zTree.getZTreeObj(treeId);
var checked = treeNode.checked;
self._checkValue(treeNode, !checked);
zTree.checkNode(treeNode, !checked, true, true);
@ -41074,7 +41074,7 @@ BI.ListAsyncTree = BI.inherit(BI.ListTreeView, {
}
function onClick (event, treeId, treeNode) {
var zTree = $.fn.zTree.getZTreeObj(treeId);
var zTree = BI.$.fn.zTree.getZTreeObj(treeId);
var checked = treeNode.checked;
self._checkValue(treeNode, !checked);
zTree.checkNode(treeNode, !checked, true, true);
@ -41212,7 +41212,7 @@ BI.ListPartTree = BI.inherit(BI.ListAsyncTree, {
if (self._stop === true) {
return;
}
self.nodes = $.fn.zTree.init(tree.element, setting, nodes);
self.nodes = BI.$.fn.zTree.init(tree.element, setting, nodes);
}
BI.delay(function () {
@ -51826,7 +51826,7 @@ BI.shortcut("bi.custom_tree", BI.CustomTree);/*
var zt = $.fn.zTree,
$$ = tools.$,
consts = zt.consts;
})(jQuery);/*
})(BI.jQuery);/*
* JQuery zTree excheck v3.5.18
* http://zTree.me/
*
@ -52455,7 +52455,7 @@ BI.shortcut("bi.custom_tree", BI.CustomTree);/*
}
return html;
}
})(jQuery);/**
})(BI.jQuery);/**
* 可以改变图标的button
*
* Created by GUY on 2016/2/2.
@ -61609,7 +61609,7 @@ BI.DisplayTree = BI.inherit(BI.TreeView, {
initTree: function (nodes, setting) {
var setting = setting || this._configSetting();
this.nodes = $.fn.zTree.init(this.tree.element, setting, nodes);
this.nodes = BI.$.fn.zTree.init(this.tree.element, setting, nodes);
},
destroy: function () {
@ -61686,7 +61686,7 @@ BI.ListDisplayTree = BI.inherit(BI.ListTreeView, {
initTree: function (nodes, setting) {
var setting = setting || this._configSetting();
this.nodes = $.fn.zTree.init(this.tree.element, setting, nodes);
this.nodes = BI.$.fn.zTree.init(this.tree.element, setting, nodes);
},
destroy: function () {

2
dist/bundle.min.css vendored

File diff suppressed because one or more lines are too long

72
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

4
dist/case.js vendored

@ -9152,7 +9152,7 @@ BI.DisplayTree = BI.inherit(BI.TreeView, {
initTree: function (nodes, setting) {
var setting = setting || this._configSetting();
this.nodes = $.fn.zTree.init(this.tree.element, setting, nodes);
this.nodes = BI.$.fn.zTree.init(this.tree.element, setting, nodes);
},
destroy: function () {
@ -9229,7 +9229,7 @@ BI.ListDisplayTree = BI.inherit(BI.ListTreeView, {
initTree: function (nodes, setting) {
var setting = setting || this._configSetting();
this.nodes = $.fn.zTree.init(this.tree.element, setting, nodes);
this.nodes = BI.$.fn.zTree.init(this.tree.element, setting, nodes);
},
destroy: function () {

38
dist/core.js vendored

@ -12131,11 +12131,11 @@ if (!_global.BI) {
if (BI.isWidget(widget)) {
var o = widget.options;
if (o.element) {
return $(o.element);
return BI.$(o.element);
}
return $(document.createElement(o.tagName));
return BI.$(document.createElement(o.tagName));
}
return $(widget);
return BI.$(widget);
},
createFragment: function () {
return document.createDocumentFragment();
@ -18360,7 +18360,7 @@ BI.ShowAction = BI.inherit(BI.Action, {
try {
// 注意0啊
// var jo = $.parseJSON(text) || {};
var jo = _global.$ ? _global.$.parseJSON(text) : _global.JSON.parse(text);
var jo = BI.$ ? BI.$.parseJSON(text) : _global.JSON.parse(text);
if (jo == null) {
jo = {};
}
@ -32336,7 +32336,7 @@ jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
// })();
// Expose jQuery to the global object
window.jQuery = window.$ = jQuery;
BI.jQuery = BI.$ = jQuery;
// Expose jQuery as an AMD module, but only for AMD loaders that
// understand the issues with loading multiple versions of jQuery
@ -32357,13 +32357,13 @@ if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
})( window );/*
* 给jQuery.Event对象添加的工具方法
*/
$.extend($.Event.prototype, {
BI.$.extend(BI.$.Event.prototype, {
// event.stopEvent
stopEvent: function () {
this.stopPropagation();
this.preventDefault();
}
});if (jQuery) {
});if (BI.jQuery) {
(function ($) {
// richer:容器在其各个边缘留出的空间
if (!$.fn.insets) {
@ -32419,9 +32419,9 @@ $.extend($.Event.prototype, {
};
}
})(jQuery);
})(BI.jQuery);
BI.extend(jQuery.fn, {
BI.extend(BI.jQuery.fn, {
destroy: function () {
this.remove();
@ -32464,7 +32464,7 @@ $.extend($.Event.prototype, {
if (tidx >= 0) {
// 标红的text未encode
this.append(BI.htmlEncode(textLeft.substr(0, tidx)));
this.append($("<span>").addClass("bi-keyword-red-mark")
this.append(BI.$("<span>").addClass("bi-keyword-red-mark")
.html(BI.htmlEncode(textLeft.substr(tidx, keyword.length))));
textLeft = textLeft.substr(tidx + keyword.length);
@ -32474,7 +32474,7 @@ $.extend($.Event.prototype, {
} else if (pidx != null && pidx >= 0 && Math.floor(pidx / text.length) === Math.floor((pidx + keyword.length - 1) / text.length)) {
// 标红的text未encode
this.append(BI.htmlEncode(textLeft.substr(0, pidx)));
this.append($("<span>").addClass("bi-keyword-red-mark")
this.append(BI.$("<span>").addClass("bi-keyword-red-mark")
.html(BI.htmlEncode(textLeft.substr(pidx, keyword.length))));
if (py != null) {
py = py.substr(pidx + keyword.length);
@ -32491,8 +32491,8 @@ $.extend($.Event.prototype, {
},
getDomHeight: function (parent) {
var clone = $(this).clone();
clone.appendTo($(parent || "body"));
var clone = BI.$(this).clone();
clone.appendTo(BI.$(parent || "body"));
var height = clone.height();
clone.remove();
return height;
@ -32597,17 +32597,17 @@ _.extend(BI, {
$import: function () {
var _LOADED = {}; // alex:保存加载过的
function loadReady (src, must) {
var $scripts = $("head script, body script");
$.each($scripts, function (i, item) {
var $scripts = BI.$("head script, body script");
BI.$.each($scripts, function (i, item) {
if (item.src.indexOf(src) != -1) {
_LOADED[src] = true;
}
});
var $links = $("head link");
$.each($links, function (i, item) {
var $links = BI.$("head link");
BI.$.each($links, function (i, item) {
if (item.href.indexOf(src) != -1 && must) {
_LOADED[src] = false;
$(item).remove();
BI.$(item).remove();
}
});
}
@ -32629,7 +32629,7 @@ _.extend(BI, {
_LOADED[src] = true;
} else {
// alex:这里用同步调用的方式,必须等待ajax完成
$.ajax({
BI.$.ajax({
url: src,
dataType: "script", // alex:指定dataType为script,jquery会帮忙做globalEval的事情
async: false,

6
dist/demo.js vendored

@ -1,7 +1,7 @@
Demo = {
version: 1.0
};
$(function () {
BI.$(function () {
var ref;
BI.each(Demo.CONFIG, function (index, item) {
@ -8962,13 +8962,13 @@ BI.shortcut("demo.main", Demo.Main);!(function () {
type: "bi.text_button",
text: "星空蓝",
handler: function () {
$("html").removeClass("bi-theme-default").addClass("bi-theme-dark");
BI.$("html").removeClass("bi-theme-default").addClass("bi-theme-dark");
}
}, {
type: "bi.text_button",
text: "典雅白",
handler: function () {
$("html").removeClass("bi-theme-dark").addClass("bi-theme-default");
BI.$("html").removeClass("bi-theme-dark").addClass("bi-theme-default");
}
}]
}

68
dist/fineui.ie.js vendored

@ -12376,11 +12376,11 @@ if (!_global.BI) {
if (BI.isWidget(widget)) {
var o = widget.options;
if (o.element) {
return $(o.element);
return BI.$(o.element);
}
return $(document.createElement(o.tagName));
return BI.$(document.createElement(o.tagName));
}
return $(widget);
return BI.$(widget);
},
createFragment: function () {
return document.createDocumentFragment();
@ -18605,7 +18605,7 @@ BI.ShowAction = BI.inherit(BI.Action, {
try {
// 注意0啊
// var jo = $.parseJSON(text) || {};
var jo = _global.$ ? _global.$.parseJSON(text) : _global.JSON.parse(text);
var jo = BI.$ ? BI.$.parseJSON(text) : _global.JSON.parse(text);
if (jo == null) {
jo = {};
}
@ -32581,7 +32581,7 @@ jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
// })();
// Expose jQuery to the global object
window.jQuery = window.$ = jQuery;
BI.jQuery = BI.$ = jQuery;
// Expose jQuery as an AMD module, but only for AMD loaders that
// understand the issues with loading multiple versions of jQuery
@ -32602,13 +32602,13 @@ if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
})( window );/*
* 给jQuery.Event对象添加的工具方法
*/
$.extend($.Event.prototype, {
BI.$.extend(BI.$.Event.prototype, {
// event.stopEvent
stopEvent: function () {
this.stopPropagation();
this.preventDefault();
}
});if (jQuery) {
});if (BI.jQuery) {
(function ($) {
// richer:容器在其各个边缘留出的空间
if (!$.fn.insets) {
@ -32664,9 +32664,9 @@ $.extend($.Event.prototype, {
};
}
})(jQuery);
})(BI.jQuery);
BI.extend(jQuery.fn, {
BI.extend(BI.jQuery.fn, {
destroy: function () {
this.remove();
@ -32709,7 +32709,7 @@ $.extend($.Event.prototype, {
if (tidx >= 0) {
// 标红的text未encode
this.append(BI.htmlEncode(textLeft.substr(0, tidx)));
this.append($("<span>").addClass("bi-keyword-red-mark")
this.append(BI.$("<span>").addClass("bi-keyword-red-mark")
.html(BI.htmlEncode(textLeft.substr(tidx, keyword.length))));
textLeft = textLeft.substr(tidx + keyword.length);
@ -32719,7 +32719,7 @@ $.extend($.Event.prototype, {
} else if (pidx != null && pidx >= 0 && Math.floor(pidx / text.length) === Math.floor((pidx + keyword.length - 1) / text.length)) {
// 标红的text未encode
this.append(BI.htmlEncode(textLeft.substr(0, pidx)));
this.append($("<span>").addClass("bi-keyword-red-mark")
this.append(BI.$("<span>").addClass("bi-keyword-red-mark")
.html(BI.htmlEncode(textLeft.substr(pidx, keyword.length))));
if (py != null) {
py = py.substr(pidx + keyword.length);
@ -32736,8 +32736,8 @@ $.extend($.Event.prototype, {
},
getDomHeight: function (parent) {
var clone = $(this).clone();
clone.appendTo($(parent || "body"));
var clone = BI.$(this).clone();
clone.appendTo(BI.$(parent || "body"));
var height = clone.height();
clone.remove();
return height;
@ -32842,17 +32842,17 @@ _.extend(BI, {
$import: function () {
var _LOADED = {}; // alex:保存加载过的
function loadReady (src, must) {
var $scripts = $("head script, body script");
$.each($scripts, function (i, item) {
var $scripts = BI.$("head script, body script");
BI.$.each($scripts, function (i, item) {
if (item.src.indexOf(src) != -1) {
_LOADED[src] = true;
}
});
var $links = $("head link");
$.each($links, function (i, item) {
var $links = BI.$("head link");
BI.$.each($links, function (i, item) {
if (item.href.indexOf(src) != -1 && must) {
_LOADED[src] = false;
$(item).remove();
BI.$(item).remove();
}
});
}
@ -32874,7 +32874,7 @@ _.extend(BI, {
_LOADED[src] = true;
} else {
// alex:这里用同步调用的方式,必须等待ajax完成
$.ajax({
BI.$.ajax({
url: src,
dataType: "script", // alex:指定dataType为script,jquery会帮忙做globalEval的事情
async: false,
@ -38159,7 +38159,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
module.exports = factory;
} else {
// Browser globals
factory(jQuery);
factory(BI.jQuery);
}
}(function ($) {
@ -40013,7 +40013,7 @@ BI.TreeView = BI.inherit(BI.Pane, {
track(treeNode.children);
var treeObj = self.nodes;
var nodes = treeObj.getSelectedNodes();
$.each(nodes, function (index, node) {
BI.$.each(nodes, function (index, node) {
node.halfCheck = false;
});
}
@ -40150,7 +40150,7 @@ BI.TreeView = BI.inherit(BI.Pane, {
n.isParent = n.isParent || n.parent;
// 处理标红
if (BI.isKey(o.paras.keyword)) {
n.text = $("<div>").__textKeywordMarked__(n.text, o.paras.keyword, n.py).html();
n.text = BI.$("<div>").__textKeywordMarked__(n.text, o.paras.keyword, n.py).html();
} else {
n.text = BI.htmlEncode(n.text + "");
}
@ -40194,7 +40194,7 @@ BI.TreeView = BI.inherit(BI.Pane, {
if (self._stop === true) {
return;
}
self.nodes = $.fn.zTree.init(tree.element, setting, nodes);
self.nodes = BI.$.fn.zTree.init(tree.element, setting, nodes);
};
var op = BI.extend({}, o.paras, {
times: 1
@ -40244,7 +40244,7 @@ BI.TreeView = BI.inherit(BI.Pane, {
},
callback: {}
};
this.nodes = $.fn.zTree.init(this.tree.element, setting, nodes);
this.nodes = BI.$.fn.zTree.init(this.tree.element, setting, nodes);
},
start: function () {
@ -40402,7 +40402,7 @@ BI.AsyncTree = BI.inherit(BI.TreeView, {
};
function onClick (event, treeId, treeNode) {
var zTree = $.fn.zTree.getZTreeObj(treeId);
var zTree = BI.$.fn.zTree.getZTreeObj(treeId);
// 当前点击节点的状态是半选,且为true_part, 则将其改为false_part,使得点击半选后切换到的是全选
var checked = treeNode.checked;
var status = treeNode.getCheckStatus();
@ -40428,7 +40428,7 @@ BI.AsyncTree = BI.inherit(BI.TreeView, {
track(treeNode.children);
var treeObj = $.fn.zTree.getZTreeObj(treeId);
var treeObj = BI.$.fn.zTree.getZTreeObj(treeId);
var nodes = treeObj.getSelectedNodes();
BI.each(nodes, function (index, node) {
node.halfCheck = false;
@ -40723,7 +40723,7 @@ BI.PartTree = BI.inherit(BI.AsyncTree, {
if (self._stop === true) {
return;
}
self.nodes = $.fn.zTree.init(tree.element, setting, nodes);
self.nodes = BI.$.fn.zTree.init(tree.element, setting, nodes);
}
BI.delay(function () {
@ -40802,7 +40802,7 @@ BI.ListTreeView = BI.inherit(BI.TreeView, {
};
function onClick (event, treeId, treeNode) {
var zTree = $.fn.zTree.getZTreeObj(treeId);
var zTree = BI.$.fn.zTree.getZTreeObj(treeId);
var checked = treeNode.checked;
self._checkValue(treeNode, !checked);
zTree.checkNode(treeNode, !checked, true, true);
@ -40915,7 +40915,7 @@ BI.ListAsyncTree = BI.inherit(BI.ListTreeView, {
}
function onClick (event, treeId, treeNode) {
var zTree = $.fn.zTree.getZTreeObj(treeId);
var zTree = BI.$.fn.zTree.getZTreeObj(treeId);
var checked = treeNode.checked;
self._checkValue(treeNode, !checked);
zTree.checkNode(treeNode, !checked, true, true);
@ -41053,7 +41053,7 @@ BI.ListPartTree = BI.inherit(BI.ListAsyncTree, {
if (self._stop === true) {
return;
}
self.nodes = $.fn.zTree.init(tree.element, setting, nodes);
self.nodes = BI.$.fn.zTree.init(tree.element, setting, nodes);
}
BI.delay(function () {
@ -51667,7 +51667,7 @@ BI.shortcut("bi.custom_tree", BI.CustomTree);/*
var zt = $.fn.zTree,
$$ = tools.$,
consts = zt.consts;
})(jQuery);/*
})(BI.jQuery);/*
* JQuery zTree excheck v3.5.18
* http://zTree.me/
*
@ -52296,7 +52296,7 @@ BI.shortcut("bi.custom_tree", BI.CustomTree);/*
}
return html;
}
})(jQuery);/**
})(BI.jQuery);/**
* 可以改变图标的button
*
* Created by GUY on 2016/2/2.
@ -61450,7 +61450,7 @@ BI.DisplayTree = BI.inherit(BI.TreeView, {
initTree: function (nodes, setting) {
var setting = setting || this._configSetting();
this.nodes = $.fn.zTree.init(this.tree.element, setting, nodes);
this.nodes = BI.$.fn.zTree.init(this.tree.element, setting, nodes);
},
destroy: function () {
@ -61527,7 +61527,7 @@ BI.ListDisplayTree = BI.inherit(BI.ListTreeView, {
initTree: function (nodes, setting) {
var setting = setting || this._configSetting();
this.nodes = $.fn.zTree.init(this.tree.element, setting, nodes);
this.nodes = BI.$.fn.zTree.init(this.tree.element, setting, nodes);
},
destroy: function () {

20
dist/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

68
dist/fineui.js vendored

@ -12376,11 +12376,11 @@ if (!_global.BI) {
if (BI.isWidget(widget)) {
var o = widget.options;
if (o.element) {
return $(o.element);
return BI.$(o.element);
}
return $(document.createElement(o.tagName));
return BI.$(document.createElement(o.tagName));
}
return $(widget);
return BI.$(widget);
},
createFragment: function () {
return document.createDocumentFragment();
@ -18605,7 +18605,7 @@ BI.ShowAction = BI.inherit(BI.Action, {
try {
// 注意0啊
// var jo = $.parseJSON(text) || {};
var jo = _global.$ ? _global.$.parseJSON(text) : _global.JSON.parse(text);
var jo = BI.$ ? BI.$.parseJSON(text) : _global.JSON.parse(text);
if (jo == null) {
jo = {};
}
@ -32581,7 +32581,7 @@ jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
// })();
// Expose jQuery to the global object
window.jQuery = window.$ = jQuery;
BI.jQuery = BI.$ = jQuery;
// Expose jQuery as an AMD module, but only for AMD loaders that
// understand the issues with loading multiple versions of jQuery
@ -32602,13 +32602,13 @@ if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
})( window );/*
* 给jQuery.Event对象添加的工具方法
*/
$.extend($.Event.prototype, {
BI.$.extend(BI.$.Event.prototype, {
// event.stopEvent
stopEvent: function () {
this.stopPropagation();
this.preventDefault();
}
});if (jQuery) {
});if (BI.jQuery) {
(function ($) {
// richer:容器在其各个边缘留出的空间
if (!$.fn.insets) {
@ -32664,9 +32664,9 @@ $.extend($.Event.prototype, {
};
}
})(jQuery);
})(BI.jQuery);
BI.extend(jQuery.fn, {
BI.extend(BI.jQuery.fn, {
destroy: function () {
this.remove();
@ -32709,7 +32709,7 @@ $.extend($.Event.prototype, {
if (tidx >= 0) {
// 标红的text未encode
this.append(BI.htmlEncode(textLeft.substr(0, tidx)));
this.append($("<span>").addClass("bi-keyword-red-mark")
this.append(BI.$("<span>").addClass("bi-keyword-red-mark")
.html(BI.htmlEncode(textLeft.substr(tidx, keyword.length))));
textLeft = textLeft.substr(tidx + keyword.length);
@ -32719,7 +32719,7 @@ $.extend($.Event.prototype, {
} else if (pidx != null && pidx >= 0 && Math.floor(pidx / text.length) === Math.floor((pidx + keyword.length - 1) / text.length)) {
// 标红的text未encode
this.append(BI.htmlEncode(textLeft.substr(0, pidx)));
this.append($("<span>").addClass("bi-keyword-red-mark")
this.append(BI.$("<span>").addClass("bi-keyword-red-mark")
.html(BI.htmlEncode(textLeft.substr(pidx, keyword.length))));
if (py != null) {
py = py.substr(pidx + keyword.length);
@ -32736,8 +32736,8 @@ $.extend($.Event.prototype, {
},
getDomHeight: function (parent) {
var clone = $(this).clone();
clone.appendTo($(parent || "body"));
var clone = BI.$(this).clone();
clone.appendTo(BI.$(parent || "body"));
var height = clone.height();
clone.remove();
return height;
@ -32842,17 +32842,17 @@ _.extend(BI, {
$import: function () {
var _LOADED = {}; // alex:保存加载过的
function loadReady (src, must) {
var $scripts = $("head script, body script");
$.each($scripts, function (i, item) {
var $scripts = BI.$("head script, body script");
BI.$.each($scripts, function (i, item) {
if (item.src.indexOf(src) != -1) {
_LOADED[src] = true;
}
});
var $links = $("head link");
$.each($links, function (i, item) {
var $links = BI.$("head link");
BI.$.each($links, function (i, item) {
if (item.href.indexOf(src) != -1 && must) {
_LOADED[src] = false;
$(item).remove();
BI.$(item).remove();
}
});
}
@ -32874,7 +32874,7 @@ _.extend(BI, {
_LOADED[src] = true;
} else {
// alex:这里用同步调用的方式,必须等待ajax完成
$.ajax({
BI.$.ajax({
url: src,
dataType: "script", // alex:指定dataType为script,jquery会帮忙做globalEval的事情
async: false,
@ -38563,7 +38563,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
module.exports = factory;
} else {
// Browser globals
factory(jQuery);
factory(BI.jQuery);
}
}(function ($) {
@ -40417,7 +40417,7 @@ BI.TreeView = BI.inherit(BI.Pane, {
track(treeNode.children);
var treeObj = self.nodes;
var nodes = treeObj.getSelectedNodes();
$.each(nodes, function (index, node) {
BI.$.each(nodes, function (index, node) {
node.halfCheck = false;
});
}
@ -40554,7 +40554,7 @@ BI.TreeView = BI.inherit(BI.Pane, {
n.isParent = n.isParent || n.parent;
// 处理标红
if (BI.isKey(o.paras.keyword)) {
n.text = $("<div>").__textKeywordMarked__(n.text, o.paras.keyword, n.py).html();
n.text = BI.$("<div>").__textKeywordMarked__(n.text, o.paras.keyword, n.py).html();
} else {
n.text = BI.htmlEncode(n.text + "");
}
@ -40598,7 +40598,7 @@ BI.TreeView = BI.inherit(BI.Pane, {
if (self._stop === true) {
return;
}
self.nodes = $.fn.zTree.init(tree.element, setting, nodes);
self.nodes = BI.$.fn.zTree.init(tree.element, setting, nodes);
};
var op = BI.extend({}, o.paras, {
times: 1
@ -40648,7 +40648,7 @@ BI.TreeView = BI.inherit(BI.Pane, {
},
callback: {}
};
this.nodes = $.fn.zTree.init(this.tree.element, setting, nodes);
this.nodes = BI.$.fn.zTree.init(this.tree.element, setting, nodes);
},
start: function () {
@ -40806,7 +40806,7 @@ BI.AsyncTree = BI.inherit(BI.TreeView, {
};
function onClick (event, treeId, treeNode) {
var zTree = $.fn.zTree.getZTreeObj(treeId);
var zTree = BI.$.fn.zTree.getZTreeObj(treeId);
// 当前点击节点的状态是半选,且为true_part, 则将其改为false_part,使得点击半选后切换到的是全选
var checked = treeNode.checked;
var status = treeNode.getCheckStatus();
@ -40832,7 +40832,7 @@ BI.AsyncTree = BI.inherit(BI.TreeView, {
track(treeNode.children);
var treeObj = $.fn.zTree.getZTreeObj(treeId);
var treeObj = BI.$.fn.zTree.getZTreeObj(treeId);
var nodes = treeObj.getSelectedNodes();
BI.each(nodes, function (index, node) {
node.halfCheck = false;
@ -41127,7 +41127,7 @@ BI.PartTree = BI.inherit(BI.AsyncTree, {
if (self._stop === true) {
return;
}
self.nodes = $.fn.zTree.init(tree.element, setting, nodes);
self.nodes = BI.$.fn.zTree.init(tree.element, setting, nodes);
}
BI.delay(function () {
@ -41206,7 +41206,7 @@ BI.ListTreeView = BI.inherit(BI.TreeView, {
};
function onClick (event, treeId, treeNode) {
var zTree = $.fn.zTree.getZTreeObj(treeId);
var zTree = BI.$.fn.zTree.getZTreeObj(treeId);
var checked = treeNode.checked;
self._checkValue(treeNode, !checked);
zTree.checkNode(treeNode, !checked, true, true);
@ -41319,7 +41319,7 @@ BI.ListAsyncTree = BI.inherit(BI.ListTreeView, {
}
function onClick (event, treeId, treeNode) {
var zTree = $.fn.zTree.getZTreeObj(treeId);
var zTree = BI.$.fn.zTree.getZTreeObj(treeId);
var checked = treeNode.checked;
self._checkValue(treeNode, !checked);
zTree.checkNode(treeNode, !checked, true, true);
@ -41457,7 +41457,7 @@ BI.ListPartTree = BI.inherit(BI.ListAsyncTree, {
if (self._stop === true) {
return;
}
self.nodes = $.fn.zTree.init(tree.element, setting, nodes);
self.nodes = BI.$.fn.zTree.init(tree.element, setting, nodes);
}
BI.delay(function () {
@ -52071,7 +52071,7 @@ BI.shortcut("bi.custom_tree", BI.CustomTree);/*
var zt = $.fn.zTree,
$$ = tools.$,
consts = zt.consts;
})(jQuery);/*
})(BI.jQuery);/*
* JQuery zTree excheck v3.5.18
* http://zTree.me/
*
@ -52700,7 +52700,7 @@ BI.shortcut("bi.custom_tree", BI.CustomTree);/*
}
return html;
}
})(jQuery);/**
})(BI.jQuery);/**
* 可以改变图标的button
*
* Created by GUY on 2016/2/2.
@ -61854,7 +61854,7 @@ BI.DisplayTree = BI.inherit(BI.TreeView, {
initTree: function (nodes, setting) {
var setting = setting || this._configSetting();
this.nodes = $.fn.zTree.init(this.tree.element, setting, nodes);
this.nodes = BI.$.fn.zTree.init(this.tree.element, setting, nodes);
},
destroy: function () {
@ -61931,7 +61931,7 @@ BI.ListDisplayTree = BI.inherit(BI.ListTreeView, {
initTree: function (nodes, setting) {
var setting = setting || this._configSetting();
this.nodes = $.fn.zTree.init(this.tree.element, setting, nodes);
this.nodes = BI.$.fn.zTree.init(this.tree.element, setting, nodes);
},
destroy: function () {

2
dist/fineui.min.css vendored

File diff suppressed because one or more lines are too long

70
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

8
dist/fineui_without_jquery_polyfill.js vendored

@ -12131,11 +12131,11 @@ if (!_global.BI) {
if (BI.isWidget(widget)) {
var o = widget.options;
if (o.element) {
return $(o.element);
return BI.$(o.element);
}
return $(document.createElement(o.tagName));
return BI.$(document.createElement(o.tagName));
}
return $(widget);
return BI.$(widget);
},
createFragment: function () {
return document.createDocumentFragment();
@ -18106,7 +18106,7 @@ BI.ShowAction = BI.inherit(BI.Action, {
try {
// 注意0啊
// var jo = $.parseJSON(text) || {};
var jo = _global.$ ? _global.$.parseJSON(text) : _global.JSON.parse(text);
var jo = BI.$ ? BI.$.parseJSON(text) : _global.JSON.parse(text);
if (jo == null) {
jo = {};
}

2
dist/utils.js vendored

@ -12987,7 +12987,7 @@ if (!_global.BI) {
try {
// 注意0啊
// var jo = $.parseJSON(text) || {};
var jo = _global.$ ? _global.$.parseJSON(text) : _global.JSON.parse(text);
var jo = BI.$ ? BI.$.parseJSON(text) : _global.JSON.parse(text);
if (jo == null) {
jo = {};
}

4
dist/utils.min.js vendored

File diff suppressed because one or more lines are too long

4
src/base/tree/ztree/asynctree.js

@ -50,7 +50,7 @@ BI.AsyncTree = BI.inherit(BI.TreeView, {
};
function onClick (event, treeId, treeNode) {
var zTree = $.fn.zTree.getZTreeObj(treeId);
var zTree = BI.$.fn.zTree.getZTreeObj(treeId);
// 当前点击节点的状态是半选,且为true_part, 则将其改为false_part,使得点击半选后切换到的是全选
var checked = treeNode.checked;
var status = treeNode.getCheckStatus();
@ -76,7 +76,7 @@ BI.AsyncTree = BI.inherit(BI.TreeView, {
track(treeNode.children);
var treeObj = $.fn.zTree.getZTreeObj(treeId);
var treeObj = BI.$.fn.zTree.getZTreeObj(treeId);
var nodes = treeObj.getSelectedNodes();
BI.each(nodes, function (index, node) {
node.halfCheck = false;

2
src/base/tree/ztree/jquery.ztree.core-3.5.js

@ -1712,4 +1712,4 @@
var zt = $.fn.zTree,
$$ = tools.$,
consts = zt.consts;
})(jQuery);
})(BI.jQuery);

2
src/base/tree/ztree/jquery.ztree.excheck-3.5.js

@ -627,4 +627,4 @@
}
return html;
}
})(jQuery);
})(BI.jQuery);

2
src/base/tree/ztree/list/listasynctree.js

@ -54,7 +54,7 @@ BI.ListAsyncTree = BI.inherit(BI.ListTreeView, {
}
function onClick (event, treeId, treeNode) {
var zTree = $.fn.zTree.getZTreeObj(treeId);
var zTree = BI.$.fn.zTree.getZTreeObj(treeId);
var checked = treeNode.checked;
self._checkValue(treeNode, !checked);
zTree.checkNode(treeNode, !checked, true, true);

2
src/base/tree/ztree/list/listparttree.js

@ -70,7 +70,7 @@ BI.ListPartTree = BI.inherit(BI.ListAsyncTree, {
if (self._stop === true) {
return;
}
self.nodes = $.fn.zTree.init(tree.element, setting, nodes);
self.nodes = BI.$.fn.zTree.init(tree.element, setting, nodes);
}
BI.delay(function () {

2
src/base/tree/ztree/list/listtreeview.js

@ -54,7 +54,7 @@ BI.ListTreeView = BI.inherit(BI.TreeView, {
};
function onClick (event, treeId, treeNode) {
var zTree = $.fn.zTree.getZTreeObj(treeId);
var zTree = BI.$.fn.zTree.getZTreeObj(treeId);
var checked = treeNode.checked;
self._checkValue(treeNode, !checked);
zTree.checkNode(treeNode, !checked, true, true);

2
src/base/tree/ztree/parttree.js

@ -143,7 +143,7 @@ BI.PartTree = BI.inherit(BI.AsyncTree, {
if (self._stop === true) {
return;
}
self.nodes = $.fn.zTree.init(tree.element, setting, nodes);
self.nodes = BI.$.fn.zTree.init(tree.element, setting, nodes);
}
BI.delay(function () {

8
src/base/tree/ztree/treeview.js

@ -197,7 +197,7 @@ BI.TreeView = BI.inherit(BI.Pane, {
track(treeNode.children);
var treeObj = self.nodes;
var nodes = treeObj.getSelectedNodes();
$.each(nodes, function (index, node) {
BI.$.each(nodes, function (index, node) {
node.halfCheck = false;
});
}
@ -334,7 +334,7 @@ BI.TreeView = BI.inherit(BI.Pane, {
n.isParent = n.isParent || n.parent;
// 处理标红
if (BI.isKey(o.paras.keyword)) {
n.text = $("<div>").__textKeywordMarked__(n.text, o.paras.keyword, n.py).html();
n.text = BI.$("<div>").__textKeywordMarked__(n.text, o.paras.keyword, n.py).html();
} else {
n.text = BI.htmlEncode(n.text + "");
}
@ -378,7 +378,7 @@ BI.TreeView = BI.inherit(BI.Pane, {
if (self._stop === true) {
return;
}
self.nodes = $.fn.zTree.init(tree.element, setting, nodes);
self.nodes = BI.$.fn.zTree.init(tree.element, setting, nodes);
};
var op = BI.extend({}, o.paras, {
times: 1
@ -428,7 +428,7 @@ BI.TreeView = BI.inherit(BI.Pane, {
},
callback: {}
};
this.nodes = $.fn.zTree.init(this.tree.element, setting, nodes);
this.nodes = BI.$.fn.zTree.init(this.tree.element, setting, nodes);
},
start: function () {

2
src/case/tree/ztree/tree.display.js

@ -61,7 +61,7 @@ BI.DisplayTree = BI.inherit(BI.TreeView, {
initTree: function (nodes, setting) {
var setting = setting || this._configSetting();
this.nodes = $.fn.zTree.init(this.tree.element, setting, nodes);
this.nodes = BI.$.fn.zTree.init(this.tree.element, setting, nodes);
},
destroy: function () {

2
src/case/tree/ztree/tree.list.display.js

@ -66,7 +66,7 @@ BI.ListDisplayTree = BI.inherit(BI.ListTreeView, {
initTree: function (nodes, setting) {
var setting = setting || this._configSetting();
this.nodes = $.fn.zTree.init(this.tree.element, setting, nodes);
this.nodes = BI.$.fn.zTree.init(this.tree.element, setting, nodes);
},
destroy: function () {

2
src/core/alias.js

@ -562,7 +562,7 @@
try {
// 注意0啊
// var jo = $.parseJSON(text) || {};
var jo = _global.$ ? _global.$.parseJSON(text) : _global.JSON.parse(text);
var jo = BI.$ ? BI.$.parseJSON(text) : _global.JSON.parse(text);
if (jo == null) {
jo = {};
}

2
src/core/platform/web/jquery/_jquery.js vendored

@ -9595,7 +9595,7 @@ jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
// })();
// Expose jQuery to the global object
window.jQuery = window.$ = jQuery;
BI.jQuery = BI.$ = jQuery;
// Expose jQuery as an AMD module, but only for AMD loaders that
// understand the issues with loading multiple versions of jQuery

2
src/core/platform/web/jquery/event.js vendored

@ -1,7 +1,7 @@
/*
* 给jQuery.Event对象添加的工具方法
*/
$.extend($.Event.prototype, {
BI.$.extend(BI.$.Event.prototype, {
// event.stopEvent
stopEvent: function () {
this.stopPropagation();

14
src/core/platform/web/jquery/fn.js vendored

@ -1,4 +1,4 @@
if (jQuery) {
if (BI.jQuery) {
(function ($) {
// richer:容器在其各个边缘留出的空间
if (!$.fn.insets) {
@ -54,9 +54,9 @@ if (jQuery) {
};
}
})(jQuery);
})(BI.jQuery);
BI.extend(jQuery.fn, {
BI.extend(BI.jQuery.fn, {
destroy: function () {
this.remove();
@ -99,7 +99,7 @@ if (jQuery) {
if (tidx >= 0) {
// 标红的text未encode
this.append(BI.htmlEncode(textLeft.substr(0, tidx)));
this.append($("<span>").addClass("bi-keyword-red-mark")
this.append(BI.$("<span>").addClass("bi-keyword-red-mark")
.html(BI.htmlEncode(textLeft.substr(tidx, keyword.length))));
textLeft = textLeft.substr(tidx + keyword.length);
@ -109,7 +109,7 @@ if (jQuery) {
} else if (pidx != null && pidx >= 0 && Math.floor(pidx / text.length) === Math.floor((pidx + keyword.length - 1) / text.length)) {
// 标红的text未encode
this.append(BI.htmlEncode(textLeft.substr(0, pidx)));
this.append($("<span>").addClass("bi-keyword-red-mark")
this.append(BI.$("<span>").addClass("bi-keyword-red-mark")
.html(BI.htmlEncode(textLeft.substr(pidx, keyword.length))));
if (py != null) {
py = py.substr(pidx + keyword.length);
@ -126,8 +126,8 @@ if (jQuery) {
},
getDomHeight: function (parent) {
var clone = $(this).clone();
clone.appendTo($(parent || "body"));
var clone = BI.$(this).clone();
clone.appendTo(BI.$(parent || "body"));
var height = clone.height();
clone.remove();
return height;

12
src/core/platform/web/load.js

@ -2,17 +2,17 @@ _.extend(BI, {
$import: function () {
var _LOADED = {}; // alex:保存加载过的
function loadReady (src, must) {
var $scripts = $("head script, body script");
$.each($scripts, function (i, item) {
var $scripts = BI.$("head script, body script");
BI.$.each($scripts, function (i, item) {
if (item.src.indexOf(src) != -1) {
_LOADED[src] = true;
}
});
var $links = $("head link");
$.each($links, function (i, item) {
var $links = BI.$("head link");
BI.$.each($links, function (i, item) {
if (item.href.indexOf(src) != -1 && must) {
_LOADED[src] = false;
$(item).remove();
BI.$(item).remove();
}
});
}
@ -34,7 +34,7 @@ _.extend(BI, {
_LOADED[src] = true;
} else {
// alex:这里用同步调用的方式,必须等待ajax完成
$.ajax({
BI.$.ajax({
url: src,
dataType: "script", // alex:指定dataType为script,jquery会帮忙做globalEval的事情
async: false,

6
src/core/widget.js

@ -497,11 +497,11 @@
if (BI.isWidget(widget)) {
var o = widget.options;
if (o.element) {
return $(o.element);
return BI.$(o.element);
}
return $(document.createElement(o.tagName));
return BI.$(document.createElement(o.tagName));
}
return $(widget);
return BI.$(widget);
},
createFragment: function () {
return document.createDocumentFragment();

2
src/third/jquery.mousewheel.js

@ -15,7 +15,7 @@
module.exports = factory;
} else {
// Browser globals
factory(jQuery);
factory(BI.jQuery);
}
}(function ($) {

8
test/utils.js

@ -14,19 +14,19 @@
*/
triggerKeyDown: function (element, value, keyCode, callback) {
// keydown
var e = $.Event("keydown");
var e = BI.$.Event("keydown");
e.keyCode = keyCode;
element.trigger(e);
// input
BI.isNotNull(value) && element.val(value);
var e1 = $.Event("input");
var e1 = BI.$.Event("input");
e1.originalEvent = {};
e1.keyCode = keyCode;
element.trigger(e1);
// keyup 至少等300ms后触发
var e2 = $.Event("keyup");
var e2 = BI.$.Event("keyup");
e2.keyCode = keyCode;
element.trigger(e2);
BI.delay(function () {
@ -39,7 +39,7 @@
*/
triggerMouseover: function (element, callback) {
// keydown
var e = $.Event("mouseover");
var e = BI.$.Event("mouseover");
element.trigger(e);
callback && callback();
}

Loading…
Cancel
Save