Style
authorJan Schneider <jan@horde.org>
Fri, 12 Nov 2010 14:38:26 +0000 (15:38 +0100)
committerJan Schneider <jan@horde.org>
Fri, 12 Nov 2010 14:38:26 +0000 (15:38 +0100)
horde/index.php
horde/templates/login/mobile.inc
horde/templates/portal/mobile.inc

index b498b45..ee798a9 100644 (file)
@@ -61,7 +61,7 @@ if ($main_page) {
             ($initial_app != 'horde') &&
             $registry->hasPermission($initial_app)) {
             $main_page = Horde::url($initial_app, true);
-        } else if ($browser->isMobile()) {
+        } elseif ($browser->isMobile()) {
             $main_page = Horde::url('services/portal/mobile.php', true);
         } else {
             /* Next, try the initial horde page if it is something other than
index fa23d03..4e90ba3 100644 (file)
@@ -1,10 +1,10 @@
 <!DOCTYPE html>
 <html>
-    <head>
-    <title><?php echo $title ?></title>
-    <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a1/jquery.mobile-1.0a1.min.css">
-    <script src="http://code.jquery.com/jquery-1.4.3.min.js"></script>
-    <script src="http://code.jquery.com/mobile/1.0a1/jquery.mobile-1.0a1.min.js"></script>
+<head>
+  <title><?php echo $title ?></title>
+  <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a1/jquery.mobile-1.0a1.min.css">
+  <script src="http://code.jquery.com/jquery-1.4.3.min.js"></script>
+  <script src="http://code.jquery.com/mobile/1.0a1/jquery.mobile-1.0a1.min.js"></script>
 </head>
 <body>
 
 <div data-role="content">
 
 <form action="login.php" method="post">
- <input type="hidden" name="anchor_string" value="<?php echo htmlspecialchars(strval($vars->anchor_string)) ?>">
- <input type="hidden" name="app" value="<?php echo htmlspecialchars($vars->app) ?>">
- <input type="hidden" name="url" value="<?php echo htmlspecialchars($vars->url) ?>">
 <input type="hidden" name="anchor_string" value="<?php echo htmlspecialchars(strval($vars->anchor_string)) ?>">
 <input type="hidden" name="app" value="<?php echo htmlspecialchars($vars->app) ?>">
 <input type="hidden" name="url" value="<?php echo htmlspecialchars($vars->url) ?>">
 
+  <fieldset>
 <?php
 foreach ($loginparams as $key => $val) {
-    if ($key == 'imp_select_view' || $key == 'new_lang') { continue; }
+    if ($key == 'imp_select_view' || $key == 'new_lang') {
+        continue;
+    }
     switch ($val['type']) {
     case 'hidden':
         echo '<input type="hidden" name="' . $key . '" value="' . (isset($val['value']) ? $val['value'] : '') . '">';
@@ -45,16 +48,16 @@ foreach ($loginparams as $key => $val) {
     }
 }
 ?>
-<div data-role="fieldcontain">
- <input type="submit" data-theme="a" name="login_button" value="<?php echo htmlspecialchars($title) ?>">
-</div>
+  </fieldset>
+
+  <fieldset data-role="controlgroup">
+    <input type="submit" data-theme="a" name="login_button" value="<?php echo htmlspecialchars($title) ?>">
+  </fieldset>
 
 </form>
 
 </div>
 
-<div data-role="footer"></div>
-
 </div>
 
 </body>
index b48bca8..799d725 100644 (file)
@@ -1,20 +1,20 @@
 <div data-role="page">
-    <div data-role="header">
-     <h1><?php echo sprintf(_("Welcome, %s"), $fullname) ?></h1>
-    </div>
-    <div data-role="content" class="ui-body"">
-        <ul data-role="listview" data-theme="a">
-        <?php foreach ($links as $key => $val): ?>
-         <li class="extlink"><img class="ui-li-icon" src="<?php echo $val[1]?>"><?php echo $val[0]->link(array('rel' => 'external'))?><?php echo $key ?></a></li>
-        <?php endforeach; ?>
-        </ul>
-    </div>
-    <div data-role="footer"></div>
+  <div data-role="header">
+    <h1><?php echo sprintf(_("Welcome, %s"), $fullname) ?></h1>
+  </div>
+  <div data-role="content">
+    <ul data-role="listview">
+      <?php foreach ($links as $key => $val): ?>
+      <li class="extlink"><img class="ui-li-icon" src="<?php echo $val[1] ?>"><?php echo $val[0]->link(array('rel' => 'external')) ?><?php echo $key ?></a></li>
+      <?php endforeach; ?>
+    </ul>
+  </div>
 </div>
 <script type="text/javascript">
-// workaround for listview items not being clickable for links with rel="external"
-$("li.extlink").click(function(){
-     window.location=$(this).find("a").attr("href");
-     return false;
+// workaround for listview items not being clickable for links with
+// rel="external"
+$('li.extlink').click(function() {
+  window.location = $(this).find('a').attr('href');
+  return false;
 });
-</script>
\ No newline at end of file
+</script>