--- a/src/ldt/ldt/ldt_utils/templates/front/front_search_results.html Tue Jan 31 16:02:39 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/templates/front/front_search_results.html Wed Feb 01 11:53:41 2012 +0100
@@ -26,6 +26,10 @@
"segments" : [ {% for segment in res.list %}
{
"id" : '{{segment.element_id}}',
+ "project_id": '{{segment.project_id}}',
+ "ensemble_id": '{{segment.ensemble_id}}',
+ "cutting_id": '{{segment.cutting_id}}',
+ "iri_id": '{{segment.iri_id}}',
"begin" : {{segment.start_ts}},
"duration" : {{segment.duration}},
},{% endfor %}
@@ -85,7 +89,7 @@
<!-- Segments du média -->
<ul class="floatlist list_segments">
{% for segment in res.list %}
- <li class="li_segment" id="li_{{segment.element_id}}">
+ <li class="li_segment" id="li_{{segment.project_id}}_{{segment.iri_id}}_{{segment.ensemble_id}}_{{segment.cutting_id}}_{{segment.element_id}}">
<div class="left_segment">
<div class="color_zone"></div>
<a href="{% url ldt.ldt_utils.views.front.annot_content segment.iri_id segment.project_id segment.cutting_id %}#id={{segment.element_id}}"><img src="{{LDT_MEDIA_PREFIX}}img/annot_icon_80x45.png" width="80" height="45" alt="" /></a>
--- a/src/ldt/ldt/ldt_utils/views/workspace.py Tue Jan 31 16:02:39 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/views/workspace.py Wed Feb 01 11:53:41 2012 +0100
@@ -185,7 +185,7 @@
valid_segments = []
for s in all_related_segments:
- segment = filter(lambda e: e.element_id == s['element_id'] , all_segments)[0]
+ segment = [seg for seg in all_segments if seg.element_id == s['element_id'] and seg.project_id == s['project_id'] and seg.iri_id == s['iri_id'] and seg.cutting_id == s['decoupage_id'] and seg.ensemble_id == s['ensemble_id'] ][0]
segment.score = s['score']
segment.lucene_id = s['lucene_id']
--- a/src/ldt/ldt/static/ldt/js/Ldt_front_search_results.js Tue Jan 31 16:02:39 2012 +0100
+++ b/src/ldt/ldt/static/ldt/js/Ldt_front_search_results.js Wed Feb 01 11:53:41 2012 +0100
@@ -40,8 +40,9 @@
"opacity" : .5,
"stroke" : "none",
});
- _rect.node.id = "re_" + _s.id;
- $("#li_" + _s.id + " .color_zone").css({
+ id_str = _s.project_id + '_' + _s.iri_id + '_' + _s.ensemble_id + '_' + _s.cutting_id + '_' + _s.id;
+ _rect.node.id = "re_" + id_str;
+ $("#li_" + id_str+ " .color_zone").css({
"background" : _coul,
"opacity" : .5,
});