From e685a8e104cb9ace0a4cd8afe26971544bb8951f Mon Sep 17 00:00:00 2001 From: sidya82 Date: Tue, 3 Mar 2015 18:00:22 +0100 Subject: [PATCH] modified: SRC/public/js/ListeOeuvre.js --- SRC/public/js/ListeOeuvre.js | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/SRC/public/js/ListeOeuvre.js b/SRC/public/js/ListeOeuvre.js index 222a082..219c37d 100755 --- a/SRC/public/js/ListeOeuvre.js +++ b/SRC/public/js/ListeOeuvre.js @@ -1,6 +1,22 @@ +function showSelection() { + $('#addpicture').hide(); + $('#selection').show("slow"); + $('#liAddImages').removeClass("active"); + $('#liSelection').addClass("active"); +} + +function showAddPicture() { + $('#selection').hide(); + $('#addpicture').show("slow"); + $('#liSelection').removeClass("active"); + $('#liAddImages').addClass("active"); +} + + //Selection d'une recherche d'oeuvre $('.listeoeuvre').click(function(event) { + showSelection(); $("#sessionName").empty(); $("#sessionName").text($(this).children(".sessionName").text()); $('.listeoeuvre').removeClass("active"); @@ -157,20 +173,11 @@ $('.checkbox').click(function(event) { }); -//swicth onglets de bg ma selection /ajouter -$('#liSelection').click(function() { - $('#addpicture').hide(); - $('#selection').show("slow"); - $('#liAddImages').removeClass("active"); - $('#liSelection').addClass("active"); -}); +//swicth onglets de bg ma selection /ajouter + +$('#liSelection').click(showSelection()); -$('#liAddImages').click(function() { - $('#selection').hide(); - $('#addpicture').show("slow"); - $('#liSelection').removeClass("active"); - $('#liAddImages').addClass("active"); -}); +$('#liAddImages').click(showAddPicture());