From 854ff00c80f4a0f4f70678312c28b23c4fb9b223 Mon Sep 17 00:00:00 2001 From: Tom Nurkkala Date: Tue, 22 Sep 2015 15:49:22 -0400 Subject: [PATCH] bugfixes --- static/all-pages.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/all-pages.js b/static/all-pages.js index 77c5e73c5..db47334c2 100644 --- a/static/all-pages.js +++ b/static/all-pages.js @@ -79,7 +79,7 @@ function setUpPermissionsCheckboxes() { $label.find('.yesno').text('No'); } }); - $('input[type="checkbox"]').click(function() { + $('input[type="checkbox"]').unbind('click').click(function() { var $label = $(this).parents('label'); if ($(this).parents('label').hasClass('btn-danger')) { $label.removeClass('btn-danger').addClass('btn-success'); @@ -236,7 +236,7 @@ var DREAMSUITE = { if (set.id === parseInt($(this).val())) { for (var key in set) { var toBe = set[key]; - var $checkbox = $('#id_form-' + rowIdx + '-' + key); + var $checkbox = $('#id_form-' + (rowIdx-1) + '-' + key); var current = !!$checkbox.prop('checked'); if (toBe !== current) { $checkbox.trigger('click');