+ /* get how many entries are matching:
+ opts.visibleRows only holds the contents of the current page
+ so we store the number of matching entries in the tbody's classname
+ see plc_table_tbody_matching
+ */
+ var totalMatches = opts.totalRows;
+ var tbody=document.getElementById(tablename).getElementsByTagName("tbody")[0];
+ var cn=tbody.className;
+ if (cn.match (/matching-\d+/)) {
+ totalMatches=cn.match(/matching-\d+/)[0].replace("matching-","");
+ }
+
+ var label;
+
+ /* when there's no visible entry, the pagination code removes the wrappers */
+ if (totalMatches == 0) return;
+
+ var matches_text;
+ if (totalMatches != opts.totalRows) {
+ matches_text = totalMatches + "/" + opts.totalRows;
+ } else {
+ matches_text = opts.totalRows;
+ }