Skip to content

Commit c4fb60a

Browse files
committed
Fix jQuery UI tab errors
1 parent 3a212c1 commit c4fb60a

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

python/nav/web/static/js/src/plugins/tab_navigation.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ define(['jquery-ui'], function () {
2424
$selector.bind('tabsactivate', function (event, ui) {
2525
//* Check if this is the tabs we're hooked to *//
2626
if (event.target.id === $selector.attr('id')) {
27-
var hashValue = ui.newPanel.selector;
27+
var hashValue = '#' + ui.newPanel.attr('id');
2828
if (ui.newTab.index() != 0 || window.location.hash) {
2929
var hashes = window.location.hash.split('!');
3030
if (parent) {

python/nav/web/templates/info/base.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
{% block footer_scripts %}
1414
<script>
15-
require(['libs/jquery-ui.min'], function () {
15+
require(['jquery-ui'], function () {
1616
$('#searchtabs').tabs().show();
1717
});
1818
</script>

python/nav/web/templates/ipdevinfo/module-details.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,11 +142,11 @@
142142

143143
{% block footer_scripts %}
144144
<script>
145-
require(["libs/jquery-ui.min"], function () {
145+
require(["jquery-ui"], function () {
146146
var tabs = $('#module-details-tabs').tabs({
147147
activate: function (event, ui) {
148148
// Resize graphs when tab is shown
149-
if (ui.newPanel.selector === "#port-details-activity-graphs") {
149+
if (ui.newPanel.attr('id') === "port-details-activity-graphs") {
150150
$(window).trigger('resize');
151151
}
152152
}

python/nav/web/templates/ipdevinfo/port-details.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33

44
{% block footer_scripts %}
55
<script>
6-
require(["libs/jquery-ui.min"], function () {
6+
require(["jquery-ui"], function () {
77
var tabs = $('#port-details-tabs').tabs({
88
activate: function (event, ui) {
99
// Resize graphs when tab is shown
10-
if (ui.newPanel.selector === "#port-details-activity-graphs") {
10+
if (ui.newPanel.attr('id') === "port-details-activity-graphs") {
1111
$(window).trigger('resize');
1212
}
1313
}

python/nav/web/templates/navlets/room_location_status_view.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ <h3 data-itemid="{{ item.pk }}">
3737

3838
<link rel="stylesheet" href="{{ STATIC_URL }}css/nav/jquery-ui.css">
3939
<script>
40-
require(['libs/jquery-ui.min'], function () {
40+
require(['jquery-ui'], function () {
4141
var $navlet = $('[data-id={{ navlet.navlet_id }}]');
4242

4343
$navlet.find('.accordion').accordion({

python/nav/web/templates/styleguide.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
{% block footer_scripts %}
1212
<script>
13-
require(['plugins/gauge', 'libs/jquery-ui.min'], function (JohnGauge) {
13+
require(['plugins/gauge', 'jquery-ui'], function (JohnGauge) {
1414
$(function () {
1515

1616
/* Code for activating jquery ui tabs. We usually hide the tabs until

0 commit comments

Comments
 (0)