diff --git a/SRC/public/js/ListeOeuvre.js b/SRC/public/js/ListeOeuvre.js
index 92e912b..b548b52 100644
--- a/SRC/public/js/ListeOeuvre.js
+++ b/SRC/public/js/ListeOeuvre.js
@@ -1,55 +1,56 @@
-$(document).ready( function() {
- console.log( "document loaded" );
- $('.listeoeuvre').click(function() {
- $('#oeuvrePic').empty();
- url = "/showListOeuvres/" + $(this).children('.idListeOeuvre').val();
- $.get(url, function( data ) {
- if (data.length == 0 )
- $("#oeuvrePic").append("Aucune Oeuvre");
- data.forEach( function(el) {
- $("#oeuvrePic").append('
');
- })
- }, "json" )
-
- .fail(function() {
- $("#oeuvrePic").append(''
- +'
Oouups! Il y a un problème.
'
- +'
'
- +'- Erreur lors de la récupération
'
- +'
'
- +'
'
- );
- });
- });
- $('.listeoeuvre').click(function() {
- $('#oeuvrePic').empty();
- url = "/showListOeuvres/" + $(this).children('.idListeOeuvre').val();
- $.post(url,
- dataSend,
- function( data ) {
- }, "json" )
- .done(function() {
- $("#oeuvrePic").append(''
- +'
'
- +'- Sauvegarde valider
'
- +'
'
- +'
'
+//Selection d'une recherche d'oeuvre
+$('.listeoeuvre').click(function() {
+ $('#oeuvrePic').empty();
+ url = "/showListOeuvres/" + $(this).children('.idListeOeuvre').val();
+ $.get(url, function( data ) {
+ if (data.length == 0 )
+ $("#oeuvrePic").append("Aucune Oeuvre");
+ data.forEach( function(el) {
+ $("#oeuvrePic").append('');
})
- .fail(function() {
- $("#oeuvrePic").append(''
- +'
Oouups! Il y a un problème.
'
- +'
'
- +'- Erreur lors de la récupération
'
- +'
'
- +'
'
- );
- });
+ }, "json" )
+
+ .fail(function() {
+ $("#oeuvrePic").append(''
+ +'
Oouups! Il y a un problème.
'
+ +'
'
+ +'- Erreur lors de la récupération
'
+ +'
'
+ +'
'
+ );
+ });
+});
+
+
+//Enregistrement d'une liste d'ouevre
+$('#enregistrer').click(function() {
+ url = "/setListOeuvres/" + $(this).children('.idListeOeuvre').val();
+ dataSend = { idListeOeuvre : 1,
+ oeuvres : "1-2-3-4"};
+ $.post(url,
+ dataSend,
+ function( data ) {
+ ;
+ })
+ .done(function() {
+ $("#oeuvrePic").append(''
+ +'
'
+ +'- Sauvegarde validée
'
+ +'
'
+ +'
');
+ })
+ .fail(function() {
+ $("#oeuvrePic").append(''
+ +'
Oouups! Il y a un problème.
'
+ +'
'
+ +'- Erreur lors de l\'envoie
'
+ +'
'
+ +'
');
});
-
});