- LSlang : Compatibilité sans-JS
authorBenjamin Renard <brenard@easter-eggs.com>
Thu, 19 Mar 2009 20:43:44 +0000 (20:43 +0000)
committerBenjamin Renard <brenard@easter-eggs.com>
Thu, 19 Mar 2009 20:43:44 +0000 (20:43 +0000)
trunk/includes/js/LSdefault.js
trunk/templates/default/login.tpl
trunk/templates/default/top.tpl

index fc93997..8c206dd 100644 (file)
@@ -85,6 +85,9 @@ var LSdefault = new Class({
           this.LSlang_select.getElements('img').each(function(img) {
             img.addEvent('click',this.onSelectLSlangImgClick.bind(this,img));
           },this);
+          document.getElements('.LSlang_hidden').each(function(el) {
+            el.dispose();
+          },this);
         }
       }
     },
index 4fc13ee..3024a21 100644 (file)
   <dd><input type='text' name='LSsession_user' /></dd>
   <dt>{$loginform_label_pwd}</dt>
   <dd><input type='password' name='LSsession_pwd' /></dd>
+  <dt class='LSlang_hidden'>{$lang_label}</dt>
+  <dd class='LSlang_hidden'>
+  <select name='lang'>
+  {foreach from=$LSlanguages item=lang}
+    <option value='{$lang}'>{$lang}</option>
+  {/foreach}
+  </select>
+  </dd>
   <dd><input type='submit' value='{$loginform_label_submit}' /></dd>
 </dl>
 </form>
index 1865160..034134c 100644 (file)
     </td>
     <td id='status'>
     <span>{$lang_label} : <img id='LSlang' src='{$LS_IMAGES_DIR}/{$LSlang}.png' alt='{$LSlang}' title='{$LSlang}'/></span>
+    <form action='' methode='post' style='display: inline' class='LSlang_hidden'/>
+      <select name='lang'>
+      {foreach from=$LSlanguages item=lang}
+        <option value='{$lang}'>{$lang}</option>
+      {/foreach}
+      </select>
+      <input type='submit' value='->'/>
+    </form>
     {$connected_as} <span id='user_name'>{$LSsession_username}</span> <a href='index.php?LSsession_logout'><img src='{$LS_IMAGES_DIR}/logout.png' alt='Logout' title='Logout' /></a>
     </td>
   </tr>