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 0000000000000000000000000000000000000000..b5b2ae4de5925347b90f03eb87c1c26094aa9aa5 --- /dev/null +++ b/htdocs/theme/phones/smartphone/theme/default/mobiledefault.css.php @@ -0,0 +1,44 @@ +<?php +/* Copyright (C) 2009-2010 Regis Houssin <regis@dolibarr.fr> + * + * 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 9b722bb10e636024486648b0e7b071b8a193f704..df771559a4b72b068e658ad623841954c388c6b8 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); ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<!DOCTYPE html> <!-- BEGIN HEADER SMARTPHONE TEMPLATE --> -<html xmlns="http://www.w3.org/1999/xhtml"> +<html> <head> <title><?php echo $this->title; ?></title> <meta name="robots" content="noindex,nofollow" /> <meta name="apple-mobile-web-app-capable" content="yes" /> <link rel="apple-touch-icon" href="<?php echo DOL_URL_ROOT.'/theme/phones/smartphone/theme/'.$this->theme.'/thumbs/homescreen.png'; ?>" /> -<meta name="viewport"content="minimum-scale=1.0, width=device-width, maximum-scale=0.6667, user-scalable=no" /> -<link type="text/css" rel="stylesheet" href="<?php echo DOL_URL_ROOT.'/theme/phones/smartphone/theme/'.$this->theme.'/'.$this->theme.'.css.php'; ?>" /> -<script type="text/javascript" src="<?php echo DOL_URL_ROOT.'/includes/iwebkit/Framework/javascript/functions.js'; ?>"></script> + +<link rel="stylesheet" href="<?php echo DOL_URL_ROOT.'/includes/jquery/mobile/jquery.mobile-1.0a1.min.css'; ?>" /> +<!-- +<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a1/jquery.mobile-1.0a1.min.css" /> +--> +<link rel="stylesheet" href="<?php echo DOL_URL_ROOT.'/theme/phones/smartphone/theme/default/mobiledefault.css.php'; ?>" /> + +<script src="<?php echo DOL_URL_ROOT.'/includes/jquery/js/jquery-1.4.3.min.js'; ?>"></script> +<script src="<?php echo DOL_URL_ROOT.'/includes/jquery/mobile/jquery.mobile-1.0a1.min.js'; ?>"></script> +<!-- +<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> +--> + </head> <body> diff --git a/htdocs/theme/phones/smartphone/tpl/login.tpl.php b/htdocs/theme/phones/smartphone/tpl/login.tpl.php index 28002c33b523d4a4890fede481a71fc936c359c2..10572949e6174970e67a4ee95e915c226bab8d1a 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(); <!-- START LOGIN SMARTPHONE TEMPLATE --> -<div id="topbar"> - <div id="title"><?php echo $title; ?></div> -</div> +<div data-role="page" id="dol-home" data-theme="b"> -<div id="content"> - <form id="login" name="login" method="post" action="<?php echo $php_self; ?>"> - <input type="hidden" name="token" value="<?php echo $_SESSION['newtoken']; ?>" /> - <input type="hidden" name="loginfunction" value="loginfunction" /> + <div data-role="content"> - <div align="center"> - <img src="<?php echo $dol_url_root.'/theme/phones/smartphone/theme/'.$smartphone->theme.'/thumbs/dolibarr.png'; ?>"> + <div id="dol-homeheader"> + <h1><img src="<?php echo $dol_url_root.'/theme/phones/smartphone/theme/'.$smartphone->theme.'/thumbs/dolibarr.png'; ?>"></h1> </div> - <br> - - <span class="graytitle"><?php echo $langs->trans('Identification'); ?></span> - <ul class="pageitem"> - <li class="bigfield"> - <input placeholder="<?php echo $langs->trans('Login'); ?>" type="text" id="username" name="username" value="<?php echo $login; ?>" /> - </li> + <form id="login" name="login" method="post" action="<?php echo $php_self; ?>"> + <input type="hidden" name="token" value="<?php echo $_SESSION['newtoken']; ?>" /> + <input type="hidden" name="loginfunction" value="loginfunction" /> - <li class="bigfield"> - <input placeholder="<?php echo $langs->trans('Password'); ?>" type="password" id="password" name="password" value="<?php echo $password; ?>" /> - </li> - - </ul> - - <?php if ($select_entity) { ?> - <span class="graytitle"><?php echo $langs->trans('Entity'); ?></span> - <ul class="pageitem"> - <li class="select"> + <div data-role="fieldcontain"> + <label for="username"><?php echo $langs->trans('Login'); ?></label> + <input type="text" name="username" id="username" value="<?php echo $login; ?>" /> + + <label for="password"><?php echo $langs->trans('Password'); ?></label> + <input type="password" name="password" id="password" value="<?php echo $password; ?>" /> + + <?php if ($select_entity) { ?> + <label for="entity" class="select"><?php echo $langs->trans('Entity'); ?></label> <?php echo $select_entity; ?> - <span class="arrow"></span> - </li> - </ul> - <?php } ?> - - <?php if ($captcha) { ?> - <span class="graytitle"><?php echo $langs->trans('SecurityCode'); ?></span> - <ul class="pageitem"> - <li class="smallfield"> - <input placeholder="<?php echo $langs->trans('SecurityCode'); ?>" type="text" id="securitycode" name="code" /> - <img src="<?php echo $dol_url_root.'/lib/antispamimage.php'; ?>" border="0" width="128" height="36" /> - </li> - </ul> - <?php } ?> - - <ul class="pageitem"> - <li class="button"> - <input name="input Button" type="submit" value="<?php echo $langs->trans('Connection'); ?>" /> - </li> - </ul> - - </form> -</div> + <?php } ?> + + <?php if ($captcha) { ?> + <label for="securitycode"><?php echo $langs->trans('SecurityCode'); ?></label> + <input type="text" id="securitycode" name="securitycode" /> + <div align="center"><img src="<?php echo $dol_url_root.'/lib/antispamimage.php'; ?>" border="0" width="128" height="36" /></div> + <?php } ?> + </div> + + <input type="submit" data-theme="b" value="<?php echo $langs->trans('Connection'); ?>" /> + + </form> -<?php if ($forgetpasslink || $helpcenterlink) { ?> - <span class="graytitle"><?php echo $langs->trans('Tools'); ?></span> - <ul class="pageitem"> - <?php if ($forgetpasslink) { ?> - <li class="menu"> - <a href="<?php echo $dol_url_root.'/user/passwordforgotten.php'; ?>"> - <img alt="tools" src="<?php echo $dol_url_root.'/theme/phones/smartphone/theme/'.$smartphone->theme.'/thumbs/tools.png'; ?>" /> - <span class="name"><?php echo $langs->trans('PasswordForgotten'); ?></span> - <span class="arrow"></span> - </a> - </li> - <?php } ?> - - <?php if ($helpcenterlink) { ?> - <li class="menu"> - <a href="<?php echo $dol_url_root.'/support/index.php'; ?>"> - <img alt="support" src="<?php echo $dol_url_root.'/theme/phones/smartphone/theme/'.$smartphone->theme.'/thumbs/support.png'; ?>" /> - <span class="name"><?php echo $langs->trans('NeedHelpCenter'); ?></span> - <span class="arrow"></span> - </a> - </li> - <?php } ?> - </ul> -<?php } ?> + <?php if ($forgetpasslink || $helpcenterlink) { ?> + <br /> + <ul data-role="listview" data-inset="true" data-theme="c" data-dividertheme="b"> + <li data-role="list-divider"><?php echo $langs->trans('Tools'); ?></li> + + <?php if ($forgetpasslink) { ?> + <li> + <img alt="tools" class="ui-li-icon" src="<?php echo $dol_url_root.'/theme/phones/smartphone/theme/'.$smartphone->theme.'/thumbs/tools.png'; ?>" /> + <a href="<?php echo './user/passwordforgotten.php'; ?>"><?php echo $langs->trans('PasswordForgotten'); ?></a> + </li> + <?php } ?> + + <?php if ($helpcenterlink) { ?> + <li> + <img alt="support" class="ui-li-icon" src="<?php echo $dol_url_root.'/theme/phones/smartphone/theme/'.$smartphone->theme.'/thumbs/support.png'; ?>" /> + <a href="<?php echo './support/index.php'; ?>"><?php echo $langs->trans('NeedHelpCenter'); ?></a> + </li> + <?php } ?> + </ul> + <?php } ?> + + </div><!-- /content --> + +</div><!-- /page --> <?php if ($dol_loginmesg) { ?> <script type="text/javascript" language="javascript">