summaryrefslogtreecommitdiff
path: root/ishtar_common/templates/blocks
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar_common/templates/blocks')
-rw-r--r--ishtar_common/templates/blocks/DataTables.html19
1 files changed, 12 insertions, 7 deletions
diff --git a/ishtar_common/templates/blocks/DataTables.html b/ishtar_common/templates/blocks/DataTables.html
index f9fba7ba4..3e0faffd0 100644
--- a/ishtar_common/templates/blocks/DataTables.html
+++ b/ishtar_common/templates/blocks/DataTables.html
@@ -79,6 +79,7 @@ gallery_submit_search = function(image_page){
} else {
current_image_page = 1;
}
+ $('.modal-progress').modal('show');
var data = search_get_query_data(query_vars, "{{name}}");
var nb_select = jQuery("#id_{{name}}-length_image").val();
if (!nb_select) nb_select = 10;
@@ -92,16 +93,18 @@ gallery_submit_search = function(image_page){
$("#id_{{name}}-length_image").change(gallery_submit_search);
register_image_gallery(gallery_id);
$('.card[data-toggle="tooltip"]').tooltip();
+ if ($('.modal-progress').length > 0){
+ $('.modal-progress').modal('hide');
+ }
});
-
- if ($('.modal-progress').length > 0){
- $('.modal-progress').modal('hide');
- }
return false;
};
{% endif %}
{% if use_map %}
map_submit_search = function(){
+ var modal_base_text = $('.modal-progress .modal-header').html();
+ $('.modal-progress .modal-header').html("{% trans 'Fetching data...' %}");
+ $('.modal-progress').modal('show');
var data = search_get_query_data(query_vars, "{{name}}");
var nb_select = jQuery("#id_{{name}}-length_map").val();
if (!nb_select) nb_select = 10;
@@ -110,15 +113,17 @@ map_submit_search = function(){
$.getJSON(url, function(data) {
var timestamp = Math.floor(Date.now() / 1000);
var map_id = "map-" + timestamp;
+ $('.modal-progress .modal-header').html("{% trans 'Render map...' %}");
var result = render_map(data, "{{name}}", nb_select, map_id);
$("#tab-content-map-{{name}}").html(result["html"]);
$("#id_{{name}}-length_map").change(map_submit_search);
+ if ($('.modal-progress').length > 0){
+ $('.modal-progress').modal('hide');
+ $('.modal-progress .modal-header').html(modal_base_text);
+ }
register_map(map_id, result["points"]);
});
- if ($('.modal-progress').length > 0){
- $('.modal-progress').modal('hide');
- }
return false;
};
{% endif %}