Ticket #15569: fix-nextindex-update.patch
File fix-nextindex-update.patch, 823 bytes (added by , 14 years ago) |
---|
-
Django-1.3-rc-1/django/contrib/admin/media/js/inlines.js
old new 59 59 row.removeClass(options.emptyCssClass) 60 60 .addClass(options.formCssClass) 61 61 .attr("id", options.prefix + "-" + nextIndex); 62 nextIndex += 1;63 62 row.find("*") 64 63 .filter(function() { 65 64 var el = $(this); … … 104 103 row.insertBefore($(template)); 105 104 // Update number of total forms 106 105 $(totalForms).val(parseInt(totalForms.val()) + 1); 106 nextIndex += 1; 107 107 // Hide add button in case we've hit the max, except we want to add infinitely 108 108 if ((maxForms.val() != '') && (maxForms.val()-totalForms.val()) <= 0) { 109 109 addButton.parent().hide();