summaryrefslogtreecommitdiff
path: root/skins/html/javascript/records.js
blob: c3e8faa9a75d28be1750f9386af35aa859219e68 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Search for epgevents and check for future programming
function checkrecord (name) {
    var fnWhenDone = function (oXML, sData) {
        if(oXML.responseText != 'ok') {
            var text = oXML.responseText.split(':');
            document.getElementById(sData).src = 'images/record_red.png';
            document.getElementById(sData).title = '<?% gettext('When you want this timer save then has him a conflict with timer: ') %?>' + text[0];
            document.getElementById(sData).className = 'problem';
        } else {
            document.getElementById(sData).src = 'images/record_green.png';
            document.getElementById(sData).className = 'noproblem';
        }
     };

    var tags = document.getElementsByName('recordlink');
    for (var i = 0; i < tags.length; i++) {
        var epgid = tags[i].id;
        var url = "?cmd=conflict&data=" + epgid + "&ajax=text";
        var aconn = new XHRequest();
        if(!aconn)
          return false;
        aconn.connect(url, fnWhenDone, epgid);
    }
}

window.onLoad = window.setTimeout("checkrecord('recordlink')", 1000);