Browse Source

Merge pull request #782 in VISUAL/fineui from ~DAILER/fineui:master to master

* commit '1872ddaa445a179015c732b5b03549d01ed699d9':
  BI.AbstractTreeValueChooser  搜索的值选择状态getValue问题修复
master
windy 6 years ago
parent
commit
0125feecb2
  1. 47
      dist/bundle.ie.js
  2. 4
      dist/bundle.ie.min.js
  3. 47
      dist/bundle.js
  4. 4
      dist/bundle.min.js
  5. 47
      dist/fineui.ie.js
  6. 4
      dist/fineui.ie.min.js
  7. 47
      dist/fineui.js
  8. 4
      dist/fineui.min.js
  9. 47
      dist/fineui_without_jquery_polyfill.js
  10. 2
      dist/utils.min.js
  11. 47
      dist/widget.js
  12. 47
      src/component/treevaluechooser/abstract.treevaluechooser.js

47
dist/bundle.ie.js vendored

@ -81476,7 +81476,8 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
} else {
call();
}
function call () {
function call() {
switch (options.type) {
case BI.TreeView.REQ_TYPE_INIT_DATA:
self._reqInitTreeNode(options, callback);
@ -81513,7 +81514,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
items: result
});
function doCheck (parentValues, node, selected) {
function doCheck(parentValues, node, selected) {
if (selected == null || BI.isEmpty(selected)) {
BI.each(node.getChildren(), function (i, child) {
var newParents = BI.clone(parentValues);
@ -81533,7 +81534,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
});
}
function getCount (jo, parentValues) {
function getCount(jo, parentValues) {
if (jo == null) {
return 0;
}
@ -81544,7 +81545,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
return BI.size(jo);
}
function createOneJson (node, pId, llen) {
function createOneJson(node, pId, llen) {
result.push({
id: node.id,
pId: pId,
@ -81571,7 +81572,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
callback(selectedValues);
function dealWithSelectedValues (selectedValues) {
function dealWithSelectedValues(selectedValues) {
var p = parentValues.concat(notSelectedValue);
// 存储的值中存在这个值就把它删掉
// 例如选中了中国-江苏-南京, 取消中国或江苏或南京
@ -81627,7 +81628,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
}
function expandSelectedValue (selectedValues, parents, notSelectedValue) {
function expandSelectedValue(selectedValues, parents, notSelectedValue) {
var next = selectedValues;
var childrenCount = [];
var path = [];
@ -81672,7 +81673,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
});
}
function search (parents, current, result, searched) {
function search(parents, current, result, searched) {
var newParents = BI.clone(parents);
newParents.push(current);
if (self._isMatch(parents, current, keyword)) {
@ -81702,16 +81703,16 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
return can;
}
function isSearchValueInParent (parentValues) {
function isSearchValueInParent(parentValues) {
for (var i = 0, len = parentValues.length; i < len; i++) {
if (self._isMatch(parentValues.slice(0, parentValues.length - 1), parentValues[i], keyword)) {
if (self._isMatch(parentValues.slice(0, parentValues.length - 1 - i), parentValues[i], keyword)) {
return true;
}
}
return false;
}
function canFindKey (selectedValues, parents) {
function canFindKey(selectedValues, parents) {
var t = selectedValues;
for (var i = 0; i < parents.length; i++) {
var v = parents[i];
@ -81723,7 +81724,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
return true;
}
function isChild (selectedValues, parents) {
function isChild(selectedValues, parents) {
var t = selectedValues;
for (var i = 0; i < parents.length; i++) {
var v = parents[i];
@ -81759,7 +81760,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
});
callback(jo);
function dealWithSelectedValues (selected, parents) {
function dealWithSelectedValues(selected, parents) {
if (selected == null || BI.isEmpty(selected)) {
return true;
}
@ -81779,7 +81780,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
return can && isAllSelected(selected, parents);
}
function isAllSelected (selected, parents) {
function isAllSelected(selected, parents) {
return BI.isEmpty(selected) || self._getChildCount(parents) === BI.size(selected);
}
},
@ -81799,7 +81800,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
});
});
function search () {
function search() {
var children = self._getChildren([]);
var start = children.length;
if (lastSearchValue !== "") {
@ -81829,7 +81830,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
return output;
}
function nodeSearch (deep, parentValues, current, isAllSelect, result) {
function nodeSearch(deep, parentValues, current, isAllSelect, result) {
if (self._isMatch(parentValues, current, keyword)) {
var checked = isAllSelect || isSelected(parentValues, current);
createOneJson(parentValues, current, false, checked, !isAllSelect && isHalf(parentValues, current), true, result);
@ -81858,7 +81859,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
return [can, checked];
}
function createOneJson (parentValues, value, isOpen, checked, half, flag, result) {
function createOneJson(parentValues, value, isOpen, checked, half, flag, result) {
var node = self._getTreeNode(parentValues, value);
result.push({
id: node.id,
@ -81874,7 +81875,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
});
}
function isHalf (parentValues, value) {
function isHalf(parentValues, value) {
var find = findSelectedObj(parentValues);
if (find == null) {
return null;
@ -81888,7 +81889,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
});
}
function isAllSelected (parentValues, value) {
function isAllSelected(parentValues, value) {
var find = findSelectedObj(parentValues);
if (find == null) {
return null;
@ -81902,7 +81903,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
});
}
function isSelected (parentValues, value) {
function isSelected(parentValues, value) {
var find = findSelectedObj(parentValues);
if (find == null) {
return false;
@ -81914,7 +81915,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
});
}
function findSelectedObj (parentValues) {
function findSelectedObj(parentValues) {
var find = selectedValues;
if (find == null) {
return null;
@ -81962,7 +81963,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
});
});
function judgeState (parentValues, selected_value, checkState) {
function judgeState(parentValues, selected_value, checkState) {
var checked = checkState.checked, half = checkState.half;
if (parentValues.length > 0 && !checked) {
return false;
@ -81970,7 +81971,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
return (parentValues.length === 0 || (checked && half) && !BI.isEmpty(selected_value));
}
function dealWidthSelectedValue (parentValues, selectedValues) {
function dealWidthSelectedValue(parentValues, selectedValues) {
var valueMap = {};
BI.each(parentValues, function (i, v) {
selectedValues = selectedValues[v] || {};
@ -81995,7 +81996,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
return valueMap;
}
function getCheckState (current, parentValues, valueMap, checkState) {
function getCheckState(current, parentValues, valueMap, checkState) {
var checked = checkState.checked, half = checkState.half;
var tempCheck = false, halfCheck = false;
if (BI.has(valueMap, current)) {

4
dist/bundle.ie.min.js vendored

File diff suppressed because one or more lines are too long

47
dist/bundle.js vendored

@ -81880,7 +81880,8 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
} else {
call();
}
function call () {
function call() {
switch (options.type) {
case BI.TreeView.REQ_TYPE_INIT_DATA:
self._reqInitTreeNode(options, callback);
@ -81917,7 +81918,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
items: result
});
function doCheck (parentValues, node, selected) {
function doCheck(parentValues, node, selected) {
if (selected == null || BI.isEmpty(selected)) {
BI.each(node.getChildren(), function (i, child) {
var newParents = BI.clone(parentValues);
@ -81937,7 +81938,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
});
}
function getCount (jo, parentValues) {
function getCount(jo, parentValues) {
if (jo == null) {
return 0;
}
@ -81948,7 +81949,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
return BI.size(jo);
}
function createOneJson (node, pId, llen) {
function createOneJson(node, pId, llen) {
result.push({
id: node.id,
pId: pId,
@ -81975,7 +81976,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
callback(selectedValues);
function dealWithSelectedValues (selectedValues) {
function dealWithSelectedValues(selectedValues) {
var p = parentValues.concat(notSelectedValue);
// 存储的值中存在这个值就把它删掉
// 例如选中了中国-江苏-南京, 取消中国或江苏或南京
@ -82031,7 +82032,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
}
function expandSelectedValue (selectedValues, parents, notSelectedValue) {
function expandSelectedValue(selectedValues, parents, notSelectedValue) {
var next = selectedValues;
var childrenCount = [];
var path = [];
@ -82076,7 +82077,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
});
}
function search (parents, current, result, searched) {
function search(parents, current, result, searched) {
var newParents = BI.clone(parents);
newParents.push(current);
if (self._isMatch(parents, current, keyword)) {
@ -82106,16 +82107,16 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
return can;
}
function isSearchValueInParent (parentValues) {
function isSearchValueInParent(parentValues) {
for (var i = 0, len = parentValues.length; i < len; i++) {
if (self._isMatch(parentValues.slice(0, parentValues.length - 1), parentValues[i], keyword)) {
if (self._isMatch(parentValues.slice(0, parentValues.length - 1 - i), parentValues[i], keyword)) {
return true;
}
}
return false;
}
function canFindKey (selectedValues, parents) {
function canFindKey(selectedValues, parents) {
var t = selectedValues;
for (var i = 0; i < parents.length; i++) {
var v = parents[i];
@ -82127,7 +82128,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
return true;
}
function isChild (selectedValues, parents) {
function isChild(selectedValues, parents) {
var t = selectedValues;
for (var i = 0; i < parents.length; i++) {
var v = parents[i];
@ -82163,7 +82164,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
});
callback(jo);
function dealWithSelectedValues (selected, parents) {
function dealWithSelectedValues(selected, parents) {
if (selected == null || BI.isEmpty(selected)) {
return true;
}
@ -82183,7 +82184,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
return can && isAllSelected(selected, parents);
}
function isAllSelected (selected, parents) {
function isAllSelected(selected, parents) {
return BI.isEmpty(selected) || self._getChildCount(parents) === BI.size(selected);
}
},
@ -82203,7 +82204,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
});
});
function search () {
function search() {
var children = self._getChildren([]);
var start = children.length;
if (lastSearchValue !== "") {
@ -82233,7 +82234,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
return output;
}
function nodeSearch (deep, parentValues, current, isAllSelect, result) {
function nodeSearch(deep, parentValues, current, isAllSelect, result) {
if (self._isMatch(parentValues, current, keyword)) {
var checked = isAllSelect || isSelected(parentValues, current);
createOneJson(parentValues, current, false, checked, !isAllSelect && isHalf(parentValues, current), true, result);
@ -82262,7 +82263,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
return [can, checked];
}
function createOneJson (parentValues, value, isOpen, checked, half, flag, result) {
function createOneJson(parentValues, value, isOpen, checked, half, flag, result) {
var node = self._getTreeNode(parentValues, value);
result.push({
id: node.id,
@ -82278,7 +82279,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
});
}
function isHalf (parentValues, value) {
function isHalf(parentValues, value) {
var find = findSelectedObj(parentValues);
if (find == null) {
return null;
@ -82292,7 +82293,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
});
}
function isAllSelected (parentValues, value) {
function isAllSelected(parentValues, value) {
var find = findSelectedObj(parentValues);
if (find == null) {
return null;
@ -82306,7 +82307,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
});
}
function isSelected (parentValues, value) {
function isSelected(parentValues, value) {
var find = findSelectedObj(parentValues);
if (find == null) {
return false;
@ -82318,7 +82319,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
});
}
function findSelectedObj (parentValues) {
function findSelectedObj(parentValues) {
var find = selectedValues;
if (find == null) {
return null;
@ -82366,7 +82367,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
});
});
function judgeState (parentValues, selected_value, checkState) {
function judgeState(parentValues, selected_value, checkState) {
var checked = checkState.checked, half = checkState.half;
if (parentValues.length > 0 && !checked) {
return false;
@ -82374,7 +82375,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
return (parentValues.length === 0 || (checked && half) && !BI.isEmpty(selected_value));
}
function dealWidthSelectedValue (parentValues, selectedValues) {
function dealWidthSelectedValue(parentValues, selectedValues) {
var valueMap = {};
BI.each(parentValues, function (i, v) {
selectedValues = selectedValues[v] || {};
@ -82399,7 +82400,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
return valueMap;
}
function getCheckState (current, parentValues, valueMap, checkState) {
function getCheckState(current, parentValues, valueMap, checkState) {
var checked = checkState.checked, half = checkState.half;
var tempCheck = false, halfCheck = false;
if (BI.has(valueMap, current)) {

4
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

47
dist/fineui.ie.js vendored

@ -81718,7 +81718,8 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
} else {
call();
}
function call () {
function call() {
switch (options.type) {
case BI.TreeView.REQ_TYPE_INIT_DATA:
self._reqInitTreeNode(options, callback);
@ -81755,7 +81756,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
items: result
});
function doCheck (parentValues, node, selected) {
function doCheck(parentValues, node, selected) {
if (selected == null || BI.isEmpty(selected)) {
BI.each(node.getChildren(), function (i, child) {
var newParents = BI.clone(parentValues);
@ -81775,7 +81776,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
});
}
function getCount (jo, parentValues) {
function getCount(jo, parentValues) {
if (jo == null) {
return 0;
}
@ -81786,7 +81787,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
return BI.size(jo);
}
function createOneJson (node, pId, llen) {
function createOneJson(node, pId, llen) {
result.push({
id: node.id,
pId: pId,
@ -81813,7 +81814,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
callback(selectedValues);
function dealWithSelectedValues (selectedValues) {
function dealWithSelectedValues(selectedValues) {
var p = parentValues.concat(notSelectedValue);
// 存储的值中存在这个值就把它删掉
// 例如选中了中国-江苏-南京, 取消中国或江苏或南京
@ -81869,7 +81870,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
}
function expandSelectedValue (selectedValues, parents, notSelectedValue) {
function expandSelectedValue(selectedValues, parents, notSelectedValue) {
var next = selectedValues;
var childrenCount = [];
var path = [];
@ -81914,7 +81915,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
});
}
function search (parents, current, result, searched) {
function search(parents, current, result, searched) {
var newParents = BI.clone(parents);
newParents.push(current);
if (self._isMatch(parents, current, keyword)) {
@ -81944,16 +81945,16 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
return can;
}
function isSearchValueInParent (parentValues) {
function isSearchValueInParent(parentValues) {
for (var i = 0, len = parentValues.length; i < len; i++) {
if (self._isMatch(parentValues.slice(0, parentValues.length - 1), parentValues[i], keyword)) {
if (self._isMatch(parentValues.slice(0, parentValues.length - 1 - i), parentValues[i], keyword)) {
return true;
}
}
return false;
}
function canFindKey (selectedValues, parents) {
function canFindKey(selectedValues, parents) {
var t = selectedValues;
for (var i = 0; i < parents.length; i++) {
var v = parents[i];
@ -81965,7 +81966,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
return true;
}
function isChild (selectedValues, parents) {
function isChild(selectedValues, parents) {
var t = selectedValues;
for (var i = 0; i < parents.length; i++) {
var v = parents[i];
@ -82001,7 +82002,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
});
callback(jo);
function dealWithSelectedValues (selected, parents) {
function dealWithSelectedValues(selected, parents) {
if (selected == null || BI.isEmpty(selected)) {
return true;
}
@ -82021,7 +82022,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
return can && isAllSelected(selected, parents);
}
function isAllSelected (selected, parents) {
function isAllSelected(selected, parents) {
return BI.isEmpty(selected) || self._getChildCount(parents) === BI.size(selected);
}
},
@ -82041,7 +82042,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
});
});
function search () {
function search() {
var children = self._getChildren([]);
var start = children.length;
if (lastSearchValue !== "") {
@ -82071,7 +82072,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
return output;
}
function nodeSearch (deep, parentValues, current, isAllSelect, result) {
function nodeSearch(deep, parentValues, current, isAllSelect, result) {
if (self._isMatch(parentValues, current, keyword)) {
var checked = isAllSelect || isSelected(parentValues, current);
createOneJson(parentValues, current, false, checked, !isAllSelect && isHalf(parentValues, current), true, result);
@ -82100,7 +82101,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
return [can, checked];
}
function createOneJson (parentValues, value, isOpen, checked, half, flag, result) {
function createOneJson(parentValues, value, isOpen, checked, half, flag, result) {
var node = self._getTreeNode(parentValues, value);
result.push({
id: node.id,
@ -82116,7 +82117,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
});
}
function isHalf (parentValues, value) {
function isHalf(parentValues, value) {
var find = findSelectedObj(parentValues);
if (find == null) {
return null;
@ -82130,7 +82131,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
});
}
function isAllSelected (parentValues, value) {
function isAllSelected(parentValues, value) {
var find = findSelectedObj(parentValues);
if (find == null) {
return null;
@ -82144,7 +82145,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
});
}
function isSelected (parentValues, value) {
function isSelected(parentValues, value) {
var find = findSelectedObj(parentValues);
if (find == null) {
return false;
@ -82156,7 +82157,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
});
}
function findSelectedObj (parentValues) {
function findSelectedObj(parentValues) {
var find = selectedValues;
if (find == null) {
return null;
@ -82204,7 +82205,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
});
});
function judgeState (parentValues, selected_value, checkState) {
function judgeState(parentValues, selected_value, checkState) {
var checked = checkState.checked, half = checkState.half;
if (parentValues.length > 0 && !checked) {
return false;
@ -82212,7 +82213,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
return (parentValues.length === 0 || (checked && half) && !BI.isEmpty(selected_value));
}
function dealWidthSelectedValue (parentValues, selectedValues) {
function dealWidthSelectedValue(parentValues, selectedValues) {
var valueMap = {};
BI.each(parentValues, function (i, v) {
selectedValues = selectedValues[v] || {};
@ -82237,7 +82238,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
return valueMap;
}
function getCheckState (current, parentValues, valueMap, checkState) {
function getCheckState(current, parentValues, valueMap, checkState) {
var checked = checkState.checked, half = checkState.half;
var tempCheck = false, halfCheck = false;
if (BI.has(valueMap, current)) {

4
dist/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

47
dist/fineui.js vendored

@ -82122,7 +82122,8 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
} else {
call();
}
function call () {
function call() {
switch (options.type) {
case BI.TreeView.REQ_TYPE_INIT_DATA:
self._reqInitTreeNode(options, callback);
@ -82159,7 +82160,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
items: result
});
function doCheck (parentValues, node, selected) {
function doCheck(parentValues, node, selected) {
if (selected == null || BI.isEmpty(selected)) {
BI.each(node.getChildren(), function (i, child) {
var newParents = BI.clone(parentValues);
@ -82179,7 +82180,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
});
}
function getCount (jo, parentValues) {
function getCount(jo, parentValues) {
if (jo == null) {
return 0;
}
@ -82190,7 +82191,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
return BI.size(jo);
}
function createOneJson (node, pId, llen) {
function createOneJson(node, pId, llen) {
result.push({
id: node.id,
pId: pId,
@ -82217,7 +82218,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
callback(selectedValues);
function dealWithSelectedValues (selectedValues) {
function dealWithSelectedValues(selectedValues) {
var p = parentValues.concat(notSelectedValue);
// 存储的值中存在这个值就把它删掉
// 例如选中了中国-江苏-南京, 取消中国或江苏或南京
@ -82273,7 +82274,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
}
function expandSelectedValue (selectedValues, parents, notSelectedValue) {
function expandSelectedValue(selectedValues, parents, notSelectedValue) {
var next = selectedValues;
var childrenCount = [];
var path = [];
@ -82318,7 +82319,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
});
}
function search (parents, current, result, searched) {
function search(parents, current, result, searched) {
var newParents = BI.clone(parents);
newParents.push(current);
if (self._isMatch(parents, current, keyword)) {
@ -82348,16 +82349,16 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
return can;
}
function isSearchValueInParent (parentValues) {
function isSearchValueInParent(parentValues) {
for (var i = 0, len = parentValues.length; i < len; i++) {
if (self._isMatch(parentValues.slice(0, parentValues.length - 1), parentValues[i], keyword)) {
if (self._isMatch(parentValues.slice(0, parentValues.length - 1 - i), parentValues[i], keyword)) {
return true;
}
}
return false;
}
function canFindKey (selectedValues, parents) {
function canFindKey(selectedValues, parents) {
var t = selectedValues;
for (var i = 0; i < parents.length; i++) {
var v = parents[i];
@ -82369,7 +82370,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
return true;
}
function isChild (selectedValues, parents) {
function isChild(selectedValues, parents) {
var t = selectedValues;
for (var i = 0; i < parents.length; i++) {
var v = parents[i];
@ -82405,7 +82406,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
});
callback(jo);
function dealWithSelectedValues (selected, parents) {
function dealWithSelectedValues(selected, parents) {
if (selected == null || BI.isEmpty(selected)) {
return true;
}
@ -82425,7 +82426,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
return can && isAllSelected(selected, parents);
}
function isAllSelected (selected, parents) {
function isAllSelected(selected, parents) {
return BI.isEmpty(selected) || self._getChildCount(parents) === BI.size(selected);
}
},
@ -82445,7 +82446,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
});
});
function search () {
function search() {
var children = self._getChildren([]);
var start = children.length;
if (lastSearchValue !== "") {
@ -82475,7 +82476,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
return output;
}
function nodeSearch (deep, parentValues, current, isAllSelect, result) {
function nodeSearch(deep, parentValues, current, isAllSelect, result) {
if (self._isMatch(parentValues, current, keyword)) {
var checked = isAllSelect || isSelected(parentValues, current);
createOneJson(parentValues, current, false, checked, !isAllSelect && isHalf(parentValues, current), true, result);
@ -82504,7 +82505,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
return [can, checked];
}
function createOneJson (parentValues, value, isOpen, checked, half, flag, result) {
function createOneJson(parentValues, value, isOpen, checked, half, flag, result) {
var node = self._getTreeNode(parentValues, value);
result.push({
id: node.id,
@ -82520,7 +82521,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
});
}
function isHalf (parentValues, value) {
function isHalf(parentValues, value) {
var find = findSelectedObj(parentValues);
if (find == null) {
return null;
@ -82534,7 +82535,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
});
}
function isAllSelected (parentValues, value) {
function isAllSelected(parentValues, value) {
var find = findSelectedObj(parentValues);
if (find == null) {
return null;
@ -82548,7 +82549,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
});
}
function isSelected (parentValues, value) {
function isSelected(parentValues, value) {
var find = findSelectedObj(parentValues);
if (find == null) {
return false;
@ -82560,7 +82561,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
});
}
function findSelectedObj (parentValues) {
function findSelectedObj(parentValues) {
var find = selectedValues;
if (find == null) {
return null;
@ -82608,7 +82609,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
});
});
function judgeState (parentValues, selected_value, checkState) {
function judgeState(parentValues, selected_value, checkState) {
var checked = checkState.checked, half = checkState.half;
if (parentValues.length > 0 && !checked) {
return false;
@ -82616,7 +82617,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
return (parentValues.length === 0 || (checked && half) && !BI.isEmpty(selected_value));
}
function dealWidthSelectedValue (parentValues, selectedValues) {
function dealWidthSelectedValue(parentValues, selectedValues) {
var valueMap = {};
BI.each(parentValues, function (i, v) {
selectedValues = selectedValues[v] || {};
@ -82641,7 +82642,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
return valueMap;
}
function getCheckState (current, parentValues, valueMap, checkState) {
function getCheckState(current, parentValues, valueMap, checkState) {
var checked = checkState.checked, half = checkState.half;
var tempCheck = false, halfCheck = false;
if (BI.has(valueMap, current)) {

4
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

47
dist/fineui_without_jquery_polyfill.js vendored

@ -64941,7 +64941,8 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
} else {
call();
}
function call () {
function call() {
switch (options.type) {
case BI.TreeView.REQ_TYPE_INIT_DATA:
self._reqInitTreeNode(options, callback);
@ -64978,7 +64979,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
items: result
});
function doCheck (parentValues, node, selected) {
function doCheck(parentValues, node, selected) {
if (selected == null || BI.isEmpty(selected)) {
BI.each(node.getChildren(), function (i, child) {
var newParents = BI.clone(parentValues);
@ -64998,7 +64999,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
});
}
function getCount (jo, parentValues) {
function getCount(jo, parentValues) {
if (jo == null) {
return 0;
}
@ -65009,7 +65010,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
return BI.size(jo);
}
function createOneJson (node, pId, llen) {
function createOneJson(node, pId, llen) {
result.push({
id: node.id,
pId: pId,
@ -65036,7 +65037,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
callback(selectedValues);
function dealWithSelectedValues (selectedValues) {
function dealWithSelectedValues(selectedValues) {
var p = parentValues.concat(notSelectedValue);
// 存储的值中存在这个值就把它删掉
// 例如选中了中国-江苏-南京, 取消中国或江苏或南京
@ -65092,7 +65093,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
}
function expandSelectedValue (selectedValues, parents, notSelectedValue) {
function expandSelectedValue(selectedValues, parents, notSelectedValue) {
var next = selectedValues;
var childrenCount = [];
var path = [];
@ -65137,7 +65138,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
});
}
function search (parents, current, result, searched) {
function search(parents, current, result, searched) {
var newParents = BI.clone(parents);
newParents.push(current);
if (self._isMatch(parents, current, keyword)) {
@ -65167,16 +65168,16 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
return can;
}
function isSearchValueInParent (parentValues) {
function isSearchValueInParent(parentValues) {
for (var i = 0, len = parentValues.length; i < len; i++) {
if (self._isMatch(parentValues.slice(0, parentValues.length - 1), parentValues[i], keyword)) {
if (self._isMatch(parentValues.slice(0, parentValues.length - 1 - i), parentValues[i], keyword)) {
return true;
}
}
return false;
}
function canFindKey (selectedValues, parents) {
function canFindKey(selectedValues, parents) {
var t = selectedValues;
for (var i = 0; i < parents.length; i++) {
var v = parents[i];
@ -65188,7 +65189,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
return true;
}
function isChild (selectedValues, parents) {
function isChild(selectedValues, parents) {
var t = selectedValues;
for (var i = 0; i < parents.length; i++) {
var v = parents[i];
@ -65224,7 +65225,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
});
callback(jo);
function dealWithSelectedValues (selected, parents) {
function dealWithSelectedValues(selected, parents) {
if (selected == null || BI.isEmpty(selected)) {
return true;
}
@ -65244,7 +65245,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
return can && isAllSelected(selected, parents);
}
function isAllSelected (selected, parents) {
function isAllSelected(selected, parents) {
return BI.isEmpty(selected) || self._getChildCount(parents) === BI.size(selected);
}
},
@ -65264,7 +65265,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
});
});
function search () {
function search() {
var children = self._getChildren([]);
var start = children.length;
if (lastSearchValue !== "") {
@ -65294,7 +65295,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
return output;
}
function nodeSearch (deep, parentValues, current, isAllSelect, result) {
function nodeSearch(deep, parentValues, current, isAllSelect, result) {
if (self._isMatch(parentValues, current, keyword)) {
var checked = isAllSelect || isSelected(parentValues, current);
createOneJson(parentValues, current, false, checked, !isAllSelect && isHalf(parentValues, current), true, result);
@ -65323,7 +65324,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
return [can, checked];
}
function createOneJson (parentValues, value, isOpen, checked, half, flag, result) {
function createOneJson(parentValues, value, isOpen, checked, half, flag, result) {
var node = self._getTreeNode(parentValues, value);
result.push({
id: node.id,
@ -65339,7 +65340,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
});
}
function isHalf (parentValues, value) {
function isHalf(parentValues, value) {
var find = findSelectedObj(parentValues);
if (find == null) {
return null;
@ -65353,7 +65354,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
});
}
function isAllSelected (parentValues, value) {
function isAllSelected(parentValues, value) {
var find = findSelectedObj(parentValues);
if (find == null) {
return null;
@ -65367,7 +65368,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
});
}
function isSelected (parentValues, value) {
function isSelected(parentValues, value) {
var find = findSelectedObj(parentValues);
if (find == null) {
return false;
@ -65379,7 +65380,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
});
}
function findSelectedObj (parentValues) {
function findSelectedObj(parentValues) {
var find = selectedValues;
if (find == null) {
return null;
@ -65427,7 +65428,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
});
});
function judgeState (parentValues, selected_value, checkState) {
function judgeState(parentValues, selected_value, checkState) {
var checked = checkState.checked, half = checkState.half;
if (parentValues.length > 0 && !checked) {
return false;
@ -65435,7 +65436,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
return (parentValues.length === 0 || (checked && half) && !BI.isEmpty(selected_value));
}
function dealWidthSelectedValue (parentValues, selectedValues) {
function dealWidthSelectedValue(parentValues, selectedValues) {
var valueMap = {};
BI.each(parentValues, function (i, v) {
selectedValues = selectedValues[v] || {};
@ -65460,7 +65461,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
return valueMap;
}
function getCheckState (current, parentValues, valueMap, checkState) {
function getCheckState(current, parentValues, valueMap, checkState) {
var checked = checkState.checked, half = checkState.half;
var tempCheck = false, halfCheck = false;
if (BI.has(valueMap, current)) {

2
dist/utils.min.js vendored

File diff suppressed because one or more lines are too long

47
dist/widget.js vendored

@ -22481,7 +22481,8 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
} else {
call();
}
function call () {
function call() {
switch (options.type) {
case BI.TreeView.REQ_TYPE_INIT_DATA:
self._reqInitTreeNode(options, callback);
@ -22518,7 +22519,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
items: result
});
function doCheck (parentValues, node, selected) {
function doCheck(parentValues, node, selected) {
if (selected == null || BI.isEmpty(selected)) {
BI.each(node.getChildren(), function (i, child) {
var newParents = BI.clone(parentValues);
@ -22538,7 +22539,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
});
}
function getCount (jo, parentValues) {
function getCount(jo, parentValues) {
if (jo == null) {
return 0;
}
@ -22549,7 +22550,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
return BI.size(jo);
}
function createOneJson (node, pId, llen) {
function createOneJson(node, pId, llen) {
result.push({
id: node.id,
pId: pId,
@ -22576,7 +22577,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
callback(selectedValues);
function dealWithSelectedValues (selectedValues) {
function dealWithSelectedValues(selectedValues) {
var p = parentValues.concat(notSelectedValue);
// 存储的值中存在这个值就把它删掉
// 例如选中了中国-江苏-南京, 取消中国或江苏或南京
@ -22632,7 +22633,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
}
function expandSelectedValue (selectedValues, parents, notSelectedValue) {
function expandSelectedValue(selectedValues, parents, notSelectedValue) {
var next = selectedValues;
var childrenCount = [];
var path = [];
@ -22677,7 +22678,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
});
}
function search (parents, current, result, searched) {
function search(parents, current, result, searched) {
var newParents = BI.clone(parents);
newParents.push(current);
if (self._isMatch(parents, current, keyword)) {
@ -22707,16 +22708,16 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
return can;
}
function isSearchValueInParent (parentValues) {
function isSearchValueInParent(parentValues) {
for (var i = 0, len = parentValues.length; i < len; i++) {
if (self._isMatch(parentValues.slice(0, parentValues.length - 1), parentValues[i], keyword)) {
if (self._isMatch(parentValues.slice(0, parentValues.length - 1 - i), parentValues[i], keyword)) {
return true;
}
}
return false;
}
function canFindKey (selectedValues, parents) {
function canFindKey(selectedValues, parents) {
var t = selectedValues;
for (var i = 0; i < parents.length; i++) {
var v = parents[i];
@ -22728,7 +22729,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
return true;
}
function isChild (selectedValues, parents) {
function isChild(selectedValues, parents) {
var t = selectedValues;
for (var i = 0; i < parents.length; i++) {
var v = parents[i];
@ -22764,7 +22765,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
});
callback(jo);
function dealWithSelectedValues (selected, parents) {
function dealWithSelectedValues(selected, parents) {
if (selected == null || BI.isEmpty(selected)) {
return true;
}
@ -22784,7 +22785,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
return can && isAllSelected(selected, parents);
}
function isAllSelected (selected, parents) {
function isAllSelected(selected, parents) {
return BI.isEmpty(selected) || self._getChildCount(parents) === BI.size(selected);
}
},
@ -22804,7 +22805,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
});
});
function search () {
function search() {
var children = self._getChildren([]);
var start = children.length;
if (lastSearchValue !== "") {
@ -22834,7 +22835,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
return output;
}
function nodeSearch (deep, parentValues, current, isAllSelect, result) {
function nodeSearch(deep, parentValues, current, isAllSelect, result) {
if (self._isMatch(parentValues, current, keyword)) {
var checked = isAllSelect || isSelected(parentValues, current);
createOneJson(parentValues, current, false, checked, !isAllSelect && isHalf(parentValues, current), true, result);
@ -22863,7 +22864,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
return [can, checked];
}
function createOneJson (parentValues, value, isOpen, checked, half, flag, result) {
function createOneJson(parentValues, value, isOpen, checked, half, flag, result) {
var node = self._getTreeNode(parentValues, value);
result.push({
id: node.id,
@ -22879,7 +22880,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
});
}
function isHalf (parentValues, value) {
function isHalf(parentValues, value) {
var find = findSelectedObj(parentValues);
if (find == null) {
return null;
@ -22893,7 +22894,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
});
}
function isAllSelected (parentValues, value) {
function isAllSelected(parentValues, value) {
var find = findSelectedObj(parentValues);
if (find == null) {
return null;
@ -22907,7 +22908,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
});
}
function isSelected (parentValues, value) {
function isSelected(parentValues, value) {
var find = findSelectedObj(parentValues);
if (find == null) {
return false;
@ -22919,7 +22920,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
});
}
function findSelectedObj (parentValues) {
function findSelectedObj(parentValues) {
var find = selectedValues;
if (find == null) {
return null;
@ -22967,7 +22968,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
});
});
function judgeState (parentValues, selected_value, checkState) {
function judgeState(parentValues, selected_value, checkState) {
var checked = checkState.checked, half = checkState.half;
if (parentValues.length > 0 && !checked) {
return false;
@ -22975,7 +22976,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
return (parentValues.length === 0 || (checked && half) && !BI.isEmpty(selected_value));
}
function dealWidthSelectedValue (parentValues, selectedValues) {
function dealWidthSelectedValue(parentValues, selectedValues) {
var valueMap = {};
BI.each(parentValues, function (i, v) {
selectedValues = selectedValues[v] || {};
@ -23000,7 +23001,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
return valueMap;
}
function getCheckState (current, parentValues, valueMap, checkState) {
function getCheckState(current, parentValues, valueMap, checkState) {
var checked = checkState.checked, half = checkState.half;
var tempCheck = false, halfCheck = false;
if (BI.has(valueMap, current)) {

47
src/component/treevaluechooser/abstract.treevaluechooser.js

@ -41,7 +41,8 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
} else {
call();
}
function call () {
function call() {
switch (options.type) {
case BI.TreeView.REQ_TYPE_INIT_DATA:
self._reqInitTreeNode(options, callback);
@ -78,7 +79,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
items: result
});
function doCheck (parentValues, node, selected) {
function doCheck(parentValues, node, selected) {
if (selected == null || BI.isEmpty(selected)) {
BI.each(node.getChildren(), function (i, child) {
var newParents = BI.clone(parentValues);
@ -98,7 +99,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
});
}
function getCount (jo, parentValues) {
function getCount(jo, parentValues) {
if (jo == null) {
return 0;
}
@ -109,7 +110,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
return BI.size(jo);
}
function createOneJson (node, pId, llen) {
function createOneJson(node, pId, llen) {
result.push({
id: node.id,
pId: pId,
@ -136,7 +137,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
callback(selectedValues);
function dealWithSelectedValues (selectedValues) {
function dealWithSelectedValues(selectedValues) {
var p = parentValues.concat(notSelectedValue);
// 存储的值中存在这个值就把它删掉
// 例如选中了中国-江苏-南京, 取消中国或江苏或南京
@ -192,7 +193,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
}
function expandSelectedValue (selectedValues, parents, notSelectedValue) {
function expandSelectedValue(selectedValues, parents, notSelectedValue) {
var next = selectedValues;
var childrenCount = [];
var path = [];
@ -237,7 +238,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
});
}
function search (parents, current, result, searched) {
function search(parents, current, result, searched) {
var newParents = BI.clone(parents);
newParents.push(current);
if (self._isMatch(parents, current, keyword)) {
@ -267,16 +268,16 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
return can;
}
function isSearchValueInParent (parentValues) {
function isSearchValueInParent(parentValues) {
for (var i = 0, len = parentValues.length; i < len; i++) {
if (self._isMatch(parentValues.slice(0, parentValues.length - 1), parentValues[i], keyword)) {
if (self._isMatch(parentValues.slice(0, parentValues.length - 1 - i), parentValues[i], keyword)) {
return true;
}
}
return false;
}
function canFindKey (selectedValues, parents) {
function canFindKey(selectedValues, parents) {
var t = selectedValues;
for (var i = 0; i < parents.length; i++) {
var v = parents[i];
@ -288,7 +289,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
return true;
}
function isChild (selectedValues, parents) {
function isChild(selectedValues, parents) {
var t = selectedValues;
for (var i = 0; i < parents.length; i++) {
var v = parents[i];
@ -324,7 +325,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
});
callback(jo);
function dealWithSelectedValues (selected, parents) {
function dealWithSelectedValues(selected, parents) {
if (selected == null || BI.isEmpty(selected)) {
return true;
}
@ -344,7 +345,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
return can && isAllSelected(selected, parents);
}
function isAllSelected (selected, parents) {
function isAllSelected(selected, parents) {
return BI.isEmpty(selected) || self._getChildCount(parents) === BI.size(selected);
}
},
@ -364,7 +365,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
});
});
function search () {
function search() {
var children = self._getChildren([]);
var start = children.length;
if (lastSearchValue !== "") {
@ -394,7 +395,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
return output;
}
function nodeSearch (deep, parentValues, current, isAllSelect, result) {
function nodeSearch(deep, parentValues, current, isAllSelect, result) {
if (self._isMatch(parentValues, current, keyword)) {
var checked = isAllSelect || isSelected(parentValues, current);
createOneJson(parentValues, current, false, checked, !isAllSelect && isHalf(parentValues, current), true, result);
@ -423,7 +424,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
return [can, checked];
}
function createOneJson (parentValues, value, isOpen, checked, half, flag, result) {
function createOneJson(parentValues, value, isOpen, checked, half, flag, result) {
var node = self._getTreeNode(parentValues, value);
result.push({
id: node.id,
@ -439,7 +440,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
});
}
function isHalf (parentValues, value) {
function isHalf(parentValues, value) {
var find = findSelectedObj(parentValues);
if (find == null) {
return null;
@ -453,7 +454,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
});
}
function isAllSelected (parentValues, value) {
function isAllSelected(parentValues, value) {
var find = findSelectedObj(parentValues);
if (find == null) {
return null;
@ -467,7 +468,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
});
}
function isSelected (parentValues, value) {
function isSelected(parentValues, value) {
var find = findSelectedObj(parentValues);
if (find == null) {
return false;
@ -479,7 +480,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
});
}
function findSelectedObj (parentValues) {
function findSelectedObj(parentValues) {
var find = selectedValues;
if (find == null) {
return null;
@ -527,7 +528,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
});
});
function judgeState (parentValues, selected_value, checkState) {
function judgeState(parentValues, selected_value, checkState) {
var checked = checkState.checked, half = checkState.half;
if (parentValues.length > 0 && !checked) {
return false;
@ -535,7 +536,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
return (parentValues.length === 0 || (checked && half) && !BI.isEmpty(selected_value));
}
function dealWidthSelectedValue (parentValues, selectedValues) {
function dealWidthSelectedValue(parentValues, selectedValues) {
var valueMap = {};
BI.each(parentValues, function (i, v) {
selectedValues = selectedValues[v] || {};
@ -560,7 +561,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
return valueMap;
}
function getCheckState (current, parentValues, valueMap, checkState) {
function getCheckState(current, parentValues, valueMap, checkState) {
var checked = checkState.checked, half = checkState.half;
var tempCheck = false, halfCheck = false;
if (BI.has(valueMap, current)) {

Loading…
Cancel
Save