aboutsummaryrefslogtreecommitdiff
path: root/js/mediators/element-mediator.js
diff options
context:
space:
mode:
authorValerio Virgillito2012-02-13 21:43:51 -0800
committerValerio Virgillito2012-02-13 21:43:51 -0800
commit081f17954c735fc8b946d72a25b0ee60d370ef9b (patch)
treede7b50f2d02365df897ef4356f953d3833c9cabd /js/mediators/element-mediator.js
parent47df0aff81c25334b129047bb227ea5015357eda (diff)
parent1d82f1a041612f32bbf6c9f20d9fb14e2d11fcc7 (diff)
downloadninja-081f17954c735fc8b946d72a25b0ee60d370ef9b.tar.gz
Merge branch 'refs/heads/master' into components
Conflicts: js/components/treeview/ninja-leaf.reel/ninja-leaf.js Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js/mediators/element-mediator.js')
-rw-r--r--js/mediators/element-mediator.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/js/mediators/element-mediator.js b/js/mediators/element-mediator.js
index 9aefbca6..95aec2a3 100644
--- a/js/mediators/element-mediator.js
+++ b/js/mediators/element-mediator.js
@@ -105,6 +105,25 @@ exports.ElementMediator = Montage.create(NJComponent, {
105 } 105 }
106 }, 106 },
107 107
108 deleteElements: {
109 value: function(items) {
110 // Add the Undo/Redo
111 var len, el;
112
113 len = items.length;
114
115 if(len) {
116
117 for(var i = len - 1; i >= 0; i--) {
118 el = items[i]._element || items[i];
119 this._removeElement(el);
120 }
121
122 NJevent( "deleteSelection", items );
123 }
124 }
125 },
126
108 _removeElement: { 127 _removeElement: {
109 value: function(el, rules) { 128 value: function(el, rules) {
110 ElementController.removeElement(el, rules); 129 ElementController.removeElement(el, rules);