Browse Source

reajustement javascript pour compatibilité IE.

Sevajol Bastien 12 years ago
parent
commit
964a2eb174

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

280
     if ($(this).val().length > 0)
280
     if ($(this).val().length > 0)
281
     {
281
     {
282
       showPromptLoader();
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 View File

34
       {
34
       {
35
         _current_index = index_to_play;
35
         _current_index = index_to_play;
36
         $('#autoplay_element_loader').show();
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
       else if (_current_index == index_to_play)
41
       else if (_current_index == index_to_play)
40
       {
42
       {

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

2491
   /* Languages placement */
2491
   /* Languages placement */
2492
   var selected_language = $('div#languages a.selected');
2492
   var selected_language = $('div#languages a.selected');
2493
   $('div#languages').prepend(selected_language);
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 View File

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
   <a id="header_logo" href="{{ path('index') }}" title="">
5
   <a id="header_logo" href="{{ path('index') }}" title="">
12
     <img src="{{ asset('img/header_logo.png') }}" alt="logo" />
6
     <img src="{{ asset('img/header_logo.png') }}" alt="logo" />
18
     {% include 'MuzichCoreBundle:Menu:main_menu.html.twig' %}
12
     {% include 'MuzichCoreBundle:Menu:main_menu.html.twig' %}
19
   {% endif %}
13
   {% endif %}
20
   
14
   
21
-</hgroup>
15
+</div>

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

1
 <ul id="register_and_login">
1
 <ul id="register_and_login">
2
   {% if not app.user %}
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
   {% else %}
4
   {% else %}
14
     <li>
5
     <li>
15
       <a href="{{ path('my_account') }}" class="left">
6
       <a href="{{ path('my_account') }}" class="left">

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

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

+ 1 - 1
web/app_dev.php View File

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

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

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