Browse Source

Merge pull request #671 in VISUAL/fineui from ~ZHENFEI.LI/fineui:master to master

* commit '4e4f4c39b553cd4bc6fb9e324b821e3df5fa572f':
  BI-31697 IE下用一倍图
  BI-31697 pane的loading动画:矩形宽度调为3,解决有些浏览器对小数点像素的补正问题
  BI-31697 上传新的加载图标
  BI-31697 组件加载尺寸修改为30*30
es6
Zhenfei.Li 6 years ago
parent
commit
b15f8f9d72
  1. 23470
      dist/base.js
  2. 165133
      dist/bundle.js
  3. 32
      dist/bundle.min.js
  4. 19064
      dist/case.js
  5. 344
      dist/config.js
  6. 67921
      dist/core.js
  7. 26866
      dist/demo.js
  8. 165244
      dist/fineui.js
  9. 32
      dist/fineui.min.js
  10. 42393
      dist/fineui_without_jquery_polyfill.js
  11. BIN
      dist/images/1x/icon/wave_loading.gif
  12. BIN
      dist/images/2x/icon/wave_loading.gif
  13. 442
      dist/polyfill.js
  14. 1168
      dist/router.js
  15. 29612
      dist/utils.js
  16. 42198
      dist/widget.js
  17. 20
      src/base/pane.js
  18. 8
      src/less/base/pane.less
  19. 109
      src/less/lib/icon.less

23470
dist/base.js vendored

File diff suppressed because it is too large Load Diff

165133
dist/bundle.js vendored

File diff suppressed because one or more lines are too long

32
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

19064
dist/case.js vendored

File diff suppressed because it is too large Load Diff

344
dist/config.js vendored

@ -1,173 +1,173 @@
BI.resourceURL = "resource/"; BI.resourceURL = "resource/";
BI.i18n = { BI.i18n = {
"BI-Multi_Date_Quarter_End": "季度末", "BI-Multi_Date_Quarter_End": "季度末",
"BI-Multi_Date_Month_Begin": "月初", "BI-Multi_Date_Month_Begin": "月初",
"BI-Multi_Date_YMD": "年/月/日", "BI-Multi_Date_YMD": "年/月/日",
"BI-Custom_Color": "自定义颜色", "BI-Custom_Color": "自定义颜色",
"BI-Numerical_Interval_Input_Data": "请输入数值", "BI-Numerical_Interval_Input_Data": "请输入数值",
"BI-Please_Input_Natural_Number": "请输入非负整数", "BI-Please_Input_Natural_Number": "请输入非负整数",
"BI-No_More_Data": "无更多数据", "BI-No_More_Data": "无更多数据",
"BI-Basic_Altogether": "共", "BI-Basic_Altogether": "共",
"BI-Basic_Sunday": "星期日", "BI-Basic_Sunday": "星期日",
"BI-Widget_Background_Colour": "组件背景", "BI-Widget_Background_Colour": "组件背景",
"BI-Color_Picker_Error_Text": "请输入0~255的正整数", "BI-Color_Picker_Error_Text": "请输入0~255的正整数",
"BI-Multi_Date_Month": "月", "BI-Multi_Date_Month": "月",
"BI-No_Selected_Item": "没有可选项", "BI-No_Selected_Item": "没有可选项",
"BI-Multi_Date_Year_Begin": "年初", "BI-Multi_Date_Year_Begin": "年初",
"BI-Quarter_1": "第1季度", "BI-Quarter_1": "第1季度",
"BI-Quarter_2": "第2季度", "BI-Quarter_2": "第2季度",
"BI-Quarter_3": "第3季度", "BI-Quarter_3": "第3季度",
"BI-Quarter_4": "第4季度", "BI-Quarter_4": "第4季度",
"BI-Multi_Date_Year_Next": "年后", "BI-Multi_Date_Year_Next": "年后",
"BI-Multi_Date_Month_Prev": "个月前", "BI-Multi_Date_Month_Prev": "个月前",
"BI-Month_Trigger_Error_Text": "请输入1~12的正整数", "BI-Month_Trigger_Error_Text": "请输入1~12的正整数",
"BI-Less_And_Equal": "小于等于", "BI-Less_And_Equal": "小于等于",
"BI-Year_Trigger_Invalid_Text": "请输入有效时间", "BI-Year_Trigger_Invalid_Text": "请输入有效时间",
"BI-Multi_Date_Week_Next": "周后", "BI-Multi_Date_Week_Next": "周后",
"BI-Font_Size": "字号", "BI-Font_Size": "字号",
"BI-Basic_Total": "共", "BI-Basic_Total": "共",
"BI-Already_Selected": "已选择", "BI-Already_Selected": "已选择",
"BI-Formula_Insert": "插入", "BI-Formula_Insert": "插入",
"BI-Select_All": "全选", "BI-Select_All": "全选",
"BI-Basic_Tuesday": "星期二", "BI-Basic_Tuesday": "星期二",
"BI-Multi_Date_Month_End": "月末", "BI-Multi_Date_Month_End": "月末",
"BI-Load_More": "点击加载更多数据", "BI-Load_More": "点击加载更多数据",
"BI-Basic_September": "九月", "BI-Basic_September": "九月",
"BI-Current_Is_Last_Page": "当前已是最后一页", "BI-Current_Is_Last_Page": "当前已是最后一页",
"BI-Basic_Auto": "自动", "BI-Basic_Auto": "自动",
"BI-Basic_Count": "个", "BI-Basic_Count": "个",
"BI-Basic_Value": "值", "BI-Basic_Value": "值",
"BI-Basic_Unrestricted": "无限制", "BI-Basic_Unrestricted": "无限制",
"BI-Quarter_Trigger_Error_Text": "请输入1~4的正整数", "BI-Quarter_Trigger_Error_Text": "请输入1~4的正整数",
"BI-Basic_More": "更多", "BI-Basic_More": "更多",
"BI-Basic_Wednesday": "星期三", "BI-Basic_Wednesday": "星期三",
"BI-Basic_Bold": "加粗", "BI-Basic_Bold": "加粗",
"BI-Basic_Simple_Saturday": "六", "BI-Basic_Simple_Saturday": "六",
"BI-Multi_Date_Month_Next": "个月后", "BI-Multi_Date_Month_Next": "个月后",
"BI-Basic_March": "三月", "BI-Basic_March": "三月",
"BI-Current_Is_First_Page": "当前已是第一页", "BI-Current_Is_First_Page": "当前已是第一页",
"BI-Basic_Thursday": "星期四", "BI-Basic_Thursday": "星期四",
"BI-Basic_Prompt": "提示", "BI-Basic_Prompt": "提示",
"BI-Multi_Date_Today": "今天", "BI-Multi_Date_Today": "今天",
"BI-Multi_Date_Quarter_Prev": "个季度前", "BI-Multi_Date_Quarter_Prev": "个季度前",
"BI-Row_Header": "行表头", "BI-Row_Header": "行表头",
"BI-Date_Trigger_Error_Text": "日期格式示例:2015-3-11", "BI-Date_Trigger_Error_Text": "日期格式示例:2015-3-11",
"BI-Basic_Cancel": "取消", "BI-Basic_Cancel": "取消",
"BI-Basic_January": "一月", "BI-Basic_January": "一月",
"BI-Basic_June": "六月", "BI-Basic_June": "六月",
"BI-Basic_July": "七月", "BI-Basic_July": "七月",
"BI-Basic_April": "四月", "BI-Basic_April": "四月",
"BI-Multi_Date_Quarter_Begin": "季度初", "BI-Multi_Date_Quarter_Begin": "季度初",
"BI-Multi_Date_Week": "周", "BI-Multi_Date_Week": "周",
"BI-Click_Blank_To_Select": "点击\"空格键\"选中完全匹配项", "BI-Click_Blank_To_Select": "点击\"空格键\"选中完全匹配项",
"BI-Basic_August": "八月", "BI-Basic_August": "八月",
"BI-Word_Align_Left": "文字居左", "BI-Word_Align_Left": "文字居左",
"BI-Basic_November": "十一月", "BI-Basic_November": "十一月",
"BI-Font_Colour": "字体颜色", "BI-Font_Colour": "字体颜色",
"BI-Multi_Date_Day_Prev": "天前", "BI-Multi_Date_Day_Prev": "天前",
"BI-Select_Part": "部分选择", "BI-Select_Part": "部分选择",
"BI-Multi_Date_Day_Next": "天后", "BI-Multi_Date_Day_Next": "天后",
"BI-Less_Than": "小于", "BI-Less_Than": "小于",
"BI-Basic_February": "二月", "BI-Basic_February": "二月",
"BI-Multi_Date_Year": "年", "BI-Multi_Date_Year": "年",
"BI-Number_Index": "序号", "BI-Number_Index": "序号",
"BI-Multi_Date_Week_Prev": "周前", "BI-Multi_Date_Week_Prev": "周前",
"BI-Next_Page": "下一页", "BI-Next_Page": "下一页",
"BI-Right_Page": "向右翻页", "BI-Right_Page": "向右翻页",
"BI-Numerical_Interval_Signal_Value": "前后值相等,请将操作符改为“≤”", "BI-Numerical_Interval_Signal_Value": "前后值相等,请将操作符改为“≤”",
"BI-Basic_December": "十二月", "BI-Basic_December": "十二月",
"BI-Basic_Saturday": "星期六", "BI-Basic_Saturday": "星期六",
"BI-Basic_Simple_Wednesday": "三", "BI-Basic_Simple_Wednesday": "三",
"BI-Multi_Date_Quarter_Next": "个季度后", "BI-Multi_Date_Quarter_Next": "个季度后",
"BI-Basic_October": "十月", "BI-Basic_October": "十月",
"BI-Basic_Simple_Friday": "五", "BI-Basic_Simple_Friday": "五",
"BI-Basic_Save": "保存", "BI-Basic_Save": "保存",
"BI-Numerical_Interval_Number_Value": "请保证前面的数值小于/等于后面的数值", "BI-Numerical_Interval_Number_Value": "请保证前面的数值小于/等于后面的数值",
"BI-Previous_Page": "上一页", "BI-Previous_Page": "上一页",
"BI-No_Select": "搜索结果为空", "BI-No_Select": "搜索结果为空",
"BI-Basic_Clears": "清空", "BI-Basic_Clears": "清空",
"BI-Created_By_Me": "我创建的", "BI-Created_By_Me": "我创建的",
"BI-Basic_Simple_Tuesday": "二", "BI-Basic_Simple_Tuesday": "二",
"BI-Word_Align_Right": "文字居右", "BI-Word_Align_Right": "文字居右",
"BI-Summary_Values": "合计", "BI-Summary_Values": "合计",
"BI-Basic_Clear": "清除", "BI-Basic_Clear": "清除",
"BI-Upload_File_Size_Error": "文件大小不支持", "BI-Upload_File_Size_Error": "文件大小不支持",
"BI-Up_Page": "向上翻页", "BI-Up_Page": "向上翻页",
"BI-Basic_Simple_Sunday": "日", "BI-Basic_Simple_Sunday": "日",
"BI-Multi_Date_Relative_Current_Time": "相对当前时间", "BI-Multi_Date_Relative_Current_Time": "相对当前时间",
"BI-Selected_Data": "已选数据:", "BI-Selected_Data": "已选数据:",
"BI-Multi_Date_Quarter": "季度", "BI-Multi_Date_Quarter": "季度",
"BI-Check_Selected": "查看已选", "BI-Check_Selected": "查看已选",
"BI-Basic_Search": "搜索", "BI-Basic_Search": "搜索",
"BI-Basic_May": "五月", "BI-Basic_May": "五月",
"BI-Continue_Select": "继续选择", "BI-Continue_Select": "继续选择",
"BI-Please_Input_Positive_Integer": "请输入正整数", "BI-Please_Input_Positive_Integer": "请输入正整数",
"BI-Upload_File_Type_Error": "文件类型不支持", "BI-Upload_File_Type_Error": "文件类型不支持",
"BI-Basic_Friday": "星期五", "BI-Basic_Friday": "星期五",
"BI-Down_Page": "向下翻页", "BI-Down_Page": "向下翻页",
"BI-Basic_Monday": "星期一", "BI-Basic_Monday": "星期一",
"BI-Left_Page": "向左翻页", "BI-Left_Page": "向左翻页",
"BI-Transparent_Color": "透明", "BI-Transparent_Color": "透明",
"BI-Basic_Simple_Monday": "一", "BI-Basic_Simple_Monday": "一",
"BI-Multi_Date_Year_End": "年末", "BI-Multi_Date_Year_End": "年末",
"BI-Time_Interval_Error_Text": "请保证开始时间早于/等于时间", "BI-Time_Interval_Error_Text": "请保证开始时间早于/等于时间",
"BI-Basic_Time": "时间", "BI-Basic_Time": "时间",
"BI-Basic_OK": "确定", "BI-Basic_OK": "确定",
"BI-Basic_Sure": "确定", "BI-Basic_Sure": "确定",
"BI-Basic_Simple_Thursday": "四", "BI-Basic_Simple_Thursday": "四",
"BI-Multi_Date_Year_Prev": "年前", "BI-Multi_Date_Year_Prev": "年前",
"BI-Tiao_Data": "条数据", "BI-Tiao_Data": "条数据",
"BI-Basic_Italic": "斜体", "BI-Basic_Italic": "斜体",
"BI-Basic_Dynamic_Title": "动态时间", "BI-Basic_Dynamic_Title": "动态时间",
"BI-Basic_Year": "年", "BI-Basic_Year": "年",
"BI-Basic_Single_Quarter": "季", "BI-Basic_Single_Quarter": "季",
"BI-Basic_Month": "月", "BI-Basic_Month": "月",
"BI-Basic_Week": "周", "BI-Basic_Week": "周",
"BI-Basic_Day": "天", "BI-Basic_Day": "天",
"BI-Basic_Work_Day": "工作日", "BI-Basic_Work_Day": "工作日",
"BI-Basic_Front": "前", "BI-Basic_Front": "前",
"BI-Basic_Behind": "后", "BI-Basic_Behind": "后",
"BI-Basic_Empty": "空", "BI-Basic_Empty": "空",
"BI-Basic_Month_End": "月末", "BI-Basic_Month_End": "月末",
"BI-Basic_Month_Begin": "月初", "BI-Basic_Month_Begin": "月初",
"BI-Basic_Year_End": "年末", "BI-Basic_Year_End": "年末",
"BI-Basic_Year_Begin": "年初", "BI-Basic_Year_Begin": "年初",
"BI-Basic_Quarter_End": "季末", "BI-Basic_Quarter_End": "季末",
"BI-Basic_Quarter_Begin": "季初", "BI-Basic_Quarter_Begin": "季初",
"BI-Basic_Week_End": "周末", "BI-Basic_Week_End": "周末",
"BI-Basic_Week_Begin": "周初", "BI-Basic_Week_Begin": "周初",
"BI-Basic_Current_Day": "当天", "BI-Basic_Current_Day": "当天",
"BI-Basic_Begin_Start": "初", "BI-Basic_Begin_Start": "初",
"BI-Basic_End_Stop": "末", "BI-Basic_End_Stop": "末",
"BI-Basic_Current_Year": "今年", "BI-Basic_Current_Year": "今年",
"BI-Basic_Year_Fen": "年份", "BI-Basic_Year_Fen": "年份",
"BI-Basic_Current_Month": "本月", "BI-Basic_Current_Month": "本月",
"BI-Basic_Current_Quarter": "本季度", "BI-Basic_Current_Quarter": "本季度",
"BI-Basic_Year_Month": "年月", "BI-Basic_Year_Month": "年月",
"BI-Basic_Year_Quarter": "年季度", "BI-Basic_Year_Quarter": "年季度",
"BI-Basic_Input_Can_Not_Null": "输入框不能为空", "BI-Basic_Input_Can_Not_Null": "输入框不能为空",
"BI-Basic_Input_From_To_Number": "请输入{R1}的数值", "BI-Basic_Input_From_To_Number": "请输入{R1}的数值",
"BI-Basic_Date_Time_Error_Text": "日期格式示例:2015-3-11 00:00:00", "BI-Basic_Date_Time_Error_Text": "日期格式示例:2015-3-11 00:00:00",
"BI-Basic_Or": "或", "BI-Basic_Or": "或",
"BI-Basic_And": "且", "BI-Basic_And": "且",
"BI-Conf_Add_Formula": "添加公式", "BI-Conf_Add_Formula": "添加公式",
"BI-Conf_Add_Condition": "添加条件", "BI-Conf_Add_Condition": "添加条件",
"BI-Conf_Formula_And": "且公式条件", "BI-Conf_Formula_And": "且公式条件",
"BI-Conf_Formula_Or": "或公式条件", "BI-Conf_Formula_Or": "或公式条件",
"BI-Conf_Condition_And": "且条件", "BI-Conf_Condition_And": "且条件",
"BI-Conf_Condition_Or": "或条件", "BI-Conf_Condition_Or": "或条件",
"BI-Microsoft_YaHei": "微软雅黑", "BI-Microsoft_YaHei": "微软雅黑",
"BI-Apple_Light": "苹方-light", "BI-Apple_Light": "苹方-light",
"BI-Font_Family": "字体", "BI-Font_Family": "字体",
"BI-Basic_Please_Input_Content": "请输入内容", "BI-Basic_Please_Input_Content": "请输入内容",
"BI-Basic_Please_Enter_Number_Between": "请输入{R1}-{R2}的值", "BI-Basic_Please_Enter_Number_Between": "请输入{R1}-{R2}的值",
"BI-Word_Align_Center": "文字居中", "BI-Word_Align_Center": "文字居中",
"BI-More_Than": "大于", "BI-More_Than": "大于",
"BI-More_And_Equal": "大于等于", "BI-More_And_Equal": "大于等于",
"BI-Please_Enter_SQL": "请输入SQL", "BI-Please_Enter_SQL": "请输入SQL",
"BI-Basic_Click_To_Add_Text": "+点击新增\"{R1}\"", "BI-Basic_Click_To_Add_Text": "+点击新增\"{R1}\"",
"BI-Basic_Please_Select": "请选择", "BI-Basic_Please_Select": "请选择",
"BI-Basic_Font_Color": "文字颜色", "BI-Basic_Font_Color": "文字颜色",
"BI-Basic_Background_Color": "背景色", "BI-Basic_Background_Color": "背景色",
"BI-Basic_Underline": "下划线" "BI-Basic_Underline": "下划线"
}; };

67921
dist/core.js vendored

File diff suppressed because one or more lines are too long

26866
dist/demo.js vendored

File diff suppressed because one or more lines are too long

165244
dist/fineui.js vendored

File diff suppressed because one or more lines are too long

32
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

42393
dist/fineui_without_jquery_polyfill.js vendored

File diff suppressed because one or more lines are too long

BIN
dist/images/1x/icon/wave_loading.gif vendored

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

BIN
dist/images/2x/icon/wave_loading.gif vendored

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

442
dist/polyfill.js vendored

@ -19,225 +19,225 @@ if (_global.BI == null) {
} }
if(_global.BI.prepares == null) { if(_global.BI.prepares == null) {
_global.BI.prepares = []; _global.BI.prepares = [];
}// Production steps of ECMA-262, Edition 5, 15.4.4.14 }// Production steps of ECMA-262, Edition 5, 15.4.4.14
// Reference: http://es5.github.io/#x15.4.4.14 // Reference: http://es5.github.io/#x15.4.4.14
if (!Array.prototype.indexOf) { if (!Array.prototype.indexOf) {
Array.prototype.indexOf = function (searchElement, fromIndex) { Array.prototype.indexOf = function (searchElement, fromIndex) {
var k; var k;
// 1. Let o be the result of calling ToObject passing // 1. Let o be the result of calling ToObject passing
// the this value as the argument. // the this value as the argument.
if (this == null) { if (this == null) {
throw new TypeError("\"this\" is null or not defined"); throw new TypeError("\"this\" is null or not defined");
} }
var o = Object(this); var o = Object(this);
// 2. Let lenValue be the result of calling the Get // 2. Let lenValue be the result of calling the Get
// internal method of o with the argument "length". // internal method of o with the argument "length".
// 3. Let len be ToUint32(lenValue). // 3. Let len be ToUint32(lenValue).
var len = o.length >>> 0; var len = o.length >>> 0;
// 4. If len is 0, return -1. // 4. If len is 0, return -1.
if (len === 0) { if (len === 0) {
return -1; return -1;
} }
// 5. If argument fromIndex was passed let n be // 5. If argument fromIndex was passed let n be
// ToInteger(fromIndex); else let n be 0. // ToInteger(fromIndex); else let n be 0.
var n = fromIndex | 0; var n = fromIndex | 0;
// 6. If n >= len, return -1. // 6. If n >= len, return -1.
if (n >= len) { if (n >= len) {
return -1; return -1;
} }
// 7. If n >= 0, then Let k be n. // 7. If n >= 0, then Let k be n.
// 8. Else, n<0, Let k be len - abs(n). // 8. Else, n<0, Let k be len - abs(n).
// If k is less than 0, then let k be 0. // If k is less than 0, then let k be 0.
k = Math.max(n >= 0 ? n : len - Math.abs(n), 0); k = Math.max(n >= 0 ? n : len - Math.abs(n), 0);
// 9. Repeat, while k < len // 9. Repeat, while k < len
while (k < len) { while (k < len) {
// a. Let Pk be ToString(k). // a. Let Pk be ToString(k).
// This is implicit for LHS operands of the in operator // This is implicit for LHS operands of the in operator
// b. Let kPresent be the result of calling the // b. Let kPresent be the result of calling the
// HasProperty internal method of o with argument Pk. // HasProperty internal method of o with argument Pk.
// This step can be combined with c // This step can be combined with c
// c. If kPresent is true, then // c. If kPresent is true, then
// i. Let elementK be the result of calling the Get // i. Let elementK be the result of calling the Get
// internal method of o with the argument ToString(k). // internal method of o with the argument ToString(k).
// ii. Let same be the result of applying the // ii. Let same be the result of applying the
// Strict Equality Comparison Algorithm to // Strict Equality Comparison Algorithm to
// searchElement and elementK. // searchElement and elementK.
// iii. If same is true, return k. // iii. If same is true, return k.
if (k in o && o[k] === searchElement) { if (k in o && o[k] === searchElement) {
return k; return k;
} }
k++; k++;
} }
return -1; return -1;
}; };
} }
if (!Array.prototype.lastIndexOf) { if (!Array.prototype.lastIndexOf) {
Array.prototype.lastIndexOf = function (searchElement /* , fromIndex*/) { Array.prototype.lastIndexOf = function (searchElement /* , fromIndex*/) {
"use strict"; "use strict";
if (this === void 0 || this === null) { if (this === void 0 || this === null) {
throw new TypeError(); throw new TypeError();
} }
var n, k, var n, k,
t = Object(this), t = Object(this),
len = t.length >>> 0; len = t.length >>> 0;
if (len === 0) { if (len === 0) {
return -1; return -1;
} }
n = len - 1; n = len - 1;
if (arguments.length > 1) { if (arguments.length > 1) {
n = Number(arguments[1]); n = Number(arguments[1]);
if (n != n) { if (n != n) {
n = 0; n = 0;
} else if (n != 0 && n != (1 / 0) && n != -(1 / 0)) { } else if (n != 0 && n != (1 / 0) && n != -(1 / 0)) {
n = (n > 0 || -1) * Math.floor(Math.abs(n)); n = (n > 0 || -1) * Math.floor(Math.abs(n));
} }
} }
for (k = n >= 0 for (k = n >= 0
? Math.min(n, len - 1) ? Math.min(n, len - 1)
: len - Math.abs(n); k >= 0; k--) { : len - Math.abs(n); k >= 0; k--) {
if (k in t && t[k] === searchElement) { if (k in t && t[k] === searchElement) {
return k; return k;
} }
} }
return -1; return -1;
}; };
} }
/** /**
* 特殊情况 * 特殊情况
* Created by wang on 15/6/23. * Created by wang on 15/6/23.
*/ */
// 解决console未定义问题 guy // 解决console未定义问题 guy
_global.console = _global.console || (function () { _global.console = _global.console || (function () {
var c = {}; var c = {};
c.log = c.warn = c.debug = c.info = c.error = c.time = c.dir = c.profile c.log = c.warn = c.debug = c.info = c.error = c.time = c.dir = c.profile
= c.clear = c.exception = c.trace = c.assert = function () { = c.clear = c.exception = c.trace = c.assert = function () {
}; };
return c; return c;
})(); })();
/* /*
* 前端缓存 * 前端缓存
*/ */
_global.localStorage || (_global.localStorage = { _global.localStorage || (_global.localStorage = {
items: {}, items: {},
setItem: function (k, v) { setItem: function (k, v) {
BI.Cache.addCookie(k, v); BI.Cache.addCookie(k, v);
}, },
getItem: function (k) { getItem: function (k) {
return BI.Cache.getCookie(k); return BI.Cache.getCookie(k);
}, },
removeItem: function (k) { removeItem: function (k) {
BI.Cache.deleteCookie(k); BI.Cache.deleteCookie(k);
}, },
key: function () { key: function () {
}, },
clear: function () { clear: function () {
this.items = {}; this.items = {};
} }
}); });
if (!Object.keys) { if (!Object.keys) {
Object.keys = function(o) { Object.keys = function(o) {
if (o !== Object(o)) { if (o !== Object(o)) {
throw new TypeError('Object.keys called on a non-object'); throw new TypeError('Object.keys called on a non-object');
} }
// fix的问题 // fix的问题
var falsy; var falsy;
var skipArray = { var skipArray = {
__ob__: falsy, __ob__: falsy,
$accessors: falsy, $accessors: falsy,
$vbthis: falsy, $vbthis: falsy,
$vbsetter: falsy $vbsetter: falsy
}; };
var k = [], p; var k = [], p;
for (p in o) { for (p in o) {
if (!(p in skipArray)) { if (!(p in skipArray)) {
if (Object.prototype.hasOwnProperty.call(o, p)) { if (Object.prototype.hasOwnProperty.call(o, p)) {
k.push(p); k.push(p);
} }
} }
} }
return k; return k;
}; };
} }
if (!Array.isArray) { if (!Array.isArray) {
Array.isArray = function(arg) { Array.isArray = function(arg) {
return Object.prototype.toString.call(arg) === '[object Array]'; return Object.prototype.toString.call(arg) === '[object Array]';
}; };
} }
// https://stackoverflow.com/questions/10919915/ie8-getprototypeof-method // https://stackoverflow.com/questions/10919915/ie8-getprototypeof-method
if (typeof Object.getPrototypeOf !== "function") { if (typeof Object.getPrototypeOf !== "function") {
Object.getPrototypeOf = "".__proto__ === String.prototype Object.getPrototypeOf = "".__proto__ === String.prototype
? function (object) { ? function (object) {
return object.__proto__; return object.__proto__;
} }
: function (object) { : function (object) {
// May break if the constructor has been tampered with // May break if the constructor has been tampered with
return object.constructor.prototype; return object.constructor.prototype;
}; };
} }
if(!Date.now) { if(!Date.now) {
Date.now = function () { Date.now = function () {
return new Date().valueOf(); return new Date().valueOf();
}; };
}if (typeof Set !== "undefined" && Set.toString().match(/native code/)) { }if (typeof Set !== "undefined" && Set.toString().match(/native code/)) {
} else { } else {
Set = function () { Set = function () {
this.set = {}; this.set = {};
}; };
Set.prototype.has = function (key) { Set.prototype.has = function (key) {
return this.set[key] !== undefined; return this.set[key] !== undefined;
}; };
Set.prototype.add = function (key) { Set.prototype.add = function (key) {
this.set[key] = 1; this.set[key] = 1;
}; };
Set.prototype.clear = function () { Set.prototype.clear = function () {
this.set = {}; this.set = {};
}; };
}// 修复ie9下sort方法的bug }// 修复ie9下sort方法的bug
!function (window) { !function (window) {
var ua = window.navigator.userAgent.toLowerCase(), var ua = window.navigator.userAgent.toLowerCase(),
reg = /msie|applewebkit.+safari/; reg = /msie|applewebkit.+safari/;
if (reg.test(ua)) { if (reg.test(ua)) {
var _sort = Array.prototype.sort; var _sort = Array.prototype.sort;
Array.prototype.sort = function (fn) { Array.prototype.sort = function (fn) {
if (!!fn && typeof fn === "function") { if (!!fn && typeof fn === "function") {
if (this.length < 2) { if (this.length < 2) {
return this; return this;
} }
var i = 0, j = i + 1, l = this.length, tmp, r = false, t = 0; var i = 0, j = i + 1, l = this.length, tmp, r = false, t = 0;
for (; i < l; i++) { for (; i < l; i++) {
for (j = i + 1; j < l; j++) { for (j = i + 1; j < l; j++) {
t = fn.call(this, this[i], this[j]); t = fn.call(this, this[i], this[j]);
r = (typeof t === "number" ? t : r = (typeof t === "number" ? t :
t ? 1 : 0) > 0; t ? 1 : 0) > 0;
if (r === true) { if (r === true) {
tmp = this[i]; tmp = this[i];
this[i] = this[j]; this[i] = this[j];
this[j] = tmp; this[j] = tmp;
} }
} }
} }
return this; return this;
} }
return _sort.call(this); return _sort.call(this);
}; };
} }
}(window); }(window);

1168
dist/router.js vendored

File diff suppressed because it is too large Load Diff

29612
dist/utils.js vendored

File diff suppressed because one or more lines are too long

42198
dist/widget.js vendored

File diff suppressed because it is too large Load Diff

20
src/base/pane.js

@ -53,25 +53,25 @@ BI.Pane = BI.inherit(BI.Widget, {
var loadingAnimation = BI.createWidget({ var loadingAnimation = BI.createWidget({
type: "bi.horizontal", type: "bi.horizontal",
cls: "bi-loading-widget" + ((BI.isIE() && BI.getIEVersion() < 10) ? " hack" : ""), cls: "bi-loading-widget" + ((BI.isIE() && BI.getIEVersion() < 10) ? " hack" : ""),
height: 60, height: 30,
width: 60, width: 30,
hgap: 10, hgap: 5.25,
vgap: 5, vgap: 2.5,
items: [{ items: [{
type: "bi.layout", type: "bi.layout",
cls: "rect1", cls: "rect1",
height: 50, height: 25,
width: 5 width: 3
}, { }, {
type: "bi.layout", type: "bi.layout",
cls: "rect2", cls: "rect2",
height: 50, height: 25,
width: 5 width: 3
}, { }, {
type: "bi.layout", type: "bi.layout",
cls: "rect3", cls: "rect3",
height: 50, height: 25,
width: 5 width: 3
}] }]
}); });
// pane在同步方式下由items决定tipText的显示与否 // pane在同步方式下由items决定tipText的显示与否

8
src/less/base/pane.less

@ -1,5 +1,6 @@
@import "../index"; @import "../index";
@import "../resource/background"; @import "../image";
@import "../lib/icon";
.bi-pane { .bi-pane {
min-height: 55px; min-height: 55px;
& .loading-container { & .loading-container {
@ -8,9 +9,10 @@
} }
.bi-loading-widget { .bi-loading-widget {
font-size: 0;
div { div {
.background-color(@background-color-highlight, 90%); .background-color(@background-color-highlight, 90%);
.border-radius(2.5px); .border-radius(1.5px);
.animation(loading-widget 0.8s infinite linear); .animation(loading-widget 0.8s infinite linear);
} }
.rect2 { .rect2 {
@ -28,7 +30,7 @@
} }
}); });
&.hack { &.hack {
.loading-background; .imagePath(@icon-wave-loading);
div { div {
.background-color(@background-color-highlight, 0%); .background-color(@background-color-highlight, 0%);
} }

109
src/less/lib/icon.less

@ -1,55 +1,56 @@
@icon-checkbox-normal: "icon/check_box_normal.png"; @icon-checkbox-normal: "icon/check_box_normal.png";
@icon-checkbox-active: "icon/check_box_active.png"; @icon-checkbox-active: "icon/check_box_active.png";
@icon-checkbox-disable: "icon/check_box_disable.png"; @icon-checkbox-disable: "icon/check_box_disable.png";
@icon-checkbox-active-disable: "icon/check_box_disable2.png"; @icon-checkbox-active-disable: "icon/check_box_disable2.png";
@icon-radio-normal: "icon/radio_normal.png"; @icon-radio-normal: "icon/radio_normal.png";
@icon-radio-active: "icon/radio_active.png"; @icon-radio-active: "icon/radio_active.png";
@icon-radio-disable: "icon/radio_disable.png"; @icon-radio-disable: "icon/radio_disable.png";
@icon-radio-active-disable: "icon/radio_disable2.png"; @icon-radio-active-disable: "icon/radio_disable2.png";
@icon-half-select: "icon/half_selected.png"; @icon-half-select: "icon/half_selected.png";
@icon-tree-expand-type1: "icon/tree_expand_1.png"; @icon-tree-expand-type1: "icon/tree_expand_1.png";
@icon-tree-expand-type2: "icon/tree_expand_2.png"; @icon-tree-expand-type2: "icon/tree_expand_2.png";
@icon-tree-expand-type3: "icon/tree_expand_3.png"; @icon-tree-expand-type3: "icon/tree_expand_3.png";
@icon-tree-expand-type4: "icon/tree_expand_4.png"; @icon-tree-expand-type4: "icon/tree_expand_4.png";
@icon-tree-collapse-type1: "icon/tree_collapse_1.png"; @icon-tree-collapse-type1: "icon/tree_collapse_1.png";
@icon-tree-collapse-type2: "icon/tree_collapse_2.png"; @icon-tree-collapse-type2: "icon/tree_collapse_2.png";
@icon-tree-collapse-type3: "icon/tree_collapse_3.png"; @icon-tree-collapse-type3: "icon/tree_collapse_3.png";
@icon-tree-collapse-type4: "icon/tree_collapse_4.png"; @icon-tree-collapse-type4: "icon/tree_collapse_4.png";
@icon-tree-vertical-line-1: "icon/tree_vertical_line_1.png"; @icon-tree-vertical-line-1: "icon/tree_vertical_line_1.png";
@icon-tree-vertical-line-2: "icon/tree_vertical_line_2.png"; @icon-tree-vertical-line-2: "icon/tree_vertical_line_2.png";
@icon-tree-vertical-line-3: "icon/tree_vertical_line_3.png"; @icon-tree-vertical-line-3: "icon/tree_vertical_line_3.png";
@icon-tree-vertical-line-4: "icon/tree_vertical_line_4.png"; @icon-tree-vertical-line-4: "icon/tree_vertical_line_4.png";
@icon-tree-expand-type1-theme-dark: "icon/dark/tree_expand_1.png"; @icon-tree-expand-type1-theme-dark: "icon/dark/tree_expand_1.png";
@icon-tree-expand-type2-theme-dark: "icon/dark/tree_expand_2.png"; @icon-tree-expand-type2-theme-dark: "icon/dark/tree_expand_2.png";
@icon-tree-expand-type3-theme-dark: "icon/dark/tree_expand_3.png"; @icon-tree-expand-type3-theme-dark: "icon/dark/tree_expand_3.png";
@icon-tree-expand-type4-theme-dark: "icon/dark/tree_expand_4.png"; @icon-tree-expand-type4-theme-dark: "icon/dark/tree_expand_4.png";
@icon-tree-collapse-type1-theme-dark: "icon/dark/tree_collapse_1.png"; @icon-tree-collapse-type1-theme-dark: "icon/dark/tree_collapse_1.png";
@icon-tree-collapse-type2-theme-dark: "icon/dark/tree_collapse_2.png"; @icon-tree-collapse-type2-theme-dark: "icon/dark/tree_collapse_2.png";
@icon-tree-collapse-type3-theme-dark: "icon/dark/tree_collapse_3.png"; @icon-tree-collapse-type3-theme-dark: "icon/dark/tree_collapse_3.png";
@icon-tree-collapse-type4-theme-dark: "icon/dark/tree_collapse_4.png"; @icon-tree-collapse-type4-theme-dark: "icon/dark/tree_collapse_4.png";
@icon-tree-vertical-line-1-theme-dark: "icon/dark/tree_vertical_line_1.png"; @icon-tree-vertical-line-1-theme-dark: "icon/dark/tree_vertical_line_1.png";
@icon-tree-vertical-line-2-theme-dark: "icon/dark/tree_vertical_line_2.png"; @icon-tree-vertical-line-2-theme-dark: "icon/dark/tree_vertical_line_2.png";
@icon-tree-vertical-line-3-theme-dark: "icon/dark/tree_vertical_line_3.png"; @icon-tree-vertical-line-3-theme-dark: "icon/dark/tree_vertical_line_3.png";
@icon-tree-vertical-line-4-theme-dark: "icon/dark/tree_vertical_line_4.png"; @icon-tree-vertical-line-4-theme-dark: "icon/dark/tree_vertical_line_4.png";
@icon-loading: "icon/loading.gif"; @icon-loading: "icon/loading.gif";
@icon-wave-loading: "icon/wave_loading.gif";
//滑块
@icon-slider-normal: "icon/slider_normal_small.png"; //滑块
@icon-slider-active: "icon/slider_active_small.png"; @icon-slider-normal: "icon/slider_normal_small.png";
@icon-slider-active: "icon/slider_active_small.png";
//颜色自动、透明
@icon-auto-normal: "icon/auto_normal.png"; //颜色自动、透明
@icon-auto-select: "icon/auto_select.png"; @icon-auto-normal: "icon/auto_normal.png";
@icon-auto-disable: "icon/auto_disable.png"; @icon-auto-select: "icon/auto_select.png";
@icon-trans-normal: "icon/trans_normal.png"; @icon-auto-disable: "icon/auto_disable.png";
@icon-trans-select: "icon/trans_select.png"; @icon-trans-normal: "icon/trans_normal.png";
@icon-trans-select: "icon/trans_select.png";
@icon-trans-disable: "icon/trans_disable.png"; @icon-trans-disable: "icon/trans_disable.png";
Loading…
Cancel
Save