Ticket #17872: inlines.js.diff
File inlines.js.diff, 1008 bytes (added by , 13 years ago) |
---|
-
(a) D:/Temp/inlin-revBASE.svn005.tmp.js vs. (b) E:/Program
a b 18 18 $.fn.formset = function(opts) { 19 19 var options = $.extend({}, $.fn.formset.defaults, opts); 20 20 var updateElementIndex = function(el, prefix, ndx) { 21 var id_regex = new RegExp("(" + prefix + "-(\\d+|__prefix__))" );21 var id_regex = new RegExp("(" + prefix + "-(\\d+|__prefix__))", "g"); 22 22 var replacement = prefix + "-" + ndx; 23 23 if ($(el).attr("for")) { 24 24 $(el).attr("for", $(el).attr("for").replace(id_regex, replacement)); … … 29 29 if (el.name) { 30 30 el.name = el.name.replace(id_regex, replacement); 31 31 } 32 if (el.tagName == "SCRIPT") 33 { 34 el.innerHTML = el.innerHTML.replace(id_regex, replacement); 35 } 32 36 }; 33 37 var totalForms = $("#id_" + options.prefix + "-TOTAL_FORMS").attr("autocomplete", "off"); 34 38 var nextIndex = parseInt(totalForms.val());