Utente:FiloSottile/finescuola.js
Questa pagina definisce alcuni parametri di aspetto e comportamento generale di tutte le pagine. Per personalizzarli vedi Aiuto:Stile utente.
Nota: dopo aver salvato è necessario pulire la cache del proprio browser per vedere i cambiamenti (per le pagine globali è comunque necessario attendere qualche minuto). Per Mozilla / Firefox / Safari: fare clic su Ricarica tenendo premuto il tasto delle maiuscole, oppure premere Ctrl-F5 o Ctrl-R (Command-R su Mac); per Chrome: premere Ctrl-Shift-R (Command-Shift-R su un Mac); per Konqueror: premere il pulsante Ricarica o il tasto F5; per Opera può essere necessario svuotare completamente la cache dal menù Strumenti → Preferenze; per Internet Explorer: mantenere premuto il tasto Ctrl mentre si preme il pulsante Aggiorna o premere Ctrl-F5.
//************SET FINE SCUOLA***********
function setCurrentFine()
{
Greeter = " Inserisci il giorno di fine scuola ";
var div = document.createElement('div');
div.id = 'inlinePopupDiv';
div.style.position = 'absolute';
div.style.zIndex = 1000;
div.style.left = '5px';
div.style.top = '5px';
div.style.padding = '5px';
div.style.backgroundColor = '#FFFFFF';
div.style.borderStyle = 'solid';
div.style.borderWidth = ' medium';
div.style.borderColor = '#000000';
var top = document.createElement('div');
top.id = 'inlinePopupTop';
top.style.textAlign = 'right';
top.style.margin = '8px';
top.style.backgroundColor = '#DDDDDD';
var a = document.createElement('a');
a.appendChild( document.createTextNode('Close'));
a.href = "javascript:void(0)";
$(a).on('click', function() { $('#inlinePopupDiv').remove(); } );
a.style.margin = '8px';
top.appendChild(a);
div.appendChild(top);
var greet = document.createElement('p');
greet.innerHTML = Greeter;
div.appendChild(greet);
var form = document.createElement('form');
form.name = "popupForm";
var p = document.createElement('p');
p.appendChild(document.createTextNode('Giorno:'));
var stato = document.createElement('input');
stato.name = 'status';
stato.id = 'stato';
stato.type = 'text';
p.appendChild(stato);
var button = document.createElement('input');
button.value = 'OK';
button.type = 'button';
button.on('click', function() {
new mw.Api().postWithEditToken( {
action: 'edit',
title: 'Utente:FiloSottile/Scuola/1',
text: document.getElementById('stato').value,
summary: 'fine modificato in \"' + document.getElementById('stato').value + '\"'
} )
.done ( function () {
$('#inlinePopupDiv').remove();
} )
} );
p.appendChild(button);
form.appendChild(p);
div.appendChild(form);
document.body.appendChild(div);
div.getElementsByTagName('input')[0].focus();
}
setCurrentFine()