Merge with dc8a7dc00a21351a401060cef616dc075a71ed33
authorverrierj
Thu, 19 Jan 2012 10:48:06 +0100
changeset 421 c464acb185d6
parent 420 38e46b1d0bd3 (current diff)
parent 419 dc8a7dc00a21 (diff)
child 422 83634fc6e869
child 424 a2f72b31811b
child 430 6b848824f185
Merge with dc8a7dc00a21351a401060cef616dc075a71ed33
src/ldt/ldt/ldt_utils/templates/front/front_search_results.html
--- a/src/ldt/ldt/ldt_utils/templates/front/front_search_results.html	Wed Jan 18 17:36:10 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/templates/front/front_search_results.html	Thu Jan 19 10:48:06 2012 +0100
@@ -142,15 +142,13 @@
                     <li class="li_segment" id="li_{{segment.element_id}}">
                         <div class="left_segment">
                             <div class="color_zone" style="background: #f49af5;"></div>
-                            <a href="{% url ldt.ldt_utils.views.front.annot_content segment.iri_id segment.project_id segment.decoupage_id %}#a={{segment.element_id}}"><img src="{{LDT_MEDIA_PREFIX}}img/annot_icon_80x45.png" width="80" height="45" /></a>
+                            <a href="{% url ldt.ldt_utils.views.front.annot_content segment.iri_id segment.project_id segment.decoupage_id %}#id={{segment.element_id}}"><img src="{{LDT_MEDIA_PREFIX}}img/annot_icon_80x45.png" width="80" height="45" /></a>
                             <!--p class="duree_segment">{{ segment.duration|str_duration:"::" }}</p-->
                         </div>
-                        <h4 class="title_segment"><a class="blue under" href="{% url ldt.ldt_utils.views.front.annot_content segment.iri_id segment.project_id segment.decoupage_id %}#a={{segment.element_id}}">
+                        <h4 class="title_segment"><a class="blue under" href="{% url ldt.ldt_utils.views.front.annot_content segment.iri_id segment.project_id segment.decoupage_id %}#id={{segment.element_id}}">
                           {% if segment.title %}{{ segment.title }}{% else %}{% trans "No title" %}{% endif %}</a></h4>
                         <p class="text_segment">{% if segment.context %}{{ segment.context }}{% endif %}<br/>{% trans "Begin" %} : {{ segment.begin|str_duration:"::" }} - {% trans "duration" %} : {{ segment.duration|str_duration:"::" }}</h4>
                     </li>
-	                <!--li class="segmentinfos" ><span  class="" title="{% trans 'open ldt' %}"><a class="ldt_link_open_ldt" href="{% url ldt.ldt_utils.views.lignesdetemps.index_segment segment.project_id segment.iri_id segment.ensemble_id segment.decoupage_id segment.element_id %}"-->
-	                </li>
                 {% endfor %}
                 </ul>
             </li>
--- a/src/ldt/ldt/static/ldt/js/LdtPlayer-release.js	Wed Jan 18 17:36:10 2012 +0100
+++ b/src/ldt/ldt/static/ldt/js/LdtPlayer-release.js	Thu Jan 19 10:48:06 2012 +0100
@@ -1298,7 +1298,8 @@
 IriSP.PopcornReplacement.roundTime = function() {
   var currentTime = IriSP.PopcornReplacement.currentTime();
   return Math.round(currentTime);
-};/* utils.js - various utils that don't belong anywhere else */
+};
+/* utils.js - various utils that don't belong anywhere else */
 
 /* trace function, for debugging */
 
@@ -4638,22 +4639,23 @@
     /* the next two lines are a bit verbose because for some test data, _serializer.data.view is either
        null or undefined.
     */
-    var view;
-
-    if (typeof(this._data.views) !== "undefined" && this._data.views !== null)
-       view = this._data.views[0];
-
-    var searchViewType = "";
-
-    if(typeof(view) !== "undefined" && typeof(view.annotation_types) !== "undefined" && view.annotation_types.length > 1) {
-            searchViewType = view.annotation_types[0];
+    
+    var searchViewType = this.getTweets();
+    if (typeof(searchViewType) === "undefined") {
+      var view;
+      
+      if (typeof(this._data.views) !== "undefined" && this._data.views !== null)
+         view = this._data.views[0];    
+
+      if(typeof(view) !== "undefined" && typeof(view.annotation_types) !== "undefined" && view.annotation_types.length > 1) {
+              searchViewType = view.annotation_types[0];
+      }
     }
-
     var filterfn = function(annotation) {
       if( searchViewType  != "" && 
           typeof(annotation.meta) !== "undefined" && 
           typeof(annotation.meta["id-ref"]) !== "undefined" &&
-          annotation.meta["id-ref"] !== searchViewType) {
+          annotation.meta["id-ref"] === searchViewType) {
         return false; // pass
       } else {
           return true;