latin: remove empty sample column
authorMischa POSLAWSKY <perl@shiar.org>
Mon, 10 Apr 2017 22:00:11 +0000 (00:00 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Mon, 24 Apr 2017 23:51:41 +0000 (01:51 +0200)
latinsample.js

index fa6b0f1ca60af7e6cae33a5dce46eb2b0fb8df5a..57e82fc0cf7759e9b7fa3093e059acf3f56c2be6 100644 (file)
@@ -3,6 +3,10 @@ function appendsample() {
        for (var row of rows) {
                // append sample column
                var samplecol = row.getElementsByClassName('sample');
        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];
                }
                if (samplecol.length) {
                        samplecol = samplecol[0];
                }