latin: header row with sequence number
[sheet.git] / latinsample.js
index fa6b0f1ca60af7e6cae33a5dce46eb2b0fb8df5a..37d323164f46a8593336042b975f2e2ad91e235f 100644 (file)
@@ -3,6 +3,10 @@ function appendsample() {
        for (var row of rows) {
                // append sample column
                var samplecol = row.getElementsByClassName('sample');
+               if (!this.value.length) {
+                       row.removeChild(samplecol[0]);
+                       continue;
+               }
                if (samplecol.length) {
                        samplecol = samplecol[0];
                }
@@ -42,6 +46,9 @@ function appendsample() {
                        else {
                                output += ' ';
                        }
+                       if (row.parentNode.tagName == 'THEAD') {
+                               output += col < 26 ? ' ' : 'ยท '; // number separator
+                       }
                }
                if (cols[29] && !cols[28]) {
                        // circumfix sign if no repetition