X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=resources%2Fsrc%2Fmediawiki.legacy%2Fprotect.js;h=aa49ae138e3f83728f7bac4072fa2ab9285d3b95;hb=0ab1808578a42cb7d26cf0350a12443663fa6fc4;hp=6226c90b8dd9f55a3b0e2fdf67eb17904b1a31b6;hpb=cb2896f90ebef77c02c9da4067b0e56e37471092;p=lhc%2Fweb%2Fwiklou.git
diff --git a/resources/src/mediawiki.legacy/protect.js b/resources/src/mediawiki.legacy/protect.js
index 6226c90b8d..aa49ae138e 100644
--- a/resources/src/mediawiki.legacy/protect.js
+++ b/resources/src/mediawiki.legacy/protect.js
@@ -1,242 +1,245 @@
( function ( mw, $ ) {
-var ProtectionForm = window.ProtectionForm = {
- /**
- * Set up the protection chaining interface (i.e. "unlock move permissions" checkbox)
- * on the protection form
- */
- init: function () {
- var $cell = $( '
' ),
- $row = $( ' | ' ).append( $cell );
-
- if ( !$( '#mwProtectSet' ).length ) {
- return false;
- }
-
- if ( mw.config.get( 'wgCascadeableLevels' ) !== undefined ) {
- $( 'form#mw-Protect-Form' ).submit( this.toggleUnchainedInputs.bind( ProtectionForm, true ) );
- }
- this.getExpirySelectors().each( function () {
- $( this ).change( ProtectionForm.updateExpiryList.bind( ProtectionForm, this ) );
- } );
- this.getExpiryInputs().each( function () {
- $( this ).on( 'keyup change', ProtectionForm.updateExpiry.bind( ProtectionForm, this ) );
- } );
- this.getLevelSelectors().each( function () {
- $( this ).change( ProtectionForm.updateLevels.bind( ProtectionForm, this ) );
- } );
-
- $( '#mwProtectSet > tbody > tr:first' ).after( $row );
-
- // If there is only one protection type, there is nothing to chain
- if ( $( '[id ^= mw-protect-table-]' ).length > 1 ) {
- $cell.append(
- $( '' )
- .attr( { id: 'mwProtectUnchained', type: 'checkbox' } )
- .click( this.onChainClick.bind( this ) )
- .prop( 'checked', !this.areAllTypesMatching() ),
- document.createTextNode( ' ' ),
- $( '