[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [10803] prepare for mobilefrontend
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [10803] prepare for mobilefrontend |
Date: |
Wed, 13 Feb 2013 13:16:42 +0000 |
Revision: 10803
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=10803
Author: sigurdne
Date: 2013-02-13 13:16:42 +0000 (Wed, 13 Feb 2013)
Log Message:
-----------
prepare for mobilefrontend
Added Paths:
-----------
trunk/mobilefrontend/
trunk/mobilefrontend/inc/
trunk/mobilefrontend/inc/class.uicontrol.inc.php
trunk/mobilefrontend/inc/class.uifront.inc.php
trunk/mobilefrontend/index.php
trunk/mobilefrontend/setup/
trunk/mobilefrontend/setup/default/
trunk/mobilefrontend/setup/default/README
trunk/mobilefrontend/setup/default/phpgw_no.lang_example
trunk/mobilefrontend/setup/default_records.inc.php
trunk/mobilefrontend/setup/phpgw_en.lang
trunk/mobilefrontend/setup/phpgw_no.lang
trunk/mobilefrontend/setup/setup.inc.php
trunk/mobilefrontend/setup/tables_current.inc.php
trunk/mobilefrontend/setup/tables_update.inc.php
trunk/mobilefrontend/templates/
trunk/mobilefrontend/templates/base/
trunk/mobilefrontend/templates/base/app_data.xsl
trunk/mobilefrontend/templates/mobilefrontend/
trunk/mobilefrontend/templates/mobilefrontend/app_data.xsl
trunk/mobilefrontend/templates/mobilefrontend/hello_world.xsl
trunk/phpgwapi/templates/mobilefrontend/
trunk/phpgwapi/templates/mobilefrontend/css/
trunk/phpgwapi/templates/mobilefrontend/css/frontend.css
trunk/phpgwapi/templates/mobilefrontend/footer.tpl
trunk/phpgwapi/templates/mobilefrontend/head.inc.php
trunk/phpgwapi/templates/mobilefrontend/head.tpl
trunk/phpgwapi/templates/mobilefrontend/images/
trunk/phpgwapi/templates/mobilefrontend/images/bergen_logo.png
trunk/phpgwapi/templates/mobilefrontend/images/header_bg.png
trunk/phpgwapi/templates/mobilefrontend/images/header_fg.png
trunk/phpgwapi/templates/mobilefrontend/images/info.png
trunk/phpgwapi/templates/mobilefrontend/images/newlayout/
trunk/phpgwapi/templates/mobilefrontend/images/newlayout/aktivby_logo.jpg
trunk/phpgwapi/templates/mobilefrontend/images/newlayout/bodyBg.gif
trunk/phpgwapi/templates/mobilefrontend/images/newlayout/footerFjell_inkl_bunnlinje.gif
trunk/phpgwapi/templates/mobilefrontend/images/newlayout/forsidebilde.jpg
trunk/phpgwapi/templates/mobilefrontend/images/newlayout/logo.png
trunk/phpgwapi/templates/mobilefrontend/images/newlayout/pageContainerBg.gif
trunk/phpgwapi/templates/mobilefrontend/js/
trunk/phpgwapi/templates/mobilefrontend/navbar.inc.php
trunk/phpgwapi/templates/mobilefrontend/navbar.tpl
Added: trunk/mobilefrontend/inc/class.uicontrol.inc.php
===================================================================
--- trunk/mobilefrontend/inc/class.uicontrol.inc.php
(rev 0)
+++ trunk/mobilefrontend/inc/class.uicontrol.inc.php 2013-02-13 13:16:42 UTC
(rev 10803)
@@ -0,0 +1,50 @@
+<?php
+ /**
+ * phpGroupWare - controller: a part of a Facilities Management System.
+ *
+ * @author Erink Holm-Larsen <address@hidden>
+ * @author Torstein Vadla <address@hidden>
+ * @copyright Copyright (C) 2011,2012 Free Software Foundation, Inc.
http://www.fsf.org/
+ * This file is part of phpGroupWare.
+ *
+ * phpGroupWare is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * phpGroupWare is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with phpGroupWare; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
USA
+ *
+ * @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
+ * @internal Development of this application was funded by
http://www.bergen.kommune.no/
+ * @package property
+ * @subpackage controller
+ * @version $Id: class.uicontrol.inc.php 10717 2013-01-28 10:45:53Z
vator $
+ */
+
+
+ phpgw::import_class('controller.uicontrol');
+
+ class mobilefrontend_uicontrol extends controller_uicontrol
+ {
+ public $public_functions = array
+ (
+ 'view_control_details' => true,
+ );
+
+ public function __construct()
+ {
+ parent::__construct();
+ }
+
+ public function view_control_details($control = null)
+ {
+ parent::view_control_details($control);
+ }
+ }
Added: trunk/mobilefrontend/inc/class.uifront.inc.php
===================================================================
--- trunk/mobilefrontend/inc/class.uifront.inc.php
(rev 0)
+++ trunk/mobilefrontend/inc/class.uifront.inc.php 2013-02-13 13:16:42 UTC
(rev 10803)
@@ -0,0 +1,64 @@
+<?php
+
+ /**
+ * phpGroupWare - mobilefrontend.
+ *
+ * @author Sigurd Nes <address@hidden>
+ * @copyright Copyright (C) 2013 Free Software Foundation, Inc.
http://www.fsf.org/
+ * This file is part of phpGroupWare.
+ *
+ * phpGroupWare is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * phpGroupWare is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with phpGroupWare; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
02110-1301 USA
+ *
+ * @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
+ * @internal Development of this application was funded by
http://www.bergen.kommune.no/
+ * @package mobilefrontend
+ * @version $Id: class.uiproject.inc.php 10464 2012-11-05 07:46:42Z
vator $
+ */
+ phpgw::import_class('phpgwapi.uicommon');
+// phpgw::import_class('phpgwapi.jquery');
+
+ class mobilefrontend_uifront extends phpgwapi_uicommon
+ {
+ public $public_functions = array
+ (
+ 'index' => true,
+ );
+
+ public function __construct()
+ {
+ parent::__construct();
+ }
+
+ /**
+ * Entry function for this class
+ *
+ * @return void
+ */
+ public function index()
+ {
+ $data = array
+ (
+ 'message' => 'Hello World'
+ );
+ self::render_template_xsl('hello_world', $data);
+ }
+
+ public function query()
+ {
+
+ }
+
+ }
+
Added: trunk/mobilefrontend/index.php
===================================================================
--- trunk/mobilefrontend/index.php (rev 0)
+++ trunk/mobilefrontend/index.php 2013-02-13 13:16:42 UTC (rev 10803)
@@ -0,0 +1,220 @@
+<?php
+ /**
+ * phpGroupWare - property: a Facilities Management System.
+ *
+ * @author Jonas Borgström address@hidden
+ * @author Sigurd Nes <address@hidden>
+ * @copyright Copyright (C) 2009 Free Software Foundation, Inc.
http://www.fsf.org/
+ * This file is part of phpGroupWare.
+ *
+ * phpGroupWare is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * phpGroupWare is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with phpGroupWare; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
USA
+ *
+ * @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
+ * @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
+ * @package property
+ * @version $Id: index.php 4415 2009-12-24 20:17:37Z sigurd $
+ */
+
+ /**
+ * Start page
+ *
+ * This script will check if there is defined a startpage in the users
+ * preferences - and then forward the user to this page
+ */
+
+ $GLOBALS['phpgw_info']['flags'] = array
+ (
+ 'noheader' => true,
+ 'nonavbar' => true,
+ 'currentapp' => 'login', // To stop functions.inc.php from
validating the session
+ );
+ $GLOBALS['phpgw_info']['flags']['session_name'] =
'mobilefrontendsession';
+ $GLOBALS['phpgw_remote_user_fallback'] = 'sql';
+
+ include_once('../header.inc.php');
+
+ $GLOBALS['phpgw_info']['server']['template_set'] = 'mobilefrontend';
+
+ // Make sure we're always logged in
+ if (!phpgw::get_var(session_name()) ||
!$GLOBALS['phpgw']->session->verify())
+ {
+ $login = "bookingguest";
+ $passwd = "bkbooking";
+ $_POST['submitit'] = "";
+
+ $GLOBALS['sessionid'] =
$GLOBALS['phpgw']->session->create($login, $passwd);
+ if(!$GLOBALS['sessionid'])
+ {
+ $lang_denied = lang('Anonymous access not correctly
configured');
+ if($GLOBALS['phpgw']->session->reason)
+ {
+ $lang_denied =
$GLOBALS['phpgw']->session->reason;
+ }
+ echo <<<HTML
+ <div class="error">$lang_denied</div>
+HTML;
+ $GLOBALS['phpgw']->common->phpgw_exit(True);
+ }
+ }
+ $GLOBALS['phpgw_info']['flags']['currentapp'] = 'mobilefrontend';
+
+/////////////////////////////////////////////////////////////////////////////
+// BEGIN Stuff copied from functions.inc.php
+/////////////////////////////////////////////////////////////////////////////
+
+
if(isset($GLOBALS['phpgw_info']['user']['preferences']['common']['lang']) &&
$GLOBALS['phpgw_info']['user']['preferences']['common']['lang'] !='en')
+ {
+
$GLOBALS['phpgw']->translation->set_userlang($GLOBALS['phpgw_info']['user']['preferences']['common']['lang'],
true);
+ }
+
+ /* A few hacker resistant constants that will be used throught
the program */
+ define('PHPGW_TEMPLATE_DIR',
ExecMethod('phpgwapi.phpgw.common.get_tpl_dir', 'phpgwapi'));
+ define('PHPGW_IMAGES_DIR',
ExecMethod('phpgwapi.phpgw.common.get_image_path', 'phpgwapi'));
+ define('PHPGW_IMAGES_FILEDIR',
ExecMethod('phpgwapi.phpgw.common.get_image_dir', 'phpgwapi'));
+ define('PHPGW_APP_ROOT',
ExecMethod('phpgwapi.phpgw.common.get_app_dir'));
+ define('PHPGW_APP_INC',
ExecMethod('phpgwapi.phpgw.common.get_inc_dir'));
+ define('PHPGW_APP_TPL',
ExecMethod('phpgwapi.phpgw.common.get_tpl_dir'));
+ define('PHPGW_IMAGES',
ExecMethod('phpgwapi.phpgw.common.get_image_path'));
+ define('PHPGW_APP_IMAGES_DIR',
ExecMethod('phpgwapi.phpgw.common.get_image_dir'));
+
+
/************************************************************************\
+ * Load the menuaction
*
+
\************************************************************************/
+ $GLOBALS['phpgw_info']['menuaction'] =
phpgw::get_var('menuaction');
+ if(!$GLOBALS['phpgw_info']['menuaction'])
+ {
+ unset($GLOBALS['phpgw_info']['menuaction']);
+ }
+
+ /********* This sets the user variables *********/
+ $GLOBALS['phpgw_info']['user']['private_dir'] =
$GLOBALS['phpgw_info']['server']['files_dir']
+ . '/users/'.$GLOBALS['phpgw_info']['user']['userid'];
+
+ /* This will make sure that a user has the basic default prefs.
If not it will add them */
+ $GLOBALS['phpgw']->preferences->verify_basic_settings();
+
+ /********* Optional classes, which can be disabled for
performance increases *********/
+ while ($phpgw_class_name =
each($GLOBALS['phpgw_info']['flags']))
+ {
+ if (ereg('enable_', $phpgw_class_name[0]))
+ {
+ $enable_class = str_replace('enable_', '',
$phpgw_class_name[0]);
+ $enable_class = str_replace('_class', '',
$enable_class);
+ $GLOBALS['phpgw']->$enable_class =
createObject("phpgwapi.{$enable_class}");
+ }
+ }
+ unset($enable_class);
+ reset($GLOBALS['phpgw_info']['flags']);
+
+
/*************************************************************************\
+ * These lines load up the templates class
*
+
\*************************************************************************/
+ if (
!isset($GLOBALS['phpgw_info']['flags']['disable_Template_class'])
+ ||
!$GLOBALS['phpgw_info']['flags']['disable_Template_class'] )
+ {
+ $GLOBALS['phpgw']->template =
createObject('phpgwapi.Template',PHPGW_APP_TPL);
+ $GLOBALS['phpgw']->xslttpl =
createObject('phpgwapi.xslttemplates',PHPGW_APP_TPL);
+ }
+
+
/*************************************************************************\
+ * Verify that the users session is still active otherwise kick
them out *
+
\*************************************************************************/
+ if ($GLOBALS['phpgw_info']['flags']['currentapp'] != 'home' &&
$GLOBALS['phpgw_info']['flags']['currentapp'] != 'about')
+ {
+ if (!$GLOBALS['phpgw']->acl->check('run',
PHPGW_ACL_READ, $GLOBALS['phpgw_info']['flags']['currentapp']))
+ {
+ $GLOBALS['phpgw']->common->phpgw_header(true);
+
$GLOBALS['phpgw']->log->write(array('text'=>'W-Permissions, Attempted to access
%1','p1'=>$GLOBALS['phpgw_info']['flags']['currentapp']));
+
+ $lang_denied = lang('Access not permitted');
+ echo <<<HTML
+ <div class="error">$lang_denied</div>
+
+HTML;
+ $GLOBALS['phpgw']->common->phpgw_exit(True);
+ }
+ }
+
+ // Already called from sessions::verify
+ // $GLOBALS['phpgw']->applications->read_installed_apps(); // to
get translated app-titles
+
+
/*************************************************************************\
+ * Load the header unless the developer turns it off
*
+
\*************************************************************************/
+ if ( !isset($GLOBALS['phpgw_info']['flags']['noheader']) ||
!$GLOBALS['phpgw_info']['flags']['noheader'] )
+ {
+ $inc_navbar =
!isset($GLOBALS['phpgw_info']['flags']['nonavbar']) ||
!$GLOBALS['phpgw_info']['flags']['nonavbar'];
+ $GLOBALS['phpgw']->common->phpgw_header($inc_navbar);
+ unset($inc_navbar);
+ }
+
+
/*************************************************************************\
+ * Load the app include files if the exists
*
+
\*************************************************************************/
+ /* Then the include file */
+ if (! preg_match ("/phpgwapi/i", PHPGW_APP_INC) &&
file_exists(PHPGW_APP_INC . '/functions.inc.php') &&
!isset($GLOBALS['phpgw_info']['menuaction']))
+ {
+ include_once(PHPGW_APP_INC . '/functions.inc.php');
+ }
+ if (address@hidden'phpgw_info']['flags']['noheader'] &&
+ address@hidden'phpgw_info']['flags']['noappheader'] &&
+ file_exists(PHPGW_APP_INC . '/header.inc.php') &&
!isset($GLOBALS['phpgw_info']['menuaction']))
+ {
+ include_once(PHPGW_APP_INC . '/header.inc.php');
+ }
+
+/////////////////////////////////////////////////////////////////////////////
+// END Stuff copied from functions.inc.php
+/////////////////////////////////////////////////////////////////////////////
+
+ if (isset($_GET['menuaction']))
+ {
+ list($app,$class,$method) = explode('.',$_GET['menuaction']);
+ }
+ else
+ {
+ $app = 'mobilefrontend';
+ $class = 'uifront';
+ $method = 'index';
+ }
+
+ $GLOBALS[$class] = CreateObject("{$app}.{$class}");
+
+ $invalid_data = false; //FIXME consider whether this should be computed
as in the main index.php
+ if ( !$invalid_data
+ && is_object($GLOBALS[$class])
+ && isset($GLOBALS[$class]->public_functions)
+ && is_array($GLOBALS[$class]->public_functions)
+ && isset($GLOBALS[$class]->public_functions[$method])
+ && $GLOBALS[$class]->public_functions[$method] )
+
+ {
+ if ( phpgw::get_var('X-Requested-With', 'string', 'SERVER') ==
'XMLHttpRequest'
+ // deprecated
+ || phpgw::get_var('phpgw_return_as', 'string', 'GET')
== 'json' )
+ {
+ // comply with RFC 4627
+ header('Content-Type: application/json');
+ $return_data = $GLOBALS[$class]->$method();
+ echo json_encode($return_data);
+ $GLOBALS['phpgw_info']['flags']['nofooter'] = true;
+ $GLOBALS['phpgw']->common->phpgw_exit();
+ }
+ else
+ {
+ $GLOBALS[$class]->$method();
+ $GLOBALS['phpgw']->common->phpgw_footer();
+ }
+ }
Added: trunk/mobilefrontend/setup/default/README
===================================================================
--- trunk/mobilefrontend/setup/default/README (rev 0)
+++ trunk/mobilefrontend/setup/default/README 2013-02-13 13:16:42 UTC (rev
10803)
@@ -0,0 +1,2 @@
+This catalag represent localised tranlsation for each 'phpgw_domain'.
+If one wants differents translation to the same item - create a catalog for
the domain in question and create a lang file with your translations
Added: trunk/mobilefrontend/setup/default/phpgw_no.lang_example
===================================================================
--- trunk/mobilefrontend/setup/default/phpgw_no.lang_example
(rev 0)
+++ trunk/mobilefrontend/setup/default/phpgw_no.lang_example 2013-02-13
13:16:42 UTC (rev 10803)
@@ -0,0 +1,10 @@
+add a part of town property no Legg til en XXX
+delete part of town property no Slett XXX
+delete the part of town property no Slett XXX
+edit the part of town property no Rette XXXen
+Enter a name for this part of town property no Angi ett navn
for denne XXXen
+Leave the part of town untouched and return back to the list property
no Forlat XXX uendret og returner til oversikten
+No part of town property no XXX ikke valgt
+Part of town property no XXX
+Part of town id property no XXX
+
Added: trunk/mobilefrontend/setup/default_records.inc.php
===================================================================
--- trunk/mobilefrontend/setup/default_records.inc.php
(rev 0)
+++ trunk/mobilefrontend/setup/default_records.inc.php 2013-02-13 13:16:42 UTC
(rev 10803)
@@ -0,0 +1,20 @@
+<?php
+ /**
+ * phpGroupWare
+ *
+ * @author Sigurd Nes <address@hidden>
+ * @copyright Copyright (C) 2013 Free Software Foundation, Inc.
http://www.fsf.org/
+ * @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
+ * @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
+ * @package mobilefrontend
+ * @subpackage setup
+ * @version $Id: default_records.inc.php 10782 2013-02-11 10:26:36Z
sigurdne $
+ */
+
+
+ /**
+ * Description
+ * @package mobilefrontend
+ */
+
+
Added: trunk/mobilefrontend/setup/phpgw_en.lang
===================================================================
Added: trunk/mobilefrontend/setup/phpgw_no.lang
===================================================================
--- trunk/mobilefrontend/setup/phpgw_no.lang (rev 0)
+++ trunk/mobilefrontend/setup/phpgw_no.lang 2013-02-13 13:16:42 UTC (rev
10803)
@@ -0,0 +1,2 @@
+mobilefrontend common no Mobil Frontend
+
Added: trunk/mobilefrontend/setup/setup.inc.php
===================================================================
--- trunk/mobilefrontend/setup/setup.inc.php (rev 0)
+++ trunk/mobilefrontend/setup/setup.inc.php 2013-02-13 13:16:42 UTC (rev
10803)
@@ -0,0 +1,69 @@
+<?php
+ /**
+ * phpGroupWare - mobilefrontend
+ *
+ * @author Sigurd Nes <address@hidden>
+ * @copyright Copyright (C) 2013 Free Software Foundation, Inc.
http://www.fsf.org/
+ * @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
+ * @internal Development of this application was funded by
http://www.bergen.kommune.no/
+ * @package mobilefrontend
+ * @subpackage setup
+ * @version $Id: setup.inc.php 10794 2013-02-11 14:30:13Z sigurdne $
+ */
+
+ $setup_info['mobilefrontend']['name'] = 'mobilefrontend';
+ $setup_info['mobilefrontend']['version'] = '0.1.1';
+ $setup_info['mobilefrontend']['app_order'] = 80;
+ $setup_info['mobilefrontend']['enable'] = 1;
+ $setup_info['mobilefrontend']['app_group'] = 'office';
+
+ $setup_info['property']['author'] = array
+ (
+// 'name' => 'Sigurd Nes',
+// 'email' => 'address@hidden'
+ );
+
+ $setup_info['mobilefrontend']['maintainer'] = array
+ (
+// 'name' => 'Sigurd Nes',
+// 'email' => 'address@hidden'
+ );
+
+ $setup_info['mobilefrontend']['license'] = 'GPL';
+ $setup_info['mobilefrontend']['description'] =
+ '<div align="left">
+
+ <b>Mobilefrontend</b> for:
+ <ol>
+ <li>Conntroller</li>
+ </ol>
+
+ <b>Mobilefrontend</b> is organized as a set of submodules as extensions
to their backend-parents.
+ </div>';
+
+ $setup_info['mobilefrontend']['note'] ='';
+
+
+ $setup_info['mobilefrontend']['tables'] = array();
+
+ /* The hooks this app includes, needed for hooks registration */
+ $setup_info['mobilefrontend']['hooks'] = array
+ (
+ 'config',
+ 'home',
+ );
+
+ /* Dependencies for this app to work */
+ $setup_info['mobilefrontend']['depends'][] = array
+ (
+ 'appname' => 'phpgwapi',
+ 'versions' => array('0.9.17', '0.9.18')
+ );
+
+ $setup_info['mobilefrontend']['depends'][] = array
+ (
+ 'appname' => 'controller',
+ 'versions' => array('0.1.41')
+ );
+
+
Added: trunk/mobilefrontend/setup/tables_current.inc.php
===================================================================
--- trunk/mobilefrontend/setup/tables_current.inc.php
(rev 0)
+++ trunk/mobilefrontend/setup/tables_current.inc.php 2013-02-13 13:16:42 UTC
(rev 10803)
@@ -0,0 +1,14 @@
+<?php
+ /**
+ * phpGroupWare - mobilefrontend.
+ *
+ * @author Sigurd Nes <address@hidden>
+ * @copyright Copyright (C) 2013 Free Software Foundation, Inc.
http://www.fsf.org/
+ * @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
+ * @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
+ * @package mobilefrontend
+ * @subpackage setup
+ * @version $Id: tables_current.inc.php 10794 2013-02-11 14:30:13Z
sigurdne $
+ */
+
+ $phpgw_baseline = array();
Added: trunk/mobilefrontend/setup/tables_update.inc.php
===================================================================
--- trunk/mobilefrontend/setup/tables_update.inc.php
(rev 0)
+++ trunk/mobilefrontend/setup/tables_update.inc.php 2013-02-13 13:16:42 UTC
(rev 10803)
@@ -0,0 +1,29 @@
+<?php
+ /**
+ * phpGroupWare - mobilefrontend.
+ *
+ * @author Sigurd Nes <address@hidden>
+ * @copyright Copyright (C) 2013 Free Software Foundation, Inc.
http://www.fsf.org/
+ * @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
+ * @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
+ * @package mobilefrontend
+ * @subpackage setup
+ * @version $Id: tables_update.inc.php 10794 2013-02-11 14:30:13Z
sigurdne $
+ */
+
+ /**
+ * Update mobilefrontend version from '0.1.1' to '0.1.2';
+ */
+/*
+ $test[] = '0.1.1';
+ function mobilefrontend_upgrade0_1_1()
+ {
+ $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+ if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+ {
+ $GLOBALS['setup_info']['mobilefrontend']['currentver']
= '0.1.2';
+ return
$GLOBALS['setup_info']['mobilefrontend']['currentver'];
+ }
+ }
+*/
Added: trunk/mobilefrontend/templates/base/app_data.xsl
===================================================================
--- trunk/mobilefrontend/templates/base/app_data.xsl
(rev 0)
+++ trunk/mobilefrontend/templates/base/app_data.xsl 2013-02-13 13:16:42 UTC
(rev 10803)
@@ -0,0 +1,3 @@
+ <!-- $Id: app_data.xsl 8437 2011-12-26 19:11:48Z sigurdne $ -->
+ <xsl:template name="dummy">
+ </xsl:template>
Added: trunk/mobilefrontend/templates/mobilefrontend/app_data.xsl
===================================================================
--- trunk/mobilefrontend/templates/mobilefrontend/app_data.xsl
(rev 0)
+++ trunk/mobilefrontend/templates/mobilefrontend/app_data.xsl 2013-02-13
13:16:42 UTC (rev 10803)
@@ -0,0 +1,3 @@
+ <!-- $Id: app_data.xsl 8437 2011-12-26 19:11:48Z sigurdne $ -->
+ <xsl:template name="dummy">
+ </xsl:template>
Added: trunk/mobilefrontend/templates/mobilefrontend/hello_world.xsl
===================================================================
--- trunk/mobilefrontend/templates/mobilefrontend/hello_world.xsl
(rev 0)
+++ trunk/mobilefrontend/templates/mobilefrontend/hello_world.xsl
2013-02-13 13:16:42 UTC (rev 10803)
@@ -0,0 +1,9 @@
+ <!-- $Id: app_data.xsl 8437 2011-12-26 19:11:48Z sigurdne $ -->
+ <xsl:template match="data" xmlns:php="http://php.net/xsl">
+ <h1>
+ <xsl:value-of select="php:function('lang', 'mobilefrontend')"/>
+ </h1>
+ <h2>
+ <xsl:value-of select="message"/>
+ </h2>
+ </xsl:template>
Added: trunk/phpgwapi/templates/mobilefrontend/css/frontend.css
===================================================================
--- trunk/phpgwapi/templates/mobilefrontend/css/frontend.css
(rev 0)
+++ trunk/phpgwapi/templates/mobilefrontend/css/frontend.css 2013-02-13
13:16:42 UTC (rev 10803)
@@ -0,0 +1,371 @@
+body {
+ font: normal small verdana,sans-serif;
+ margin: 0;
+ text-align: left;
+ background: white;
+}
+button { padding: .3em .6em; margin: .4em 0;}
+a:link, a:visited { color: black;}
+div#wrapper {}
+ul#metanav {
+ float: right;
+ list-style-type: none;
+ padding-top: 10px;
+}
+ul#metanav a, ul#sidebar a { color: #700; }
+div#content {
+ margin: 0 2em;
+ min-height: 500px;
+}
+#header-search {
+ float: right;
+ margin: -1.5em 1em 1em 1em;
+}
+#header-search.hidden { display: none; }
+#header-search .query { width: 15em;}
+
+div#header {
+ background: url(../images/header_bg.png) repeat-x;
+ height: 129px;
+}
+div#header a {
+ float: left;
+}
+div#logo {
+ width: 125px;
+ height: 114px;
+ margin-left: 10px;
+}
+div#centerimage {
+ background: url(../images/header_fg.png) no-repeat;
+ background-position: bottom center;
+ margin: 0 auto;
+ padding-top: 4px;
+ height: 109px;
+ overflow: hidden;
+}
+div#footer {
+ border-top: 1px solid #aaa;
+ padding-top: .3em;
+ color: #666;
+ font-size: 90%;
+}
+ul.nav {
+ list-style-type: 0;
+ padding-left: 0;
+}
+div.clr {clear: both;}
+ul.nav a { color: inherit; }
+ul.nav li { display: inline;}
+ul.nav li:before { content: '⇒ '; font-size: 90%; color: #444;}
+ul.nav li:first-child:before { display: none; }
+#login-bar {
+ clear: right;
+ float: right;
+ padding: .5em 1em 0 0;
+}
+form#search {
+ text-align: center;
+ padding-top: 5em;
+}
+input#search {
+ font-size: 120%;
+ color: #666;
+ width: 20em;
+}
+div.hint {
+ margin-top: 0.4em;
+ font-size: 90%;
+ color: #444;
+}
+div.hint i { color: #383;}
+
+ol#result {
+ padding-left: 0;
+}
+ol#result dl { margin: 0; }
+
+ol#result .header {
+ font-size: 120%;
+ background-color: #eee;
+ border-top: 1px solid #ccc;
+ border-bottom: 1px solid #ccc;
+ padding: .1em 0em .25em .2em;
+ margin-top: .5em;
+}
+ol#result .details {
+}
+ol#result .details h4 {
+ margin: 0.2em 0 0 0;
+ font-weight: normal;
+ font-style: italic;
+ color: #888;
+}
+ol#result .details .col {
+ padding: 0em 0.2em 0.4em 0.2em;
+ /*float: left;*/
+ width: 50%;
+ /*border: 1px solid #eee;*/
+}
+ol#result .details .moreInfo {
+ margin-top: .4em;
+}
+
+ol#result li:last-child {
+ border-bottom: 1px solid #ccc;
+}
+
+dl.form {}
+
+dl.form dt {
+ font-style: italic;
+ font-weight: bolder;
+ margin: .5em 0 .1em 0;
+ color: #002;
+}
+
+dl.form dt label { font-size: 90%; color: #733; font-style: italic;}
+dl.form dd {
+ float: left;
+ margin: 0 0 0 .4em;
+}
+table.fancyTable {
+ border-spacing: 0;
+ border: 1px solid #ccc;
+}
+table.fancyTable thead th {
+ font-weight: normal;
+ border-bottom: 1px solid #777;
+ padding: .1em .3em;
+ font-size: 85%;
+ font-style: italic;
+ color: #744;
+}
+table.fancyTable tbody td {
+ padding: .2em .7em;
+ border-bottom: 1px solid white;
+}
+table.fancyTable tbody tr:hover td {
+ background: #ffe;
+ border-bottom-color: #cca;
+}
+table.fancyTable tbody td.godkand { color: #474; }
+table.fancyTable tbody td.avslag { color: #744; }
+table.fancyTable tbody td.inskickad { color: #447; }
+table.fancyTable tbody td.ny { color: #447; }
+table.fancyTable tbody td a{ color: inherit; text-decoration: inherit;}
+
+div#help {
+ width: 15em;
+ float: right;
+ background: #3287d8;
+ border: 1px solid #66a;
+ border-radius: .6em;
+ -moz-border-radius: .6em;
+ -webkit-border-radius: .6em;
+ color: white;
+}
+div#help dl { margin: .2em .8em; min-height: 10em;}
+div#help dl dd { font-style: italic;}
+div#help h2 {
+ margin: 0;
+ font-size: 80%;
+ padding: .1em .5em;
+ font-weight: normal;
+ border-bottom: 1px solid #67b1ff;
+}
+#weekView tr.time td { border-top: 1px solid #aaa;}
+#weekView tr td:first-child { background: #ddd;}
+
+
+#cloud {
+ text-align: center;
+ list-style-type: none;
+ padding-left: 0;
+ color: #888;
+ margin: 3em 0;
+ font-size: 120%;
+}
+#cloud div { padding: .2em};
+#cloud strong { padding: .2em};
+
+#cloud li { display: inline; white-space: nowrap; padding: 0 .2em;}
+#cloud li.small { font-size: 100%;}
+#cloud li.medium { font-size: 130%;}
+#cloud li.large { font-size: 200%; color: #777;}
+#cloud li.xlarge { font-size: 240%; color: #555;}
+#cloud li:hover { text-decoration: underline; cursor: pointer; }
+
+dl.tooltip { width: 300px;}
+
+dl.tooltip dt {
+ float: left;
+ clear: left;
+ width: 7em;
+ font-style: italic;
+}
+
+dl.tooltip dd {
+ float: left;
+}
+
+div.info:hover {
+ background-image: url(../images/info.png);
+ background-repeat: no-repeat;
+ background-position: 100% 0%;
+}
+
+dl.contactinfo {}
+dl.contactinfo dt {
+ margin-left: 1em;
+}
+dl.contactinfo dd {
+ margin-left: 2em;
+}
+
+/*#frontend {
+ width: 900px;
+}*/
+
+#frontend dl.proplist-col {
+ width: 300px;
+}
+
+#frontend dl.proplist-col.main {
+ width: 400px;
+}
+
+#frontend dl.proplist-col.images {
+ float:right;
+ clear:right;
+}
+
+
+
+#frontend h2 { margin-bottom: 0.1em;}
+#frontend dl.proplist.images dd img { width: 300px; border:1px solid #777;
padding: 1px;}
+#frontend dl.proplist.images dl { margin-bottom: 1.5em; }
+
+#frontend #result dl.proplist.images dt { display: none;}
+#frontend #result dl.proplist.images dd { display: inline; padding-right: 1em;}
+#frontend #result dl.proplist.images dd img { width: auto; height: 120px;
border:1px solid black;}
+
+
+#agegroup {
+ background: #eee;
+ white-space: nowrap;
+}
+#agegroup, #agegroup td, #agegroup th { width: 1%; }
+#agegroup td, #agegroup th { padding: .1em .3em;}
+#agegroup td input { width: 3em; }
+
+#overlay-info { padding: 1em; }
+#overlay-info h3 { margin: 0 0 .9em 0; }
+#overlay-info dt { font-style: italic; font-weight: bolder; font-size: 90%;}
+#overlay-info dd { padding-left: 2em; }
+#overlay-info .close { float: right; }
+#overlay-info .actions { margin-top: 1em;}
+
+.yui-calendar td.calcell {
+ border:0px !important;
+}
+.yui-skin-sam .yui-dt TABLE TH{
+ border: none !important;
+}
+.yui-skin-sam .yui-dt TABLE TD{
+ border: none !important;
+}
+
+/* CSS for newlayout */
+body{
+color: #575757;
+margin:0;
+padding:0;
+width:100%;
+height:100%;
+background: #fff url('../images/newlayout/bodyBg.gif') repeat-x;text-align:
center;width:100%;
+}
+
+#wrapper{
+background-color: #fff;
+width: 1000px;
+textalign: left;
+margin: 0 auto;
+overflow: hidden;
+padding: 0 0px 40px;
+}
+
+#header{
+overflow: hidden;
+line-height: 1;
+width: 1000px;
+background-image: none !important;
+height: 130px !important;
+}
+
+#login-bar{
+margin-top:10px;
+}
+
+#login-bar a{
+border-right: 1px solid #575757;
+padding: 0 0.5em;
+line-height: 1.2em;
+}
+
+#logo{
+background: url(../images/newlayout/logo.png) no-repeat;
+float: left;
+height: 75px;
+width: 102px;
+margin: 14px 0 0 49px !important;
+}
+
+#centerimage{
+display: block !important;
+margin-right: 5px !important;
+width: 172px !important;
+height: 108px !important;
+background: url(../images/newlayout/aktivby_logo.jpg) no-repeat !important;
+background-position: bottom center !important;
+padding: 22px 0px 0px 100px !important;
+}
+
+#header-search{
+margin: -3em 1em 1em 1em;
+}
+
+#frontend{
+background-image: url(../images/newlayout/pageContainerBg.gif);
+background-repeat: repeat-x;
+}
+
+#line{
+border-top: 5px solid #B11F24;
+clear: left;
+height: 30px;
+width: 960px;
+margin-left: 20px;
+}
+ #content{
+text-align:left;
+}
+
+#cloud{
+text-align:left;
+margin-left: 280px;
+}
+
+#footer{
+border: none !important;
+background:url('../images/newlayout/footerFjell_inkl_bunnlinje.gif') no-repeat
scroll center top transparent;
+clear:both;
+overflow:auto;
+height:160px;
+}
+
+#footer_address{
+padding-top: 1.5em;
+}
+
+
Added: trunk/phpgwapi/templates/mobilefrontend/footer.tpl
===================================================================
--- trunk/phpgwapi/templates/mobilefrontend/footer.tpl
(rev 0)
+++ trunk/phpgwapi/templates/mobilefrontend/footer.tpl 2013-02-13 13:16:42 UTC
(rev 10803)
@@ -0,0 +1,10 @@
+ </div>
+<div id="footer">
+
+</div>
+<div id="footer_address">
+Bergen kommune | Rådhusgt 10 | Postboks 7700 | 5020 Bergen
+</div>
+
+ </body>
+</html>
Added: trunk/phpgwapi/templates/mobilefrontend/head.inc.php
===================================================================
--- trunk/phpgwapi/templates/mobilefrontend/head.inc.php
(rev 0)
+++ trunk/phpgwapi/templates/mobilefrontend/head.inc.php 2013-02-13
13:16:42 UTC (rev 10803)
@@ -0,0 +1,171 @@
+<?php
+ phpgw::import_class('phpgwapi.yui');
+ phpgw::import_class('phpgwapi.template_portico');
+
+ if ( !isset($GLOBALS['phpgw_info']['server']['site_title']) )
+ {
+ $GLOBALS['phpgw_info']['server']['site_title'] = lang('please
set a site name in admin > siteconfig');
+ }
+
+ $app = $GLOBALS['phpgw_info']['flags']['currentapp'];
+
+ $config = CreateObject('phpgwapi.config','bookingfrontend');
+ $config->read();
+
+ $tracker_id = isset($config->config_data['tracker_id']) &&
$config->config_data['tracker_id'] ? $config->config_data['tracker_id'] : '';
+ unset($config);
+ $tracker_code1 = <<<JS
+ var gaJsHost = (("https:" == document.location.protocol) ?
"https://ssl." : "http://www.");
+ document.write(unescape("%3Cscript src='" + gaJsHost +
"google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
+JS;
+ $tracker_code2 = <<<JS
+ try
+ {
+ var pageTracker = _gat._getTracker("{$tracker_id}");
+ pageTracker._trackPageview();
+ }
+ catch(err)
+ {
+ alert(err);
+ }
+JS;
+
+ if($tracker_id)
+ {
+ $GLOBALS['phpgw']->js->add_code('', $tracker_code1);
+ $GLOBALS['phpgw']->js->add_code('', $tracker_code2);
+ }
+
+ $GLOBALS['phpgw']->template->set_root(PHPGW_TEMPLATE_DIR);
+ $GLOBALS['phpgw']->template->set_unknowns('remove');
+ $GLOBALS['phpgw']->template->set_file('head', 'head.tpl');
+ $GLOBALS['phpgw']->template->set_block('head', 'stylesheet',
'stylesheets');
+ $GLOBALS['phpgw']->template->set_block('head', 'javascript',
'javascripts');
+
+ $javascripts = array();
+
+ phpgwapi_yui::load_widget('dragdrop');
+ phpgwapi_yui::load_widget('element');
+ phpgwapi_yui::load_widget('container');
+ phpgwapi_yui::load_widget('connection');
+ phpgwapi_yui::load_widget('resize');
+ phpgwapi_yui::load_widget('layout');
+
+ phpgwapi_yui::load_widget('button');
+ $stylesheets = array
+ (
+
"/phpgwapi/js/yahoo/reset-fonts-grids/reset-fonts-grids.css",
+
"/phpgwapi/js/yahoo/tabview/assets/skins/sam/tabview.css",
+ "/phpgwapi/js/yahoo/resize/assets/skins/sam/resize.css",
+ "/phpgwapi/js/yahoo/layout/assets/skins/sam/layout.css",
+ );
+ $stylesheets[] = "/phpgwapi/js/yahoo/menu/assets/skins/sam/menu.css";
+ $stylesheets[] =
"/phpgwapi/js/yahoo/button/assets/skins/sam/button.css";
+ $stylesheets[] = "/phpgwapi/templates/portico/css/base.css";
+ $stylesheets[] =
"/phpgwapi/templates/portico/css/{$GLOBALS['phpgw_info']['user']['preferences']['common']['theme']}.css";
+ $stylesheets[] = "/{$app}/templates/base/css/base.css";
+ $stylesheets[] = "/{$app}/templates/portico/css/base.css";
+ $stylesheets[] =
"/{$app}/templates/portico/css/{$GLOBALS['phpgw_info']['user']['preferences']['common']['theme']}.css";
+ $stylesheets[] = "/phpgwapi/templates/bkbooking/css/frontend.css";
+
+ foreach ( $stylesheets as $stylesheet )
+ {
+ if( file_exists( PHPGW_SERVER_ROOT . $stylesheet ) )
+ {
+ $GLOBALS['phpgw']->template->set_var( 'stylesheet_uri',
$GLOBALS['phpgw_info']['server']['webserver_url'] . $stylesheet );
+ $GLOBALS['phpgw']->template->parse('stylesheets',
'stylesheet', true);
+ }
+ }
+
+ foreach ( $javascripts as $javascript )
+ {
+ if( file_exists( PHPGW_SERVER_ROOT . $javascript ) )
+ {
+ $GLOBALS['phpgw']->template->set_var( 'javascript_uri',
$GLOBALS['phpgw_info']['server']['webserver_url'] . $javascript );
+ $GLOBALS['phpgw']->template->parse('javascripts',
'javascript', true);
+ }
+ }
+
+ // Construct navbar_config by taking into account the current selected
menu
+ // The only problem with this loop is that leafnodes will be included
+ $navbar_config = execMethod('phpgwapi.template_portico.retrieve_local',
'navbar_config');
+
+ if( isset($GLOBALS['phpgw_info']['flags']['menu_selection']) )
+ {
+ if(!isset($navbar_config))
+ {
+ $navbar_config = array();
+ }
+
+ $current_selection =
$GLOBALS['phpgw_info']['flags']['menu_selection'];
+
+ while($current_selection)
+ {
+ $navbar_config["navbar::$current_selection"] = true;
+ $current_selection = implode("::", explode("::",
$current_selection, -1));
+ }
+
+ phpgwapi_template_portico::store_local('navbar_config',
$navbar_config);
+ }
+
+ $_navbar_config = json_encode($navbar_config);
+ //TODO Sigurd 8.july 2010: This one should be moved to frontend config
+ $config = CreateObject('phpgwapi.config','booking');
+ $config->read();
+ $logofile_frontend = isset($config->config_data['logopath_frontend'])
&& $config->config_data['logopath_frontend'] ?
$config->config_data['logopath_frontend'] :
"/phpgwapi/templates/bkbooking/images/bergen_logo.png";
+
+ $bodoc = CreateObject('booking.bodocumentation');
+
+ $manual = $bodoc->so->getFrontendDoc();
+
+ $app = lang($app);
+ $tpl_vars = array
+ (
+ 'css' => $GLOBALS['phpgw']->common->get_css(),
+ 'javascript' => $GLOBALS['phpgw']->common->get_javascript(),
+ 'img_icon' =>
$GLOBALS['phpgw']->common->find_image('phpgwapi', 'favicon.ico'),
+ 'site_title' =>
"{$GLOBALS['phpgw_info']['server']['site_title']}",
+ 'str_base_url' => $GLOBALS['phpgw']->link('/', array(), true),
+ 'webserver_url' =>
$GLOBALS['phpgw_info']['server']['webserver_url'],
+ 'win_on_events' => $GLOBALS['phpgw']->common->get_on_events(),
+ 'navbar_config' => $_navbar_config,
+ 'lbl_search' => lang('Search'),
+ 'logofile' => $logofile_frontend,
+ 'header_search_class' =>
'hidden'//(isset($_GET['menuaction']) && $_GET['menuaction'] ==
'bookingfrontend.uisearch.index' ? 'hidden' : '')
+ );
+ if ($manual !== null)
+ {
+ $tpl_vars['manual_text'] = lang('manual');
+ $tpl_vars['manual_url'] = $manual;
+# $tpl_vars['help_text'] = lang('help');
+# $tpl_vars['help_url'] = => '#';
+ }
+ $bouser = CreateObject('bookingfrontend.bouser');
+ if($bouser->is_logged_in())
+ {
+ $tpl_vars['login_text'] = $bouser->orgnr . ' :: ' .
lang('Logout');
+ $tpl_vars['login_url'] = 'logout.php';
+ }
+ else
+ {
+ $tpl_vars['login_text'] = lang('Login');
+ $tpl_vars['login_url'] =
'login.php?after='.urlencode($_SERVER['QUERY_STRING']);
+ $config =
CreateObject('phpgwapi.config','bookingfrontend');
+ $config->read();
+ $login_parameter =
isset($config->config_data['login_parameter']) &&
$config->config_data['login_parameter'] ?
$config->config_data['login_parameter'] : '';
+ $custom_login_url =
isset($config->config_data['custom_login_url']) &&
$config->config_data['custom_login_url'] ?
$config->config_data['custom_login_url'] : '';
+ if($login_parameter)
+ {
+ $login_parameter = ltrim($login_parameter, '&');
+ $tpl_vars['login_url'] .= "&{$login_parameter}";
+ }
+ if($custom_login_url)
+ {
+ $tpl_vars['login_url'] = $custom_login_url;
+ }
+ }
+
+ $GLOBALS['phpgw']->template->set_var($tpl_vars);
+
+ $GLOBALS['phpgw']->template->pfp('out', 'head');
+ unset($tpl_vars);
Added: trunk/phpgwapi/templates/mobilefrontend/head.tpl
===================================================================
--- trunk/phpgwapi/templates/mobilefrontend/head.tpl
(rev 0)
+++ trunk/phpgwapi/templates/mobilefrontend/head.tpl 2013-02-13 13:16:42 UTC
(rev 10803)
@@ -0,0 +1,49 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<!-- BEGIN head -->
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html;
charset=utf-8">
+ <meta name="author" content="phpGroupWare
http://www.phpgroupware.org">
+ <meta name="description" content="phpGroupWare">
+ <meta name="keywords" content="phpGroupWare">
+ <meta name="robots" content="none">
+ <title>{site_title}</title>
+ <link rel="icon" href="{img_icon}" type="image/x-ico">
+ <link rel="shortcut icon" href="{img_icon}">
+ <!-- BEGIN stylesheet -->
+ <link href="{stylesheet_uri}" type="text/css" rel="StyleSheet">
+ <!-- END stylesheet -->
+
+ {css}
+
+ <script type="text/javascript">
+ <!--
+ var strBaseURL = '{str_base_url}';
+ {win_on_events}
+ //-->
+ </script>
+ {javascript}
+ <!-- BEGIN javascript -->
+ <script type="text/javascript"
src="{javascript_uri}"></script>
+ <!-- END javascript -->
+
+ </head>
+<body>
+ <div id="wrapper">
+ <div id="header">
+ <div id="login-bar">
+ <a href="{manual_url}">{manual_text}</a> <a
href="{help_url}">{help_text}</a> <a href="{login_url}">{login_text}</a>
+ </div>
+ <a href="index.php?menuaction=bookingfrontend.uisearch.index"><div
id="logo"></div></a>
+ <div id="centerimage"></div>
+ <form action="index.php" method="get" id="header-search"
class="{header_search_class}">
+ <input type="hidden" name="menuaction"
value="bookingfrontend.uisearch.index" />
+ <input class="query
+" type="text" name="searchterm"/>
+ <xsl:text> </xsl:text><input type="submit"
value="{lbl_search}"/>
+ </form>
+ </div>
+<div class="yui-skin-sam" id='frontend'>
+<div id="line"></div>
+ <div style='margin:0; padding: 0; line-height: 0'> </div>
Added: trunk/phpgwapi/templates/mobilefrontend/images/bergen_logo.png
===================================================================
(Binary files differ)
Property changes on:
trunk/phpgwapi/templates/mobilefrontend/images/bergen_logo.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/phpgwapi/templates/mobilefrontend/images/header_bg.png
===================================================================
(Binary files differ)
Property changes on:
trunk/phpgwapi/templates/mobilefrontend/images/header_bg.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/phpgwapi/templates/mobilefrontend/images/header_fg.png
===================================================================
(Binary files differ)
Property changes on:
trunk/phpgwapi/templates/mobilefrontend/images/header_fg.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/phpgwapi/templates/mobilefrontend/images/info.png
===================================================================
(Binary files differ)
Property changes on: trunk/phpgwapi/templates/mobilefrontend/images/info.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/phpgwapi/templates/mobilefrontend/images/newlayout/aktivby_logo.jpg
===================================================================
(Binary files differ)
Property changes on:
trunk/phpgwapi/templates/mobilefrontend/images/newlayout/aktivby_logo.jpg
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/phpgwapi/templates/mobilefrontend/images/newlayout/bodyBg.gif
===================================================================
(Binary files differ)
Property changes on:
trunk/phpgwapi/templates/mobilefrontend/images/newlayout/bodyBg.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/phpgwapi/templates/mobilefrontend/images/newlayout/footerFjell_inkl_bunnlinje.gif
===================================================================
(Binary files differ)
Property changes on:
trunk/phpgwapi/templates/mobilefrontend/images/newlayout/footerFjell_inkl_bunnlinje.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/phpgwapi/templates/mobilefrontend/images/newlayout/forsidebilde.jpg
===================================================================
(Binary files differ)
Property changes on:
trunk/phpgwapi/templates/mobilefrontend/images/newlayout/forsidebilde.jpg
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/phpgwapi/templates/mobilefrontend/images/newlayout/logo.png
===================================================================
(Binary files differ)
Property changes on:
trunk/phpgwapi/templates/mobilefrontend/images/newlayout/logo.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/phpgwapi/templates/mobilefrontend/images/newlayout/pageContainerBg.gif
===================================================================
(Binary files differ)
Property changes on:
trunk/phpgwapi/templates/mobilefrontend/images/newlayout/pageContainerBg.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/phpgwapi/templates/mobilefrontend/navbar.inc.php
===================================================================
--- trunk/phpgwapi/templates/mobilefrontend/navbar.inc.php
(rev 0)
+++ trunk/phpgwapi/templates/mobilefrontend/navbar.inc.php 2013-02-13
13:16:42 UTC (rev 10803)
@@ -0,0 +1,202 @@
+<?php
+
+ function parse_navbar($force = False)
+ {
+ $navbar = array();
+// if(!isset($GLOBALS['phpgw_info']['flags']['nonavbar']) ||
!$GLOBALS['phpgw_info']['flags']['nonavbar'])
+ {
+ $navbar = execMethod('phpgwapi.menu.get', 'navbar');
+ }
+
+ $user = $GLOBALS['phpgw']->accounts->get(
$GLOBALS['phpgw_info']['user']['id'] );
+
+ $var = array
+ (
+ 'home_url' =>
$GLOBALS['phpgw']->link('/home.php'),
+ 'home_text' => lang('home'),
+ 'home_icon' => 'icon icon-home',
+ 'about_url' =>
$GLOBALS['phpgw']->link('/about.php', array('app' =>
$GLOBALS['phpgw_info']['flags']['currentapp']) ),
+ 'about_text' => lang('about'),
+ 'logout_url' =>
$GLOBALS['phpgw']->link('/logout.php'),
+ 'logout_text' => lang('logout'),
+ 'user_fullname' => $user->__toString()
+ );
+
+ if ( $GLOBALS['phpgw']->acl->check('run', PHPGW_ACL_READ,
'preferences') )
+ {
+ $var['preferences_url'] =
$GLOBALS['phpgw']->link('/preferences/index.php');
+ $var['preferences_text'] = lang('preferences');
+ }
+
+ if ( isset($GLOBALS['phpgw_info']['user']['apps']['manual']) )
+ {
+ $var['help_url'] = "javascript:openwindow('"
+ . $GLOBALS['phpgw']->link('/index.php', array
+ (
+ 'menuaction'=> 'manual.uimanual.help',
+ 'app' =>
$GLOBALS['phpgw_info']['flags']['currentapp'],
+ 'section' =>
isset($GLOBALS['phpgw_info']['apps']['manual']['section']) ?
$GLOBALS['phpgw_info']['apps']['manual']['section'] : '',
+ 'referer' => phpgw::get_var('menuaction')
+ )) . "','700','600')";
+
+ $var['help_text'] = lang('help');
+ $var['help_icon'] = 'icon icon-help';
+ }
+
+ if ( isset($GLOBALS['phpgw_info']['user']['apps']['admin']) )
+ {
+ $var['debug_url'] = "javascript:openwindow('"
+ . $GLOBALS['phpgw']->link('/index.php', array
+ (
+ 'menuaction'=> 'property.uidebug_json.index'
+ )) . "','','')";
+
+ $var['debug_text'] = lang('debug');
+ $var['debug_icon'] = 'icon icon-debug';
+ }
+
+ $GLOBALS['phpgw']->template->set_root(PHPGW_TEMPLATE_DIR);
+ $GLOBALS['phpgw']->template->set_file('navbar', 'navbar.tpl');
+
+ $flags = &$GLOBALS['phpgw_info']['flags'];
+ $var['current_app_title'] = isset($flags['app_header']) ?
$flags['app_header'] : lang($GLOBALS['phpgw_info']['flags']['currentapp']);
+ $flags['menu_selection'] = isset($flags['menu_selection']) ?
$flags['menu_selection'] : '';
+
+ $GLOBALS['phpgw']->template->set_var($var);
+ $GLOBALS['phpgw']->template->pfp('out','navbar');
+
+ register_shutdown_function('parse_footer_end');
+ }
+
+ function item_expanded($id)
+ {
+ static $navbar_state;
+ if( !isset( $navbar_state ) )
+ {
+ $navbar_state =
execMethod('phpgwapi.template_portico.retrieve_local', 'navbar_config');
+ }
+ return isset( $navbar_state[ $id ]);
+ }
+
+ function render_item($item, $id='', $children='')
+ {
+ $icon_style = $expand_class = $current_class = $link_class =
$parent_class = '';
+ static $blank_image;
+ if ( !isset($blank_image) )
+ {
+ $blank_image =
$GLOBALS['phpgw']->common->find_image('phpgwapi', 'blank.png');
+ }
+ if ( isset($item['image']) )
+ {
+ $icon_style = ' style="background-image: url(' .
$GLOBALS['phpgw']->common->image($item['image'][0], $item['image'][1]) . ')"';
+ }
+ if ( $children )
+ {
+ $expand_class = item_expanded($id) ? '
class="expanded"' : ' class="collapsed"';
+ $parent_class = ' parent';
+ }
+ if ( $id ==
"navbar::{$GLOBALS['phpgw_info']['flags']['menu_selection']}" )
+ {
+ $current_class = 'current';
+ }
+
+ $link_class =" class=\"{$current_class}{$parent_class}\"";
+
+ $out = <<<HTML
+ <li{$expand_class}>
+
+HTML;
+ if( $expand_class )
+ {
+ $out .= <<<HTML
+ <img
src="{$blank_image}"{$expand_class}width="16" height="16" alt="+/-" />
+
+HTML;
+ }
+ return <<<HTML
+$out
+ <a
href="{$item['url']}"{$link_class}{$icon_style} id="{$id}">
+ <span>{$item['text']}</span>
+ </a>
+{$children}
+ </li>
+
+HTML;
+ }
+
+ function render_submenu($parent, $menu)
+ {
+ $out = '';
+ foreach ( $menu as $key => $item )
+ {
+ $children = isset($item['children']) ? render_submenu(
"{$parent}::{$key}", $item['children']) : '';
+ $out .= render_item($item, "navbar::{$parent}::{$key}",
$children);
+ //$debug .= "{$parent}::{$key}<br>";
+ }
+
+ $out = <<<HTML
+ <ul>
+{$out}
+ </ul>
+
+HTML;
+ return $out;
+ }
+
+ function parse_footer_end()
+ {
+ // Stop the register_shutdown_function causing the footer to be
included twice - skwashd dec07
+ static $footer_included = false;
+ if ( $footer_included )
+ {
+ return true;
+ }
+
+ $GLOBALS['phpgw']->template->set_root(PHPGW_TEMPLATE_DIR);
+ $GLOBALS['phpgw']->template->set_file('footer', 'footer.tpl');
+
+ $var = array
+ (
+ 'powered_by' => lang('Powered by phpGroupWare
version %1', $GLOBALS['phpgw_info']['server']['versions']['phpgwapi']),
+ );
+
+ $GLOBALS['phpgw']->template->set_var($var);
+
+ $GLOBALS['phpgw']->template->pfp('out', 'footer');
+
+ $footer_included = true;
+ }
+
+ /**
+ * Callback for usort($navbar)
+ *
+ * @param array $item1 the first item to compare
+ * @param array $item2 the second item to compare
+ * @return int result of comparision
+ */
+ function sort_navbar($item1, $item2)
+ {
+ $a =& $item1['order'];
+ $b =& $item2['order'];
+
+ if ($a == $b)
+ {
+ return strcmp($item1['text'], $item2['text']);
+ }
+ return ($a < $b) ? -1 : 1;
+ }
+
+ /**
+ * Organise the navbar properly
+ *
+ * @param array $navbar the navbar items
+ * @return array the organised navbar
+ */
+ function prepare_navbar(&$navbar)
+ {
+ // if ( isset($navbar['admin']) )
+ // {
+ // $navbar['admin']['children'] =
execMethod('phpgwapi.menu.get', 'admin');
+ // }
+ // uasort($navbar, 'sort_navbar');
+ }
Added: trunk/phpgwapi/templates/mobilefrontend/navbar.tpl
===================================================================
--- trunk/phpgwapi/templates/mobilefrontend/navbar.tpl
(rev 0)
+++ trunk/phpgwapi/templates/mobilefrontend/navbar.tpl 2013-02-13 13:16:42 UTC
(rev 10803)
@@ -0,0 +1 @@
+
\ No newline at end of file
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [10803] prepare for mobilefrontend,
Sigurd Nes <=