Merge pull request #14837 from andreubisquerra/master
NEW: Introducing new modal boxes in TakePOS
This commit is contained in:
commit
e86bbe346a
@ -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;
|
||||
}
|
||||
|
||||
@ -728,27 +728,12 @@ function CashReport(rowid)
|
||||
// Popup to select the terminal to use
|
||||
function TerminalsDialog()
|
||||
{
|
||||
jQuery("#dialog-info").dialog({
|
||||
resizable: false,
|
||||
height: <?php echo 180 + round($conf->global->TAKEPOS_NUM_TERMINALS / 3 * 20); ?>,
|
||||
width: <?php echo ($conf->dol_optimize_smallscreen ? 316 : 400); ?>,
|
||||
modal: true,
|
||||
buttons: {
|
||||
'<?php echo dol_escape_js($langs->trans("Terminal")) ?> 1': function() {
|
||||
location.href='index.php?setterminal=1';
|
||||
}
|
||||
<?php
|
||||
for ($i = 2; $i <= $conf->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() {
|
||||
|
||||
<body class="bodytakepos" style="overflow: hidden;">
|
||||
<?php
|
||||
print '<div class="hidden dialog-info-takepos-terminal" id="dialog-info" title="TakePOS">'.$langs->trans('TerminalSelect').'</div>';
|
||||
$keyCodeForEnter = $conf->global->{'CASHDESK_READER_KEYCODE_FOR_ENTER'.$_SESSION['takeposterminal']} > 0 ? $conf->global->{'CASHDESK_READER_KEYCODE_FOR_ENTER'.$_SESSION['takeposterminal']} : '';
|
||||
?>
|
||||
<div class="container">
|
||||
@ -853,6 +837,28 @@ if (empty($conf->global->TAKEPOS_HIDE_HEAD_BAR)) {
|
||||
}
|
||||
?>
|
||||
|
||||
<!-- Modal terminal box -->
|
||||
<div id="ModalTerminal" class="modal">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<span class="close">×</span>
|
||||
<h3><?php print $langs->trans("TerminalSelect");?></h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<button type="button" class="block" onclick="location.href='index.php?setterminal=1'"><?php print $langs->trans("Terminal");?> 1</button>
|
||||
<?php
|
||||
for ($i = 2; $i <= $conf->global->TAKEPOS_NUM_TERMINALS; $i++)
|
||||
{
|
||||
print '<button type="button" class="block" onclick="location.href=\'index.php?setterminal='.$i.'\'">'.$langs->trans("Terminal").' '.$i.'</button>';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="row1<?php if (empty($conf->global->TAKEPOS_HIDE_HEAD_BAR)) print 'withhead'; ?>">
|
||||
|
||||
<div id="poslines" class="div1">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user