Usuario:Pasqual/botoneraflotante.js
Apariencia
(Redirigido desde «Usuario:Pasqual (ca)/botoneraflotante.js»)
Nota: Después de guardar, debes refrescar la caché de tu navegador para ver los cambios. Internet Explorer: mantén presionada Ctrl mientras pulsas Actualizar. Firefox: mientras presionas Mayús pulsas el botón Actualizar, (o presiona Ctrl-Shift-R). Los usuarios de Google Chrome y Safari pueden simplemente pulsar el botón Recargar. Para más detalles e instrucciones acerca de otros exploradores, véase Ayuda:Cómo limpiar la caché.
//<pre><nowiki>
//Personalizada por Axxgreazz, para el [[w:es:User:Axxgreazz/Monobook-Suite]]
//http://es.wikipedia.org/wiki/Usuario:Axxgreazz/Monobook-Suite
var fl$div;
function creaBotón(title, texto, funcion, estilo)
{
return '<a href="' + 'javascript:' + funcion + '()" style="text-decoration:none">' +
'<div class="botón" style="' + estilo + '" title="' + title + '">' + texto + '</div></a>';
}
function botoneraflotante()
{
if (typeof wpFlBottom == 'undefined') { wpFlBottom = '60px';}
if (typeof wpFlBottomIE == 'undefined') { wpFlBottomIE = '60px';}
if (typeof wpFlLeft == 'undefined') { wpFlLeft = '120px';}
if (typeof wpFlLeftIE == 'undefined') { wpFlLeftIE = '120px';}
if (navigator.appName.indexOf("Microsoft")!=-1)
{ ubicacion = ' top:' + wpFlBottomIE + '; left:' + wpFlLeftIE + '; position:absolute;">';}
else
{ ubicacion = ' top:' + wpFlBottom + '; left:' + wpFlLeft + '; position:fixed;' +
' float:right;">';}
var botones = '<style type="text/css">\n .botón { background-color:white; border:1px ' +
'solid #e1eAee; width:20px; height:18px; float:left; font-size:80%; ' +
'padding:0px; line-height:1.7 }\n</style>' +
'<div id="vots" class="botonera" style="z-index:3; font-size:13px; font-weight:900;' +
' text-align:center; width:45px;' + ubicacion;
if (document.getElementById("editform")!= null)
{
for (i=0; i<misflotantes.length; i++)
{
if (misflotantes[i].proy == proyecto.codigo() || misflotantes[i].proy == "0")
{
botones += creaBotón(misflotantes[i].nom,
misflotantes[i].code,
misflotantes[i].fx,
misflotantes[i].st);
}
}
botones += '</div>';
var toolbox = document.getElementById("column-one");
toolbox.innerHTML += botones;
fl$div = document.getElementById("vots")
fl$div.style.display = 'none';
}
}
function flMostraAmaga() {
if (fl$div.style.display == 'none') {
fl$div.style.display = 'block';
} else {
fl$div.style.display = 'none';
}
}
if (window.addEventListener) window.addEventListener("load",botoneraflotante,false);
else
if (window.attachEvent) window.attachEvent("onload",botoneraflotante);
//</nowiki></pre>