--- 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
--- 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 @@
<h3>{{ fragment.title }}</h3>
<h4>{{ fragment.author }}</h4>
</div>
- <p>desc : {{ item.description }}<br/>contenttype : {{ item.content_type.model }}<br/>object_id : {{ item.object_id }}<br/>content_object : {{ item.content_object }}</p>
+ <p>desc : {{ item.description }}</p>
</div>
{% endwith %}
</li>
@@ -90,7 +90,7 @@
<h3>{{ img.metadata.titre }}</h3>
<h4>{{ img.metadata.auteur }}</h4>
</div>
- <p>desc : {{ item.description }}<br/>contenttype : {{ item.content_type.model }}<br/>object_id : {{ item.object_id }}<br/>content_object : {{ item.content_object }}</p>
+ <p>desc : {{ item.description }}</p>
</div>
</li>
{% endwith %}