diff options
author | Ananya Sen | 2012-07-16 15:34:07 -0700 |
---|---|---|
committer | Ananya Sen | 2012-07-16 15:34:07 -0700 |
commit | 5a34cac9594d710f6e5675bee34dc16be1b4d8a0 (patch) | |
tree | 1078009cd6443ac9cabfeb2cbdc5110b5e195b38 /js/mediators | |
parent | 5146f224258929415adf4a8022e492454b4e2476 (diff) | |
download | ninja-5a34cac9594d710f6e5675bee34dc16be1b4d8a0.tar.gz |
Fixed copy paste from external applications
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
Diffstat (limited to 'js/mediators')
-rwxr-xr-x | js/mediators/element-mediator.js | 6 |
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 | ||