Skip to content
Browse files

Merge branch 'master' into dev

  • Loading branch information...
2 parents 1730e80 + 8640d24 commit d13402a21390f108076533874076d3f920ac5627 nemesisdesign committed Jul 31, 2012
Showing with 4 additions and 14 deletions.
  1. +2 −2 media/js/compressed/jquery.formset.min.js
  2. +1 −2 media/js/jquery.formset.js
  3. +1 −10 nodeshot/templates/index.html
View
4 media/js/compressed/jquery.formset.min.js
@@ -3,5 +3,5 @@ a.deleteCssClass+'" href="javascript:void(0)">'+a.deleteText+"</a>"):e.is("UL")|
d("."+a.formCssClass).parent();f.remove();e=e.find(".dynamic-form").not(".formset-custom-template");d("#id_"+a.prefix+"-TOTAL_FORMS").val(e.length);for(var b=0,c=e.length;b<c;b++)h(e.eq(b),b),e.eq(b).find("input,select,textarea,label").each(function(){i(d(this),a.prefix,b)})}a.removed&&a.removed(f);return!1})};c.each(function(e){var b=d(this),c=b.find('input:checkbox[id $= "-DELETE"]');c.length&&(c.before('<input type="hidden" name="'+c.attr("name")+'" id="'+c.attr("id")+'" />'),c.remove());0<b.find("input,select,textarea,label").length&&
(g(b),b.addClass(a.formCssClass),h(b,e))});if(c.length){var b;a.formTemplate?(b=a.formTemplate instanceof d?a.formTemplate:d(a.formTemplate),b.removeAttr("id").addClass(a.formCssClass).addClass("formset-custom-template"),b.find("input,select,textarea,label").each(function(){i(d(this),a.prefix,2012)}),g(b)):(b=d("."+a.formCssClass+":last").clone(!0).removeAttr("id"),b.find('input:hidden[id $= "-DELETE"]').remove(),b.find("input,select,textarea,label").each(function(){var a=d(this);a.is("input:checkbox")||
a.is("input:radio")?a.attr("checked",!1):a.val("")}));a.formTemplate=b;"TR"==c.attr("tagName")?(b=c.eq(0).children().length,c.parent().append('<tr><td colspan="'+b+'"><a class="'+a.addCssClass+'" href="javascript:void(0)">'+a.addText+"</a></tr>"),b=c.parent().find("tr:last a"),b.parents("tr").addClass(a.formCssClass+"-add")):(c.filter(":last").after('<a class="'+a.addCssClass+'" href="javascript:void(0)">'+a.addText+"</a>"),b=c.filter(":last").next());b.click(function(){var b=parseInt(d("#id_"+a.prefix+
-"-TOTAL_FORMS").val()),c=a.formTemplate.clone(!0).removeClass("formset-custom-template"),g=d(this).parents("tr."+a.formCssClass+"-add").get(0)||this;h(c,b);console.log(c,a.prefix,b);c.insertBefore(d(g)).show();c.find("input,select,textarea,label").each(function(){i(d(this),a.prefix,b)});d("#id_"+a.prefix+"-TOTAL_FORMS").val(b+1);a.added&&a.added(c);return!1})}return c};d.fn.formset.defaults={prefix:"form",formTemplate:null,addText:"add another",deleteText:"remove",addCssClass:"add-row",deleteCssClass:"delete-row",
-formCssClass:"dynamic-form",extraClasses:[],added:null,removed:null,formContainerClass:!1}})(jQuery);
+"-TOTAL_FORMS").val()),c=a.formTemplate.clone(!0).removeClass("formset-custom-template"),g=d(this).parents("tr."+a.formCssClass+"-add").get(0)||this;h(c,b);c.insertBefore(d(g)).show();c.find("input,select,textarea,label").each(function(){i(d(this),a.prefix,b)});d("#id_"+a.prefix+"-TOTAL_FORMS").val(b+1);a.added&&a.added(c);return!1})}return c};d.fn.formset.defaults={prefix:"form",formTemplate:null,addText:"add another",deleteText:"remove",addCssClass:"add-row",deleteCssClass:"delete-row",
+formCssClass:"dynamic-form",extraClasses:[],added:null,removed:null,formContainerClass:!1}})(jQuery);
View
3 media/js/jquery.formset.js
@@ -150,8 +150,7 @@
var formCount = parseInt($('#id_' + options.prefix + '-TOTAL_FORMS').val()),
row = options.formTemplate.clone(true).removeClass('formset-custom-template'),
buttonRow = $(this).parents('tr.' + options.formCssClass + '-add').get(0) || this;
- applyExtraClasses(row, formCount);
- console.log(row, options.prefix, formCount);
+ applyExtraClasses(row, formCount);
row.insertBefore($(buttonRow)).show();
row.find('input,select,textarea,label').each(function() {
updateElementIndex($(this), options.prefix, formCount);
View
11 nodeshot/templates/index.html
@@ -1,11 +1,2 @@
{% extends "base.html" %}
-{% block extrajs %}
-var _gaq = _gaq || [];
-_gaq.push(['_setAccount', 'UA-26436344-1']);
-_gaq.push(['_trackPageview']);
-(function() {
- var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
- ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
-})();
-{% endblock %}
+{% block extrajs %}{% endblock %}

0 comments on commit d13402a

Please sign in to comment.
Something went wrong with that request. Please try again.