* Nakon
* Nathan Larson
* nephele
+* Nik
* Nikolaos S. Karastathis
* Olaf Lenz
* Paul Copperman
* $wgUploadNavigationUrl should be used for file redlinks if
$wgUploadMissingFileUrl is not set. The first was used for this
until the second was introduced in 1.17.
-* (bug 25355) Parser generates edit section links for special pages
+* (bug 25355) Parser generates edit section links for special pages.
+* (bug 27894) Move 'editondblclick' event listener down from body to
+ div#bodyContent.
=== API changes in 1.19 ===
* (bug 19838) siprop=interwikimap can now use the interwiki cache.
$bodyAttrs = array();
- # Crazy edit-on-double-click stuff
- if ( $this->isArticle() && $this->getUser()->getOption( 'editondblclick' ) ) {
- $editUrl = $this->getTitle()->getLocalUrl( $sk->editUrlOptions() );
- $bodyAttrs['ondblclick'] = "document.location = '" .
- Xml::escapeJsString( $editUrl ) . "'";
- }
-
# Classes for LTR/RTL directionality support
$bodyAttrs['class'] = "mediawiki $userdir sitedir-$sitedir";
$this->addModules( 'mediawiki.action.view.rightClickEdit' );
}
+ # Crazy edit-on-double-click stuff
+ if ( $this->isArticle() && $this->getUser()->getOption( 'editondblclick' ) ) {
+ $this->addModules( 'mediawiki.action.view.dblClickEdit' );
+ }
+
if ( $wgUseAJAXCategories ) {
global $wgAJAXCategoriesNamespaces;
'styles' => 'resources/mediawiki.action/mediawiki.action.history.diff.css',
'group' => 'mediawiki.action.history',
),
+ 'mediawiki.action.view.dblClickEdit' => array(
+ 'scripts' => 'resources/mediawiki.action/mediawiki.action.view.dblClickEdit.js',
+ 'dependencies' => 'mediawiki.util',
+ ),
'mediawiki.action.view.metadata' => array(
'scripts' => 'resources/mediawiki.action/mediawiki.action.view.metadata.js',
'messages' => array(
--- /dev/null
+/**
+ * This module enables double-click-to-edit functionality
+ */
+jQuery( document ).ready( function( $ ) {
+ var url = $( '#ca-edit a' ).attr( 'href' );
+ if ( url ) {
+ mw.util.$content.dblclick( function( e ) {
+ e.preventDefault();
+ window.location = url;
+ } );
+ }
+} );