Browse Source

update

master
windy 7 years ago
parent
commit
7dbd902d2d
  1. 21
      dist/base.js
  2. 21
      dist/bundle.js
  3. 24
      dist/bundle.min.js
  4. 16
      src/base/sql/codemirrior/sql-hint.js
  5. 5
      src/base/sql/editor.sql.js

21
dist/base.js vendored

@ -20685,16 +20685,16 @@ BI.Trigger = BI.inherit(BI.Single, {
keywords = getKeywords(editor); keywords = getKeywords(editor);
var keywordsCount = BI.size(keywords); var keywordsCount = BI.size(keywords);
var functions = []; var functions = [];
var desc = {};
var cur = editor.getCursor(); var cur = editor.getCursor();
var token = editor.getTokenAt(cur); var token = editor.getTokenAt(cur);
var collection = if(options.supportFunction){
BI.each(BI.FormulaCollections, function (idx, formula) { BI.each(BI.FormulaCollections, function (idx, formula) {
if(formula.lastIndexOf(token.string, 0) == 0 && !BI.contains(functions, formula)) { if(formula.lastIndexOf(token.string, 0) == 0 && !BI.contains(functions, formula)) {
functions.push(formula); functions.push(formula);
} }
}); });
keywords = BI.concat(BI.keys(keywords), functions); keywords = BI.concat(BI.keys(keywords), functions);
}
identifierQuote = getIdentifierQuote(editor); identifierQuote = getIdentifierQuote(editor);
if (defaultTableName && !defaultTable) {defaultTable = findTableByAlias(defaultTableName, editor);} if (defaultTableName && !defaultTable) {defaultTable = findTableByAlias(defaultTableName, editor);}
@ -21065,7 +21065,7 @@ BI.SQLEditor = BI.inherit(BI.Widget, {
value: "", value: "",
lineHeight: 2, lineHeight: 2,
showHint: true, showHint: true,
supportFunction: true supportFunction: false
}); });
}, },
_init: function () { _init: function () {
@ -21083,7 +21083,8 @@ BI.SQLEditor = BI.inherit(BI.Widget, {
self._checkWaterMark(); self._checkWaterMark();
if (o.showHint) { if (o.showHint) {
CodeMirror.showHint(cm, CodeMirror.sqlHint, { CodeMirror.showHint(cm, CodeMirror.sqlHint, {
completeSingle: false completeSingle: false,
supportFunction: o.supportFunction
}); });
} }
BI.nextTick(function () { BI.nextTick(function () {

21
dist/bundle.js vendored

@ -46460,16 +46460,16 @@ BI.Trigger = BI.inherit(BI.Single, {
keywords = getKeywords(editor); keywords = getKeywords(editor);
var keywordsCount = BI.size(keywords); var keywordsCount = BI.size(keywords);
var functions = []; var functions = [];
var desc = {};
var cur = editor.getCursor(); var cur = editor.getCursor();
var token = editor.getTokenAt(cur); var token = editor.getTokenAt(cur);
var collection = if(options.supportFunction){
BI.each(BI.FormulaCollections, function (idx, formula) { BI.each(BI.FormulaCollections, function (idx, formula) {
if(formula.lastIndexOf(token.string, 0) == 0 && !BI.contains(functions, formula)) { if(formula.lastIndexOf(token.string, 0) == 0 && !BI.contains(functions, formula)) {
functions.push(formula); functions.push(formula);
} }
}); });
keywords = BI.concat(BI.keys(keywords), functions); keywords = BI.concat(BI.keys(keywords), functions);
}
identifierQuote = getIdentifierQuote(editor); identifierQuote = getIdentifierQuote(editor);
if (defaultTableName && !defaultTable) {defaultTable = findTableByAlias(defaultTableName, editor);} if (defaultTableName && !defaultTable) {defaultTable = findTableByAlias(defaultTableName, editor);}
@ -46840,7 +46840,7 @@ BI.SQLEditor = BI.inherit(BI.Widget, {
value: "", value: "",
lineHeight: 2, lineHeight: 2,
showHint: true, showHint: true,
supportFunction: true supportFunction: false
}); });
}, },
_init: function () { _init: function () {
@ -46858,7 +46858,8 @@ BI.SQLEditor = BI.inherit(BI.Widget, {
self._checkWaterMark(); self._checkWaterMark();
if (o.showHint) { if (o.showHint) {
CodeMirror.showHint(cm, CodeMirror.sqlHint, { CodeMirror.showHint(cm, CodeMirror.sqlHint, {
completeSingle: false completeSingle: false,
supportFunction: o.supportFunction
}); });
} }
BI.nextTick(function () { BI.nextTick(function () {

24
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

16
src/base/sql/codemirrior/sql-hint.js

@ -236,16 +236,16 @@
keywords = getKeywords(editor); keywords = getKeywords(editor);
var keywordsCount = BI.size(keywords); var keywordsCount = BI.size(keywords);
var functions = []; var functions = [];
var desc = {};
var cur = editor.getCursor(); var cur = editor.getCursor();
var token = editor.getTokenAt(cur); var token = editor.getTokenAt(cur);
var collection = if(options.supportFunction){
BI.each(BI.FormulaCollections, function (idx, formula) { BI.each(BI.FormulaCollections, function (idx, formula) {
if(formula.lastIndexOf(token.string, 0) == 0 && !BI.contains(functions, formula)) { if(formula.lastIndexOf(token.string, 0) == 0 && !BI.contains(functions, formula)) {
functions.push(formula); functions.push(formula);
} }
}); });
keywords = BI.concat(BI.keys(keywords), functions); keywords = BI.concat(BI.keys(keywords), functions);
}
identifierQuote = getIdentifierQuote(editor); identifierQuote = getIdentifierQuote(editor);
if (defaultTableName && !defaultTable) {defaultTable = findTableByAlias(defaultTableName, editor);} if (defaultTableName && !defaultTable) {defaultTable = findTableByAlias(defaultTableName, editor);}

5
src/base/sql/editor.sql.js

@ -8,7 +8,7 @@ BI.SQLEditor = BI.inherit(BI.Widget, {
value: "", value: "",
lineHeight: 2, lineHeight: 2,
showHint: true, showHint: true,
supportFunction: true supportFunction: false
}); });
}, },
_init: function () { _init: function () {
@ -26,7 +26,8 @@ BI.SQLEditor = BI.inherit(BI.Widget, {
self._checkWaterMark(); self._checkWaterMark();
if (o.showHint) { if (o.showHint) {
CodeMirror.showHint(cm, CodeMirror.sqlHint, { CodeMirror.showHint(cm, CodeMirror.sqlHint, {
completeSingle: false completeSingle: false,
supportFunction: o.supportFunction
}); });
} }
BI.nextTick(function () { BI.nextTick(function () {

Loading…
Cancel
Save