MediaWiki:Common.js: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
m fix commento
m uniformata posizione parentesi graffe
Riga 31:
* Collegamento diretto alla pagina di upload di Commons nel portlet Strumenti
*/
$(function() {
mw.util.addPortletLink('p-tb', '//commons.wikimedia.org/wiki/Commons:Upload/it',
'Carica su Commons', 't-uploadcommons', 'Carica file multimediali su Wikimedia Commons', 'm', '#t-specialpages');
Riga 40:
* Evidenzia i link agli articoli di qualità su altre wiki
*/
function LinkAdQ() {
{
if ( document.getElementById( "p-lang" ) ) {
var InterwikiLinks = document.getElementById( "p-lang" ).getElementsByTagName( "li" );
Riga 254 ⟶ 253:
var expandCaption = "mostra";
 
function collapseTable( tableIndex ) {
{
var Button = document.getElementById( "collapseButton" + tableIndex );
var Table = document.getElementById( "collapsibleTable" + tableIndex );
Riga 284 ⟶ 282:
}
 
function createCollapseButtons() {
{
var tableIndex = 0;
var NavigationBoxes = {};
Riga 359 ⟶ 356:
}
 
function hiddencat() {
{
var cl = document.getElementById('catlinks'); if(!cl) return;
var hc = document.getElementById('mw-hidden-catlinks'); if(!hc) return;
var nc = document.getElementById('mw-normal-catlinks');
var ahc;
if (!nc) {
{
removeClass(cl, 'catlinks-allhidden');
addClass(cl, 'catlinks-allhidden-mostra');
Riga 372 ⟶ 367:
document.getElementById('catlinks').innerHTML = ahc + cl.innerHTML;
}
else if( hasClass(hc, 'mw-hidden-cats-hidden') ) {
{
ahc = ' | <a onclick="javascript:toggleHiddenCats();" id="mw-hidden-cats-link" style="cursor:pointer; color:#002BB8;" title="Questa voce contiene categorie nascoste">[altre]</a>';
document.getElementById('mw-normal-catlinks').innerHTML += ahc;
}
}
function toggleHiddenCats() {
{
var hc = document.getElementById('mw-hidden-catlinks');
if( hasClass(hc, 'mw-hidden-cats-hidden') ) {
{
removeClass(hc, 'mw-hidden-cats-hidden');
addClass(hc, 'mw-hidden-cat-user-shown');
Riga 389 ⟶ 381:
document.getElementById('mw-hidden-cats-link').innerHTML = '[nascondi]';
//document.getElementById('mw-hidden-cats-link').innerHTML = '[<span style="font-style:italic;">nascondi</span>]';
} else {
else
{
removeClass(hc, 'mw-hidden-cat-user-shown');
addClass(hc, 'mw-hidden-cats-hidden');
Riga 406 ⟶ 396:
* Layout pagina di modifica
*/
$( function () {
if (mw.config.get('wgAction') == "edit") {
{
if (mw.config.get('wgAction') == "edit")
{
/* Allarga l'edittools a tutta pagina */
$('#Standard').css( 'width', '100%' );
Riga 418 ⟶ 406:
* Avvisa quando si tenta di creare una voce con titolo non valido ("Scrivi qui il titolo")
*/
$ ( function () {
if (mw.config.get('wgTitle') == "Scrivi qui il titolo" && mw.config.get('wgAction') == "edit") {
{
if (mw.config.get('wgTitle') == "Scrivi qui il titolo" && mw.config.get('wgAction') == "edit")
{
dopoDi = document.getElementById("contentSub");
if (!dopoDi) return;
Riga 431 ⟶ 417:
daInserire.style.borderColor = "red";
daInserire.style.textAlign = "center";
daInserire.style.fontSize = "120%";
dopoDi.parentNode.insertBefore(daInserire, dopoDi.nextSibling);
}
Riga 439 ⟶ 425:
* Avvisa quando si tenta di creare una discussione al bar con titolo non valido ("Scrivi qui il titolo")
*/
$ ( function () {
if (mw.config.get('wgTitle') == "Wikipedia:Bar/Discussioni/SCRIVI QUI SOLO IL TITOLO" && mw.config.get('wgAction') == "edit") {
{
if (mw.config.get('wgTitle') == "Wikipedia:Bar/Discussioni/SCRIVI QUI SOLO IL TITOLO" && mw.config.get('wgAction') == "edit")
{
dopoDi = document.getElementById("contentSub");
if (!dopoDi) return;
Riga 452 ⟶ 436:
daInserire.style.borderColor = "red";
daInserire.style.textAlign = "center";
daInserire.style.fontSize = "120%";
dopoDi.parentNode.insertBefore(daInserire, dopoDi.nextSibling);
}
Riga 488 ⟶ 472:
}
 
function ImageGroup() {
if (document.___URL.match(/printable/g)) return;
var bc=mw.util.$content.get(0);
Riga 554 ⟶ 538:
mw.config.get('wgAction') == "edit" &&
document.___URL.indexOf("&section=new&preload=") != -1)
$( function () {
document.getElementById('wpSummarywpSummaryLabel').style.display = "none";
{
document.getElementById('wpSummaryLabelwpSummary').style.display = "none";
document.getElementById('wpSummary').style.display="none";
});
 
Riga 565 ⟶ 548:
* Fatto in Common.css, questo è un fix per IE7
*/
if ($.client.profile().name == 'msie' && $.client.profile().versionNumber < 8) {
$(function() {
$('.editsection').each(function(i, e){$(e).parent().append(e)});
});
}
 
/**