Differenze tra le versioni di "Utente:Alex brollo/eiv.js"

nessun oggetto della modifica
(function ($,mw) {
if(mw.config.get("wgCanonicalNamespace")!=="Page" || mw.config.get("wgAction")!=="view") return false;
if(mw.config.get("wgCanonicalNamespace")!==="Page" || mw.config.get("wgAction")!==="view") return false;{
var eiv={};
/* passo 1 : costruire l'ambiente */
var eiv={};
 
/* passo 1 : costruire l'ambiente */
if (mw.config.get("wgCanonicalNamespace")!=="Page" ||
mw.config.get("wgAction")!=="view") return False;
// in nsPage, and in view mode, eiv environment is built
creabox();
activate creabox();
function activate() {;
 
function toggle() {
$("sfondoEiv").toggle();
return false;
 
function activate() {
$('<li id="ca-eiv"><span><a href="#" title="Attiva eiv" >eiv</a></span></li>').click(function() {toggle();}).insertAfter($("#ca-view"));
function toggle() {
return false;
$("sfondoEiv").toggle();
return false;
 
}
function creabox() {
 
$('<div id="sfondoEiv" style="width: 100%; height: 100%; position: fixed; z-index: 100; top: 0px; left: 0px; background-color: rgb(250, 250, 250); display:none;"></div>').appendTo($("#content"));
$(".prp-page-image").clone().appendTo($("#sfondoEiv"));
$("#sfondoEiv .prp-page-image").css("width","40%");
$("#sfondoEiv .prp-page-image img").draggable();
function creaboxactivate() {
var box=$('<div style="display:block; border:1px solid black; position:fixed; top:10px; left:10px; /* z-index:999; */ background-color:#efefef;padding:6px;" id="editBox"></div>');
$('<li id="ca-eiv"><span><a href="#" title="Attiva eiv" >eiv</a></span></li>').click(function() {toggle();}).insertAfter($("#ca-view"));
box.append($("<div id='handle' style='width:100%; background-color:#dfdfdf; min-height:10px;' ><div id='areaBottoni' style='float:left;max-width:400px'></div> </div>"))
box.append($("<textarea name='wpHeaderTextbox' id='wpHeaderTextbox' style='width:100%; height:30px; border:1px solid gray;' />"));
return false;
box.append($("<textarea name='wpTextbox1' id='wpTextbox1' rows='35' style='width:550px; border:1px solid gray;' />"));
}
box.append($("<textarea name='wpFooterTextbox' id='wpFooterTextbox' style='width:100%; height:30px; border:1px solid gray;' />"));
$("#sfondoEiv").append(box);
function creabox(); {
// attivazione alex.activeEleme
$("#editBox textarea").focusin(function () {alex.activeElement=this;})
$('<div id="sfondoEiv" style="width: 100%; height: 100%; position: fixed; z-index: 100; top: 0px; left: 0px; background-color: rgb(250, 250, 250); display:none;"></div>').appendTo($("#content"));
$("#editBox").draggable({ handle: "areaBottoni" });
$(".prp-page-image").clone().appendTo($("#sfondoEiv"));
$("#sfondoEiv .prp-page-image").css("width","40%");
$("#sfondoEiv .prp-page-image img").draggable();
var box=$('<div style="display:block; border:1px solid black; position:fixed; top:10px; left:10px; /* z-index:999; */ background-color:#efefef;padding:6px;" id="editBox"></div>');
box.append($("<div id='handle' style='width:100%; background-color:#dfdfdf; min-height:10px;' ><div id='areaBottoni' style='float:left;max-width:400px'></div> </div>"))
box.append($("<textarea name='wpHeaderTextbox' id='wpHeaderTextbox' style='width:100%; height:30px; border:1px solid gray;' />"));
box.append($("<textarea name='wpTextbox1' id='wpTextbox1' rows='35' style='width:550px; border:1px solid gray;' />"));
box.append($("<textarea name='wpFooterTextbox' id='wpFooterTextbox' style='width:100%; height:30px; border:1px solid gray;' />"));
$("#sfondoEiv").append(box);
// attivazione alex.activeEleme
$("#editBox textarea").focusin(function () {alex.activeElement=this;})
$("#editBox").draggable({ handle: "areaBottoni" });
var qb+='<br><span id="radiobuttons" style="float:right">'+
'<span class="quality3quality0"><input tabindex="85" title="Pagine_SAL_75Pagine_SAL_00%" checked="" type="radio" value="30" name="wpQuality"></span>'+
'<span id="radioQuality4" class="quality4quality2"><input tabindex="96" title="Pagine_SAL_100Pagine_SAL_50%" type="radio" value="42" name="wpQuality"></span></span>';+
'<span class="quality1"><input tabindex="7" title="Pagine_SAL_25%" type="radio" value="1" name="wpQuality"></span>'+
'<span class="quality3"><input tabindex="8" title="Pagine_SAL_75%" checked="" type="radio" value="3" name="wpQuality"></span>'+
'<span id="radioQuality4" class="quality4"><input tabindex="9" title="Pagine_SAL_100%" type="radio" value="4" name="wpQuality"></span></span>';
var qb+='<br><span id="radiobuttons" style="float:right">'+
'<spanbutton class="quality0baseButton"><input tabindexid="5wpSave" titlestyle="Pagine_SAL_00%display: inline; padding: 1px 2px;" type="radiobutton" valuetitle="0Salva le modifiche" nameonclick="wpQualityalex.eiv.salvaPagina()"><small>Salva</small></spanbutton>'+
'<spanbutton class="quality2baseButton"><input tabindexid="6wpPreview" titlestyle="Pagine_SAL_50%display: inline; padding: 1px 2px;" type="radiobutton" valuetitle="2Visualizza anteprima" nameonclick="wpQualityalex.eiv.pagePreview()"><small>Anteprima</small></spanbutton>'+
'<spanbutton class="quality1baseButton"><input tabindexstyle="7"display: title="Pagine_SAL_25%inline; padding: 1px 2px;" type="radiobutton" valuetitle="1Annulla e chiudi" nameonclick="wpQualityalex.eiv.chiudiEditBox()"><small>Annulla</small></spanbutton>'+
'</span>';
'<span class="quality3"><input tabindex="8" title="Pagine_SAL_75%" checked="" type="radio" value="3" name="wpQuality"></span>'+
$("#handle").append($(qb));
'<span id="radioQuality4" class="quality4"><input tabindex="9" title="Pagine_SAL_100%" type="radio" value="4" name="wpQuality"></span></span>';
 
qb+='<br><span style="float:right">'+
'<button class="baseButton" id="wpSave" style="display: inline; padding: 1px 2px;" type="button" title="Salva le modifiche" onclick="alex.eiv.salvaPagina()"><small>Salva</small></button>'+
'<button class="baseButton" id="wpPreview" style="display: inline; padding: 1px 2px;" type="button" title="Visualizza anteprima" onclick="alex.eiv.pagePreview()"><small>Anteprima</small></button>'+
'<button class="baseButton" style="display: inline; padding: 1px 2px;" type="button" title="Annulla e chiudi" onclick="alex.eiv.chiudiEditBox()"><small>Annulla</small></button>'+
'</span>';
$("#handle").append($(qb));
 
}
}
});
362 077

contributi