Skip to content

Commit

Permalink
Colorful theme for TakePOS
Browse files Browse the repository at this point in the history
  • Loading branch information
andreubisquerra committed Jan 19, 2020
1 parent f09ca62 commit 98789c9
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 0 deletions.
2 changes: 2 additions & 0 deletions htdocs/langs/en_US/cashdesk.lang
Expand Up @@ -81,3 +81,5 @@ CustomReceipt=Custom Receipt
ReceiptName=Receipt Name
ProductSupplements=Product Supplements
SupplementCategory=Supplement category
ColorTheme=Color theme
Colorful=Colorful
9 changes: 9 additions & 0 deletions htdocs/takepos/admin/setup.php
Expand Up @@ -79,6 +79,7 @@
$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);
Expand Down Expand Up @@ -256,6 +257,14 @@
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');
Expand Down
25 changes: 25 additions & 0 deletions htdocs/takepos/css/colorful.css
@@ -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;
}
3 changes: 3 additions & 0 deletions htdocs/takepos/pay.php
Expand Up @@ -93,6 +93,9 @@
}
?>
<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>

Expand Down
3 changes: 3 additions & 0 deletions htdocs/takepos/takepos.php
Expand Up @@ -95,6 +95,9 @@
?>
<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
Expand Down

0 comments on commit 98789c9

Please sign in to comment.