Index: trunk/phase3/skins/common/protect.js |
— | — | @@ -45,6 +45,8 @@ |
46 | 46 | check.checked = !this.areAllTypesMatching(); |
47 | 47 | this.enableUnchainedInputs( check.checked ); |
48 | 48 | } |
| 49 | + |
| 50 | + $( '#mwProtect-reason' ).byteLimit( 180 ); |
49 | 51 | |
50 | 52 | this.updateCascadeCheckbox(); |
51 | 53 | |
Index: trunk/phase3/includes/ProtectionForm.php |
— | — | @@ -467,7 +467,10 @@ |
468 | 468 | </td> |
469 | 469 | <td class='mw-input'>" . |
470 | 470 | Xml::input( 'mwProtect-reason', 60, $this->mReason, array( 'type' => 'text', |
471 | | - 'id' => 'mwProtect-reason', 'maxlength' => 255 ) ) . |
| 471 | + 'id' => 'mwProtect-reason', 'maxlength' => 180 ) ) . |
| 472 | + // Limited maxlength as the database trims at 255 bytes and other texts |
| 473 | + // chosen by dropdown menus on this page are also included in this database field. |
| 474 | + // The byte limit of 180 bytes is enforced in javascript |
472 | 475 | "</td> |
473 | 476 | </tr>"; |
474 | 477 | # Disallow watching is user is not logged in |
Index: trunk/phase3/includes/specials/SpecialMovepage.php |
— | — | @@ -113,6 +113,8 @@ |
114 | 114 | |
115 | 115 | $wgOut->setPagetitle( wfMsg( 'move-page', $this->oldTitle->getPrefixedText() ) ); |
116 | 116 | $skin->setRelevantTitle( $this->oldTitle ); |
| 117 | + |
| 118 | + $wgOut->addModules( 'mediawiki.special.movePage' ); |
117 | 119 | |
118 | 120 | $newTitle = $this->newTitle; |
119 | 121 | |
— | — | @@ -237,7 +239,7 @@ |
238 | 240 | "</td> |
239 | 241 | <td class='mw-input'>" . |
240 | 242 | Html::element( 'textarea', array( 'name' => 'wpReason', 'id' => 'wpReason', 'cols' => 60, 'rows' => 2, |
241 | | - 'maxlength' => 200 ), $this->reason ) . |
| 243 | + 'maxlength' => 200 ), $this->reason ) . // maxlength byte limit is enforce in mediawiki.special.movePage.js |
242 | 244 | "</td> |
243 | 245 | </tr>" |
244 | 246 | ); |
Index: trunk/phase3/resources/Resources.php |
— | — | @@ -455,6 +455,10 @@ |
456 | 456 | 'mediawiki.special.block' => array( |
457 | 457 | 'scripts' => 'resources/mediawiki.special/mediawiki.special.block.js', |
458 | 458 | ), |
| 459 | + 'mediawiki.special.movePage' => array( |
| 460 | + 'scripts' => 'resources/mediawiki.special/mediawiki.special.movePage.js', |
| 461 | + 'dependencies' => 'jquery.byteLimit', |
| 462 | + ), |
459 | 463 | 'mediawiki.special.upload' => array( |
460 | 464 | // @TODO: merge in remainder of mediawiki.legacy.upload |
461 | 465 | 'scripts' => 'resources/mediawiki.special/mediawiki.special.upload.js', |
— | — | @@ -586,7 +590,10 @@ |
587 | 591 | 'scripts' => 'common/protect.js', |
588 | 592 | 'remoteBasePath' => $GLOBALS['wgStylePath'], |
589 | 593 | 'localBasePath' => "{$GLOBALS['IP']}/skins", |
590 | | - 'dependencies' => 'mediawiki.legacy.wikibits', |
| 594 | + 'dependencies' => array( |
| 595 | + 'mediawiki.legacy.wikibits', |
| 596 | + 'jquery.byteLimit', |
| 597 | + ), |
591 | 598 | ), |
592 | 599 | 'mediawiki.legacy.search' => array( |
593 | 600 | 'scripts' => 'common/search.js', |
Index: trunk/phase3/resources/mediawiki.special/mediawiki.special.movePage.js |
— | — | @@ -0,0 +1,5 @@ |
| 2 | +/* JavaScript for Special:MovePage */ |
| 3 | + |
| 4 | +jQuery( function( $ ) { |
| 5 | + $( '#wpReason' ).byteLimit( 200 ); |
| 6 | +}); |
Property changes on: trunk/phase3/resources/mediawiki.special/mediawiki.special.movePage.js |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 7 | + native |