Browse Source

Présentation des éléments: pas de lien Afficher le lecteur.

bastien 13 years ago
parent
commit
16c08acb8c

+ 7 - 7
src/Muzich/CoreBundle/Resources/views/SearchElement/element.html.twig View File

1
 <table>
1
 <table>
2
   <tr>
2
   <tr>
3
     <td class="element_thumbnail">
3
     <td class="element_thumbnail">
4
+      
4
       {% if element.embed %}
5
       {% if element.embed %}
5
-        <a href="#" class="element_open element_embed_open_link">
6
+        <a href="#" class="a_thumbnail element_open element_embed_open_link {% if element.embed %}embed{% else %}noembed{% endif %}">
7
+          <img class="play" style="display: none;" src="{{ asset('bundles/muzichcore/img/1328283150_media-playback-start.png') }}" alt="" />
6
           <img 
8
           <img 
7
             class="element_thumbnail"
9
             class="element_thumbnail"
8
             {% if element.thumbnailUrl %}
10
             {% if element.thumbnailUrl %}
15
           />
17
           />
16
         </a>
18
         </a>
17
       {% else %}
19
       {% else %}
18
-        <a href="{{ element.url }}" class="element_open" target="_blank">
20
+        <a href="{{ element.url }}" class="a_thumbnail element_open {% if element.embed %}embed{% else %}noembed{% endif %}" target="_blank">
21
+          <img class="open" style="display: none;" src="{{ asset('bundles/muzichcore/img/1328283201_emblem-symbolic-link.png') }}" alt="" />
19
           <img 
22
           <img 
20
             class="element_thumbnail"
23
             class="element_thumbnail"
21
             {% if element.thumbnailUrl %}
24
             {% if element.thumbnailUrl %}
28
           />
31
           />
29
         </a>
32
         </a>
30
       {% endif %}
33
       {% endif %}
34
+      
31
     </td>
35
     </td>
32
     <td class="element_content">
36
     <td class="element_content">
33
       
37
       
102
       </ul>
106
       </ul>
103
       {% endif %}
107
       {% endif %}
104
       
108
       
105
-      <br />
106
-      <a href="#" class="element_open element_embed_open_link element_embed_open_link_text">
107
-        {{ 'element.show.open_embed'|trans({}, 'elements') }}
108
-      </a>
109
-      <a href="#" class="element_open element_embed_close_link" style="display: none;">
109
+      <a href="#" class="button element_open element_embed_close_link" style="display: none;">
110
         {{ 'element.show.close_embed'|trans({}, 'elements') }}
110
         {{ 'element.show.close_embed'|trans({}, 'elements') }}
111
       </a>
111
       </a>
112
       
112
       

+ 1 - 1
src/Muzich/HomeBundle/Resources/views/Home/index.html.twig View File

46
   {% if more_count is defined %} 
46
   {% if more_count is defined %} 
47
   {% if elements|length %}
47
   {% if elements|length %}
48
      <span class="elements_more">
48
      <span class="elements_more">
49
-       <a href="{{ path('search_elements') }}" class="elements_more">
49
+       <a href="{{ path('search_elements') }}" class="elements_more button">
50
          {{ 'more'|trans({}, 'userui') }}
50
          {{ 'more'|trans({}, 'userui') }}
51
        </a>
51
        </a>
52
      </span>
52
      </span>

+ 7 - 0
web/bundles/muzichcore/css/main.css View File

444
 li.element a.element_open
444
 li.element a.element_open
445
 {
445
 {
446
   font-weight: bold;
446
   font-weight: bold;
447
+  margin-top: 7px;
447
 }
448
 }
448
 
449
 
449
 li.element div.element_embed
450
 li.element div.element_embed
480
   color: black;
481
   color: black;
481
 }
482
 }
482
 
483
 
484
+li.element img.play, li.element img.open
485
+{
486
+  position: absolute;
487
+  
488
+}
489
+
483
 ul.elements
490
 ul.elements
484
 {
491
 {
485
   margin-left: 0px;
492
   margin-left: 0px;

BIN
web/bundles/muzichcore/img/1328283150_media-playback-start.png View File


BIN
web/bundles/muzichcore/img/1328283201_emblem-symbolic-link.png View File


+ 36 - 1
web/bundles/muzichcore/js/muzich.js View File

203
   });
203
   });
204
 
204
 
205
   // Affichage un/des embed
205
   // Affichage un/des embed
206
+  // 1328283150_media-playback-start.png
207
+  // 1328283201_emblem-symbolic-link.png
206
   $('a.element_embed_open_link').live("click", function(){
208
   $('a.element_embed_open_link').live("click", function(){
207
     
209
     
208
      li = $(this).parent('td').parent('tr').parent().parent().parent('li.element');
210
      li = $(this).parent('td').parent('tr').parent().parent().parent('li.element');
236
      
238
      
237
      return false;
239
      return false;
238
   });
240
   });
241
+  
242
+  // Affichage du "play" ou du "open" (image png)
243
+  $('li.element a.a_thumbnail, li.element img.open, li.element img.play').live({
244
+    mouseenter:
245
+      function()
246
+      {
247
+        td = $(this).parent('td');
248
+        a = td.find('a.a_thumbnail');
249
+        if (a.hasClass('embed'))
250
+        {
251
+          td.find('img.play').show();
252
+        }
253
+        else
254
+        {
255
+          td.find('img.open').show();
256
+        }
257
+      },
258
+    mouseleave:
259
+      function()
260
+      {
261
+        td = $(this).parent('td');
262
+        a = td.find('a.a_thumbnail');
263
+        if (a.hasClass('embed'))
264
+        {
265
+          td.find('img.play').hide();
266
+        }
267
+        else
268
+        {
269
+          td.find('img.open').hide();
270
+        }
271
+      }
272
+    }
273
+  );
239
 
274
 
240
   // Mise en favoris
275
   // Mise en favoris
241
   $('a.favorite_link').live("click", function(){
276
   $('a.favorite_link').live("click", function(){
721
   // Check périodique 
756
   // Check périodique 
722
   // TODO.
757
   // TODO.
723
 
758
 
724
-
759
+ 
725
    
760
    
726
  });
761
  });