diff --git a/www/docs/admin/banner.php b/www/docs/admin/banner.php index dc49eda80f..234de8619c 100644 --- a/www/docs/admin/banner.php +++ b/www/docs/admin/banner.php @@ -21,22 +21,25 @@ print $out; ?> diff --git a/www/docs/js/main.js b/www/docs/js/main.js index 7d0959d61f..b3866de727 100644 --- a/www/docs/js/main.js +++ b/www/docs/js/main.js @@ -372,6 +372,42 @@ $(function(){ t.parent().next(".nav-menu").toggleClass('closed'); }); + $('.js-show-all-votes').on('click', function(){ + $(this).fadeOut(); + $('.policy-vote--minor').slideDown(); + $('#policy-votes-type').text('All'); + }); + + $('a[href="#past-list-dates"]').on('click', function(e){ + e.preventDefault(); + $(this).trigger('blur'); + $('#past-list-dates').slideToggle(); + }) + + // Move advanced search options to appear *before* results. + // (This means non-javascript users don't have to scroll past it + // to see their search results.) + $('.js-search-form-without-options').replaceWith( $('.js-search-form-with-options') ); + + // Show/hide advanced search options. + $('.js-toggle-search-options').on('click', function(e){ + e.preventDefault(); + var id = $(this).attr('href'); // #options + if($(id).is(':visible')){ + $('.js-toggle-search-options[href="' + id + '"]').removeClass('toggled'); + $(id).slideUp(250, function(){ + // Disable the inputs *after* they're hidden (less distracting). + $(id).find(':input').attr('disabled', 'disabled'); + }); + } else { + $('.js-toggle-search-options[href="' + id + '"]').addClass('toggled'); + $(id).find(':input:disabled').removeAttr('disabled'); + $(id).slideDown(250); + } + }); + if (!$('#options').data('advanced')) { + $("#options").find(":input").attr("disabled", "disabled"); + } }); // Backwards-compatible functions for the click/submit trackers on MP pages diff --git a/www/includes/easyparliament/templates/html/mp/divisions.php b/www/includes/easyparliament/templates/html/mp/divisions.php index c4400712ef..65f68e77f8 100644 --- a/www/includes/easyparliament/templates/html/mp/divisions.php +++ b/www/includes/easyparliament/templates/html/mp/divisions.php @@ -39,6 +39,12 @@ +
MSPs at 2011 election diff --git a/www/includes/easyparliament/templates/html/search/form_options.php b/www/includes/easyparliament/templates/html/search/form_options.php index f50bbb542c..3f1df32679 100644 --- a/www/includes/easyparliament/templates/html/search/form_options.php +++ b/www/includes/easyparliament/templates/html/search/form_options.php @@ -1,4 +1,4 @@ -