aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorJose Antonio Marquez2012-06-27 09:59:01 -0700
committerJose Antonio Marquez2012-06-27 09:59:01 -0700
commitca1e79d4dc36a55c47b6f8cb92069eafc95383b5 (patch)
tree2bf23250a605ca42a33f7bc75698357e0258d624 /js
parent245e70117f9605dc5603328c97685b2e5a10f220 (diff)
parent2ebf3e3ea24d0d580575dfa13d31588dac1de445 (diff)
downloadninja-ca1e79d4dc36a55c47b6f8cb92069eafc95383b5.tar.gz
Merge branch 'refs/heads/Ninja-Internal' into Document
Diffstat (limited to 'js')
-rw-r--r--js/components/editable.reel/editable.js45
-rw-r--r--js/components/hintable.reel/hintable.js47
-rwxr-xr-xjs/components/layout/tools-list.reel/tools-list.html11
-rwxr-xr-xjs/components/layout/tools-properties.reel/tools-properties.html12
-rwxr-xr-xjs/components/textfield.reel/textfield.js23
-rw-r--r--js/components/toolbar.reel/toolbar.html3
-rwxr-xr-xjs/components/tools-properties/binding-properties.reel/binding-properties.css17
-rwxr-xr-xjs/components/tools-properties/binding-properties.reel/binding-properties.html35
-rwxr-xr-xjs/components/tools-properties/binding-properties.reel/binding-properties.js25
-rwxr-xr-xjs/components/tools-properties/text-properties.reel/text-properties.html9
-rwxr-xr-xjs/components/tools-properties/text-properties.reel/text-properties.js160
-rw-r--r--js/controllers/objects-controller.js246
-rwxr-xr-xjs/controllers/styles-controller.js79
-rw-r--r--js/data/panels-data.js38
-rwxr-xr-xjs/data/tools-data.js15
-rwxr-xr-xjs/document/document-html.js3
-rwxr-xr-xjs/document/models/base.js13
-rwxr-xr-xjs/document/models/html.js3
-rw-r--r--js/document/templates/app/main.js4
-rwxr-xr-xjs/document/views/design.js8
-rwxr-xr-xjs/helper-classes/3D/draw-utils.js44
-rwxr-xr-xjs/mediators/keyboard-mediator.js7
-rwxr-xr-xjs/mediators/mouse-mediator.js31
-rwxr-xr-xjs/ninja.reel/ninja.html13
-rwxr-xr-xjs/ninja.reel/ninja.js25
-rwxr-xr-xjs/panels/Panel.reel/Panel.js10
-rwxr-xr-xjs/panels/PanelContainer.reel/PanelContainer.html17
-rwxr-xr-xjs/panels/PanelContainer.reel/PanelContainer.js29
-rwxr-xr-xjs/panels/Splitter.js8
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js12
-rw-r--r--js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js56
-rw-r--r--js/panels/binding-panel.reel/binding-panel.css27
-rw-r--r--js/panels/binding-panel.reel/binding-panel.html80
-rw-r--r--js/panels/binding-panel.reel/binding-panel.js126
-rw-r--r--js/panels/binding/binding-item.reel/binding-item.css80
-rw-r--r--js/panels/binding/binding-item.reel/binding-item.html101
-rw-r--r--js/panels/binding/binding-item.reel/binding-item.js118
-rw-r--r--js/panels/binding/edit-binding-view.reel/edit-binding-view.css128
-rw-r--r--js/panels/binding/edit-binding-view.reel/edit-binding-view.html192
-rw-r--r--js/panels/binding/edit-binding-view.reel/edit-binding-view.js359
-rwxr-xr-xjs/panels/components-panel.reel/components-panel.js36
-rw-r--r--js/panels/css-panel/rule-list.reel/rule-list.js2
-rw-r--r--js/panels/objects/object.reel/object.css59
-rw-r--r--js/panels/objects/object.reel/object.html44
-rw-r--r--js/panels/objects/object.reel/object.js115
-rw-r--r--js/panels/objects/objects-panel.reel/objects-panel.css20
-rw-r--r--js/panels/objects/objects-panel.reel/objects-panel.html58
-rw-r--r--js/panels/objects/objects-panel.reel/objects-panel.js38
-rwxr-xr-xjs/panels/properties.reel/sections/custom.reel/custom.js6
-rwxr-xr-xjs/stage/binding-view.reel/binding-hud-option.reel/binding-hud-option.css5
-rwxr-xr-xjs/stage/binding-view.reel/binding-hud-option.reel/binding-hud-option.html39
-rwxr-xr-xjs/stage/binding-view.reel/binding-hud-option.reel/binding-hud-option.js57
-rwxr-xr-xjs/stage/binding-view.reel/binding-hud.reel/binding-hud.css104
-rwxr-xr-xjs/stage/binding-view.reel/binding-hud.reel/binding-hud.html78
-rwxr-xr-xjs/stage/binding-view.reel/binding-hud.reel/binding-hud.js314
-rwxr-xr-xjs/stage/binding-view.reel/binding-view.css38
-rwxr-xr-xjs/stage/binding-view.reel/binding-view.html74
-rwxr-xr-xjs/stage/binding-view.reel/binding-view.js440
-rw-r--r--js/stage/objects-tray.reel/objects-tray.css41
-rw-r--r--js/stage/objects-tray.reel/objects-tray.html66
-rw-r--r--js/stage/objects-tray.reel/objects-tray.js140
-rwxr-xr-xjs/stage/stage.reel/stage.css13
-rwxr-xr-xjs/stage/stage.reel/stage.html12
-rwxr-xr-xjs/stage/stage.reel/stage.js82
-rwxr-xr-xjs/tools/PanTool.js6
-rwxr-xr-xjs/tools/TextTool.js48
-rw-r--r--js/tools/bindingTool.js102
67 files changed, 3968 insertions, 328 deletions
diff --git a/js/components/editable.reel/editable.js b/js/components/editable.reel/editable.js
index 103e418f..88b93b2c 100644
--- a/js/components/editable.reel/editable.js
+++ b/js/components/editable.reel/editable.js
@@ -93,12 +93,43 @@ exports.Editable = Montage.create(Component, {
93 } 93 }
94 } 94 }
95 }, 95 },
96
97 _value : { value: null },
96 value : { 98 value : {
97 get: function() { 99 get : function() { return this._value; },
98 return this._element.textContent; 100 set : function(value) {
99 }, 101 if(value === this._value) { return; }
100 set: function(str) { 102
101 this._element.textContent = str; 103 var node = this._getFirstTextNode();
104 node.textContent = value;
105
106 this._value = value;
107 }
108 },
109 _getFirstTextNode : {
110 value : function(el) {
111 ///// optional el argument specified container element
112 var e = el || this._element,
113 nodes = e.childNodes, node;
114
115 if(nodes.length) {
116 for(var i=0; i<nodes.length; i++) {
117 if(nodes[i].nodeType === 3) {
118 ///// found the first text node
119 node = nodes[i];
120 break;
121 }
122 }
123 }
124
125 ///// Text node not found
126 if(!node) {
127 node = document.createTextNode('');
128 e.appendChild(node);
129 }
130
131
132 return node;
102 } 133 }
103 }, 134 },
104 135
@@ -207,6 +238,8 @@ exports.Editable = Montage.create(Component, {
207 ///// Text input has changed values 238 ///// Text input has changed values
208 handleInput : { 239 handleInput : {
209 value : function(e) { 240 value : function(e) {
241 this.value = this._getFirstTextNode().textContent;
242
210 if(!this.isDirty) { 243 if(!this.isDirty) {
211 this.isDirty = true; 244 this.isDirty = true;
212 } 245 }
@@ -230,6 +263,8 @@ exports.Editable = Montage.create(Component, {
230 value: function(e) { 263 value: function(e) {
231 e.preventDefault(); 264 e.preventDefault();
232 document.execCommand('insertHTML', null, e._event.clipboardData.getData("Text")); 265 document.execCommand('insertHTML', null, e._event.clipboardData.getData("Text"));
266 this.value = this._element.textContent;
267
233 this._sendEvent('paste', e); 268 this._sendEvent('paste', e);
234 } 269 }
235 }, 270 },
diff --git a/js/components/hintable.reel/hintable.js b/js/components/hintable.reel/hintable.js
index 08e87bf0..fb55c937 100644
--- a/js/components/hintable.reel/hintable.js
+++ b/js/components/hintable.reel/hintable.js
@@ -140,19 +140,6 @@ exports.Hintable = Montage.create(Editable, {
140 } 140 }
141 } 141 }
142 }, 142 },
143 value : {
144 get: function() {
145 return this._getFirstTextNode().textContent;
146 },
147 set: function(str) {
148 var node = this._getFirstTextNode();
149 if (node.textContent !== str) {
150 node.textContent = str;
151 }
152
153 //node.innerText = str;
154 }
155 },
156 143
157 handleKeydown : { 144 handleKeydown : {
158 value : function handleKeydown(e) { 145 value : function handleKeydown(e) {
@@ -189,17 +176,18 @@ exports.Hintable = Montage.create(Editable, {
189 handleInput : { 176 handleInput : {
190 value : function handleInput(e) { 177 value : function handleInput(e) {
191 this._super(arguments); 178 this._super(arguments);
192 179
193 var val = this.value, 180 var val = this.value,
194 matches, hint; 181 matches, hint;
195 //console.log('val = "' + val + '"');