Skip to content

Commit dce437b

Browse files
committed
Bestandsabgleich mit direkt sichtbaren Lücken
Durch Einfügen eines unsichtbaren Zeichens (zero-width-joiner) werden die Zeilen bei den Bestandsabgleich-Tools direkt angezeigt, so dass auch ein möglicherweise unvollständiges Ergebnis bei einem Abbruch (etwa durch sehr viele ISBNs) kopiert werden kann. Dabei bleiben an den noch nicht abgefragten Stellen Lücken, so dass eine Übertragung nach Excel und weitere Bearbeitungsschritte möglich sind. Die Logik des Hochzählens musste dadurch auch angepasst werden (da die Felder nicht mehr ganz leer sind vor dem Abfragen).
1 parent c821c9f commit dce437b

File tree

5 files changed

+17
-13
lines changed

5 files changed

+17
-13
lines changed

tools/bestandsabgleich.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@
2020
}
2121

2222
function check(index, value) {
23-
$('#ausgabe').append('<div id="query-' + index + '"/>');
24-
$('#query-'+index).attr("data-isbn", value);
23+
$('#ausgabe').append('<div id="query-' + index + '">&zwj;</div>');
2524
var suffix = (document.getElementById("mitSammlungen").checked) ? "&with=collections" : "";
2625
var numberOfDigits = value.replace(/\D/g, '').length;
2726
if (numberOfDigits>=9) {
@@ -37,10 +36,12 @@
3736
$('#query-'+index).append(render('0', value));
3837
}
3938
}
39+
$('#query-'+index).attr("data-isbn", value);
4040
updateStatus();
4141
});
4242
} else {
4343
$('#query-'+index).append('KEINE ISBN');
44+
$('#query-'+index).attr("data-isbn", value);
4445
updateStatus();
4546
}
4647
}
@@ -58,7 +59,7 @@
5859

5960
// Statusanzeige aktualisieren
6061
function updateStatus() {
61-
var status = parseInt($('#total').text())-$('#ausgabe div:empty').length;
62+
var status = $('#ausgabe div[data-isbn]').length;
6263
$('#status').html(status);
6364
}
6465
//-->

tools/bestandsabgleichA.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@
2121
}
2222

2323
function check(index, value) {
24-
$('#ausgabe').append('<div id="query-' + index + '"/>');
25-
$('#query-'+index).attr("data-isbn", value);
24+
$('#ausgabe').append('<div id="query-' + index + '">&zwj;</div>');
2625
var numberOfDigits = value.replace(/\D/g, '').length;
2726
if (numberOfDigits>=9) {
2827
var verbund = $("#verbund :selected").text();
@@ -46,10 +45,12 @@
4645
$('#query-'+index).append(render('0', value));
4746
}
4847
}
48+
$('#query-'+index).attr("data-isbn", value);
4949
updateStatus();
5050
});
5151
} else {
5252
$('#query-'+index).append('KEINE ISBN');
53+
$('#query-'+index).attr("data-isbn", value);
5354
updateStatus();
5455
}
5556
}
@@ -67,7 +68,7 @@
6768

6869
// Statusanzeige aktualisieren
6970
function updateStatus() {
70-
var status = parseInt($('#total').text())-$('#ausgabe div:empty').length;
71+
var status = $('#ausgabe div[data-isbn]').length;
7172
$('#status').html(status);
7273
}
7374
//-->

tools/bestandsabgleichB.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@
2121
}
2222

2323
function check(index, value) {
24-
$('#ausgabe').append('<div id="query-' + index + '"/>');
25-
$('#query-'+index).attr("data-isbn", value);
24+
$('#ausgabe').append('<div id="query-' + index + '">&zwj;</div>');
2625
var selectedLibrary = document.getElementById("bibliothek").value;
2726
//var sruBase = libraries[selectedLibrary].sru;
2827
var sruBase = selectedLibrary;
@@ -41,10 +40,12 @@
4140
$('#query-'+index).append(render('0', value));
4241
}
4342
}
43+
$('#query-'+index).attr("data-isbn", value);
4444
updateStatus();
4545
});
4646
} else {
4747
$('#query-'+index).append('KEINE ISBN');
48+
$('#query-'+index).attr("data-isbn", value);
4849
updateStatus();
4950
}
5051
}
@@ -67,7 +68,7 @@
6768

6869
// Statusanzeige aktualisieren
6970
function updateStatus() {
70-
var status = parseInt($('#total').text())-$('#ausgabe div:empty').length;
71+
var status = $('#ausgabe div[data-isbn]').length;
7172
$('#status').html(status);
7273
}
7374

tools/isbnListe.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
}
2828

2929
function check(index, value, verbuende) {
30-
$('#ausgabe').append('<div id="query-' + index + '"/>');
30+
$('#ausgabe').append('<div id="query-' + index + '">&zwj;</div>');
3131
$('#query-'+index).attr("data-isbn", value);
3232
value = value.replace(/^([\w-]*).*$/, '$1');
3333
if (value.length > 0) {

tools/ppnListe.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@
2020
}
2121

2222
function check(index, value) {
23-
$('#ausgabe').append('<div id="query-' + index + '"/>');
24-
$('#query-'+index).attr("data-ppn", value);
23+
$('#ausgabe').append('<div id="query-' + index + '">&zwj;</div>');
2524
value = value.replace(/^([\w-]*).*$/, '$1');
2625
if (value.length > 0) {
2726
var verbund = $("#verbund :selected").text();
@@ -45,18 +44,20 @@
4544
} else {
4645
$('#query-'+index).append("---");
4746
}
47+
$('#query-'+index).attr("data-ppn", value);
4848
updateStatus();
4949
});
5050
} else {
5151
$('#query-'+index).append('KEINE PPN');
52+
$('#query-'+index).attr("data-ppn", value);
5253
updateStatus();
5354
}
5455
}
5556

5657

5758
// Statusanzeige aktualisieren
5859
function updateStatus() {
59-
var status = parseInt($('#total').text())-$('#ausgabe div:empty').length;
60+
var status = $('#ausgabe div[data-ppn]').length;
6061
$('#status').html(status);
6162
}
6263
</script>

0 commit comments

Comments
 (0)