| Index: trunk/extensions/CentralAuth/centralauth.js |
| — | — | @@ -1,34 +0,0 @@ |
| 2 | | -wgCursorPosition = { x : 0, y : 0 }; |
| 3 | | -function updateCursorPosition( e ) { |
| 4 | | - e = e || window.event; |
| 5 | | - wgCursorPosition.x = e.clientX + ( document.documentElement.scrollLeft || document.body.scrollLeft ) |
| 6 | | - - document.documentElement.clientLeft; |
| 7 | | - wgCursorPosition.y = e.clientY + ( document.documentElement.scrollTop || document.body.scrollTop ) |
| 8 | | - - document.documentElement.clientTop; |
| 9 | | -} |
| 10 | | -document.onmousemove = updateCursorPosition; |
| 11 | | - |
| 12 | | -methodHint = null; |
| 13 | | -function showMethodHint( methodName ) { |
| 14 | | - hideMethodHint(); |
| 15 | | - |
| 16 | | - method = wgMergeMethodDescriptions[methodName]; |
| 17 | | - helpHtml = "<p class='merge-method-help-name'>" + method.short + "</p>" + method.desc; |
| 18 | | - |
| 19 | | - methodHint = document.createElement( 'div' ); |
| 20 | | - methodHint.innerHTML = helpHtml; |
| 21 | | - methodHint.setAttribute( 'class', 'merge-method-help-div' ); |
| 22 | | - methodHint.style.left = wgCursorPosition.x + 'px'; |
| 23 | | - methodHint.style.top = wgCursorPosition.y + 'px'; |
| 24 | | - methodHint.setAttribute( 'onclick', 'hideMethodHint()' ); |
| 25 | | - |
| 26 | | - var content = document.getElementById('content') || document.getElementById('mw_content') || document.body; |
| 27 | | - content.appendChild( methodHint ); |
| 28 | | -} |
| 29 | | - |
| 30 | | -function hideMethodHint() { |
| 31 | | - if( methodHint ) { |
| 32 | | - methodHint.parentNode.removeChild( methodHint ); |
| 33 | | - methodHint = null; |
| 34 | | - } |
| 35 | | -} |
| Index: trunk/extensions/CentralAuth/centralauth.css |
| — | — | @@ -1,21 +0,0 @@ |
| 2 | | -.merge-method-help { |
| 3 | | - color: #aaa; |
| 4 | | - cursor: pointer; |
| 5 | | - font-size: 7pt; |
| 6 | | - padding: 3px; |
| 7 | | -} |
| 8 | | - |
| 9 | | -.merge-method-help-div { |
| 10 | | - position: absolute; |
| 11 | | - z-index: 3; |
| 12 | | - cursor: pointer; |
| 13 | | - |
| 14 | | - width: 15em; |
| 15 | | - border: 1px solid black; |
| 16 | | - background-color: #ff9; |
| 17 | | - padding: 0.5em; |
| 18 | | -} |
| 19 | | - |
| 20 | | -.merge-method-help-name { |
| 21 | | - font-weight: bold; |
| 22 | | -} |
| Index: trunk/extensions/CentralAuth/CentralAuth.php |
| — | — | @@ -126,11 +126,6 @@ |
| 127 | 127 | $wgCentralAuthNew2UDPPrefix = ''; |
| 128 | 128 | |
| 129 | 129 | /** |
| 130 | | - * A CSS file version. Change each time centralauth.css is changed. |
| 131 | | - */ |
| 132 | | -$wgCentralAuthStyleVersion = 2; |
| 133 | | - |
| 134 | | -/** |
| 135 | 130 | * List of local pages global users may edit while being globally locked. |
| 136 | 131 | */ |
| 137 | 132 | $wgCentralAuthLockedCanEdit = array(); |
| — | — | @@ -250,6 +245,17 @@ |
| 251 | 246 | $wgLogActionsHandlers["gblrights/{$type}"] = 'efHandleWikiSetLogEntry'; |
| 252 | 247 | } |
| 253 | 248 | |
| | 249 | +$commonModuleInfo = array( |
| | 250 | + 'localBasePath' => dirname( __FILE__ ) . '/modules', |
| | 251 | + 'remoteExtPath' => 'CentralAuth/modules', |
| | 252 | +); |
| | 253 | + |
| | 254 | +// Styles and any code common to all Special:Code subviews: |
| | 255 | +$wgResourceModules['ext.centralauth'] = array( |
| | 256 | + 'scripts' => 'ext.centralauth.js', |
| | 257 | + 'styles' => 'ext.centralauth.css', |
| | 258 | +) + $commonModuleInfo; |
| | 259 | + |
| 254 | 260 | /** |
| 255 | 261 | * @param $type |
| 256 | 262 | * @param $action |
| — | — | @@ -260,7 +266,7 @@ |
| 261 | 267 | * @return String |
| 262 | 268 | */ |
| 263 | 269 | function efHandleWikiSetLogEntry( $type, $action, $title, $skin, $params, $filterWikilinks = false ) { |
| 264 | | - $link = $skin ? $skin->makeLinkObj( $title, htmlspecialchars( $params[0] ) ) : $params[0]; |
| | 270 | + $link = Linker::makeLinkObj( $title, htmlspecialchars( $params[0] ) ); |
| 265 | 271 | |
| 266 | 272 | switch( $action ) { |
| 267 | 273 | case 'newset': |
| Index: trunk/extensions/CentralAuth/specials/SpecialCentralAuth.php |
| — | — | @@ -17,7 +17,6 @@ |
| 18 | 18 | |
| 19 | 19 | function execute( $subpage ) { |
| 20 | 20 | global $wgOut; |
| 21 | | - global $wgExtensionAssetsPath, $wgCentralAuthStyleVersion; |
| 22 | 21 | global $wgUser, $wgRequest, $wgContLang; |
| 23 | 22 | $this->setHeaders(); |
| 24 | 23 | |
| — | — | @@ -26,10 +25,7 @@ |
| 27 | 26 | $this->mCanOversight = $wgUser->isAllowed( 'centralauth-oversight' ); |
| 28 | 27 | $this->mCanEdit = $this->mCanUnmerge || $this->mCanLock || $this->mCanOversight; |
| 29 | 28 | |
| 30 | | - $wgOut->addExtensionStyle( "{$wgExtensionAssetsPath}/CentralAuth/centralauth.css?" . |
| 31 | | - $wgCentralAuthStyleVersion ); |
| 32 | | - $wgOut->addScriptFile( "{$wgExtensionAssetsPath}/CentralAuth/centralauth.js?" . |
| 33 | | - $wgCentralAuthStyleVersion ); |
| | 29 | + $wgOut->addModules( 'ext.centralauth' ); |
| 34 | 30 | $this->addMergeMethodDescriptions(); |
| 35 | 31 | |
| 36 | 32 | $this->mUserName = |
| Index: trunk/extensions/CentralAuth/modules/ext.centralauth.css |
| — | — | @@ -0,0 +1,21 @@ |
| | 2 | +.merge-method-help { |
| | 3 | + color: #aaa; |
| | 4 | + cursor: pointer; |
| | 5 | + font-size: 7pt; |
| | 6 | + padding: 3px; |
| | 7 | +} |
| | 8 | + |
| | 9 | +.merge-method-help-div { |
| | 10 | + position: absolute; |
| | 11 | + z-index: 3; |
| | 12 | + cursor: pointer; |
| | 13 | + |
| | 14 | + width: 15em; |
| | 15 | + border: 1px solid black; |
| | 16 | + background-color: #ff9; |
| | 17 | + padding: 0.5em; |
| | 18 | +} |
| | 19 | + |
| | 20 | +.merge-method-help-name { |
| | 21 | + font-weight: bold; |
| | 22 | +} |
| Property changes on: trunk/extensions/CentralAuth/modules/ext.centralauth.css |
| ___________________________________________________________________ |
| Added: svn:eol-style |
| 1 | 23 | + native |
| Index: trunk/extensions/CentralAuth/modules/ext.centralauth.js |
| — | — | @@ -0,0 +1,34 @@ |
| | 2 | +wgCursorPosition = { x : 0, y : 0 }; |
| | 3 | +function updateCursorPosition( e ) { |
| | 4 | + e = e || window.event; |
| | 5 | + wgCursorPosition.x = e.clientX + ( document.documentElement.scrollLeft || document.body.scrollLeft ) |
| | 6 | + - document.documentElement.clientLeft; |
| | 7 | + wgCursorPosition.y = e.clientY + ( document.documentElement.scrollTop || document.body.scrollTop ) |
| | 8 | + - document.documentElement.clientTop; |
| | 9 | +} |
| | 10 | +document.onmousemove = updateCursorPosition; |
| | 11 | + |
| | 12 | +methodHint = null; |
| | 13 | +function showMethodHint( methodName ) { |
| | 14 | + hideMethodHint(); |
| | 15 | + |
| | 16 | + method = wgMergeMethodDescriptions[methodName]; |
| | 17 | + helpHtml = "<p class='merge-method-help-name'>" + method.short + "</p>" + method.desc; |
| | 18 | + |
| | 19 | + methodHint = document.createElement( 'div' ); |
| | 20 | + methodHint.innerHTML = helpHtml; |
| | 21 | + methodHint.setAttribute( 'class', 'merge-method-help-div' ); |
| | 22 | + methodHint.style.left = wgCursorPosition.x + 'px'; |
| | 23 | + methodHint.style.top = wgCursorPosition.y + 'px'; |
| | 24 | + methodHint.setAttribute( 'onclick', 'hideMethodHint()' ); |
| | 25 | + |
| | 26 | + var content = document.getElementById('content') || document.getElementById('mw_content') || document.body; |
| | 27 | + content.appendChild( methodHint ); |
| | 28 | +} |
| | 29 | + |
| | 30 | +function hideMethodHint() { |
| | 31 | + if( methodHint ) { |
| | 32 | + methodHint.parentNode.removeChild( methodHint ); |
| | 33 | + methodHint = null; |
| | 34 | + } |
| | 35 | +} |
| Property changes on: trunk/extensions/CentralAuth/modules/ext.centralauth.js |
| ___________________________________________________________________ |
| Added: svn:eol-style |
| 1 | 36 | + native |