Index: trunk/extensions/JSBreadCrumbs/JSBreadCrumbs.php |
— | — | @@ -28,7 +28,7 @@ |
29 | 29 | 'path' => __FILE__, |
30 | 30 | 'name' => 'JSBreadCrumbs', |
31 | 31 | 'author' => 'Ryan Lane', |
32 | | - 'version' => '0.4', |
| 32 | + 'version' => '0.5', |
33 | 33 | 'url' => 'http://www.mediawiki.org/wiki/Extension:JSBreadCrumbs', |
34 | 34 | 'descriptionmsg' => 'jsbreadcrumbs-desc', |
35 | 35 | ); |
Index: trunk/extensions/JSBreadCrumbs/js/BreadCrumbs.js |
— | — | @@ -37,14 +37,7 @@ |
38 | 38 | // Get the full title |
39 | 39 | var title = wgTitle; |
40 | 40 | if ( wgNamespaceNumber != 0 ) { |
41 | | - // If this is the project namespace, or we aren't showing the site name |
42 | | - // then add the namespace to the title. This avoids showing the sitename |
43 | | - // twice when adding pages in the project namespace. |
44 | | - // TODO: This is an awkward way to do this, and bug prone when the user |
45 | | - // logs in with a project page in the history. Find a better way. |
46 | | - if ( wgNamespaceNumber != 4 || !wgJSBreadCrumbsShowSiteName ) { |
47 | | - title = wgFormattedNamespaces[wgNamespaceNumber] + ":" + wgTitle; |
48 | | - } |
| 41 | + title = wgFormattedNamespaces[wgNamespaceNumber] + ":" + wgTitle; |
49 | 42 | } |
50 | 43 | |
51 | 44 | // Remove duplicates |
— | — | @@ -79,14 +72,14 @@ |
80 | 73 | // Add the bread crumbs |
81 | 74 | for ( var i = 0; i < titleState.length; i++ ) { |
82 | 75 | if ( wgJSBreadCrumbsShowSiteName == true ) { |
83 | | - urltoappend = '<a href="' + urlState[i] + '">' + siteState[i] + ':' + titleState[i] + '</a> '; |
| 76 | + urltoappend = '<a href="' + urlState[i] + '">' + '(' + siteState[i] + ') ' + titleState[i] + '</a> '; |
84 | 77 | } else { |
85 | 78 | urltoappend = '<a href="' + urlState[i] + '">' + titleState[i] + '</a> '; |
86 | | - } |
| 79 | + } |
| 80 | + // Only add the separator if this isn't the last title |
87 | 81 | if ( i < titleState.length - 1 ) { |
88 | | - // Only add the separator if this isn't the last title |
89 | 82 | urltoappend = urltoappend + wgJSBreadCrumbsSeparator + ' '; |
90 | | - } |
| 83 | + } |
91 | 84 | mwextbc.append( urltoappend ); |
92 | 85 | } |
93 | 86 | |
Index: trunk/extensions/JSBreadCrumbs/JSBreadCrumbs.hooks.php |
— | — | @@ -10,7 +10,7 @@ |
11 | 11 | global $wgExtensionAssetsPath; |
12 | 12 | |
13 | 13 | if ( self::enableBreadCrumbs() ) { |
14 | | - $out->addScriptFile( "$wgExtensionAssetsPath/JSBreadCrumbs/js/BreadCrumbs.js", 6 ); |
| 14 | + $out->addScriptFile( "$wgExtensionAssetsPath/JSBreadCrumbs/js/BreadCrumbs.js", 7 ); |
15 | 15 | $out->addExtensionStyle( "$wgExtensionAssetsPath/JSBreadCrumbs/css/BreadCrumbs.css?1" ); |
16 | 16 | } |
17 | 17 | |