mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-11-15 01:05:42 +00:00
Sort result files
This commit is contained in:
parent
020f99d93f
commit
a0c0f3ff0c
@ -177,6 +177,7 @@
|
|||||||
|
|
||||||
for (let operation of patch) {
|
for (let operation of patch) {
|
||||||
/* "/jobId/valueName" -> ["jobId", "valueName"] */
|
/* "/jobId/valueName" -> ["jobId", "valueName"] */
|
||||||
|
console.log(operation.value);
|
||||||
pathArray = operation.path.split("/").slice(1);
|
pathArray = operation.path.split("/").slice(1);
|
||||||
if (pathArray[0] != this.jobId) {continue;}
|
if (pathArray[0] != this.jobId) {continue;}
|
||||||
switch(operation.op) {
|
switch(operation.op) {
|
||||||
@ -215,9 +216,19 @@
|
|||||||
|
|
||||||
setResults(results) {
|
setResults(results) {
|
||||||
let resultsElement;
|
let resultsElement;
|
||||||
|
results.sort(function (a, b) {
|
||||||
|
var filenameA = a.filename.toUpperCase();
|
||||||
|
var filenameB = b.filename.toUpperCase();
|
||||||
|
if (filenameA < filenameB) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
if (filenameA > filenameB) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
});
|
||||||
resultsElement = document.getElementById("results");
|
resultsElement = document.getElementById("results");
|
||||||
|
console.log(results);
|
||||||
for (let result of results) {
|
for (let result of results) {
|
||||||
resultsElement.insertAdjacentHTML(
|
resultsElement.insertAdjacentHTML(
|
||||||
"beforeend",
|
"beforeend",
|
||||||
|
Loading…
Reference in New Issue
Block a user