aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Antonio Marquez2012-06-28 09:50:28 -0700
committerJose Antonio Marquez2012-06-28 09:50:28 -0700
commitee1adbcc33932bc27966c02b159a3ab06966d4a5 (patch)
treea9d5ff91681aa06bf26cb62994461a58d3f80005
parentca1e79d4dc36a55c47b6f8cb92069eafc95383b5 (diff)
parent299ad041ab8f8669b3688e5ce74df5213d82ade6 (diff)
downloadninja-ee1adbcc33932bc27966c02b159a3ab06966d4a5.tar.gz
Merge branch 'refs/heads/Ninja-Internal' into Document
-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
-rwxr-xr-xjs/document/templates/banner/index.html2
-rwxr-xr-xjs/document/templates/html/index.html2
-rwxr-xr-xjs/document/views/code.js2
-rw-r--r--js/io/system/ninjalibrary.json2
-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.js221
-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
-rwxr-xr-xjs/panels/components-panel.reel/components-panel.js3
-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--node_modules/components-data/map.json2
-rw-r--r--node_modules/descriptor.json10
-rw-r--r--node_modules/montage-google/feed-reader/feed-entry.reel/feed-entry.html2
-rw-r--r--node_modules/montage-google/feed-reader/feed-reader.reel/feed-reader.html1
-rw-r--r--node_modules/montage-google/feed-reader/feed-reader.reel/feed-reader.js3
-rw-r--r--node_modules/montage-google/map.reel/icons/airplane.pngbin0 -> 3004 bytes
-rw-r--r--node_modules/montage-google/map.reel/icons/cafe.pngbin0 -> 2958 bytes
-rw-r--r--node_modules/montage-google/map.reel/icons/coffee.pngbin0 -> 3052 bytes
-rw-r--r--node_modules/montage-google/map.reel/icons/food.pngbin0 -> 3038 bytes
-rw-r--r--node_modules/montage-google/map.reel/icons/fork-and-knife.pngbin0 -> 2882 bytes
-rw-r--r--node_modules/montage-google/map.reel/icons/map-marker.pngbin0 -> 3131 bytes
-rw-r--r--node_modules/montage-google/map.reel/icons/medical.pngbin0 -> 2915 bytes
-rw-r--r--node_modules/montage-google/map.reel/icons/picture-frame.pngbin0 -> 2928 bytes
-rw-r--r--node_modules/montage-google/map.reel/icons/shopping.pngbin0 -> 2970 bytes
-rw-r--r--node_modules/montage-google/map.reel/icons/widescreen.pngbin0 -> 2986 bytes
-rw-r--r--node_modules/montage-google/map.reel/icons/wine-bottle.pngbin0 -> 187 bytes
-rw-r--r--node_modules/montage-google/map.reel/icons/wine-glass.pngbin0 -> 2983 bytes
-rw-r--r--node_modules/montage-google/map.reel/map.js27
-rwxr-xr-xnode_modules/montage-google/picasa-carousel.reel/picasa-carousel.html1
-rw-r--r--node_modules/montage-google/youtube-channel.reel/youtube-channel.html1
-rw-r--r--node_modules/montage-google/youtube-channel.reel/youtube-channel.js10
49 files changed, 503 insertions, 219 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": {