From: Michael J. Rubinsky Date: Tue, 16 Nov 2010 06:07:37 +0000 (-0500) Subject: Clean up mobile controller script, move html to templates X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=13dc484e5a6de06fc9fe878681147d2dad302704;p=horde.git Clean up mobile controller script, move html to templates --- diff --git a/kronolith/mobile.php b/kronolith/mobile.php index 328db7097..97390e94e 100644 --- a/kronolith/mobile.php +++ b/kronolith/mobile.php @@ -8,112 +8,25 @@ * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html. * * @author Michael J. Rubinsky - * @pacakge Kronolith + * @category Horde + * @license http://www.fsf.org/copyleft/gpl.html GPL + * @package Kronolith */ require_once dirname(__FILE__) . '/lib/Application.php'; Horde_Registry::appInit('kronolith'); -//@TODO: Will eventually need a separate Horde::includeScriptFiles for mobile -// apps to avoid outputing all the prototype dependent stuff. -// -//Horde::addScriptFile('http://code.jquery.com/jquery-1.4.3.min.js', 'horde', array('external' => true)); -//Horde::addScriptFile('http://code.jquery.com/mobile/1.0a1/jquery.mobile-1.0a1.min.js', 'horde', array('external' => true)); - -// Probably want to use a customized Kronolith::header() method as well instead -// of including a common-header-mobile file. - $title = _("My Calendar"); -require $registry->get('templates', 'horde') . '/common-header-mobile.inc'; -$today = new Horde_Date($_SERVER['REQUEST_TIME']); -?> - - - - - - - - - -
-
-

My Calendar:Day

- - -
-
-
-
-
- -
-
-
- - -
-

Event

-
-
-
- -
-

My Calendar: Overview

-
-
-
- -
-
-
+$view = new Horde_View(array('templatePath' => KRONOLITH_TEMPLATES . '/mobile')); +$view->today = new Horde_Date($_SERVER['REQUEST_TIME']); +$view->registry = $registry; +$view->portal = Horde::getServiceLink('portal', 'horde')->setRaw(false); +$view->logout = Horde::getServiceLink('logout')->setRaw(false); - -
-
-

Month

- - -
-
-
- - - - - - getValue('week_start_monday'), $c = $i + 7; $i < $c; $i++): ?> - - - - - - -
- ">< - ">> - format('F Y') ?> -
test
-
- -
-
-
- -
-
-
- -get('templates', 'horde') . '/common-footer-mobile.inc'; +require $registry->get('templates', 'horde') . '/common-header-mobile.inc'; +echo $view->render('head'); +echo $view->render('day'); +echo $view->render('event'); +echo $view->render('month'); +echo $view->render('summary'); +$registry->get('templates', 'horde') . '/common-footer-mobile.inc'; diff --git a/kronolith/templates/mobile/day.html.php b/kronolith/templates/mobile/day.html.php new file mode 100644 index 000000000..f8f280002 --- /dev/null +++ b/kronolith/templates/mobile/day.html.php @@ -0,0 +1,21 @@ +
+
+

+ + +
+ + +
+
+
+
+
+ +
+
+
\ No newline at end of file diff --git a/kronolith/templates/mobile/event.html.php b/kronolith/templates/mobile/event.html.php new file mode 100644 index 000000000..898367359 --- /dev/null +++ b/kronolith/templates/mobile/event.html.php @@ -0,0 +1,5 @@ +
+

+
+
+
\ No newline at end of file diff --git a/kronolith/templates/mobile/head.html.php b/kronolith/templates/mobile/head.html.php new file mode 100644 index 000000000..6671e123f --- /dev/null +++ b/kronolith/templates/mobile/head.html.php @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/kronolith/templates/mobile/month.html.php b/kronolith/templates/mobile/month.html.php new file mode 100644 index 000000000..41fd5d065 --- /dev/null +++ b/kronolith/templates/mobile/month.html.php @@ -0,0 +1,36 @@ + +
+
+

Month

+ + +
+
+
+ + + + + getValue('week_start_monday'), $c = $i + 7; $i < $c; $i++): ?> + + + + + +
+ ">< + ">> + today->format('F Y') ?> +
+
+
+
+
+
    +
  • +
  • +
  • +
+
+
+
\ No newline at end of file diff --git a/kronolith/templates/mobile/summary.html.php b/kronolith/templates/mobile/summary.html.php new file mode 100644 index 000000000..f75424811 --- /dev/null +++ b/kronolith/templates/mobile/summary.html.php @@ -0,0 +1,13 @@ +
+

+
+
+
+
    +
  • +
  • +
  • +
+
+
+
\ No newline at end of file