diff options
author | Ananya Sen | 2012-06-19 11:00:49 -0700 |
---|---|---|
committer | Ananya Sen | 2012-06-19 11:00:49 -0700 |
commit | f1d8401aeb84e0eb0680caf72878dae26fd78a37 (patch) | |
tree | 31771ccaf3d1e2ddf01fa9605438d20be0d155d7 /js/mediators | |
parent | 9ea2610cec6569e7b7d5268b6c65bbf94c4753e5 (diff) | |
parent | 483ad57efcd6475776f580c3af5b60e6deeaf781 (diff) | |
download | ninja-f1d8401aeb84e0eb0680caf72878dae26fd78a37.tar.gz |
Merge branch 'refs/heads/ninja-internal-master' into cut-copy-paste
Diffstat (limited to 'js/mediators')
-rwxr-xr-x | js/mediators/element-mediator.js | 2 | ||||
-rwxr-xr-x | js/mediators/keyboard-mediator.js | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/js/mediators/element-mediator.js b/js/mediators/element-mediator.js index 40e94cca..017ed20a 100755 --- a/js/mediators/element-mediator.js +++ b/js/mediators/element-mediator.js | |||
@@ -13,7 +13,6 @@ var ElementController = require("js/controllers/elements/element-controller").El | |||
13 | 13 | ||
14 | exports.ElementMediator = Montage.create(Component, { | 14 | exports.ElementMediator = Montage.create(Component, { |
15 | 15 | ||
16 | |||
17 | addDelegate: { | 16 | addDelegate: { |
18 | enumerable: false, | 17 | enumerable: false, |
19 | value: null | 18 | value: null |
@@ -84,6 +83,7 @@ exports.ElementMediator = Montage.create(Component, { | |||
84 | value: function(newChild, oldChild, notify) { | 83 | value: function(newChild, oldChild, notify) { |
85 | 84 | ||
86 | this.application.ninja.currentDocument.model.documentRoot.replaceChild(newChild, oldChild); | 85 | this.application.ninja.currentDocument.model.documentRoot.replaceChild(newChild, oldChild); |
86 | if (newChild.getAttribute) newChild.setAttribute('data-ninja-node', 'true'); | ||
87 | 87 | ||
88 | var undoLabel = "replace element"; | 88 | var undoLabel = "replace element"; |
89 | 89 | ||
diff --git a/js/mediators/keyboard-mediator.js b/js/mediators/keyboard-mediator.js index 73cea6de..27c3731c 100755 --- a/js/mediators/keyboard-mediator.js +++ b/js/mediators/keyboard-mediator.js | |||
@@ -56,6 +56,11 @@ var Keyboard = exports.Keyboard = { | |||
56 | 56 | ||
57 | exports.KeyboardMediator = Montage.create(Component, { | 57 | exports.KeyboardMediator = Montage.create(Component, { |
58 | 58 | ||
59 | appModel: { | ||
60 | value: null, | ||
61 | serializable: true | ||
62 | }, | ||
63 | |||
59 | deserializedFromTemplate: { | 64 | deserializedFromTemplate: { |
60 | value: function() { | 65 | value: function() { |
61 | this.eventManager.addEventListener("appLoaded", this, false); | 66 | this.eventManager.addEventListener("appLoaded", this, false); |