diff --git a/bi/base.css b/bi/base.css index 5d30a881e..6644ebae9 100644 --- a/bi/base.css +++ b/bi/base.css @@ -129,12 +129,6 @@ cursor: text; width: 100%; height: 100%; - color: #1a1a1a; - background-color: #ffffff; -} -.bi-theme-dark .CodeMirror { - color: #ffffff; - background-color: #242640; } /* PADDING */ .CodeMirror-lines { diff --git a/bi/base.js b/bi/base.js index 61c06e30a..1b93930aa 100644 --- a/bi/base.js +++ b/bi/base.js @@ -17706,7 +17706,7 @@ BI.shortcut("bi.text_node", BI.TextNode);/** BI.CodeEditor = BI.inherit(BI.Single, { _defaultConfig: function () { return $.extend(BI.CodeEditor.superclass._defaultConfig.apply(), { - baseCls: 'bi-code-editor', + baseCls: 'bi-code-editor bi-card', value: '', watermark: "" }); @@ -17780,12 +17780,12 @@ BI.CodeEditor = BI.inherit(BI.Single, { this.editor.setOption("readOnly", b === true ? false : "nocursor") }, - insertParam: function(param){ + insertParam: function (param) { var from = this.editor.getCursor(); this.editor.replaceSelection(param); var to = this.editor.getCursor(); var options = {className: 'param', atomic: true}; - if(BI.isNotNull(param.match(/^$/))){ + if (BI.isNotNull(param.match(/^$/))) { options.className = 'error-param'; } this.editor.markText(from, to, options); @@ -17793,7 +17793,7 @@ BI.CodeEditor = BI.inherit(BI.Single, { this.editor.focus(); }, - insertString: function(str){ + insertString: function (str) { this.editor.replaceSelection(str); this.editor.focus(); }, @@ -17837,7 +17837,16 @@ BI.CodeEditor = BI.inherit(BI.Single, { }) }, - refresh: function(){ + setStyle: function (style) { + this.style = style; + this.element.css(style); + }, + + getStyle: function () { + return this.style; + }, + + refresh: function () { var self = this; BI.nextTick(function () { self.editor.refresh(); diff --git a/bi/widget.js b/bi/widget.js index 5590018e9..c80a93cea 100644 --- a/bi/widget.js +++ b/bi/widget.js @@ -17319,7 +17319,7 @@ BI.shortcut('bi.all_value_chooser_pane', BI.AllValueChooserPane);BI.AbstractTree var node = self._getTreeNode(parentValues, k); var newParents = BI.clone(parentValues); newParents.push(node.value); - createOneJson(node, BI.last(parentValues), getCount(selected[k], newParents)); + createOneJson(node, node.parent && node.parent.id, getCount(selected[k], newParents)); doCheck(newParents, node, selected[k]); }) } diff --git a/docs/base.css b/docs/base.css index 5d30a881e..6644ebae9 100644 --- a/docs/base.css +++ b/docs/base.css @@ -129,12 +129,6 @@ cursor: text; width: 100%; height: 100%; - color: #1a1a1a; - background-color: #ffffff; -} -.bi-theme-dark .CodeMirror { - color: #ffffff; - background-color: #242640; } /* PADDING */ .CodeMirror-lines { diff --git a/docs/base.js b/docs/base.js index 61c06e30a..1b93930aa 100644 --- a/docs/base.js +++ b/docs/base.js @@ -17706,7 +17706,7 @@ BI.shortcut("bi.text_node", BI.TextNode);/** BI.CodeEditor = BI.inherit(BI.Single, { _defaultConfig: function () { return $.extend(BI.CodeEditor.superclass._defaultConfig.apply(), { - baseCls: 'bi-code-editor', + baseCls: 'bi-code-editor bi-card', value: '', watermark: "" }); @@ -17780,12 +17780,12 @@ BI.CodeEditor = BI.inherit(BI.Single, { this.editor.setOption("readOnly", b === true ? false : "nocursor") }, - insertParam: function(param){ + insertParam: function (param) { var from = this.editor.getCursor(); this.editor.replaceSelection(param); var to = this.editor.getCursor(); var options = {className: 'param', atomic: true}; - if(BI.isNotNull(param.match(/^$/))){ + if (BI.isNotNull(param.match(/^$/))) { options.className = 'error-param'; } this.editor.markText(from, to, options); @@ -17793,7 +17793,7 @@ BI.CodeEditor = BI.inherit(BI.Single, { this.editor.focus(); }, - insertString: function(str){ + insertString: function (str) { this.editor.replaceSelection(str); this.editor.focus(); }, @@ -17837,7 +17837,16 @@ BI.CodeEditor = BI.inherit(BI.Single, { }) }, - refresh: function(){ + setStyle: function (style) { + this.style = style; + this.element.css(style); + }, + + getStyle: function () { + return this.style; + }, + + refresh: function () { var self = this; BI.nextTick(function () { self.editor.refresh(); diff --git a/docs/widget.js b/docs/widget.js index 5590018e9..c80a93cea 100644 --- a/docs/widget.js +++ b/docs/widget.js @@ -17319,7 +17319,7 @@ BI.shortcut('bi.all_value_chooser_pane', BI.AllValueChooserPane);BI.AbstractTree var node = self._getTreeNode(parentValues, k); var newParents = BI.clone(parentValues); newParents.push(node.value); - createOneJson(node, BI.last(parentValues), getCount(selected[k], newParents)); + createOneJson(node, node.parent && node.parent.id, getCount(selected[k], newParents)); doCheck(newParents, node, selected[k]); }) } diff --git a/src/base/single/editor/editor.code.js b/src/base/single/editor/editor.code.js index 51579c702..ab2dc122b 100644 --- a/src/base/single/editor/editor.code.js +++ b/src/base/single/editor/editor.code.js @@ -7,7 +7,7 @@ BI.CodeEditor = BI.inherit(BI.Single, { _defaultConfig: function () { return $.extend(BI.CodeEditor.superclass._defaultConfig.apply(), { - baseCls: 'bi-code-editor', + baseCls: 'bi-code-editor bi-card', value: '', watermark: "" }); @@ -81,12 +81,12 @@ BI.CodeEditor = BI.inherit(BI.Single, { this.editor.setOption("readOnly", b === true ? false : "nocursor") }, - insertParam: function(param){ + insertParam: function (param) { var from = this.editor.getCursor(); this.editor.replaceSelection(param); var to = this.editor.getCursor(); var options = {className: 'param', atomic: true}; - if(BI.isNotNull(param.match(/^$/))){ + if (BI.isNotNull(param.match(/^$/))) { options.className = 'error-param'; } this.editor.markText(from, to, options); @@ -94,7 +94,7 @@ BI.CodeEditor = BI.inherit(BI.Single, { this.editor.focus(); }, - insertString: function(str){ + insertString: function (str) { this.editor.replaceSelection(str); this.editor.focus(); }, @@ -138,7 +138,16 @@ BI.CodeEditor = BI.inherit(BI.Single, { }) }, - refresh: function(){ + setStyle: function (style) { + this.style = style; + this.element.css(style); + }, + + getStyle: function () { + return this.style; + }, + + refresh: function () { var self = this; BI.nextTick(function () { self.editor.refresh(); diff --git a/src/component/treevaluechooser/abstract.treevaluechooser.js b/src/component/treevaluechooser/abstract.treevaluechooser.js index 669713eef..b600f60d6 100644 --- a/src/component/treevaluechooser/abstract.treevaluechooser.js +++ b/src/component/treevaluechooser/abstract.treevaluechooser.js @@ -80,7 +80,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, { var node = self._getTreeNode(parentValues, k); var newParents = BI.clone(parentValues); newParents.push(node.value); - createOneJson(node, BI.last(parentValues), getCount(selected[k], newParents)); + createOneJson(node, node.parent && node.parent.id, getCount(selected[k], newParents)); doCheck(newParents, node, selected[k]); }) } diff --git a/src/css/base/formula/codemirror.css b/src/css/base/formula/codemirror.css index 7142bfbe8..6cece7573 100644 --- a/src/css/base/formula/codemirror.css +++ b/src/css/base/formula/codemirror.css @@ -8,12 +8,6 @@ cursor: text; width: 100%; height: 100%; - color: #1a1a1a; - background-color: #ffffff; -} -.bi-theme-dark .CodeMirror { - color: #ffffff; - background-color: #242640; } /* PADDING */ .CodeMirror-lines { diff --git a/src/less/base/formula/codemirror.less b/src/less/base/formula/codemirror.less index 7c8fc3117..5daabc070 100644 --- a/src/less/base/formula/codemirror.less +++ b/src/less/base/formula/codemirror.less @@ -8,15 +8,6 @@ cursor: text; // .border-radius(4px); .size(100%, 100%); - color: @color-bi-text-black; - background-color: @color-bi-background-default; -} - -.bi-theme-dark { - .CodeMirror { - color: @color-bi-text; - background-color: @color-bi-background-default-theme-dark; - } } /* PADDING */