diff options
Diffstat (limited to 'js/code-editor')
4 files changed, 16 insertions, 3 deletions
diff --git a/js/code-editor/codemirror-ninja/lib/ninja-simple-hint.js b/js/code-editor/codemirror-ninja/lib/ninja-simple-hint.js index 4787b4f8..adcafd41 100644 --- a/js/code-editor/codemirror-ninja/lib/ninja-simple-hint.js +++ b/js/code-editor/codemirror-ninja/lib/ninja-simple-hint.js | |||
@@ -22,8 +22,8 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot | |||
22 | function insert(str) { | 22 | function insert(str) { |
23 | editor.replaceRange(str, result.from, result.to); | 23 | editor.replaceRange(str, result.from, result.to); |
24 | } | 24 | } |
25 | // Ninja override: don't autocomplete to reduce user's typing errors | 25 | |
26 | // if (completions.length == 1) {insert(completions[0]); return true;} | 26 | if (completions.length == 1) {insert(completions[0]); return true;} |
27 | 27 | ||
28 | // Build the select widget | 28 | // Build the select widget |
29 | var complete = document.createElement("div"); | 29 | var complete = document.createElement("div"); |
diff --git a/js/code-editor/ui/code-editor-view-options.reel/code-editor-view-options.css b/js/code-editor/ui/code-editor-view-options.reel/code-editor-view-options.css index aeaf604c..68d77f90 100644 --- a/js/code-editor/ui/code-editor-view-options.reel/code-editor-view-options.css +++ b/js/code-editor/ui/code-editor-view-options.reel/code-editor-view-options.css | |||
@@ -22,6 +22,11 @@ | |||
22 | vertical-align: middle; | 22 | vertical-align: middle; |
23 | } | 23 | } |
24 | 24 | ||
25 | .viewOptions .autoCodeComplete input{ | ||
26 | width: 1em; | ||
27 | height: 1em; | ||
28 | } | ||
29 | |||
25 | .viewOptions .autoCodeComplete .disabled{ | 30 | .viewOptions .autoCodeComplete .disabled{ |
26 | color:#515151; | 31 | color:#515151; |
27 | } | 32 | } |
diff --git a/js/code-editor/ui/code-editor-view-options.reel/code-editor-view-options.html b/js/code-editor/ui/code-editor-view-options.reel/code-editor-view-options.html index 4448e1f1..3d5df256 100644 --- a/js/code-editor/ui/code-editor-view-options.reel/code-editor-view-options.html +++ b/js/code-editor/ui/code-editor-view-options.reel/code-editor-view-options.html | |||
@@ -54,7 +54,7 @@ | |||
54 | <input class="zoomFont" data-montage-id="zoomFont"/> | 54 | <input class="zoomFont" data-montage-id="zoomFont"/> |
55 | <div class="autoCodeComplete" > | 55 | <div class="autoCodeComplete" > |
56 | <input type="checkbox" data-montage-id="codeComplete" /> | 56 | <input type="checkbox" data-montage-id="codeComplete" /> |
57 | <label data-montage-id="autoCompleteLabel">Automatic Completion</label> | 57 | <label data-montage-id="autoCompleteLabel">Auto Code Hints</label> |
58 | </div> | 58 | </div> |
59 | <div class="floatButtons"> | 59 | <div class="floatButtons"> |
60 | <!--<button disabled="disabled" id="format" value="format" class="nj-skinned format">Format</button>--> | 60 | <!--<button disabled="disabled" id="format" value="format" class="nj-skinned format">Format</button>--> |
diff --git a/js/code-editor/ui/code-editor-view-options.reel/code-editor-view-options.js b/js/code-editor/ui/code-editor-view-options.reel/code-editor-view-options.js index 13c9a705..04b509a6 100644 --- a/js/code-editor/ui/code-editor-view-options.reel/code-editor-view-options.js +++ b/js/code-editor/ui/code-editor-view-options.reel/code-editor-view-options.js | |||
@@ -121,6 +121,12 @@ exports.CodeEditorViewOptions = Montage.create(Component, { | |||
121 | oneway : false | 121 | oneway : false |
122 | }); | 122 | }); |
123 | 123 | ||
124 | Object.defineBinding(this.codeCompleteCheck , "checked", { | ||
125 | boundObject: this.application.ninja.codeEditorController, | ||
126 | boundObjectPropertyPath: "automaticCodeComplete", | ||
127 | oneway : false | ||
128 | }); | ||
129 | |||
124 | } | 130 | } |
125 | }, | 131 | }, |
126 | 132 | ||
@@ -137,6 +143,8 @@ exports.CodeEditorViewOptions = Montage.create(Component, { | |||
137 | } else { | 143 | } else { |
138 | this.autoCompleteLabel.classList.remove("disabled"); | 144 | this.autoCompleteLabel.classList.remove("disabled"); |
139 | } | 145 | } |
146 | |||
147 | this.codeCompleteCheck.checked = false; | ||
140 | } | 148 | } |
141 | }, | 149 | }, |
142 | 150 | ||