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,8 +1,10 @@
1 1
 <table>
2 2
   <tr>
3 3
     <td class="element_thumbnail">
4
+      
4 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 8
           <img 
7 9
             class="element_thumbnail"
8 10
             {% if element.thumbnailUrl %}
@@ -15,7 +17,8 @@
15 17
           />
16 18
         </a>
17 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 22
           <img 
20 23
             class="element_thumbnail"
21 24
             {% if element.thumbnailUrl %}
@@ -28,6 +31,7 @@
28 31
           />
29 32
         </a>
30 33
       {% endif %}
34
+      
31 35
     </td>
32 36
     <td class="element_content">
33 37
       
@@ -102,11 +106,7 @@
102 106
       </ul>
103 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 110
         {{ 'element.show.close_embed'|trans({}, 'elements') }}
111 111
       </a>
112 112
       

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

@@ -46,7 +46,7 @@
46 46
   {% if more_count is defined %} 
47 47
   {% if elements|length %}
48 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 50
          {{ 'more'|trans({}, 'userui') }}
51 51
        </a>
52 52
      </span>

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

@@ -444,6 +444,7 @@ li.element a.favorite_link
444 444
 li.element a.element_open
445 445
 {
446 446
   font-weight: bold;
447
+  margin-top: 7px;
447 448
 }
448 449
 
449 450
 li.element div.element_embed
@@ -480,6 +481,12 @@ li.element img.element_thumbnail
480 481
   color: black;
481 482
 }
482 483
 
484
+li.element img.play, li.element img.open
485
+{
486
+  position: absolute;
487
+  
488
+}
489
+
483 490
 ul.elements
484 491
 {
485 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,6 +203,8 @@ $(document).ready(function(){
203 203
   });
204 204
 
205 205
   // Affichage un/des embed
206
+  // 1328283150_media-playback-start.png
207
+  // 1328283201_emblem-symbolic-link.png
206 208
   $('a.element_embed_open_link').live("click", function(){
207 209
     
208 210
      li = $(this).parent('td').parent('tr').parent().parent().parent('li.element');
@@ -236,6 +238,39 @@ $(document).ready(function(){
236 238
      
237 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 275
   // Mise en favoris
241 276
   $('a.favorite_link').live("click", function(){
@@ -721,6 +756,6 @@ $(document).ready(function(){
721 756
   // Check périodique 
722 757
   // TODO.
723 758
 
724
-
759
+ 
725 760
    
726 761
  });