diff --git a/bi/base.js b/bi/base.js index 3eb95a678..8e7faa097 100644 --- a/bi/base.js +++ b/bi/base.js @@ -15044,12 +15044,7 @@ BI.PopupView = BI.inherit(BI.Widget, { "max-width": o.maxWidth + "px" }).bind({"click": fn}); - //FIXME IE8下 jquery.mousewheeel.js 第一次执行65行$elem["offsetParent"]()的时候报错:未指明的错误 但是第二次或者调试的时候展开一下$elem内容均能避免上述问题 - try { - this.element.bind("mousewheel", fn); - } catch (e) { - this.element.bind("mousewheel", 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}); @@ -30824,13 +30819,14 @@ BI.Table = BI.inherit(BI.Widget, { .addClass(c === rows.length - 1 ? "last-col" : ""); var w = BI.createWidget(map[r][c], { type: "bi.table_cell", - root: true, textAlign: "left", width: BI.isNumeric(width) ? width : "", height: BI.isNumeric(height) ? height : "", _row: r, _col: c + start }); + self.addWidget(w.getName(), w); + w._mount(); w.element.css("position", "relative"); td.append(w.element); tr.append(td); diff --git a/bi/core.js b/bi/core.js index fdac19401..f6e3aa9f6 100644 --- a/bi/core.js +++ b/bi/core.js @@ -4426,27 +4426,14 @@ BI.Widget = BI.inherit(BI.OB, { } this.beforeMounted && this.beforeMounted(); this._isMounted = true; - this._mountChildren(); + this._mountChildren && this._mountChildren(); BI.each(this._children, function (i, widget) { widget._mount && widget._mount(); }); this.mounted && this.mounted(); }, - _mountChildren: function () { - var self = this; - var frag = document.createDocumentFragment(); - var hasChild = false; - BI.each(this._children, function (i, widget) { - if (widget.element !== self.element) { - frag.appendChild(widget.element[0]); - hasChild = true; - } - }); - if (hasChild === true) { - this.element.append(frag); - } - }, + _mountChildren: null, _unMount: function () { BI.each(this._children, function (i, widget) { @@ -11110,6 +11097,21 @@ BI.Layout = BI.inherit(BI.Widget, { } }, + _mountChildren: function () { + var self = this; + var frag = document.createDocumentFragment(); + var hasChild = false; + BI.each(this._children, function (i, widget) { + if (widget.element !== self.element) { + frag.appendChild(widget.element[0]); + hasChild = true; + } + }); + if (hasChild === true) { + this.element.append(frag); + } + }, + _getChildName: function (index) { return index + ""; }, @@ -17034,7 +17036,7 @@ $(function () { } var rgb = this.rgb2json(this.hex2rgb(hex)); var grayLevel = Math.round(rgb.r * 0.299 + rgb.g * 0.587 + rgb.b * 0.114); - if (grayLevel < 192) { + if (grayLevel < 140) { return true; } return false; diff --git a/bi/widget.css b/bi/widget.css index 30c4bdc6c..3b3cbee3e 100644 --- a/bi/widget.css +++ b/bi/widget.css @@ -333,12 +333,8 @@ -moz-border-radius: 8px 8px 8px 8px; border-radius: 8px 8px 8px 8px; color: #009de3; - background-color: #ffffff; z-index: 1; } -.bi-theme-dark .bi-multi-select-check-selected-button { - background-color: #191a2c; -} /****添加计算宽度的--运算符直接需要space****/ /****** common color(常用颜色,可用于普遍场景) *****/ /**** custom color(自定义颜色,用于特定场景) ****/ @@ -353,18 +349,15 @@ .bi-multi-tree-check-pane { background-color: #f4f4f4; } -.bi-multi-tree-check-pane .multi-tree-continue-select { - background-color: #f4f4f4; -} .bi-multi-tree-check-pane .multi-tree-check-selected { color: #009de3; } +.bi-theme-dark .bi-multi-tree-check-pane { + background-color: #191a2c; +} /****添加计算宽度的--运算符直接需要space****/ /****** common color(常用颜色,可用于普遍场景) *****/ /**** custom color(自定义颜色,用于特定场景) ****/ -.bi-multi-tree-display { - background-color: #f4f4f4; -} /****添加计算宽度的--运算符直接需要space****/ /****** common color(常用颜色,可用于普遍场景) *****/ /**** custom color(自定义颜色,用于特定场景) ****/ @@ -415,15 +408,6 @@ -moz-border-radius: 2px 2px 2px 2px; border-radius: 2px 2px 2px 2px; } -.bi-multi-tree-trigger .trigger-check-selected { - border: 1px solid #009de3; - -webkit-border-radius: 8px 8px 8px 8px; - -moz-border-radius: 8px 8px 8px 8px; - border-radius: 8px 8px 8px 8px; - color: #009de3; - background-color: #ffffff; - z-index: 1; -} .bi-multi-tree-trigger .trigger-icon-button { border-left: 1px solid #d4dadd; font-size: 16px; @@ -437,7 +421,6 @@ -moz-border-radius: 8px 8px 8px 8px; border-radius: 8px 8px 8px 8px; color: #009de3; - background-color: #ffffff; z-index: 1; } /****添加计算宽度的--运算符直接需要space****/ diff --git a/docs/base.js b/docs/base.js index 3eb95a678..8e7faa097 100644 --- a/docs/base.js +++ b/docs/base.js @@ -15044,12 +15044,7 @@ BI.PopupView = BI.inherit(BI.Widget, { "max-width": o.maxWidth + "px" }).bind({"click": fn}); - //FIXME IE8下 jquery.mousewheeel.js 第一次执行65行$elem["offsetParent"]()的时候报错:未指明的错误 但是第二次或者调试的时候展开一下$elem内容均能避免上述问题 - try { - this.element.bind("mousewheel", fn); - } catch (e) { - this.element.bind("mousewheel", 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}); @@ -30824,13 +30819,14 @@ BI.Table = BI.inherit(BI.Widget, { .addClass(c === rows.length - 1 ? "last-col" : ""); var w = BI.createWidget(map[r][c], { type: "bi.table_cell", - root: true, textAlign: "left", width: BI.isNumeric(width) ? width : "", height: BI.isNumeric(height) ? height : "", _row: r, _col: c + start }); + self.addWidget(w.getName(), w); + w._mount(); w.element.css("position", "relative"); td.append(w.element); tr.append(td); diff --git a/docs/core.js b/docs/core.js index 58742196e..9dab9b4df 100644 --- a/docs/core.js +++ b/docs/core.js @@ -14421,27 +14421,14 @@ BI.Widget = BI.inherit(BI.OB, { } this.beforeMounted && this.beforeMounted(); this._isMounted = true; - this._mountChildren(); + this._mountChildren && this._mountChildren(); BI.each(this._children, function (i, widget) { widget._mount && widget._mount(); }); this.mounted && this.mounted(); }, - _mountChildren: function () { - var self = this; - var frag = document.createDocumentFragment(); - var hasChild = false; - BI.each(this._children, function (i, widget) { - if (widget.element !== self.element) { - frag.appendChild(widget.element[0]); - hasChild = true; - } - }); - if (hasChild === true) { - this.element.append(frag); - } - }, + _mountChildren: null, _unMount: function () { BI.each(this._children, function (i, widget) { @@ -19326,6 +19313,21 @@ BI.Layout = BI.inherit(BI.Widget, { } }, + _mountChildren: function () { + var self = this; + var frag = document.createDocumentFragment(); + var hasChild = false; + BI.each(this._children, function (i, widget) { + if (widget.element !== self.element) { + frag.appendChild(widget.element[0]); + hasChild = true; + } + }); + if (hasChild === true) { + this.element.append(frag); + } + }, + _getChildName: function (index) { return index + ""; }, @@ -22658,7 +22660,7 @@ $(function () { } var rgb = this.rgb2json(this.hex2rgb(hex)); var grayLevel = Math.round(rgb.r * 0.299 + rgb.g * 0.587 + rgb.b * 0.114); - if (grayLevel < 192) { + if (grayLevel < 140) { return true; } return false; diff --git a/docs/widget.css b/docs/widget.css index 30c4bdc6c..3b3cbee3e 100644 --- a/docs/widget.css +++ b/docs/widget.css @@ -333,12 +333,8 @@ -moz-border-radius: 8px 8px 8px 8px; border-radius: 8px 8px 8px 8px; color: #009de3; - background-color: #ffffff; z-index: 1; } -.bi-theme-dark .bi-multi-select-check-selected-button { - background-color: #191a2c; -} /****添加计算宽度的--运算符直接需要space****/ /****** common color(常用颜色,可用于普遍场景) *****/ /**** custom color(自定义颜色,用于特定场景) ****/ @@ -353,18 +349,15 @@ .bi-multi-tree-check-pane { background-color: #f4f4f4; } -.bi-multi-tree-check-pane .multi-tree-continue-select { - background-color: #f4f4f4; -} .bi-multi-tree-check-pane .multi-tree-check-selected { color: #009de3; } +.bi-theme-dark .bi-multi-tree-check-pane { + background-color: #191a2c; +} /****添加计算宽度的--运算符直接需要space****/ /****** common color(常用颜色,可用于普遍场景) *****/ /**** custom color(自定义颜色,用于特定场景) ****/ -.bi-multi-tree-display { - background-color: #f4f4f4; -} /****添加计算宽度的--运算符直接需要space****/ /****** common color(常用颜色,可用于普遍场景) *****/ /**** custom color(自定义颜色,用于特定场景) ****/ @@ -415,15 +408,6 @@ -moz-border-radius: 2px 2px 2px 2px; border-radius: 2px 2px 2px 2px; } -.bi-multi-tree-trigger .trigger-check-selected { - border: 1px solid #009de3; - -webkit-border-radius: 8px 8px 8px 8px; - -moz-border-radius: 8px 8px 8px 8px; - border-radius: 8px 8px 8px 8px; - color: #009de3; - background-color: #ffffff; - z-index: 1; -} .bi-multi-tree-trigger .trigger-icon-button { border-left: 1px solid #d4dadd; font-size: 16px; @@ -437,7 +421,6 @@ -moz-border-radius: 8px 8px 8px 8px; border-radius: 8px 8px 8px 8px; color: #009de3; - background-color: #ffffff; z-index: 1; } /****添加计算宽度的--运算符直接需要space****/ diff --git a/src/base/layer/layer.popup.js b/src/base/layer/layer.popup.js index 9589237e4..74f6618d1 100644 --- a/src/base/layer/layer.popup.js +++ b/src/base/layer/layer.popup.js @@ -55,12 +55,7 @@ BI.PopupView = BI.inherit(BI.Widget, { "max-width": o.maxWidth + "px" }).bind({"click": fn}); - //FIXME IE8下 jquery.mousewheeel.js 第一次执行65行$elem["offsetParent"]()的时候报错:未指明的错误 但是第二次或者调试的时候展开一下$elem内容均能避免上述问题 - try { - this.element.bind("mousewheel", fn); - } catch (e) { - this.element.bind("mousewheel", 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}); diff --git a/src/base/table/table.js b/src/base/table/table.js index 8652d0543..ed5530110 100644 --- a/src/base/table/table.js +++ b/src/base/table/table.js @@ -743,13 +743,14 @@ BI.Table = BI.inherit(BI.Widget, { .addClass(c === rows.length - 1 ? "last-col" : ""); var w = BI.createWidget(map[r][c], { type: "bi.table_cell", - root: true, textAlign: "left", width: BI.isNumeric(width) ? width : "", height: BI.isNumeric(height) ? height : "", _row: r, _col: c + start }); + self.addWidget(w.getName(), w); + w._mount(); w.element.css("position", "relative"); td.append(w.element); tr.append(td); diff --git a/src/core/func/function.js b/src/core/func/function.js index c8fdf37cd..0732ef15a 100644 --- a/src/core/func/function.js +++ b/src/core/func/function.js @@ -129,7 +129,7 @@ $(function () { } var rgb = this.rgb2json(this.hex2rgb(hex)); var grayLevel = Math.round(rgb.r * 0.299 + rgb.g * 0.587 + rgb.b * 0.114); - if (grayLevel < 192) { + if (grayLevel < 140) { return true; } return false; diff --git a/src/core/widget.js b/src/core/widget.js index fd56767db..2cd8c3b52 100644 --- a/src/core/widget.js +++ b/src/core/widget.js @@ -161,27 +161,14 @@ BI.Widget = BI.inherit(BI.OB, { } this.beforeMounted && this.beforeMounted(); this._isMounted = true; - this._mountChildren(); + this._mountChildren && this._mountChildren(); BI.each(this._children, function (i, widget) { widget._mount && widget._mount(); }); this.mounted && this.mounted(); }, - _mountChildren: function () { - var self = this; - var frag = document.createDocumentFragment(); - var hasChild = false; - BI.each(this._children, function (i, widget) { - if (widget.element !== self.element) { - frag.appendChild(widget.element[0]); - hasChild = true; - } - }); - if (hasChild === true) { - this.element.append(frag); - } - }, + _mountChildren: null, _unMount: function () { BI.each(this._children, function (i, widget) { diff --git a/src/core/wrapper/layout.js b/src/core/wrapper/layout.js index cf23c3974..abca6b005 100644 --- a/src/core/wrapper/layout.js +++ b/src/core/wrapper/layout.js @@ -63,6 +63,21 @@ BI.Layout = BI.inherit(BI.Widget, { } }, + _mountChildren: function () { + var self = this; + var frag = document.createDocumentFragment(); + var hasChild = false; + BI.each(this._children, function (i, widget) { + if (widget.element !== self.element) { + frag.appendChild(widget.element[0]); + hasChild = true; + } + }); + if (hasChild === true) { + this.element.append(frag); + } + }, + _getChildName: function (index) { return index + ""; }, diff --git a/src/css/lib/style.css b/src/css/lib/style.css deleted file mode 100644 index 6dfa999cc..000000000 --- a/src/css/lib/style.css +++ /dev/null @@ -1,2 +0,0 @@ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ diff --git a/src/css/widget/multiselect/trigger/button.checkselected.css b/src/css/widget/multiselect/trigger/button.checkselected.css index 1ebfc22ab..d33c08284 100644 --- a/src/css/widget/multiselect/trigger/button.checkselected.css +++ b/src/css/widget/multiselect/trigger/button.checkselected.css @@ -7,9 +7,5 @@ -moz-border-radius: 8px 8px 8px 8px; border-radius: 8px 8px 8px 8px; color: #009de3; - background-color: #ffffff; z-index: 1; } -.bi-theme-dark .bi-multi-select-check-selected-button { - background-color: #191a2c; -} diff --git a/src/css/widget/multitree/check/multi.tree.check.pane.css b/src/css/widget/multitree/check/multi.tree.check.pane.css index e47d209b7..520e20e70 100644 --- a/src/css/widget/multitree/check/multi.tree.check.pane.css +++ b/src/css/widget/multitree/check/multi.tree.check.pane.css @@ -4,9 +4,9 @@ .bi-multi-tree-check-pane { background-color: #f4f4f4; } -.bi-multi-tree-check-pane .multi-tree-continue-select { - background-color: #f4f4f4; -} .bi-multi-tree-check-pane .multi-tree-check-selected { color: #009de3; } +.bi-theme-dark .bi-multi-tree-check-pane { + background-color: #191a2c; +} diff --git a/src/css/widget/multitree/display.multi.tree.css b/src/css/widget/multitree/display.multi.tree.css index 95ed7ce02..2f6491e13 100644 --- a/src/css/widget/multitree/display.multi.tree.css +++ b/src/css/widget/multitree/display.multi.tree.css @@ -1,6 +1,3 @@ /****添加计算宽度的--运算符直接需要space****/ /****** common color(常用颜色,可用于普遍场景) *****/ /**** custom color(自定义颜色,用于特定场景) ****/ -.bi-multi-tree-display { - background-color: #f4f4f4; -} diff --git a/src/css/widget/multitree/trigger.multi.tree.css b/src/css/widget/multitree/trigger.multi.tree.css index a5d0d76f3..0b4cae558 100644 --- a/src/css/widget/multitree/trigger.multi.tree.css +++ b/src/css/widget/multitree/trigger.multi.tree.css @@ -7,15 +7,6 @@ -moz-border-radius: 2px 2px 2px 2px; border-radius: 2px 2px 2px 2px; } -.bi-multi-tree-trigger .trigger-check-selected { - border: 1px solid #009de3; - -webkit-border-radius: 8px 8px 8px 8px; - -moz-border-radius: 8px 8px 8px 8px; - border-radius: 8px 8px 8px 8px; - color: #009de3; - background-color: #ffffff; - z-index: 1; -} .bi-multi-tree-trigger .trigger-icon-button { border-left: 1px solid #d4dadd; font-size: 16px; diff --git a/src/css/widget/multitree/trigger/multi.tree.button.checkselected.css b/src/css/widget/multitree/trigger/multi.tree.button.checkselected.css index 33b983af3..b0122e9b7 100644 --- a/src/css/widget/multitree/trigger/multi.tree.button.checkselected.css +++ b/src/css/widget/multitree/trigger/multi.tree.button.checkselected.css @@ -7,6 +7,5 @@ -moz-border-radius: 8px 8px 8px 8px; border-radius: 8px 8px 8px 8px; color: #009de3; - background-color: #ffffff; z-index: 1; } diff --git a/src/less/bibase.less b/src/less/bibase.less index 6fa57065f..5f0b88dc2 100644 --- a/src/less/bibase.less +++ b/src/less/bibase.less @@ -3,5 +3,4 @@ @import "typographic"; @import "visual"; @import "var"; -@import "lib/colors"; -@import "lib/style"; \ No newline at end of file +@import "lib/colors"; \ No newline at end of file diff --git a/src/less/lib/style.less b/src/less/lib/style.less deleted file mode 100644 index 78fc5d37a..000000000 --- a/src/less/lib/style.less +++ /dev/null @@ -1,3 +0,0 @@ -@import "colors"; - -//公共样式类库 diff --git a/src/less/widget/multiselect/trigger/button.checkselected.less b/src/less/widget/multiselect/trigger/button.checkselected.less index 2e4cbd59e..365ed73f6 100644 --- a/src/less/widget/multiselect/trigger/button.checkselected.less +++ b/src/less/widget/multiselect/trigger/button.checkselected.less @@ -4,12 +4,5 @@ border: 1px solid @color-bi-text-highlight; .border-corner-radius(8px, 8px, 8px, 8px); color: @color-bi-text-highlight; - background-color: @color-bi-background-default; z-index: 1; } - -.bi-theme-dark { - .bi-multi-select-check-selected-button { - background-color: @color-bi-background-normal-theme-dark; - } -} \ No newline at end of file diff --git a/src/less/widget/multitree/check/multi.tree.check.pane.less b/src/less/widget/multitree/check/multi.tree.check.pane.less index 93ac62973..a1c779a76 100644 --- a/src/less/widget/multitree/check/multi.tree.check.pane.less +++ b/src/less/widget/multitree/check/multi.tree.check.pane.less @@ -1,12 +1,16 @@ @import "../../../bibase"; - -.bi-multi-tree-check-pane{ +.bi-multi-tree-check-pane { background-color: @color-bi-background-gray; - & .multi-tree-continue-select{ - background-color: @color-bi-background-gray; + & .multi-tree-continue-select { } - & .multi-tree-check-selected{ + & .multi-tree-check-selected { color: @color-bi-text-highlight; } +} + +.bi-theme-dark { + .bi-multi-tree-check-pane { + background-color: @color-bi-background-normal-theme-dark; + } } \ No newline at end of file diff --git a/src/less/widget/multitree/display.multi.tree.less b/src/less/widget/multitree/display.multi.tree.less index 01dd64b22..0d31ac4df 100644 --- a/src/less/widget/multitree/display.multi.tree.less +++ b/src/less/widget/multitree/display.multi.tree.less @@ -1,5 +1,4 @@ @import "../../bibase"; .bi-multi-tree-display{ - background-color: @color-bi-background-gray; } \ No newline at end of file diff --git a/src/less/widget/multitree/trigger.multi.tree.less b/src/less/widget/multitree/trigger.multi.tree.less index a132b0fc9..be893f566 100644 --- a/src/less/widget/multitree/trigger.multi.tree.less +++ b/src/less/widget/multitree/trigger.multi.tree.less @@ -1,17 +1,10 @@ @import "../../bibase"; -.bi-multi-tree-trigger{ +.bi-multi-tree-trigger { border: 1px solid @color-bi-border-normal; .border-corner-radius(2px, 2px, 2px, 2px); - & .trigger-check-selected{ - border: 1px solid @color-bi-text-highlight; - .border-corner-radius(8px, 8px, 8px, 8px); - color: @color-bi-text-highlight; - background-color: @color-bi-background-default; - z-index: 1; - } - & .trigger-icon-button{ + & .trigger-icon-button { border-left: 1px solid @color-bi-border-normal; font-size: 16px; } diff --git a/src/less/widget/multitree/trigger/multi.tree.button.checkselected.less b/src/less/widget/multitree/trigger/multi.tree.button.checkselected.less index 2049bc2c9..ef3bf4bec 100644 --- a/src/less/widget/multitree/trigger/multi.tree.button.checkselected.less +++ b/src/less/widget/multitree/trigger/multi.tree.button.checkselected.less @@ -5,7 +5,6 @@ border: 1px solid @color-bi-text-highlight; .border-corner-radius(8px, 8px, 8px, 8px); color: @color-bi-text-highlight; - background-color: @color-bi-background-default; z-index: 1; } } \ No newline at end of file