Browse Source

codeeditor

es6
guy 7 years ago
parent
commit
e676619b12
  1. 6
      bi/base.css
  2. 11
      bi/base.js
  3. 2
      bi/widget.js
  4. 6
      docs/base.css
  5. 11
      docs/base.js
  6. 2
      docs/widget.js
  7. 11
      src/base/single/editor/editor.code.js
  8. 2
      src/component/treevaluechooser/abstract.treevaluechooser.js
  9. 6
      src/css/base/formula/codemirror.css
  10. 9
      src/less/base/formula/codemirror.less

6
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 {

11
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: ""
});
@ -17837,6 +17837,15 @@ BI.CodeEditor = BI.inherit(BI.Single, {
})
},
setStyle: function (style) {
this.style = style;
this.element.css(style);
},
getStyle: function () {
return this.style;
},
refresh: function () {
var self = this;
BI.nextTick(function () {

2
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]);
})
}

6
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 {

11
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: ""
});
@ -17837,6 +17837,15 @@ BI.CodeEditor = BI.inherit(BI.Single, {
})
},
setStyle: function (style) {
this.style = style;
this.element.css(style);
},
getStyle: function () {
return this.style;
},
refresh: function () {
var self = this;
BI.nextTick(function () {

2
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]);
})
}

11
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: ""
});
@ -138,6 +138,15 @@ BI.CodeEditor = BI.inherit(BI.Single, {
})
},
setStyle: function (style) {
this.style = style;
this.element.css(style);
},
getStyle: function () {
return this.style;
},
refresh: function () {
var self = this;
BI.nextTick(function () {

2
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]);
})
}

6
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 {

9
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 */

Loading…
Cancel
Save