aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorAnanya Sen2012-04-04 12:19:08 -0700
committerAnanya Sen2012-04-04 12:19:08 -0700
commite5dc1a5f35c2c6f3273e89109f1be445471b2dec (patch)
tree4151d67e6ecaae3938974a365e08893f6fdae13d /js
parent4b1b72971567ea569a10c740e26aee33421e7bd5 (diff)
downloadninja-e5dc1a5f35c2c6f3273e89109f1be445471b2dec.tar.gz
-styled the autocomplete dropdown
- trigger autocomplete automatically Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
Diffstat (limited to 'js')
-rwxr-xr-xjs/stage/stage-view.reel/stage-view.js17
1 files changed, 13 insertions, 4 deletions
diff --git a/js/stage/stage-view.reel/stage-view.js b/js/stage/stage-view.reel/stage-view.js
index 28a66396..43751559 100755
--- a/js/stage/stage-view.reel/stage-view.js
+++ b/js/stage/stage-view.reel/stage-view.js
@@ -110,10 +110,19 @@ exports.StageView = Montage.create(Component, {
110 doc.editor.setLineClass(doc.editor.hline, null); 110 doc.editor.setLineClass(doc.editor.hline, null);
111 doc.editor.hline = doc.editor.setLineClass(doc.editor.getCursor().line, "activeline"); 111 doc.editor.hline = doc.editor.setLineClass(doc.editor.getCursor().line, "activeline");
112 }, 112 },
113 extraKeys: {"Ctrl-Space": function(cm) { 113 //extraKeys: {"Ctrl-Space": function(cm) {CodeMirror.simpleHint(cm, CodeMirror.javascriptHint);}}
114 CodeMirror.simpleHint(cm, CodeMirror.javascriptHint); 114 onKeyEvent: function(cm, keyEvent) {
115 } 115 if((keyEvent.type === "keyup")//need seperate keycode set per mode
116 } 116 && ((keyEvent.keyCode > 47 && keyEvent.keyCode < 57)//numbers
117 || (keyEvent.keyCode > 64 && keyEvent.keyCode <91)//letters
118 || (keyEvent.keyCode === 190)//period
119 || (keyEvent.keyCode === 189)//underscore, dash
120 )
121 ){
122
123 CodeMirror.simpleHint(cm, CodeMirror.javascriptHint);
124 }
125 }
117 }); 126 });
118 127
119 doc.editor.hline = doc.editor.setLineClass(0, "activeline"); 128 doc.editor.hline = doc.editor.setLineClass(0, "activeline");