diff options
author | Eric Guzman | 2012-05-25 16:37:43 -0700 |
---|---|---|
committer | Eric Guzman | 2012-05-25 16:37:43 -0700 |
commit | e884d2769a53dd8920b485672631b50158ed0800 (patch) | |
tree | 526934085f973f0bcfef5a3f130794530396aa03 /js/mediators | |
parent | 1f7c17d688c3340b31d2e1c2b7205b10bd806968 (diff) | |
parent | 81239571c538f72e398fafa5b07725bf1bbb2d5d (diff) | |
download | ninja-e884d2769a53dd8920b485672631b50158ed0800.tar.gz |
Merge branch 'binding' of github.com:dhg637/ninja-internal into binding
Diffstat (limited to 'js/mediators')
-rwxr-xr-x | js/mediators/element-mediator.js | 4 | ||||
-rwxr-xr-x | js/mediators/keyboard-mediator.js | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/js/mediators/element-mediator.js b/js/mediators/element-mediator.js index 483dacbc..f71a6f4d 100755 --- a/js/mediators/element-mediator.js +++ b/js/mediators/element-mediator.js | |||
@@ -86,7 +86,7 @@ exports.ElementMediator = Montage.create(Component, { | |||
86 | replaceElement: { | 86 | replaceElement: { |
87 | value: function(newChild, oldChild, notify) { | 87 | value: function(newChild, oldChild, notify) { |
88 | 88 | ||
89 | this.application.ninja.currentDocument.documentRoot.replaceChild(newChild, oldChild); | 89 | this.application.ninja.currentDocument.model.documentRoot.replaceChild(newChild, oldChild); |
90 | 90 | ||
91 | var undoLabel = "replace element"; | 91 | var undoLabel = "replace element"; |
92 | 92 | ||
@@ -520,7 +520,7 @@ exports.ElementMediator = Montage.create(Component, { | |||
520 | value: function(layersDraggedArray, layerDroppedAfter) { | 520 | value: function(layersDraggedArray, layerDroppedAfter) { |
521 | var documentRoot,length; | 521 | var documentRoot,length; |
522 | 522 | ||
523 | documentRoot = this.application.ninja.currentDocument.documentRoot; | 523 | documentRoot = this.application.ninja.currentDocument.model.documentRoot; |
524 | length = layersDraggedArray.length; | 524 | length = layersDraggedArray.length; |
525 | 525 | ||
526 | for(var i=0; documentRoot.children[i]; i++) { | 526 | for(var i=0; documentRoot.children[i]; i++) { |
diff --git a/js/mediators/keyboard-mediator.js b/js/mediators/keyboard-mediator.js index 2f55edb4..e2e8e937 100755 --- a/js/mediators/keyboard-mediator.js +++ b/js/mediators/keyboard-mediator.js | |||
@@ -88,7 +88,7 @@ exports.KeyboardMediator = Montage.create(Component, { | |||
88 | 88 | ||
89 | //keyboard controls for html design view | 89 | //keyboard controls for html design view |
90 | // TODO - New template mode doesn't set currentView yet. | 90 | // TODO - New template mode doesn't set currentView yet. |
91 | if((!!this.application.ninja.currentDocument) && (this.application.ninja.currentDocument.model.currentView === "design")){ | 91 | if((!!this.application.ninja.currentDocument) && (this.application.ninja.currentDocument.currentView === "design")) { |
92 | 92 | ||
93 | // Don't do anything if an input or other control is focused | 93 | // Don't do anything if an input or other control is focused |
94 | if(document.activeElement.nodeName !== "BODY") { | 94 | if(document.activeElement.nodeName !== "BODY") { |
@@ -252,7 +252,7 @@ exports.KeyboardMediator = Montage.create(Component, { | |||
252 | handleKeyup: { | 252 | handleKeyup: { |
253 | value: function(evt) { | 253 | value: function(evt) { |
254 | //keyboard controls for html design view | 254 | //keyboard controls for html design view |
255 | if((!!this.application.ninja.currentDocument)){// && (this.application.ninja.currentDocument.model.currentView === "design")){ | 255 | if((!!this.application.ninja.currentDocument) && (this.application.ninja.currentDocument.currentView === "design")) { |
256 | if(document.activeElement.nodeName !== "BODY") { | 256 | if(document.activeElement.nodeName !== "BODY") { |
257 | // Don't do anything if an input or other control is focused | 257 | // Don't do anything if an input or other control is focused |
258 | return; | 258 | return; |