aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--js/code-editor/code-editor-wrapper.js (renamed from js/controllers/code-editor-controller.js)34
-rw-r--r--js/code-editor/codemirror-ninja/lib/ninja-simple-hint.js6
-rw-r--r--js/code-editor/ui/code-editor-view-options.reel/code-editor-view-options.html10
-rw-r--r--js/code-editor/ui/code-editor-view-options.reel/code-editor-view-options.js62
-rw-r--r--js/controllers/objects-controller.js4
-rwxr-xr-xjs/controllers/styles-controller.js79
-rwxr-xr-xjs/document/templates/banner/index.html2
-rwxr-xr-xjs/document/templates/html/index.html2
-rwxr-xr-xjs/document/views/code.js2
-rwxr-xr-xjs/ninja.reel/ninja.html9
-rwxr-xr-xjs/ninja.reel/ninja.js2
-rw-r--r--js/panels/Timeline/Keyframe.reel/Keyframe.js13
-rw-r--r--js/panels/Timeline/Layer.reel/Layer.js20
-rw-r--r--js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js25
-rw-r--r--js/panels/Timeline/Span.reel/Span.js6
-rw-r--r--js/panels/Timeline/Style.reel/Style.html4
-rw-r--r--js/panels/Timeline/Style.reel/Style.js6
-rw-r--r--js/panels/Timeline/Style.reel/css/Style.css52
-rw-r--r--js/panels/Timeline/Style.reel/scss/Style.scss5
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html6
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js218
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/css/TimelinePanel.css36
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/scss/TimelinePanel.scss3
-rw-r--r--js/panels/Timeline/TimelineTrack.reel/TimelineTrack.html21
-rw-r--r--js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js88
-rw-r--r--js/panels/Timeline/Tween.reel/Tween.js12
-rw-r--r--js/panels/css-panel/rule-components/css-style-rule.reel/css-style-rule.js5
-rw-r--r--js/panels/css-panel/rule-list-container.reel/rule-list-container.js8
-rw-r--r--js/panels/css-panel/rule-list.reel/rule-list.js2
-rwxr-xr-xjs/stage/binding-view.reel/binding-hud.reel/binding-hud.css24
-rwxr-xr-xjs/stage/binding-view.reel/binding-hud.reel/binding-hud.js46
-rwxr-xr-xjs/stage/binding-view.reel/binding-view.html6
32 files changed, 572 insertions, 246 deletions
diff --git a/js/controllers/code-editor-controller.js b/js/code-editor/code-editor-wrapper.js
index f3c19b92..942bd5cd 100644
--- a/js/controllers/code-editor-controller.js
+++ b/js/code-editor/code-editor-wrapper.js
@@ -9,7 +9,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
9var Montage = require("montage/core/core").Montage, 9var Montage = require("montage/core/core").Montage,
10 Component = require("montage/ui/component").Component; 10 Component = require("montage/ui/component").Component;
11 11
12exports.CodeEditorController = Montage.create(Component, { 12exports.CodeEditorWrapper = Montage.create(Component, {
13 hasTemplate: { 13 hasTemplate: {
14 value: false 14 value: false
15 }, 15 },
@@ -32,8 +32,9 @@ exports.CodeEditorController = Montage.create(Component, {
32 if(!value) { 32 if(!value) {
33 33
34 } else if(this._currentDocument.currentView === "code") { 34 } else if(this._currentDocument.currentView === "code") {
35 this.autocomplete = !this.codeCompletionSupport[this._currentDocument.model.file.extension]; 35 this.autocomplete = this.codeCompletionSupport[this._currentDocument.model.file.extension];
36 this._currentDocument.model.views.code.editor.focus(); 36 this._currentDocument.model.views.code.editor.focus();
37
37 this.applySettings(); 38 this.applySettings();
38 } 39 }
39 } 40 }
@@ -56,21 +57,6 @@ exports.CodeEditorController = Montage.create(Component, {
56 value: false 57 value: false
57 }, 58 },
58 59
59 _automaticCodeComplete: {
60 value:false
61 },
62
63 automaticCodeComplete:{
64 get: function(){
65 return this._automaticCodeComplete;
66 },
67 set: function(value) {
68 if(this._automaticCodeComplete !== value) {
69 this._automaticCodeComplete = value;
70 }
71 }
72 },
73
74 _editorTheme: { 60 _editorTheme: {
75 value:"default" 61 value:"default"
76 }, 62 },
@@ -93,7 +79,10 @@ exports.CodeEditorController = Montage.create(Component, {
93 return this._zoomFactor; 79 return this._zoomFactor;
94 }, 80 },
95 set: function(value) { 81 set: function(value) {
96 this.handleZoom(value); 82 if(value !== this._zoomFactor){
83 this._zoomFactor = value;
84 this.handleZoom(value);
85 }
97 } 86 }
98 }, 87 },
99 88
@@ -112,6 +101,10 @@ exports.CodeEditorController = Montage.create(Component, {
112 value:function(codeDocumentView, type, documentType, textDocument){ 101 value:function(codeDocumentView, type, documentType, textDocument){
113 var self = this, editorOptions = null; 102 var self = this, editorOptions = null;
114 103
104 if(!this.application.ninja.editorViewOptions.codeEditorWrapper){
105 this.application.ninja.editorViewOptions.codeEditorWrapper = this;
106 }
107
115 editorOptions = { 108 editorOptions = {
116 lineNumbers: true, 109 lineNumbers: true,
117 matchBrackets:true, 110 matchBrackets:true,
@@ -132,6 +125,9 @@ exports.CodeEditorController = Montage.create(Component, {
132 }; 125 };
133 126
134 //configure auto code completion if it is supported for that document type 127 //configure auto code completion if it is supported for that document type
128
129 this.autocomplete = this.codeCompletionSupport[documentType];
130
135 if(this.autocomplete) { 131 if(this.autocomplete) {
136 132
137 editorOptions.onKeyEvent = function(cm, keyEvent){ 133 editorOptions.onKeyEvent = function(cm, keyEvent){
@@ -163,7 +159,7 @@ exports.CodeEditorController = Montage.create(Component, {
163 } 159 }
164 160
165 //===manually triggered code completion 161 //===manually triggered code completion
166 if((this.automaticCodeComplete === false)){ 162 if((this.currentDocument.model.views.code.editor.automaticCodeHint === false)){
167 if(keyEvent.ctrlKey && keyEvent.keyCode === 32){//Ctrl+Space 163 if(keyEvent.ctrlKey && keyEvent.keyCode === 32){//Ctrl+Space
168 this.codeEditor.simpleHint(cm, this.codeEditor.javascriptHint); 164 this.codeEditor.simpleHint(cm, this.codeEditor.javascriptHint);
169 } 165 }
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..99fe2d21 100644
--- a/js/code-editor/codemirror-ninja/lib/ninja-simple-hint.js
+++ b/js/code-editor/codemirror-ninja/lib/ninja-simple-hint.js
@@ -13,7 +13,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
13 13
14 // Ninja override: don't show code hinting if the token is empty 14 // Ninja override: don't show code hinting if the token is empty
15 var tempToken = editor.getTokenAt(editor.getCursor()); 15 var tempToken = editor.getTokenAt(editor.getCursor());
16 if(tempToken && ((tempToken.string === "") || !(/[\S]/gi.test(tempToken.string)))) return;//check that token has only spaces 16 if(!(/[\S]/gi.test(tempToken.string))) return;
17 17
18 18
19 var result = getHints(editor); 19 var result = getHints(editor);
@@ -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.html b/js/code-editor/ui/code-editor-view-options.reel/code-editor-view-options.html
index 4448e1f1..9871525b 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
@@ -11,12 +11,13 @@
11 <script type="text/montage-serialization"> 11 <script type="text/montage-serialization">
12 { 12 {
13 "codeCompleteCheck":{ 13 "codeCompleteCheck":{
14 "prototype": "montage/ui/input-checkbox.reel", 14 "prototype": "montage/ui/native/input-checkbox.reel",
15 "properties": { 15 "properties": {
16 "element": {"#": "codeComplete"} 16 "element": {"#": "codeComplete"}
17 }, 17 },
18 "bindings": { 18 "bindings": {
19 "disabled": {"<-": "@owner.autocomplete"} 19 "disabled": {"<-": "@owner.autocomplete"},
20 "checked": {"<->": "@owner.automaticCodeHint"}
20 } 21 }
21 }, 22 },
22 23
@@ -29,6 +30,9 @@
29 "stepSize" :10, 30 "stepSize" :10,
30 "acceptableUnits" : ["%"], 31 "acceptableUnits" : ["%"],
31 "units" : "%" 32 "units" : "%"
33 },
34 "bindings": {
35 "value": {"<->": "@owner.zoomFactor"}