From 0b7ed90e1884c787a802d461d759b243f5fafc4a Mon Sep 17 00:00:00 2001 From: Denis Flaven Date: Tue, 22 Oct 2013 11:49:38 +0000 Subject: [PATCH] Fixed a regression introduced by revision [2856]: Avoid breaking pages with tabs when there is no BASE tag at all... SVN:trunk[2947] --- application/ajaxwebpage.class.inc.php | 2 +- application/itopwebpage.class.inc.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/application/ajaxwebpage.class.inc.php b/application/ajaxwebpage.class.inc.php index dadca4bda..a3b33cdaa 100644 --- a/application/ajaxwebpage.class.inc.php +++ b/application/ajaxwebpage.class.inc.php @@ -132,7 +132,7 @@ class ajax_page extends WebPage // unless their URL is equal to the URL of the page... if ($('base').length > 0) { - $('div[id^=tabbedContent] ul li a').each(function() { + $('div[id^=tabbedContent] > ul > li > a').each(function() { var sHash = location.hash; var sCleanLocation = location.href.toString().replace(sHash, '').replace(/#$/, ''); $(this).attr("href", sCleanLocation+$(this).attr("href")); diff --git a/application/itopwebpage.class.inc.php b/application/itopwebpage.class.inc.php index 8bbe359b5..90cf978ac 100644 --- a/application/itopwebpage.class.inc.php +++ b/application/itopwebpage.class.inc.php @@ -176,7 +176,7 @@ class iTopWebPage extends NiceWebPage // when their href was beginning by #. Starting with 1.9, a tag in the page // is taken into account and causes "local" tabs to be considered as Ajax // unless their URL is equal to the URL of the page... - $('div[id^=tabbedContent] ul li a').each(function() { + $('div[id^=tabbedContent] > ul > li > a').each(function() { var sHash = location.hash; var sCleanLocation = location.href.toString().replace(sHash, '').replace(/#$/, ''); $(this).attr("href", sCleanLocation+$(this).attr("href"));