Просмотр исходного кода

Fixed a regression introduced by revision [2856]: Avoid breaking pages with tabs when there is no BASE tag at all...

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@2947 a333f486-631f-4898-b8df-5754b55c2be0
dflaven 11 лет назад
Родитель
Сommit
2c728fc44d
2 измененных файлов с 2 добавлено и 2 удалено
  1. 1 1
      application/ajaxwebpage.class.inc.php
  2. 1 1
      application/itopwebpage.class.inc.php

+ 1 - 1
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...
 			// unless their URL is equal to the URL of the page...
 			if ($('base').length > 0)
 			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 sHash = location.hash;
 					var sCleanLocation = location.href.toString().replace(sHash, '').replace(/#$/, '');
 					var sCleanLocation = location.href.toString().replace(sHash, '').replace(/#$/, '');
 		    		$(this).attr("href", sCleanLocation+$(this).attr("href"));
 		    		$(this).attr("href", sCleanLocation+$(this).attr("href"));

+ 1 - 1
application/itopwebpage.class.inc.php

@@ -176,7 +176,7 @@ class iTopWebPage extends NiceWebPage
 		// when their href was beginning by #. Starting with 1.9, a <base> tag in the page
 		// when their href was beginning by #. Starting with 1.9, a <base> tag in the page
 		// is taken into account and causes "local" tabs to be considered as Ajax
 		// is taken into account and causes "local" tabs to be considered as Ajax
 		// unless their URL is equal to the URL of the page...
 		// 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 sHash = location.hash;
 			var sCleanLocation = location.href.toString().replace(sHash, '').replace(/#$/, '');
 			var sCleanLocation = location.href.toString().replace(sHash, '').replace(/#$/, '');
 	    	$(this).attr("href", sCleanLocation+$(this).attr("href"));
 	    	$(this).attr("href", sCleanLocation+$(this).attr("href"));