diff options
author | Valerio Virgillito | 2012-05-29 00:34:40 -0700 |
---|---|---|
committer | Valerio Virgillito | 2012-05-29 00:34:40 -0700 |
commit | 4c3aac5eabd93052b1554a03d78235215bb49db4 (patch) | |
tree | fe08f4f6d33d81d602f56daeaec845577fb9d8a5 /js/mediators | |
parent | 9a66ccad0235484643ef6d821315b11b5be4a93e (diff) | |
download | ninja-4c3aac5eabd93052b1554a03d78235215bb49db4.tar.gz |
document bindings phase 1
- using array controller to bind the current document to all ninja components
- removed open document event
- removed references to the document controller
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js/mediators')
-rwxr-xr-x | js/mediators/element-mediator.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/js/mediators/element-mediator.js b/js/mediators/element-mediator.js index f71a6f4d..1d5e9ade 100755 --- a/js/mediators/element-mediator.js +++ b/js/mediators/element-mediator.js | |||
@@ -48,7 +48,7 @@ exports.ElementMediator = Montage.create(Component, { | |||
48 | 48 | ||
49 | document.application.undoManager.add(undoLabel, this.removeElements, this, elements, notify); | 49 | document.application.undoManager.add(undoLabel, this.removeElements, this, elements, notify); |
50 | 50 | ||
51 | this.application.ninja.documentController.activeDocument.model.needsSave = true; | 51 | this.application.ninja.currentDocument.model.needsSave = true; |
52 | 52 | ||
53 | if(notify || notify === undefined) { | 53 | if(notify || notify === undefined) { |
54 | NJevent("elementAdded", elements); | 54 | NJevent("elementAdded", elements); |
@@ -77,7 +77,7 @@ exports.ElementMediator = Montage.create(Component, { | |||
77 | 77 | ||
78 | document.application.undoManager.add(undoLabel, this.addElements, this, elements, null, notify); | 78 | document.application.undoManager.add(undoLabel, this.addElements, this, elements, null, notify); |
79 | 79 | ||
80 | this.application.ninja.documentController.activeDocument.model.needsSave = true; | 80 | this.application.ninja.currentDocument.model.needsSave = true; |
81 | 81 | ||
82 | NJevent("elementsRemoved", elements); | 82 | NJevent("elementsRemoved", elements); |
83 | } | 83 | } |
@@ -92,7 +92,7 @@ exports.ElementMediator = Montage.create(Component, { | |||
92 | 92 | ||
93 | document.application.undoManager.add(undoLabel, this.replaceElement, this, oldChild, newChild); | 93 | document.application.undoManager.add(undoLabel, this.replaceElement, this, oldChild, newChild); |
94 | 94 | ||
95 | this.application.ninja.documentController.activeDocument.model.needsSave = true; | 95 | this.application.ninja.currentDocument.model.needsSave = true; |
96 | 96 | ||
97 | if(notify || notify === undefined) { | 97 | if(notify || notify === undefined) { |
98 | NJevent("elementReplaced", {type : "replaceElement", data: {"newChild": newChild, "oldChild": oldChild}}); | 98 | NJevent("elementReplaced", {type : "replaceElement", data: {"newChild": newChild, "oldChild": oldChild}}); |