"मीडियाविकि:Gadget-defaultsummaries.js": अवतरणों में अंतर
Content deleted Content added
No edit summary |
Update the gadget |
||
पंक्ति 11:
*/
/* global
/* eslint-disable no-jquery/no-global-selector */
( function ( $, mw ) { // Wrap with anonymous function▼
var $summaryBox = $( '#wpSummary' ),
minorSummaries = [
Line 64 ⟶ 66:
}
function
// For convenience, add a dropdown box with some canned edit
// summaries to the form.
Line 75 ⟶ 77:
} );
dropdown.$element.css( 'width', dropdownWidth );▼
dropdown.menu.on( 'select', onSummarySelect );
minorDropdown.menu.on( 'select', onSummarySelect );
Line 91 ⟶ 90:
}
}
}
// VisualEditor
mw.hook( 've.saveDialog.stateChanged' ).add( function () {
var target, $saveOptions, $dropdowns;
// .ve-init-mw-viewPageTarget-saveDialog-checkboxes
if ( $( 'body' ).data( 'wppresent' ) ) {
return; }
$( 'body' ).data( 'wppresent', 'true' );
Line 108 ⟶ 107:
return;
}
$dropdowns = getSummaryDropdowns();
$saveOptions.before( $dropdowns );
} );
// WikiEditor
$.when( mw.loader.using( 'oojs-ui-core' ), $.ready ).then( function () {
var $dropdowns,
$editCheckboxes = $( '.editCheckboxes' ); // If we failed to find the editCheckboxes class
Line 118 ⟶ 119:
return;
}
$dropdowns = getSummaryDropdowns();
$dropdowns.css( {
width: '48%',
'padding-bottom': '1em'
} );
$editCheckboxes.before( $dropdowns );
} );
}() );
|