From: Michael J. Rubinsky Date: Fri, 5 Nov 2010 04:11:42 +0000 (-0400) Subject: Initial stab at a jquery-mobile enabled mobile portal page. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=d6ec1c0c91b68d8495c1acd9ee47dcaff7852009;p=horde.git Initial stab at a jquery-mobile enabled mobile portal page. Also no longer restricts apps to those with a mobile view, as discussed in Boston. --- diff --git a/horde/index.php b/horde/index.php index ad8d36523..b498b4585 100644 --- a/horde/index.php +++ b/horde/index.php @@ -61,6 +61,8 @@ if ($main_page) { ($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 @@ -70,9 +72,7 @@ if ($main_page) { $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); } } } diff --git a/horde/services/portal/mobile.php b/horde/services/portal/mobile.php index 0b85f6747..b407d257d 100644 --- a/horde/services/portal/mobile.php +++ b/horde/services/portal/mobile.php @@ -21,13 +21,13 @@ if (empty($fullname)) { $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'; diff --git a/horde/templates/common-footer-mobile.inc b/horde/templates/common-footer-mobile.inc new file mode 100644 index 000000000..691287b6e --- /dev/null +++ b/horde/templates/common-footer-mobile.inc @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/horde/templates/common-header-mobile.inc b/horde/templates/common-header-mobile.inc new file mode 100644 index 000000000..c69f7763e --- /dev/null +++ b/horde/templates/common-header-mobile.inc @@ -0,0 +1,12 @@ + + + +get('name'); +if (!empty($title)) { + $page_title .= ' :: ' . $title; +}?> + <?php echo htmlspecialchars($title) ?> + + + \ No newline at end of file diff --git a/horde/templates/portal/mobile.inc b/horde/templates/portal/mobile.inc index ba61a096f..20cf8053f 100644 --- a/horde/templates/portal/mobile.inc +++ b/horde/templates/portal/mobile.inc @@ -1,7 +1,20 @@ -

- - +
+
+ +
+
+
    + $val): ?> + + +
+
+
+
+ \ No newline at end of file