diff --git a/changelog.html b/changelog.html index e509c7a8b469600bc6819b9ef2a125d11e5eb30a..95b33f635a949395451d05c0bac572460c8a86f3 100644 --- a/changelog.html +++ b/changelog.html @@ -57,7 +57,7 @@ Upcoming changes
/configure
.
(issue 14538)
diff --git a/core/src/main/resources/lib/form/repeatable/repeatable.js b/core/src/main/resources/lib/form/repeatable/repeatable.js
index 10941e69b2cf9feb9348c1230d98d98af19af1d2..047e25078ea186856c11dcca4e4302bdeadf5470 100644
--- a/core/src/main/resources/lib/form/repeatable/repeatable.js
+++ b/core/src/main/resources/lib/form/repeatable/repeatable.js
@@ -18,9 +18,6 @@ var repeatableSupport = {
// do the initialization
init : function(container,master,insertionPoint) {
this.container = $(container);
- if (this.container.tag != null) {
- return;
- }
this.container.tag = this;
master = $(master);
this.blockHTML = master.innerHTML;
diff --git a/war/src/main/webapp/scripts/behavior.js b/war/src/main/webapp/scripts/behavior.js
index f8dcfdc2b68fa8526d25406cc574653d91ce0d08..130b452a19a9e9928434817d0b06d39ee082337c 100644
--- a/war/src/main/webapp/scripts/behavior.js
+++ b/war/src/main/webapp/scripts/behavior.js
@@ -65,12 +65,22 @@ var Behaviour = {
* this semantics is preserved.
*/
applySubtree : function(startNode,includeSelf) {
+ var behaviorsBySelector = {};
Behaviour.list._each(function(sheet) {
for (var selector in sheet){
function apply(n) {
- var list = findElementsBySelector(n,selector,includeSelf);
- if (list.length>0) // just to simplify setting of a breakpoint.
- list._each(sheet[selector]);
+ var behavior = sheet[selector];
+ var behaviors = behaviorsBySelector[selector];
+ if (behaviors == null) {
+ behaviors = [];
+ behaviorsBySelector[selector] = behaviors;
+ }
+ if (behaviors.indexOf(behavior.toString()) == -1) {
+ behaviors.push(behavior.toString());
+ var list = findElementsBySelector(n,selector,includeSelf);
+ if (list.length>0) // just to simplify setting of a breakpoint.
+ list._each(sheet[selector]);
+ }
}
if (startNode instanceof Array) {