Commit 63d4af57 authored by Romain Loth's avatar Romain Loth

Prevent explorermap generation with entire DB, show info via generic modal instead

parent 9dcad99c
......@@ -283,7 +283,7 @@ var cmxClt = (function(cC) {
// in a new div
var myDiv = document.createElement('div')
myDiv.innerHTML = `
<div class="modal fade self-made" id="${boxId}" role="dialog" aria-labelledby="authTitle" aria-hidden="true" style="display:none">
<div class="modal fade self-made" id="${boxId}" role="dialog" aria-labelledby="${boxId}-title" aria-hidden="true" style="display:none">
<div class="modal-dialog" role="document">
<div class="modal-content">
<form id="auth_box" enctype="multipart/form-data">
......@@ -291,7 +291,10 @@ var cmxClt = (function(cC) {
<button type="button" class="close" onclick="cmxClt.elts.box.toggleBox('${boxId}')" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<h5 class="modal-title" id="authTitle">${boxTitle}</h5>
<h5 class="modal-title" id="${boxId}-title">
<span class="glyphicon glyphicon-comment glyphicon-float-left"></span>&nbsp;&nbsp;
${boxTitle}
</h5>
</div>
<div class="modal-body mini-hero">
${boxContent}
......
......@@ -259,7 +259,20 @@ $(document).ready(function() {
// console.log("initiating graphexplorer")
return collectFilters(function(query) {
// debug
// console.log("collected filters: " + query);
// console.log("collected filters: " + query);
// empty query => no map + warning
if (query == "" || decodeURI(query) == "{}") {
if (document.getElementById('refine-warning')) {
cmxClt.elts.box.toggleBox("refine-warning")
}
else {
cmxClt.elts.box.addGenericBox('refine-warning',
"No filters were selected",
"Please fill at least a filter before generating a MAP <br/>(mapping without filters takes a long time and overloads servers)")
cmxClt.elts.box.toggleBox("refine-warning")
}
return null
}
return window.open('/explorerjs.html?type="filter"&nodeidparam="' + escape(query) +'"');
//return loadGraph("getgraph.php?query=" + query);
});
......
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