Switch to unified view

a/dirbrowser/containerscript.js b/dirbrowser/containerscript.js
...
...
6
// now)
6
// now)
7
var locDetails = '';
7
var locDetails = '';
8
function saveLoc(ev) 
8
function saveLoc(ev) 
9
{
9
{
10
    el = ev.target;
10
    el = ev.target;
11
    //console.log('el: ' + el);
12
    locDetails = '';
11
    locDetails = '';
13
    while (el && !el.getAttribute('objid')) {
12
    while (el && el.attributes && !el.attributes.getNamedItem("objid")) {
14
        //console.log('el: ' + el);
13
        // console.log('el: ' + el);
15
        el = el.parentNode;
14
        el = el.parentNode;
16
    }
15
    }
16
    
17
    objid = el.attributes.getNamedItem("objid");
17
    if (el) {
18
    if (objid) {
18
        locdetails = '{\n' + 
19
        objidvalue = objid.value;
19
            '"objid" : ' + JSON.stringify(el.getAttribute("objid")) + ',\n' +
20
    } else {
20
            '"title" : ' + JSON.stringify(el.textContent || el.innerText || "") + ',\n' +
21
        objidvalue = "";
21
            '"objidx" : ' + JSON.stringify(el.getAttribute("objidx")) + ',\n' +
22
            '"otype" : ' + JSON.stringify(el.getAttribute("class")) + '\n' +
23
            '}\n';
24
    }
22
    }
23
    objidvalue = el.attributes.getNamedItem("objid").value;
24
    objidx = el.attributes.getNamedItem("objidx");
25
    if (objidx) {
26
        objidxvalue = objidx.value;
27
    } else {
28
        objidxvalue = "";
29
    }
30
    otype = el.attributes.getNamedItem("class");
31
    if (otype) {
32
        otypevalue = otype.value
33
    } else {
34
        otypevalue = "";
35
    }
36
    if (el && el.attributes) {
37
        locDetails = 
38
            'objid = ' + objidvalue + '\n' +
39
            'title = ' + (el.textContent || el.innerText || "") + '\n' +
40
            'objidx = ' + objidxvalue + '\n' +
41
            'otype = ' + otypevalue + '\n';
42
    }
25
    //console.log(locdetails);
43
    //console.log(locDetails);
26
}
44
}