Skip to content
Snippets Groups Projects
Commit 924451f5 authored by Regis Houssin's avatar Regis Houssin
Browse files

New: add jQuery mobile for smartphone

parent 5d8d6902
No related branches found
No related tags found
No related merge requests found
<?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 }
......@@ -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>
......
......@@ -22,87 +22,66 @@ $smartphone->smartheader();
<!-- START LOGIN SMARTPHONE TEMPLATE -->
<div id="topbar">
<div id="title"><?php echo $title; ?></div>
<div data-role="page" id="dol-home" data-theme="b">
<div data-role="content">
<div id="dol-homeheader">
<h1><img src="<?php echo $dol_url_root.'/theme/phones/smartphone/theme/'.$smartphone->theme.'/thumbs/dolibarr.png'; ?>"></h1>
</div>
<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 align="center">
<img src="<?php echo $dol_url_root.'/theme/phones/smartphone/theme/'.$smartphone->theme.'/thumbs/dolibarr.png'; ?>">
</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>
<div data-role="fieldcontain">
<label for="username"><?php echo $langs->trans('Login'); ?></label>
<input type="text" name="username" id="username" value="<?php echo $login; ?>" />
<li class="bigfield">
<input placeholder="<?php echo $langs->trans('Password'); ?>" type="password" id="password" name="password" value="<?php echo $password; ?>" />
</li>
</ul>
<label for="password"><?php echo $langs->trans('Password'); ?></label>
<input type="password" name="password" id="password" value="<?php echo $password; ?>" />
<?php if ($select_entity) { ?>
<span class="graytitle"><?php echo $langs->trans('Entity'); ?></span>
<ul class="pageitem">
<li class="select">
<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>
<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>
<ul class="pageitem">
<li class="button">
<input name="input Button" type="submit" value="<?php echo $langs->trans('Connection'); ?>" />
</li>
</ul>
<input type="submit" data-theme="b" value="<?php echo $langs->trans('Connection'); ?>" />
</form>
</div>
<?php if ($forgetpasslink || $helpcenterlink) { ?>
<span class="graytitle"><?php echo $langs->trans('Tools'); ?></span>
<ul class="pageitem">
<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 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>
<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 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>
<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">
alert('<?php echo $dol_loginmesg; ?>');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment