aboutsummaryrefslogtreecommitdiff
path: root/js/mediators
diff options
context:
space:
mode:
authorValerio Virgillito2012-07-18 15:36:59 -0700
committerValerio Virgillito2012-07-18 15:36:59 -0700
commitea0380210f0d33b49967e8d44eea623db3c02002 (patch)
treefd0e6604417a0cf454bce4755c4fb07e7db0001b /js/mediators
parentbc338d0ea9b5b711d36ca748c74e9c9ad59d0f99 (diff)
parent1cbb921537cce5d54885293e8c64833a42370154 (diff)
downloadninja-ea0380210f0d33b49967e8d44eea623db3c02002.tar.gz
Merge branch 'copy-paste-bugfix' of https://github.com/ananyasen/ninja
Diffstat (limited to 'js/mediators')
-rwxr-xr-xjs/mediators/element-mediator.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/js/mediators/element-mediator.js b/js/mediators/element-mediator.js
index 9c9518a0..4a4c9f88 100755
--- a/js/mediators/element-mediator.js
+++ b/js/mediators/element-mediator.js
@@ -49,7 +49,7 @@ exports.ElementMediator = Montage.create(Component, {
49 }, 49 },
50 50
51 addElements:{ 51 addElements:{
52 value:function (elements, rules, notify) { 52 value:function (elements, rules, notify, callAddDelegate) {
53 if (Array.isArray(elements)) { 53 if (Array.isArray(elements)) {
54 elements.forEach(function (element) { 54 elements.forEach(function (element) {
55 ElementController.addElement(element, rules); 55 ElementController.addElement(element, rules);
@@ -61,7 +61,9 @@ exports.ElementMediator = Montage.create(Component, {
61 61
62 } 62 }
63 63
64 if (this.addDelegate && typeof (this.addDelegate['onAddElements']) === "function") { 64 if ((callAddDelegate || (typeof callAddDelegate === "undefined"))
65 && this.addDelegate && typeof (this.addDelegate['onAddElements']) === "function") {
66
65 this.addDelegate['onAddElements'].call(this.addDelegate, elements); 67 this.addDelegate['onAddElements'].call(this.addDelegate, elements);
66 } 68 }
67 69