From 68335d9124d816a12ab0e623941d4646944233df Mon Sep 17 00:00:00 2001 From: Jason Michalski Date: Tue, 7 Jan 2014 12:18:27 -0500 Subject: [PATCH] Remove hidden inputs from the tab order on the stream page Inputs are given a tabindex of -1 in the handlebars templates, this is added and removed in the show and hide events of the bootstrap collapse. (imported from commit 2c54c39edc396d3d18330df4583d901690dd71fa) --- static/js/subs.js | 9 +++++++++ static/templates/change_stream_privacy.handlebars | 4 ++-- static/templates/subscription.handlebars | 14 +++++++------- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/static/js/subs.js b/static/js/subs.js index ddc3776478..a007af67ef 100644 --- a/static/js/subs.js +++ b/static/js/subs.js @@ -732,6 +732,15 @@ $(function () { }); } + // Make all inputs have a default tabindex + subrow.find('.subscription_settings :input').removeAttr('tabindex'); + }); + + $("#subscriptions_table").on("hide", ".subscription_settings", function (e) { + var subrow = $(e.target).closest('.subscription_row'); + + // Remove all inputs from the tabindex + subrow.find('.subscription_settings :input').attr('tabindex', '-1'); }); $("#subscriptions_table").on("click", ".sub_setting_checkbox", function (e) { diff --git a/static/templates/change_stream_privacy.handlebars b/static/templates/change_stream_privacy.handlebars index 40e7a68e64..ade51da196 100644 --- a/static/templates/change_stream_privacy.handlebars +++ b/static/templates/change_stream_privacy.handlebars @@ -1,10 +1,10 @@ {{#if can_make_public}} - {{/if}} {{#if can_make_private}} - {{/if}} diff --git a/static/templates/subscription.handlebars b/static/templates/subscription.handlebars index a6c2704957..3d6c1f544b 100644 --- a/static/templates/subscription.handlebars +++ b/static/templates/subscription.handlebars @@ -29,19 +29,19 @@