diff --git a/app/assets/javascripts/issuable_bulk_update_sidebar.js b/app/assets/javascripts/issuable_bulk_update_sidebar.js index 4f376599ba98a6ed4365e6140ee45ac316e4a306..d314f3c4d4343a0226b8ef10a2c492687534e5b0 100644 --- a/app/assets/javascripts/issuable_bulk_update_sidebar.js +++ b/app/assets/javascripts/issuable_bulk_update_sidebar.js @@ -86,10 +86,23 @@ export default class IssuableBulkUpdateSidebar { this.toggleCheckboxDisplay(enable); if (enable) { + this.initAffix(); SidebarHeightManager.init(); } } + initAffix() { + if (!this.$sidebar.hasClass('affix-top')) { + const offsetTop = $('.scrolling-tabs-container').outerHeight() + $('.sub-nav-scroll').outerHeight(); + + this.$sidebar.affix({ + offset: { + top: offsetTop, + }, + }); + } + } + updateSelectedIssuableIds() { this.$issuableIdsInput.val(IssuableBulkUpdateSidebar.getCheckedIssueIds()); } diff --git a/app/assets/stylesheets/framework/nav.scss b/app/assets/stylesheets/framework/nav.scss index e71bf04aec76c35e20fbf6f126211002fd484407..99eea97377cc16bdbca8e47777d4cf0abccaa237 100644 --- a/app/assets/stylesheets/framework/nav.scss +++ b/app/assets/stylesheets/framework/nav.scss @@ -190,14 +190,6 @@ display: none; } - .btn, - .dropdown, - .dropdown-toggle, - input, - form { - height: 35px; - } - input { display: inline-block; position: relative; diff --git a/app/assets/stylesheets/framework/sidebar.scss b/app/assets/stylesheets/framework/sidebar.scss index 542b641e3dd9de207eaf9f33fa351d53c3c26533..49b2f0e43a4c9fd67dd2406a548440b895236831 100644 --- a/app/assets/stylesheets/framework/sidebar.scss +++ b/app/assets/stylesheets/framework/sidebar.scss @@ -92,7 +92,6 @@ @mixin maintain-sidebar-dimensions { display: block; width: $gutter-width; - padding: 10px 0; } .issues-bulk-update.right-sidebar { @@ -104,6 +103,15 @@ &.right-sidebar-expanded { @include maintain-sidebar-dimensions; width: $gutter-width; + + .issuable-sidebar-header { + // matches `.top-area .nav-controls` for issuable index pages + padding: 11px 0; + } + + .block:last-of-type { + border: none; + } } &.right-sidebar-collapsed { diff --git a/app/assets/stylesheets/new_sidebar.scss b/app/assets/stylesheets/new_sidebar.scss index 6255ed96910b2270e4bdb6cec4077ce6be0b2b64..ae43197a1a6296121c123def40dd0599b6c3fecf 100644 --- a/app/assets/stylesheets/new_sidebar.scss +++ b/app/assets/stylesheets/new_sidebar.scss @@ -23,6 +23,10 @@ $new-sidebar-width: 220px; position: fixed; height: 100%; } + + .issues-bulk-update.right-sidebar.right-sidebar-expanded .issuable-sidebar-header { + padding: 10px 0 15px; + } } .context-header { diff --git a/app/views/shared/issuable/_bulk_update_sidebar.html.haml b/app/views/shared/issuable/_bulk_update_sidebar.html.haml index 964fe5220f73c7cc5723c427282565cbdfdde583..0d507cc7a6e5d288179c49605345945848a22b30 100644 --- a/app/views/shared/issuable/_bulk_update_sidebar.html.haml +++ b/app/views/shared/issuable/_bulk_update_sidebar.html.haml @@ -1,9 +1,9 @@ - type = local_assigns.fetch(:type) -%aside.issues-bulk-update.js-right-sidebar.right-sidebar.affix-top{ data: { "offset-top" => "50", "spy" => "affix" }, "aria-live" => "polite" } +%aside.issues-bulk-update.js-right-sidebar.right-sidebar{ "aria-live" => "polite", data: { 'signed-in': current_user.present? } } .issuable-sidebar.hidden = form_tag [:bulk_update, @project.namespace.becomes(Namespace), @project, type], method: :post, class: "bulk-update" do - .block + .block.issuable-sidebar-header .filter-item.inline.update-issues-btn.pull-left = button_tag "Update all", class: "btn update-selected-issues btn-info", disabled: true = button_tag "Cancel", class: "btn btn-default js-bulk-update-menu-hide pull-right"