TakePOS can use the same CSS properties than app

This commit is contained in:
Laurent Destailleur 2020-01-27 02:06:34 +01:00
parent df478dc170
commit d4223c3d82
7 changed files with 68 additions and 8 deletions

View File

@ -1,3 +1,62 @@
<?php
/* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2007-2017 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2011 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
*
* 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 3 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, see <https://www.gnu.org/licenses/>.
*/
/**
* \file htdocs/theme/eldy/style.css.php
* \brief File for CSS style sheet Eldy
*/
//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Not disabled because need to load personalized language
//if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Not disabled to increase speed. Language code is found on url.
if (!defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1');
//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); // Not disabled because need to do translations
if (!defined('NOCSRFCHECK')) define('NOCSRFCHECK', 1);
if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', 1);
if (!defined('NOLOGIN')) define('NOLOGIN', 1); // File must be accessed by logon page so without login
//if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU',1); // We need top menu content
if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', 1);
if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1');
define('ISLOADEDBYSTEELSHEET', '1');
session_cache_limiter('public');
require_once __DIR__.'/../../main.inc.php'; // __DIR__ allow this script to be included in custom themes
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
// Define css type
top_httphead('text/css');
// Important: Following code is to avoid page request by browser and PHP CPU at each Dolibarr page access.
if (empty($dolibarr_nocache)) header('Cache-Control: max-age=10800, public, must-revalidate');
else header('Cache-Control: no-cache');
require DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
if (defined('THEME_ONLY_CONSTANT')) return;
?>
html,body {
box-sizing: border-box;
padding:0px;
@ -347,7 +406,8 @@ div.description_content {
}
.topnav{
background-color: rgb(60,70,100);
background: rgb(<?php echo $colorbackhmenu1 ?>);
background-image: linear-gradient(-45deg, <?php echo colorAdjustBrightness(colorArrayToHex(colorStringToArray($colorbackhmenu1)), '5'); ?>, rgb(<?php echo $colorbackhmenu1 ?>));
overflow: hidden;
height: 100%;
}

View File

@ -86,7 +86,7 @@ $title='TakePOS - Dolibarr '.DOL_VERSION;
if (! empty($conf->global->MAIN_APPLICATION_TITLE)) $title='TakePOS - '.$conf->global->MAIN_APPLICATION_TITLE;
top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss);
?>
<link rel="stylesheet" href="css/pos.css?a=xxx">
<link rel="stylesheet" href="css/pos.css.php?a=xxx">
<style type="text/css">
div.tablediv{
background-image:url(img/table.gif);

View File

@ -45,7 +45,7 @@ $action = GETPOST('action', 'alpha');
* View
*/
$arrayofcss = array('/takepos/css/pos.css');
$arrayofcss = array('/takepos/css/pos.css.php');
$arrayofjs=array();
top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss);

View File

@ -65,7 +65,7 @@ if ($conf->global->TAKEPOS_PHONE_BASIC_LAYOUT == 1 && $conf->browser->layout ==
<meta name="mobile-web-app-capable" content="yes">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>';
top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss);
print '<link rel="stylesheet" href="css/pos.css">
print '<link rel="stylesheet" href="css/pos.css.php">
<link rel="stylesheet" href="css/colorbox.css" type="text/css" media="screen" />
<script type="text/javascript" src="js/jquery.colorbox-min.js"></script>';
}

View File

@ -67,7 +67,7 @@ else
}
}
$arrayofcss = array('/takepos/css/pos.css');
$arrayofcss = array('/takepos/css/pos.css.php');
$arrayofjs=array();
top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss);
@ -92,7 +92,7 @@ if ($resql) {
}
}
?>
<link rel="stylesheet" href="css/pos.css">
<link rel="stylesheet" href="css/pos.css.php">
</head>
<body>

View File

@ -68,7 +68,7 @@ else
$langs->loadLangs(array("main", "bills", "cashdesk"));
?>
<link rel="stylesheet" href="css/pos.css">
<link rel="stylesheet" href="css/pos.css.php">
</head>
<body class="center">

View File

@ -96,7 +96,7 @@ $head = '<meta name="apple-mobile-web-app-title" content="TakePOS"/>
top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss);
?>
<link rel="stylesheet" href="css/pos.css">
<link rel="stylesheet" href="css/pos.css.php">
<link rel="stylesheet" href="css/colorbox.css" type="text/css" media="screen" />
<script type="text/javascript" src="js/jquery.colorbox-min.js"></script> <!-- TODO It seems we don't need this -->
<script language="javascript">