aboutsummaryrefslogtreecommitdiff
path: root/js/mediators
diff options
context:
space:
mode:
authorJose Antonio Marquez2012-07-18 16:39:00 -0700
committerJose Antonio Marquez2012-07-18 16:39:00 -0700
commitaaf19014186e881078148394c107278b8b3b28f6 (patch)
tree18700f39c8da54b92854c60e5e05ddb86443a6c9 /js/mediators
parentc491c29807d06395f2324adfe4b2f15a32398241 (diff)
parentf79f7c540d8533eed8fc562b809e15dcfea94438 (diff)
downloadninja-aaf19014186e881078148394c107278b8b3b28f6.tar.gz
Merge branch 'refs/heads/Ninja-Master' into Document
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