From 98789c908edb76e685340ad450bbed0d1cf9111b Mon Sep 17 00:00:00 2001 From: andreubisquerra Date: Sun, 19 Jan 2020 19:16:45 +0100 Subject: [PATCH] Colorful theme for TakePOS --- htdocs/langs/en_US/cashdesk.lang | 2 ++ htdocs/takepos/admin/setup.php | 9 +++++++++ htdocs/takepos/css/colorful.css | 25 +++++++++++++++++++++++++ htdocs/takepos/pay.php | 3 +++ htdocs/takepos/takepos.php | 3 +++ 5 files changed, 42 insertions(+) create mode 100644 htdocs/takepos/css/colorful.css diff --git a/htdocs/langs/en_US/cashdesk.lang b/htdocs/langs/en_US/cashdesk.lang index 964bd7c436c..db4d41b254c 100644 --- a/htdocs/langs/en_US/cashdesk.lang +++ b/htdocs/langs/en_US/cashdesk.lang @@ -81,3 +81,5 @@ CustomReceipt=Custom Receipt ReceiptName=Receipt Name ProductSupplements=Product Supplements SupplementCategory=Supplement category +ColorTheme=Color theme +Colorful=Colorful diff --git a/htdocs/takepos/admin/setup.php b/htdocs/takepos/admin/setup.php index ebd0e0659e4..e488da6ec6a 100644 --- a/htdocs/takepos/admin/setup.php +++ b/htdocs/takepos/admin/setup.php @@ -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 "\n"; +// Color theme +print ''; +print $langs->trans("ColorTheme"); +print ''; +$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 "\n"; + // Direct Payment print ''; print $langs->trans('DirectPaymentButton'); diff --git a/htdocs/takepos/css/colorful.css b/htdocs/takepos/css/colorful.css new file mode 100644 index 00000000000..3cfd18e72f1 --- /dev/null +++ b/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; +} \ No newline at end of file diff --git a/htdocs/takepos/pay.php b/htdocs/takepos/pay.php index c44ba9b522b..8d0f0c909fb 100644 --- a/htdocs/takepos/pay.php +++ b/htdocs/takepos/pay.php @@ -93,6 +93,9 @@ if ($resql) { } ?> +global->TAKEPOS_COLOR_THEME == 1) print ''; +?> diff --git a/htdocs/takepos/takepos.php b/htdocs/takepos/takepos.php index cd2d7d66df1..e901519d9cc 100644 --- a/htdocs/takepos/takepos.php +++ b/htdocs/takepos/takepos.php @@ -95,6 +95,9 @@ top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); ?> +global->TAKEPOS_COLOR_THEME == 1) print ''; +?>