Browse Source

Merge pull request #200 in FUI/fineui from ~GUY/fineui:master to master

* commit 'a1382e80289861223a22d21e909664702b2ff4dc':
  update
  update
  update
  update
  update
master
guy 7 years ago
parent
commit
d1a51a5ebe
  1. 210
      bi/base.js
  2. 22
      bi/core.js
  3. 2
      demo/app.js
  4. 3004
      demo/config.js
  5. 132
      demo/js/base/button/demo.button.js
  6. 4
      demo/js/base/button/demo.icon_button.js
  7. 4
      demo/js/base/button/demo.image_button.js
  8. 6
      demo/js/base/button/demo.text_button.js
  9. 8
      demo/js/base/demo.canvas.js
  10. 2
      demo/js/base/demo.label.js
  11. 16
      demo/js/base/demo.message.js
  12. 2
      demo/js/base/demo.pager.js
  13. 2
      demo/js/base/demo.svg.js
  14. 2
      demo/js/base/editor/demo.code_editor.js
  15. 2
      demo/js/base/editor/demo.editor.js
  16. 10
      demo/js/base/editor/demo.formula_editor.js
  17. 2
      demo/js/base/editor/demo.multifile_editor.js
  18. 6
      demo/js/base/editor/demo.rich_editor.js
  19. 2
      demo/js/base/editor/demo.textarea_editor.js
  20. 6
      demo/js/base/table/demo.collection_table.js
  21. 6
      demo/js/base/table/demo.grid_table.js
  22. 6
      demo/js/base/table/demo.resizable_table.js
  23. 206
      demo/js/base/table/demo.table_view.js
  24. 14
      demo/js/base/tip/demo.bubble.js
  25. 2
      demo/js/base/tip/demo.title.js
  26. 42
      demo/js/base/tip/demo.toast.js
  27. 22
      demo/js/base/tree/demo.tree_view.js
  28. 6
      demo/js/case/combo/demo.bubble_combo.js
  29. 10
      demo/js/case/combo/demo.editor_icon_check_combo.js
  30. 10
      demo/js/case/combo/demo.icon_combo.js
  31. 4
      demo/js/case/combo/demo.static_combo.js
  32. 4
      demo/js/case/combo/demo.text_value_combo.js
  33. 4
      demo/js/case/combo/demo.text_value_down_list_combo.js
  34. 4
      demo/js/case/combo/demo.text_vlaue_check_combo.js
  35. 4
      demo/js/case/demo.calendar.js
  36. 6
      demo/js/case/demo.clipboard.js
  37. 2
      demo/js/case/demo.color_chooser.js
  38. 2
      demo/js/case/demo.color_chooser_popup.js
  39. 2
      demo/js/case/demo.complex_canvas.js
  40. 2
      demo/js/case/demo.segment.js
  41. 4
      demo/js/case/editor/demo.clear_editor.js
  42. 8
      demo/js/case/editor/demo.shelter_editor.js
  43. 6
      demo/js/case/editor/demo.sign_editor.js
  44. 6
      demo/js/case/editor/demo.sign_initial_editor.js
  45. 6
      demo/js/case/editor/demo.simple_state_editor.js
  46. 6
      demo/js/case/editor/demo.state_editor.js
  47. 2
      demo/js/case/item/demo.multi_select_item.js
  48. 2
      demo/js/case/item/demo.single_select_item.js
  49. 2
      demo/js/case/item/demo.single_select_radio_item.js
  50. 2
      demo/js/case/list/demo.lazy_loader.js
  51. 2
      demo/js/case/list/demo.select_list.js
  52. 2
      demo/js/case/pager/demo.all_count_pager.js
  53. 2
      demo/js/case/pager/demo.direction_pager.js
  54. 6
      demo/js/case/pane/demo.list_pane.js
  55. 2
      demo/js/case/pane/demo.multi_popup_view.js
  56. 2
      demo/js/case/pane/demo.panel.js
  57. 2
      demo/js/case/pane/demo.popup_panel.js
  58. 2
      demo/js/case/table/demo.adaptive_table.js
  59. 2
      demo/js/case/table/demo.layer_tree_table.js
  60. 2
      demo/js/case/table/demo.tree_table.js
  61. 2
      demo/js/case/tree/demo.branch_relation.js
  62. 6
      demo/js/case/tree/demo.branch_tree.js
  63. 2
      demo/js/case/tree/demo.handstand_branch_tree.js
  64. 4
      demo/js/case/tree/demo.level_tree.js
  65. 6
      demo/js/case/tree/demo.simple_tree.js
  66. 2
      demo/js/case/triggers/demo.editor_trigger.js
  67. 2
      demo/js/case/triggers/demo.icon_trigger.js
  68. 2
      demo/js/case/triggers/demo.select_text_trigger.js
  69. 2
      demo/js/case/triggers/demo.text_trigger.js
  70. 90
      demo/js/category/customATree/demo.multilayerselecttree.leveltree.js
  71. 6
      demo/js/category/largeTable/cell.js
  72. 4
      demo/js/category/largeTable/header.js
  73. 6
      demo/js/category/largeTable/largeTable.js
  74. 2
      demo/js/category/largeTable/sequenceheadercell.normal.js
  75. 4
      demo/js/category/largeTable/table.js
  76. 12
      demo/js/category/sortTree/demo.sortTree.js
  77. 2
      demo/js/center.js
  78. 48
      demo/js/chart/demo.axis_chart.js
  79. 6
      demo/js/config/fix.js
  80. 6
      demo/js/config/widget.js
  81. 18
      demo/js/core/abstract/combination/demo.combo.js
  82. 16
      demo/js/core/abstract/combination/demo.combo2.js
  83. 4
      demo/js/core/abstract/combination/demo.combo_group.js
  84. 2
      demo/js/core/abstract/combination/demo.expander.js
  85. 6
      demo/js/core/abstract/combination/demo.loader.js
  86. 4
      demo/js/core/abstract/combination/demo.navigation.js
  87. 4
      demo/js/core/abstract/combination/demo.sercher.js
  88. 2
      demo/js/core/abstract/combination/demo.switcher.js
  89. 6
      demo/js/core/abstract/combination/demo.tab.js
  90. 4
      demo/js/core/abstract/demo.button_group.js
  91. 2
      demo/js/core/abstract/demo.button_tree.js
  92. 4
      demo/js/core/abstract/demo.collection_view.js
  93. 86
      demo/js/core/abstract/demo.custom_tree.js
  94. 4
      demo/js/core/abstract/demo.grid_view.js
  95. 2
      demo/js/core/abstract/demo.list_view.js
  96. 8
      demo/js/core/abstract/demo.virtual_group.js
  97. 2
      demo/js/core/abstract/demo.virtual_list.js
  98. 2
      demo/js/core/layout/demo.absolute.js
  99. 24
      demo/js/core/layout/demo.border.js
  100. 8
      demo/js/core/layout/demo.center.js
  101. Some files were not shown because too many files have changed in this diff Show More

210
bi/base.js

@ -18811,7 +18811,7 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/**
e.stopPropagation ? e.stopPropagation() : e.cancelBubble = true;
e.preventDefault ? e.preventDefault() : e.returnValue = false;
}
;
return false;
}
};
@ -18820,7 +18820,7 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/**
var multipart = function (boundary, name, file) {
return "--".concat(
boundary, CRLF,
'Content-Disposition: form-data; name="', name, '"; filename="', BI.cjkEncode(file.fileName), '"', CRLF,
"Content-Disposition: form-data; name=\"", name, "\"; filename=\"", BI.cjkEncode(file.fileName), "\"", CRLF,
"Content-Type: application/octet-stream", CRLF,
CRLF,
file.getAsBinary(), CRLF,
@ -18846,15 +18846,15 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/**
return;
}
for (var
xhr = new XMLHttpRequest,
upload = xhr.upload || {
addEventListener: function (event, callback) {
this["on" + event] = callback
}
},
i = 0;
i < length;
i++
xhr = new XMLHttpRequest,
upload = xhr.upload || {
addEventListener: function (event, callback) {
this["on" + event] = callback;
}
},
i = 0;
i < length;
i++
) {
upload.addEventListener(
split[i].substring(2),
@ -18889,7 +18889,7 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/**
},
false
);
xhr.open("post", handler.url + '&filename=' + window.encodeURIComponent(handler.file.fileName), true);
xhr.open("post", handler.url + "&filename=" + window.encodeURIComponent(handler.file.fileName), true);
if (!xhr.upload) {
var rpe = {loaded: 0, total: handler.file.fileSize || handler.file.size, simulation: true};
rpe.interval = setInterval(function () {
@ -18909,8 +18909,7 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/**
switch (xhr.readyState) {
case 2:
case 3:
if (rpe.total <= rpe.loaded)
rpe.loaded = rpe.total;
if (rpe.total <= rpe.loaded) {rpe.loaded = rpe.total;}
upload.onprogress(rpe);
break;
case 4:
@ -18922,7 +18921,7 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/**
upload["onload"]({});
var attachO = BI.jsonDecode(xhr.responseText);
attachO.filename = handler.file.fileName;
if (handler.file.type.indexOf('image') != -1) {
if (handler.file.type.indexOf("image") != -1) {
attachO.attach_type = "image";
}
handler.attach_array.push(attachO);
@ -18938,7 +18937,7 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/**
switch (xhr.readyState) {
case 4:
var attachO = BI.jsonDecode(xhr.responseText);
if (handler.file.type.indexOf('image') != -1) {
if (handler.file.type.indexOf("image") != -1) {
attachO.attach_type = "image";
}
attachO.filename = handler.file.fileName;
@ -18950,7 +18949,8 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/**
}
break;
}
}
};
upload.onloadstart();
}
var boundary = "AjaxUploadBoundary" + (new Date).getTime();
xhr.setRequestHeader("Content-Type", "multipart/form-data; boundary=" + boundary);
@ -18958,8 +18958,8 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/**
xhr[xhr.sendAsBinary ? "sendAsBinary" : "send"](multipart(boundary, handler.name, handler.file));
} else {
xhr.setRequestHeader("Content-Type", "multipart/form-data");
// xhr.setRequestHeader("X-Name", handler.name);
// xhr.setRequestHeader("X-File-Name", handler.file.fileName);
// xhr.setRequestHeader("X-Name", handler.name);
// xhr.setRequestHeader("X-File-Name", handler.file.fileName);
var form = new FormData();
form.append("FileData", handler.file);
xhr.send(form);
@ -18973,10 +18973,8 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/**
var url = handler.url.concat(-1 === handler.url.indexOf("?") ? "?" : "&", "AjaxUploadFrame=true"),
rpe = {
loaded: 1, total: 100, simulation: true, interval: setInterval(function () {
if (rpe.loaded < rpe.total)
++rpe.loaded;
if (isFunction(handler.onprogress))
handler.onprogress(rpe, {});
if (rpe.loaded < rpe.total) {++rpe.loaded;}
if (isFunction(handler.onprogress)) {handler.onprogress(rpe, {});}
}, 100)
},
onload = function () {
@ -18984,15 +18982,15 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/**
form.parentNode.removeChild(form);
form = null;
clearInterval(rpe.interval);
//rpe.loaded = rpe.total;
// rpe.loaded = rpe.total;
try {
var responseText = (iframe.contentWindow.document || iframe.contentWindow.contentDocument).body.innerHTML;
var attachO = BI.jsonDecode(responseText);
if (handler.file.type.indexOf('image') != -1) {
if (handler.file.type.indexOf("image") != -1) {
attachO.attach_type = "image";
}
//attachO.fileSize = responseText.length;
// attachO.fileSize = responseText.length;
attachO.filename = BI.cjkDecode(handler.file.fileName);
if (handler.maxlength == 1) {
handler.attach_array[0] = attachO;
@ -19000,18 +18998,16 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/**
handler.attach_array.push(attachO);
}
} catch (e) {
if (isFunction(handler.onerror))
handler.onerror(rpe, event || window.event);
if (isFunction(handler.onerror)) {handler.onerror(rpe, event || window.event);}
}
if (isFunction(handler.onload))
handler.onload(rpe, {responseText: responseText});
if (isFunction(handler.onload)) {handler.onload(rpe, {responseText: responseText});}
},
target = ["AjaxUpload", (new Date).getTime(), String(Math.random()).substring(2)].join("_");
try { // IE < 8 does not accept enctype attribute ...
var form = document.createElement('<form enctype="multipart/form-data"></form>'),
iframe = handler.iframe || (handler.iframe = document.createElement('<iframe id="' + target + '" name="' + target + '" src="' + url + '"></iframe>'));
var form = document.createElement("<form enctype=\"multipart/form-data\"></form>"),
iframe = handler.iframe || (handler.iframe = document.createElement("<iframe id=\"" + target + "\" name=\"" + target + "\" src=\"" + url + "\"></iframe>"));
} catch (e) {
var form = document.createElement('form'),
var form = document.createElement("form"),
iframe = handler.iframe || (handler.iframe = document.createElement("iframe"));
form.setAttribute("enctype", "multipart/form-data");
iframe.setAttribute("name", iframe.id = target);
@ -19029,9 +19025,8 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/**
if (/loaded|complete/i.test(iframe.readyState)) {
onload();
//wei : todo,将附件信息放到handler.attach
}
else if (isFunction(handler.onloadprogress)) {
// wei : todo,将附件信息放到handler.attach
} else if (isFunction(handler.onloadprogress)) {
if (rpe.loaded < rpe.total) {
++rpe.loaded;
}
@ -19058,7 +19053,7 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/**
appendChild(form);
form.submit();
}
;
return handler;
};
}
@ -19134,9 +19129,9 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/**
name: "",
url: "",
multiple: true,
accept: "", /**'*.jpg; *.zip'**/
maxSize: -1 //1024 * 1024
})
accept: "", /** '*.jpg; *.zip'**/
maxSize: -1 // 1024 * 1024
});
},
_init: function () {
@ -19146,77 +19141,78 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/**
this.element.attr("multiple", "multiple");
}
this.element.attr("name", o.name || this.getName());
},
BI.nextTick(function () {
// create the noswfupload.wrap Object
// wrap.maxSize 文件大小限制
// wrap.maxlength 文件个数限制
var _wrap = self.wrap = self._wrap(self.element[0], o.maxSize);
// fileType could contain whatever text but filter checks *.{extension}
// if present
// handlers
_wrap.onloadstart = function (rpe, xhr) {
//BI.Msg.toast("loadstart");
self.fireEvent(BI.File.EVENT_UPLOADSTART);
};
_wrap.onprogress = function (rpe, xhr) {
//BI.Msg.toast("onprogress");
// percent for each bar
mounted: function () {
var self = this, o = this.options;
// create the noswfupload.wrap Object
// wrap.maxSize 文件大小限制
// wrap.maxlength 文件个数限制
var _wrap = this.wrap = this._wrap(this.element[0], o.maxSize);
// fileType could contain whatever text but filter checks *.{extension}
// if present
// handlers
_wrap.onloadstart = function (rpe, xhr) {
// BI.Msg.toast("loadstart");
self.fireEvent(BI.File.EVENT_UPLOADSTART, arguments);
};
// fileSize is -1 only if browser does not support file info access
// this if splits recent browsers from others
if (this.file.fileSize !== -1) {
// simulation property indicates when the progress event is fake
if (rpe.simulation) {
_wrap.onprogress = function (rpe, xhr) {
// BI.Msg.toast("onprogress");
// percent for each bar
} else {
// fileSize is -1 only if browser does not support file info access
// this if splits recent browsers from others
if (this.file.fileSize !== -1) {
// simulation property indicates when the progress event is fake
if (rpe.simulation) {
}
} else {
// if fileSIze is -1 browser is using an iframe because it does
// not support
// files sent via Ajax (XMLHttpRequest)
// We can still show some information
}
self.fireEvent(BI.File.EVENT_PROGRESS, {
file: this.file,
total: rpe.total,
loaded: rpe.loaded,
simulation: rpe.simulation
});
};
// generated if there is something wrong during upload
_wrap.onerror = function () {
// just inform the user something was wrong
self.fireEvent(BI.File.EVENT_ERROR);
};
}
} else {
// if fileSIze is -1 browser is using an iframe because it does
// not support
// files sent via Ajax (XMLHttpRequest)
// We can still show some information
}
self.fireEvent(BI.File.EVENT_PROGRESS, {
file: this.file,
total: rpe.total,
loaded: rpe.loaded,
simulation: rpe.simulation
});
};
// generated when every file has been sent (one or more, it does not
// matter)
_wrap.onload = function (rpe, xhr) {
var self_ = this;
// just show everything is fine ...
// ... and after a second reset the component
setTimeout(function () {
self_.clean(); // remove files from list
self_.hide(); // hide progress bars and enable input file
// generated if there is something wrong during upload
_wrap.onerror = function () {
// just inform the user something was wrong
self.fireEvent(BI.File.EVENT_ERROR);
};
//BI.Msg.toast("onload");
self.fireEvent(BI.File.EVENT_UPLOADED);
// enable again the submit button/element
}, 1000);
};
_wrap.url = o.url ? o.url : BI.servletURL
+ '?op=fr_attach&cmd=ah_upload';
_wrap.fileType = o.accept; //文件类型限制
_wrap.attach_array = [];
_wrap.attach_names = [];
_wrap.attachNum = 0;
});
// generated when every file has been sent (one or more, it does not
// matter)
_wrap.onload = function (rpe, xhr) {
var self_ = this;
// just show everything is fine ...
// ... and after a second reset the component
setTimeout(function () {
self_.clean(); // remove files from list
self_.hide(); // hide progress bars and enable input file
// BI.Msg.toast("onload");
self.fireEvent(BI.File.EVENT_UPLOADED);
// enable again the submit button/element
}, 1000);
};
_wrap.url = o.url ? o.url : BI.servletURL
+ "?op=fr_attach&cmd=ah_upload";
_wrap.fileType = o.accept; // 文件类型限制
_wrap.attach_array = [];
_wrap.attach_names = [];
_wrap.attachNum = 0;
},
_events: function (wrap) {
@ -19230,14 +19226,14 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/**
ext = -1 !== value.indexOf(".") ? value.split(".").pop().toLowerCase() : "unknown",
size = item.fileSize || item.size;
if (wrap.fileType && -1 === wrap.fileType.indexOf("*." + ext)) {
//文件类型不支持
// 文件类型不支持
BI.Msg.toast(BI.i18nText("BI-Upload_File_Type_Error"));
self.fireEvent(BI.File.EVENT_ERROR, {
errorType: 0,
file: item
});
} else if (wrap.maxSize !== -1 && size && wrap.maxSize < size) {
//文件大小不支持
// 文件大小不支持
BI.Msg.toast(BI.i18nText("BI-Upload_File_Size_Error"));
self.fireEvent(BI.File.EVENT_ERROR, {
errorType: 1,
@ -19245,7 +19241,7 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/**
});
} else {
wrap.files.unshift(item);
//BI.Msg.toast(value);
// BI.Msg.toast(value);
self.fireEvent(BI.File.EVENT_CHANGE, {
file: item
});
@ -19277,7 +19273,7 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/**
disabled: false // internal use, checks input file state
},
name: input.name, // name to send for each file ($_FILES[{name}] in the server)
// maxSize is the maximum amount of bytes for each file
// maxSize is the maximum amount of bytes for each file
maxSize: o.maxSize ? o.maxSize >> 0 : -1,
files: [], // file list

22
bi/core.js

@ -20193,6 +20193,14 @@ BI.extend(BI.DOM, {
storeInjection[xtype] = cls;
};
var serviceInjection = {};
BI.service = function (xtype, cls) {
if (serviceInjection[xtype] != null) {
throw ("service:[" + xtype + "] has been registed");
}
serviceInjection[xtype] = cls;
};
var providerInjection = {};
BI.provider = function (xtype, cls) {
if (providerInjection[xtype] != null) {
@ -20253,6 +20261,20 @@ BI.extend(BI.DOM, {
}
}
var services = {};
BI.Services = {
getService: function (type, config) {
if (services[type]) {
return services[type];
}
return services[type] = new serviceInjection[type](config);
},
releaseService: function (type) {
delete services[type];
}
}
var providers = {}, providerInstance = {}
BI.Providers = {

2
demo/app.js

@ -11,7 +11,7 @@ $(function () {
console.log(_ref);
ref = _ref;
},
element: '#wrapper'
element: "#wrapper"
});
}
});

3004
demo/config.js

File diff suppressed because one or more lines are too long

132
demo/js/base/button/demo.button.js

@ -6,174 +6,174 @@ Demo.Button = BI.inherit(BI.Widget, {
var items = [
{
el: {
type: 'bi.button',
text: '一般按钮',
level: 'common',
type: "bi.button",
text: "一般按钮",
level: "common",
height: 30
}
}, {
el: {
type: 'bi.button',
text: '表示成功状态按钮',
level: 'success',
type: "bi.button",
text: "表示成功状态按钮",
level: "success",
height: 30
}
},
{
el: {
type: 'bi.button',
text: '表示警告状态的按钮',
level: 'warning',
type: "bi.button",
text: "表示警告状态的按钮",
level: "warning",
height: 30
}
}, {
el: {
type: 'bi.button',
text: '表示忽略状态的按钮',
level: 'ignore',
type: "bi.button",
text: "表示忽略状态的按钮",
level: "ignore",
height: 30
}
}, {
el: {
type: 'bi.button',
text: '普通灰化按钮',
type: "bi.button",
text: "普通灰化按钮",
disabled: true,
level: 'success',
level: "success",
height: 30
}
}, {
el: {
type: 'bi.button',
text: '忽略状态灰化按钮',
type: "bi.button",
text: "忽略状态灰化按钮",
disabled: true,
level: 'ignore',
level: "ignore",
height: 30
}
}, {
el: {
type: 'bi.button',
text: '带图标的按钮',
//level: 'ignore',
type: "bi.button",
text: "带图标的按钮",
// level: 'ignore',
iconClass: "close-font",
height: 30
}
}, {
el: {
type: 'bi.button',
text: '一般按钮',
type: "bi.button",
text: "一般按钮",
block: true,
level: 'common',
level: "common",
height: 30
}
}, {
el: {
type: 'bi.button',
text: '表示成功状态按钮',
type: "bi.button",
text: "表示成功状态按钮",
block: true,
level: 'success',
level: "success",
height: 30
}
},
{
el: {
type: 'bi.button',
text: '表示警告状态的按钮',
type: "bi.button",
text: "表示警告状态的按钮",
block: true,
level: 'warning',
level: "warning",
height: 30
}
}, {
el: {
type: 'bi.button',
text: '表示忽略状态的按钮',
type: "bi.button",
text: "表示忽略状态的按钮",
block: true,
level: 'ignore',
level: "ignore",
height: 30
}
}, {
el: {
type: 'bi.button',
text: '普通灰化按钮',
type: "bi.button",
text: "普通灰化按钮",
block: true,
disabled: true,
level: 'success',
level: "success",
height: 30
}
}, {
el: {
type: 'bi.button',
text: '忽略状态灰化按钮',
type: "bi.button",
text: "忽略状态灰化按钮",
block: true,
disabled: true,
level: 'ignore',
level: "ignore",
height: 30
}
}, {
el: {
type: 'bi.button',
text: '带图标的按钮',
type: "bi.button",
text: "带图标的按钮",
block: true,
//level: 'ignore',
// level: 'ignore',
iconClass: "close-font",
height: 30
}
}, {
el: {
type: 'bi.button',
text: '一般按钮',
type: "bi.button",
text: "一般按钮",
clear: true,
level: 'common',
level: "common",
height: 30
}
}, {
el: {
type: 'bi.button',
text: '表示成功状态按钮',
type: "bi.button",
text: "表示成功状态按钮",
clear: true,
level: 'success',
level: "success",
height: 30
}
},
{
el: {
type: 'bi.button',
text: '表示警告状态的按钮',
type: "bi.button",
text: "表示警告状态的按钮",
clear: true,
level: 'warning',
level: "warning",
height: 30
}
}, {
el: {
type: 'bi.button',
text: '表示忽略状态的按钮',
type: "bi.button",
text: "表示忽略状态的按钮",
clear: true,
level: 'ignore',
level: "ignore",
height: 30
}
}, {
el: {
type: 'bi.button',
text: '普通灰化按钮',
type: "bi.button",
text: "普通灰化按钮",
clear: true,
disabled: true,
level: 'success',
level: "success",
height: 30
}
}, {
el: {
type: 'bi.button',
text: '忽略状态灰化按钮',
type: "bi.button",
text: "忽略状态灰化按钮",
clear: true,
disabled: true,
level: 'ignore',
level: "ignore",
height: 30
}
}, {
el: {
type: 'bi.button',
text: '带图标的按钮',
type: "bi.button",
text: "带图标的按钮",
clear: true,
//level: 'ignore',
// level: 'ignore',
iconClass: "close-font",
height: 30
}
@ -181,15 +181,15 @@ Demo.Button = BI.inherit(BI.Widget, {
];
BI.each(items, function (i, item) {
item.el.handler = function () {
BI.Msg.alert('按钮', this.options.text);
}
BI.Msg.alert("按钮", this.options.text);
};
});
return {
type: "bi.left",
vgap: 100,
hgap: 20,
items: items
}
};
}
});
BI.shortcut("demo.button", Demo.Button);

4
demo/js/base/button/demo.icon_button.js

@ -6,7 +6,7 @@ Demo.Button = BI.inherit(BI.Widget, {
var items = [
{
el: {
type: 'bi.icon_button',
type: "bi.icon_button",
cls: "close-ha-font",
width: 20,
height: 20
@ -18,7 +18,7 @@ Demo.Button = BI.inherit(BI.Widget, {
vgap: 200,
hgap: 20,
items: items
}
};
}
});
BI.shortcut("demo.icon_button", Demo.Button);

4
demo/js/base/button/demo.image_button.js

@ -6,7 +6,7 @@ Demo.Button = BI.inherit(BI.Widget, {
var items = [
{
el: {
type: 'bi.image_button',
type: "bi.image_button",
src: "http://www.easyicon.net/api/resizeApi.php?id=1206741&size=128",
width: 100,
height: 100
@ -18,7 +18,7 @@ Demo.Button = BI.inherit(BI.Widget, {
vgap: 200,
hgap: 20,
items: items
}
};
}
});
BI.shortcut("demo.image_button", Demo.Button);

6
demo/js/base/button/demo.text_button.js

@ -6,8 +6,8 @@ Demo.Button = BI.inherit(BI.Widget, {
var items = [
{
el: {
type: 'bi.text_button',
text: '文字按钮',
type: "bi.text_button",
text: "文字按钮",
height: 30
}
}
@ -17,7 +17,7 @@ Demo.Button = BI.inherit(BI.Widget, {
vgap: 200,
hgap: 20,
items: items
}
};
}
});
BI.shortcut("demo.text_button", Demo.Button);

8
demo/js/base/demo.canvas.js

@ -18,15 +18,15 @@ Demo.Func = BI.inherit(BI.Widget, {
canvas.circle(150, 50, 20, "green");
//渐变矩形
// 渐变矩形
canvas.rect(0, 120, 80, 100, canvas.gradient(0, 120, 80, 220, "#FF0000", "#00FF00"));
//空心图形
// 空心图形
canvas.hollow(100, 120, 100, 220, 200, 120, {
strokeStyle: "blue"
});
//实心图形
// 实心图形
canvas.solid(100, 240, 200, 240, 150, 280, 200, 320, 100, 320, {
strokeStyle: "yellow",
fillStyle: "pink"
@ -42,7 +42,7 @@ Demo.Func = BI.inherit(BI.Widget, {
left: 100,
top: 50
}]
})
});
}
});
BI.shortcut("demo.canvas", Demo.Func);

2
demo/js/base/demo.label.js

@ -132,7 +132,7 @@ Demo.Label = BI.inherit(BI.Widget, {
}],
hgap: 300,
vgap: 20
}
};
}
});
BI.shortcut("demo.label", Demo.Label);

16
demo/js/base/demo.message.js

@ -5,19 +5,19 @@ Demo.Message = BI.inherit(BI.Widget, {
render: function () {
return {
type: "bi.center_adapt",
items : [
items: [
{
el : {
type : 'bi.button',
text : '点击我弹出一个消息框',
height : 30,
handler : function() {
BI.Msg.alert('测试消息框', '我是测试消息框的内容');
el: {
type: "bi.button",
text: "点击我弹出一个消息框",
height: 30,
handler: function () {
BI.Msg.alert("测试消息框", "我是测试消息框的内容");
}
}
}
]
}
};
}
});
BI.shortcut("demo.message", Demo.Message);

2
demo/js/base/demo.pager.js

@ -114,7 +114,7 @@ Demo.Func = BI.inherit(BI.Widget, {
return v < 3;
}
}]
}
};
}
});
BI.shortcut("demo.pager", Demo.Func);

2
demo/js/base/demo.svg.js

@ -26,7 +26,7 @@ Demo.Func = BI.inherit(BI.Widget, {
left: 100,
top: 50
}]
})
});
}
});
BI.shortcut("demo.svg", Demo.Func);

2
demo/js/base/editor/demo.code_editor.js

@ -27,7 +27,7 @@ Demo.CodeEditor = BI.inherit(BI.Widget, {
editor.setValue("测试数据");
}
}]
})
});
}
});
BI.shortcut("demo.code_editor", Demo.CodeEditor);

2
demo/js/base/editor/demo.editor.js

@ -90,7 +90,7 @@ Demo.Editor = BI.inherit(BI.Widget, {
left: 200,
bottom: 60
}]
})
});
}
});
BI.shortcut("demo.editor", Demo.Editor);

10
demo/js/base/editor/demo.formula_editor.js

@ -4,10 +4,10 @@ Demo.CodeEditor = BI.inherit(BI.Widget, {
},
render: function () {
this.formula = BI.createWidget({
type : 'bi.formula_editor',
width : 300,
height : 200,
value : 'SUM(C5, 16, 26)'
type: "bi.formula_editor",
width: 300,
height: 200,
value: "SUM(C5, 16, 26)"
});
BI.createWidget({
type: "bi.left",
@ -15,7 +15,7 @@ Demo.CodeEditor = BI.inherit(BI.Widget, {
items: [this.formula],
hgap: 20,
vgap: 20
})
});
}
});
BI.shortcut("demo.formula_editor", Demo.CodeEditor);

2
demo/js/base/editor/demo.multifile_editor.js

@ -20,7 +20,7 @@ Demo.CodeEditor = BI.inherit(BI.Widget, {
top: 50,
left: 50
}]
}
};
}
});
BI.shortcut("demo.multifile_editor", Demo.CodeEditor);

6
demo/js/base/editor/demo.rich_editor.js

@ -15,11 +15,11 @@ Demo.RichEditor = BI.inherit(BI.Widget, {
hgap: 30,
vgap: 50,
items: [this.editor]
})
});
},
mounted: function(){
this.editor.setValue('这是一条<font size="4" color="#009de3">测试</font>数据')
mounted: function () {
this.editor.setValue("这是一条<font size=\"4\" color=\"#009de3\">测试</font>数据");
}
});
BI.shortcut("demo.rich_editor", Demo.RichEditor);

2
demo/js/base/editor/demo.textarea_editor.js

@ -33,7 +33,7 @@ Demo.CodeEditor = BI.inherit(BI.Widget, {
editor.setValue("测试数据");
}
}]
})
});
}
});
BI.shortcut("demo.textarea_editor", Demo.CodeEditor);

6
demo/js/base/table/demo.collection_table.js

@ -12,7 +12,7 @@ Demo.Func = BI.inherit(BI.Widget, {
header[i][j] = {
type: "bi.label",
text: "表头" + i + "-" + j
}
};
columnSize[j] = 100;
}
}
@ -22,7 +22,7 @@ Demo.Func = BI.inherit(BI.Widget, {
items[i][j] = {
type: "bi.label",
text: (i < 3 ? 0 : i) + "-" + j
}
};
}
}
@ -56,7 +56,7 @@ Demo.Func = BI.inherit(BI.Widget, {
top: 10,
bottom: 10
}]
})
});
}
});
BI.shortcut("demo.collection_table", Demo.Func);

6
demo/js/base/table/demo.grid_table.js

@ -12,7 +12,7 @@ Demo.Func = BI.inherit(BI.Widget, {
header[i][j] = {
type: "bi.label",
text: "表头" + i + "-" + j
}
};
columnSize[j] = 100;
}
}
@ -22,7 +22,7 @@ Demo.Func = BI.inherit(BI.Widget, {
items[i][j] = {
type: "bi.label",
text: (i < 3 ? 0 : i) + "-" + j
}
};
}
}
@ -51,7 +51,7 @@ Demo.Func = BI.inherit(BI.Widget, {
top: 10,
bottom: 10
}]
})
});
}
});
BI.shortcut("demo.grid_table", Demo.Func);

6
demo/js/base/table/demo.resizable_table.js

@ -12,7 +12,7 @@ Demo.Func = BI.inherit(BI.Widget, {
header[i][j] = {
type: "bi.label",
text: "表头" + i + "-" + j
}
};
columnSize[j] = 100;
}
}
@ -22,7 +22,7 @@ Demo.Func = BI.inherit(BI.Widget, {
items[i][j] = {
type: "bi.label",
text: (i < 3 ? 0 : i) + "-" + j
}
};
}
}
@ -51,7 +51,7 @@ Demo.Func = BI.inherit(BI.Widget, {
top: 10,
bottom: 10
}]
})
});
}
});
BI.shortcut("demo.resizable_table", Demo.Func);

206
demo/js/base/table/demo.table_view.js

@ -154,110 +154,110 @@ Demo.Func = BI.inherit(BI.Widget, {
text: "第四行第四列"
}, {
text: "第四行第五列"
}]
}],
, [{
text: "第五行第一列"
}, {
text: "第五行第一列"
}, {
text: "第五行第三列"
}, {
text: "第五行第四列"
}, {
text: "第五行第五列"
}], [{
text: "第六行第一列"
}, {
text: "第六行第一列"
}, {
text: "第六行第三列"
}, {
text: "第六行第四列"
}, {
text: "第六行第五列"
}], [{
text: "第七行第一列"
}, {
text: "第七行第二列"
}, {
text: "第七行第三列"
}, {
text: "第七行第四列"
}, {
text: "第七行第五列"
}], [{
text: "第八行第一列"
}, {
text: "第八行第二列"
}, {
text: "第八行第三列"
}, {
text: "第八行第四列"
}, {
text: "第八行第五列"
}], [{
text: "第九行第一列"
}, {
text: "第九行第二列"
}, {
text: "第九行第三列"
}, {
text: "第九行第四列"
}, {
text: "第九行第五列"
}], [{
text: "第十行第一列"
}, {
text: "第十行第二列"
}, {
text: "第十行第三列"
}, {
text: "第十行第四列"
}, {
text: "第十行第五列"
}], [{
text: "第十一行第一列"
}, {
text: "第十一行第二列"
}, {
text: "第十一行第三列"
}, {
text: "第十一行第四列"
}, {
text: "第十一行第五列"
}], [{
text: "第十二行第一列"
}, {
text: "第十二行第二列"
}, {
text: "第十二行第三列"
}, {
text: "第十二行第四列"
}, {
text: "第十二行第五列"
}], [{
text: "第十三行第一列"
}, {
text: "第十三行第二列"
}, {
text: "第十三行第三列"
}, {
text: "第十三行第四列"
}, {
text: "第十三行第五列"
}], [{
text: "第十四行第一列"
}, {
text: "第十四行第二列"
}, {
text: "第十四行第三列"
}, {
text: "第十四行第四列"
}, {
text: "第十四行第五列"
}]];
[{
text: "第五行第一列"
}, {
text: "第五行第一列"
}, {
text: "第五行第三列"
}, {
text: "第五行第四列"
}, {
text: "第五行第五列"
}], [{
text: "第六行第一列"
}, {
text: "第六行第一列"
}, {
text: "第六行第三列"
}, {
text: "第六行第四列"
}, {
text: "第六行第五列"
}], [{
text: "第七行第一列"
}, {
text: "第七行第二列"
}, {
text: "第七行第三列"
}, {
text: "第七行第四列"
}, {
text: "第七行第五列"
}], [{
text: "第八行第一列"
}, {
text: "第八行第二列"
}, {
text: "第八行第三列"
}, {
text: "第八行第四列"
}, {
text: "第八行第五列"
}], [{
text: "第九行第一列"
}, {
text: "第九行第二列"
}, {
text: "第九行第三列"
}, {
text: "第九行第四列"
}, {
text: "第九行第五列"
}], [{
text: "第十行第一列"
}, {
text: "第十行第二列"
}, {
text: "第十行第三列"
}, {
text: "第十行第四列"
}, {
text: "第十行第五列"
}], [{
text: "第十一行第一列"
}, {
text: "第十一行第二列"
}, {
text: "第十一行第三列"
}, {
text: "第十一行第四列"
}, {
text: "第十一行第五列"
}], [{
text: "第十二行第一列"
}, {
text: "第十二行第二列"
}, {
text: "第十二行第三列"
}, {
text: "第十二行第四列"
}, {
text: "第十二行第五列"
}], [{
text: "第十三行第一列"
}, {
text: "第十三行第二列"
}, {
text: "第十三行第三列"
}, {
text: "第十三行第四列"
}, {
text: "第十三行第五列"
}], [{
text: "第十四行第一列"
}, {
text: "第十四行第二列"
}, {
text: "第十四行第三列"
}, {
text: "第十四行第四列"
}, {
text: "第十四行第五列"
}]];
var header = [[{
text: "表头1"
@ -361,7 +361,7 @@ Demo.Func = BI.inherit(BI.Widget, {
top: 10,
bottom: 10
}]
})
});
}
});
BI.shortcut("demo.table_view", Demo.Func);

14
demo/js/base/tip/demo.bubble.js

@ -10,8 +10,8 @@ Demo.Bubble = BI.inherit(BI.Widget, {
ref: function (_ref) {
btns.push(_ref);
},
type: 'bi.button',
text: 'bubble测试',
type: "bi.button",
text: "bubble测试",
height: 30,
handler: function () {
BI.Bubbles.show("singleBubble1", "bubble测试", this);
@ -22,8 +22,8 @@ Demo.Bubble = BI.inherit(BI.Widget, {
ref: function (_ref) {
btns.push(_ref);
},
type: 'bi.button',
text: 'bubble测试(居中显示)',
type: "bi.button",
text: "bubble测试(居中显示)",
height: 30,
handler: function () {
BI.Bubbles.show("singleBubble2", "bubble测试", this, {
@ -36,8 +36,8 @@ Demo.Bubble = BI.inherit(BI.Widget, {
ref: function (_ref) {
btns.push(_ref);
},
type: 'bi.button',
text: 'bubble测试(右边显示)',
type: "bi.button",
text: "bubble测试(右边显示)",
height: 30,
handler: function () {
BI.Bubbles.show("singleBubble3", "bubble测试", this, {
@ -52,7 +52,7 @@ Demo.Bubble = BI.inherit(BI.Widget, {
vgap: 200,
hgap: 20,
items: items
}
};
}
});
BI.shortcut("demo.bubble", Demo.Bubble);

2
demo/js/base/tip/demo.title.js

@ -33,7 +33,7 @@ Demo.Title = BI.inherit(BI.Widget, {
}],
hgap: 300,
vgap: 20
}
};
}
});
BI.shortcut("demo.title", Demo.Title);

42
demo/js/base/tip/demo.toast.js

@ -6,38 +6,38 @@ Demo.Toast = BI.inherit(BI.Widget, {
var items = [
{
el: {
type: 'bi.button',
text: '简单Toast测试',
height : 30,
handler: function(){
type: "bi.button",
text: "简单Toast测试",
height: 30,
handler: function () {
BI.Msg.toast("这是一条简单的数据");
}
}
}, {
el: {
type: 'bi.button',
text: '很长的Toast测试',
height : 30,
handler: function(){
BI.Msg.toast("这是一条很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长的数据")
type: "bi.button",
text: "很长的Toast测试",
height: 30,
handler: function () {
BI.Msg.toast("这是一条很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长的数据");
}
}
}, {
el: {
type: 'bi.button',
text: '非常长的Toast测试',
height : 30,
handler: function(){
BI.Msg.toast("这是一条非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长的数据")
type: "bi.button",
text: "非常长的Toast测试",
height: 30,
handler: function () {
BI.Msg.toast("这是一条非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长的数据");
}
}
}, {
el: {
type: 'bi.button',
text: '错误提示Toast测试',
type: "bi.button",
text: "错误提示Toast测试",
level: "warning",
height : 30,
handler: function(){
height: 30,
handler: function () {
BI.Msg.toast("错误提示Toast测试", "warning");
}
}
@ -46,10 +46,10 @@ Demo.Toast = BI.inherit(BI.Widget, {
BI.createWidget({
type: "bi.left",
element: this,
vgap : 200,
hgap : 20,
vgap: 200,
hgap: 20,
items: items
})
});
}
});
BI.shortcut("demo.toast", Demo.Toast);

22
demo/js/base/tree/demo.tree_view.js

@ -3,19 +3,19 @@ Demo.Func = BI.inherit(BI.Widget, {
baseCls: "demo-func"
},
_createDefaultTree: function(){
_createDefaultTree: function () {
var tree = BI.createWidget({
type: "bi.tree_view"
});
tree.initTree([
{"id":1, "pId":0, "text":"test1", open:true},
{"id":11, "pId":1, "text":"test11"},
{"id":12, "pId":1, "text":"test12"},
{"id":111, "pId":11, "text":"test111"},
{"id":2, "pId":0, "text":"test2", open:true},
{"id":21, "pId":2, "text":"test21"},
{"id":22, "pId":2, "text":"test22"}
])
{id: 1, pId: 0, text: "test1", open: true},
{id: 11, pId: 1, text: "test11"},
{id: 12, pId: 1, text: "test12"},
{id: 111, pId: 11, text: "test111"},
{id: 2, pId: 0, text: "test2", open: true},
{id: 21, pId: 2, text: "test21"},
{id: 22, pId: 2, text: "test22"}
]);
return tree;
},
@ -38,7 +38,7 @@ Demo.Func = BI.inherit(BI.Widget, {
{
el: {
type: "bi.label",
text: 'tree.initTree([{"id":1, "pId":0, "text":"test1", open:true},{"id":11, "pId":1, "text":"test11"},{"id":12, "pId":1, "text":"test12"},{"id":111, "pId":11, "text":"test111"}])',
text: "tree.initTree([{\"id\":1, \"pId\":0, \"text\":\"test1\", open:true},{\"id\":11, \"pId\":1, \"text\":\"test11\"},{\"id\":12, \"pId\":1, \"text\":\"test12\"},{\"id\":111, \"pId\":11, \"text\":\"test111\"}])",
whiteSpace: "normal"
},
height: 50
@ -46,7 +46,7 @@ Demo.Func = BI.inherit(BI.Widget, {
]
}
}]
})
});
}
});
BI.shortcut("demo.tree_view", Demo.Func);

6
demo/js/case/combo/demo.bubble_combo.js

@ -27,7 +27,7 @@ Demo.Func = BI.inherit(BI.Widget, {
},
maxHeight: 200
}
})
});
var combo2 = BI.createWidget({
type: "bi.bubble_combo",
el: {
@ -51,7 +51,7 @@ Demo.Func = BI.inherit(BI.Widget, {
maxHeight: 200,
minWidth: 600
}
})
});
BI.createWidget({
type: "bi.absolute",
element: this,
@ -64,7 +64,7 @@ Demo.Func = BI.inherit(BI.Widget, {
left: 100,
bottom: 100
}]
})
});
}
});
BI.shortcut("demo.bubble_combo", Demo.Func);

10
demo/js/case/combo/demo.editor_icon_check_combo.js

@ -15,19 +15,19 @@ Demo.TextValueCombo = BI.inherit(BI.Widget, {
width: 200,
height: 30,
items: [{
//text: "MVC-1",
// text: "MVC-1",
value: "1"
}, {
//text: "MVC-2",
// text: "MVC-2",
value: "2"
}, {
//text: "MVC-3",
// text: "MVC-3",
value: "3"
}]
}],
vgap: 20
}
};
}
})
});
BI.shortcut("demo.editor_icon_check_combo", Demo.TextValueCombo);

10
demo/js/case/combo/demo.icon_combo.js

@ -17,10 +17,10 @@ Demo.IconCombo = BI.inherit(BI.Widget, {
type: "bi.icon_combo",
trigger: "click-hover",
container: "body",
ref:function(_ref){
self.refs=_ref;
ref: function (_ref) {
self.refs = _ref;
},
iconClass: "search-font",
iconClass: "search-font",
items: [{
value: "第一项",
iconClass: "close-font"
@ -33,8 +33,8 @@ Demo.IconCombo = BI.inherit(BI.Widget, {
}]
}],
vgap: 20
}
};
}
})
});
BI.shortcut("demo.icon_combo", Demo.IconCombo);

4
demo/js/case/combo/demo.static_combo.js

@ -38,8 +38,8 @@ Demo.StaticCombo = BI.inherit(BI.Widget, {
]
}],
vgap: 20
}
};
}
})
});
BI.shortcut("demo.static_combo", Demo.StaticCombo);

4
demo/js/case/combo/demo.text_value_combo.js

@ -25,8 +25,8 @@ Demo.TextValueCombo = BI.inherit(BI.Widget, {
}]
}],
vgap: 20
}
};
}
})
});
BI.shortcut("demo.text_value_combo", Demo.TextValueCombo);

4
demo/js/case/combo/demo.text_value_down_list_combo.js

@ -37,12 +37,12 @@ Demo.TextValueDownListCombo = BI.inherit(BI.Widget, {
]
}],
vgap: 20
}
};
},
mounted: function () {
this.refs.setValue(2);
}
})
});
BI.shortcut("demo.text_value_down_list_combo", Demo.TextValueDownListCombo);

4
demo/js/case/combo/demo.text_vlaue_check_combo.js

@ -25,8 +25,8 @@ Demo.TextValueCheckCombo = BI.inherit(BI.Widget, {
}]
}],
vgap: 20
}
};
}
})
});
BI.shortcut("demo.text_value_check_combo", Demo.TextValueCheckCombo);

4
demo/js/case/demo.calendar.js

@ -17,7 +17,7 @@ Demo.Func = BI.inherit(BI.Widget, {
year: date.getFullYear(),
month: date.getMonth(),
day: date.getDate()
}
};
},
mounted: function () {
@ -26,7 +26,7 @@ Demo.Func = BI.inherit(BI.Widget, {
year: date.getFullYear(),
month: date.getMonth(),
day: date.getDate()
})
});
}
});
BI.shortcut("demo.calendar", Demo.Func);

6
demo/js/case/demo.clipboard.js

@ -11,10 +11,10 @@ Demo.Func = BI.inherit(BI.Widget, {
value: "这是复制的内容"
});
var clipboard = BI.createWidget({
type: 'bi.clipboard',
type: "bi.clipboard",
width: 100,
height: 100,
cls: 'layout-bg1',
cls: "layout-bg1",
copy: function () {
return editor.getValue();
},
@ -36,7 +36,7 @@ Demo.Func = BI.inherit(BI.Widget, {
left: 100,
top: 100
}]
})
});
}
});
BI.shortcut("demo.clipboard", Demo.Func);

2
demo/js/case/demo.color_chooser.js

@ -15,7 +15,7 @@ Demo.Func = BI.inherit(BI.Widget, {
left: 100,
top: 250
}]
}
};
}
});
BI.shortcut("demo.color_chooser", Demo.Func);

2
demo/js/case/demo.color_chooser_popup.js

@ -14,7 +14,7 @@ Demo.Func = BI.inherit(BI.Widget, {
left: 100,
top: 250
}]
}
};
}
});
BI.shortcut("demo.color_chooser_popup", Demo.Func);

2
demo/js/case/demo.complex_canvas.js

@ -29,7 +29,7 @@ Demo.Func = BI.inherit(BI.Widget, {
left: 100,
top: 50
}]
})
});
}
});
BI.shortcut("demo.complex_canvas", Demo.Func);

2
demo/js/case/demo.segment.js

@ -22,7 +22,7 @@ Demo.Func = BI.inherit(BI.Widget, {
value: 3
}]
}]
})
});
}
});
BI.shortcut("demo.segment", Demo.Func);

4
demo/js/case/editor/demo.clear_editor.js

@ -15,8 +15,8 @@ Demo.ClearEditor = BI.inherit(BI.Widget, {
watermark: "这个是带清除按钮的"
}],
vgap: 20
}
};
}
})
});
BI.shortcut("demo.clear_editor", Demo.ClearEditor);

8
demo/js/case/editor/demo.shelter_editor.js

@ -14,7 +14,7 @@ Demo.ClearEditor = BI.inherit(BI.Widget, {
},
watermark: "可以设置标记的输入框",
text: "这是一个遮罩"
})
});
BI.createWidget({
type: "bi.vertical",
element: this,
@ -22,7 +22,7 @@ Demo.ClearEditor = BI.inherit(BI.Widget, {
vgap: 20,
bgap: 50,
items: [editor]
})
});
BI.createWidget({
type: "bi.absolute",
element: this,
@ -39,8 +39,8 @@ Demo.ClearEditor = BI.inherit(BI.Widget, {
left: 10,
bottom: 10
}]
})
});
}
})
});
BI.shortcut("demo.shelter_editor", Demo.ClearEditor);

6
demo/js/case/editor/demo.sign_editor.js

@ -14,7 +14,7 @@ Demo.SignEditor = BI.inherit(BI.Widget, {
},
watermark: "可以设置标记的输入框",
text: "这是一个标记,点击它即可进行输入"
})
});
editor.setValue(2);
BI.createWidget({
type: "bi.vertical",
@ -22,8 +22,8 @@ Demo.SignEditor = BI.inherit(BI.Widget, {
hgap: 30,
vgap: 20,
items: [editor]
})
});
}
})
});
BI.shortcut("demo.sign_editor", Demo.SignEditor);

6
demo/js/case/editor/demo.sign_initial_editor.js

@ -9,7 +9,7 @@ Demo.SignInitialEditor = BI.inherit(BI.Widget, {
this.editor.setValue({
value: "123",
text: "sdga"
})
});
},
render: function () {
var self = this;
@ -26,8 +26,8 @@ Demo.SignInitialEditor = BI.inherit(BI.Widget, {
}],
vgap: 20
}
};
}
})
});
BI.shortcut("demo.sign_initial_editor", Demo.SignInitialEditor);

6
demo/js/case/editor/demo.simple_state_editor.js

@ -19,15 +19,15 @@ Demo.SimpleStateEditor = BI.inherit(BI.Widget, {
}],
vgap: 20
}
};
},
mounted: function () {
var self = this;
setTimeout(function () {
self.editor.setState(["*", "*"]);
}, 1000)
}, 1000);
}
})
});
BI.shortcut("demo.simple_state_editor", Demo.SimpleStateEditor);

6
demo/js/case/editor/demo.state_editor.js

@ -19,7 +19,7 @@ Demo.StateEditor = BI.inherit(BI.Widget, {
}],
vgap: 20
}
};
},
@ -27,8 +27,8 @@ Demo.StateEditor = BI.inherit(BI.Widget, {
var self = this;
setTimeout(function () {
self.editor.setState(["*", "*"]);
}, 1000)
}, 1000);
}
})
});
BI.shortcut("demo.state_editor", Demo.StateEditor);

2
demo/js/case/item/demo.multi_select_item.js

@ -16,7 +16,7 @@ Demo.Func = BI.inherit(BI.Widget, {
text: "复选项"
}],
hgap: 300
}
};
}
});
BI.shortcut("demo.multi_select_item", Demo.Func);

2
demo/js/case/item/demo.single_select_item.js

@ -17,7 +17,7 @@ Demo.Items = BI.inherit(BI.Widget, {
text: "单选项"
}],
hgap: 300
}
};
}
});

2
demo/js/case/item/demo.single_select_radio_item.js

@ -17,7 +17,7 @@ Demo.Items = BI.inherit(BI.Widget, {
text: "单选项"
}],
hgap: 300
}
};
}
});

2
demo/js/case/list/demo.lazy_loader.js

@ -17,7 +17,7 @@ Demo.Func = BI.inherit(BI.Widget, {
items: BI.createItems(BI.deepClone(Demo.CONSTANTS.ITEMS), {
type: "bi.button"
})
})
});
}
});
BI.shortcut("demo.lazy_loader", Demo.Func);

2
demo/js/case/list/demo.select_list.js

@ -16,7 +16,7 @@ Demo.Func = BI.inherit(BI.Widget, {
items: BI.createItems(BI.deepClone(Demo.CONSTANTS.SIMPLE_ITEMS), {
type: "bi.multi_select_item"
})
})
});
}
});
BI.shortcut("demo.select_list", Demo.Func);

2
demo/js/case/pager/demo.all_count_pager.js

@ -19,7 +19,7 @@ Demo.Func = BI.inherit(BI.Widget, {
curr: 1,
count: 1000
}]
})
});
}
});
BI.shortcut("demo.all_count_pager", Demo.Func);

2
demo/js/case/pager/demo.direction_pager.js

@ -12,7 +12,7 @@ Demo.Func = BI.inherit(BI.Widget, {
items: [{
type: "bi.direction_pager"
}]
})
});
}
});
BI.shortcut("demo.direction_pager", Demo.Func);

6
demo/js/case/pane/demo.list_pane.js

@ -15,8 +15,8 @@ Demo.Func = BI.inherit(BI.Widget, {
callback(BI.createItems(BI.deepClone(Demo.CONSTANTS.ITEMS), {
type: "bi.multi_select_item",
height: 25
}))
}, 2000)
}));
}, 2000);
},
el: {
type: "bi.button_group",
@ -24,7 +24,7 @@ Demo.Func = BI.inherit(BI.Widget, {
type: "bi.vertical"
}]
}
}
};
},
mounted: function () {

2
demo/js/case/pane/demo.multi_popup_view.js

@ -33,7 +33,7 @@ Demo.Func = BI.inherit(BI.Widget, {
}
}
}]
}
};
}
});
BI.shortcut("demo.multi_popup_view", Demo.Func);

2
demo/js/case/pane/demo.panel.js

@ -22,7 +22,7 @@ Demo.Func = BI.inherit(BI.Widget, {
height: 25
})
}
}
};
}
});
BI.shortcut("demo.panel", Demo.Func);

2
demo/js/case/pane/demo.popup_panel.js

@ -33,7 +33,7 @@ Demo.Func = BI.inherit(BI.Widget, {
}
}
}]
}
};
}
});
BI.shortcut("demo.popup_panel", Demo.Func);

2
demo/js/case/table/demo.adaptive_table.js

@ -154,7 +154,7 @@ Demo.Func = BI.inherit(BI.Widget, {
top: 10,
bottom: 10
}]
})
});
}
});
BI.shortcut("demo.adaptive_table", Demo.Func);

2
demo/js/case/table/demo.layer_tree_table.js

@ -143,7 +143,7 @@ Demo.Func = BI.inherit(BI.Widget, {
top: 10,
bottom: 10
}]
})
});
}
});
BI.shortcut("demo.layer_tree_table", Demo.Func);

2
demo/js/case/table/demo.tree_table.js

@ -143,7 +143,7 @@ Demo.Func = BI.inherit(BI.Widget, {
top: 10,
bottom: 10
}]
})
});
}
});
BI.shortcut("demo.tree_table", Demo.Func);

2
demo/js/case/tree/demo.branch_relation.js

@ -143,7 +143,7 @@ Demo.Func = BI.inherit(BI.Widget, {
type: "bi.adaptive",
element: this,
items: [relation]
})
});
}
});
BI.shortcut("demo.branch_relation", Demo.Func);

6
demo/js/case/tree/demo.branch_tree.js

@ -134,7 +134,7 @@ Demo.Func = BI.inherit(BI.Widget, {
var tree = this._createBranchTree();
var mapTree = this._createBranchMapTree();
function getItems() {
function getItems () {
return [{
text: "且",
value: "且",
@ -159,7 +159,7 @@ Demo.Func = BI.inherit(BI.Widget, {
type: "bi.label",
height: 30,
textAlign: "left",
text: "这里是一段文字" ,
text: "这里是一段文字",
value: "这里是一段文字"
}, {
text: "且",
@ -227,7 +227,7 @@ Demo.Func = BI.inherit(BI.Widget, {
}
}]
}]
})
});
}
});
BI.shortcut("demo.branch_tree", Demo.Func);

2
demo/js/case/tree/demo.handstand_branch_tree.js

@ -97,7 +97,7 @@ Demo.Func = BI.inherit(BI.Widget, {
}
}]
}]
})
});
}
});
BI.shortcut("demo.handstand_branch_tree", Demo.Func);

4
demo/js/case/tree/demo.level_tree.js

@ -63,7 +63,7 @@ Demo.Func = BI.inherit(BI.Widget, {
text: "子项3",
value: 33
}]
})
});
BI.createWidget({
type: "bi.vtape",
@ -81,7 +81,7 @@ Demo.Func = BI.inherit(BI.Widget, {
}
}
}]
})
});
}
});
BI.shortcut("demo.level_tree", Demo.Func);

6
demo/js/case/tree/demo.simple_tree.js

@ -4,7 +4,7 @@ Demo.Func = BI.inherit(BI.Widget, {
},
render: function () {
//value值一定要是字符串
// value值一定要是字符串
var tree = BI.createWidget({
type: "bi.simple_tree",
items: []
@ -66,7 +66,7 @@ Demo.Func = BI.inherit(BI.Widget, {
height: 30,
text: "setValue(['31', '32', '33'])",
handler: function () {
tree.setValue(['31', '32', '33']);
tree.setValue(["31", "32", "33"]);
}
}
}, {
@ -80,7 +80,7 @@ Demo.Func = BI.inherit(BI.Widget, {
}
}
}]
})
});
}
});
BI.shortcut("demo.simple_tree", Demo.Func);

2
demo/js/case/triggers/demo.editor_trigger.js

@ -18,7 +18,7 @@ Demo.Func = BI.inherit(BI.Widget, {
}],
hgap: 20,
vgap: 20
})
});
}
});
BI.shortcut("demo.editor_trigger", Demo.Func);

2
demo/js/case/triggers/demo.icon_trigger.js

@ -18,7 +18,7 @@ Demo.Func = BI.inherit(BI.Widget, {
}],
hgap: 20,
vgap: 20
})
});
}
});
BI.shortcut("demo.icon_trigger", Demo.Func);

2
demo/js/case/triggers/demo.select_text_trigger.js

@ -19,7 +19,7 @@ Demo.Func = BI.inherit(BI.Widget, {
}],
hgap: 20,
vgap: 20
})
});
}
});
BI.shortcut("demo.select_text_trigger", Demo.Func);

2
demo/js/case/triggers/demo.text_trigger.js

@ -19,7 +19,7 @@ Demo.Func = BI.inherit(BI.Widget, {
}],
hgap: 20,
vgap: 20
})
});
}
});
BI.shortcut("demo.text_trigger", Demo.Func);

90
demo/js/category/customATree/demo.multilayerselecttree.leveltree.js

@ -26,8 +26,8 @@ BI.PlatformLevelTree = BI.inherit(BI.Widget, {
itemsCreator: function (op, callback) {
o.itemsCreator(op, function (items) {
callback(self._formatItems(items))
})
callback(self._formatItems(items));
});
},
el: {
@ -44,7 +44,7 @@ BI.PlatformLevelTree = BI.inherit(BI.Widget, {
});
this.tree.on(BI.CustomTree.EVENT_CHANGE, function () {
self.fireEvent(BI.PlatformLevelTree.EVENT_CHANGE, arguments);
})
});
},
_formatItems: function (nodes) {
@ -103,93 +103,93 @@ BI.DemoLevelTree = BI.inherit(BI.Widget, {
self.tree = this;
},
itemsCreator: function (op, callback) {
if (!op.node) {//根节点
if (!op.node) {// 根节点
callback([{
"id": 1,
"pId": 0,
id: 1,
pId: 0,
text: "A",
value: 1,
isParent: true
}, {
"id": 2,
"pId": 0,
"text": "B",
id: 2,
pId: 0,
text: "B",
value: 2,
isParent: true,
open: true
}])
}]);
} else {
if (op.node.id == 1) {
callback([
{
"id": 11,
"pId": 1,
"text": "test11",
id: 11,
pId: 1,
text: "test11",
value: 11,
layer: 1,
isParent: true
},
{
"id": 12,
"pId": 1,
"text": "test12",
id: 12,
pId: 1,
text: "test12",
value: 12,
layer: 1
},
{
"id": 13,
"pId": 1,
"text": "test13",
id: 13,
pId: 1,
text: "test13",
value: 13,
layer: 1
},
{
"id": 14,
"pId": 1,
"text": "test14",
id: 14,
pId: 1,
text: "test14",
value: 14,
layer: 1,
height: 35
},
{
"id": 15,
"pId": 1,
"text": "test15",
id: 15,
pId: 1,
text: "test15",
value: 15,
layer: 1
},
{
"id": 16,
"pId": 1,
"text": "test16",
id: 16,
pId: 1,
text: "test16",
value: 16,
layer: 1
},
{"id": 17, "pId": 1, "text": "test17", layer: 1, value: 17}
])
{id: 17, pId: 1, text: "test17", layer: 1, value: 17}
]);
} else if (op.node.id == 2) {
callback([{
"id": 21,
"pId": 2,
"text": "test21",
id: 21,
pId: 2,
text: "test21",
value: 21,
layer: 1
},
{
"id": 22,
"pId": 2,
"text": "test22",
value: 22,
layer: 1
}])
{
id: 22,
pId: 2,
text: "test22",
value: 22,
layer: 1
}]);
} else if (op.node.id == 11) {
callback([{
"id": 111,
"pId": 11,
"text": "test111",
id: 111,
pId: 11,
text: "test111",
value: 111,
layer: 2
}])
}]);
}
}
}
@ -205,7 +205,7 @@ BI.DemoLevelTree = BI.inherit(BI.Widget, {
height: 25
}]
}
};
},
mounted: function () {

6
demo/js/category/largeTable/cell.js

@ -8,7 +8,7 @@ BI.DetailTableCell = BI.inherit(BI.Widget, {
baseCls: "bi-detail-table-cell",
dId: "",
text: ""
})
});
},
_init: function () {
@ -36,9 +36,9 @@ BI.DetailTableCell = BI.inherit(BI.Widget, {
type: "bi.vertical",
element: this,
items: [item]
})
});
//表格样式
// 表格样式
if (BI.isNotNull(o.styles) && BI.isObject(o.styles)) {
this.element.css(o.styles);
}

4
demo/js/category/largeTable/header.js

@ -5,7 +5,7 @@ BI.DetailTableHeader = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.DetailTableHeader.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-detail-table-header"
})
});
},
_init: function () {
@ -29,7 +29,7 @@ BI.DetailTableHeader = BI.inherit(BI.Widget, {
}]
});
//表格样式
// 表格样式
if (BI.isNotNull(o.styles) && BI.isObject(o.styles)) {
this.element.css(o.styles);
}

6
demo/js/category/largeTable/largeTable.js

@ -67,7 +67,7 @@ Demo.Face = BI.inherit(BI.Widget, {
top: 0,
bottom: 0
}]
}
};
},
mounted: function () {
@ -114,7 +114,7 @@ Demo.Face = BI.inherit(BI.Widget, {
for (var m = 0; m < times - 1; m++) {
BI.each(items[n % 100], function (j, item) {
copy[n].push(item);
})
});
}
}
return copy;
@ -126,7 +126,7 @@ Demo.Face = BI.inherit(BI.Widget, {
for (var m = 0; m < times - 1; m++) {
BI.each(items[n], function (j, item) {
copy[n].push(item);
})
});
}
}
return copy;

2
demo/js/category/largeTable/sequenceheadercell.normal.js

@ -6,7 +6,7 @@ BI.NormalSequenceHeaderCell = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.NormalSequenceHeaderCell.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-normal-sequence-header-cell"
})
});
},
_init: function () {

4
demo/js/category/largeTable/table.js

File diff suppressed because one or more lines are too long

12
demo/js/category/sortTree/demo.sortTree.js

@ -8,7 +8,7 @@ Demo.Expander = BI.inherit(BI.Widget, {
},
el: o.el,
popup: o.popup
}
};
},
update: function (opt) {
@ -16,7 +16,7 @@ Demo.Expander = BI.inherit(BI.Widget, {
return true;
}
});
BI.shortcut("demo.sort_tree_expander", Demo.Expander)
BI.shortcut("demo.sort_tree_expander", Demo.Expander);
/**
* guy
@ -62,7 +62,7 @@ Demo.SortTree = BI.inherit(BI.Widget, {
"margin-right": $currentItem.css("margin-right"),
"margin-top": $currentItem.css("margin-top"),
"margin-bottom": $currentItem.css("margin-bottom"),
"margin": $currentItem.css("margin")
margin: $currentItem.css("margin")
});
return holder.element;
},
@ -73,12 +73,12 @@ Demo.SortTree = BI.inherit(BI.Widget, {
update: function (event, ui) {
var node = ui.item.data("node");
var findTheNode = tree.search(node.id);
//这里简单处理下找到它的父节点
// 这里简单处理下找到它的父节点
var currentIndex = 0, parentNode;
if (ui.item.next().length > 0) {
var n = ui.item.next().data("node");
var nextId = n.id;
var nextNode = tree.search(nextId)
var nextNode = tree.search(nextId);
parentNode = nextNode.getParent();
var nextIndex = parentNode.getChildIndex(nextId);
currentIndex = nextIndex > 0 && (nextIndex - 1);
@ -86,7 +86,7 @@ Demo.SortTree = BI.inherit(BI.Widget, {
} else if (ui.item.prev().length > 0) {
var n = ui.item.prev().data("node");
var prevId = n.id;
var prevNode = tree.search(prevId)
var prevNode = tree.search(prevId);
parentNode = prevNode.getParent();
var prevIndex = parentNode.getChildIndex(prevId);
currentIndex = prevIndex + 1;

2
demo/js/center.js

@ -16,7 +16,7 @@ Demo.Center = BI.inherit(BI.Widget, {
type: v
});
}
}
};
},
setValue: function (v) {

48
demo/js/chart/demo.axis_chart.js

@ -13,7 +13,7 @@ Demo.Func = BI.inherit(BI.Widget, {
cardCreator: function (v) {
return {
type: v
}
};
}
};
},
@ -21,32 +21,32 @@ Demo.Func = BI.inherit(BI.Widget, {
mounted: function () {
var self = this;
var items = [[{
"data": [
{"x": "孙林", "y": 789},
{"x": "金士鹏", "y": 156},
{"x": "张珊", "y": 289},
{"x": "孙阳", "y": 562},
{"x": "袁成洁", "y": 546},
{"x": "张颖", "y": 218},
{"x": "王伟", "y": 541},
{"x": "张武", "y": 219},
{"x": "韩文", "y": 345}
data: [
{x: "孙林", y: 789},
{x: "金士鹏", y: 156},
{x: "张珊", y: 289},
{x: "孙阳", y: 562},
{x: "袁成洁", y: 546},
{x: "张颖", y: 218},
{x: "王伟", y: 541},
{x: "张武", y: 219},
{x: "韩文", y: 345}
],
"name": "测试1",
name: "测试1",
stack: 1
}, {
"data": [
{"x": "孙林", "y": 789},
{"x": "金士鹏", "y": 156},
{"x": "张珊", "y": 289},
{"x": "孙阳", "y": 562},
{"x": "袁成洁", "y": 546},
{"x": "张颖", "y": 218},
{"x": "王伟", "y": 541},
{"x": "张武", "y": 219},
{"x": "韩文", "y": 345}
data: [
{x: "孙林", y: 789},
{x: "金士鹏", y: 156},
{x: "张珊", y: 289},
{x: "孙阳", y: 562},
{x: "袁成洁", y: 546},
{x: "张颖", y: 218},
{x: "王伟", y: 541},
{x: "张武", y: 219},
{x: "韩文", y: 345}
],
"name": "测试2",
name: "测试2",
stack: 1
}]];
var types = ["bi.axis_chart", "bi.line_chart", "bi.bar_chart"];
@ -60,7 +60,7 @@ Demo.Func = BI.inherit(BI.Widget, {
}
self.tab.setSelect(types[index]);
self.tab.populate(BI.deepClone(items));
}, 2000)
}, 2000);
},
destroyed: function () {

6
demo/js/config/fix.js

@ -1,4 +1,4 @@
//定义Model路由
// 定义Model路由
var modelRouter = new (BI.inherit(BI.WRouter, {
routes: {
"": "index"
@ -8,7 +8,7 @@ var modelRouter = new (BI.inherit(BI.WRouter, {
return {};
}
}));
//定义View路由
// 定义View路由
var viewRouter = new (BI.inherit(BI.WRouter, {
routes: {
"": "TestView",
@ -49,7 +49,7 @@ var viewRouter = new (BI.inherit(BI.WRouter, {
}
}));
//注册路由
// 注册路由
BI.View.registerVMRouter(viewRouter, modelRouter);

6
demo/js/config/widget.js

@ -5,7 +5,7 @@ Demo.WIDGET_CONFIG = [{
}, {
pId: 4,
id: 401,
text: '各种小控件'
text: "各种小控件"
}, {
pId: 401,
text: "各种通用按钮",
@ -180,8 +180,8 @@ Demo.WIDGET_CONFIG = [{
value: "demo.date_time"
}, {
pId: 412,
text: 'bi.time_interval',
value: 'demo.time_interval'
text: "bi.time_interval",
value: "demo.time_interval"
}, {
pId: 4,
id: 413,

18
demo/js/core/abstract/combination/demo.combo.js

@ -204,8 +204,8 @@ Demo.Func = BI.inherit(BI.Widget, {
},
isAllCheckedBySelectedValue: function (selectedValue) {
return selectedValue.length == self.years.length
// return true;
return selectedValue.length == self.years.length;
// return true;
}
}],
buttons: [{
@ -294,7 +294,7 @@ Demo.Func = BI.inherit(BI.Widget, {
text: val,
value: val,
height: 25
}
};
});
popuplate(map);
@ -302,7 +302,7 @@ Demo.Func = BI.inherit(BI.Widget, {
},
hasNext: function (options) {
return options.times < 3
return options.times < 3;
}
},
buttons: [{
@ -327,7 +327,7 @@ Demo.Func = BI.inherit(BI.Widget, {
items: [yearCombo, multiCombo, dynamicPopupCombo, dynamicCombo],
hgap: 20,
vgap: 20
})
});
},
_createBottom: function () {
@ -408,7 +408,7 @@ Demo.Func = BI.inherit(BI.Widget, {
type: "bi.table",
columns: 2,
rows: 6,
columnSize: [0.5, 'fill'],
columnSize: [0.5, "fill"],
rowSize: 30
},
left: 4,
@ -458,7 +458,7 @@ Demo.Func = BI.inherit(BI.Widget, {
type: "bi.text_button",
whiteSpace: "normal",
text: new Date().getFullYear() + v
})
});
}
}
},
@ -470,7 +470,7 @@ Demo.Func = BI.inherit(BI.Widget, {
items: [combo, childCombo, monthCombo, yearCombo],
hgap: 20,
vgap: 20
})
});
},
render: function () {
@ -487,7 +487,7 @@ Demo.Func = BI.inherit(BI.Widget, {
row: 1,
el: this._createBottom()
}]
}
};
}
});
BI.shortcut("demo.combo", Demo.Func);

16
demo/js/core/abstract/combination/demo.combo2.js

@ -8,7 +8,7 @@ Demo.Func = BI.inherit(BI.Widget, {
type: "bi.button",
height: 25,
text: "点击"
}
};
},
oneCombo: function () {
@ -71,7 +71,7 @@ Demo.Func = BI.inherit(BI.Widget, {
height: 1200
}
}
})
});
},
fiveCombo: function () {
@ -89,7 +89,7 @@ Demo.Func = BI.inherit(BI.Widget, {
},
maxHeight: 2000
}
})
});
},
sixCombo: function () {
@ -106,7 +106,7 @@ Demo.Func = BI.inherit(BI.Widget, {
height: 1200
}
}
})
});
},
sevenCombo: function () {
@ -116,7 +116,7 @@ Demo.Func = BI.inherit(BI.Widget, {
adjustYOffset: 5,
direction: "bottom",
isNeedAdjustWidth: false,
//isNeedAdjustHeight: false,
// isNeedAdjustHeight: false,
offsetStyle: "center",
el: this._createEl(),
popup: {
@ -126,7 +126,7 @@ Demo.Func = BI.inherit(BI.Widget, {
height: 1200
}
}
})
});
},
eightCombo: function () {
@ -136,7 +136,7 @@ Demo.Func = BI.inherit(BI.Widget, {
adjustYOffset: 5,
direction: "right",
isNeedAdjustWidth: false,
//isNeedAdjustHeight: false,
// isNeedAdjustHeight: false,
offsetStyle: "middle",
el: this._createEl(),
popup: {
@ -146,7 +146,7 @@ Demo.Func = BI.inherit(BI.Widget, {
height: 200
}
}
})
});
},
render: function () {

4
demo/js/core/abstract/combination/demo.combo_group.js

@ -68,7 +68,7 @@ Demo.Func = BI.inherit(BI.Widget, {
items: [childCombo],
hgap: 20,
vgap: 20
})
});
},
render: function () {
@ -81,7 +81,7 @@ Demo.Func = BI.inherit(BI.Widget, {
row: 0,
el: this._createBottom()
}]
}
};
}
});
BI.shortcut("demo.combo_group", Demo.Func);

2
demo/js/core/abstract/combination/demo.expander.js

@ -35,7 +35,7 @@ Demo.Func = BI.inherit(BI.Widget, {
})
}
}]
}
};
}
});
BI.shortcut("demo.expander", Demo.Func);

6
demo/js/core/abstract/combination/demo.loader.js

@ -14,14 +14,14 @@ Demo.Func = BI.inherit(BI.Widget, {
return BI.extend(v, {
type: "bi.single_select_item",
height: 25
})
}))
});
}));
}, 1000);
},
hasNext: function (options) {
return options.times * 10 < items.length;
}
}
};
}
});
BI.shortcut("demo.loader", Demo.Func);

4
demo/js/core/abstract/combination/demo.navigation.js

@ -7,7 +7,7 @@ Demo.Func = BI.inherit(BI.Widget, {
type: "bi.label",
cls: "layout-bg" + BI.random(1, 8),
text: "第" + v + "页"
})
});
},
render: function () {
@ -29,7 +29,7 @@ Demo.Func = BI.inherit(BI.Widget, {
}]
},
cardCreator: BI.bind(this._createNav, this)
}
};
}
});
BI.shortcut("demo.navigation", Demo.Func);

4
demo/js/core/abstract/combination/demo.sercher.js

@ -10,7 +10,7 @@ Demo.Func = BI.inherit(BI.Widget, {
handler: function (v) {
}
})
});
},
render: function () {
@ -78,7 +78,7 @@ Demo.Func = BI.inherit(BI.Widget, {
top: 100,
left: 300
}]
})
});
}
});
BI.shortcut("demo.searcher", Demo.Func);

2
demo/js/core/abstract/combination/demo.switcher.js

@ -53,7 +53,7 @@ Demo.Func = BI.inherit(BI.Widget, {
},
adapter: adapter
}]
})
});
}
});
BI.shortcut("demo.switcher", Demo.Func);

6
demo/js/core/abstract/combination/demo.tab.js

@ -10,13 +10,13 @@ Demo.Func = BI.inherit(BI.Widget, {
type: "bi.label",
cls: "layout-bg1",
text: "面板1"
})
});
case 2:
return BI.createWidget({
type: "bi.label",
cls: "layout-bg2",
text: "面板2"
})
});
}
},
@ -61,7 +61,7 @@ Demo.Func = BI.inherit(BI.Widget, {
left: 200,
top: 200
}]
})
});
tab.setSelect(2);
}

4
demo/js/core/abstract/demo.button_group.js

@ -52,11 +52,11 @@ Demo.Func = BI.inherit(BI.Widget, {
type: "bi.label",
text: "3"
}
}])
}]);
}
}]
}
};
}
});
BI.shortcut("demo.button_group", Demo.Func);

2
demo/js/core/abstract/demo.button_tree.js

@ -20,7 +20,7 @@ Demo.Func = BI.inherit(BI.Widget, {
text: "1",
value: 1
}]
}
};
}
});
BI.shortcut("demo.button_tree", Demo.Func);

4
demo/js/core/abstract/demo.collection_view.js

@ -22,7 +22,7 @@ Demo.Func = BI.inherit(BI.Widget, {
y: Math.floor(index / 10) * 50,
width: 50,
height: 50
}
};
}
});
BI.createWidget({
@ -35,7 +35,7 @@ Demo.Func = BI.inherit(BI.Widget, {
top: 10,
bottom: 10
}]
})
});
}
});
BI.shortcut("demo.collection_view", Demo.Func);

86
demo/js/core/abstract/demo.custom_tree.js

@ -37,105 +37,105 @@ Demo.Func = BI.inherit(BI.Widget, {
this.asyncTree = BI.createWidget({
type: "bi.custom_tree",
itemsCreator: function (op, callback) {
if (!op.node) {//根节点
if (!op.node) {// 根节点
callback([{
"id": 1,
"pId": 0,
id: 1,
pId: 0,
type: "bi.plus_group_node",
text: "test1",
value: 1,
height: 25,
isParent: true
}, {
"id": 2,
"pId": 0,
id: 2,
pId: 0,
type: "bi.plus_group_node",
"text": "test2",
text: "test2",
value: 1,
isParent: true,
open: true,
height: 25
}])
}]);
} else {
if (op.node.id == 1) {
callback([
{
"id": 11,
"pId": 1,
id: 11,
pId: 1,
type: "bi.plus_group_node",
"text": "test11",
text: "test11",
value: 11,
height: 25,
isParent: true
},
{
"id": 12,
"pId": 1,
id: 12,
pId: 1,
type: "bi.single_select_item",
"text": "test12",
text: "test12",
value: 12,
height: 35
},
{
"id": 13,
"pId": 1,
id: 13,
pId: 1,
type: "bi.single_select_item",
"text": "test13",
text: "test13",
value: 13,
height: 35
},
{
"id": 14,
"pId": 1,
id: 14,
pId: 1,
type: "bi.single_select_item",
"text": "test14",
text: "test14",
value: 14,
height: 35
},
{
"id": 15,
"pId": 1,
id: 15,
pId: 1,
type: "bi.single_select_item",
"text": "test15",
text: "test15",
value: 15,
height: 35
},
{
"id": 16,
"pId": 1,
id: 16,
pId: 1,
type: "bi.single_select_item",
"text": "test16",
text: "test16",
value: 16,
height: 35
},
{"id": 17, "pId": 1, type: "bi.single_select_item", "text": "test17", value: 17, height: 35}
])
{id: 17, pId: 1, type: "bi.single_select_item", text: "test17", value: 17, height: 35}
]);
} else if (op.node.id == 2) {
callback([{
"id": 21,
"pId": 2,
id: 21,
pId: 2,
type: "bi.single_select_item",
"text": "test21",
text: "test21",
value: 21,
height: 35
},
{
"id": 22,
"pId": 2,
type: "bi.single_select_item",
"text": "test22",
value: 22,
height: 35
}])
{
id: 22,
pId: 2,
type: "bi.single_select_item",
text: "test22",
value: 22,
height: 35
}]);
} else if (op.node.id == 11) {
callback([{
"id": 111,
"pId": 11,
id: 111,
pId: 11,
type: "bi.single_select_item",
"text": "test111",
text: "test111",
value: 111,
height: 35
}])
}]);
}
}
},
@ -239,7 +239,7 @@ Demo.Func = BI.inherit(BI.Widget, {
]
}
}]
})
});
}
});
BI.shortcut("demo.custom_tree", Demo.Func);

4
demo/js/core/abstract/demo.grid_view.js

@ -11,7 +11,7 @@ Demo.Func = BI.inherit(BI.Widget, {
items[i][j] = {
type: "bi.label",
text: i + "-" + j
}
};
}
}
var grid = BI.createWidget({
@ -48,7 +48,7 @@ Demo.Func = BI.inherit(BI.Widget, {
top: 10,
bottom: 10
}]
})
});
}
});
BI.shortcut("demo.grid_view", Demo.Func);

2
demo/js/core/abstract/demo.list_view.js

@ -16,7 +16,7 @@ Demo.Func = BI.inherit(BI.Widget, {
text: (i + 1) + "." + item.text
});
})
}
};
}
});
BI.shortcut("demo.list_view", Demo.Func);

8
demo/js/core/abstract/demo.virtual_group.js

@ -9,7 +9,7 @@ Demo.Func = BI.inherit(BI.Widget, {
type: "demo.virtual_group_item",
value: i,
key: i + 1
}
};
});
return items;
},
@ -66,7 +66,7 @@ Demo.Func = BI.inherit(BI.Widget, {
}
}]
}
};
}
});
BI.shortcut("demo.virtual_group", Demo.Func);
@ -86,7 +86,7 @@ Demo.Item = BI.inherit(BI.Widget, {
},
height: this.options.height,
text: "key:" + o.key + ",随机数" + BI.UUID()
}
};
},
shouldUpdate: function (nextProps) {
@ -97,7 +97,7 @@ Demo.Item = BI.inherit(BI.Widget, {
update: function (item) {
this.label.setText(item.value);
console.log("更新了一项");
return true;//返回是不是更新成功
return true;// 返回是不是更新成功
},
created: function () {

2
demo/js/core/abstract/demo.virtual_list.js

@ -12,7 +12,7 @@ Demo.Func = BI.inherit(BI.Widget, {
text: (i + 1) + "." + item.text
});
})
}
};
}
});
BI.shortcut("demo.virtual_list", Demo.Func);

2
demo/js/core/layout/demo.absolute.js

@ -16,7 +16,7 @@ Demo.AbsoluteLayout = BI.inherit(BI.Widget, {
left: 100,
top: 100
}]
}
};
}
});
BI.shortcut("demo.absolute", Demo.AbsoluteLayout);

24
demo/js/core/layout/demo.border.js

@ -6,28 +6,28 @@ Demo.BorderLayout = BI.inherit(BI.Widget, {
baseCls: "demo-border"
},
_createNorth: function(){
_createNorth: function () {
return BI.createWidget({
type: "bi.label",
text: "North",
cls: "layout-bg1",
height: 30
})
});
},
_createWest: function(){
_createWest: function () {
return BI.createWidget({
type: "bi.center",
cls: "layout-bg2",
items:[{
items: [{
type: "bi.label",
text: "West",
whiteSpace: "normal"
}]
})
});
},
_createCenter: function(){
_createCenter: function () {
return BI.createWidget({
type: "bi.center",
cls: "layout-bg3",
@ -36,10 +36,10 @@ Demo.BorderLayout = BI.inherit(BI.Widget, {
text: "Center",
whiteSpace: "normal"
}]
})
});
},
_createEast: function(){
_createEast: function () {
return BI.createWidget({
type: "bi.center",
cls: "layout-bg5",
@ -48,16 +48,16 @@ Demo.BorderLayout = BI.inherit(BI.Widget, {
text: "East",
whiteSpace: "normal"
}]
})
});
},
_createSouth: function(){
_createSouth: function () {
return BI.createWidget({
type: "bi.label",
text: "South",
cls: "layout-bg6",
height: 50
})
});
},
render: function () {
@ -91,7 +91,7 @@ Demo.BorderLayout = BI.inherit(BI.Widget, {
},
center: this._createCenter()
}
}
};
}
});
BI.shortcut("demo.border", Demo.BorderLayout);

8
demo/js/core/layout/demo.center.js

@ -13,23 +13,23 @@ Demo.CenterLayout = BI.inherit(BI.Widget, {
text: "其实是一个grid嵌套absolute的实现",
cls: "layout-bg1",
whiteSpace: "normal"
},{
}, {
type: "bi.label",
text: "Center 2,为了演示label是占满整个的,用了一个whiteSpace:normal",
cls: "layout-bg2",
whiteSpace: "normal"
},{
}, {
type: "bi.label",
text: "Center 3",
cls: "layout-bg3"
},{
}, {
type: "bi.label",
text: "Center 4",
cls: "layout-bg5"
}],
hgap: 20,
vgap: 20
}
};
}
});
BI.shortcut("demo.center_layout", Demo.CenterLayout);

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save