מדיה ויקי:Gadget-FlowDeluxeLocal.js: הבדלים בין גרסאות בדף

אין תקציר עריכה
אין תקציר עריכה
שורה 12: שורה 12:


//Options Flow Deluxe à inclure également :
//Options Flow Deluxe à inclure également :
flowDeluxeSujetsOuverts = "#FDE18C"; //Couleur des sujets ouverts
flowDeluxeSujetsClos = "rgba(60, 207, 90, 0.13)"; //Couleur des sujets fermés
flowDeluxeDiscuterContributions = true; //Voir en permanence les liens (discuter | contributions)
flowDeluxeDateComplete = true; //Voir en permanence les dates complètes en plus du texte "il y a X jours"
flowDeluxeBoutonsResumes = true; //Barre d'insertion rapide de modèles de résumé
flowDeluxeBoutonsResumes = true; //Barre d'insertion rapide de modèles de résumé
flowDeluxeIndentationColors = true; //Indentation colorée comme dans l'ancien système de discussions
flowDeluxeIndentationColors = true; //Indentation colorée comme dans l'ancien système de discussions
flowDeluxeNeverHide = true; //Ne jamais cacher les sujets flow, même ceux marqués comme étant résolus
flowDeluxeButtonsInline = true; //Bouttons, historique, liens du sujet en une seule ligne
flowDeluxeButtonsInline = true; //Bouttons, historique, liens du sujet en une seule ligne
*/
*/


/* local values */
/* local values */
var flowDeluxeDateCompleteLocal = true;
var flowDeluxeBoutonsResumesLocal = true;
var flowDeluxeBoutonsResumesLocal = true;
var flowDeluxeIndentationColorsLocal = true;
var flowDeluxeIndentationColorsLocal = true;
var flowDeluxeNeverHideLocal = false;
var flowDeluxeButtonsInlineLocal = true;
var flowDeluxeButtonsInlineLocal = true;


var flowDeluxeDateComplete = typeof window.flowDeluxeDateComplete !== 'undefined' ?
window.flowDeluxeDateComplete : flowDeluxeDateCompleteLocal;
var flowDeluxeBoutonsResumes = typeof window.flowDeluxeBoutonsResumes !== 'undefined' ?
var flowDeluxeBoutonsResumes = typeof window.flowDeluxeBoutonsResumes !== 'undefined' ?
window.flowDeluxeBoutonsResumes : flowDeluxeBoutonsResumesLocal;
window.flowDeluxeBoutonsResumes : flowDeluxeBoutonsResumesLocal;
var flowDeluxeIndentationColors = typeof window.flowDeluxeIndentationColors !== 'undefined' ?
var flowDeluxeIndentationColors = typeof window.flowDeluxeIndentationColors !== 'undefined' ?
window.flowDeluxeIndentationColors : flowDeluxeIndentationColorsLocal;
window.flowDeluxeIndentationColors : flowDeluxeIndentationColorsLocal;
var flowDeluxeNeverHide = typeof window.flowDeluxeNeverHide !== 'undefined' ?
window.flowDeluxeNeverHide : flowDeluxeNeverHideLocal;
var flowDeluxeButtonsInline = typeof window.flowDeluxeButtonsInline !== 'undefined' ?
var flowDeluxeButtonsInline = typeof window.flowDeluxeButtonsInline !== 'undefined' ?
window.flowDeluxeButtonsInline : flowDeluxeButtonsInlineLocal;
window.flowDeluxeButtonsInline : flowDeluxeButtonsInlineLocal;
שורה 72: שורה 61:
}
}
];
];
function showCompleteDate(elements){
$(".flow-topic-meta").removeClass("flow-timestamp");
$(".flow-timestamp-user-formatted, .flow-timestamp-ago").css('display', 'inline');
    $('.flow-timestamp-user-formatted').text(function(i, oldText) {
        return oldText.indexOf(" • ") < 0 ? oldText + ' • ' : oldText;
    });
}


function ajouterResume(texte,parent){
function ajouterResume(texte,parent){
שורה 193: שורה 173:
//element.style.padding = "5px";
//element.style.padding = "5px";
}
}
}
function neverHide() {
$(".flow-post").show();
}
}


שורה 232: שורה 208:
     var datesSujets = document.getElementsByClassName('flow-timestamp');
     var datesSujets = document.getElementsByClassName('flow-timestamp');


    if(flowDeluxeDateComplete)
    showCompleteDate(datesSujets);
     if(flowDeluxeIndentationColors)
     if(flowDeluxeIndentationColors)
     indentPostWithColors();
     indentPostWithColors();
    if(flowDeluxeNeverHide)
    neverHide();
     if(flowDeluxeButtonsInline)
     if(flowDeluxeButtonsInline)
     buttonsInline();
     buttonsInline();