From 8fd700660462699d66a2ad5779485ffa61366e3b Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Tue, 19 Dec 2017 14:52:20 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BBtooltip=E5=8E=BB=E6=A0=87=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bi/base.css | 10 +++---- bi/base.js | 40 +++++++++++++++------------- dist/base.css | 10 +++---- dist/base.js | 40 +++++++++++++++------------- dist/bundle.css | 10 +++---- dist/bundle.js | 40 +++++++++++++++------------- src/base/sql/codemirrior/sql-hint.js | 40 +++++++++++++++------------- src/css/base/sql/sql.css | 10 +++---- src/less/base/sql/sql.less | 11 +++----- 9 files changed, 99 insertions(+), 112 deletions(-) diff --git a/bi/base.css b/bi/base.css index 04555e827..f57711c2c 100644 --- a/bi/base.css +++ b/bi/base.css @@ -1034,24 +1034,20 @@ body .bi-button.button-ignore.disabled.clear:active, border: 1px solid #f4cbcb; } .bi-sql-editor .cm-s-default span[class*="#"] { - color: #faaa39; + color: #3685f2; } .bi-sql-editor .cm-s-default .cm-keyword { color: #3685f2; } .bi-sql-editor .cm-s-default .cm-function { - color: #faaa39; + color: #3685f2; } .CodeMirror-hints .sql-fr-function { - color: #faaa39; + color: #3685f2; } .CodeMirror-hints .sql-keyword { color: #3685f2; } -.CodeMirror-hints .CodeMirror-hint-active { - background: #3f8ce8; - color: #ffffff; -} .bi-collection-table-cell { -webkit-box-sizing: border-box; /*Safari3.2+*/ diff --git a/bi/base.js b/bi/base.js index 1b2689422..01f186b18 100644 --- a/bi/base.js +++ b/bi/base.js @@ -20737,25 +20737,27 @@ BI.Trigger = BI.inherit(BI.Single, { addMatches(result, search, tables, function(w) {return w}); addMatches(result, search, defaultTable, function(w) {return w}); if (!disableKeywords) - addMatches(result, search, keywords, function(w, i) { - var isKeyword = i < keywordsCount; - return { - isKeyword: isKeyword, - text: w, - description: desc[w] || "SQL关键字", - className: isKeyword ? "sql-keyword" : "sql-fr-function", - render: function (Element, self, data) { - var label = BI.createWidget({ - type: "bi.label", - element: Element, - text: data.displayText || getText(data) - }); - label.setTitle(data.description, { - container: "body" - }); - } - }; - }); + addMatches(result, search, keywords, function(w) {return w;}); + // 这边是加tooltip的,现在貌似不要了 + // addMatches(result, search, keywords, function(w, i) { + // var isKeyword = i < keywordsCount; + // return { + // isKeyword: isKeyword, + // text: w, + // description: desc[w] || "SQL关键字", + // className: isKeyword ? "sql-keyword" : "sql-fr-function", + // render: function (Element, self, data) { + // var label = BI.createWidget({ + // type: "bi.label", + // element: Element, + // text: data.displayText || getText(data) + // }); + // label.setTitle(data.description, { + // container: "body" + // }); + // } + // }; + // }); } return {list: result, from: Pos(cur.line, start), to: Pos(cur.line, end)}; diff --git a/dist/base.css b/dist/base.css index 04555e827..f57711c2c 100644 --- a/dist/base.css +++ b/dist/base.css @@ -1034,24 +1034,20 @@ body .bi-button.button-ignore.disabled.clear:active, border: 1px solid #f4cbcb; } .bi-sql-editor .cm-s-default span[class*="#"] { - color: #faaa39; + color: #3685f2; } .bi-sql-editor .cm-s-default .cm-keyword { color: #3685f2; } .bi-sql-editor .cm-s-default .cm-function { - color: #faaa39; + color: #3685f2; } .CodeMirror-hints .sql-fr-function { - color: #faaa39; + color: #3685f2; } .CodeMirror-hints .sql-keyword { color: #3685f2; } -.CodeMirror-hints .CodeMirror-hint-active { - background: #3f8ce8; - color: #ffffff; -} .bi-collection-table-cell { -webkit-box-sizing: border-box; /*Safari3.2+*/ diff --git a/dist/base.js b/dist/base.js index 1b2689422..01f186b18 100644 --- a/dist/base.js +++ b/dist/base.js @@ -20737,25 +20737,27 @@ BI.Trigger = BI.inherit(BI.Single, { addMatches(result, search, tables, function(w) {return w}); addMatches(result, search, defaultTable, function(w) {return w}); if (!disableKeywords) - addMatches(result, search, keywords, function(w, i) { - var isKeyword = i < keywordsCount; - return { - isKeyword: isKeyword, - text: w, - description: desc[w] || "SQL关键字", - className: isKeyword ? "sql-keyword" : "sql-fr-function", - render: function (Element, self, data) { - var label = BI.createWidget({ - type: "bi.label", - element: Element, - text: data.displayText || getText(data) - }); - label.setTitle(data.description, { - container: "body" - }); - } - }; - }); + addMatches(result, search, keywords, function(w) {return w;}); + // 这边是加tooltip的,现在貌似不要了 + // addMatches(result, search, keywords, function(w, i) { + // var isKeyword = i < keywordsCount; + // return { + // isKeyword: isKeyword, + // text: w, + // description: desc[w] || "SQL关键字", + // className: isKeyword ? "sql-keyword" : "sql-fr-function", + // render: function (Element, self, data) { + // var label = BI.createWidget({ + // type: "bi.label", + // element: Element, + // text: data.displayText || getText(data) + // }); + // label.setTitle(data.description, { + // container: "body" + // }); + // } + // }; + // }); } return {list: result, from: Pos(cur.line, start), to: Pos(cur.line, end)}; diff --git a/dist/bundle.css b/dist/bundle.css index 51b618e2c..ea78492a9 100644 --- a/dist/bundle.css +++ b/dist/bundle.css @@ -2629,24 +2629,20 @@ body .bi-button.button-ignore.disabled.clear:active, border: 1px solid #f4cbcb; } .bi-sql-editor .cm-s-default span[class*="#"] { - color: #faaa39; + color: #3685f2; } .bi-sql-editor .cm-s-default .cm-keyword { color: #3685f2; } .bi-sql-editor .cm-s-default .cm-function { - color: #faaa39; + color: #3685f2; } .CodeMirror-hints .sql-fr-function { - color: #faaa39; + color: #3685f2; } .CodeMirror-hints .sql-keyword { color: #3685f2; } -.CodeMirror-hints .CodeMirror-hint-active { - background: #3f8ce8; - color: #ffffff; -} .bi-collection-table-cell { -webkit-box-sizing: border-box; /*Safari3.2+*/ diff --git a/dist/bundle.js b/dist/bundle.js index 902eed806..f4cbb0b16 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -46549,25 +46549,27 @@ BI.Trigger = BI.inherit(BI.Single, { addMatches(result, search, tables, function(w) {return w}); addMatches(result, search, defaultTable, function(w) {return w}); if (!disableKeywords) - addMatches(result, search, keywords, function(w, i) { - var isKeyword = i < keywordsCount; - return { - isKeyword: isKeyword, - text: w, - description: desc[w] || "SQL关键字", - className: isKeyword ? "sql-keyword" : "sql-fr-function", - render: function (Element, self, data) { - var label = BI.createWidget({ - type: "bi.label", - element: Element, - text: data.displayText || getText(data) - }); - label.setTitle(data.description, { - container: "body" - }); - } - }; - }); + addMatches(result, search, keywords, function(w) {return w;}); + // 这边是加tooltip的,现在貌似不要了 + // addMatches(result, search, keywords, function(w, i) { + // var isKeyword = i < keywordsCount; + // return { + // isKeyword: isKeyword, + // text: w, + // description: desc[w] || "SQL关键字", + // className: isKeyword ? "sql-keyword" : "sql-fr-function", + // render: function (Element, self, data) { + // var label = BI.createWidget({ + // type: "bi.label", + // element: Element, + // text: data.displayText || getText(data) + // }); + // label.setTitle(data.description, { + // container: "body" + // }); + // } + // }; + // }); } return {list: result, from: Pos(cur.line, start), to: Pos(cur.line, end)}; diff --git a/src/base/sql/codemirrior/sql-hint.js b/src/base/sql/codemirrior/sql-hint.js index 74c6b3b79..65d7ef334 100644 --- a/src/base/sql/codemirrior/sql-hint.js +++ b/src/base/sql/codemirrior/sql-hint.js @@ -285,25 +285,27 @@ addMatches(result, search, tables, function(w) {return w}); addMatches(result, search, defaultTable, function(w) {return w}); if (!disableKeywords) - addMatches(result, search, keywords, function(w, i) { - var isKeyword = i < keywordsCount; - return { - isKeyword: isKeyword, - text: w, - description: desc[w] || "SQL关键字", - className: isKeyword ? "sql-keyword" : "sql-fr-function", - render: function (Element, self, data) { - var label = BI.createWidget({ - type: "bi.label", - element: Element, - text: data.displayText || getText(data) - }); - label.setTitle(data.description, { - container: "body" - }); - } - }; - }); + addMatches(result, search, keywords, function(w) {return w;}); + // 这边是加tooltip的,现在貌似不要了 + // addMatches(result, search, keywords, function(w, i) { + // var isKeyword = i < keywordsCount; + // return { + // isKeyword: isKeyword, + // text: w, + // description: desc[w] || "SQL关键字", + // className: isKeyword ? "sql-keyword" : "sql-fr-function", + // render: function (Element, self, data) { + // var label = BI.createWidget({ + // type: "bi.label", + // element: Element, + // text: data.displayText || getText(data) + // }); + // label.setTitle(data.description, { + // container: "body" + // }); + // } + // }; + // }); } return {list: result, from: Pos(cur.line, start), to: Pos(cur.line, end)}; diff --git a/src/css/base/sql/sql.css b/src/css/base/sql/sql.css index 13c041423..5ac5973e5 100644 --- a/src/css/base/sql/sql.css +++ b/src/css/base/sql/sql.css @@ -1,19 +1,15 @@ .bi-sql-editor .cm-s-default span[class*="#"] { - color: #faaa39; + color: #3685f2; } .bi-sql-editor .cm-s-default .cm-keyword { color: #3685f2; } .bi-sql-editor .cm-s-default .cm-function { - color: #faaa39; + color: #3685f2; } .CodeMirror-hints .sql-fr-function { - color: #faaa39; + color: #3685f2; } .CodeMirror-hints .sql-keyword { color: #3685f2; } -.CodeMirror-hints .CodeMirror-hint-active { - background: #3f8ce8; - color: #ffffff; -} diff --git a/src/less/base/sql/sql.less b/src/less/base/sql/sql.less index b96e436a0..61b1d513f 100644 --- a/src/less/base/sql/sql.less +++ b/src/less/base/sql/sql.less @@ -3,7 +3,7 @@ .bi-sql-editor{ & .cm-s-default span[class*="#"] { - color: @color-bi-text-warning; + color: @color-bi-text-highlight; } & .cm-s-default .cm-keyword { @@ -11,22 +11,17 @@ } & .cm-s-default .cm-function { - color: @color-bi-text-warning; + color: @color-bi-text-highlight; } } .CodeMirror-hints { & .sql-fr-function{ - color: @color-bi-text-warning; + color: @color-bi-text-highlight; } & .sql-keyword{ color: @color-bi-text-highlight; } - - .CodeMirror-hint-active { - background: @color-bi-background-highlight; - color: @color-bi-text; - } } \ No newline at end of file