CSS Makes clear you have to click OK.
This commit is contained in:
parent
32c6daee2f
commit
ec52502089
@ -141,7 +141,9 @@ button.calcbutton2 {
|
|||||||
margin: 1px;
|
margin: 1px;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
}
|
}
|
||||||
|
button.calcbutton2.clicked {
|
||||||
|
background-color: #8855AA;
|
||||||
|
}
|
||||||
button.calcbutton2 .iconwithlabel {
|
button.calcbutton2 .iconwithlabel {
|
||||||
padding-bottom: 10px;
|
padding-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -205,6 +205,9 @@ if(localStorage.hasKeyboard) {
|
|||||||
function ClearSearch() {
|
function ClearSearch() {
|
||||||
console.log("ClearSearch");
|
console.log("ClearSearch");
|
||||||
$("#search").val('');
|
$("#search").val('');
|
||||||
|
$("#qty").html("<?php echo $langs->trans("Qty"); ?>").removeClass('clicked');
|
||||||
|
$("#price").html("<?php echo $langs->trans("Price"); ?>").removeClass('clicked');
|
||||||
|
$("#reduction").html("<?php echo $langs->trans("ReductionShort"); ?>").removeClass('clicked');
|
||||||
<?php if ($conf->browser->layout == 'classic') { ?>
|
<?php if ($conf->browser->layout == 'classic') { ?>
|
||||||
setFocusOnSearchField();
|
setFocusOnSearchField();
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
@ -720,8 +723,9 @@ function Search2(keyCodeForEnter, moreorless) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Function called on an action into the PAD */
|
||||||
function Edit(number) {
|
function Edit(number) {
|
||||||
console.log("We click on PAD on number="+number);
|
console.log("We click on PAD on key="+number);
|
||||||
|
|
||||||
if (typeof(selectedtext) == "undefined") {
|
if (typeof(selectedtext) == "undefined") {
|
||||||
return; // We click on an action on the number pad but there is no line selected
|
return; // We click on an action on the number pad but there is no line selected
|
||||||
@ -730,20 +734,19 @@ function Edit(number) {
|
|||||||
var text=selectedtext+"<br> ";
|
var text=selectedtext+"<br> ";
|
||||||
|
|
||||||
|
|
||||||
if (number=='c'){
|
if (number=='c') {
|
||||||
editnumber="";
|
editnumber='';
|
||||||
Refresh();
|
Refresh();
|
||||||
$("#qty").html("<?php echo $langs->trans("Qty"); ?>");
|
$("#qty").html("<?php echo $langs->trans("Qty"); ?>").removeClass('clicked');
|
||||||
$("#price").html("<?php echo $langs->trans("Price"); ?>");
|
$("#price").html("<?php echo $langs->trans("Price"); ?>").removeClass('clicked');
|
||||||
$("#reduction").html("<?php echo $langs->trans("ReductionShort"); ?>");
|
$("#reduction").html("<?php echo $langs->trans("ReductionShort"); ?>").removeClass('clicked');
|
||||||
return;
|
return;
|
||||||
}
|
} else if (number=='qty') {
|
||||||
else if (number=='qty'){
|
if (editaction=='qty' && editnumber != '') {
|
||||||
if (editaction=='qty' && editnumber!=""){
|
|
||||||
$("#poslines").load("invoice.php?action=updateqty&place="+place+"&idline="+selectedline+"&number="+editnumber, function() {
|
$("#poslines").load("invoice.php?action=updateqty&place="+place+"&idline="+selectedline+"&number="+editnumber, function() {
|
||||||
editnumber="";
|
editnumber="";
|
||||||
//$('#poslines').scrollTop($('#poslines')[0].scrollHeight);
|
//$('#poslines').scrollTop($('#poslines')[0].scrollHeight);
|
||||||
$("#qty").html("<?php echo $langs->trans("Qty"); ?>");
|
$("#qty").html("<?php echo $langs->trans("Qty"); ?>").removeClass('clicked');
|
||||||
});
|
});
|
||||||
|
|
||||||
setFocusOnSearchField();
|
setFocusOnSearchField();
|
||||||
@ -752,13 +755,12 @@ function Edit(number) {
|
|||||||
else {
|
else {
|
||||||
editaction="qty";
|
editaction="qty";
|
||||||
}
|
}
|
||||||
}
|
} else if (number=='p') {
|
||||||
else if (number=='p'){
|
if (editaction=='p' && editnumber!="") {
|
||||||
if (editaction=='p' && editnumber!=""){
|
|
||||||
$("#poslines").load("invoice.php?action=updateprice&place="+place+"&idline="+selectedline+"&number="+editnumber, function() {
|
$("#poslines").load("invoice.php?action=updateprice&place="+place+"&idline="+selectedline+"&number="+editnumber, function() {
|
||||||
editnumber="";
|
editnumber="";
|
||||||
//$('#poslines').scrollTop($('#poslines')[0].scrollHeight);
|
//$('#poslines').scrollTop($('#poslines')[0].scrollHeight);
|
||||||
$("#price").html("<?php echo $langs->trans("Price"); ?>");
|
$("#price").html("<?php echo $langs->trans("Price"); ?>").removeClass('clicked');
|
||||||
});
|
});
|
||||||
|
|
||||||
ClearSearch();
|
ClearSearch();
|
||||||
@ -767,13 +769,12 @@ function Edit(number) {
|
|||||||
else {
|
else {
|
||||||
editaction="p";
|
editaction="p";
|
||||||
}
|
}
|
||||||
}
|
} else if (number=='r') {
|
||||||
else if (number=='r'){
|
if (editaction=='r' && editnumber!="") {
|
||||||
if (editaction=='r' && editnumber!=""){
|
|
||||||
$("#poslines").load("invoice.php?action=updatereduction&place="+place+"&idline="+selectedline+"&number="+editnumber, function() {
|
$("#poslines").load("invoice.php?action=updatereduction&place="+place+"&idline="+selectedline+"&number="+editnumber, function() {
|
||||||
editnumber="";
|
editnumber="";
|
||||||
//$('#poslines').scrollTop($('#poslines')[0].scrollHeight);
|
//$('#poslines').scrollTop($('#poslines')[0].scrollHeight);
|
||||||
$("#reduction").html("<?php echo $langs->trans("ReductionShort"); ?>");
|
$("#reduction").html("<?php echo $langs->trans("ReductionShort"); ?>").removeClass('clicked');
|
||||||
});
|
});
|
||||||
|
|
||||||
ClearSearch();
|
ClearSearch();
|
||||||
@ -788,21 +789,21 @@ function Edit(number) {
|
|||||||
}
|
}
|
||||||
if (editaction=='qty'){
|
if (editaction=='qty'){
|
||||||
text=text+"<?php echo $langs->trans("Modify")." -> ".$langs->trans("Qty").": "; ?>";
|
text=text+"<?php echo $langs->trans("Modify")." -> ".$langs->trans("Qty").": "; ?>";
|
||||||
$("#qty").html("OK");
|
$("#qty").html("OK").addClass("clicked");
|
||||||
$("#price").html("<?php echo $langs->trans("Price"); ?>");
|
$("#price").html("<?php echo $langs->trans("Price"); ?>").removeClass('clicked');
|
||||||
$("#reduction").html("<?php echo $langs->trans("ReductionShort"); ?>");
|
$("#reduction").html("<?php echo $langs->trans("ReductionShort"); ?>").removeClass('clicked');
|
||||||
}
|
}
|
||||||
if (editaction=='p'){
|
if (editaction=='p'){
|
||||||
text=text+"<?php echo $langs->trans("Modify")." -> ".$langs->trans("Price").": "; ?>";
|
text=text+"<?php echo $langs->trans("Modify")." -> ".$langs->trans("Price").": "; ?>";
|
||||||
$("#qty").html("<?php echo $langs->trans("Qty"); ?>");
|
$("#qty").html("<?php echo $langs->trans("Qty"); ?>").removeClass('clicked');
|
||||||
$("#price").html("OK");
|
$("#price").html("OK").addClass("clicked");
|
||||||
$("#reduction").html("<?php echo $langs->trans("ReductionShort"); ?>");
|
$("#reduction").html("<?php echo $langs->trans("ReductionShort"); ?>").removeClass('clicked');
|
||||||
}
|
}
|
||||||
if (editaction=='r'){
|
if (editaction=='r'){
|
||||||
text=text+"<?php echo $langs->trans("Modify")." -> ".$langs->trans("ReductionShort").": "; ?>";
|
text=text+"<?php echo $langs->trans("Modify")." -> ".$langs->trans("ReductionShort").": "; ?>";
|
||||||
$("#qty").html("<?php echo $langs->trans("Qty"); ?>");
|
$("#qty").html("<?php echo $langs->trans("Qty"); ?>").removeClass('clicked');
|
||||||
$("#price").html("<?php echo $langs->trans("Price"); ?>");
|
$("#price").html("<?php echo $langs->trans("Price"); ?>").removeClass('clicked');
|
||||||
$("#reduction").html("OK");
|
$("#reduction").html("OK").addClass("clicked");
|
||||||
}
|
}
|
||||||
$('#'+selectedline).find("td:first").html(text+editnumber);
|
$('#'+selectedline).find("td:first").html(text+editnumber);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user