modif on tools when multiple record selection

This commit is contained in:
aina-esokia
2018-03-05 18:02:44 +04:00
parent 92fdbc785d
commit dd59b6e022

View File

@@ -407,20 +407,22 @@
}; };
$(document).ready(function(){ {% if record is not null %}
$('.tool-metadata').click(function(e){ $(document).ready(function(){
$.ajax({ $('.tool-metadata').click(function(e){
"url": "{{ path('prod_subdefs_metadata', {'databox_id': record.get_sbas_id(), 'record_id': record.get_record_id, 'subdef_name': 'document'}) }}", $.ajax({
"type": "GET", "url": "{{ path('prod_subdefs_metadata', {'databox_id': record.get_sbas_id(), 'record_id': record.get_record_id, 'subdef_name': 'document'}) }}",
beforeSend: function(){ "type": "GET",
$('#metadata-content').empty(); beforeSend: function(){
$('#metadata-load').removeClass('hidden').addClass('loading'); $('#metadata-content').empty();
}, $('#metadata-load').removeClass('hidden').addClass('loading');
success: function (data) { },
$('#metadata-load').removeClass('loading').addClass('hidden'); success: function (data) {
$('#metadata-content').append(data); $('#metadata-load').removeClass('loading').addClass('hidden');
} $('#metadata-content').append(data);
}
});
}); });
}); });
}); {% endif %}
</script> </script>