Check-in [cd213bb0a3]

Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:JS is horrible.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | fix-js | minor change
Files: files | file ages | folders
SHA3-256: cd213bb0a3703a222eeef834d2df487fcd55b7f27509a36b50ecaf7f5eb4867f
User & Date: dkf 2018-05-28 11:52:45
Context
2018-05-28
12:56
Fix the javascript. check-in: 2f8ac12d95 user: dkf tags: trunk
11:52
JS is horrible. Closed-Leaf check-in: cd213bb0a3 user: dkf tags: fix-js, minor change
11:41
DOH. check-in: 587cf865a4 user: dkf tags: fix-js, minor change
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to index.json.

cannot compute difference between binary files

Changes to index.md.

    57     57   })();
    58     58   function toggleClass(cls) {
    59     59       r = sheet.cssRules;
    60     60       if (r) {
    61     61           var i = r.length;
    62     62           while (i--) {
    63     63               if (r[i].selectorText && r[i].selectorText.toLowerCase() === cls) {
           64  +		console.log("removing hide rule for " + cls);
    64     65                   sheet.deleteRule(i);
    65     66                   return;
    66     67               }
    67     68           }
    68     69       }
           70  +    console.log("adding hide rule for " + cls);
    69     71       sheet.insertRule(cls + " {display:none;}", 0);
    70     72   }
    71     73   document.addEventListener("DOMContentLoaded", function() {
    72     74       var TAGS = {
    73     75           "informational": 0, "process": 0,
    74     76           "projectdraft": 0, "projectfinal": 0, "project": 0,
    75     77           "project84": 0, "project85": 0, "project86": 0, "project87": 0,
    76     78           "project90": 0,
    77     79           "rejected": 1, "withdrawn": 1, "obsoleted": 1, "deferred": 1, "jest": 1
    78     80       };
           81  +    function toggler(selector) {
           82  +	return function() {
           83  +	    toggleClass(selector);
           84  +	}
           85  +    }
    79     86       for (var tag of Object.keys(TAGS)) {
    80     87           var id = "click_" + tag;
    81     88           var selector = "." + tag;
    82         -        document.getElementById(id).addEventListener("click", function() {
    83         -            toggleClass(selector);
    84         -        });
           89  +        document.getElementById(id).addEventListener("click", toggler(selector));
    85     90           if (TAGS[tag]) {
    86     91               document.getElementById(id).checked = true;
    87     92               toggleClass(selector);
    88     93           }
    89     94       }
    90     95   });
    91     96   </script>

Changes to scripts/mkhtmlindex.tcl.

    67     67   })();
    68     68   function toggleClass(cls) {
    69     69       r = sheet.cssRules;
    70     70       if (r) {
    71     71           var i = r.length;
    72     72           while (i--) {
    73     73               if (r[i].selectorText && r[i].selectorText.toLowerCase() === cls) {
           74  +		console.log("removing hide rule for " + cls);
    74     75                   sheet.deleteRule(i);
    75     76                   return;
    76     77               }
    77     78           }
    78     79       }
           80  +    console.log("adding hide rule for " + cls);
    79     81       sheet.insertRule(cls + " {display:none;}", 0);
    80     82   }
    81     83   document.addEventListener("DOMContentLoaded", function() {
    82     84       var TAGS = {
    83     85           "informational": 0, "process": 0,
    84     86           "projectdraft": 0, "projectfinal": 0, "project": 0,
    85     87           "project84": 0, "project85": 0, "project86": 0, "project87": 0,
    86     88           "project90": 0,
    87     89           "rejected": 1, "withdrawn": 1, "obsoleted": 1, "deferred": 1, "jest": 1
    88     90       };
           91  +    function toggler(selector) {
           92  +	return function() {
           93  +	    toggleClass(selector);
           94  +	}
           95  +    }
    89     96       for (var tag of Object.keys(TAGS)) {
    90     97           var id = "click_" + tag;
    91     98           var selector = "." + tag;
    92         -        document.getElementById(id).addEventListener("click", function() {
    93         -            toggleClass(selector);
    94         -        });
           99  +        document.getElementById(id).addEventListener("click", toggler(selector));
    95    100           if (TAGS[tag]) {
    96    101               document.getElementById(id).checked = true;
    97    102               toggleClass(selector);
    98    103           }
    99    104       }
   100    105   });
   101    106   </script>