The URI of TUHH Docker Registry changed from "docker.rz.tu-harburg.de:5000" to "docker.rz.tu-harburg.de". Please update your gitlab-ci.yml files if you use images from this registry.

Commit 9918f036 authored by Tobias Zeumer's avatar Tobias Zeumer

Search: if nothing is found in map then open discovery with search terms in modal; #27 (and #17)

parent 1aa02590
......@@ -1028,9 +1028,17 @@ function search(input_value) {
}
var result = find_and_highlight("." + css);
/* @todo Tell user if nothing was found
console.log(result);
if (Object.keys(result).length === 0) alert('Nothing found');
*/
// If nothing is found in the map, then open discovery in modal and hope that
// the patron thought that this was the intended use of the search field
//console.log(result);
if (Object.keys(result).length === 0) {
// Assume intention is title search
let frameHTML = '<h3>' + window.lang.translate('tub.find') + '</h3>';
frameHTML += '<iframe class="modal-iframe" src="https://katalog.tub.tuhh.de/Search/Results?lookfor='+encodeURI(input_value)+'"></iframe>'
$("#modal-content").html(frameHTML);
$("#modal").show();
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment