web/data/cubicweb.log.js
author Sylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 26 Jan 2012 14:58:38 +0100
changeset 8183 7d658ea27ec5
parent 7995 9a9f35ef418c
permissions -rw-r--r--
[search box] allow to specify domid in select arguments. Closes #2162166 needed when one want to display search box twice in a page (eg logilabfr)

// 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]();
    }
}