web/data/cubicweb.log.js
author Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
Fri, 25 Jul 2014 17:10:05 +0200
changeset 10433 523a7f098066
parent 7995 9a9f35ef418c
permissions -rw-r--r--
[js] lint : make it explicit that typeof is an operator, not a function. Also, use === / !== except for null / undefined comparison

// This contains template-specific javascript

function filterLog(domid, thresholdLevel) {
    var logLevels = ["Debug", "Info", "Warning", "Error", "Fatal"]
    var action = "hide";
    for (var idx = 0; idx < logLevels.length; idx++){
        var level = logLevels[idx];
        if (level === thresholdLevel){
            action = "show";
        }
        $('#'+domid+' .log' + level)[action]();
    }
}