Colorful theme for TakePOS

This commit is contained in:
andreubisquerra 2020-01-19 19:16:45 +01:00
parent f09ca62e93
commit 98789c908e
5 changed files with 42 additions and 0 deletions

View File

@ -81,3 +81,5 @@ CustomReceipt=Custom Receipt
ReceiptName=Receipt Name
ProductSupplements=Product Supplements
SupplementCategory=Supplement category
ColorTheme=Color theme
Colorful=Colorful

View File

@ -79,6 +79,7 @@ if (GETPOST('action', 'alpha') == 'set')
$res = dolibarr_set_const($db, "TAKEPOS_SUPPLEMENTS_CATEGORY", GETPOST('TAKEPOS_SUPPLEMENTS_CATEGORY', 'alpha'), 'chaine', 0, '', $conf->entity);
$res = dolibarr_set_const($db, "TAKEPOS_AUTO_PRINT_TICKETS", GETPOST('TAKEPOS_AUTO_PRINT_TICKETS', 'int'), 'int', 0, '', $conf->entity);
$res = dolibarr_set_const($db, "TAKEPOS_NUMPAD", GETPOST('TAKEPOS_NUMPAD', 'alpha'), 'chaine', 0, '', $conf->entity);
$res = dolibarr_set_const($db, "TAKEPOS_COLOR_THEME", GETPOST('TAKEPOS_COLOR_THEME', 'alpha'), 'chaine', 0, '', $conf->entity);
$res = dolibarr_set_const($db, "TAKEPOS_NUM_TERMINALS", GETPOST('TAKEPOS_NUM_TERMINALS', 'alpha'), 'chaine', 0, '', $conf->entity);
$res = dolibarr_set_const($db, "TAKEPOS_DIRECT_PAYMENT", GETPOST('TAKEPOS_DIRECT_PAYMENT', 'int'), 'int', 0, '', $conf->entity);
$res = dolibarr_set_const($db, "TAKEPOS_CUSTOM_RECEIPT", GETPOST('TAKEPOS_CUSTOM_RECEIPT', 'int'), 'int', 0, '', $conf->entity);
@ -256,6 +257,14 @@ $array = array(0=>$langs->trans("Numberspad"), 1=>$langs->trans("BillsCoinsPad")
print $form->selectarray('TAKEPOS_NUMPAD', $array, (empty($conf->global->TAKEPOS_NUMPAD) ? '0' : $conf->global->TAKEPOS_NUMPAD), 0);
print "</td></tr>\n";
// Color theme
print '<tr class="oddeven"><td>';
print $langs->trans("ColorTheme");
print '<td colspan="2">';
$array = array(0=>"eldy", 1=>$langs->trans("Colorful"));
print $form->selectarray('TAKEPOS_COLOR_THEME', $array, (empty($conf->global->TAKEPOS_COLOR_THEME) ? '0' : $conf->global->TAKEPOS_COLOR_THEME), 0);
print "</td></tr>\n";
// Direct Payment
print '<tr class="oddeven"><td>';
print $langs->trans('DirectPaymentButton');

View File

@ -0,0 +1,25 @@
button.calcbutton {
background-color: #008000 !important;
}
button.calcbutton.poscolorblue {
background-color: #0000FF !important;
}
button.calcbutton2 {
background-color: #0000FF !important;
}
button.calcbutton2.poscolordelete {
background-color: #FF0000 !important;
color: #FFFFFF !important;
}
button.actionbutton {
background: #FFB100 !important;
}
tr.selected, tr.selected td {
background-color: #0000FF !important;
color: #FFFFFF !important;
}

View File

@ -93,6 +93,9 @@ if ($resql) {
}
?>
<link rel="stylesheet" href="css/pos.css">
<?php
if ($conf->global->TAKEPOS_COLOR_THEME == 1) print '<link rel="stylesheet" href="css/colorful.css">';
?>
</head>
<body>

View File

@ -95,6 +95,9 @@ top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss);
?>
<link rel="stylesheet" href="css/pos.css">
<link rel="stylesheet" href="css/colorbox.css" type="text/css" media="screen" />
<?php
if ($conf->global->TAKEPOS_COLOR_THEME == 1) print '<link rel="stylesheet" href="css/colorful.css">';
?>
<script type="text/javascript" src="js/jquery.colorbox-min.js"></script> <!-- TODO It seems we don't need this -->
<script language="javascript">
<?php