modified: SRC/app/Http/Controllers/ReferentController.php
modified: SRC/app/Http/routes.php modified: SRC/public/js/ListeOeuvre.js modified: SRC/resources/views/referent.blade.php
This commit is contained in:
@ -50,7 +50,7 @@ $('.listeoeuvre').click(function(event) {
|
||||
if (data.length == 0 )
|
||||
$("#oeuvrePic").append("Aucune Oeuvre");
|
||||
else {
|
||||
$("#oeuvrePic").append('<select multiple="multiple" id="my_selection" class="image-picker show-html">');
|
||||
$("#oeuvrePic").append('<select multiple="multiple" id="my_selection" name="my_selection" class="image-picker show-html">');
|
||||
for (el in data)
|
||||
{
|
||||
$('#my_selection').append('<option data-img-src="http://www.augustins.org/documents/10180/156407/' + data[el].urlPhoto + '" value="'+ data[el].id + '"></option>');
|
||||
@ -93,6 +93,33 @@ $('#enregistrer').click(function() {
|
||||
});
|
||||
|
||||
|
||||
// Suppression des n oeuvres selectionnés
|
||||
$('#removeFromSelection').click(function() {
|
||||
|
||||
url = "removeFromSelection";
|
||||
dataSend = {
|
||||
_token : $('#_tokenRemoveFromSelection').val(),
|
||||
oeuvres : $('#my_selection').val()};
|
||||
$.post(url,
|
||||
dataSend,
|
||||
function( data ) {
|
||||
;
|
||||
}, "json")
|
||||
.done(function() {
|
||||
;
|
||||
})
|
||||
.fail(function() {
|
||||
$("#oeuvrePic").append('<div class="alert alert-danger">'
|
||||
+'<strong>Oouups!</strong> Il y a un problème.<br><br>'
|
||||
+'<ul>'
|
||||
+'<li>Erreur lors de la Suppression</li>'
|
||||
+'</ul>'
|
||||
+'</div>');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
// Afficher résultat de recherche d'oeuvre
|
||||
$('#search_button, #previous, #next').click(function(event) {
|
||||
event.preventDefault();
|
||||
|
Reference in New Issue
Block a user