From b221215871142d98f74ed41f7b81d71fdd32c840 Mon Sep 17 00:00:00 2001 From: cappadona Date: Mon, 18 Jul 2011 12:28:40 +0000 Subject: [PATCH] NIHVIVO-2944 Updated JS for accounts-per-page to ensure both select lists (top of the page and bottom of the page) allow the selection of number of accounts per page. --- webapp/web/js/account/accountUtils.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/webapp/web/js/account/accountUtils.js b/webapp/web/js/account/accountUtils.js index 3550e595d..8e118b18c 100644 --- a/webapp/web/js/account/accountUtils.js +++ b/webapp/web/js/account/accountUtils.js @@ -9,15 +9,20 @@ function changeAction(form, url) { $(document).ready(function(){ //Accounts per page - //Hide is javascrip is enable + //Hide if javascript is enabled $('input[name="accounts-per-page"]').addClass('hidden'); $('.accounts-per-page').change(function() { + // ensure both accounts-per-page select elements are + // set to the same value before submitting + var selectedValue = $(this).val(); + $('.accounts-per-page').val(selectedValue); + alert(selectedValue); $('#account-display').submit(); }); //Delete accounts - //Show is javascript is enable + //Show is javascript is enabled $('input:checkbox[name=delete-all]').removeClass('hidden'); $('input:checkbox[name=delete-all]').click(function(){