# HG changeset patch # User cavaliet # Date 1372346224 -7200 # Node ID 5f265e870a8dde4919bb21fb1173dbedc688d14f # Parent ef27525a315a380c3d2c6b93b0d3d45cfcd9c134 remove useless data and update integ main.js diff -r ef27525a315a -r 5f265e870a8d integration/v2/js/main.js --- 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 diff -r ef27525a315a -r 5f265e870a8d src/egonomy/templates/partial/item_in_collection_list.html --- a/src/egonomy/templates/partial/item_in_collection_list.html Thu Jun 27 17:03:05 2013 +0200 +++ b/src/egonomy/templates/partial/item_in_collection_list.html Thu Jun 27 17:17:04 2013 +0200 @@ -34,7 +34,7 @@
desc : {{ item.description }}
contenttype : {{ item.content_type.model }}
object_id : {{ item.object_id }}
content_object : {{ item.content_object }}
desc : {{ item.description }}
{% endwith %} @@ -90,7 +90,7 @@desc : {{ item.description }}
contenttype : {{ item.content_type.model }}
object_id : {{ item.object_id }}
content_object : {{ item.content_object }}
desc : {{ item.description }}
{% endwith %}