Изменения

MediaWiki:Common.js

630 байтов добавлено, 19:52, 19 августа 2016
Нет описания правки
* That way the file will be categorised so someone can find a license for the file
*/
 
function licenseSelectorCheck() {
var selector = document.getElementById( "wpLicense" );
var selection = selector.options[selector.selectedIndex].value;
var uploadbutton = document.getElementsByName( "wpUpload" ).item(0);
if( selector.selectedIndex > 0 ) {
uploadbutton.removeAttribute("disabled");
if( selection == "" ) {
// Option disabled, but browser is broken and doesn't respect this
selector.selectedIndex = 0;
}
}
else {
uploadbutton.setAttribute("disabled", "disabled");
}
// We might show a preview
wgUploadLicenseObj.fetchPreview( selection );
}
 
if ( mw.config.get( 'wgCanonicalSpecialPageName' ) === 'Upload' ) {
if ( $( '#wpLicense' ).val() === '' ) {
$( '#wpLicense' ).val( i18n.defaultLicense );
}
mw.loader.using( 'mediawiki.special.upload', function() {
var change = setInterval( function() {