Also no longer restricts apps to those with a mobile view, as discussed in Boston.
($initial_app != 'horde') &&
$registry->hasPermission($initial_app)) {
$main_page = Horde::url($initial_app, true);
+ } else if ($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.php or login.php, since that would lead to inifinite
$main_page = Horde::url($registry->applications['horde']['initial_page'], true);
} else {
/* Finally, fallback to the portal page. */
- $main_page = $browser->isMobile()
- ? Horde::url('services/portal/mobile.php', true)
- : Horde::url('services/portal/', true);
+ $main_page = Horde::url('services/portal/', true);
}
}
}
$links = array();
foreach ($registry->listApps() as $app) {
- if ($registry->hasMobileView($app)) {
- $links[htmlspecialchars($registry->get('name', $app))] = Horde::url('/', false, array('app' => $app));
+ if ($app != 'horde') {
+ $links[htmlspecialchars($registry->get('name', $app))] = Horde::url('', true, array('app' => $app));
}
}
$title = _("Welcome");
-require HORDE_TEMPLATES . '/common-header.inc';
+require HORDE_TEMPLATES . '/common-header-mobile.inc';
require HORDE_TEMPLATES . '/portal/mobile.inc';
-require HORDE_TEMPLATES . '/common-footer.inc';
+require HORDE_TEMPLATES . '/common-footer-mobile.inc';
--- /dev/null
+</body>
+</html>
\ No newline at end of file
--- /dev/null
+<!DOCTYPE html>
+<html>
+ <head>
+<?php
+$page_title = $GLOBALS['registry']->get('name');
+if (!empty($title)) {
+ $page_title .= ' :: ' . $title;
+}?>
+ <title><?php echo htmlspecialchars($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>
\ No newline at end of file
-<p><?php echo sprintf(_("Welcome, %s"), $fullname) ?></p>
-
-<ul>
-<?php foreach ($links as $key => $val): ?>
- <li><a href="<?php echo $val ?>"><?php echo $key ?></a></li>
-<?php endforeach; ?>
-</ul>
+<div data-role="page">
+ <div data-role="header">
+ <?php echo sprintf(_("Welcome, %s"), $fullname) ?>
+ </div>
+ <div data-role="content" class="ui-body"">
+ <ul data-role="listview" data-theme="a">
+ <?php foreach ($links as $key => $val): ?>
+ <li class="extlink"><?php echo $val->link(array('rel' => 'external'))?><?php echo $key ?></a></li>
+ <?php endforeach; ?>
+ </ul>
+ </div>
+ <div data-role="footer"></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;
+});
+</script>
\ No newline at end of file