Skip to content

Commit

Permalink
More precise CSS selector for tabs management
Browse files Browse the repository at this point in the history
  • Loading branch information
a-belhadj authored and Sispheor committed Oct 20, 2023
1 parent bedfcc6 commit 2e6852a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions project-static/squest/js/squest.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ $(document).ready(function () {
}
});

if (poolTable.context.length !== 0){
if (poolTable.context.length !== 0) {

// Apply the filter to remove refactors by default
var titles = $('#resource_group_table_csv thead th');
Expand Down Expand Up @@ -128,14 +128,14 @@ function reformatJSON(element) {

function add_tab_management() {

$('ul.nav.nav-pills a').click(function (e) {
$('ul#tabs.nav.nav-pills li.nav-item a.nav-link').click(function (e) {
$(this).tab('show');
window.location.hash = this.hash;
$(document).scrollTop(0);
});
var hash = window.location.hash;
if (hash) {
$('ul#tabs.squest-default-active li.nav-item a[href="' + hash + '"]').trigger('click');
$('ul#tabs.nav.nav-pills li.nav-item a.nav-link[href="' + hash + '"]').trigger('click');
} else {
$("ul#tabs.squest-default-active li.nav-item a:first").tab("show");
}
Expand Down

0 comments on commit 2e6852a

Please sign in to comment.