Sfoglia il codice sorgente

reajustement javascript pour compatibilité IE.

Sevajol Bastien 12 anni fa
parent
commit
964a2eb174

+ 4 - 1
src/Muzich/CoreBundle/Resources/public/js/TagPrompt.js Vedi File

@@ -280,7 +280,10 @@ function TagPromptConnector(input, output, proposition_list, tag_box, prompt_loa
280 280
     if ($(this).val().length > 0)
281 281
     {
282 282
       showPromptLoader();
283
-      setTimeout(launchSearchTagsIdLastKeystroke, 1000, [_input.val()]);
283
+      var input_value = _input.val();
284
+      window.setTimeout(function(){
285
+        launchSearchTagsIdLastKeystroke(input_value);
286
+      }, 1000);
284 287
     }
285 288
   });
286 289
   

+ 3 - 1
src/Muzich/CoreBundle/Resources/public/js/autoplay.js Vedi File

@@ -34,7 +34,9 @@ function Autoplay()
34 34
       {
35 35
         _current_index = index_to_play;
36 36
         $('#autoplay_element_loader').show();
37
-        setTimeout(window.autoplay.play, 1000, index_to_play, true);
37
+        window.setTimeout(function(){
38
+          window.autoplay.play(index_to_play, true);
39
+        });
38 40
       }
39 41
       else if (_current_index == index_to_play)
40 42
       {

+ 29 - 0
src/Muzich/CoreBundle/Resources/public/js/muzich.js Vedi File

@@ -2491,6 +2491,35 @@ $(document).ready(function(){
2491 2491
   /* Languages placement */
2492 2492
   var selected_language = $('div#languages a.selected');
2493 2493
   $('div#languages').prepend(selected_language);
2494
+  
2495
+  /* Compatibilité placeholder (IE again ...) */
2496
+  if ($.browser.msie)
2497
+  {
2498
+    if ($.browser.version < 10)
2499
+    {
2500
+      $('[placeholder]').focus(function() {
2501
+          var input = $(this);
2502
+          if (input.val() == input.attr('placeholder')) {
2503
+            input.val('');
2504
+            input.removeClass('placeholder');
2505
+          }
2506
+       }).blur(function() {
2507
+          var input = $(this);
2508
+          if (input.val() == '' || input.val() == input.attr('placeholder')) {
2509
+            input.addClass('placeholder');
2510
+            input.val(input.attr('placeholder'));
2511
+          }
2512
+       }).blur().parents('form').submit(function() {
2513
+          $(this).find('[placeholder]').each(function() {
2514
+            var input = $(this);
2515
+            if (input.val() == input.attr('placeholder')) {
2516
+                input.val('');
2517
+            }
2518
+          })
2519
+      });
2520
+    }
2521
+  }
2522
+  
2494 2523
 });
2495 2524
 
2496 2525
 

+ 3 - 9
src/Muzich/CoreBundle/Resources/views/Layout/header.html.twig Vedi File

@@ -1,12 +1,6 @@
1
-<hgroup>
2
-  {% include "MuzichCoreBundle:Language:languages.html.twig" %}
1
+<div id="hgroup">
3 2
   
4
-  <!--<ul id="parameters"><li>
5
-      <a href="">
6
-        <img src="{{ asset('img/header_icon_params.png') }}" alt="parameters" />
7
-      </a>
8
-    </li>
9
-  </ul>-->
3
+  {% include "MuzichCoreBundle:Language:languages.html.twig" %}
10 4
   
11 5
   <a id="header_logo" href="{{ path('index') }}" title="">
12 6
     <img src="{{ asset('img/header_logo.png') }}" alt="logo" />
@@ -18,4 +12,4 @@
18 12
     {% include 'MuzichCoreBundle:Menu:main_menu.html.twig' %}
19 13
   {% endif %}
20 14
   
21
-</hgroup>
15
+</div>

+ 1 - 10
src/Muzich/CoreBundle/Resources/views/Menu/access.html.twig Vedi File

@@ -1,15 +1,6 @@
1 1
 <ul id="register_and_login">
2 2
   {% if not app.user %}
3
-    <!--<li>
4
-      <a href="" class="left">
5
-        Devenir membre
6
-      </a>
7
-    </li>
8
-    <li>
9
-      <a href="" class="right">
10
-        Connexion
11
-      </a>
12
-    </li>-->
3
+    
13 4
   {% else %}
14 5
     <li>
15 6
       <a href="{{ path('my_account') }}" class="left">

+ 2 - 2
src/Muzich/CoreBundle/Resources/views/layout.html.twig Vedi File

@@ -15,9 +15,9 @@
15 15
   
16 16
     <div id="main_content">
17 17
       
18
-      <header id="header">
18
+      <div id="header">
19 19
         {% include 'MuzichCoreBundle:Layout:header.html.twig' %}
20
-      </header>
20
+      </div>
21 21
       
22 22
       {% include 'MuzichCoreBundle:Layout:flash_messages.html.twig' %}
23 23
       

+ 1 - 1
web/app_dev.php Vedi File

@@ -5,7 +5,7 @@
5 5
 if (!in_array(@$_SERVER['REMOTE_ADDR'], array(
6 6
     '127.0.0.1',
7 7
     '::1',
8
-))) {
8
+))&&false) {
9 9
     header('HTTP/1.0 403 Forbidden');
10 10
     //exit('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.');
11 11
 }

+ 5 - 3
web/css/main.css Vedi File

@@ -31,7 +31,7 @@ div#container
31 31
   min-height: 100%;
32 32
 }
33 33
 
34
-header#header
34
+div#header
35 35
 {
36 36
   height: 80px;
37 37
   background-image: url("/img/header_background.png");
@@ -39,7 +39,7 @@ header#header
39 39
   border-bottom: 3px solid #e51936;
40 40
 }
41 41
 
42
-header#header hgroup
42
+div#header div#hgroup
43 43
 {
44 44
   width: 980px;
45 45
   margin-left: auto;
@@ -1640,4 +1640,6 @@ div.display_more_elements
1640 1640
 div.element_embed div.jp-playlist ul
1641 1641
 {
1642 1642
   text-align: left;
1643
-}
1643
+}
1644
+
1645
+.placeholder { color:#999; }