--- a/integration/v2/js/main.js Thu Jun 27 17:03:05 2013 +0200
+++ b/integration/v2/js/main.js Thu Jun 27 17:17:04 2013 +0200
@@ -52,7 +52,19 @@
keywordsTagIt.tagit("createTag", tag);
});
}
-//map
+
+
+ // add item to collection behaviour
+ $('.additemtocollection').bind('click', function(e){
+ // When an item meant to be added to a collection is clicked,
+ // we fill the form in the add-to-collection div
+ console.log(this + ", " + $(this) + ", " + $(this).attr('data-type') + ", " + $(this).attr('data-id'));
+ $('#add-to-collection .item-type').val($(this).attr('data-type'));
+ $('#add-to-collection .item-id').val($(this).attr('data-id'));
+ });
+
+
+ //map
if($('#map').length){
initmap()
}
@@ -75,4 +87,4 @@
marker2.bindPopup("Beaux-Arts de Nantes");
}
-});//ready
+});//ready
\ No newline at end of file