Index: trunk/extensions/SemanticForms/libs/SemanticForms.js |
— | — | @@ -261,7 +261,8 @@ |
262 | 262 | // |
263 | 263 | // @param inifunction The initialisation functions. Must take a string (the input's id) and an object as parameters |
264 | 264 | // @param param The parameter object given to the initialisation function |
265 | | -jQuery.fn.registerInitialisation = function( inifunction, param ) { |
| 265 | +// @param noexecute If set, the initialisation method will not be executed here |
| 266 | +jQuery.fn.registerInitialisation = function( inifunction, param, noexecute ) { |
266 | 267 | |
267 | 268 | // return if element has no id |
268 | 269 | if ( ! this.attr("id") ) return this; |
— | — | @@ -283,7 +284,8 @@ |
284 | 285 | }); |
285 | 286 | |
286 | 287 | // execute initialisation if input is not part of multipleTemplateStarter |
287 | | - if ( this.closest(".multipleTemplateStarter").length == 0 ) { |
| 288 | + // and if not forbidden |
| 289 | + if ( this.closest(".multipleTemplateStarter").length == 0 && !noexecute) { |
288 | 290 | var input = this; |
289 | 291 | // ensure inifunction is only exectued after doc structure is complete |
290 | 292 | jQuery(function(){inifunction ( input.attr("id"), param )}); |
— | — | @@ -628,7 +630,8 @@ |
629 | 631 | // take initialisation method and register for new input |
630 | 632 | jQuery(this).registerInitialisation( |
631 | 633 | sfdata.initialisation[old_id][i].inifunction, |
632 | | - sfdata.initialisation[old_id][i].parameters |
| 634 | + sfdata.initialisation[old_id][i].parameters, |
| 635 | + true //do not yet execute |
633 | 636 | ); |
634 | 637 | } |
635 | 638 | |