diff --git a/htdocs/takepos/css/pos.css.php b/htdocs/takepos/css/pos.css.php index 4666de59a8e..503ae0123f9 100644 --- a/htdocs/takepos/css/pos.css.php +++ b/htdocs/takepos/css/pos.css.php @@ -669,3 +669,70 @@ div#moreinfo, div#infowarehouse { padding-right: 4px; } } + +/* Modal box */ +.modal { + display: none; /* Hidden by default */ + position: fixed; + z-index: 20; + left: 0; + top: 0; + width: 100%; + height: 100%; + overflow: auto; + background-color: rgb(0,0,0); + background-color: rgba(0,0,0,0.4); +} + +/* The Close Button */ +.close { + color: #aaa; + float: right; + font-size: 28px; + font-weight: bold; +} + +.close:hover, +.close:focus { + color: black; + text-decoration: none; + cursor: pointer; +} + +.modal-header { + padding: 2px 16px; + background-color: #2b4161; + color: white; +} + +.modal-body {padding: 2px 16px;} + +.modal-content { + position: relative; + background-color: #fefefe; + margin: 15% auto; /* 15% from the top and centered */ + padding: 0; + border: 1px solid #888; + width: 40%; + box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19); + animation-name: animatetop; + animation-duration: 0.4s +} + +@keyframes animatetop { + from {top: -300px; opacity: 0} + to {top: 0; opacity: 1} +} + +.block { + display: block; + width: 100%; + border: none; + color: white; + background-color: #8c907e; + padding: 14px 28px; + font-size: 16px; + cursor: pointer; + text-align: center; + margin: 2px; +} diff --git a/htdocs/takepos/index.php b/htdocs/takepos/index.php index 73b039d97e9..bcc56ff0166 100644 --- a/htdocs/takepos/index.php +++ b/htdocs/takepos/index.php @@ -728,27 +728,12 @@ function CashReport(rowid) // Popup to select the terminal to use function TerminalsDialog() { - jQuery("#dialog-info").dialog({ - resizable: false, - height: global->TAKEPOS_NUM_TERMINALS / 3 * 20); ?>, - width: dol_optimize_smallscreen ? 316 : 400); ?>, - modal: true, - buttons: { - 'trans("Terminal")) ?> 1': function() { - location.href='index.php?setterminal=1'; - } - global->TAKEPOS_NUM_TERMINALS; $i++) - { - print ", - '".dol_escape_js($langs->trans("Terminal"))." ".$i."': function() { - location.href='index.php?setterminal=".$i."'; - } - "; - } - ?> - } - }); + var modal = document.getElementById("ModalTerminal"); + var span = document.getElementsByClassName("close")[0]; + span.onclick = function() { + modal.style.display = "none"; + } + modal.style.display = "block"; } function DirectPayment(){ @@ -802,7 +787,6 @@ $( document ).ready(function() {
'.$langs->trans('TerminalSelect').''; $keyCodeForEnter = $conf->global->{'CASHDESK_READER_KEYCODE_FOR_ENTER'.$_SESSION['takeposterminal']} > 0 ? $conf->global->{'CASHDESK_READER_KEYCODE_FOR_ENTER'.$_SESSION['takeposterminal']} : ''; ?>