Utente:Daimona Eaytoy/Massblock.js: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
m Ormai di Tim c'era solo il nome... |
Disabilita summary se non c'è text |
||
Riga 6:
* Overwrite values in localMsg below to localize.
*
* @todo docs!!,
*
*/
( function( mw, $ ) {
Riga 311:
var reasons = mw.msg( 'Ipbreason-dropdown' ).split( '\*\*' ),
// OOUI elements
talkTextField, userTextField, talkProtectCb, talkSummaryField,
userSummaryField, userProtectCb, protectReasonField; // Ideally this would use $wgBlockAllowsUTEdit, but it's not available.
Riga 321 ⟶ 322:
var form = new OO.ui.FormLayout( {
id: 'wpMassBlock'
} );▼
} );
Riga 336 ⟶ 345:
),
new OO.ui.FieldLayout(
talkTextField, {
▲ new OO.ui.MultilineTextInputWidget( {
▲ rows: 10
} ), {▼
label: msg( 'talkmsg' ),
align: 'top',
id: 'wpMassBlockMessage'
}
),
▲ ]
▲ } );
▲ new OO.ui.MultilineTextInputWidget( {
▲ rows: 10
▲ } );
new OO.ui.FieldLayout( userTextField, {
label: msg( 'upmsg' ),
Riga 358 ⟶ 356:
id: 'wpMassBlockTag'
} )
] } );
var reasonOpts = [ {
Riga 472 ⟶ 470:
} );
talkSummaryField =
label: msg( 'further-options-label' ),▼
new OO.ui.FieldLayout(▼
▲ new OO.ui.TextInputWidget( {
▲ id: 'wpMassBlockSummaryTalk',
talkTextField.on( 'change', function() {
▲ value: msg( 'summary-default' )
talkSummaryField.setDisabled( talkTextField.getValue().trim() === '');
} ), {▼
label: msg( 'talksummary' )▼
}▼
▲ )
▲ ]
} );
Riga 494 ⟶ 488:
value: msg( 'summary-default' )
} );
userTextField.on( 'change', function () {
userSummaryField.setDisabled( userTextField.getValue().trim() === '');
talkProtectCb =
Riga 528 ⟶ 526:
userProtectCb.on( 'change', toggleProtectionFields );
var furtherOpts = new OO.
items: [
new OO.ui.FieldLayout( userSummaryField, {
label: msg( 'upsummary' )
Riga 541 ⟶ 544:
label: msg( 'protect-reason-label' )
} )
] } );
expiryField.on( 'change', function() {
|