MediaWiki:Gadget-tradLink.js: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
Vecchie maniere
Fix
Riga 10:
var cookieName = 'tradLinkLangs';
var windowManager, optDialog;
 
/**
* Mostra un errore relativo al dialog
* XXX Come si fa a farlo con OOUI senza incasinare le finestre?
*
* @param {string} text Messaggio di errore
*/
function showDialogError( text ) {
alert( text );
}
 
/**
Riga 77 ⟶ 67:
classes: [ 'tradlinks-buttons' ]
} );
 
this.errorContainer = new OO.ui.LabelWidget( {
label: ''
} );
this.addError = function ( error ) {
this.errorContainer.setLabel( error );
};
 
this.panelLayout = new OO.ui.PanelLayout( { padded: true, expanded: false } );
this.panelLayout.$element.append( fieldsetLayout.$element, buttonsLayout.$element, this.errorContainer.$element );
this.$body.append( this.panelLayout.$element );
};
Riga 115 ⟶ 112:
var siteData = data.sitematrix[i];
if ( lingue.indexOf( siteData.code ) > -1 ) {
filteredMatrix[siteData.code] = siteData.site;
}
}
Riga 122 ⟶ 119:
var code = lingue[j];
if ( code === 'it' ) {
showDialogErroroptDialog.addError( 'Il codice "it" non può essere usato' );
return;
}
if ( !( code in filteredMatrix ) ) {
showDialogErroroptDialog.addError( 'Codice lingua non riconosciuto: ' + code );
return;
}
Riga 137 ⟶ 134:
}
if ( !found ) {
showDialogErroroptDialog.addError( 'Non esiste una Wikipedia nella seguente lingua: ' + code );
return;
}