„MediaWiki:Gadget-old-movepage.js“ – Versionsunterschied
Erscheinungsbild
Inhalt gelöscht Inhalt hinzugefügt
K danke Hoo man für den Fix, using um byteLimit call sollte aber genug sein, mein Browser ist wohl langsam genug, das es mir nicht aufgefallen war, den geladen wird es bereits auf der Seite |
K Fix für Webkit (Grund konnte beim Verschieben nicht angegeben werden), keine Funktionale Änderung (.removeProp durch .removeAttr ersetzt) |
||
Zeile 20: | Zeile 20: | ||
// #wpReason on Movepage used it and breaks Opeara, see [[bugzilla:36310]] |
// #wpReason on Movepage used it and breaks Opeara, see [[bugzilla:36310]] |
||
var wpReason = $( '#wpReason' ); |
var wpReason = $( '#wpReason' ); |
||
wpReason. |
wpReason.removeAttr( 'maxLength' ); |
||
mw.loader.using( [ 'jquery.byteLimit' ], function() { |
mw.loader.using( [ 'jquery.byteLimit' ], function() { |
||
//restore byteLimit |
//restore byteLimit |
Version vom 23. Mai 2012, 00:46 Uhr
/* This scripts replaced the new scrolldown/input field ([[rev:110209]]) on the movepage with the old one */
if( mw.config.get( 'wgCanonicalSpecialPageName' ) === 'Movepage' ) {
$( function() {
var wpNewTitleMain = $( '#wpNewTitleMain' );
var wpNewTitleNs = $( '#wpNewTitleNs' );
if( !wpNewTitleMain.length || !wpNewTitleNs.length ) {
return;
}
//build the title from the scrolldown
var namespaceText = mw.config.get( 'wgFormattedNamespaces' )[ wpNewTitleNs.val() ];
var titleText = wpNewTitleMain.val();
var preloadTitle = namespaceText !== '' ? namespaceText + ':' + titleText : titleText;
var input = $( '<input name="wpNewTitle" size="60" type="text" id="wpNewTitle" />' );
input.val( preloadTitle ); //preload input with a title
wpNewTitleMain.replaceWith( input ); //replace the new input with the old
wpNewTitleNs.remove(); //the scroll down box
$( '#new-movepage-hint' ).remove(); //remove hint to new function in [[MediaWiki:Movepagetext-noredirectfixer]]
$( 'label[for="wpNewTitleMain"]' ).attr( 'for', 'wpNewTitle' ); //correct label for to new input
// maxlength is invalid for textarea (not HTML5)
// #wpReason on Movepage used it and breaks Opeara, see [[bugzilla:36310]]
var wpReason = $( '#wpReason' );
wpReason.removeAttr( 'maxLength' );
mw.loader.using( [ 'jquery.byteLimit' ], function() {
//restore byteLimit
wpReason.byteLimit( 200 );
});
});
}