Browse Source

Merge branch 'master' of http://cloud.finedevelop.com:2015/scm/~guy/fineui

# Conflicts:
#	bi/case.js
es6
Young 7 years ago
parent
commit
7cdb3b703f
  1. 101
      Gruntfile.js
  2. 18
      bi/base.css
  3. 3
      bi/base.js
  4. 7602
      bi/chart.js
  5. 6
      bi/core.css
  6. 25908
      bi/core.js
  7. 175
      bi/polyfill.js
  8. 585
      bi/router.js
  9. 10
      bi/widget.css
  10. 22258
      bi/widget.js
  11. 1
      demo/js/core/abstract/combination/demo.combo.js
  12. 4
      demo/js/fix-2.0/globalwatcher.js
  13. 2
      demo/less/index.less
  14. 16
      dist/base.css
  15. 934
      dist/base.js
  16. 1209
      dist/bundle.css
  17. 6006
      dist/bundle.js
  18. 2
      dist/bundle.min.css
  19. 92
      dist/bundle.min.js
  20. 927
      dist/case.js
  21. 1327
      dist/chart.js
  22. 24
      dist/core.css
  23. 2841
      dist/core.js
  24. 24
      dist/core_without_normalize.css
  25. 5
      dist/demo.js
  26. 14
      dist/fix/fix.compact.js
  27. 38
      dist/fix/fix.js
  28. 27
      dist/polyfill.js
  29. 6
      dist/resource.css
  30. 104
      dist/router.js
  31. 10
      dist/widget.css
  32. 1202
      dist/widget.js
  33. 1159
      public/bundle.css
  34. 2
      public/css/app.css
  35. 235
      public/css/background.css
  36. 122
      public/css/font.css
  37. 800
      public/css/icon.css
  38. 0
      public/css/var.css
  39. 1
      public/less/var.less
  40. 8
      src/addons/chart/chart.combine.js
  41. 6
      src/addons/chart/chart.js
  42. 50
      src/addons/chart/chart/chart.abstract.js
  43. 22
      src/addons/chart/chart/chart.accumulatearea.js
  44. 28
      src/addons/chart/chart/chart.accumulateaxis.js
  45. 32
      src/addons/chart/chart/chart.accumulatebar.js
  46. 16
      src/addons/chart/chart/chart.accumulateradar.js
  47. 28
      src/addons/chart/chart/chart.area.js
  48. 28
      src/addons/chart/chart/chart.axis.js
  49. 30
      src/addons/chart/chart/chart.bar.js
  50. 63
      src/addons/chart/chart/chart.bubble.js
  51. 28
      src/addons/chart/chart/chart.comparearea.js
  52. 30
      src/addons/chart/chart/chart.compareaxis.js
  53. 30
      src/addons/chart/chart/chart.comparebar.js
  54. 74
      src/addons/chart/chart/chart.dashboard.js
  55. 8
      src/addons/chart/chart/chart.donut.js
  56. 40
      src/addons/chart/chart/chart.fallaxis.js
  57. 10
      src/addons/chart/chart/chart.forcebubble.js
  58. 20
      src/addons/chart/chart/chart.gismap.js
  59. 28
      src/addons/chart/chart/chart.line.js
  60. 52
      src/addons/chart/chart/chart.map.js
  61. 54
      src/addons/chart/chart/chart.multiaxis.js
  62. 54
      src/addons/chart/chart/chart.multiaxiscombine.js
  63. 28
      src/addons/chart/chart/chart.percentaccumulatearea.js
  64. 26
      src/addons/chart/chart/chart.percentaccumulateaxis.js
  65. 14
      src/addons/chart/chart/chart.pie.js
  66. 16
      src/addons/chart/chart/chart.radar.js
  67. 28
      src/addons/chart/chart/chart.rangearea.js
  68. 56
      src/addons/chart/chart/chart.scatter.js
  69. 366
      src/addons/chart/factory.charts.js
  70. 6
      src/base/canvas/canvas.js
  71. 10
      src/base/collection/collection.js
  72. 20
      src/base/combination/combo.js
  73. 10
      src/base/combination/expander.js
  74. 18
      src/base/combination/group.button.js
  75. 8
      src/base/combination/group.combo.js
  76. 6
      src/base/combination/group.virtual.js
  77. 8
      src/base/combination/loader.js
  78. 2
      src/base/combination/navigation.js
  79. 10
      src/base/combination/searcher.js
  80. 12
      src/base/combination/switcher.js
  81. 4
      src/base/combination/tab.js
  82. 2
      src/base/combination/tree.button.js
  83. 4
      src/base/el.js
  84. 2
      src/base/formula/codemirror/formula-hint.js
  85. 10
      src/base/formula/codemirror/formula-mode.js
  86. 55
      src/base/formula/codemirror/show-hint.js
  87. 2
      src/base/formula/config.js
  88. 14
      src/base/formula/formulaeditor.js
  89. 54
      src/base/foundation/message.js
  90. 16
      src/base/grid/grid.js
  91. 22
      src/base/layer/layer.floatbox.js
  92. 18
      src/base/layer/layer.popup.js
  93. 2
      src/base/layer/layer.searcher.js
  94. 4
      src/base/list/listview.js
  95. 4
      src/base/list/virtuallist.js
  96. 16
      src/base/pager/pager.js
  97. 6
      src/base/pane.js
  98. 2
      src/base/single/a/a.js
  99. 16
      src/base/single/bar/bar.loading.js
  100. 2
      src/base/single/button/button.basic.js
  101. Some files were not shown because too many files have changed in this diff Show More

101
Gruntfile.js

@ -139,100 +139,6 @@ module.exports = function (grunt) {
demoCss: {
src: ['demo/css/**/*.css'],
dest: 'dist/demo.css'
},
bi_polyfillJs: {
src: ['src/polyfill/**/*.js'],
dest: 'bi/polyfill.js'
},
bi_coreJs: {
src: [
'src/core/jquery.js',
'src/core/underscore.js',
'src/core/foundation.js',
// 'src/core/mvc/**/*.js',
'src/core/base.js',
'src/core/ob.js',
'src/core/widget.js',
// 'src/core/model.js',
// 'src/core/view.js',
'src/core/shortcut.js',
'src/core/utils/*.js',
'src/core/behavior/behavior.js',
'src/core/wrapper/layout.js',
'src/core/**/*.js',
'src/data/data.js',
'src/data/**/*.js',
'src/config.js'
],
dest: 'bi/core.js'
},
//最基础的控件
bi_baseJs: {
src: [
'src/third/**/*.js',
'src/base/formula/config.js',
'src/base/pane.js',
'src/base/single/single.js',
'src/base/single/text.js',
'src/base/single/button/button.basic.js',
'src/base/single/button/button.node.js',
'src/base/single/tip/tip.js',
'src/base/combination/group.button.js',
'src/base/combination/tree.button.js',
'src/base/combination/map.button.js',
'src/base/tree/treeview.js',
'src/base/tree/asynctree.js',
'src/base/tree/parttree.js',
'src/base/**/*.js'
],
dest: 'bi/base.js'
},
//实现好的一些基础实例
bi_caseJs: {
src: [
'src/case/combo/popup.bubble.js',
'src/case/**/*.js'
],
dest: 'bi/case.js'
},
bi_widgetJs: {
src: [
'src/widget/paramsettingcombo/popup.param.js',
'src/widget/sequencetable/treenumber.sequencetable.js',
'src/widget/**/*.js',
'src/component/**/*.js'
],
dest: 'bi/widget.js'
},
bi_routerJs: {
src: [
'src/router/**/*.js'
],
dest: 'bi/router.js'
},
bi_chartJs: {
src: [
'src/addons/chart/chart.js',
'src/addons/chart/chart.combine.js',
'src/addons/chart/factory.charts.js',
'src/addons/chart/**/*.js'
],
dest: 'bi/chart.js'
},
bi_coreCss: {
src: ['src/css/core/**/*.css', 'src/css/theme/**/*.css'],
dest: 'bi/core.css'
},
bi_baseCss: {
src: ['src/css/base/**/*.css'],
dest: 'bi/base.css'
},
bi_widgetCss: {
src: ['src/css/widget/**/*.css'],
dest: 'bi/widget.css'
}
},
@ -244,6 +150,13 @@ module.exports = function (grunt) {
dest: 'demo/css/',
ext: '.css'
},
main: {
expand: true,
cwd: "public/less",
src: ["**/*.less"],
dest: "public/css",
ext: ".css"
},
dev: {
options: {
compress: true,

18
bi/base.css

@ -785,7 +785,7 @@ body .bi-button.button-warning.clear,
#body .bi-button.button-warning.clear,
body .bi-button.button-warning.clear .b-font:before,
#body .bi-button.button-warning.clear .b-font:before {
color: #faaa39;
color: #ff4949;
}
body .bi-button.button-common.disabled,
#body .bi-button.button-common.disabled,
@ -914,7 +914,7 @@ body .bi-button.button-ignore.disabled.clear:active,
display: inline-block;
}
.bi-code-editor .error-param {
color: #faaa39;
color: #ff4949;
padding: 0 5px;
margin: 1px 1px;
display: inline-block;
@ -967,7 +967,7 @@ body .bi-button.button-ignore.disabled.clear:active,
.bi-input.bi-input-error,
.bi-textarea.bi-input-error {
border: none;
color: #faaa39 !important;
color: #ff4949 !important;
}
.bi-label {
text-overflow: ellipsis;
@ -999,8 +999,8 @@ body .bi-button.button-ignore.disabled.clear:active,
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
background: #fddddd;
color: #faaa39;
background: #ff4949;
color: #ff4949;
}
.bi-tip {
position: fixed !important;
@ -1016,8 +1016,8 @@ body .bi-button.button-ignore.disabled.clear:active,
color: #5cb75d;
}
.bi-toast.toast-warning {
background: #fddddd;
color: #faaa39;
background: #ff4949;
color: #ff4949;
}
.bi-tooltip {
max-width: 250px;
@ -1032,8 +1032,8 @@ body .bi-button.button-ignore.disabled.clear:active,
color: #1a1a1a;
}
.bi-tooltip.tooltip-warning {
background: #fddddd;
color: #faaa39;
background: #ff4949;
color: #ff4949;
border: 1px solid #f4cbcb;
}
.bi-sql-editor .cm-s-default span[class*="#"] {

3
bi/base.js

@ -587,7 +587,7 @@ BI.Text = BI.inherit(BI.Single, {
setText: function (text) {
BI.Text.superclass.setText.apply(this, arguments);
this.options.text = text;
this.text.element.html(BI.Func.formatSpecialCharInHtml(text));
this.text.element.html(BI.htmlEncode(text));
}
});
@ -20752,6 +20752,7 @@ BI.Trigger = BI.inherit(BI.Single, {
// });
// label.setTitle(data.description, {
// container: "body"
// });
// }
};

7602
bi/chart.js

File diff suppressed because it is too large Load Diff

6
bi/core.css

@ -419,13 +419,13 @@ i {
border-bottom: 1px solid #525466;
}
.bi-keyword-red-mark {
color: #ff4949;
color: #faaa39;
}
.bi-keyword-red-mark .bi-input {
color: #ff4949;
color: #faaa39;
}
.bi-keyword-red-mark .bi-textarea {
color: #ff4949;
color: #faaa39;
}
.bi-high-light {
color: #3685f2;

25908
bi/core.js

File diff suppressed because one or more lines are too long

175
bi/polyfill.js

@ -1,175 +0,0 @@
// Production steps of ECMA-262, Edition 5, 15.4.4.14
// Reference: http://es5.github.io/#x15.4.4.14
if (!Array.prototype.indexOf) {
Array.prototype.indexOf = function (searchElement, fromIndex) {
var k;
// 1. Let o be the result of calling ToObject passing
// the this value as the argument.
if (this == null) {
throw new TypeError('"this" is null or not defined');
}
var o = Object(this);
// 2. Let lenValue be the result of calling the Get
// internal method of o with the argument "length".
// 3. Let len be ToUint32(lenValue).
var len = o.length >>> 0;
// 4. If len is 0, return -1.
if (len === 0) {
return -1;
}
// 5. If argument fromIndex was passed let n be
// ToInteger(fromIndex); else let n be 0.
var n = fromIndex | 0;
// 6. If n >= len, return -1.
if (n >= len) {
return -1;
}
// 7. If n >= 0, then Let k be n.
// 8. Else, n<0, Let k be len - abs(n).
// If k is less than 0, then let k be 0.
k = Math.max(n >= 0 ? n : len - Math.abs(n), 0);
// 9. Repeat, while k < len
while (k < len) {
// a. Let Pk be ToString(k).
// This is implicit for LHS operands of the in operator
// b. Let kPresent be the result of calling the
// HasProperty internal method of o with argument Pk.
// This step can be combined with c
// c. If kPresent is true, then
// i. Let elementK be the result of calling the Get
// internal method of o with the argument ToString(k).
// ii. Let same be the result of applying the
// Strict Equality Comparison Algorithm to
// searchElement and elementK.
// iii. If same is true, return k.
if (k in o && o[k] === searchElement) {
return k;
}
k++;
}
return -1;
};
}
if (!Array.prototype.lastIndexOf) {
Array.prototype.lastIndexOf = function (searchElement /*, fromIndex*/) {
'use strict';
if (this === void 0 || this === null) {
throw new TypeError();
}
var n, k,
t = Object(this),
len = t.length >>> 0;
if (len === 0) {
return -1;
}
n = len - 1;
if (arguments.length > 1) {
n = Number(arguments[1]);
if (n != n) {
n = 0;
}
else if (n != 0 && n != (1 / 0) && n != -(1 / 0)) {
n = (n > 0 || -1) * Math.floor(Math.abs(n));
}
}
for (k = n >= 0
? Math.min(n, len - 1)
: len - Math.abs(n); k >= 0; k--) {
if (k in t && t[k] === searchElement) {
return k;
}
}
return -1;
};
}
/**
* 特殊情况
* Created by wang on 15/6/23.
*/
//解决console未定义问题 guy
window.console = window.console || (function () {
var c = {};
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 () {
};
return c;
})();
/*
* 前端缓存
*/
window.localStorage || (window.localStorage = {
items: {},
setItem: function (k, v) {
BI.Cache.addCookie(k, v);
},
getItem: function (k) {
return BI.Cache.getCookie(k);
},
removeItem: function (k) {
BI.Cache.deleteCookie(k);
},
key: function () {
},
clear: function () {
this.items = {};
}
});if (typeof Set !== 'undefined' && Set.toString().match(/native code/)) {
} else {
Set = function () {
this.set = {}
};
Set.prototype.has = function (key) {
return this.set[key] !== undefined;
};
Set.prototype.add = function (key) {
this.set[key] = 1
};
Set.prototype.clear = function () {
this.set = {}
};
}//修复ie9下sort方法的bug
;!function (window) {
var ua = window.navigator.userAgent.toLowerCase(),
reg = /msie|applewebkit.+safari/;
if (reg.test(ua)) {
var _sort = Array.prototype.sort;
Array.prototype.sort = function (fn) {
if (!!fn && typeof fn === 'function') {
if (this.length < 2) {
return this;
}
var i = 0, j = i + 1, l = this.length, tmp, r = false, t = 0;
for (; i < l; i++) {
for (j = i + 1; j < l; j++) {
t = fn.call(this, this[i], this[j]);
r = (typeof t === 'number' ? t :
!!t ? 1 : 0) > 0;
if (r === true) {
tmp = this[i];
this[i] = this[j];
this[j] = tmp;
}
}
}
return this;
} else {
return _sort.call(this);
}
};
}
}(window);

585
bi/router.js

@ -1,585 +0,0 @@
;(function(){
var Events = {
// Bind an event to a `callback` function. Passing `"all"` will bind
// the callback to all events fired.
on: function (name, callback, context) {
if (!eventsApi(this, 'on', name, [callback, context]) || !callback) return this;
this._events || (this._events = {});
var events = this._events[name] || (this._events[name] = []);
events.push({callback: callback, context: context, ctx: context || this});
return this;
},
// Bind an event to only be triggered a single time. After the first time
// the callback is invoked, it will be removed.
once: function (name, callback, context) {
if (!eventsApi(this, 'once', name, [callback, context]) || !callback) return this;
var self = this;
var once = _.once(function () {
self.off(name, once);
callback.apply(this, arguments);
});
once._callback = callback;
return this.on(name, once, context);
},
// Remove one or many callbacks. If `context` is null, removes all
// callbacks with that function. If `callback` is null, removes all
// callbacks for the event. If `name` is null, removes all bound
// callbacks for all events.
off: function (name, callback, context) {
if (!this._events || !eventsApi(this, 'off', name, [callback, context])) return this;
// Remove all callbacks for all events.
if (!name && !callback && !context) {
this._events = void 0;
return this;
}
var names = name ? [name] : _.keys(this._events);
for (var i = 0, length = names.length; i < length; i++) {
name = names[i];
// Bail out if there are no events stored.
var events = this._events[name];
if (!events) continue;
// Remove all callbacks for this event.
if (!callback && !context) {
delete this._events[name];
continue;
}
// Find any remaining events.
var remaining = [];
for (var j = 0, k = events.length; j < k; j++) {
var event = events[j];
if (
callback && callback !== event.callback &&
callback !== event.callback._callback ||
context && context !== event.context
) {
remaining.push(event);
}
}
// Replace events if there are any remaining. Otherwise, clean up.
if (remaining.length) {
this._events[name] = remaining;
} else {
delete this._events[name];
}
}
return this;
},
un: function () {
this.off.apply(this, arguments);
},
// Trigger one or many events, firing all bound callbacks. Callbacks are
// passed the same arguments as `trigger` is, apart from the event name
// (unless you're listening on `"all"`, which will cause your callback to
// receive the true name of the event as the first argument).
trigger: function (name) {
if (!this._events) return this;
var args = slice.call(arguments, 1);
if (!eventsApi(this, 'trigger', name, args)) return this;
var events = this._events[name];
var allEvents = this._events.all;
if (events) triggerEvents(events, args);
if (allEvents) triggerEvents(allEvents, arguments);
return this;
},
fireEvent: function () {
this.trigger.apply(this, arguments);
},
// Inversion-of-control versions of `on` and `once`. Tell *this* object to
// listen to an event in another object ... keeping track of what it's
// listening to.
listenTo: function (obj, name, callback) {
var listeningTo = this._listeningTo || (this._listeningTo = {});
var id = obj._listenId || (obj._listenId = _.uniqueId('l'));
listeningTo[id] = obj;
if (!callback && typeof name === 'object') callback = this;
obj.on(name, callback, this);
return this;
},
listenToOnce: function (obj, name, callback) {
if (typeof name === 'object') {
for (var event in name) this.listenToOnce(obj, event, name[event]);
return this;
}
if (eventSplitter.test(name)) {
var names = name.split(eventSplitter);
for (var i = 0, length = names.length; i < length; i++) {
this.listenToOnce(obj, names[i], callback);
}
return this;
}
if (!callback) return this;
var once = _.once(function () {
this.stopListening(obj, name, once);
callback.apply(this, arguments);
});
once._callback = callback;
return this.listenTo(obj, name, once);
},
// Tell this object to stop listening to either specific events ... or
// to every object it's currently listening to.
stopListening: function (obj, name, callback) {
var listeningTo = this._listeningTo;
if (!listeningTo) return this;
var remove = !name && !callback;
if (!callback && typeof name === 'object') callback = this;
if (obj) (listeningTo = {})[obj._listenId] = obj;
for (var id in listeningTo) {
obj = listeningTo[id];
obj.off(name, callback, this);
if (remove || _.isEmpty(obj._events)) delete this._listeningTo[id];
}
return this;
}
};
// Regular expression used to split event strings.
var eventSplitter = /\s+/;
// Implement fancy features of the Events API such as multiple event
// names `"change blur"` and jQuery-style event maps `{change: action}`
// in terms of the existing API.
var eventsApi = function (obj, action, name, rest) {
if (!name) return true;
// Handle event maps.
if (typeof name === 'object') {
for (var key in name) {
obj[action].apply(obj, [key, name[key]].concat(rest));
}
return false;
}
// Handle space separated event names.
if (eventSplitter.test(name)) {
var names = name.split(eventSplitter);
for (var i = 0, length = names.length; i < length; i++) {
obj[action].apply(obj, [names[i]].concat(rest));
}
return false;
}
return true;
};
// A difficult-to-believe, but optimized internal dispatch function for
// triggering events. Tries to keep the usual cases speedy (most internal
// BI events have 3 arguments).
var triggerEvents = function (events, args) {
var ev, i = -1, l = events.length, a1 = args[0], a2 = args[1], a3 = args[2];
switch (args.length) {
case 0:
while (++i < l) (ev = events[i]).callback.call(ev.ctx);
return;
case 1:
while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1);
return;
case 2:
while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1, a2);
return;
case 3:
while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1, a2, a3);
return;
default:
while (++i < l) (ev = events[i]).callback.apply(ev.ctx, args);
return;
}
};
// BI.Router
// ---------------
// Routers map faux-URLs to actions, and fire events when routes are
// matched. Creating a new one sets its `routes` hash, if not set statically.
var Router = BI.Router = function (options) {
options || (options = {});
if (options.routes) this.routes = options.routes;
this._bindRoutes();
this._init.apply(this, arguments);
};
// Cached regular expressions for matching named param parts and splatted
// parts of route strings.
var optionalParam = /\((.*?)\)/g;
var namedParam = /(\(\?)?:\w+/g;
var splatParam = /\*\w+/g;
var escapeRegExp = /[\-{}\[\]+?.,\\\^$|#\s]/g;
// Set up all inheritable **BI.Router** properties and methods.
_.extend(Router.prototype, Events, {
// _init is an empty function by default. Override it with your own
// initialization logic.
_init: function () {
},
// Manually bind a single named route to a callback. For example:
//
// this.route('search/:query/p:num', 'search', function(query, num) {
// ...
// });
//
route: function (route, name, callback) {
if (!_.isRegExp(route)) route = this._routeToRegExp(route);
if (_.isFunction(name)) {
callback = name;
name = '';
}
if (!callback) callback = this[name];
var router = this;
BI.history.route(route, function (fragment) {
var args = router._extractParameters(route, fragment);
if (router.execute(callback, args, name) !== false) {
router.trigger.apply(router, ['route:' + name].concat(args));
router.trigger('route', name, args);
BI.history.trigger('route', router, name, args);
}
});
return this;
},
// Execute a route handler with the provided parameters. This is an
// excellent place to do pre-route setup or post-route cleanup.
execute: function (callback, args, name) {
if (callback) callback.apply(this, args);
},
// Simple proxy to `BI.history` to save a fragment into the history.
navigate: function (fragment, options) {
BI.history.navigate(fragment, options);
return this;
},
// Bind all defined routes to `BI.history`. We have to reverse the
// order of the routes here to support behavior where the most general
// routes can be defined at the bottom of the route map.
_bindRoutes: function () {
if (!this.routes) return;
this.routes = _.result(this, 'routes');
var route, routes = _.keys(this.routes);
while ((route = routes.pop()) != null) {
this.route(route, this.routes[route]);
}
},
// Convert a route string into a regular expression, suitable for matching
// against the current location hash.
_routeToRegExp: function (route) {
route = route.replace(escapeRegExp, '\\$&')
.replace(optionalParam, '(?:$1)?')
.replace(namedParam, function (match, optional) {
return optional ? match : '([^/?]+)';
})
.replace(splatParam, '([^?]*?)');
return new RegExp('^' + route + '(?:\\?([\\s\\S]*))?$');
},
// Given a route, and a URL fragment that it matches, return the array of
// extracted decoded parameters. Empty or unmatched parameters will be
// treated as `null` to normalize cross-browser behavior.
_extractParameters: function (route, fragment) {
var params = route.exec(fragment).slice(1);
return _.map(params, function (param, i) {
// Don't decode the search params.
if (i === params.length - 1) return param || null;
return param ? decodeURIComponent(param) : null;
});
}
});
// History
// ----------------
// Handles cross-browser history management, based on either
// [pushState](http://diveintohtml5.info/history.html) and real URLs, or
// [onhashchange](https://developer.mozilla.org/en-US/docs/DOM/window.onhashchange)
// and URL fragments. If the browser supports neither (old IE, natch),
// falls back to polling.
var History = function () {
this.handlers = [];
_.bindAll(this, 'checkUrl');
// Ensure that `History` can be used outside of the browser.
if (typeof window !== 'undefined') {
this.location = window.location;
this.history = window.history;
}
};
// Cached regex for stripping a leading hash/slash and trailing space.
var routeStripper = /^[#\/]|\s+$/g;
// Cached regex for stripping leading and trailing slashes.
var rootStripper = /^\/+|\/+$/g;
// Cached regex for stripping urls of hash.
var pathStripper = /#.*$/;
// Has the history handling already been started?
History.started = false;
// Set up all inheritable **BI.History** properties and methods.
_.extend(History.prototype, Events, {
// The default interval to poll for hash changes, if necessary, is
// twenty times a second.
interval: 50,
// Are we at the app root?
atRoot: function () {
var path = this.location.pathname.replace(/[^\/]$/, '$&/');
return path === this.root && !this.getSearch();
},
// In IE6, the hash fragment and search params are incorrect if the
// fragment contains `?`.
getSearch: function () {
var match = this.location.href.replace(/#.*/, '').match(/\?.+/);
return match ? match[0] : '';
},
// Gets the true hash value. Cannot use location.hash directly due to bug
// in Firefox where location.hash will always be decoded.
getHash: function (window) {
var match = (window || this).location.href.match(/#(.*)$/);
return match ? match[1] : '';
},
// Get the pathname and search params, without the root.
getPath: function () {
var path = decodeURI(this.location.pathname + this.getSearch());
var root = this.root.slice(0, -1);
if (!path.indexOf(root)) path = path.slice(root.length);
return path.charAt(0) === '/' ? path.slice(1) : path;
},
// Get the cross-browser normalized URL fragment from the path or hash.
getFragment: function (fragment) {
if (fragment == null) {
if (this._hasPushState || !this._wantsHashChange) {
fragment = this.getPath();
} else {
fragment = this.getHash();
}
}
return fragment.replace(routeStripper, '');
},
// Start the hash change handling, returning `true` if the current URL matches
// an existing route, and `false` otherwise.
start: function (options) {
if (History.started) throw new Error('BI.history has already been started');
History.started = true;
// Figure out the initial configuration. Do we need an iframe?
// Is pushState desired ... is it available?
this.options = _.extend({root: '/'}, this.options, options);
this.root = this.options.root;
this._wantsHashChange = this.options.hashChange !== false;
this._hasHashChange = 'onhashchange' in window;
this._wantsPushState = !!this.options.pushState;
this._hasPushState = !!(this.options.pushState && this.history && this.history.pushState);
this.fragment = this.getFragment();
// Normalize root to always include a leading and trailing slash.
this.root = ('/' + this.root + '/').replace(rootStripper, '/');
// Transition from hashChange to pushState or vice versa if both are
// requested.
if (this._wantsHashChange && this._wantsPushState) {
// If we've started off with a route from a `pushState`-enabled
// browser, but we're currently in a browser that doesn't support it...
if (!this._hasPushState && !this.atRoot()) {
var root = this.root.slice(0, -1) || '/';
this.location.replace(root + '#' + this.getPath());
// Return immediately as browser will do redirect to new url
return true;
// Or if we've started out with a hash-based route, but we're currently
// in a browser where it could be `pushState`-based instead...
} else if (this._hasPushState && this.atRoot()) {
this.navigate(this.getHash(), {replace: true});
}
}
// Proxy an iframe to handle location events if the browser doesn't
// support the `hashchange` event, HTML5 history, or the user wants
// `hashChange` but not `pushState`.
if (!this._hasHashChange && this._wantsHashChange && (!this._wantsPushState || !this._hasPushState)) {
var iframe = document.createElement('iframe');
iframe.src = 'javascript:0';
iframe.style.display = 'none';
iframe.tabIndex = -1;
var body = document.body;
// Using `appendChild` will throw on IE < 9 if the document is not ready.
this.iframe = body.insertBefore(iframe, body.firstChild).contentWindow;
this.iframe.document.open().close();
this.iframe.location.hash = '#' + this.fragment;
}
// Add a cross-platform `addEventListener` shim for older browsers.
var addEventListener = window.addEventListener || function (eventName, listener) {
return attachEvent('on' + eventName, listener);
};
// Depending on whether we're using pushState or hashes, and whether
// 'onhashchange' is supported, determine how we check the URL state.
if (this._hasPushState) {
addEventListener('popstate', this.checkUrl, false);
} else if (this._wantsHashChange && this._hasHashChange && !this.iframe) {
addEventListener('hashchange', this.checkUrl, false);
} else if (this._wantsHashChange) {
this._checkUrlInterval = setInterval(this.checkUrl, this.interval);
}
if (!this.options.silent) return this.loadUrl();
},
// Disable BI.history, perhaps temporarily. Not useful in a real app,
// but possibly useful for unit testing Routers.
stop: function () {
// Add a cross-platform `removeEventListener` shim for older browsers.
var removeEventListener = window.removeEventListener || function (eventName, listener) {
return detachEvent('on' + eventName, listener);
};
// Remove window listeners.
if (this._hasPushState) {
removeEventListener('popstate', this.checkUrl, false);
} else if (this._wantsHashChange && this._hasHashChange && !this.iframe) {
removeEventListener('hashchange', this.checkUrl, false);
}
// Clean up the iframe if necessary.
if (this.iframe) {
document.body.removeChild(this.iframe.frameElement);
this.iframe = null;
}
// Some environments will throw when clearing an undefined interval.
if (this._checkUrlInterval) clearInterval(this._checkUrlInterval);
History.started = false;
},
// Add a route to be tested when the fragment changes. Routes added later
// may override previous routes.
route: function (route, callback) {
this.handlers.unshift({route: route, callback: callback});
},
// Checks the current URL to see if it has changed, and if it has,
// calls `loadUrl`, normalizing across the hidden iframe.
checkUrl: function (e) {
var current = this.getFragment();
// If the user pressed the back button, the iframe's hash will have
// changed and we should use that for comparison.
if (current === this.fragment && this.iframe) {
current = this.getHash(this.iframe);
}
if (current === this.fragment) return false;
if (this.iframe) this.navigate(current);
this.loadUrl();
},
// Attempt to load the current URL fragment. If a route succeeds with a
// match, returns `true`. If no defined routes matches the fragment,
// returns `false`.
loadUrl: function (fragment) {
fragment = this.fragment = this.getFragment(fragment);
return _.any(this.handlers, function (handler) {
if (handler.route.test(fragment)) {
handler.callback(fragment);
return true;
}
});
},
// Save a fragment into the hash history, or replace the URL state if the
// 'replace' option is passed. You are responsible for properly URL-encoding
// the fragment in advance.
//
// The options object can contain `trigger: true` if you wish to have the
// route callback be fired (not usually desirable), or `replace: true`, if
// you wish to modify the current URL without adding an entry to the history.
navigate: function (fragment, options) {
if (!History.started) return false;
if (!options || options === true) options = {trigger: !!options};
// Normalize the fragment.
fragment = this.getFragment(fragment || '');
// Don't include a trailing slash on the root.
var root = this.root;
if (fragment === '' || fragment.charAt(0) === '?') {
root = root.slice(0, -1) || '/';
}
var url = root + fragment;
// Strip the hash and decode for matching.
fragment = decodeURI(fragment.replace(pathStripper, ''));
if (this.fragment === fragment) return;
this.fragment = fragment;
// If pushState is available, we use it to set the fragment as a real URL.
if (this._hasPushState) {
this.history[options.replace ? 'replaceState' : 'pushState']({}, document.title, url);
// If hash changes haven't been explicitly disabled, update the hash
// fragment to store history.
} else if (this._wantsHashChange) {
this._updateHash(this.location, fragment, options.replace);
if (this.iframe && (fragment !== this.getHash(this.iframe))) {
// Opening and closing the iframe tricks IE7 and earlier to push a
// history entry on hash-tag change. When replace is true, we don't
// want this.
if (!options.replace) this.iframe.document.open().close();
this._updateHash(this.iframe.location, fragment, options.replace);
}
// If you've told us that you explicitly don't want fallback hashchange-
// based history, then `navigate` becomes a page refresh.
} else {
return this.location.assign(url);
}
if (options.trigger) return this.loadUrl(fragment);
},
// Update the hash location, either replacing the current entry, or adding
// a new one to the browser history.
_updateHash: function (location, fragment, replace) {
if (replace) {
var href = location.href.replace(/(javascript:|#).*$/, '');
location.replace(href + '#' + fragment);
} else {
// Some browsers require that `hash` contains a leading #.
location.hash = '#' + fragment;
}
}
});
// Create the default BI.history.
BI.history = new History;
}());

10
bi/widget.css

@ -73,7 +73,7 @@
}
.bi-interactive-arrangement .interactive-arrangement-dragtag-line {
z-index: 1000000000;
background-color: #ff4949;
background-color: #faaa39;
}
.bi-interactive-arrangement .interactive-arrangement-dragtag-icon {
z-index: 1000000000;
@ -128,7 +128,7 @@
border-radius: 2px 2px 2px 2px;
}
.bi-multi-select-search-pane .multi-select-toolbar {
color: #faaa39;
color: #ff4949;
}
.bi-multi-select-check-selected-button {
z-index: 1;
@ -190,7 +190,7 @@
font-size: 14px;
}
.bi-number-interval.number-error .bi-input {
color: #faaa39 !important;
color: #ff4949 !important;
}
.bi-page-table-cell {
-webkit-user-select: text;
@ -347,10 +347,10 @@
border-radius: 3px;
}
.bi-param-time-interval.time-error .bi-input {
color: #faaa39;
color: #ff4949;
}
.bi-param-time-interval.time-error .sign-editor-text {
color: #faaa39;
color: #ff4949;
}
.bi-year-popup .year-popup-navigation {
line-height: 30px;

22258
bi/widget.js

File diff suppressed because it is too large Load Diff

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

@ -250,7 +250,6 @@ Demo.Func = BI.inherit(BI.Widget, {
var dynamicCombo = BI.createWidget({
type: "bi.combo",
dynamic: true,
el: {
type: "bi.button",
text: "搜索",

4
demo/js/fix-2.0/globalwatcher.js

@ -14,10 +14,10 @@
},
watch: {
"*.*.n": function () {
debugger
},
"arr.**": function () {
debugger
},
"arr.1.*": function () {
this.button.setText(this.model.name + "-" + this.model.arr[1].n);

2
demo/less/index.less

@ -1 +1 @@
@import "../../src/less/bibase";
@import "../../src/less/index";

16
dist/base.css vendored

@ -85,9 +85,7 @@
border-bottom: 6px solid #3f8ce8;
}
.bi-bubble-popup-view {
-webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
-moz-box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}
.bi-adapt-editor .adapt-editor-text {
font-size: 14px;
@ -785,7 +783,7 @@ body .bi-button.button-warning.clear,
#body .bi-button.button-warning.clear,
body .bi-button.button-warning.clear .b-font:before,
#body .bi-button.button-warning.clear .b-font:before {
color: #faaa39;
color: #ff4949;
}
body .bi-button.button-common.disabled,
#body .bi-button.button-common.disabled,
@ -914,7 +912,7 @@ body .bi-button.button-ignore.disabled.clear:active,
display: inline-block;
}
.bi-code-editor .error-param {
color: #faaa39;
color: #ff4949;
padding: 0 5px;
margin: 1px 1px;
display: inline-block;
@ -967,7 +965,7 @@ body .bi-button.button-ignore.disabled.clear:active,
.bi-input.bi-input-error,
.bi-textarea.bi-input-error {
border: none;
color: #faaa39 !important;
color: #ff4949 !important;
}
.bi-label {
text-overflow: ellipsis;
@ -1000,7 +998,7 @@ body .bi-button.button-ignore.disabled.clear:active,
-moz-border-radius: 2px;
border-radius: 2px;
background: #fddddd;
color: #faaa39;
color: #ff4949;
}
.bi-tip {
position: fixed !important;
@ -1017,7 +1015,7 @@ body .bi-button.button-ignore.disabled.clear:active,
}
.bi-toast.toast-warning {
background: #fddddd;
color: #faaa39;
color: #ff4949;
}
.bi-tooltip {
max-width: 250px;
@ -1033,7 +1031,7 @@ body .bi-button.button-ignore.disabled.clear:active,
}
.bi-tooltip.tooltip-warning {
background: #fddddd;
color: #faaa39;
color: #ff4949;
border: 1px solid #f4cbcb;
}
.bi-sql-editor .cm-s-default span[class*="#"] {

934
dist/base.js vendored

File diff suppressed because one or more lines are too long

1209
dist/bundle.css vendored

File diff suppressed because it is too large Load Diff

6006
dist/bundle.js vendored

File diff suppressed because one or more lines are too long

2
dist/bundle.min.css vendored

File diff suppressed because one or more lines are too long

92
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

927
dist/case.js vendored

File diff suppressed because it is too large Load Diff

1327
dist/chart.js vendored

File diff suppressed because it is too large Load Diff

24
dist/core.css vendored

@ -419,13 +419,13 @@ i {
border-bottom: 1px solid #525466;
}
.bi-keyword-red-mark {
color: #ff4949;
color: #faaa39;
}
.bi-keyword-red-mark .bi-input {
color: #ff4949;
color: #faaa39;
}
.bi-keyword-red-mark .bi-textarea {
color: #ff4949;
color: #faaa39;
}
.bi-high-light {
color: #3685f2;
@ -1237,6 +1237,9 @@ i {
-o-align-items: center;
align-items: center;
}
.bi-flex-center-layout > * {
margin: auto;
}
.bi-flex-horizontal-layout {
display: box;
/* OLD - Android 4.4- */
@ -1307,6 +1310,9 @@ i {
-o-align-items: flex-end;
align-items: flex-end;
}
.bi-flex-horizontal-layout > * {
margin: auto;
}
.bi-flex-vertical-center {
display: box;
/* OLD - Android 4.4- */
@ -1383,6 +1389,9 @@ i {
-o-align-items: stretch;
align-items: stretch;
}
.bi-flex-vertical-center > * {
margin: auto;
}
.bi-flex-wrapper-center-layout .flex-wrapper-center-layout-wrapper {
display: box;
/* OLD - Android 4.4- */
@ -1426,6 +1435,9 @@ i {
min-height: 100%;
float: left;
}
.bi-flex-wrapper-center-layout > * {
margin: auto;
}
.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper {
display: box;
/* OLD - Android 4.4- */
@ -1495,6 +1507,9 @@ i {
-o-align-items: flex-end;
align-items: flex-end;
}
.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper > * {
margin: auto;
}
.bi-flex-wrapper-vertical-center .flex-wrapper-vertical-center-wrapper {
display: box;
/* OLD - Android 4.4- */
@ -1572,6 +1587,9 @@ i {
-o-align-items: stretch;
align-items: stretch;
}
.bi-flex-wrapper-vertical-center .flex-wrapper-vertical-center-wrapper > * {
margin: auto;
}
.bi-inline-center-adapt-layout:after {
display: inline-block;
width: 0;

2841
dist/core.js vendored

File diff suppressed because one or more lines are too long

24
dist/core_without_normalize.css vendored

@ -136,13 +136,13 @@
border-bottom: 1px solid #525466;
}
.bi-keyword-red-mark {
color: #ff4949;
color: #faaa39;
}
.bi-keyword-red-mark .bi-input {
color: #ff4949;
color: #faaa39;
}
.bi-keyword-red-mark .bi-textarea {
color: #ff4949;
color: #faaa39;
}
.bi-high-light {
color: #3685f2;
@ -954,6 +954,9 @@
-o-align-items: center;
align-items: center;
}
.bi-flex-center-layout > * {
margin: auto;
}
.bi-flex-horizontal-layout {
display: box;
/* OLD - Android 4.4- */
@ -1024,6 +1027,9 @@
-o-align-items: flex-end;
align-items: flex-end;
}
.bi-flex-horizontal-layout > * {
margin: auto;
}
.bi-flex-vertical-center {
display: box;
/* OLD - Android 4.4- */
@ -1100,6 +1106,9 @@
-o-align-items: stretch;
align-items: stretch;
}
.bi-flex-vertical-center > * {
margin: auto;
}
.bi-flex-wrapper-center-layout .flex-wrapper-center-layout-wrapper {
display: box;
/* OLD - Android 4.4- */
@ -1143,6 +1152,9 @@
min-height: 100%;
float: left;
}
.bi-flex-wrapper-center-layout > * {
margin: auto;
}
.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper {
display: box;
/* OLD - Android 4.4- */
@ -1212,6 +1224,9 @@
-o-align-items: flex-end;
align-items: flex-end;
}
.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper > * {
margin: auto;
}
.bi-flex-wrapper-vertical-center .flex-wrapper-vertical-center-wrapper {
display: box;
/* OLD - Android 4.4- */
@ -1289,6 +1304,9 @@
-o-align-items: stretch;
align-items: stretch;
}
.bi-flex-wrapper-vertical-center .flex-wrapper-vertical-center-wrapper > * {
margin: auto;
}
.bi-inline-center-adapt-layout:after {
display: inline-block;
width: 0;

5
dist/demo.js vendored

@ -5966,7 +5966,6 @@ BI.shortcut("demo.combo_group", Demo.Func);Demo.Func = BI.inherit(BI.Widget, {
var dynamicCombo = BI.createWidget({
type: "bi.combo",
dynamic: true,
el: {
type: "bi.button",
text: "搜索",
@ -10478,10 +10477,10 @@ BI.shortcut("demo.tmp", Demo.Func);
},
watch: {
"*.*.n": function () {
debugger
},
"arr.**": function () {
debugger
},
"arr.1.*": function () {
this.button.setText(this.model.name + "-" + this.model.arr[1].n);

14
dist/fix/fix.compact.js vendored

@ -20,7 +20,7 @@
}
var target = null;
const targetStack = [];
var targetStack = [];
function pushTarget (_target) {
if (target) targetStack.push(target);
@ -41,9 +41,9 @@
cb = model[cb];
}
return oldWatch.call(this, model, expOrFn, function () {
pushTarget(options.store);
options && options.store && pushTarget(options.store);
var res = cb.apply(this, arguments);
popTarget();
options && options.store && popTarget();
return res;
}, options);
};
@ -98,7 +98,10 @@
});
});
this._watchers && (this._watchers = []);
this.store && (this.store._parent = null, this.store = null);
if (this.store) {
this.store._parent && (this.store._parent = null);
this.store = null;
}
};
_.each(["_mount"], function (name) {
@ -111,6 +114,7 @@
});
});
if (BI.isIE9Below()) {
_.each(["each", "map", "reduce", "reduceRight", "find", "filter", "reject", "every", "all", "some", "any", "max", "min",
"sortBy", "groupBy", "indexBy", "countBy", "partition",
"keys", "allKeys", "values", "pairs", "invert",
@ -124,4 +128,6 @@
}) : old.apply(this, arguments);
};
});
}
BI.watch = Fix.watch;
}());

38
dist/fix/fix.js vendored

@ -371,6 +371,15 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
shouldConvert: true
};
function def(obj, key, val, enumerable) {
Object.defineProperty(obj, key, {
value: val,
enumerable: !!enumerable,
writable: true,
configurable: true
});
}
/**
* Observer class that are attached to each observed
* object. Once attached, the observer converts target
@ -392,7 +401,11 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
} else {
this.model = this.walk(value);
}
if (isIE9Below) {
this.model['__ob__'] = this;
} else {
def(this.model, "__ob__", this);
}
}
Observer.prototype.walk = function walk(obj) {
@ -429,7 +442,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
return;
}
var ob = void 0;
if (_.has(value, '__ob__') && value.__ob__ instanceof Observer) {
if (value.__ob__ instanceof Observer) {
ob = value.__ob__;
} else if (observerState.shouldConvert && (_.isArray(value) || isPlainObject(value))) {
ob = new Observer(value);
@ -1029,7 +1042,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
for (var key in computed) {
var userDef = computed[key],
context = vm.$$model ? vm.model : vm;
var getter = typeof userDef === 'function' ? _.bind(userDef, context) : _.bind(userDef.get, context);
var getter = typeof userDef === "function" ? _.bind(userDef, context) : _.bind(userDef.get, context);
watchers[key] = new Watcher(vm.$$computed, getter || noop, noop, computedWatcherOptions);
}
@ -1057,7 +1070,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
set: noop
};
var userDef = computed[key];
if (typeof userDef === 'function') {
if (typeof userDef === "function") {
sharedPropertyDefinition.get = createComputedGetter(vm, key);
sharedPropertyDefinition.set = noop;
} else {
@ -1226,22 +1239,27 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
if (model instanceof Observer || model instanceof Model) {
model = model.model;
}
if (_.has(model, '__ob__')) {
if (model && model.__ob__) {
this.$$model = model;
} else {
this.options = model || {};
}
this._parent = Model.target;
var state = _.isFunction(this.state) ? this.state() : this.state;
var keys = _.keys(this.$$model).concat(_.keys(state)).concat(_.keys(this.computed)).concat(this.context);
var computed = _.isFunction(this.computed) ? this.computed() : this.computed;
var context = _.isFunction(this.context) ? this.context() : this.context;
var childContext = _.isFunction(this.childContext) ? this.childContext() : this.childContext;
var watch$$1 = _.isFunction(this.watch) ? this.watch() : this.watch;
var actions = _.isFunction(this.actions) ? this.actions() : this.actions;
var keys = _.keys(this.$$model).concat(_.keys(state)).concat(_.keys(computed)).concat(context);
defineProps(this, keys);
this.childContext && defineContext(this, this.childContext);
childContext && defineContext(this, childContext);
this.$$model && (this.model.__ob__ = this.$$model.__ob__);
this._init();
initState(this, state);
initComputed(this, this.computed);
initWatch(this, this.watch);
initMethods(this, this.actions);
initComputed(this, computed);
initWatch(this, watch$$1);
initMethods(this, actions);
if (this.$$model) {
return this.model;
}
@ -1305,6 +1323,8 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
exports.set = set;
exports.del = del;
exports.Watcher = Watcher;
exports.pushTarget = pushTarget;
exports.popTarget = popTarget;
exports.watch = watch;
exports.toJSON = toJSON;

27
dist/polyfill.js vendored

@ -8,7 +8,7 @@ if (!Array.prototype.indexOf) {
// 1. Let o be the result of calling ToObject passing
// the this value as the argument.
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);
@ -61,7 +61,7 @@ if (!Array.prototype.indexOf) {
}
if (!Array.prototype.lastIndexOf) {
Array.prototype.lastIndexOf = function (searchElement /* , fromIndex*/) {
'use strict';
"use strict";
if (this === void 0 || this === null) {
throw new TypeError();
@ -79,8 +79,7 @@ if (!Array.prototype.lastIndexOf) {
n = Number(arguments[1]);
if (n != n) {
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));
}
}
@ -127,29 +126,29 @@ window.localStorage || (window.localStorage = {
clear: function () {
this.items = {};
}
});if (typeof Set !== 'undefined' && Set.toString().match(/native code/)) {
});if (typeof Set !== "undefined" && Set.toString().match(/native code/)) {
} else {
Set = function () {
this.set = {}
this.set = {};
};
Set.prototype.has = function (key) {
return this.set[key] !== undefined;
};
Set.prototype.add = function (key) {
this.set[key] = 1
this.set[key] = 1;
};
Set.prototype.clear = function () {
this.set = {}
this.set = {};
};
}// 修复ie9下sort方法的bug
;!function (window) {
!function (window) {
var ua = window.navigator.userAgent.toLowerCase(),
reg = /msie|applewebkit.+safari/;
if (reg.test(ua)) {
var _sort = Array.prototype.sort;
Array.prototype.sort = function (fn) {
if (!!fn && typeof fn === 'function') {
if (!!fn && typeof fn === "function") {
if (this.length < 2) {
return this;
}
@ -157,8 +156,8 @@ window.localStorage || (window.localStorage = {
for (; i < l; i++) {
for (j = i + 1; j < l; j++) {
t = fn.call(this, this[i], this[j]);
r = (typeof t === 'number' ? t :
!!t ? 1 : 0) > 0;
r = (typeof t === "number" ? t :
t ? 1 : 0) > 0;
if (r === true) {
tmp = this[i];
this[i] = this[j];
@ -167,9 +166,9 @@ window.localStorage || (window.localStorage = {
}
}
return this;
} else {
return _sort.call(this);
}
return _sort.call(this);
};
}
}(window);

6
dist/resource.css vendored

@ -398,7 +398,7 @@ textarea::-webkit-scrollbar-thumb:hover {
.search-close-h-font:hover .b-font:before,
.search-close-h-font.hover .b-font:before {
content: "\e600";
color: #faaa39;
color: #ff4949;
}
.search-close-h-font.disabled .b-font:before {
content: "\e600";
@ -971,11 +971,11 @@ textarea::-webkit-scrollbar-thumb:hover {
}
.drag-tag-font .b-font:before {
content: "\e600";
color: #ff4949;
color: #faaa39;
}
.drag-tag-font.disabled .b-font:before {
content: "\e600";
color: #ff4949;
color: #faaa39;
}
.less-font .b-font {
*zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '&#xe633;');

104
dist/router.js vendored

@ -1,10 +1,10 @@
;(function(){
(function () {
var Events = {
// Bind an event to a `callback` function. Passing `"all"` will bind
// the callback to all events fired.
on: function (name, callback, context) {
if (!eventsApi(this, 'on', name, [callback, context]) || !callback) return this;
if (!eventsApi(this, "on", name, [callback, context]) || !callback) return this;
this._events || (this._events = {});
var events = this._events[name] || (this._events[name] = []);
events.push({callback: callback, context: context, ctx: context || this});
@ -14,7 +14,7 @@
// Bind an event to only be triggered a single time. After the first time
// the callback is invoked, it will be removed.
once: function (name, callback, context) {
if (!eventsApi(this, 'once', name, [callback, context]) || !callback) return this;
if (!eventsApi(this, "once", name, [callback, context]) || !callback) return this;
var self = this;
var once = _.once(function () {
self.off(name, once);
@ -29,7 +29,7 @@
// callbacks for the event. If `name` is null, removes all bound
// callbacks for all events.
off: function (name, callback, context) {
if (!this._events || !eventsApi(this, 'off', name, [callback, context])) return this;
if (!this._events || !eventsApi(this, "off", name, [callback, context])) return this;
// Remove all callbacks for all events.
if (!name && !callback && !context) {
@ -86,7 +86,7 @@
trigger: function (name) {
if (!this._events) return this;
var args = slice.call(arguments, 1);
if (!eventsApi(this, 'trigger', name, args)) return this;
if (!eventsApi(this, "trigger", name, args)) return this;
var events = this._events[name];
var allEvents = this._events.all;
if (events) triggerEvents(events, args);
@ -103,15 +103,15 @@
// listening to.
listenTo: function (obj, name, callback) {
var listeningTo = this._listeningTo || (this._listeningTo = {});
var id = obj._listenId || (obj._listenId = _.uniqueId('l'));
var id = obj._listenId || (obj._listenId = _.uniqueId("l"));
listeningTo[id] = obj;
if (!callback && typeof name === 'object') callback = this;
if (!callback && typeof name === "object") callback = this;
obj.on(name, callback, this);
return this;
},
listenToOnce: function (obj, name, callback) {
if (typeof name === 'object') {
if (typeof name === "object") {
for (var event in name) this.listenToOnce(obj, event, name[event]);
return this;
}
@ -137,7 +137,7 @@
var listeningTo = this._listeningTo;
if (!listeningTo) return this;
var remove = !name && !callback;
if (!callback && typeof name === 'object') callback = this;
if (!callback && typeof name === "object") callback = this;
if (obj) (listeningTo = {})[obj._listenId] = obj;
for (var id in listeningTo) {
obj = listeningTo[id];
@ -159,7 +159,7 @@
if (!name) return true;
// Handle event maps.
if (typeof name === 'object') {
if (typeof name === "object") {
for (var key in name) {
obj[action].apply(obj, [key, name[key]].concat(rest));
}
@ -239,16 +239,16 @@
if (!_.isRegExp(route)) route = this._routeToRegExp(route);
if (_.isFunction(name)) {
callback = name;
name = '';
name = "";
}
if (!callback) callback = this[name];
var router = this;
BI.history.route(route, function (fragment) {
var args = router._extractParameters(route, fragment);
if (router.execute(callback, args, name) !== false) {
router.trigger.apply(router, ['route:' + name].concat(args));
router.trigger('route', name, args);
BI.history.trigger('route', router, name, args);
router.trigger.apply(router, ["route:" + name].concat(args));
router.trigger("route", name, args);
BI.history.trigger("route", router, name, args);
}
});
return this;
@ -271,7 +271,7 @@
// routes can be defined at the bottom of the route map.
_bindRoutes: function () {
if (!this.routes) return;
this.routes = _.result(this, 'routes');
this.routes = _.result(this, "routes");
var route, routes = _.keys(this.routes);
while ((route = routes.pop()) != null) {
this.route(route, this.routes[route]);
@ -281,13 +281,13 @@
// Convert a route string into a regular expression, suitable for matching
// against the current location hash.
_routeToRegExp: function (route) {
route = route.replace(escapeRegExp, '\\$&')
.replace(optionalParam, '(?:$1)?')
route = route.replace(escapeRegExp, "\\$&")
.replace(optionalParam, "(?:$1)?")
.replace(namedParam, function (match, optional) {
return optional ? match : '([^/?]+)';
return optional ? match : "([^/?]+)";
})
.replace(splatParam, '([^?]*?)');
return new RegExp('^' + route + '(?:\\?([\\s\\S]*))?$');
.replace(splatParam, "([^?]*?)");
return new RegExp("^" + route + "(?:\\?([\\s\\S]*))?$");
},
// Given a route, and a URL fragment that it matches, return the array of
@ -314,10 +314,10 @@
// falls back to polling.
var History = function () {
this.handlers = [];
_.bindAll(this, 'checkUrl');
_.bindAll(this, "checkUrl");
// Ensure that `History` can be used outside of the browser.
if (typeof window !== 'undefined') {
if (typeof window !== "undefined") {
this.location = window.location;
this.history = window.history;
}
@ -344,22 +344,22 @@
// Are we at the app root?
atRoot: function () {
var path = this.location.pathname.replace(/[^\/]$/, '$&/');
var path = this.location.pathname.replace(/[^\/]$/, "$&/");
return path === this.root && !this.getSearch();
},
// In IE6, the hash fragment and search params are incorrect if the
// fragment contains `?`.
getSearch: function () {
var match = this.location.href.replace(/#.*/, '').match(/\?.+/);
return match ? match[0] : '';
var match = this.location.href.replace(/#.*/, "").match(/\?.+/);
return match ? match[0] : "";
},
// Gets the true hash value. Cannot use location.hash directly due to bug
// in Firefox where location.hash will always be decoded.
getHash: function (window) {
var match = (window || this).location.href.match(/#(.*)$/);
return match ? match[1] : '';
return match ? match[1] : "";
},
// Get the pathname and search params, without the root.
@ -367,7 +367,7 @@
var path = decodeURI(this.location.pathname + this.getSearch());
var root = this.root.slice(0, -1);
if (!path.indexOf(root)) path = path.slice(root.length);
return path.charAt(0) === '/' ? path.slice(1) : path;
return path.charAt(0) === "/" ? path.slice(1) : path;
},
// Get the cross-browser normalized URL fragment from the path or hash.
@ -379,27 +379,27 @@
fragment = this.getHash();
}
}
return fragment.replace(routeStripper, '');
return fragment.replace(routeStripper, "");
},
// Start the hash change handling, returning `true` if the current URL matches
// an existing route, and `false` otherwise.
start: function (options) {
if (History.started) throw new Error('BI.history has already been started');
if (History.started) throw new Error("BI.history has already been started");
History.started = true;
// Figure out the initial configuration. Do we need an iframe?
// Is pushState desired ... is it available?
this.options = _.extend({root: '/'}, this.options, options);
this.options = _.extend({root: "/"}, this.options, options);
this.root = this.options.root;
this._wantsHashChange = this.options.hashChange !== false;
this._hasHashChange = 'onhashchange' in window;
this._hasHashChange = "onhashchange" in window;
this._wantsPushState = !!this.options.pushState;
this._hasPushState = !!(this.options.pushState && this.history && this.history.pushState);
this.fragment = this.getFragment();
// Normalize root to always include a leading and trailing slash.
this.root = ('/' + this.root + '/').replace(rootStripper, '/');
this.root = ("/" + this.root + "/").replace(rootStripper, "/");
// Transition from hashChange to pushState or vice versa if both are
// requested.
@ -408,8 +408,8 @@
// If we've started off with a route from a `pushState`-enabled
// browser, but we're currently in a browser that doesn't support it...
if (!this._hasPushState && !this.atRoot()) {
var root = this.root.slice(0, -1) || '/';
this.location.replace(root + '#' + this.getPath());
var root = this.root.slice(0, -1) || "/";
this.location.replace(root + "#" + this.getPath());
// Return immediately as browser will do redirect to new url
return true;
@ -425,28 +425,28 @@
// support the `hashchange` event, HTML5 history, or the user wants
// `hashChange` but not `pushState`.
if (!this._hasHashChange && this._wantsHashChange && (!this._wantsPushState || !this._hasPushState)) {
var iframe = document.createElement('iframe');
iframe.src = 'javascript:0';
iframe.style.display = 'none';
var iframe = document.createElement("iframe");
iframe.src = "javascript:0";
iframe.style.display = "none";
iframe.tabIndex = -1;
var body = document.body;
// Using `appendChild` will throw on IE < 9 if the document is not ready.
this.iframe = body.insertBefore(iframe, body.firstChild).contentWindow;
this.iframe.document.open().close();
this.iframe.location.hash = '#' + this.fragment;
this.iframe.location.hash = "#" + this.fragment;
}
// Add a cross-platform `addEventListener` shim for older browsers.
var addEventListener = window.addEventListener || function (eventName, listener) {
return attachEvent('on' + eventName, listener);
return attachEvent("on" + eventName, listener);
};
// Depending on whether we're using pushState or hashes, and whether
// 'onhashchange' is supported, determine how we check the URL state.
if (this._hasPushState) {
addEventListener('popstate', this.checkUrl, false);
addEventListener("popstate", this.checkUrl, false);
} else if (this._wantsHashChange && this._hasHashChange && !this.iframe) {
addEventListener('hashchange', this.checkUrl, false);
addEventListener("hashchange", this.checkUrl, false);
} else if (this._wantsHashChange) {
this._checkUrlInterval = setInterval(this.checkUrl, this.interval);
}
@ -459,14 +459,14 @@
stop: function () {
// Add a cross-platform `removeEventListener` shim for older browsers.
var removeEventListener = window.removeEventListener || function (eventName, listener) {
return detachEvent('on' + eventName, listener);
return detachEvent("on" + eventName, listener);
};
// Remove window listeners.
if (this._hasPushState) {
removeEventListener('popstate', this.checkUrl, false);
removeEventListener("popstate", this.checkUrl, false);
} else if (this._wantsHashChange && this._hasHashChange && !this.iframe) {
removeEventListener('hashchange', this.checkUrl, false);
removeEventListener("hashchange", this.checkUrl, false);
}
// Clean up the iframe if necessary.
@ -527,24 +527,24 @@
if (!options || options === true) options = {trigger: !!options};
// Normalize the fragment.
fragment = this.getFragment(fragment || '');
fragment = this.getFragment(fragment || "");
// Don't include a trailing slash on the root.
var root = this.root;
if (fragment === '' || fragment.charAt(0) === '?') {
root = root.slice(0, -1) || '/';
if (fragment === "" || fragment.charAt(0) === "?") {
root = root.slice(0, -1) || "/";
}
var url = root + fragment;
// Strip the hash and decode for matching.
fragment = decodeURI(fragment.replace(pathStripper, ''));
fragment = decodeURI(fragment.replace(pathStripper, ""));
if (this.fragment === fragment) return;
this.fragment = fragment;
// If pushState is available, we use it to set the fragment as a real URL.
if (this._hasPushState) {
this.history[options.replace ? 'replaceState' : 'pushState']({}, document.title, url);
this.history[options.replace ? "replaceState" : "pushState"]({}, document.title, url);
// If hash changes haven't been explicitly disabled, update the hash
// fragment to store history.
@ -570,11 +570,11 @@
// a new one to the browser history.
_updateHash: function (location, fragment, replace) {
if (replace) {
var href = location.href.replace(/(javascript:|#).*$/, '');
location.replace(href + '#' + fragment);
var href = location.href.replace(/(javascript:|#).*$/, "");
location.replace(href + "#" + fragment);
} else {
// Some browsers require that `hash` contains a leading #.
location.hash = '#' + fragment;
location.hash = "#" + fragment;
}
}

10
dist/widget.css vendored

@ -73,7 +73,7 @@
}
.bi-interactive-arrangement .interactive-arrangement-dragtag-line {
z-index: 1000000000;
background-color: #ff4949;
background-color: #faaa39;
}
.bi-interactive-arrangement .interactive-arrangement-dragtag-icon {
z-index: 1000000000;
@ -128,7 +128,7 @@
border-radius: 2px 2px 2px 2px;
}
.bi-multi-select-search-pane .multi-select-toolbar {
color: #faaa39;
color: #ff4949;
}
.bi-multi-select-check-selected-button {
z-index: 1;
@ -190,7 +190,7 @@
font-size: 14px;
}
.bi-number-interval.number-error .bi-input {
color: #faaa39 !important;
color: #ff4949 !important;
}
.bi-page-table-cell {
-webkit-user-select: text;
@ -347,10 +347,10 @@
border-radius: 3px;
}
.bi-param-time-interval.time-error .bi-input {
color: #faaa39;
color: #ff4949;
}
.bi-param-time-interval.time-error .sign-editor-text {
color: #faaa39;
color: #ff4949;
}
.bi-year-popup .year-popup-navigation {
line-height: 30px;

1202
dist/widget.js vendored

File diff suppressed because it is too large Load Diff

1159
public/bundle.css

File diff suppressed because it is too large Load Diff

2
public/css/app.css

@ -25,7 +25,7 @@ body {
-ms-user-select: none;
-o-user-select: none;
user-select: none;
color: #666666;
color: #3d4d66;
font: normal 12px "Microsoft YaHei", "Hiragino Sans GB W3";
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;

235
public/css/background.css

@ -1,41 +1,236 @@
.farbtastic .wheel {
background: url('https://fanruan.coding.me/fineui/dist/images/1x/background/wheel.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://fanruan.coding.me/fineui/dist/images/1x/background/wheel.png');
_background: none;
}
.farbtastic .overlay {
background: url('https://fanruan.coding.me/fineui/dist/images/1x/background/mask.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://fanruan.coding.me/fineui/dist/images/1x/background/mask.png');
_background: none;
}
.farbtastic .marker {
background: url('https://fanruan.coding.me/fineui/dist/images/1x/background/marker.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://fanruan.coding.me/fineui/dist/images/1x/background/marker.png');
_background: none;
}
.bi-display-tree .ztree li span.button.switch.center_open {
background: url('https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_3.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_3.png');
_background: none;
}
.bi-display-tree .ztree li span.button.switch.roots_open {
background: url('https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_2.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_2.png');
_background: none;
}
.bi-display-tree .ztree li span.button.switch.bottom_open {
background: url('https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_4.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_4.png');
_background: none;
}
.ztree li ul.line {
background: url('https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_1.png') repeat-y 0 0;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_1.png');
_background: none;
}
.bi-theme-dark .ztree li ul.line {
background: url('https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_vertical_line_1.png') repeat-y 0 0;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_vertical_line_1.png');
_background: none;
}
.ztree li span.button.chk.checkbox_false_full {
background: url('https://fanruan.coding.me/fineui/dist/images/1x/icon/check_box_normal.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://fanruan.coding.me/fineui/dist/images/1x/icon/check_box_normal.png');
_background: none;
}
.ztree li span.button.chk.checkbox_false_full_focus {
background: url('https://fanruan.coding.me/fineui/dist/images/1x/icon/check_box_normal.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://fanruan.coding.me/fineui/dist/images/1x/icon/check_box_normal.png');
_background: none;
}
.ztree li span.button.chk.checkbox_false_part {
background: url('https://fanruan.coding.me/fineui/dist/images/1x/icon/half_selected.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://fanruan.coding.me/fineui/dist/images/1x/icon/half_selected.png');
_background: none;
}
.ztree li span.button.chk.checkbox_false_part_focus {
background: url('https://fanruan.coding.me/fineui/dist/images/1x/icon/half_selected.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://fanruan.coding.me/fineui/dist/images/1x/icon/half_selected.png');
_background: none;
}
.ztree li span.button.chk.checkbox_true_full {
background: url('https://fanruan.coding.me/fineui/dist/images/1x/icon/check_box_active.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://fanruan.coding.me/fineui/dist/images/1x/icon/check_box_active.png');
_background: none;
}
.ztree li span.button.chk.checkbox_true_full_focus {
background: url('https://fanruan.coding.me/fineui/dist/images/1x/icon/check_box_active.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://fanruan.coding.me/fineui/dist/images/1x/icon/check_box_active.png');
_background: none;
}
.ztree li span.button.chk.checkbox_true_part {
background: url('https://fanruan.coding.me/fineui/dist/images/1x/icon/half_selected.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://fanruan.coding.me/fineui/dist/images/1x/icon/half_selected.png');
_background: none;
}
.ztree li span.button.chk.checkbox_true_part_focus {
background: url('https://fanruan.coding.me/fineui/dist/images/1x/icon/half_selected.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://fanruan.coding.me/fineui/dist/images/1x/icon/half_selected.png');
_background: none;
}
.ztree li span.button.root_open {
background: url('https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_expand_1.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_expand_1.png');
_background: none;
}
.bi-theme-dark .ztree li span.button.root_open {
background: url('https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_expand_1.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_expand_1.png');
_background: none;
}
.ztree li span.button.root_close {
background: url('https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_collapse_1.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_collapse_1.png');
_background: none;
}
.bi-theme-dark .ztree li span.button.root_close {
background: url('https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_collapse_1.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_collapse_1.png');
_background: none;
}
.ztree li span.button.roots_open {
background: url('https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_expand_2.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_expand_2.png');
_background: none;
}
.bi-theme-dark .ztree li span.button.roots_open {
background: url('https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_expand_2.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_expand_2.png');
_background: none;
}
.ztree li span.button.roots_close {
background: url('https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_collapse_2.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_collapse_2.png');
_background: none;
}
.bi-theme-dark .ztree li span.button.roots_close {
background: url('https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_collapse_2.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_collapse_2.png');
_background: none;
}
.ztree li span.button.center_open {
background: url('https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_expand_3.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_expand_3.png');
_background: none;
}
.bi-theme-dark .ztree li span.button.center_open {
background: url('https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_expand_3.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_expand_3.png');
_background: none;
}
.ztree li span.button.center_close {
background: url('https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_collapse_3.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_collapse_3.png');
_background: none;
}
.bi-theme-dark .ztree li span.button.center_close {
background: url('https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_collapse_3.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_collapse_3.png');
_background: none;
}
.ztree li span.button.bottom_open {
background: url('https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_expand_4.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_expand_4.png');
_background: none;
}
.bi-theme-dark .ztree li span.button.bottom_open {
background: url('https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_expand_4.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_expand_4.png');
_background: none;
}
.ztree li span.button.bottom_close {
background: url('https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_collapse_4.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_collapse_4.png');
_background: none;
}
.bi-theme-dark .ztree li span.button.bottom_close {
background: url('https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_collapse_4.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_collapse_4.png');
_background: none;
}
.ztree li span.button.roots_docu {
background: url('https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_2.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_2.png');
_background: none;
}
.bi-theme-dark .ztree li span.button.roots_docu {
background: url('https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_vertical_line_2.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_vertical_line_2.png');
_background: none;
}
.ztree li span.button.center_docu {
background: url('https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_3.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_3.png');
_background: none;
}
.bi-theme-dark .ztree li span.button.center_docu {
background: url('https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_vertical_line_3.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_vertical_line_3.png');
_background: none;
}
.ztree li span.button.bottom_docu {
background: url('https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_4.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_4.png');
_background: none;
}
.bi-theme-dark .ztree li span.button.bottom_docu {
background: url('https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_vertical_line_4.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_vertical_line_4.png');
_background: none;
}
.ztree li span.button.ico_loading {
background: url('https://fanruan.coding.me/fineui/dist/images/1x/icon/loading.gif') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://fanruan.coding.me/fineui/dist/images/1x/icon/loading.gif');
_background: none;
}
.base-line-conn-background {
background: url('https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-1.png') repeat-y 0 0;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-1.png');
background: url('https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_1.png') repeat-y 0 0;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_1.png');
_background: none;
}
.bi-theme-dark .base-line-conn-background {
background: url('https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-1.png') repeat-y 0 0;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-1.png');
background: url('https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_vertical_line_1.png') repeat-y 0 0;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_vertical_line_1.png');
_background: none;
}
.first-line-conn-background {
background: url('https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-2.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-2.png');
background: url('https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_2.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_2.png');
_background: none;
}
.bi-theme-dark .first-line-conn-background {
background: url('https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-2.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-2.png');
background: url('https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_vertical_line_2.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_vertical_line_2.png');
_background: none;
}
.mid-line-conn-background {
background: url('https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-3.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-3.png');
background: url('https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_3.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_3.png');
_background: none;
}
.bi-theme-dark .mid-line-conn-background {
background: url('https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-3.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-3.png');
background: url('https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_vertical_line_3.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_vertical_line_3.png');
_background: none;
}
.last-line-conn-background {
background: url('https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-4.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-4.png');
background: url('https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_4.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_4.png');
_background: none;
}
.bi-theme-dark .last-line-conn-background {
background: url('https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-4.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-4.png');
background: url('https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_vertical_line_4.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_vertical_line_4.png');
_background: none;
}
.loading-background {
@ -44,12 +239,12 @@
_background: none;
}
.auto-color-background {
background: url('https://fanruan.coding.me/fineui/dist/images/1x/background/auto-color.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://fanruan.coding.me/fineui/dist/images/1x/background/auto-color.png');
background: url('https://fanruan.coding.me/fineui/dist/images/1x/background/auto_color.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://fanruan.coding.me/fineui/dist/images/1x/background/auto_color.png');
_background: none;
}
.trans-color-background {
background: url('https://fanruan.coding.me/fineui/dist/images/1x/background/trans-color.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://fanruan.coding.me/fineui/dist/images/1x/background/trans-color.png');
background: url('https://fanruan.coding.me/fineui/dist/images/1x/background/trans_color.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://fanruan.coding.me/fineui/dist/images/1x/background/trans_color.png');
_background: none;
}

122
public/css/font.css

@ -1,13 +1,8 @@
@font-face {
font-family: 'bi';
src: url('https://fanruan.coding.me/fineui/dist/font/iconfont.eot'), /* IE6-IE8 */ url('https://fanruan.coding.me/fineui/dist/font/iconfont.woff') format('woff'), /* chrome、firefox */ url('https://fanruan.coding.me/fineui/dist/font/iconfont.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/ url('https://fanruan.coding.me/fineui/dist/font/iconfont.svg#svgFontName') format('svg');
/* iOS 4.1- */
}
@font-face {
font-family: 'bi';
src: url('https://fanruan.coding.me/fineui/dist/font/iconfont.eot') /* IE6-IE8 */;
}
.b-font {
font-family: "bi";
font-style: normal;
@ -22,7 +17,6 @@
content: "\e600";
color: inherit;
}
.close-font.native .b-font:before,
.close-font.disabled .b-font:before {
content: "\e600";
color: inherit;
@ -35,12 +29,10 @@
color: inherit;
}
.close-h-font:hover .b-font:before,
.close-h-font:focus .b-font:before,
.close-h-font.hover .b-font:before {
content: "\e600";
color: inherit;
}
.close-h-font.native .b-font:before,
.close-h-font.disabled .b-font:before {
content: "\e600";
color: inherit;
@ -53,7 +45,6 @@
color: inherit;
}
.close-ha-font:hover .b-font:before,
.close-ha-font:focus .b-font:before,
.close-ha-font.hover .b-font:before {
content: "\e600";
color: inherit;
@ -63,7 +54,6 @@
content: "\e600";
color: #3f8ce8;
}
.close-ha-font.native .b-font:before,
.close-ha-font.disabled .b-font:before {
content: "\e600";
color: inherit;
@ -76,12 +66,10 @@
color: inherit;
}
.search-close-h-font:hover .b-font:before,
.search-close-h-font:focus .b-font:before,
.search-close-h-font.hover .b-font:before {
content: "\e600";
color: #e85050;
color: #ff4949;
}
.search-close-h-font.native .b-font:before,
.search-close-h-font.disabled .b-font:before {
content: "\e600";
color: inherit;
@ -94,12 +82,10 @@
color: inherit;
}
.pre-page-h-font:hover .b-font:before,
.pre-page-h-font:focus .b-font:before,
.pre-page-h-font.hover .b-font:before {
content: "\e601";
color: inherit;
}
.pre-page-h-font.native .b-font:before,
.pre-page-h-font.disabled .b-font:before {
content: "\e601";
color: inherit;
@ -112,12 +98,10 @@
color: inherit;
}
.next-page-h-font:hover .b-font:before,
.next-page-h-font:focus .b-font:before,
.next-page-h-font.hover .b-font:before {
content: "\e602";
color: inherit;
}
.next-page-h-font.native .b-font:before,
.next-page-h-font.disabled .b-font:before {
content: "\e602";
color: inherit;
@ -129,11 +113,37 @@
content: "\e604";
color: inherit;
}
.search-font.native .b-font:before,
.search-font.disabled .b-font:before {
content: "\e604";
color: inherit;
}
.date-font .b-font {
*zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '&#xe61b;');
}
.date-font .b-font:before {
content: "\e61b";
color: inherit;
}
.date-font.disabled .b-font:before {
content: "\e61b";
color: inherit;
}
.date-change-h-font .b-font {
*zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '&#xe660;');
}
.date-change-h-font .b-font:before {
content: "\e660";
color: inherit;
}
.date-change-h-font:hover .b-font:before,
.date-change-h-font.hover .b-font:before {
content: "\e660";
color: inherit;
}
.date-change-h-font.disabled .b-font:before {
content: "\e660";
color: inherit;
}
.dot-font .b-font {
*zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '&#xe606;');
}
@ -141,7 +151,6 @@
content: "\e606";
color: #1a1a1a;
}
.dot-font.native .b-font:before,
.dot-font.disabled .b-font:before {
content: "\e606";
color: #1a1a1a;
@ -154,12 +163,10 @@
color: #1a1a1a;
}
.dot-h-font:hover .b-font:before,
.dot-h-font:focus .b-font:before,
.dot-h-font.hover .b-font:before {
content: "\e606";
color: inherit;
}
.dot-h-font.native .b-font:before,
.dot-h-font.disabled .b-font:before {
content: "\e606";
color: #1a1a1a;
@ -172,7 +179,6 @@
color: #ffffff;
}
.dot-ha-font:hover .b-font:before,
.dot-ha-font:focus .b-font:before,
.dot-ha-font.hover .b-font:before {
content: "\e606";
color: #999999;
@ -182,7 +188,6 @@
content: "\e606";
color: #1a1a1a;
}
.dot-ha-font.native .b-font:before,
.dot-ha-font.disabled .b-font:before {
content: "\e606";
color: #ffffff;
@ -195,7 +200,6 @@
color: #ffffff;
}
.dot-e-font:hover .b-font:before,
.dot-e-font:focus .b-font:before,
.dot-e-font.hover .b-font:before {
content: "\e606";
color: #999999;
@ -206,9 +210,8 @@
}
.dot-e-font:active .b-font:before {
content: "\e606";
color: #3f8ce8;
color: #3685f2;
}
.dot-e-font.native .b-font:before,
.dot-e-font.disabled .b-font:before {
content: "\e606";
color: #ffffff;
@ -220,7 +223,6 @@
content: "\e607";
color: inherit;
}
.pull-right-font.native .b-font:before,
.pull-right-font.disabled .b-font:before {
content: "\e607";
color: inherit;
@ -233,12 +235,10 @@
color: inherit;
}
.pull-right-h-font:hover .b-font:before,
.pull-right-h-font:focus .b-font:before,
.pull-right-h-font.hover .b-font:before {
content: "\e607";
color: inherit;
}
.pull-right-h-font.native .b-font:before,
.pull-right-h-font.disabled .b-font:before {
content: "\e607";
color: inherit;
@ -251,7 +251,6 @@
color: inherit;
}
.pull-right-ha-font:hover .b-font:before,
.pull-right-ha-font:focus .b-font:before,
.pull-right-ha-font.hover .b-font:before {
content: "\e607";
color: inherit;
@ -261,7 +260,6 @@
content: "\e607";
color: #3f8ce8;
}
.pull-right-ha-font.native .b-font:before,
.pull-right-ha-font.disabled .b-font:before {
content: "\e607";
color: inherit;
@ -274,7 +272,6 @@
color: inherit;
}
.pull-right-e-font:hover .b-font:before,
.pull-right-e-font:focus .b-font:before,
.pull-right-e-font.hover .b-font:before {
content: "\e607";
color: inherit;
@ -287,7 +284,6 @@
content: "\e607";
color: #3f8ce8;
}
.pull-right-e-font.native .b-font:before,
.pull-right-e-font.disabled .b-font:before {
content: "\e607";
color: inherit;
@ -299,7 +295,6 @@
content: "\e610";
color: inherit;
}
.copy-font.native .b-font:before,
.copy-font.disabled .b-font:before {
content: "\e610";
color: inherit;
@ -312,12 +307,10 @@
color: #1a1a1a;
}
.copy-h-font:hover .b-font:before,
.copy-h-font:focus .b-font:before,
.copy-h-font.hover .b-font:before {
content: "\e610";
color: inherit;
}
.copy-h-font.native .b-font:before,
.copy-h-font.disabled .b-font:before {
content: "\e610";
color: #1a1a1a;
@ -330,7 +323,6 @@
color: inherit;
}
.copy-ha-font:hover .b-font:before,
.copy-ha-font:focus .b-font:before,
.copy-ha-font.hover .b-font:before {
content: "\e610";
color: inherit;
@ -340,7 +332,6 @@
content: "\e610";
color: #3f8ce8;
}
.copy-ha-font.native .b-font:before,
.copy-ha-font.disabled .b-font:before {
content: "\e610";
color: inherit;
@ -353,7 +344,6 @@
color: inherit;
}
.copy-e-font:hover .b-font:before,
.copy-e-font:focus .b-font:before,
.copy-e-font.hover .b-font:before {
content: "\e610";
color: inherit;
@ -366,7 +356,6 @@
content: "\e610";
color: #3f8ce8;
}
.copy-e-font.native .b-font:before,
.copy-e-font.disabled .b-font:before {
content: "\e610";
color: inherit;
@ -378,7 +367,6 @@
content: "\e611";
color: inherit;
}
.check-mark-font.native .b-font:before,
.check-mark-font.disabled .b-font:before {
content: "\e611";
color: inherit;
@ -391,12 +379,10 @@
color: inherit;
}
.check-mark-h-font:hover .b-font:before,
.check-mark-h-font:focus .b-font:before,
.check-mark-h-font.hover .b-font:before {
content: "\e611";
color: inherit;
}
.check-mark-h-font.native .b-font:before,
.check-mark-h-font.disabled .b-font:before {
content: "\e611";
color: inherit;
@ -409,7 +395,6 @@
color: inherit;
}
.check-mark-ha-font:hover .b-font:before,
.check-mark-ha-font:focus .b-font:before,
.check-mark-ha-font.hover .b-font:before {
content: "\e611";
color: inherit;
@ -419,7 +404,6 @@
content: "\e611";
color: #3f8ce8;
}
.check-mark-ha-font.native .b-font:before,
.check-mark-ha-font.disabled .b-font:before {
content: "\e611";
color: inherit;
@ -432,7 +416,6 @@
color: inherit;
}
.check-mark-e-font:hover .b-font:before,
.check-mark-e-font:focus .b-font:before,
.check-mark-e-font.hover .b-font:before {
content: "\e611";
color: inherit;
@ -445,7 +428,6 @@
content: "\e611";
color: #3f8ce8;
}
.check-mark-e-font.native .b-font:before,
.check-mark-e-font.disabled .b-font:before {
content: "\e611";
color: inherit;
@ -458,7 +440,6 @@
content: "\e608";
color: inherit;
}
.tree-node-triangle-expand-font.native .b-font:before,
.tree-node-triangle-expand-font.disabled .b-font:before {
content: "\e608";
color: inherit;
@ -470,7 +451,6 @@
content: "\e607";
color: inherit;
}
.tree-node-triangle-collapse-font.native .b-font:before,
.tree-node-triangle-collapse-font.disabled .b-font:before {
content: "\e607";
color: inherit;
@ -483,12 +463,10 @@
color: inherit;
}
.row-pre-page-h-font:hover .b-font:before,
.row-pre-page-h-font:focus .b-font:before,
.row-pre-page-h-font.hover .b-font:before {
content: "\e6be";
color: inherit;
}
.row-pre-page-h-font.native .b-font:before,
.row-pre-page-h-font.disabled .b-font:before {
content: "\e6be";
color: inherit;
@ -501,12 +479,10 @@
color: inherit;
}
.row-next-page-h-font:hover .b-font:before,
.row-next-page-h-font:focus .b-font:before,
.row-next-page-h-font.hover .b-font:before {
content: "\e6bd";
color: inherit;
}
.row-next-page-h-font.native .b-font:before,
.row-next-page-h-font.disabled .b-font:before {
content: "\e6bd";
color: inherit;
@ -519,12 +495,10 @@
color: inherit;
}
.column-pre-page-h-font:hover .b-font:before,
.column-pre-page-h-font:focus .b-font:before,
.column-pre-page-h-font.hover .b-font:before {
content: "\e6bc";
color: inherit;
}
.column-pre-page-h-font.native .b-font:before,
.column-pre-page-h-font.disabled .b-font:before {
content: "\e6bc";
color: inherit;
@ -537,12 +511,10 @@
color: inherit;
}
.column-next-page-h-font:hover .b-font:before,
.column-next-page-h-font:focus .b-font:before,
.column-next-page-h-font.hover .b-font:before {
content: "\e6bb";
color: inherit;
}
.column-next-page-h-font.native .b-font:before,
.column-next-page-h-font.disabled .b-font:before {
content: "\e6bb";
color: inherit;
@ -555,7 +527,6 @@
color: #999999;
}
.trigger-triangle-font:hover .b-font:before,
.trigger-triangle-font:focus .b-font:before,
.trigger-triangle-font.hover .b-font:before {
content: "\e66a";
color: #999999;
@ -563,9 +534,8 @@
.trigger-triangle-font:active .b-font:before,
.trigger-triangle-font.active .b-font:before {
content: "\e66a";
color: #3f8ce8;
color: #3685f2;
}
.trigger-triangle-font.native .b-font:before,
.trigger-triangle-font.disabled .b-font:before {
content: "\e66a";
color: #999999;
@ -577,7 +547,6 @@
content: "\e608";
color: inherit;
}
.pull-down-font.native .b-font:before,
.pull-down-font.disabled .b-font:before {
content: "\e608";
color: inherit;
@ -590,12 +559,10 @@
color: inherit;
}
.pull-down-h-font:hover .b-font:before,
.pull-down-h-font:focus .b-font:before,
.pull-down-h-font.hover .b-font:before {
content: "\e608";
color: inherit;
}
.pull-down-h-font.native .b-font:before,
.pull-down-h-font.disabled .b-font:before {
content: "\e608";
color: inherit;
@ -608,7 +575,6 @@
color: inherit;
}
.pull-down-ha-font:hover .b-font:before,
.pull-down-ha-font:focus .b-font:before,
.pull-down-ha-font.hover .b-font:before {
content: "\e608";
color: inherit;
@ -618,7 +584,6 @@
content: "\e608";
color: #3f8ce8;
}
.pull-down-ha-font.native .b-font:before,
.pull-down-ha-font.disabled .b-font:before {
content: "\e608";
color: inherit;
@ -628,12 +593,11 @@
}
.check-font .b-font:before {
content: "\e611";
color: #3f8ce8;
color: #3685f2;
}
.check-font.native .b-font:before,
.check-font.disabled .b-font:before {
content: "\e611";
color: #3f8ce8;
color: #3685f2;
}
.item-check-font .b-font {
*zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '&#xe611;');
@ -643,7 +607,6 @@
color: #ffffff;
}
.item-check-font:hover .b-font:before,
.item-check-font:focus .b-font:before,
.item-check-font.hover .b-font:before {
content: "\e611";
color: #999999;
@ -653,7 +616,6 @@
content: "\e611";
color: #3f8ce8;
}
.item-check-font.native .b-font:before,
.item-check-font.disabled .b-font:before {
content: "\e611";
color: #ffffff;
@ -666,12 +628,10 @@
color: inherit;
}
.primary-key-font:hover .b-font:before,
.primary-key-font:focus .b-font:before,
.primary-key-font.hover .b-font:before {
content: "\e67d;";
color: inherit;
}
.primary-key-font.native .b-font:before,
.primary-key-font.disabled .b-font:before {
content: "\e67d;";
color: inherit;
@ -681,12 +641,11 @@
}
.drag-tag-font .b-font:before {
content: "\e600";
color: #f07d0a;
color: #faaa39;
}
.drag-tag-font.native .b-font:before,
.drag-tag-font.disabled .b-font:before {
content: "\e600";
color: #f07d0a;
color: #faaa39;
}
.less-font .b-font {
*zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '&#xe633;');
@ -696,7 +655,6 @@
color: inherit;
}
.less-font:hover .b-font:before,
.less-font:focus .b-font:before,
.less-font.hover .b-font:before {
content: "\e633";
color: inherit;
@ -706,7 +664,6 @@
content: "\e633";
color: #3f8ce8;
}
.less-font.native .b-font:before,
.less-font.disabled .b-font:before {
content: "\e633";
color: inherit;
@ -719,7 +676,6 @@
color: inherit;
}
.less-equal-font:hover .b-font:before,
.less-equal-font:focus .b-font:before,
.less-equal-font.hover .b-font:before {
content: "\e636";
color: inherit;
@ -729,7 +685,6 @@
content: "\e636";
color: #3f8ce8;
}
.less-equal-font.native .b-font:before,
.less-equal-font.disabled .b-font:before {
content: "\e636";
color: inherit;
@ -741,7 +696,6 @@
content: "\e64d";
color: inherit;
}
.text-bold-font.native .b-font:before,
.text-bold-font.disabled .b-font:before {
content: "\e64d";
color: inherit;
@ -753,7 +707,6 @@
content: "\e656";
color: inherit;
}
.text-italic-font.native .b-font:before,
.text-italic-font.disabled .b-font:before {
content: "\e656";
color: inherit;
@ -765,7 +718,6 @@
content: "\e650";
color: inherit;
}
.text-underline-font.native .b-font:before,
.text-underline-font.disabled .b-font:before {
content: "\e650";
color: inherit;
@ -777,7 +729,6 @@
content: "\e69c";
color: inherit;
}
.text-color-font.native .b-font:before,
.text-color-font.disabled .b-font:before {
content: "\e69c";
color: inherit;
@ -789,7 +740,6 @@
content: "\e696";
color: inherit;
}
.text-background-font.native .b-font:before,
.text-background-font.disabled .b-font:before {
content: "\e696";
color: inherit;
@ -801,7 +751,6 @@
content: "\e69d";
color: inherit;
}
.text-color-underline-font.native .b-font:before,
.text-color-underline-font.disabled .b-font:before {
content: "\e69d";
color: inherit;
@ -813,7 +762,6 @@
content: "\e654";
color: inherit;
}
.text-align-left-font.native .b-font:before,
.text-align-left-font.disabled .b-font:before {
content: "\e654";
color: inherit;
@ -825,7 +773,6 @@
content: "\e64f";
color: inherit;
}
.text-align-center-font.native .b-font:before,
.text-align-center-font.disabled .b-font:before {
content: "\e64f";
color: inherit;
@ -837,7 +784,6 @@
content: "\e651";
color: inherit;
}
.text-align-right-font.native .b-font:before,
.text-align-right-font.disabled .b-font:before {
content: "\e651";
color: inherit;

800
public/css/icon.css

File diff suppressed because it is too large Load Diff

0
public/css/var.css

1
public/less/var.less

@ -1,3 +1,4 @@
@webUrl: 'https://fanruan.coding.me/fineui/dist/';
@fontUrl: '@{webUrl}font/'; //图片的基本地址
@imageUrl: '@{webUrl}images/1x/'; //图片的基本地址
@image2xUrl: '@{webUrl}images/2x/'; //2倍图片的基本地址

8
src/addons/chart/chart.combine.js

@ -14,7 +14,7 @@ BI.CombineChart = BI.inherit(BI.Widget, {
types: [[], []],
popupItemsGetter: BI.emptyFn,
formatConfig: BI.emptyFn
})
});
},
_init: function () {
@ -44,7 +44,7 @@ BI.CombineChart = BI.inherit(BI.Widget, {
if (BI.isArray(axisItems)) {
result = BI.concat(result, axisItems);
} else {
result.push(BI.extend(axisItems, {"yAxis": yAxisIndex}));
result.push(BI.extend(axisItems, {yAxis: yAxisIndex}));
}
});
if (BI.isNotEmptyArray(combineItems)) {
@ -93,7 +93,7 @@ BI.CombineChart = BI.inherit(BI.Widget, {
},
hgap: 10
}, item)
}
};
})
})
},
@ -153,4 +153,4 @@ BI.CombineChart = BI.inherit(BI.Widget, {
});
BI.CombineChart.EVENT_CHANGE = "EVENT_CHANGE";
BI.CombineChart.EVENT_ITEM_CLICK = "EVENT_ITEM_CLICK";
BI.shortcut('bi.combine_chart', BI.CombineChart);
BI.shortcut("bi.combine_chart", BI.CombineChart);

6
src/addons/chart/chart.js

@ -8,7 +8,7 @@ BI.Chart = BI.inherit(BI.Pane, {
_defaultConfig: function () {
return BI.extend(BI.Chart.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-chart"
})
});
},
_init: function () {
@ -35,7 +35,7 @@ BI.Chart = BI.inherit(BI.Pane, {
},
magnify: function () {
this.vanCharts.refreshRestore()
this.vanCharts.refreshRestore();
},
populate: function (items, options) {
@ -52,4 +52,4 @@ BI.Chart = BI.inherit(BI.Pane, {
}
});
BI.Chart.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut('bi.chart', BI.Chart);
BI.shortcut("bi.chart", BI.Chart);

50
src/addons/chart/chart/chart.abstract.js

@ -41,9 +41,9 @@ BI.AbstractChart = BI.inherit(BI.Widget, {
LINE_WIDTH: 1,
NUM_SEPARATORS: false,
FONT_STYLE: {
"fontFamily": "inherit",
"color": "inherit",
"fontSize": "12px"
fontFamily: "inherit",
color: "inherit",
fontSize: "12px"
}
},
@ -51,7 +51,7 @@ BI.AbstractChart = BI.inherit(BI.Widget, {
return BI.extend(BI.AbstractChart.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-abstract-chart",
popupItemsGetter: BI.emptyFn
})
});
},
_init: function () {
@ -101,12 +101,12 @@ BI.AbstractChart = BI.inherit(BI.Widget, {
da.x = BI.contentFormat(BI.parseFloat(da.x.div(magnify).toFixed(4)), "#.####;-#.####");
}
});
})
});
},
formatXYDataWithMagnify: function (number, magnify) {
if (BI.isNull(number)) {
return null
return null;
}
if (!BI.isNumber(number)) {
number = BI.parseFloat(number);
@ -173,46 +173,46 @@ BI.AbstractChart = BI.inherit(BI.Widget, {
},
formatTickInXYaxis: function (type, number_level, separators, isCompareBar) {
var formatter = '#.##';
var formatter = "#.##";
switch (type) {
case this.constants.NORMAL:
formatter = '#.##';
formatter = "#.##";
if (separators) {
formatter = '#,###.##'
formatter = "#,###.##";
}
break;
case this.constants.ZERO2POINT:
formatter = '#0';
formatter = "#0";
if (separators) {
formatter = '#,###';
formatter = "#,###";
}
break;
case this.constants.ONE2POINT:
formatter = '#0.0';
formatter = "#0.0";
if (separators) {
formatter = '#,###.0';
formatter = "#,###.0";
}
break;
case this.constants.TWO2POINT:
formatter = '#0.00';
formatter = "#0.00";
if (separators) {
formatter = '#,###.00';
formatter = "#,###.00";
}
break;
}
if (number_level === BICst.TARGET_STYLE.NUM_LEVEL.PERCENT) {
formatter += '%';
formatter += "%";
}
formatter += ";-" + formatter;
if(isCompareBar) {
return function () {
arguments[0] = arguments[0] > 0 ? arguments[0] : (-1) * arguments[0];
return BI.contentFormat(arguments[0], formatter);
}
};
}
return function () {
return BI.contentFormat(arguments[0], formatter)
}
return BI.contentFormat(arguments[0], formatter);
};
},
formatDataLabel: function (state, items, config, style) {
@ -220,8 +220,8 @@ BI.AbstractChart = BI.inherit(BI.Widget, {
if (state === true) {
BI.each(items, function (idx, item) {
item.dataLabels = {
"align": "outside",
"autoAdjust": true,
align: "outside",
autoAdjust: true,
style: style,
enabled: true,
formatter: {
@ -238,13 +238,13 @@ BI.AbstractChart = BI.inherit(BI.Widget, {
if (state === true) {
BI.each(items, function (idx, item) {
item.dataLabels = {
"align": "outside",
"autoAdjust": true,
align: "outside",
autoAdjust: true,
style: style,
enabled: true,
formatter: {
identifier: "${VALUE}",
valueFormat: format,
valueFormat: format
}
};
if(isPercentChart) {
@ -265,7 +265,7 @@ BI.AbstractChart = BI.inherit(BI.Widget, {
BI.each(config.yAxis, function (idx, axis) {
axis.labelStyle = fontStyle;
axis.title.style = fontStyle;
})
});
},
_formatItems: function (items) {

22
src/addons/chart/chart/chart.accumulatearea.js

@ -8,7 +8,7 @@ BI.AccumulateAreaChart = BI.inherit(BI.AbstractChart, {
_defaultConfig: function () {
return BI.extend(BI.AccumulateAreaChart.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-accumulate-area-chart"
})
});
},
_init: function () {
@ -35,7 +35,7 @@ BI.AccumulateAreaChart = BI.inherit(BI.AbstractChart, {
self.fireEvent(BI.AccumulateAreaChart.EVENT_CHANGE, obj);
});
this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) {
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj)
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj);
});
},
@ -102,7 +102,7 @@ BI.AccumulateAreaChart = BI.inherit(BI.AbstractChart, {
enableTick: this.config.enableTick,
labelRotation: this.config.textDirection,
gridLineWidth: this.config.showGridLine === true ? 1 : 0,
maxHeight: '40%'
maxHeight: "40%"
});
config.chartType = "area";
@ -152,9 +152,9 @@ BI.AccumulateAreaChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style" : self.config.chartFont,
"text": t.text,
"align": "top"
style: self.config.chartFont,
text: t.text,
align: "top"
}
});
});
@ -177,14 +177,14 @@ BI.AccumulateAreaChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style" : self.config.chartFont,
"text": t.text,
"align": "left"
style: self.config.chartFont,
text: t.text,
align: "left"
}
});
});
}
})
});
}
},
@ -274,4 +274,4 @@ BI.AccumulateAreaChart = BI.inherit(BI.AbstractChart, {
}
});
BI.AccumulateAreaChart.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut('bi.accumulate_area_chart', BI.AccumulateAreaChart);
BI.shortcut("bi.accumulate_area_chart", BI.AccumulateAreaChart);

28
src/addons/chart/chart/chart.accumulateaxis.js

@ -8,7 +8,7 @@ BI.AccumulateAxisChart = BI.inherit(BI.AbstractChart, {
_defaultConfig: function () {
return BI.extend(BI.AccumulateAxisChart.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-accumulate-axis-chart"
})
});
},
_init: function () {
@ -33,7 +33,7 @@ BI.AccumulateAxisChart = BI.inherit(BI.AbstractChart, {
self.fireEvent(BI.AccumulateAxisChart.EVENT_CHANGE, obj);
});
this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) {
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj)
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj);
});
},
@ -93,7 +93,7 @@ BI.AccumulateAxisChart = BI.inherit(BI.AbstractChart, {
enableTick: self.config.enableTick,
labelRotation: this.config.textDirection,
gridLineWidth: this.config.showGridLine === true ? 1 : 0,
maxHeight: '40%'
maxHeight: "40%"
});
config.chartType = "column";
@ -115,9 +115,9 @@ BI.AccumulateAxisChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style" : self.config.chartFont,
"text": t.text,
"align": "top"
style: self.config.chartFont,
text: t.text,
align: "top"
}
});
});
@ -140,14 +140,14 @@ BI.AccumulateAxisChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style" : self.config.chartFont,
"text": t.text,
"align": "left"
style: self.config.chartFont,
text: t.text,
align: "left"
}
});
});
}
})
});
}
function formatChartStyle () {
@ -178,13 +178,13 @@ BI.AccumulateAxisChart = BI.inherit(BI.AbstractChart, {
break;
}
if (position === self.constants.X_AXIS) {
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit)
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit);
}
if (position === self.constants.LEFT_AXIS) {
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit)
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit);
}
if (position === self.constants.RIGHT_AXIS) {
self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit)
self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit);
}
unit = unit === "" ? unit : "(" + unit + ")";
@ -277,4 +277,4 @@ BI.AccumulateAxisChart = BI.inherit(BI.AbstractChart, {
}
});
BI.AccumulateAxisChart.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut('bi.accumulate_axis_chart', BI.AccumulateAxisChart);
BI.shortcut("bi.accumulate_axis_chart", BI.AccumulateAxisChart);

32
src/addons/chart/chart/chart.accumulatebar.js

@ -8,7 +8,7 @@ BI.AccumulateBarChart = BI.inherit(BI.AbstractChart, {
_defaultConfig: function () {
return BI.extend(BI.AccumulateBarChart.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-accumulate-bar-chart"
})
});
},
_init: function () {
@ -21,7 +21,7 @@ BI.AccumulateBarChart = BI.inherit(BI.AbstractChart, {
},
labelStyle: this.constants.FONT_STYLE,
formatter: function () {
return this > 0 ? this : (-1) * this
return this > 0 ? this : (-1) * this;
},
gridLineWidth: 0
}];
@ -45,7 +45,7 @@ BI.AccumulateBarChart = BI.inherit(BI.AbstractChart, {
self.fireEvent(BI.AccumulateBarChart.EVENT_CHANGE, obj);
});
this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) {
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj)
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj);
});
},
@ -67,7 +67,7 @@ BI.AccumulateBarChart = BI.inherit(BI.AbstractChart, {
labelRotation: this.config.textDirection,
lineWidth: this.config.lineWidth,
enableTick: this.config.enableTick,
maxWidth: '40%'
maxWidth: "40%"
});
self.formatNumberLevelInXaxis(items, this.config.leftYAxisNumberLevel);
@ -111,9 +111,9 @@ BI.AccumulateBarChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style" : self.config.chartFont,
"text": t.text,
"align": "top"
style: self.config.chartFont,
text: t.text,
align: "top"
}
});
});
@ -136,14 +136,14 @@ BI.AccumulateBarChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style" : self.config.chartFont,
"text": t.text,
"align": "left"
style: self.config.chartFont,
text: t.text,
align: "left"
}
});
});
}
})
});
}
function getXYAxisUnit (numberLevelType, position) {
@ -163,13 +163,13 @@ BI.AccumulateBarChart = BI.inherit(BI.AbstractChart, {
break;
}
if (position === self.constants.X_AXIS) {
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit)
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit);
}
if (position === self.constants.LEFT_AXIS) {
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit)
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit);
}
if (position === self.constants.RIGHT_AXIS) {
self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit)
self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit);
}
return unit === "" ? unit : "(" + unit + ")";
}
@ -184,7 +184,7 @@ BI.AccumulateBarChart = BI.inherit(BI.AbstractChart, {
var tmp = t.x;
t.x = t.y;
t.y = tmp;
})
});
});
});
return items;
@ -243,4 +243,4 @@ BI.AccumulateBarChart = BI.inherit(BI.AbstractChart, {
}
});
BI.AccumulateBarChart.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut('bi.accumulate_bar_chart', BI.AccumulateBarChart);
BI.shortcut("bi.accumulate_bar_chart", BI.AccumulateBarChart);

16
src/addons/chart/chart/chart.accumulateradar.js

@ -8,7 +8,7 @@ BI.AccumulateRadarChart = BI.inherit(BI.AbstractChart, {
_defaultConfig: function () {
return BI.extend(BI.AccumulateRadarChart.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-accumulate-radar-chart"
})
});
},
_init: function () {
@ -21,7 +21,7 @@ BI.AccumulateRadarChart = BI.inherit(BI.AbstractChart, {
},
labelStyle: this.constants.FONT_STYLE,
formatter: function () {
return this > 0 ? this : (-1) * this
return this > 0 ? this : (-1) * this;
},
gridLineWidth: 0,
position: "bottom"
@ -45,7 +45,7 @@ BI.AccumulateRadarChart = BI.inherit(BI.AbstractChart, {
self.fireEvent(BI.AccumulateRadarChart.EVENT_CHANGE, obj);
});
this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) {
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj)
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj);
});
},
@ -119,7 +119,7 @@ BI.AccumulateRadarChart = BI.inherit(BI.AbstractChart, {
if (position === item.yAxis) {
da.y = self.formatXYDataWithMagnify(da.y, magnify);
}
})
});
});
config.plotOptions.tooltip.formatter.valueFormat = formatter;
}
@ -141,13 +141,13 @@ BI.AccumulateRadarChart = BI.inherit(BI.AbstractChart, {
break;
}
if (position === self.constants.X_AXIS) {
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit)
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit);
}
if (position === self.constants.LEFT_AXIS) {
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit)
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit);
}
if (position === self.constants.RIGHT_AXIS) {
self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit)
self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit);
}
return unit === "" ? unit : "(" + unit + ")";
}
@ -191,4 +191,4 @@ BI.AccumulateRadarChart = BI.inherit(BI.AbstractChart, {
}
});
BI.AccumulateRadarChart.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut('bi.accumulate_radar_chart', BI.AccumulateRadarChart);
BI.shortcut("bi.accumulate_radar_chart", BI.AccumulateRadarChart);

28
src/addons/chart/chart/chart.area.js

@ -8,7 +8,7 @@ BI.AreaChart = BI.inherit(BI.AbstractChart, {
_defaultConfig: function () {
return BI.extend(BI.AreaChart.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-area-chart"
})
});
},
_init: function () {
@ -34,7 +34,7 @@ BI.AreaChart = BI.inherit(BI.AbstractChart, {
self.fireEvent(BI.AreaChart.EVENT_CHANGE, obj);
});
this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) {
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj)
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj);
});
},
@ -99,7 +99,7 @@ BI.AreaChart = BI.inherit(BI.AbstractChart, {
enableTick: this.config.enableTick,
labelRotation: this.config.textDirection,
gridLineWidth: this.config.showGridLine === true ? 1 : 0,
maxHeight: '40%'
maxHeight: "40%"
});
config.chartType = "area";
@ -131,9 +131,9 @@ BI.AreaChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style" : self.config.chartFont,
"text": t.text,
"align": "top"
style: self.config.chartFont,
text: t.text,
align: "top"
}
});
});
@ -156,14 +156,14 @@ BI.AreaChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style" : self.config.chartFont,
"text": t.text,
"align": "left"
style: self.config.chartFont,
text: t.text,
align: "left"
}
});
});
}
})
});
}
function formatChartLineStyle () {
@ -201,13 +201,13 @@ BI.AreaChart = BI.inherit(BI.AbstractChart, {
break;
}
if (position === self.constants.X_AXIS) {
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit)
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit);
}
if (position === self.constants.LEFT_AXIS) {
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit)
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit);
}
if (position === self.constants.RIGHT_AXIS) {
self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit)
self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit);
}
return unit === "" ? unit : "(" + unit + ")";
}
@ -299,4 +299,4 @@ BI.AreaChart = BI.inherit(BI.AbstractChart, {
}
});
BI.AreaChart.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut('bi.area_chart', BI.AreaChart);
BI.shortcut("bi.area_chart", BI.AreaChart);

28
src/addons/chart/chart/chart.axis.js

@ -11,7 +11,7 @@ BI.AxisChart = BI.inherit(BI.AbstractChart, {
_defaultConfig: function () {
return BI.extend(BI.AxisChart.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-axis-chart"
})
});
},
_init: function () {
@ -37,7 +37,7 @@ BI.AxisChart = BI.inherit(BI.AbstractChart, {
self.fireEvent(BI.AxisChart.EVENT_CHANGE, obj);
});
this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) {
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj)
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj);
});
},
@ -102,7 +102,7 @@ BI.AxisChart = BI.inherit(BI.AbstractChart, {
labelRotation: this.config.textDirection,
enableMinorTick: this.config.enableMinorTick,
gridLineWidth: this.config.showGridLine === true ? 1 : 0,
maxHeight: '40%'
maxHeight: "40%"
});
var lineItem = [];
@ -142,9 +142,9 @@ BI.AxisChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style" : self.config.chartFont,
"text": t.text,
"align": "top"
style: self.config.chartFont,
text: t.text,
align: "top"
}
});
});
@ -164,14 +164,14 @@ BI.AxisChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style" : self.config.chartFont,
"text": t.text,
"align": "left"
style: self.config.chartFont,
text: t.text,
align: "left"
}
});
});
}
})
});
}
function getXYAxisUnit (numberLevelType, position) {
@ -191,13 +191,13 @@ BI.AxisChart = BI.inherit(BI.AbstractChart, {
break;
}
if (position === self.constants.X_AXIS) {
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit)
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit);
}
if (position === self.constants.LEFT_AXIS) {
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit)
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit);
}
if (position === self.constants.RIGHT_AXIS) {
self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit)
self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit);
}
return unit === "" ? unit : "(" + unit + ")";
}
@ -273,4 +273,4 @@ BI.AxisChart = BI.inherit(BI.AbstractChart, {
}
});
BI.AxisChart.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut('bi.axis_chart', BI.AxisChart);
BI.shortcut("bi.axis_chart", BI.AxisChart);

30
src/addons/chart/chart/chart.bar.js

@ -8,7 +8,7 @@ BI.BarChart = BI.inherit(BI.AbstractChart, {
_defaultConfig: function () {
return BI.extend(BI.BarChart.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-bar-chart"
})
});
},
_init: function () {
@ -21,7 +21,7 @@ BI.BarChart = BI.inherit(BI.AbstractChart, {
},
labelStyle: this.constants.FONT_STYLE,
formatter: function () {
return this > 0 ? this : (-1) * this
return this > 0 ? this : (-1) * this;
},
gridLineWidth: 0
}];
@ -48,7 +48,7 @@ BI.BarChart = BI.inherit(BI.AbstractChart, {
self.fireEvent(BI.BarChart.EVENT_CHANGE, obj);
});
this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) {
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj)
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj);
});
},
@ -69,7 +69,7 @@ BI.BarChart = BI.inherit(BI.AbstractChart, {
labelRotation: this.config.textDirection,
enableTick: this.config.enableTick,
lineWidth: this.config.lineWidth,
maxWidth: '40%'
maxWidth: "40%"
});
// 值轴
@ -114,9 +114,9 @@ BI.BarChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style" : self.config.chartFont,
"text": t.text,
"align": "top"
style: self.config.chartFont,
text: t.text,
align: "top"
}
});
});
@ -136,14 +136,14 @@ BI.BarChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style" : self.config.chartFont,
"text": t.text,
"align": "left"
style: self.config.chartFont,
text: t.text,
align: "left"
}
});
});
}
})
});
}
function getXAxisTitle (numberLevelType, position) {
@ -163,10 +163,10 @@ BI.BarChart = BI.inherit(BI.AbstractChart, {
break;
}
if (position === self.constants.X_AXIS) {
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit)
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit);
}
if (position === self.constants.LEFT_AXIS) {
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit)
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit);
}
unit = unit === "" ? unit : "(" + unit + ")";
@ -181,7 +181,7 @@ BI.BarChart = BI.inherit(BI.AbstractChart, {
var tmp = t.x;
t.x = t.y;
t.y = tmp;
})
});
});
});
return items;
@ -238,4 +238,4 @@ BI.BarChart = BI.inherit(BI.AbstractChart, {
}
});
BI.BarChart.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut('bi.bar_chart', BI.BarChart);
BI.shortcut("bi.bar_chart", BI.BarChart);

63
src/addons/chart/chart/chart.bubble.js

@ -8,7 +8,7 @@ BI.BubbleChart = BI.inherit(BI.AbstractChart, {
_defaultConfig: function () {
return BI.extend(BI.BubbleChart.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-bubble-chart"
})
});
},
_init: function () {
@ -43,7 +43,7 @@ BI.BubbleChart = BI.inherit(BI.AbstractChart, {
self.fireEvent(BI.BubbleChart.EVENT_CHANGE, obj);
});
this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) {
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj)
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj);
});
},
@ -66,7 +66,7 @@ BI.BubbleChart = BI.inherit(BI.AbstractChart, {
config.yAxis[0].gridLineWidth = this.config.showGridLine === true ? 1 : 0;
config.yAxis[0].lineWidth = 1;
config.yAxis[0].title.rotation = this.constants.ROTATION;
config.yAxis[0].maxWidth = '40%';
config.yAxis[0].maxWidth = "40%";
config.xAxis[0].formatter = self.formatTickInXYaxis(this.config.xAxisStyle, this.config.xAxisNumberLevel, this.config.rightNumSeparators);
self.formatNumberLevelInXaxis(items, this.config.xAxisNumberLevel);
@ -74,20 +74,21 @@ BI.BubbleChart = BI.inherit(BI.AbstractChart, {
config.xAxis[0].title.text = this.config.showXAxisTitle === true ? this.config.xAxisTitle + config.xAxis[0].title.text : config.xAxis[0].title.text;
config.xAxis[0].title.align = "center";
config.xAxis[0].gridLineWidth = this.config.showGridLine === true ? 1 : 0;
config.xAxis[0].maxHeith = '40%';
config.xAxis[0].maxHeith = "40%";
config.chartType = "bubble";
if (BI.isNotEmptyArray(this.config.tooltip)) {
config.plotOptions.bubble.tooltip = {
useHtml: true,
style: {
color: 'RGB(184, 184, 184)'
color: "RGB(184, 184, 184)"
},
formatter: function () {
var y = self.formatTickInXYaxis(self.config.leftYAxisStyle, self.config.leftYAxisNumberLevel, self.config.numSeparators)(this.y);
var x = self.formatTickInXYaxis(self.config.xAxisStyle, self.config.xAxisNumberLevel, self.config.rightNumSeparators)(this.x);
return this.seriesName + '<div>(X)' + self.config.tooltip[0] + ':' + x + '</div><div>(Y)' + self.config.tooltip[1]
+ ':' + y + '</div><div>(' + BI.i18nText("BI-Size") + ')' + self.config.tooltip[2] + ':' + this.size + '</div>'}
return this.seriesName + "<div>(X)" + self.config.tooltip[0] + ":" + x + "</div><div>(Y)" + self.config.tooltip[1]
+ ":" + y + "</div><div>(" + BI.i18nText("BI-Size") + ")" + self.config.tooltip[2] + ":" + this.size + "</div>";
}
};
}
@ -95,20 +96,20 @@ BI.BubbleChart = BI.inherit(BI.AbstractChart, {
if (config.plotOptions.dataLabels.enabled === true) {
BI.each(items, function (idx, item) {
item.dataLabels = {
"style" : self.config.chartFont,
"align": "outside",
"autoAdjust": true,
style: self.config.chartFont,
align: "outside",
autoAdjust: true,
enabled: true,
formatter: {
identifier: "${X}${Y}${SIZE}",
"XFormat": function () {
return BI.contentFormat(arguments[0], '#.##;-#.##')
XFormat: function () {
return BI.contentFormat(arguments[0], "#.##;-#.##");
},
"YFormat": function () {
return BI.contentFormat(arguments[0], '#.##;-#.##')
YFormat: function () {
return BI.contentFormat(arguments[0], "#.##;-#.##");
},
"sizeFormat": function () {
return BI.contentFormat(arguments[0], '#.##;-#.##')
sizeFormat: function () {
return BI.contentFormat(arguments[0], "#.##;-#.##");
}
}
};
@ -143,9 +144,9 @@ BI.BubbleChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style" : self.config.chartFont,
"text": t.text,
"align": "top"
style: self.config.chartFont,
text: t.text,
align: "top"
}
});
});
@ -168,14 +169,14 @@ BI.BubbleChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style" : self.config.chartFont,
"text": t.text,
"align": "left"
style: self.config.chartFont,
text: t.text,
align: "left"
}
});
});
}
})
});
}
function formatNumberLevelInYaxis (type, position) {
@ -185,7 +186,7 @@ BI.BubbleChart = BI.inherit(BI.AbstractChart, {
if (position === item.yAxis) {
da.y = self.formatXYDataWithMagnify(da.y, magnify);
}
})
});
});
if (type === BICst.TARGET_STYLE.NUM_LEVEL.PERCENT) {
// config.plotOptions.tooltip.formatter.valueFormat = "function(){return window.FR ? FR.contentFormat(arguments[0], '#0%') : arguments[0]}";
@ -209,13 +210,13 @@ BI.BubbleChart = BI.inherit(BI.AbstractChart, {
break;
}
if (position === self.constants.X_AXIS) {
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit)
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit);
}
if (position === self.constants.LEFT_AXIS) {
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit)
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit);
}
if (position === self.constants.RIGHT_AXIS) {
self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit)
self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit);
}
return unit === "" ? unit : "(" + unit + ")";
}
@ -226,9 +227,9 @@ BI.BubbleChart = BI.inherit(BI.AbstractChart, {
BI.each(item, function (id, it) {
BI.each(it.data, function (i, da) {
var data = da.size;
da.size = BI.contentFormat(data, '#.##;-#.##')
})
})
da.size = BI.contentFormat(data, "#.##;-#.##");
});
});
});
return items;
},
@ -279,4 +280,4 @@ BI.BubbleChart = BI.inherit(BI.AbstractChart, {
}
});
BI.BubbleChart.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut('bi.bubble_chart', BI.BubbleChart);
BI.shortcut("bi.bubble_chart", BI.BubbleChart);

28
src/addons/chart/chart/chart.comparearea.js

@ -8,7 +8,7 @@ BI.CompareAreaChart = BI.inherit(BI.AbstractChart, {
_defaultConfig: function () {
return BI.extend(BI.CompareAreaChart.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-compare-area-chart"
})
});
},
_init: function () {
@ -34,7 +34,7 @@ BI.CompareAreaChart = BI.inherit(BI.AbstractChart, {
self.fireEvent(BI.CompareAreaChart.EVENT_CHANGE, obj);
});
this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) {
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj)
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj);
});
},
@ -103,7 +103,7 @@ BI.CompareAreaChart = BI.inherit(BI.AbstractChart, {
enableTick: this.config.enableTick,
labelRotation: this.config.textDirection,
gridLineWidth: this.config.showGridLine === true ? 1 : 0,
maxHeight: '40%'
maxHeight: "40%"
});
config.chartType = "area";
@ -165,9 +165,9 @@ BI.CompareAreaChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style": self.config.chartFont,
"text": t.text,
"align": "top"
style: self.config.chartFont,
text: t.text,
align: "top"
}
});
});
@ -190,14 +190,14 @@ BI.CompareAreaChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style": self.config.chartFont,
"text": t.text,
"align": "left"
style: self.config.chartFont,
text: t.text,
align: "left"
}
});
});
}
})
});
}
function formatChartLineStyle () {
@ -263,13 +263,13 @@ BI.CompareAreaChart = BI.inherit(BI.AbstractChart, {
break;
}
if (position === self.constants.X_AXIS) {
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit)
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit);
}
if (position === self.constants.LEFT_AXIS) {
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit)
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit);
}
if (position === self.constants.RIGHT_AXIS) {
self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit)
self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit);
}
return unit === "" ? unit : "(" + unit + ")";
}
@ -370,4 +370,4 @@ BI.CompareAreaChart = BI.inherit(BI.AbstractChart, {
}
});
BI.CompareAreaChart.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut('bi.compare_area_chart', BI.CompareAreaChart);
BI.shortcut("bi.compare_area_chart", BI.CompareAreaChart);

30
src/addons/chart/chart/chart.compareaxis.js

@ -8,7 +8,7 @@ BI.CompareAxisChart = BI.inherit(BI.AbstractChart, {
_defaultConfig: function () {
return BI.extend(BI.CompareAxisChart.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-compare-axis-chart"
})
});
},
_init: function () {
@ -43,7 +43,7 @@ BI.CompareAxisChart = BI.inherit(BI.AbstractChart, {
self.fireEvent(BI.CompareAxisChart.EVENT_CHANGE, obj);
});
this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) {
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj)
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj);
});
},
@ -65,7 +65,7 @@ BI.CompareAxisChart = BI.inherit(BI.AbstractChart, {
config.yAxis = this.yAxis;
BI.each(config.yAxis, function (idx, axis) {
var unit = '';
var unit = "";
switch (axis.axisIndex) {
case self.constants.LEFT_AXIS:
unit = getXYAxisUnit(self.config.leftYAxisNumberLevel, self.constants.LEFT_AXIS);
@ -112,7 +112,7 @@ BI.CompareAxisChart = BI.inherit(BI.AbstractChart, {
labelRotation: this.config.textDirection,
enableMinorTick: this.config.enableMinorTick,
gridLineWidth: this.config.showGridLine === true ? 1 : 0,
maxHeight: '40%'
maxHeight: "40%"
});
BI.extend(config.xAxis[1], {
@ -148,9 +148,9 @@ BI.CompareAxisChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style" : self.config.chartFont,
"text": t.text,
"align": "top"
style: self.config.chartFont,
text: t.text,
align: "top"
}
});
});
@ -173,14 +173,14 @@ BI.CompareAxisChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style" : self.config.chartFont,
"text": t.text,
"align": "left"
style: self.config.chartFont,
text: t.text,
align: "left"
}
});
});
}
})
});
}
function formatChartLineStyle () {
@ -240,13 +240,13 @@ BI.CompareAxisChart = BI.inherit(BI.AbstractChart, {
break;
}
if(position === self.constants.X_AXIS) {
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit)
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit);
}
if(position === self.constants.LEFT_AXIS) {
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit)
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit);
}
if(position === self.constants.RIGHT_AXIS) {
self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit)
self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit);
}
return unit === "" ? unit : "(" + unit + ")";
}
@ -378,4 +378,4 @@ BI.CompareAxisChart = BI.inherit(BI.AbstractChart, {
}
});
BI.CompareAxisChart.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut('bi.compare_axis_chart', BI.CompareAxisChart);
BI.shortcut("bi.compare_axis_chart", BI.CompareAxisChart);

30
src/addons/chart/chart/chart.comparebar.js

@ -8,7 +8,7 @@ BI.CompareBarChart = BI.inherit(BI.AbstractChart, {
_defaultConfig: function () {
return BI.extend(BI.CompareBarChart.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-compare-bar-chart"
})
});
},
_init: function () {
@ -45,7 +45,7 @@ BI.CompareBarChart = BI.inherit(BI.AbstractChart, {
self.fireEvent(BI.CompareBarChart.EVENT_CHANGE, obj);
});
this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) {
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj)
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj);
});
},
@ -67,7 +67,7 @@ BI.CompareBarChart = BI.inherit(BI.AbstractChart, {
lineWidth: this.config.lineWidth,
enableTick: this.config.enableTick,
labelRotation: this.config.textDirection,
maxWidth: '40%'
maxWidth: "40%"
});
self.formatNumberLevelInXaxis(items, this.config.leftYAxisNumberLevel);
@ -112,9 +112,9 @@ BI.CompareBarChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style" : self.config.chartFont,
"text": t.text,
"align": "top"
style: self.config.chartFont,
text: t.text,
align: "top"
}
});
});
@ -137,14 +137,14 @@ BI.CompareBarChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style" : self.config.chartFont,
"text": t.text,
"align": "left"
style: self.config.chartFont,
text: t.text,
align: "left"
}
});
});
}
})
});
}
function getXYAxisUnit (numberLevelType, position) {
@ -164,13 +164,13 @@ BI.CompareBarChart = BI.inherit(BI.AbstractChart, {
break;
}
if (position === self.constants.X_AXIS) {
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit)
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit);
}
if (position === self.constants.LEFT_AXIS) {
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit)
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit);
}
if (position === self.constants.RIGHT_AXIS) {
self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit)
self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit);
}
return unit === "" ? unit : "(" + unit + ")";
}
@ -190,7 +190,7 @@ BI.CompareBarChart = BI.inherit(BI.AbstractChart, {
}
});
it.stack = i;
})
});
});
BI.each(items, function (idx, item) {
result = BI.concat(result, item);
@ -250,4 +250,4 @@ BI.CompareBarChart = BI.inherit(BI.AbstractChart, {
}
});
BI.CompareBarChart.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut('bi.compare_bar_chart', BI.CompareBarChart);
BI.shortcut("bi.compare_bar_chart", BI.CompareBarChart);

74
src/addons/chart/chart/chart.dashboard.js

@ -9,18 +9,18 @@ BI.DashboardChart = BI.inherit(BI.AbstractChart, {
_defaultConfig: function () {
return BI.extend(BI.DashboardChart.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-dashboard-chart"
})
});
},
_init: function () {
BI.DashboardChart.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.gaugeAxis = [{
"minorTickColor": "rgb(226,226,226)",
"tickColor": "rgb(186,186,186)",
minorTickColor: "rgb(226,226,226)",
tickColor: "rgb(186,186,186)",
labelStyle: this.constants.FONT_STYLE,
"step": 0,
"showLabel": true
step: 0,
showLabel: true
}];
this.combineChart = BI.createWidget({
type: "bi.combine_chart",
@ -32,7 +32,7 @@ BI.DashboardChart = BI.inherit(BI.AbstractChart, {
self.fireEvent(BI.DashboardChart.EVENT_CHANGE, obj);
});
this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) {
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj)
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj);
});
},
@ -48,7 +48,7 @@ BI.DashboardChart = BI.inherit(BI.AbstractChart, {
if (isDashboard && !isMultiPointers) {
config.plotOptions.seriesLabel.enabled = false;
if(BI.isNull(items[0].data[0].z)) {
config.plotOptions.tooltip.formatter.identifier = "${SERIES}${X}${Y}${SIZE}${VALUE}"
config.plotOptions.tooltip.formatter.identifier = "${SERIES}${X}${Y}${SIZE}${VALUE}";
}
}
config.gaugeAxis[0].labelStyle = this.config.chartFont;
@ -66,29 +66,29 @@ BI.DashboardChart = BI.inherit(BI.AbstractChart, {
formatter: function () {
var value = this.value;
if (self.config.dashboardNumberLevel === BICst.TARGET_STYLE.NUM_LEVEL.PERCENT && self.config.numSeparators) {
value = BI.contentFormat(this.value, "#,##0%;-#,##0%")
value = BI.contentFormat(this.value, "#,##0%;-#,##0%");
} else if (self.config.dashboardNumberLevel === BICst.TARGET_STYLE.NUM_LEVEL.PERCENT && !self.config.numSeparators) {
value = BI.contentFormat(this.value, "#0.00%");
} else if (!(self.config.dashboardNumberLevel === BICst.TARGET_STYLE.NUM_LEVEL.PERCENT) && self.config.numSeparators) {
value = BI.contentFormat(this.value, "#,###.##;-#,###.##")
value = BI.contentFormat(this.value, "#,###.##;-#,###.##");
} else {
value = BI.contentFormat(this.value, "#.##;-#.##");
}
var label = '<div style="text-align: center">' + this.seriesName + '</div>' + '<div style="text-align: center">' + value +
getXYAxisUnit(self.config.dashboardNumberLevel, self.constants.DASHBOARD_AXIS) + '</div>';
var label = "<div style=\"text-align: center\">" + this.seriesName + "</div>" + "<div style=\"text-align: center\">" + value +
getXYAxisUnit(self.config.dashboardNumberLevel, self.constants.DASHBOARD_AXIS) + "</div>";
if (isDashboard && items[0].data.length > 1) {
if (isMultiPointers) {
return '<div style="text-align: center">' + this.seriesName + ':' + value +
getXYAxisUnit(self.config.dashboardNumberLevel, self.constants.DASHBOARD_AXIS) + '</div>';
return "<div style=\"text-align: center\">" + this.seriesName + ":" + value +
getXYAxisUnit(self.config.dashboardNumberLevel, self.constants.DASHBOARD_AXIS) + "</div>";
}
return label
return label;
} else if (isDashboard && BI.isNull(items[0].data[0].z)) {
return label
return label;
}
return '<div style="text-align: center">' + this.category + '</div>' + label;
return "<div style=\"text-align: center\">" + this.category + "</div>" + label;
},
style: self.config.chartFont,
useHtml: true
@ -132,9 +132,9 @@ BI.DashboardChart = BI.inherit(BI.AbstractChart, {
config.gaugeAxis[0].formatter = function () {
var scaleValue = this;
if (self.config.numSeparators) {
scaleValue = BI.contentFormat(scaleValue, '#,##0%;-#,##0%')
scaleValue = BI.contentFormat(scaleValue, "#,##0%;-#,##0%");
} else {
scaleValue = BI.contentFormat(scaleValue, '#0.00%')
scaleValue = BI.contentFormat(scaleValue, "#0.00%");
}
return scaleValue + getXYAxisUnit(self.config.dashboardNumberLevel, self.constants.DASHBOARD_AXIS);
};
@ -142,7 +142,7 @@ BI.DashboardChart = BI.inherit(BI.AbstractChart, {
config.gaugeAxis[0].formatter = function () {
var value = this;
if (self.config.numSeparators) {
value = BI.contentFormat(value, "#,###;-#,###")
value = BI.contentFormat(value, "#,###;-#,###");
}
return value + getXYAxisUnit(self.config.dashboardNumberLevel, self.constants.DASHBOARD_AXIS);
};
@ -170,26 +170,26 @@ BI.DashboardChart = BI.inherit(BI.AbstractChart, {
if (position === item.yAxis) {
da.y = self.formatXYDataWithMagnify(da.y, magnify);
}
})
});
});
config.plotOptions.tooltip.formatter.valueFormat = function () {
return BI.contentFormat(this, '#.##;-#.##') + getXYAxisUnit(type, position)
return BI.contentFormat(this, "#.##;-#.##") + getXYAxisUnit(type, position);
};
if (self.config.numSeparators) {
config.plotOptions.tooltip.formatter.valueFormat = function () {
return BI.contentFormat(arguments[0], '#,###.##;-#,###.##')
return BI.contentFormat(arguments[0], "#,###.##;-#,###.##");
};
}
if (type === BICst.TARGET_STYLE.NUM_LEVEL.PERCENT) {
config.plotOptions.tooltip.formatter.valueFormat = function () {
return BI.contentFormat(arguments[0], '#0.00%')
return BI.contentFormat(arguments[0], "#0.00%");
};
if (self.config.numSeparators) {
config.plotOptions.tooltip.formatter.valueFormat = function () {
return BI.contentFormat(arguments[0], '#,##0%;-#,##0%')
return BI.contentFormat(arguments[0], "#,##0%;-#,##0%");
};
}
}
@ -212,7 +212,7 @@ BI.DashboardChart = BI.inherit(BI.AbstractChart, {
break;
}
if (position === self.constants.DASHBOARD_AXIS) {
self.config.dashboardUnit !== "" && (unit = unit + self.config.dashboardUnit)
self.config.dashboardUnit !== "" && (unit = unit + self.config.dashboardUnit);
}
return unit;
}
@ -223,7 +223,7 @@ BI.DashboardChart = BI.inherit(BI.AbstractChart, {
BI.each(items, function (idx, item) {
var data = item.data[0];
if ((BI.isNull(max) || data.y > max)) {
max = data.y
max = data.y;
}
});
@ -233,8 +233,8 @@ BI.DashboardChart = BI.inherit(BI.AbstractChart, {
break;
case BICst.SCALE_SETTING.CUSTOM:
if (styles.length === 0) {
return bands
} else {
return bands;
}
var maxScale = _calculateValueNiceDomain(0, max)[1];
BI.each(styles, function (idx, style) {
@ -251,7 +251,7 @@ BI.DashboardChart = BI.inherit(BI.AbstractChart, {
to: style.range.max
});
color = style.color;
conditionMax = style.range.max
conditionMax = style.range.max;
});
min = BI.parseInt(styles[0].range.min);
bands.push({
@ -267,7 +267,7 @@ BI.DashboardChart = BI.inherit(BI.AbstractChart, {
});
return bands;
}
}
}
@ -310,7 +310,7 @@ BI.DashboardChart = BI.inherit(BI.AbstractChart, {
x: items[0][0].name
})],
name: da.x
})
});
});
return [result];
} else if(this.config.numberOfPointer === c.ONE_POINTER && items[0].length > 1) {
@ -320,9 +320,9 @@ BI.DashboardChart = BI.inherit(BI.AbstractChart, {
x: item.name
})],
name: BI.UUID()
})
});
return [result]
});
return [result];
}
if (this.config.numberOfPointer === c.MULTI_POINTER && items[0].length > 1) {// 多个系列
BI.each(items, function (idx, item) {
@ -330,7 +330,7 @@ BI.DashboardChart = BI.inherit(BI.AbstractChart, {
var data = it.data[0];
data.x = it.name;
result.push(data);
})
});
});
return [[{
data: result,
@ -348,8 +348,8 @@ BI.DashboardChart = BI.inherit(BI.AbstractChart, {
y: da.y
})],
name: da.x
})
})
});
});
});
return [others];
}
@ -395,4 +395,4 @@ BI.DashboardChart = BI.inherit(BI.AbstractChart, {
}
});
BI.DashboardChart.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut('bi.dashboard_chart', BI.DashboardChart);
BI.shortcut("bi.dashboard_chart", BI.DashboardChart);

8
src/addons/chart/chart/chart.donut.js

@ -8,7 +8,7 @@ BI.DonutChart = BI.inherit(BI.AbstractChart, {
_defaultConfig: function () {
return BI.extend(BI.DonutChart.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-donut-chart"
})
});
},
_init: function () {
@ -24,7 +24,7 @@ BI.DonutChart = BI.inherit(BI.AbstractChart, {
self.fireEvent(BI.DonutChart.EVENT_CHANGE, obj);
});
this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) {
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj)
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj);
});
},
@ -49,7 +49,7 @@ BI.DonutChart = BI.inherit(BI.AbstractChart, {
BI.each(items, function (idx, item) {
BI.each(item.data, function (id, da) {
da.y = self.formatXYDataWithMagnify(da.y, 1);
})
});
});
config.legend.style = this.config.chartFont;
@ -100,4 +100,4 @@ BI.DonutChart = BI.inherit(BI.AbstractChart, {
}
});
BI.DonutChart.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut('bi.donut_chart', BI.DonutChart);
BI.shortcut("bi.donut_chart", BI.DonutChart);

40
src/addons/chart/chart/chart.fallaxis.js

@ -8,7 +8,7 @@ BI.FallAxisChart = BI.inherit(BI.AbstractChart, {
_defaultConfig: function () {
return BI.extend(BI.FallAxisChart.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-fall-axis-chart"
})
});
},
_init: function () {
@ -43,7 +43,7 @@ BI.FallAxisChart = BI.inherit(BI.AbstractChart, {
self.fireEvent(BI.FallAxisChart.EVENT_CHANGE, obj);
});
this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) {
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj)
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj);
});
},
@ -86,7 +86,7 @@ BI.FallAxisChart = BI.inherit(BI.AbstractChart, {
enableMinorTick: this.config.enableMinorTick,
labelRotation: this.config.textDirection,
gridLineWidth: this.config.showGridLine === true ? 1 : 0,
maxHeight: '40%'
maxHeight: "40%"
});
// 为了给数据标签加个%,还要遍历所有的系列,唉
@ -97,9 +97,9 @@ BI.FallAxisChart = BI.inherit(BI.AbstractChart, {
return;
}
item.dataLabels = {
"style": self.config.chartFont,
"align": "outside",
"autoAdjust": true,
style: self.config.chartFont,
align: "outside",
autoAdjust: true,
enabled: true,
formatter: {
identifier: "${VALUE}",
@ -133,9 +133,9 @@ BI.FallAxisChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style": self.config.chartFont,
"text": t.text,
"align": "top"
style: self.config.chartFont,
text: t.text,
align: "top"
}
});
});
@ -158,14 +158,14 @@ BI.FallAxisChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style": self.config.chartFont,
"text": t.text,
"align": "left"
style: self.config.chartFont,
text: t.text,
align: "left"
}
});
});
}
})
});
}
function formatNumberLevelInYaxis (type, position, formatter) {
@ -175,7 +175,7 @@ BI.FallAxisChart = BI.inherit(BI.AbstractChart, {
if (position === item.yAxis) {
da.y = self.formatXYDataWithMagnify(da.y, magnify);
}
})
});
});
config.plotOptions.tooltip.formatter.valueFormat = formatter;
}
@ -197,13 +197,13 @@ BI.FallAxisChart = BI.inherit(BI.AbstractChart, {
break;
}
if(position === self.constants.X_AXIS) {
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit)
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit);
}
if(position === self.constants.LEFT_AXIS) {
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit)
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit);
}
if(position === self.constants.RIGHT_AXIS) {
self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit)
self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit);
}
return unit === "" ? unit : "(" + unit + ")";
}
@ -233,7 +233,7 @@ BI.FallAxisChart = BI.inherit(BI.AbstractChart, {
return [BI.map(BI.makeArray(2, null), function (idx, item) {
return {
"data": BI.map(tables, function(id, cell){
data: BI.map(tables, function (id, cell) {
var axis = BI.extend({}, cell[3], {
x: cell[0],
y: Math.abs(cell[2 - idx])
@ -248,7 +248,7 @@ BI.FallAxisChart = BI.inherit(BI.AbstractChart, {
axis.mouseOverColor = "rgba(0,0,0,0)";
axis.tooltip = {
enable: false
}
};
}
return axis;
}),
@ -307,4 +307,4 @@ BI.FallAxisChart = BI.inherit(BI.AbstractChart, {
}
});
BI.FallAxisChart.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut('bi.fall_axis_chart', BI.FallAxisChart);
BI.shortcut("bi.fall_axis_chart", BI.FallAxisChart);

10
src/addons/chart/chart/chart.forcebubble.js

@ -8,7 +8,7 @@ BI.ForceBubbleChart = BI.inherit(BI.AbstractChart, {
_defaultConfig: function () {
return BI.extend(BI.ForceBubbleChart.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-force-bubble-chart"
})
});
},
_init: function () {
@ -24,13 +24,13 @@ BI.ForceBubbleChart = BI.inherit(BI.AbstractChart, {
self.fireEvent(BI.ForceBubbleChart.EVENT_CHANGE, obj);
});
this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) {
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj)
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj);
});
},
_formatConfig: function (config, items) {
var self = this, o = this.options;
config.chartType = 'forceBubble';
config.chartType = "forceBubble";
config.colors = this.config.chartColor;
this.formatChartLegend(config, this.config.chartLegend);
@ -46,7 +46,7 @@ BI.ForceBubbleChart = BI.inherit(BI.AbstractChart, {
BI.each(items, function (idx, item) {
BI.each(item.data, function (id, da) {
da.y = self.formatXYDataWithMagnify(da.y, 1);
})
});
});
config.legend.style = this.config.chartFont;
return [items, config];
@ -84,4 +84,4 @@ BI.ForceBubbleChart = BI.inherit(BI.AbstractChart, {
}
});
BI.ForceBubbleChart.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut('bi.force_bubble_chart', BI.ForceBubbleChart);
BI.shortcut("bi.force_bubble_chart", BI.ForceBubbleChart);

20
src/addons/chart/chart/chart.gismap.js

@ -8,7 +8,7 @@ BI.GISMapChart = BI.inherit(BI.AbstractChart, {
_defaultConfig: function () {
return BI.extend(BI.GISMapChart.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-gis-map-chart"
})
});
},
_init: function () {
@ -24,7 +24,7 @@ BI.GISMapChart = BI.inherit(BI.AbstractChart, {
self.fireEvent(BI.GISMapChart.EVENT_CHANGE, obj);
});
this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) {
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj)
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj);
});
},
@ -36,29 +36,29 @@ BI.GISMapChart = BI.inherit(BI.AbstractChart, {
config.plotOptions.dataLabels.useHtml = true;
config.plotOptions.dataLabels.style = this.config.chartFont;
config.plotOptions.dataLabels.formatter = function () {
var name = (BI.isArray(this.name) ? '' : this.name + ',') + BI.contentFormat(this.value, '#.##;-#.##') ;
var name = (BI.isArray(this.name) ? "" : this.name + ",") + BI.contentFormat(this.value, "#.##;-#.##");
var style = "padding: 5px; background-color: rgba(0,0,0,0.4980392156862745);border-color: rgb(0,0,0); border-radius:2px; border-width:0px;";
var a = '<div style = ' + style + '>' + name + '</div>';
var a = "<div style = " + style + ">" + name + "</div>";
return a;
};
config.plotOptions.tooltip.shared = true;
config.plotOptions.tooltip.formatter = function () {
var tip = BI.isArray(this.name) ? '' : this.name;
var tip = BI.isArray(this.name) ? "" : this.name;
BI.each(this.points, function (idx, point) {
tip += ('<div>' + point.seriesName + ':' + BI.contentFormat((point.size || point.y), '#.##;-#.##') + '</div>');
tip += ("<div>" + point.seriesName + ":" + BI.contentFormat((point.size || point.y), "#.##;-#.##") + "</div>");
});
return tip;
};
config.geo = {
"tileLayer": "http://webrd01.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}",
"attribution": "<a><img src='http://webapi.amap.com/theme/v1.3/mapinfo_05.png'>&copy; 2016 AutoNavi</a>"
tileLayer: "http://webrd01.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}",
attribution: "<a><img src='http://webapi.amap.com/theme/v1.3/mapinfo_05.png'>&copy; 2016 AutoNavi</a>"
};
if (this.config.showBackgroundLayer === true && BI.isNotNull(this.config.backgroundLayerInfo)) {
config.geo = {};
if (this.config.backgroundLayerInfo.type === BICst.WMS_SERVER) {
config.geo.tileLayer = false;
config.geo.wmsUrl = this.config.backgroundLayerInfo.url;
config.geo.wmsLayer = this.config.backgroundLayerInfo.wmsLayer
config.geo.wmsLayer = this.config.backgroundLayerInfo.wmsLayer;
} else {
config.geo.tileLayer = this.config.backgroundLayerInfo.url;
}
@ -157,4 +157,4 @@ BI.GISMapChart = BI.inherit(BI.AbstractChart, {
}
});
BI.GISMapChart.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut('bi.gis_map_chart', BI.GISMapChart);
BI.shortcut("bi.gis_map_chart", BI.GISMapChart);

28
src/addons/chart/chart/chart.line.js

@ -8,7 +8,7 @@ BI.LineChart = BI.inherit(BI.AbstractChart, {
_defaultConfig: function () {
return BI.extend(BI.LineChart.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-line-chart"
})
});
},
_init: function () {
@ -34,7 +34,7 @@ BI.LineChart = BI.inherit(BI.AbstractChart, {
self.fireEvent(BI.LineChart.EVENT_CHANGE, obj);
});
this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) {
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj)
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj);
});
},
@ -100,7 +100,7 @@ BI.LineChart = BI.inherit(BI.AbstractChart, {
labelRotation: this.config.textDirection,
enableMinorTick: self.config.enableMinorTick,
gridLineWidth: this.config.showGridLine === true ? 1 : 0,
maxHeight: '40%'
maxHeight: "40%"
});
config.chartType = "line";
@ -132,9 +132,9 @@ BI.LineChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style" : self.config.chartFont,
"text": t.text,
"align": "top"
style: self.config.chartFont,
text: t.text,
align: "top"
}
});
});
@ -157,14 +157,14 @@ BI.LineChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style" : self.config.chartFont,
"text": t.text,
"align": "left"
style: self.config.chartFont,
text: t.text,
align: "left"
}
});
});
}
})
});
}
function formatChartLineStyle () {
@ -202,13 +202,13 @@ BI.LineChart = BI.inherit(BI.AbstractChart, {
break;
}
if (position === self.constants.X_AXIS) {
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit)
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit);
}
if (position === self.constants.LEFT_AXIS) {
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit)
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit);
}
if (position === self.constants.RIGHT_AXIS) {
self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit)
self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit);
}
return unit === "" ? unit : "(" + unit + ")";
}
@ -294,4 +294,4 @@ BI.LineChart = BI.inherit(BI.AbstractChart, {
}
});
BI.LineChart.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut('bi.line_chart', BI.LineChart);
BI.shortcut("bi.line_chart", BI.LineChart);

52
src/addons/chart/chart/chart.map.js

@ -8,7 +8,7 @@ BI.MapChart = BI.inherit(BI.AbstractChart, {
_defaultConfig: function () {
return BI.extend(BI.MapChart.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-map-chart"
})
});
},
_init: function () {
@ -24,7 +24,7 @@ BI.MapChart = BI.inherit(BI.AbstractChart, {
self.fireEvent(BI.MapChart.EVENT_CHANGE, obj);
});
this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) {
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj)
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj);
});
},
@ -46,7 +46,7 @@ BI.MapChart = BI.inherit(BI.AbstractChart, {
var tip = this.name;
var point = this.points[0];
var index = BI.isNull(point.size) ? 0 : 1;
tip += ('<div>' + point.seriesName + ':' + BI.contentFormat(point.size || point.y, formatterArray[index]) + '</div>');
tip += ("<div>" + point.seriesName + ":" + BI.contentFormat(point.size || point.y, formatterArray[index]) + "</div>");
return tip;
};
config.plotOptions.dataLabels.formatter.valueFormat = function () {
@ -64,7 +64,7 @@ BI.MapChart = BI.inherit(BI.AbstractChart, {
if (this.config.backgroundLayerInfo.type === BICst.WMS_SERVER) {
config.geo.tileLayer = false;
config.geo.wmsUrl = this.config.backgroundLayerInfo.url;
config.geo.wmsLayer = this.config.backgroundLayerInfo.wmsLayer
config.geo.wmsLayer = this.config.backgroundLayerInfo.wmsLayer;
} else {
config.geo.tileLayer = this.config.backgroundLayerInfo.url;
}
@ -89,7 +89,7 @@ BI.MapChart = BI.inherit(BI.AbstractChart, {
items.push({
type: "areaMap",
data: []
})
});
}
return [items, config];
@ -117,36 +117,36 @@ BI.MapChart = BI.inherit(BI.AbstractChart, {
var settings = items[0].settings;
var legendFormat = formatToolTipAndDataLabel(settings.format || c.NORMAL, settings.num_level || c.NORMAL,
settings.unit || "", settings.numSeparators || c.NUM_SEPARATORS);
to = BI.contentFormat(to, legendFormat)
to = BI.contentFormat(to, legendFormat);
}
return to
return to;
};
}
function formatToolTipAndDataLabel (format, numberLevel, unit, numSeparators) {
var formatter = '#.##';
var formatter = "#.##";
switch (format) {
case self.constants.NORMAL:
formatter = '#.##';
if (numSeparators) formatter = '#,###.##';
formatter = "#.##";
if (numSeparators) formatter = "#,###.##";
break;
case self.constants.ZERO2POINT:
formatter = '#0';
if (numSeparators) formatter = '#,###';
formatter = "#0";
if (numSeparators) formatter = "#,###";
break;
case self.constants.ONE2POINT:
formatter = '#0.0';
if (numSeparators) formatter = '#,###.0';
formatter = "#0.0";
if (numSeparators) formatter = "#,###.0";
break;
case self.constants.TWO2POINT:
formatter = '#0.00';
if (numSeparators) formatter = '#,###.00';
formatter = "#0.00";
if (numSeparators) formatter = "#,###.00";
break;
}
switch (numberLevel) {
case BICst.TARGET_STYLE.NUM_LEVEL.NORMAL:
formatter += '';
formatter += "";
break;
case BICst.TARGET_STYLE.NUM_LEVEL.TEN_THOUSAND:
formatter += BI.i18nText("BI-Wan");
@ -158,7 +158,7 @@ BI.MapChart = BI.inherit(BI.AbstractChart, {
formatter += BI.i18nText("BI-Yi");
break;
case BICst.TARGET_STYLE.NUM_LEVEL.PERCENT:
formatter += '%';
formatter += "%";
break;
}
@ -172,9 +172,9 @@ BI.MapChart = BI.inherit(BI.AbstractChart, {
BI.each(items, function (idx, item) {
BI.each(item.data, function (id, it) {
if (BI.isNull(min) || BI.parseFloat(min) > BI.parseFloat(it.y)) {
min = it.y
min = it.y;
}
})
});
});
switch (change) {
@ -196,11 +196,11 @@ BI.MapChart = BI.inherit(BI.AbstractChart, {
range.push({
color: style.color || "rgba(255,255,255,0)",
from: style.range.min,
to: to,
to: to
});
}
color = style.color;
conditionMax = style.range.max
conditionMax = style.range.max;
});
conditionMin = BI.parseFloat(styles[0].range.min);
@ -220,10 +220,10 @@ BI.MapChart = BI.inherit(BI.AbstractChart, {
});
}
return range;
} else {
}
defaultStyle.color = defaultColor;
return defaultStyle;
}
}
}
@ -313,7 +313,7 @@ BI.MapChart = BI.inherit(BI.AbstractChart, {
self._formatDrillItems(da.drilldown);
}
});
})
});
});
return items;
},
@ -358,4 +358,4 @@ BI.MapChart = BI.inherit(BI.AbstractChart, {
});
BI.MapChart.EVENT_CHANGE = "EVENT_CHANGE";
BI.MapChart.EVENT_CLICK_DTOOL = "EVENT_CLICK_DTOOL";
BI.shortcut('bi.map_chart', BI.MapChart);
BI.shortcut("bi.map_chart", BI.MapChart);

54
src/addons/chart/chart/chart.multiaxis.js

@ -11,7 +11,7 @@ BI.MultiAxisChart = BI.inherit(BI.AbstractChart, {
_defaultConfig: function () {
return BI.extend(BI.MultiAxisChart.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multi-axis-chart"
})
});
},
_init: function () {
@ -20,10 +20,10 @@ BI.MultiAxisChart = BI.inherit(BI.AbstractChart, {
this.xAxis = [{
type: "category",
title: {
style: {"fontFamily": "inherit", "color": "#808080", "fontSize": "12px", "fontWeight": ""}
style: {fontFamily: "inherit", color: "#808080", fontSize: "12px", fontWeight: ""}
},
labelStyle: {
"fontFamily": "inherit", "color": "#808080", "fontSize": "12px"
fontFamily: "inherit", color: "#808080", fontSize: "12px"
},
position: "bottom",
gridLineWidth: 0
@ -39,7 +39,7 @@ BI.MultiAxisChart = BI.inherit(BI.AbstractChart, {
self.fireEvent(BI.MultiAxisChart.EVENT_CHANGE, obj);
});
this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) {
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj)
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj);
});
},
@ -120,7 +120,7 @@ BI.MultiAxisChart = BI.inherit(BI.AbstractChart, {
labelRotation: this.config.textDirection,
enableMinorTick: this.config.enableMinorTick,
gridLineWidth: this.config.showGridLine === true ? 1 : 0,
maxHeight: '40%'
maxHeight: "40%"
});
// 为了给数据标签加个%,还要遍历所有的系列,唉
@ -161,14 +161,14 @@ BI.MultiAxisChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style": {
"fontFamily": "inherit",
"color": "#808080",
"fontSize": "12px",
"fontWeight": ""
style: {
fontFamily: "inherit",
color: "#808080",
fontSize: "12px",
fontWeight: ""
},
"text": t.text,
"align": "top"
text: t.text,
align: "top"
}
});
});
@ -193,19 +193,19 @@ BI.MultiAxisChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style": {
"fontFamily": "inherit",
"color": "#808080",
"fontSize": "12px",
"fontWeight": ""
style: {
fontFamily: "inherit",
color: "#808080",
fontSize: "12px",
fontWeight: ""
},
"text": t.text,
"align": "left"
text: t.text,
align: "left"
}
});
});
}
})
});
},
getXYAxisUnit: function (numberLevelType, position) {
@ -227,16 +227,16 @@ BI.MultiAxisChart = BI.inherit(BI.AbstractChart, {
break;
}
if (position === this.constants.X_AXIS) {
this.config.xAxisUnit !== "" && (unit = unit + this.config.xAxisUnit)
this.config.xAxisUnit !== "" && (unit = unit + this.config.xAxisUnit);
}
if (position === this.constants.LEFT_AXIS) {
this.config.leftYAxisUnit !== "" && (unit = unit + this.config.leftYAxisUnit)
this.config.leftYAxisUnit !== "" && (unit = unit + this.config.leftYAxisUnit);
}
if (position === this.constants.RIGHT_AXIS) {
this.config.rightYAxisUnit !== "" && (unit = unit + this.config.rightYAxisUnit)
this.config.rightYAxisUnit !== "" && (unit = unit + this.config.rightYAxisUnit);
}
if (position === this.constants.RIGHT_AXIS_SECOND) {
this.config.rightYAxisSecondUnit !== "" && (unit = unit + this.config.rightYAxisSecondUnit)
this.config.rightYAxisSecondUnit !== "" && (unit = unit + this.config.rightYAxisSecondUnit);
}
return unit === "" ? unit : "(" + unit + ")";
},
@ -294,10 +294,10 @@ BI.MultiAxisChart = BI.inherit(BI.AbstractChart, {
var newYAxis = {
type: "value",
title: {
style: {"fontFamily": "inherit", "color": "#808080", "fontSize": "12px", "fontWeight": ""}
style: {fontFamily: "inherit", color: "#808080", fontSize: "12px", fontWeight: ""}
},
labelStyle: {
"fontFamily": "inherit", "color": "#808080", "fontSize": "12px"
fontFamily: "inherit", color: "#808080", fontSize: "12px"
},
position: idx > 0 ? "right" : "left",
lineWidth: 1,
@ -319,4 +319,4 @@ BI.MultiAxisChart = BI.inherit(BI.AbstractChart, {
}
});
BI.MultiAxisChart.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut('bi.multi_axis_chart', BI.MultiAxisChart);
BI.shortcut("bi.multi_axis_chart", BI.MultiAxisChart);

54
src/addons/chart/chart/chart.multiaxiscombine.js

@ -11,7 +11,7 @@ BI.MultiAxisCombineChart = BI.inherit(BI.AbstractChart, {
_defaultConfig: function () {
return BI.extend(BI.MultiAxisCombineChart.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multi-axis-combine-chart"
})
});
},
_init: function () {
@ -20,10 +20,10 @@ BI.MultiAxisCombineChart = BI.inherit(BI.AbstractChart, {
this.xAxis = [{
type: "category",
title: {
style: {"fontFamily": "inherit", "color": "#808080", "fontSize": "12px", "fontWeight": ""}
style: {fontFamily: "inherit", color: "#808080", fontSize: "12px", fontWeight: ""}
},
labelStyle: {
"fontFamily": "inherit", "color": "#808080", "fontSize": "12px"
fontFamily: "inherit", color: "#808080", fontSize: "12px"
},
position: "bottom",
gridLineWidth: 0
@ -39,7 +39,7 @@ BI.MultiAxisCombineChart = BI.inherit(BI.AbstractChart, {
self.fireEvent(BI.MultiAxisCombineChart.EVENT_CHANGE, obj);
});
this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) {
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj)
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj);
});
},
@ -123,7 +123,7 @@ BI.MultiAxisCombineChart = BI.inherit(BI.AbstractChart, {
labelRotation: this.config.textDirection,
enableMinorTick: this.config.enableMinorTick,
gridLineWidth: this.config.showGridLine === true ? 1 : 0,
maxHeight: '40%'
maxHeight: "40%"
});
// 为了给数据标签加个%,还要遍历所有的系列,唉
@ -164,14 +164,14 @@ BI.MultiAxisCombineChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style": {
"fontFamily": "inherit",
"color": "#808080",
"fontSize": "12px",
"fontWeight": ""
style: {
fontFamily: "inherit",
color: "#808080",
fontSize: "12px",
fontWeight: ""
},
"text": t.text,
"align": "top"
text: t.text,
align: "top"
}
});
});
@ -196,19 +196,19 @@ BI.MultiAxisCombineChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style": {
"fontFamily": "inherit",
"color": "#808080",
"fontSize": "12px",
"fontWeight": ""
style: {
fontFamily: "inherit",
color: "#808080",
fontSize: "12px",
fontWeight: ""
},
"text": t.text,
"align": "left"
text: t.text,
align: "left"
}
});
});
}
})
});
},
getXYAxisUnit: function (numberLevelType, position) {
@ -230,16 +230,16 @@ BI.MultiAxisCombineChart = BI.inherit(BI.AbstractChart, {
break;
}
if (position === this.constants.X_AXIS) {
this.config.xAxisUnit !== "" && (unit = unit + this.config.xAxisUnit)
this.config.xAxisUnit !== "" && (unit = unit + this.config.xAxisUnit);
}
if (position === this.constants.LEFT_AXIS) {
this.config.leftYAxisUnit !== "" && (unit = unit + this.config.leftYAxisUnit)
this.config.leftYAxisUnit !== "" && (unit = unit + this.config.leftYAxisUnit);
}
if (position === this.constants.RIGHT_AXIS) {
this.config.rightYAxisUnit !== "" && (unit = unit + this.config.rightYAxisUnit)
this.config.rightYAxisUnit !== "" && (unit = unit + this.config.rightYAxisUnit);
}
if (position === this.constants.RIGHT_AXIS_SECOND) {
this.config.rightYAxisSecondUnit !== "" && (unit = unit + this.config.rightYAxisSecondUnit)
this.config.rightYAxisSecondUnit !== "" && (unit = unit + this.config.rightYAxisSecondUnit);
}
return unit === "" ? unit : "(" + unit + ")";
},
@ -296,10 +296,10 @@ BI.MultiAxisCombineChart = BI.inherit(BI.AbstractChart, {
var newYAxis = {
type: "value",
title: {
style: {"fontFamily": "inherit", "color": "#808080", "fontSize": "12px", "fontWeight": ""}
style: {fontFamily: "inherit", color: "#808080", fontSize: "12px", fontWeight: ""}
},
labelStyle: {
"fontFamily": "inherit", "color": "#808080", "fontSize": "12px"
fontFamily: "inherit", color: "#808080", fontSize: "12px"
},
position: idx > 0 ? "right" : "left",
lineWidth: 1,
@ -321,4 +321,4 @@ BI.MultiAxisCombineChart = BI.inherit(BI.AbstractChart, {
}
});
BI.MultiAxisCombineChart.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut('bi.multi_axis_combine_chart', BI.MultiAxisCombineChart);
BI.shortcut("bi.multi_axis_combine_chart", BI.MultiAxisCombineChart);

28
src/addons/chart/chart/chart.percentaccumulatearea.js

@ -8,7 +8,7 @@ BI.PercentAccumulateAreaChart = BI.inherit(BI.AbstractChart, {
_defaultConfig: function () {
return BI.extend(BI.PercentAccumulateAreaChart.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-percent-accumulate-area-chart"
})
});
},
_init: function () {
@ -43,7 +43,7 @@ BI.PercentAccumulateAreaChart = BI.inherit(BI.AbstractChart, {
self.fireEvent(BI.PercentAccumulateAreaChart.EVENT_CHANGE, obj);
});
this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) {
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj)
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj);
});
},
@ -84,7 +84,7 @@ BI.PercentAccumulateAreaChart = BI.inherit(BI.AbstractChart, {
enableTick: this.config.enableTick,
labelRotation: this.config.textDirection,
gridLineWidth: this.config.showGridLine === true ? 1 : 0,
maxHeight: '40%'
maxHeight: "40%"
});
config.chartType = "area";
@ -116,9 +116,9 @@ BI.PercentAccumulateAreaChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style": self.config.chartFont,
"text": t.text,
"align": "top"
style: self.config.chartFont,
text: t.text,
align: "top"
}
});
});
@ -141,14 +141,14 @@ BI.PercentAccumulateAreaChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style": self.config.chartFont,
"text": t.text,
"align": "left"
style: self.config.chartFont,
text: t.text,
align: "left"
}
});
});
}
})
});
}
function getXYAxisUnit (numberLevelType, position) {
@ -168,15 +168,15 @@ BI.PercentAccumulateAreaChart = BI.inherit(BI.AbstractChart, {
break;
}
if (position === self.constants.X_AXIS) {
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit)
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit);
}
if (position === self.constants.LEFT_AXIS) {
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit)
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit);
}
unit = unit === "" ? unit : "(" + unit + ")";
return self.config.showLeftYAxisTitle === true ? self.config.leftYAxisTitle + unit : unit
return self.config.showLeftYAxisTitle === true ? self.config.leftYAxisTitle + unit : unit;
}
},
@ -242,4 +242,4 @@ BI.PercentAccumulateAreaChart = BI.inherit(BI.AbstractChart, {
}
});
BI.PercentAccumulateAreaChart.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut('bi.percent_accumulate_area_chart', BI.PercentAccumulateAreaChart);
BI.shortcut("bi.percent_accumulate_area_chart", BI.PercentAccumulateAreaChart);

26
src/addons/chart/chart/chart.percentaccumulateaxis.js

@ -8,7 +8,7 @@ BI.PercentAccumulateAxisChart = BI.inherit(BI.AbstractChart, {
_defaultConfig: function () {
return BI.extend(BI.PercentAccumulateAxisChart.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-percent-accumulate-axis-chart"
})
});
},
_init: function () {
@ -43,7 +43,7 @@ BI.PercentAccumulateAxisChart = BI.inherit(BI.AbstractChart, {
self.fireEvent(BI.PercentAccumulateAxisChart.EVENT_CHANGE, obj);
});
this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) {
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj)
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj);
});
},
@ -85,7 +85,7 @@ BI.PercentAccumulateAxisChart = BI.inherit(BI.AbstractChart, {
labelRotation: this.config.textDirection,
enableMinorTick: this.config.enableMinorTick,
gridLineWidth: this.config.showGridLine === true ? 1 : 0,
maxHeight: '40%'
maxHeight: "40%"
});
// 为了给数据标签加个%,还要遍历所有的系列,唉
@ -115,9 +115,9 @@ BI.PercentAccumulateAxisChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style" : self.config.chartFont,
"text": t.text,
"align": "top"
style: self.config.chartFont,
text: t.text,
align: "top"
}
});
});
@ -140,14 +140,14 @@ BI.PercentAccumulateAxisChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style" : self.config.chartFont,
"text": t.text,
"align": "left"
style: self.config.chartFont,
text: t.text,
align: "left"
}
});
});
}
})
});
}
function getXYAxisUnit (numberLevelType, position) {
@ -167,10 +167,10 @@ BI.PercentAccumulateAxisChart = BI.inherit(BI.AbstractChart, {
break;
}
if (position === self.constants.X_AXIS) {
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit)
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit);
}
if (position === self.constants.LEFT_AXIS) {
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit)
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit);
}
return unit === "" ? unit : "(" + unit + ")";
}
@ -237,4 +237,4 @@ BI.PercentAccumulateAxisChart = BI.inherit(BI.AbstractChart, {
}
});
BI.PercentAccumulateAxisChart.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut('bi.percent_accumulate_axis_chart', BI.PercentAccumulateAxisChart);
BI.shortcut("bi.percent_accumulate_axis_chart", BI.PercentAccumulateAxisChart);

14
src/addons/chart/chart/chart.pie.js

@ -8,7 +8,7 @@ BI.PieChart = BI.inherit(BI.AbstractChart, {
_defaultConfig: function () {
return BI.extend(BI.PieChart.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-pie-chart"
})
});
},
_init: function () {
@ -24,7 +24,7 @@ BI.PieChart = BI.inherit(BI.AbstractChart, {
self.fireEvent(BI.PieChart.EVENT_CHANGE, obj);
});
this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) {
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj)
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj);
});
},
@ -50,7 +50,7 @@ BI.PieChart = BI.inherit(BI.AbstractChart, {
BI.each(items, function (idx, item) {
BI.each(item.data, function (id, da) {
da.y = self.formatXYDataWithMagnify(da.y, 1);
})
});
});
config.legend.style = this.config.chartFont;
@ -107,10 +107,10 @@ BI.PieChart = BI.inherit(BI.AbstractChart, {
});
});
return seriesItem;
})
}else{
return items;
});
}
return items;
},
populate: function (items, options) {
@ -149,5 +149,5 @@ BI.PieChart = BI.inherit(BI.AbstractChart, {
}
});
BI.PieChart.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut('bi.pie_chart', BI.PieChart);
BI.shortcut("bi.pie_chart", BI.PieChart);

16
src/addons/chart/chart/chart.radar.js

@ -8,7 +8,7 @@ BI.RadarChart = BI.inherit(BI.AbstractChart, {
_defaultConfig: function () {
return BI.extend(BI.RadarChart.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-radar-chart"
})
});
},
_init: function () {
@ -21,7 +21,7 @@ BI.RadarChart = BI.inherit(BI.AbstractChart, {
},
labelStyle: this.constants.FONT_STYLE,
formatter: function () {
return this > 0 ? this : (-1) * this
return this > 0 ? this : (-1) * this;
},
gridLineWidth: 0,
position: "bottom"
@ -45,7 +45,7 @@ BI.RadarChart = BI.inherit(BI.AbstractChart, {
self.fireEvent(BI.RadarChart.EVENT_CHANGE, obj);
});
this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) {
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj)
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj);
});
},
@ -110,7 +110,7 @@ BI.RadarChart = BI.inherit(BI.AbstractChart, {
if (position === item.yAxis) {
da.y = self.formatXYDataWithMagnify(da.y, magnify);
}
})
});
});
config.plotOptions.tooltip.formatter.valueFormat = formatter;
}
@ -132,13 +132,13 @@ BI.RadarChart = BI.inherit(BI.AbstractChart, {
break;
}
if (position === self.constants.X_AXIS) {
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit)
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit);
}
if (position === self.constants.LEFT_AXIS) {
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit)
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit);
}
if (position === self.constants.RIGHT_AXIS) {
self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit)
self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit);
}
return unit === "" ? unit : "(" + unit + ")";
}
@ -182,4 +182,4 @@ BI.RadarChart = BI.inherit(BI.AbstractChart, {
}
});
BI.RadarChart.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut('bi.radar_chart', BI.RadarChart);
BI.shortcut("bi.radar_chart", BI.RadarChart);

28
src/addons/chart/chart/chart.rangearea.js

@ -9,7 +9,7 @@ BI.RangeAreaChart = BI.inherit(BI.AbstractChart, {
_defaultConfig: function () {
return BI.extend(BI.RangeAreaChart.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-range-area-chart"
})
});
},
_init: function () {
@ -44,7 +44,7 @@ BI.RangeAreaChart = BI.inherit(BI.AbstractChart, {
self.fireEvent(BI.RangeAreaChart.EVENT_CHANGE, obj);
});
this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) {
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj)
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj);
});
},
@ -79,7 +79,7 @@ BI.RangeAreaChart = BI.inherit(BI.AbstractChart, {
enableTick: this.config.enableTick,
labelRotation: this.config.textDirection,
gridLineWidth: this.config.showGridLine === true ? 1 : 0,
maxHeight: '40%'
maxHeight: "40%"
});
config.chartType = "area";
@ -112,9 +112,9 @@ BI.RangeAreaChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style" : self.config.chartFont,
"text": t.text,
"align": "top"
style: self.config.chartFont,
text: t.text,
align: "top"
}
});
});
@ -137,14 +137,14 @@ BI.RangeAreaChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style" : self.config.chartFont,
"text": t.text,
"align": "left"
style: self.config.chartFont,
text: t.text,
align: "left"
}
});
});
}
})
});
}
function formatNumberLevelInYaxis (type, position, formatter) {
@ -154,7 +154,7 @@ BI.RangeAreaChart = BI.inherit(BI.AbstractChart, {
if (position === item.yAxis) {
da.y = self.formatXYDataWithMagnify(da.y, magnify);
}
})
});
});
config.plotOptions.tooltip.formatter.valueFormat = formatter;
}
@ -176,10 +176,10 @@ BI.RangeAreaChart = BI.inherit(BI.AbstractChart, {
break;
}
if (position === self.constants.X_AXIS) {
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit)
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit);
}
if (position === self.constants.LEFT_AXIS) {
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit)
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit);
}
return unit === "" ? unit : "(" + unit + ")";
}
@ -281,4 +281,4 @@ BI.RangeAreaChart = BI.inherit(BI.AbstractChart, {
}
});
BI.RangeAreaChart.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut('bi.range_area_chart', BI.RangeAreaChart);
BI.shortcut("bi.range_area_chart", BI.RangeAreaChart);

56
src/addons/chart/chart/chart.scatter.js

@ -8,7 +8,7 @@ BI.ScatterChart = BI.inherit(BI.AbstractChart, {
_defaultConfig: function () {
return BI.extend(BI.ScatterChart.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-scatter-chart"
})
});
},
_init: function () {
@ -43,7 +43,7 @@ BI.ScatterChart = BI.inherit(BI.AbstractChart, {
self.fireEvent(BI.ScatterChart.EVENT_CHANGE, obj);
});
this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) {
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj)
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj);
});
},
@ -53,7 +53,7 @@ BI.ScatterChart = BI.inherit(BI.AbstractChart, {
delete config.zoom;
config.colors = this.config.chartColor;
config.style = formatChartStyle();
config.plotOptions.marker = {"symbol": "circle", "radius": 4.5, "enabled": true};
config.plotOptions.marker = {symbol: "circle", radius: 4.5, enabled: true};
formatCordon();
this.formatChartLegend(config, this.config.chartLegend);
config.plotOptions.dataLabels.enabled = this.config.showDataLabel;
@ -68,7 +68,7 @@ BI.ScatterChart = BI.inherit(BI.AbstractChart, {
config.yAxis[0].title.text = this.config.showLeftYAxisTitle === true ? this.config.leftYAxisTitle + config.yAxis[0].title.text : config.yAxis[0].title.text;
config.yAxis[0].gridLineWidth = this.config.showGridLine === true ? 1 : 0;
config.yAxis[0].title.rotation = this.constants.ROTATION;
config.yAxis[0].maxWidth = '40%';
config.yAxis[0].maxWidth = "40%";
config.xAxis[0].formatter = self.formatTickInXYaxis(this.config.xAxisStyle, this.config.xAxisNumberLevel, this.config.rightNumSeparators);
formatNumberLevelInXaxis(this.config.xAxisNumberLevel);
@ -76,32 +76,32 @@ BI.ScatterChart = BI.inherit(BI.AbstractChart, {
config.xAxis[0].title.text = this.config.showXAxisTitle === true ? this.config.xAxisTitle + config.xAxis[0].title.text : config.xAxis[0].title.text;
config.xAxis[0].title.align = "center";
config.xAxis[0].gridLineWidth = this.config.showGridLine === true ? 1 : 0;
config.xAxis[0].maxHeight = '40%';
config.xAxis[0].maxHeight = "40%";
config.chartType = "scatter";
if (BI.isNotEmptyArray(this.config.tooltip)) {
config.plotOptions.tooltip.formatter = function () {
var y = self.formatTickInXYaxis(self.config.leftYAxisStyle, self.config.leftYAxisNumberLevel, self.config.numSeparators)(this.y);
var x = self.formatTickInXYaxis(self.config.xAxisStyle, self.config.xAxisNumberLevel, self.config.rightNumSeparators)(this.x);
return this.seriesName + '<div>(X)' + self.config.tooltip[0]
+ ':' + x + '</div><div>(Y)' + self.config.tooltip[1] + ':' + y + '</div>'
return this.seriesName + "<div>(X)" + self.config.tooltip[0]
+ ":" + x + "</div><div>(Y)" + self.config.tooltip[1] + ":" + y + "</div>";
};
}
if (config.plotOptions.dataLabels.enabled === true) {
BI.each(items, function (idx, item) {
item.dataLabels = {
"style": self.config.chartFont,
"align": "outside",
"autoAdjust": true,
style: self.config.chartFont,
align: "outside",
autoAdjust: true,
enabled: true,
formatter: {
identifier: "${X}${Y}",
"XFormat": function () {
return BI.contentFormat(arguments[0], '#.##;-#.##')
XFormat: function () {
return BI.contentFormat(arguments[0], "#.##;-#.##");
},
"YFormat": function () {
return BI.contentFormat(arguments[0], '#.##;-#.##')
YFormat: function () {
return BI.contentFormat(arguments[0], "#.##;-#.##");
}
}
};
@ -136,9 +136,9 @@ BI.ScatterChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style": self.config.chartFont,
"text": t.text,
"align": "top"
style: self.config.chartFont,
text: t.text,
align: "top"
}
});
});
@ -161,14 +161,14 @@ BI.ScatterChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style": self.config.chartFont,
"text": t.text,
"align": "left"
style: self.config.chartFont,
text: t.text,
align: "left"
}
});
});
}
})
});
}
function formatNumberLevelInXaxis (type) {
@ -176,8 +176,8 @@ BI.ScatterChart = BI.inherit(BI.AbstractChart, {
BI.each(items, function (idx, item) {
BI.each(item.data, function (id, da) {
da.x = self.formatXYDataWithMagnify(da.x, magnify);
})
})
});
});
}
function formatNumberLevelInYaxis (type) {
@ -185,7 +185,7 @@ BI.ScatterChart = BI.inherit(BI.AbstractChart, {
BI.each(items, function (idx, item) {
BI.each(item.data, function (id, da) {
da.y = self.formatXYDataWithMagnify(da.y, magnify);
})
});
});
}
@ -206,13 +206,13 @@ BI.ScatterChart = BI.inherit(BI.AbstractChart, {
break;
}
if (position === self.constants.X_AXIS) {
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit)
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit);
}
if (position === self.constants.LEFT_AXIS) {
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit)
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit);
}
if (position === self.constants.RIGHT_AXIS) {
self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit)
self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit);
}
return unit === "" ? unit : "(" + unit + ")";
}
@ -263,4 +263,4 @@ BI.ScatterChart = BI.inherit(BI.AbstractChart, {
}
});
BI.ScatterChart.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut('bi.scatter_chart', BI.ScatterChart);
BI.shortcut("bi.scatter_chart", BI.ScatterChart);

366
src/addons/chart/factory.charts.js

@ -12,55 +12,55 @@ BI.ChartCombineFormatItemFactory = {
case BICst.WIDGET.BAR:
case BICst.WIDGET.ACCUMULATE_BAR:
case BICst.WIDGET.COMPARE_BAR:
item = BI.extend({"type": "bar"}, items);
item = BI.extend({type: "bar"}, items);
break;
case BICst.WIDGET.BUBBLE:
item = BI.extend({"type": "bubble"}, items);
item = BI.extend({type: "bubble"}, items);
break;
case BICst.WIDGET.FORCE_BUBBLE:
item = BI.extend({"type": "forceBubble"}, items);
item = BI.extend({type: "forceBubble"}, items);
break;
case BICst.WIDGET.SCATTER:
item = BI.extend({"type": "scatter"}, items);
item = BI.extend({type: "scatter"}, items);
break;
case BICst.WIDGET.AXIS:
case BICst.WIDGET.ACCUMULATE_AXIS:
case BICst.WIDGET.PERCENT_ACCUMULATE_AXIS:
case BICst.WIDGET.COMPARE_AXIS:
case BICst.WIDGET.FALL_AXIS:
item = BI.extend({"type": "column"}, items);
item = BI.extend({type: "column"}, items);
break;
case BICst.WIDGET.LINE:
item = BI.extend({"type": "line"}, items);
item = BI.extend({type: "line"}, items);
break;
case BICst.WIDGET.AREA:
case BICst.WIDGET.ACCUMULATE_AREA:
case BICst.WIDGET.COMPARE_AREA:
case BICst.WIDGET.RANGE_AREA:
case BICst.WIDGET.PERCENT_ACCUMULATE_AREA:
item = BI.extend({"type": "area"}, items);
item = BI.extend({type: "area"}, items);
break;
case BICst.WIDGET.DONUT:
item = BI.extend({"type": "pie"}, items);
item = BI.extend({type: "pie"}, items);
break;
case BICst.WIDGET.RADAR:
case BICst.WIDGET.ACCUMULATE_RADAR:
item = BI.extend({"type": "radar"}, items);
item = BI.extend({type: "radar"}, items);
break;
case BICst.WIDGET.PIE:
item = BI.extend({"type": "pie"}, items);
item = BI.extend({type: "pie"}, items);
break;
case BICst.WIDGET.DASHBOARD:
item = BI.extend({"type": "gauge"}, items);
item = BI.extend({type: "gauge"}, items);
break;
case BICst.WIDGET.MAP:
item = BI.extend({"type": "areaMap"}, items);
item = BI.extend({type: "areaMap"}, items);
break;
case BICst.WIDGET.GIS_MAP:
item = BI.extend({"type": "pointMap"}, items);
item = BI.extend({type: "pointMap"}, items);
break;
default:
item = BI.extend({"type": "column"}, items);
item = BI.extend({type: "column"}, items);
break;
}
return item;
@ -68,177 +68,177 @@ BI.ChartCombineFormatItemFactory = {
combineConfig: function () {
return {
"title": "",
"chartType": "column",
"plotOptions": {
"rotatable": false,
"startAngle": 0,
"borderRadius": 0,
"endAngle": 360,
"innerRadius": "0.0%",
"layout": "horizontal",
"hinge": "rgb(101,107,109)",
"dataLabels": {
"autoAdjust": true,
"style": {"fontFamily": "inherit", "color": "inherit", "fontSize": "12px"},
"formatter": {
"identifier": "${VALUE}",
"valueFormat": this._contentFormat2Decimal,
"seriesFormat": this._contentFormat,
"percentFormat": this._contentFormatPercentage,
"categoryFormat": this._contentFormat,
"XFormat": this._contentFormat2Decimal,
"YFormat": this._contentFormat2Decimal,
"sizeFormat": this._contentFormat2Decimal
title: "",
chartType: "column",
plotOptions: {
rotatable: false,
startAngle: 0,
borderRadius: 0,
endAngle: 360,
innerRadius: "0.0%",
layout: "horizontal",
hinge: "rgb(101,107,109)",
dataLabels: {
autoAdjust: true,
style: {fontFamily: "inherit", color: "inherit", fontSize: "12px"},
formatter: {
identifier: "${VALUE}",
valueFormat: this._contentFormat2Decimal,
seriesFormat: this._contentFormat,
percentFormat: this._contentFormatPercentage,
categoryFormat: this._contentFormat,
XFormat: this._contentFormat2Decimal,
YFormat: this._contentFormat2Decimal,
sizeFormat: this._contentFormat2Decimal
},
"align": "outside",
"enabled": false
align: "outside",
enabled: false
},
"percentageLabel": {
"formatter": {
"identifier": "${PERCENT}",
"valueFormat": this._contentFormat2Decimal,
"seriesFormat": this._contentFormat,
"percentFormat": this._contentFormatPercentage,
"categoryFormat": this._contentFormat
percentageLabel: {
formatter: {
identifier: "${PERCENT}",
valueFormat: this._contentFormat2Decimal,
seriesFormat: this._contentFormat,
percentFormat: this._contentFormatPercentage,
categoryFormat: this._contentFormat
},
"style": {
"fontFamily": "inherit", "color": "inherit", "fontSize": "12px"
style: {
fontFamily: "inherit", color: "inherit", fontSize: "12px"
},
"align": "bottom",
"enabled": true
align: "bottom",
enabled: true
},
"valueLabel": {
"formatter": {
"identifier": "${SERIES}${VALUE}",
"valueFormat": this._contentFormat2Decimal,
"seriesFormat": this._contentFormat,
"percentFormat": this._contentFormatPercentage,
"categoryFormat": this._contentFormat
valueLabel: {
formatter: {
identifier: "${SERIES}${VALUE}",
valueFormat: this._contentFormat2Decimal,
seriesFormat: this._contentFormat,
percentFormat: this._contentFormatPercentage,
categoryFormat: this._contentFormat
},
"backgroundColor": "rgb(255,255,0)",
"style": {
"fontFamily": "inherit", "color": "inherit", "fontSize": "12px"
backgroundColor: "rgb(255,255,0)",
style: {
fontFamily: "inherit", color: "inherit", fontSize: "12px"
},
"align": "inside",
"enabled": true
align: "inside",
enabled: true
},
"hingeBackgroundColor": "rgb(220,242,249)",
"seriesLabel": {
"formatter": {
"identifier": "${CATEGORY}",
"valueFormat": this._contentFormat2Decimal,
"seriesFormat": this._contentFormat,
"percentFormat": this._contentFormatPercentage,
"categoryFormat": this._contentFormat
hingeBackgroundColor: "rgb(220,242,249)",
seriesLabel: {
formatter: {
identifier: "${CATEGORY}",
valueFormat: this._contentFormat2Decimal,
seriesFormat: this._contentFormat,
percentFormat: this._contentFormatPercentage,
categoryFormat: this._contentFormat
},
"style": {
"fontFamily": "inherit", "color": "inherit", "fontSize": "12px"
style: {
fontFamily: "inherit", color: "inherit", fontSize: "12px"
},
"align": "bottom",
"enabled": true
align: "bottom",
enabled: true
},
"paneBackgroundColor": "rgb(252,252,252)",
"needle": "rgb(229,113,90)",
"large": false,
"connectNulls": false,
"shadow": true,
"curve": false,
"sizeBy": "area",
"tooltip": {
"formatter": {
"identifier": "${SERIES}${X}${Y}${SIZE}{CATEGORY}${SERIES}${VALUE}",
"valueFormat": this._contentFormat2Decimal,
"seriesFormat": this._contentFormat,
"percentFormat": this._contentFormatPercentage,
"categoryFormat": this._contentFormat,
"XFormat": this._contentFormat2Decimal,
"sizeFormat": this._contentFormat2Decimal,
"YFormat": this._contentFormat2Decimal
paneBackgroundColor: "rgb(252,252,252)",
needle: "rgb(229,113,90)",
large: false,
connectNulls: false,
shadow: true,
curve: false,
sizeBy: "area",
tooltip: {
formatter: {
identifier: "${SERIES}${X}${Y}${SIZE}{CATEGORY}${SERIES}${VALUE}",
valueFormat: this._contentFormat2Decimal,
seriesFormat: this._contentFormat,
percentFormat: this._contentFormatPercentage,
categoryFormat: this._contentFormat,
XFormat: this._contentFormat2Decimal,
sizeFormat: this._contentFormat2Decimal,
YFormat: this._contentFormat2Decimal
},
"shared": false,
"padding": 5,
"backgroundColor": "rgba(0,0,0,0.4980392156862745)",
"borderColor": "rgb(0,0,0)",
"shadow": false,
"borderRadius": 2,
"borderWidth": 0,
"follow": false,
"enabled": true,
"animation": true,
"style": {
"fontFamily": "Microsoft YaHei, Hiragino Sans GB W3",
"color": "#c4c6c6",
"fontSize": "12px",
"fontWeight": ""
shared: false,
padding: 5,
backgroundColor: "rgba(0,0,0,0.4980392156862745)",
borderColor: "rgb(0,0,0)",
shadow: false,
borderRadius: 2,
borderWidth: 0,
follow: false,
enabled: true,
animation: true,
style: {
fontFamily: "Microsoft YaHei, Hiragino Sans GB W3",
color: "#c4c6c6",
fontSize: "12px",
fontWeight: ""
}
},
"maxSize": 80,
"fillColorOpacity": 0.5,
"step": false,
"force": false,
"minSize": 15,
"displayNegative": true,
"categoryGap": "16.0%",
"borderColor": "rgb(255,255,255)",
"borderWidth": 1,
"gap": "22.0%",
"animation": true,
"lineWidth": 2,
"bubble": {
"large": false,
"connectNulls": false,
"shadow": true,
"curve": false,
"sizeBy": "area",
"maxSize": 80,
"minSize": 15,
"lineWidth": 0,
"animation": true,
"fillColorOpacity": 0.699999988079071,
"marker": {
"symbol": "circle",
"radius": 28.39695010101295,
"enabled": true
maxSize: 80,
fillColorOpacity: 0.5,
step: false,
force: false,
minSize: 15,
displayNegative: true,
categoryGap: "16.0%",
borderColor: "rgb(255,255,255)",
borderWidth: 1,
gap: "22.0%",
animation: true,
lineWidth: 2,
bubble: {
large: false,
connectNulls: false,
shadow: true,
curve: false,
sizeBy: "area",
maxSize: 80,
minSize: 15,
lineWidth: 0,
animation: true,
fillColorOpacity: 0.699999988079071,
marker: {
symbol: "circle",
radius: 28.39695010101295,
enabled: true
}
}
},
"dTools": {
"enabled": false,
"style": {
"fontFamily": "Microsoft YaHei, Hiragino Sans GB W3",
"color": "#1a1a1a",
"fontSize": "12px"
dTools: {
enabled: false,
style: {
fontFamily: "Microsoft YaHei, Hiragino Sans GB W3",
color: "#1a1a1a",
fontSize: "12px"
},
"backgroundColor": 'white'
backgroundColor: "white"
},
"dataSheet": {
"enabled": false,
"borderColor": "rgb(0,0,0)",
"borderWidth": 1,
"formatter": this._contentFormat2Decimal,
"style": {
"fontFamily": "inherit", "color": "inherit", "fontSize": "12px"
dataSheet: {
enabled: false,
borderColor: "rgb(0,0,0)",
borderWidth: 1,
formatter: this._contentFormat2Decimal,
style: {
fontFamily: "inherit", color: "inherit", fontSize: "12px"
}
},
"borderColor": "rgb(238,238,238)",
"shadow": false,
"legend": {
"borderColor": "rgb(204,204,204)",
"borderRadius": 0,
"shadow": false,
"borderWidth": 0,
"visible": true,
"style": {
"fontFamily": "inherit", "color": "inherit", "fontSize": "12px"
borderColor: "rgb(238,238,238)",
shadow: false,
legend: {
borderColor: "rgb(204,204,204)",
borderRadius: 0,
shadow: false,
borderWidth: 0,
visible: true,
style: {
fontFamily: "inherit", color: "inherit", fontSize: "12px"
},
"position": "right",
"enabled": false
position: "right",
enabled: false
},
"rangeLegend": {
"range": {
"min": 0,
"color": [
rangeLegend: {
range: {
min: 0,
color: [
[
0,
"rgb(182,226,255)"
@ -252,40 +252,40 @@ BI.ChartCombineFormatItemFactory = {
"rgb(36,167,255)"
]
],
"max": 266393
max: 266393
},
"enabled": false
enabled: false
},
"zoom": {"zoomType": "xy", "zoomTool": {"visible": false, "resize": true, "from": "", "to": ""}},
"plotBorderColor": "rgba(255,255,255,0)",
"tools": {
"hidden": false,
"toImage": {"enabled": false},
"sort": {"enabled": false},
"fullScreen": {"enabled": false},
"refresh": {
"enabled": false
zoom: {zoomType: "xy", zoomTool: {visible: false, resize: true, from: "", to: ""}},
plotBorderColor: "rgba(255,255,255,0)",
tools: {
hidden: false,
toImage: {enabled: false},
sort: {enabled: false},
fullScreen: {enabled: false},
refresh: {
enabled: false
}
},
"plotBorderWidth": 0,
"style": "normal",
"colors": ["rgb(99,178,238)", "rgb(118,218,145)"],
"borderRadius": 0,
"borderWidth": 0,
"plotShadow": false,
"plotBorderRadius": 0
plotBorderWidth: 0,
style: "normal",
colors: ["rgb(99,178,238)", "rgb(118,218,145)"],
borderRadius: 0,
borderWidth: 0,
plotShadow: false,
plotBorderRadius: 0
};
},
_contentFormat: function () {
return BI.contentFormat(arguments[0], '')
return BI.contentFormat(arguments[0], "");
},
_contentFormat2Decimal: function () {
return BI.contentFormat(arguments[0], '#.##;-#.##')
return BI.contentFormat(arguments[0], "#.##;-#.##");
},
_contentFormatPercentage: function () {
return BI.contentFormat(arguments[0], '#.##%;-#.##%')
return BI.contentFormat(arguments[0], "#.##%;-#.##%");
}
};

6
src/base/canvas/canvas.js

@ -10,14 +10,14 @@ BI.Canvas = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.Canvas.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-canvas"
})
});
},
_init: function () {
BI.Canvas.superclass._init.apply(this, arguments);
var self = this, o = this.options;
var canvas = document.createElement("canvas");
if (!document.createElement('canvas').getContext) {
if (!document.createElement("canvas").getContext) {
canvas = window.G_vmlCanvasManager.initElement(canvas);
}
this.element.append(canvas);
@ -35,7 +35,7 @@ BI.Canvas = BI.inherit(BI.Widget, {
_getContext: function () {
if (!this.ctx) {
this.ctx = this.canvas.getContext('2d');
this.ctx = this.canvas.getContext("2d");
}
return this.ctx;
},

10
src/base/collection/collection.js

@ -100,7 +100,7 @@ BI.CollectionView = BI.inherit(BI.Widget, {
_cellRenderers: function (height, width, x, y) {
this._lastRenderedCellIndices = this._sectionManager.getCellIndices(height, width, x, y);
return this._cellGroupRenderer()
return this._cellGroupRenderer();
},
_cellGroupRenderer: function () {
@ -239,7 +239,7 @@ BI.CollectionView = BI.inherit(BI.Widget, {
});
var addedItems = [];
BI.each(addSet, function (index, key) {
addedItems.push(renderedCells[key[1]])
addedItems.push(renderedCells[key[1]]);
});
this.container.addItems(addedItems);
// 拦截父子级关系
@ -315,7 +315,7 @@ BI.CollectionView = BI.inherit(BI.Widget, {
if (this.options.overflowX !== !!b) {
this.options.overflowX = !!b;
BI.nextTick(function () {
self.element.css({overflowX: !!b ? "auto" : "hidden"});
self.element.css({overflowX: b ? "auto" : "hidden"});
});
}
},
@ -325,7 +325,7 @@ BI.CollectionView = BI.inherit(BI.Widget, {
if (this.options.overflowY !== !!b) {
this.options.overflowY = !!b;
BI.nextTick(function () {
self.element.css({overflowY: !!b ? "auto" : "hidden"});
self.element.css({overflowY: b ? "auto" : "hidden"});
});
}
},
@ -375,4 +375,4 @@ BI.CollectionView = BI.inherit(BI.Widget, {
}
});
BI.CollectionView.EVENT_SCROLL = "EVENT_SCROLL";
BI.shortcut('bi.collection_view', BI.CollectionView);
BI.shortcut("bi.collection_view", BI.CollectionView);

20
src/base/combination/combo.js

@ -26,7 +26,7 @@ BI.Combo = BI.inherit(BI.Widget, {
popup: {},
comboClass: "bi-combo-popup",
hoverClass: "bi-combo-hover"
})
});
},
_init: function () {
@ -319,31 +319,31 @@ BI.Combo = BI.inherit(BI.Widget, {
switch (o.direction) {
case "bottom":
case "bottom,right":
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ['bottom', 'top', 'right', 'left'], o.offsetStyle);
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ["bottom", "top", "right", "left"], o.offsetStyle);
break;
case "top":
case "top,right":
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ['top', 'bottom', 'right', 'left'], o.offsetStyle);
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ["top", "bottom", "right", "left"], o.offsetStyle);
break;
case "left":
case "left,bottom":
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ['left', 'right', 'bottom', 'top'], o.offsetStyle);
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["left", "right", "bottom", "top"], o.offsetStyle);
break;
case "right":
case "right,bottom":
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ['right', 'left', 'bottom', 'top'], o.offsetStyle);
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "bottom", "top"], o.offsetStyle);
break;
case "top,left":
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ['top', 'bottom', 'left', 'right'], o.offsetStyle);
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ["top", "bottom", "left", "right"], o.offsetStyle);
break;
case "bottom,left":
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ['bottom', 'top', 'left', 'right'], o.offsetStyle);
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ["bottom", "top", "left", "right"], o.offsetStyle);
break;
case "left,top":
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ['left', 'right', 'top', 'bottom'], o.offsetStyle);
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["left", "right", "top", "bottom"], o.offsetStyle);
break;
case "right,top":
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ['right', 'left', 'top', 'bottom'], o.offsetStyle);
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "top", "bottom"], o.offsetStyle);
break;
case "top,custom":
case "custom,top":
@ -368,7 +368,7 @@ BI.Combo = BI.inherit(BI.Widget, {
}
if ("adaptHeight" in p) {
this.resetListHeight(p['adaptHeight']);
this.resetListHeight(p["adaptHeight"]);
}
if ("left" in p) {
this.popupView.element.css({

10
src/base/combination/expander.js

@ -18,7 +18,7 @@ BI.Expander = BI.inherit(BI.Widget, {
popup: {},
expanderClass: "bi-expander-popup",
hoverClass: "bi-expander-hover"
})
});
},
_init: function () {
@ -92,13 +92,13 @@ BI.Expander = BI.inherit(BI.Widget, {
self.element[e](function (e) {
if (self.isEnabled() && self.isValid() && self.expander.isEnabled() && self.expander.isValid()) {
self._popupView();
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, '', self.expander);
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, "", self.expander);
self.fireEvent(BI.Expander.EVENT_EXPAND);
}
}, function () {
if (self.isEnabled() && self.isValid() && self.expander.isEnabled() && self.expander.isValid() && o.toggle) {
self._hideView();
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, '', self.expander);
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, "", self.expander);
self.fireEvent(BI.Expander.EVENT_COLLAPSE);
}
});
@ -113,7 +113,7 @@ BI.Expander = BI.inherit(BI.Widget, {
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, "", self.expander);
self.fireEvent(BI.Expander.EVENT_EXPAND);
} else {
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, '', self.expander);
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, "", self.expander);
self.fireEvent(BI.Expander.EVENT_COLLAPSE);
}
}
@ -122,7 +122,7 @@ BI.Expander = BI.inherit(BI.Widget, {
}
break;
}
})
});
},
_initExpander: function () {

18
src/base/combination/group.button.js

@ -16,7 +16,7 @@ BI.ButtonGroup = BI.inherit(BI.Widget, {
hgap: 0,
vgap: 0
}]
})
});
},
_init: function () {
@ -25,7 +25,7 @@ BI.ButtonGroup = BI.inherit(BI.Widget, {
BI.each(this.options.behaviors, function (key, rule) {
behaviors[key] = BI.BehaviorFactory.createBehavior(key, {
rule: rule
})
});
});
this.behaviors = behaviors;
this.populate(this.options.items);
@ -65,7 +65,7 @@ BI.ButtonGroup = BI.inherit(BI.Widget, {
});
btn.on(BI.Events.DESTROY, function () {
BI.remove(self.buttons, btn);
})
});
});
return buttons;
@ -81,8 +81,8 @@ BI.ButtonGroup = BI.inherit(BI.Widget, {
el: it
})
]
})
})
});
});
}
return btns;
},
@ -95,8 +95,8 @@ BI.ButtonGroup = BI.inherit(BI.Widget, {
}
return BI.extend({}, item, {
el: btns[i]
})
})
});
});
},
_packageItems: function (items, packBtns) {
@ -117,7 +117,7 @@ BI.ButtonGroup = BI.inherit(BI.Widget, {
// 如果是一个简单的layout
_isSimpleLayout: function () {
var o = this.options;
return o.layouts.length === 1 && !BI.isArray(o.items[0])
return o.layouts.length === 1 && !BI.isArray(o.items[0]);
},
doBehavior: function () {
@ -125,7 +125,7 @@ BI.ButtonGroup = BI.inherit(BI.Widget, {
args.unshift(this.buttons);
BI.each(this.behaviors, function (i, behavior) {
behavior.doBehavior.apply(behavior, args);
})
});
},
prependItems: function (items) {

8
src/base/combination/group.combo.js

@ -27,7 +27,7 @@ BI.ComboGroup = BI.inherit(BI.Widget, {
}]
}
}
})
});
},
_init: function () {
@ -57,7 +57,7 @@ BI.ComboGroup = BI.inherit(BI.Widget, {
ch.adjustLength = o.adjustLength;
ch.popup = o.popup;
}
})
});
this.combo = BI.createWidget({
type: "bi.combo",
element: this,
@ -74,13 +74,13 @@ BI.ComboGroup = BI.inherit(BI.Widget, {
items: children
}, o.popup.el)
})
})
});
this.combo.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
if (type === BI.Events.CLICK) {
self.fireEvent(BI.ComboGroup.EVENT_CHANGE, obj);
}
})
});
},
getValue: function () {

6
src/base/combination/group.virtual.js

@ -8,7 +8,7 @@ BI.VirtualGroup = BI.inherit(BI.Widget, {
hgap: 0,
vgap: 0
}]
})
});
},
render: function () {
@ -26,8 +26,8 @@ BI.VirtualGroup = BI.inherit(BI.Widget, {
el: BI.stripEL(it)
})
]
})
})
});
});
}
return items;
},

8
src/base/combination/loader.js

@ -32,7 +32,7 @@ BI.Loader = BI.inherit(BI.Widget, {
next: {},
hasPrev: BI.emptyFn,
hasNext: BI.emptyFn
})
});
},
_prevLoad: function () {
@ -95,7 +95,7 @@ BI.Loader = BI.inherit(BI.Widget, {
if (type === BI.Events.CLICK) {
self._nextLoad();
}
})
});
}
BI.createWidget(BI.extend({
@ -122,7 +122,7 @@ BI.Loader = BI.inherit(BI.Widget, {
return !!o.hasPrev.apply(this, [{
times: this.times,
count: this.count
}])
}]);
},
hasNext: function () {
@ -133,7 +133,7 @@ BI.Loader = BI.inherit(BI.Widget, {
return !!o.hasNext.apply(this, [{
times: this.times,
count: this.count
}])
}]);
},
prependItems: function (items) {

2
src/base/combination/navigation.js

@ -18,7 +18,7 @@ BI.Navigation = BI.inherit(BI.Widget, {
afterCardCreated: BI.emptyFn,
afterCardShow: BI.emptyFn
})
});
},
render: function () {

10
src/base/combination/searcher.js

@ -24,7 +24,7 @@ BI.Searcher = BI.inherit(BI.Widget, {
// isAutoSearch为false时启用
onSearch: function (op, callback) {
callback([])
callback([]);
},
el: {
@ -39,7 +39,7 @@ BI.Searcher = BI.inherit(BI.Widget, {
masker: { // masker层
offset: {}
}
})
});
},
_init: function () {
@ -79,7 +79,7 @@ BI.Searcher = BI.inherit(BI.Widget, {
self._pauseSearch();
break;
}
})
});
},
_assertPopupView: function () {
@ -268,9 +268,9 @@ BI.Searcher = BI.inherit(BI.Widget, {
return this.popupView.getValue();
} else if (o.adapter && o.adapter.getValue) {
return o.adapter.getValue();
} else {
return this.popupView.getValue();
}
return this.popupView.getValue();
},
populate: function (result, searchResult, keyword) {

12
src/base/combination/switcher.js

@ -19,7 +19,7 @@ BI.Switcher = BI.inherit(BI.Widget, {
masker: {},
switcherClass: "bi-switcher-popup",
hoverClass: "bi-switcher-hover"
})
});
},
_init: function () {
@ -89,13 +89,13 @@ BI.Switcher = BI.inherit(BI.Widget, {
self.element[e](function (e) {
if (self.isEnabled() && self.switcher.isEnabled()) {
self._popupView();
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, '', self.switcher);
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, "", self.switcher);
self.fireEvent(BI.Switcher.EVENT_EXPAND);
}
}, function () {
if (self.isEnabled() && self.switcher.isEnabled() && o.toggle) {
self._hideView();
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, '', self.switcher);
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, "", self.switcher);
self.fireEvent(BI.Switcher.EVENT_COLLAPSE);
}
});
@ -107,10 +107,10 @@ BI.Switcher = BI.inherit(BI.Widget, {
if (self.isEnabled() && self.switcher.isEnabled()) {
o.toggle ? self._toggle() : self._popupView();
if (self.isExpanded()) {
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, '', self.switcher);
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, "", self.switcher);
self.fireEvent(BI.Switcher.EVENT_EXPAND);
} else {
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, '', self.switcher);
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, "", self.switcher);
self.fireEvent(BI.Switcher.EVENT_COLLAPSE);
}
}
@ -119,7 +119,7 @@ BI.Switcher = BI.inherit(BI.Widget, {
}
break;
}
})
});
},
_initSwitcher: function () {

4
src/base/combination/tab.js

@ -16,7 +16,7 @@ BI.Tab = BI.inherit(BI.Widget, {
cardCreator: function (v) {
return BI.createWidget();
}
})
});
},
render: function () {
@ -25,7 +25,7 @@ BI.Tab = BI.inherit(BI.Widget, {
this.tab = BI.createWidget(this.options.tab, {type: "bi.button_group"});
this.tab.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
})
});
}
this.cardMap = {};
this.layout = BI.createWidget({

2
src/base/combination/tree.button.js

@ -8,7 +8,7 @@ BI.ButtonTree = BI.inherit(BI.ButtonGroup, {
_defaultConfig: function () {
return BI.extend(BI.ButtonTree.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-button-tree"
})
});
},
_init: function () {

4
src/base/el.js

@ -24,7 +24,7 @@ BI.EL = BI.inherit(BI.Widget, {
});
this.ele.on(BI.Controller.EVENT_CHANGE, function () {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
})
});
},
setValue: function (v) {
@ -39,4 +39,4 @@ BI.EL = BI.inherit(BI.Widget, {
this.ele.populate.apply(this, arguments);
}
});
BI.shortcut('bi.el', BI.EL);
BI.shortcut("bi.el", BI.EL);

2
src/base/formula/codemirror/formula-hint.js

@ -64,7 +64,7 @@
return e.getTokenAt(cur);
},
options);
};
}
CodeMirror.registerHelper("hint", "formula", formulaHint);
function getCompletions (token, context, keywords, options) {

10
src/base/formula/codemirror/formula-mode.js

@ -3,14 +3,14 @@
})(function (CodeMirror) {
"use strict";
CodeMirror.defineMode('formula', function () {
CodeMirror.defineMode("formula", function () {
function wordObj (words) {
var o = {};
for (var i = 0, e = words.length; i < e; ++i) o[words[i]] = true;
return o;
}
var atoms = wordObj(['false', 'true']);
var atoms = wordObj(["false", "true"]);
var keywords = wordObj(BI.FormulaCollections);
function tokenBase (stream, state) {
@ -19,16 +19,16 @@
}
var ch = stream.next();
if (ch === '"' || ch === '\'') {
if (ch === "\"" || ch === "'") {
nextUntilUnescaped(stream, ch);
return "string";
}
if (ch === '\u200b') {
if (ch === "\u200b") {
nextUntilUnescaped(stream, ch);
return "field";
}
if (/[\[\],\(\)]/.test(ch)) {
return 'bracket';
return "bracket";
}
// richie:暂时不需要解析操作符号

55
src/base/formula/codemirror/show-hint.js

@ -140,17 +140,19 @@
var editor = this.cm.options.hintOptions;
var out = {};
for (var prop in defaultOptions) out[prop] = defaultOptions[prop];
if (editor) for (var prop in editor)
if (editor[prop] !== undefined) out[prop] = editor[prop];
if (options) for (var prop in options)
if (options[prop] !== undefined) out[prop] = options[prop];
if (editor) {
for (var prop in editor) {if (editor[prop] !== undefined) out[prop] = editor[prop];}
}
if (options) {
for (var prop in options) {if (options[prop] !== undefined) out[prop] = options[prop];}
}
return out;
}
};
function getText (completion) {
if (typeof completion == "string") return completion;
else return completion.text;
if (typeof completion === "string") return completion;
return completion.text;
}
function buildKeyMap (completion, handle) {
@ -182,25 +184,27 @@
function addBinding (key, val) {
var bound;
if (typeof val != "string")
if (typeof val !== "string") {
bound = function (cm) {
return val(cm, handle);
};
}
// This mechanism is deprecated
else if (baseMap.hasOwnProperty(val))
bound = baseMap[val];
else
bound = val;
else if (baseMap.hasOwnProperty(val)) {bound = baseMap[val];} else {bound = val;}
ourMap[key] = bound;
}
if (custom)
for (var key in custom) if (custom.hasOwnProperty(key))
addBinding(key, custom[key]);
if (custom) {
for (var key in custom) {
if (custom.hasOwnProperty(key)) {addBinding(key, custom[key]);}
}
}
var extra = completion.options.extraKeys;
if (extra)
for (var key in extra) if (extra.hasOwnProperty(key))
addBinding(key, extra[key]);
if (extra) {
for (var key in extra) {
if (extra.hasOwnProperty(key)) {addBinding(key, extra[key]);}
}
}
return ourMap;
}
@ -366,19 +370,13 @@
},
changeActive: function (i, avoidWrap) {
if (i >= this.data.list.length)
i = avoidWrap ? this.data.list.length - 1 : 0;
else if (i < 0)
i = avoidWrap ? 0 : this.data.list.length - 1;
if (i >= this.data.list.length) {i = avoidWrap ? this.data.list.length - 1 : 0;} else if (i < 0) {i = avoidWrap ? 0 : this.data.list.length - 1;}
if (this.selectedHint == i) return;
var node = this.hints.childNodes[this.selectedHint];
node.className = node.className.replace(" " + ACTIVE_HINT_ELEMENT_CLASS, "");
node = this.hints.childNodes[this.selectedHint = i];
node.className += " " + ACTIVE_HINT_ELEMENT_CLASS;
if (node.offsetTop < this.hints.scrollTop)
this.hints.scrollTop = node.offsetTop - 3;
else if (node.offsetTop + node.offsetHeight > this.hints.scrollTop + this.hints.clientHeight)
this.hints.scrollTop = node.offsetTop + node.offsetHeight - this.hints.clientHeight + 3;
if (node.offsetTop < this.hints.scrollTop) {this.hints.scrollTop = node.offsetTop - 3;} else if (node.offsetTop + node.offsetHeight > this.hints.scrollTop + this.hints.clientHeight) {this.hints.scrollTop = node.offsetTop + node.offsetHeight - this.hints.clientHeight + 3;}
CodeMirror.signal(this.data, "select", this.data.list[this.selectedHint], node);
},
@ -406,15 +404,16 @@
var found = [];
for (var i = 0; i < options.words.length; i++) {
var word = options.words[i];
if (word.slice(0, token.string.length) == token.string)
found.push(word);
if (word.slice(0, token.string.length) == token.string) {found.push(word);}
}
if (found.length) return {
if (found.length) {
return {
list: found,
from: CodeMirror.Pos(cur.line, token.start),
to: CodeMirror.Pos(cur.line, token.end)
};
}
});
CodeMirror.commands.autocomplete = CodeMirror.showHint;

2
src/base/formula/config.js

File diff suppressed because one or more lines are too long

14
src/base/formula/formulaeditor.js

@ -6,9 +6,9 @@
BI.FormulaEditor = BI.inherit(BI.Single, {
_defaultConfig: function () {
return $.extend(BI.FormulaEditor.superclass._defaultConfig.apply(), {
baseCls: 'bi-formula-editor bi-card',
watermark: '',
value: '',
baseCls: "bi-formula-editor bi-card",
watermark: "",
value: "",
fieldTextValueMap: {},
showHint: true,
lineHeight: 2
@ -21,7 +21,7 @@ BI.FormulaEditor = BI.inherit(BI.Single, {
textWrapping: true,
lineWrapping: true,
lineNumbers: false,
mode: 'formula',
mode: "formula",
// 解决插入字段由括号或其他特殊字符包围时分裂的bug
specialChars: /[\u0000-\u001f\u007f\u00ad\u200c-\u200f\u2028\u2029\ufeff]/
});
@ -32,7 +32,7 @@ BI.FormulaEditor = BI.inherit(BI.Single, {
CodeMirror.showHint(cm, CodeMirror.formulaHint, {completeSingle: false});
}
BI.nextTick(function () {
self.fireEvent(BI.FormulaEditor.EVENT_CHANGE)
self.fireEvent(BI.FormulaEditor.EVENT_CHANGE);
});
});
@ -115,9 +115,9 @@ BI.FormulaEditor = BI.inherit(BI.Single, {
insertField: function (field) {
var from = this.editor.getCursor();
// 解决插入字段由括号或其他特殊字符包围时分裂的bug,在两端以不可见字符包裹一下
this.editor.replaceSelection('\u200b' + field + '\u200b');
this.editor.replaceSelection("\u200b" + field + "\u200b");
var to = this.editor.getCursor();
this.editor.markText(from, to, {className: 'fieldName', atomic: true, startStyle: "start", endStyle: "end"});
this.editor.markText(from, to, {className: "fieldName", atomic: true, startStyle: "start", endStyle: "end"});
this.editor.replaceSelection(" ");
this.editor.focus();
},

54
src/base/foundation/message.js

@ -43,28 +43,28 @@ $.extend(BI, {
BI.delay(function () {
toast.element.slideUp(500, function () {
toast.destroy();
})
}, 5000)
})
});
}, 5000);
});
},
_show: function (hasCancel, title, message, callback) {
$mask = $('<div class="bi-z-index-mask">').css({
position: 'absolute',
'zIndex': BI.zIndex_tip - 2,
$mask = $("<div class=\"bi-z-index-mask\">").css({
position: "absolute",
zIndex: BI.zIndex_tip - 2,
top: 0,
left: 0,
right: 0,
bottom: 0,
opacity: 0.5
}).appendTo('body');
$pop = $('<div class="bi-message-depend">').css({
position: 'absolute',
'zIndex': BI.zIndex_tip - 1,
}).appendTo("body");
$pop = $("<div class=\"bi-message-depend\">").css({
position: "absolute",
zIndex: BI.zIndex_tip - 1,
top: 0,
left: 0,
right: 0,
bottom: 0
}).appendTo('body');
}).appendTo("body");
var close = function () {
messageShow.destroy();
$mask.remove();
@ -73,10 +73,10 @@ $.extend(BI, {
if (hasCancel === true) {
controlItems.push({
el: {
type: 'bi.button',
type: "bi.button",
text: BI.i18nText("BI-Basic_Cancel"),
height: 30,
level: 'ignore',
level: "ignore",
handler: function () {
close();
if (BI.isFunction(callback)) {
@ -88,7 +88,7 @@ $.extend(BI, {
}
controlItems.push({
el: {
type: 'bi.button',
type: "bi.button",
text: BI.i18nText("BI-Basic_OK"),
height: 30,
handler: function () {
@ -101,30 +101,30 @@ $.extend(BI, {
});
var conf = {
element: $pop,
type: 'bi.center_adapt',
type: "bi.center_adapt",
items: [
{
type: 'bi.border',
cls: 'bi-message-content bi-card',
type: "bi.border",
cls: "bi-message-content bi-card",
items: {
'north': {
north: {
el: {
type: 'bi.border',
cls: 'bi-message-title bi-background',
type: "bi.border",
cls: "bi-message-title bi-background",
items: {
center: {
el: {
type: 'bi.label',
type: "bi.label",
text: title || BI.i18nText("BI-Basic_Prompt"),
textAlign: 'left',
textAlign: "left",
hgap: 20,
height: 50
}
},
east: {
el: {
type: 'bi.icon_button',
cls: 'bi-message-close close-font',
type: "bi.icon_button",
cls: "bi-message-close close-font",
// height: 50,
handler: function () {
close();
@ -136,7 +136,7 @@ $.extend(BI, {
},
height: 50
},
'center': {
center: {
el: {
type: "bi.text",
cls: "bi-message-text",
@ -147,12 +147,12 @@ $.extend(BI, {
text: message
}
},
'south': {
south: {
el: {
type: "bi.absolute",
items: [{
el: {
type: 'bi.right_vertical_adapt',
type: "bi.right_vertical_adapt",
hgap: 5,
items: controlItems
},

16
src/base/grid/grid.js

@ -73,7 +73,7 @@ BI.GridView = BI.inherit(BI.Widget, {
return {
overscanStartIndex: Math.max(0, startIndex - overscanCellsCount),
overscanStopIndex: Math.min(cellCount - 1, stopIndex + overscanCellsCount)
}
};
},
_calculateChildrenToRender: function () {
@ -98,7 +98,7 @@ BI.GridView = BI.inherit(BI.Widget, {
this._renderedRowStartIndex = visibleRowIndices.start;
this._renderedRowStopIndex = visibleRowIndices.stop;
var overscanColumnIndices = this._getOverscanIndices(this.columnCount, overscanColumnCount, this._renderedColumnStartIndex, this._renderedColumnStopIndex)
var overscanColumnIndices = this._getOverscanIndices(this.columnCount, overscanColumnCount, this._renderedColumnStartIndex, this._renderedColumnStopIndex);
var overscanRowIndices = this._getOverscanIndices(this.rowCount, overscanRowCount, this._renderedRowStartIndex, this._renderedRowStopIndex);
@ -204,7 +204,7 @@ BI.GridView = BI.inherit(BI.Widget, {
});
var addedItems = [];
BI.each(addSet, function (index, key) {
addedItems.push(renderedCells[key[2]])
addedItems.push(renderedCells[key[2]]);
});
this.container.addItems(addedItems);
// 拦截父子级关系
@ -280,11 +280,11 @@ BI.GridView = BI.inherit(BI.Widget, {
},
setColumnCount: function (columnCount) {
this.options.columnCount = columnCount
this.options.columnCount = columnCount;
},
setRowCount: function (rowCount) {
this.options.rowCount = rowCount
this.options.rowCount = rowCount;
},
setOverflowX: function (b) {
@ -292,7 +292,7 @@ BI.GridView = BI.inherit(BI.Widget, {
if (this.options.overflowX !== !!b) {
this.options.overflowX = !!b;
BI.nextTick(function () {
self.element.css({overflowX: !!b ? "auto" : "hidden"});
self.element.css({overflowX: b ? "auto" : "hidden"});
});
}
},
@ -302,7 +302,7 @@ BI.GridView = BI.inherit(BI.Widget, {
if (this.options.overflowY !== !!b) {
this.options.overflowY = !!b;
BI.nextTick(function () {
self.element.css({overflowY: !!b ? "auto" : "hidden"});
self.element.css({overflowY: b ? "auto" : "hidden"});
});
}
},
@ -360,4 +360,4 @@ BI.GridView = BI.inherit(BI.Widget, {
}
});
BI.GridView.EVENT_SCROLL = "EVENT_SCROLL";
BI.shortcut('bi.grid_view', BI.GridView);
BI.shortcut("bi.grid_view", BI.GridView);

22
src/base/layer/layer.floatbox.js

@ -9,7 +9,7 @@ BI.FloatBox = BI.inherit(BI.Widget, {
baseCls: "bi-float-box bi-card",
width: 600,
height: 500
})
});
},
_init: function () {
BI.FloatBox.superclass._init.apply(this, arguments);
@ -41,13 +41,13 @@ BI.FloatBox = BI.inherit(BI.Widget, {
});
this._south = BI.createWidget();
BI.createWidget({
type: 'bi.border',
type: "bi.border",
element: this,
items: {
'north': {
north: {
el: {
type: 'bi.border',
cls: 'bi-message-title bi-background',
type: "bi.border",
cls: "bi-message-title bi-background",
items: {
center: {
el: {
@ -63,8 +63,8 @@ BI.FloatBox = BI.inherit(BI.Widget, {
},
east: {
el: {
type: 'bi.icon_button',
cls: 'bi-message-close close-font',
type: "bi.icon_button",
cls: "bi-message-close close-font",
height: 50,
handler: function () {
self.currentSectionProvider.close();
@ -76,7 +76,7 @@ BI.FloatBox = BI.inherit(BI.Widget, {
},
height: 50
},
'center': {
center: {
el: {
type: "bi.absolute",
items: [{
@ -88,7 +88,7 @@ BI.FloatBox = BI.inherit(BI.Widget, {
}]
}
},
'south': {
south: {
el: {
type: "bi.absolute",
items: [{
@ -102,7 +102,7 @@ BI.FloatBox = BI.inherit(BI.Widget, {
height: 60
}
}
})
});
},
populate: function (sectionProvider) {
@ -116,7 +116,7 @@ BI.FloatBox = BI.inherit(BI.Widget, {
sectionProvider.rebuildSouth(this._south);
sectionProvider.on(BI.PopoverSection.EVENT_CLOSE, function () {
self.close();
})
});
},
show: function () {

18
src/base/layer/layer.popup.js

@ -7,7 +7,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.PopupView.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-popup-view",
maxWidth: 'auto',
maxWidth: "auto",
minWidth: 100,
// maxHeight: 200,
minHeight: 25,
@ -37,7 +37,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
type: "bi.vertical"
}]
}
})
});
},
_init: function () {
@ -53,12 +53,12 @@ BI.PopupView = BI.inherit(BI.Widget, {
"z-index": BI.zIndex_popup,
"min-width": o.minWidth + "px",
"max-width": o.maxWidth + "px"
}).bind({"click": fn});
}).bind({click: fn});
this.element.bind("mousewheel", fn);
o.stopPropagation && this.element.bind({"mousedown": fn, "mouseup": fn, "mouseover": fn});
o.stopEvent && this.element.bind({"mousedown": stop, "mouseup": stop, "mouseover": stop});
o.stopPropagation && this.element.bind({mousedown: fn, mouseup: fn, mouseover: fn});
o.stopEvent && this.element.bind({mousedown: stop, mouseup: stop, mouseover: stop});
this.tool = this._createTool();
this.tab = this._createTab();
this.view = this._createView();
@ -103,7 +103,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
if (false === o.tool) {
return;
}
return BI.createWidget(o.tool)
return BI.createWidget(o.tool);
},
_createTab: function () {
@ -116,7 +116,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
cls: "list-view-tab",
height: 25,
items: o.tabs
})
});
},
_createToolBar: function () {
@ -134,7 +134,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
shadow: true,
isShadowShowingOnSelected: true
})
})
});
},
getView: function () {
@ -155,7 +155,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
tabHeight = this.tab ? (this.tab.attr("height") || 25) : 0,
toolHeight = ((this.tool && this.tool.attr("height")) || 25) * ((this.tool && this.tool.isVisible()) ? 1 : 0);
this.view.resetHeight ? this.view.resetHeight(h - tbHeight - tabHeight - toolHeight - 2) :
this.view.element.css({"max-height": (h - tbHeight - tabHeight - toolHeight - 2) + "px"})
this.view.element.css({"max-height": (h - tbHeight - tabHeight - toolHeight - 2) + "px"});
},
setValue: function (selectedValues) {

2
src/base/layer/layer.searcher.js

@ -38,7 +38,7 @@ BI.SearcherView = BI.inherit(BI.Pane, {
type: "bi.vertical"
}]
}
})
});
},
_init: function () {

4
src/base/list/listview.js

@ -35,7 +35,7 @@ BI.ListView = BI.inherit(BI.Widget, {
}
}, o.el)],
element: this
}
};
},
mounted: function () {
@ -106,5 +106,5 @@ BI.ListView = BI.inherit(BI.Widget, {
this.restore();
}
});
BI.shortcut('bi.list_view', BI.ListView);
BI.shortcut("bi.list_view", BI.ListView);

4
src/base/list/virtuallist.js

@ -44,7 +44,7 @@ BI.VirtualList = BI.inherit(BI.Widget, {
}
}],
element: this
}
};
},
mounted: function () {
@ -175,5 +175,5 @@ BI.VirtualList = BI.inherit(BI.Widget, {
this.restore();
}
});
BI.shortcut('bi.virtual_list', BI.VirtualList);
BI.shortcut("bi.virtual_list", BI.VirtualList);

16
src/base/pager/pager.js

@ -38,7 +38,7 @@ BI.Pager = BI.inherit(BI.Widget, {
},
hasPrev: BI.emptyFn, // pages不可用时有效
hasNext: BI.emptyFn // pages不可用时有效
})
});
},
_init: function () {
BI.Pager.superclass._init.apply(this, arguments);
@ -81,7 +81,7 @@ BI.Pager = BI.inherit(BI.Widget, {
text: prev,
value: "prev",
disabled: pages === false ? o.hasPrev(curr) === false : !(curr > 1 && prev !== false)
})
});
} else {
view.push(BI.extend({
disabled: pages === false ? o.hasPrev(curr) === false : !(curr > 1 && prev !== false)
@ -126,12 +126,12 @@ BI.Pager = BI.inherit(BI.Widget, {
text: s,
value: s,
selected: true
})
});
} else {
view.push({
text: s,
value: s
})
});
}
}
@ -148,7 +148,7 @@ BI.Pager = BI.inherit(BI.Widget, {
text: last,
value: "last",
disabled: !(pages > groups && dict.end < pages && groups !== 0)
})
});
}
// 当前页不为尾页时,输出下一页
@ -157,18 +157,18 @@ BI.Pager = BI.inherit(BI.Widget, {
view.push((function () {
if (BI.isKey(next)) {
if (pages === false) {
return {text: next, value: "next", disabled: o.hasNext(curr) === false}
return {text: next, value: "next", disabled: o.hasNext(curr) === false};
}
return (dict.flow && curr === pages)
?
{text: next, value: "next", disabled: true}
:
{text: next, value: "next", disabled: !(curr !== pages && next || dict.flow)};
} else {
}
return BI.extend({
disabled: pages === false ? o.hasNext(curr) === false : !(curr !== pages && next || dict.flow)
}, next);
}
}()));
}

6
src/base/pane.js

@ -14,7 +14,7 @@ BI.Pane = BI.inherit(BI.Widget, {
tipText: BI.i18nText("BI-No_Selected_Item"),
overlap: true,
onLoaded: BI.emptyFn
})
});
},
_init: function () {
@ -44,7 +44,7 @@ BI.Pane = BI.inherit(BI.Widget, {
if (o.overlap === true) {
if (!BI.Layers.has(this.getName())) {
BI.createWidget({
type: 'bi.vtape',
type: "bi.vtape",
items: [{
el: {
type: "bi.layout",
@ -72,7 +72,7 @@ BI.Pane = BI.inherit(BI.Widget, {
right: 0,
top: 0
}]
})
});
}
},

2
src/base/single/a/a.js

@ -15,7 +15,7 @@ BI.A = BI.inherit(BI.Text, {
target: "_blank",
el: null,
element: "<a/>"
})
});
},
_init: function () {
var o = this.options;

16
src/base/single/bar/bar.loading.js

@ -7,10 +7,10 @@ BI.LoadingBar = BI.inherit(BI.Single, {
_defaultConfig: function () {
var conf = BI.LoadingBar.superclass._defaultConfig.apply(this, arguments);
return BI.extend( conf, {
baseCls : (conf.baseCls ||"")+' bi-loading-bar bi-tips',
baseCls: (conf.baseCls || "") + " bi-loading-bar bi-tips",
height: 30,
handler: BI.emptyFn
})
});
},
_init: function () {
BI.LoadingBar.superclass._init.apply(this, arguments);
@ -21,25 +21,25 @@ BI.LoadingBar = BI.inherit(BI.Single, {
text: BI.i18nText("BI-Load_More"),
width: 120,
handler: this.options.handler
})
});
this.loaded.on(BI.Controller.EVENT_CHANGE, function (type) {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
})
});
this.loading = BI.createWidget({
type: "bi.layout",
width: this.options.height,
height: this.options.height,
cls: "loading-background cursor-default"
})
});
var loaded = BI.createWidget({
type: "bi.center_adapt",
items: [this.loaded]
})
});
var loading = BI.createWidget({
type: "bi.center_adapt",
items: [this.loading]
})
});
this.cardLayout = BI.createWidget({
type: "bi.card",
element: this,
@ -50,7 +50,7 @@ BI.LoadingBar = BI.inherit(BI.Single, {
el: loading,
cardName: "loading"
}]
})
});
this.invisible();
},

2
src/base/single/button/button.basic.js

@ -24,7 +24,7 @@ BI.BasicButton = BI.inherit(BI.Single, {
isShadowShowingOnSelected: false, // 选中状态下是否显示阴影
trigger: null,
handler: BI.emptyFn
})
});
},
_init: function () {
BI.BasicButton.superclass._init.apply(this, arguments);

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

Loading…
Cancel
Save