Преглед изворни кода

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@2856 a333f486-631f-4898-b8df-5754b55c2be0
dflaven пре 11 година
родитељ
комит
f3de800f86
1 измењених фајлова са 8 додато и 6 уклоњено
  1. 8 6
      application/ajaxwebpage.class.inc.php

+ 8 - 6
application/ajaxwebpage.class.inc.php

@@ -130,12 +130,14 @@ class ajax_page extends WebPage
 			// 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
 			// unless their URL is equal to the URL of the page...
-			$('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"));
-			});
-			
+			if ($('base').length > 0)
+			{
+				$('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"));
+				});
+			}
 			if ($.bbq)
 			{
 				// This selector will be reused when selecting actual tab widget A elements.