From 1b21f6cad39491536dbf329e89b3131a11dffb0b Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Thu, 9 Oct 2014 23:04:02 +0800 Subject: [PATCH] #65 --- static/css/base.css | 10 ++++++++++ static/js/editors.js | 13 ++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/static/css/base.css b/static/css/base.css index baab675..f74bd02 100644 --- a/static/css/base.css +++ b/static/css/base.css @@ -237,6 +237,16 @@ ul { background-position: bottom; background-repeat: repeat-x; } + +.CodeMirror-hint { + padding-right: 18px; + max-width: none; +} + +.CodeMirror-hint:hover { + background: #08f; + color: white; +} /* end editor */ /* start bottom-window-group */ diff --git a/static/js/editors.js b/static/js/editors.js index e3e9b80..3599b46 100644 --- a/static/js/editors.js +++ b/static/js/editors.js @@ -105,9 +105,20 @@ var editors = { if (autocompleteArray) { for (var i = 0; i < autocompleteArray.length; i++) { + var displayText = ''; + if (autocompleteArray[i].class === 'type') { + displayText = ''// + autocompleteArray[i].class + + '' + autocompleteArray[i].name + '' + + autocompleteArray[i].type + ''; + } else { + displayText = ''// + autocompleteArray[i].class + + '' + autocompleteArray[i].name + ' ' + + autocompleteArray[i].type.substring(4) + ''; + } autocompleteHints[i] = { // TODO: 添加类型、图标 - displayText: '' + autocompleteArray[i].name + '', + + displayText: displayText, text: autocompleteArray[i].name }; }