From 924451f5f8450a2991498ae53f5cd8c5494c4265 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Fri, 22 Oct 2010 14:32:33 +0000 Subject: [PATCH] New: add jQuery mobile for smartphone --- .../theme/default/mobiledefault.css.php | 44 ++++++ .../phones/smartphone/tpl/header.tpl.php | 22 ++- .../theme/phones/smartphone/tpl/login.tpl.php | 125 ++++++++---------- 3 files changed, 112 insertions(+), 79 deletions(-) create mode 100644 htdocs/theme/phones/smartphone/theme/default/mobiledefault.css.php diff --git a/htdocs/theme/phones/smartphone/theme/default/mobiledefault.css.php b/htdocs/theme/phones/smartphone/theme/default/mobiledefault.css.php new file mode 100644 index 00000000000..b5b2ae4de59 --- /dev/null +++ b/htdocs/theme/phones/smartphone/theme/default/mobiledefault.css.php @@ -0,0 +1,44 @@ + + * + * This program 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. + * + * This program 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 this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +/** + * \file htdocs/theme/phones/smartphone/theme/default/default.css.php + * \brief Fichier de style CSS du theme Smartphone default + * \version $Id$ + */ + +if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL','1'); // Disables token renewal +if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1'); +if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1'); +if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); +if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1'); +//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); // We need to use translation files to know direction +if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); + +require_once("../../../../../master.inc.php"); + +// Define css type +header('Content-type: text/css'); +// Important: Avoid page request by browser and dynamic build at +// each Dolibarr page access. +if (empty($dolibarr_nocache)) header('Cache-Control: max-age=3600, public, must-revalidate'); +else header('Cache-Control: no-cache'); + +?> + +.ui-mobile #dol-homeheader { text-align: center } diff --git a/htdocs/theme/phones/smartphone/tpl/header.tpl.php b/htdocs/theme/phones/smartphone/tpl/header.tpl.php index 9b722bb10e6..df771559a4b 100644 --- a/htdocs/theme/phones/smartphone/tpl/header.tpl.php +++ b/htdocs/theme/phones/smartphone/tpl/header.tpl.php @@ -21,21 +21,31 @@ header('Cache-Control: Public, must-revalidate'); header("Content-type: text/html; charset=".$conf->file->character_set_client); ?> - + - + <?php echo $this->title; ?> - - - + + + + + + + + + diff --git a/htdocs/theme/phones/smartphone/tpl/login.tpl.php b/htdocs/theme/phones/smartphone/tpl/login.tpl.php index 28002c33b52..10572949e61 100644 --- a/htdocs/theme/phones/smartphone/tpl/login.tpl.php +++ b/htdocs/theme/phones/smartphone/tpl/login.tpl.php @@ -22,86 +22,65 @@ $smartphone->smartheader(); -
-
-
+
-
-
- - +
-
- +
+

-
- - trans('Identification'); ?> -
    -
  • - -
  • + + + -
  • - -
  • - -
- - - trans('Entity'); ?> -
    -
  • +
    + + + + + + + + - -
  • -
- - - - trans('SecurityCode'); ?> -
    -
  • - - -
  • -
- - -
    -
  • - -
  • -
- - -
+ + + + + +
+ +
+ + + + - - trans('Tools'); ?> - - + +
+ + + +
+ +