Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions www/htdocs/assets/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -1985,6 +1985,40 @@ td.no-wrap {
margin-bottom: 30px;
}

.btn-limpar-abcd {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 2px 6px;
margin-left: 4px;
color: #444;
background-color: #f0f0f0;
border: 1px solid #ccc;
border-radius: 3px;
text-decoration: none !important;
font-size: 0.9em;
cursor: pointer;
vertical-align: middle;
height: 28px;
box-sizing: border-box;
}
.btn-limpar-abcd:hover {
background-color: #e8e8e8;
color: #d9534f;
border-color: #adadad;
}

textarea+.btn-limpar-abcd {
vertical-align: top;
margin-top: 2px;
}

/* Ensures that no field is wide enough to break the row of buttons */
.table-fdt-four input[type="text"],
.table-fdt-four textarea {
max-width: calc(100% - 150px) !important;
}

/* ==========================================================================
8. SPECIFIC STYLES OF PAGES AND COMPONENTS
========================================================================== */
Expand Down
9 changes: 4 additions & 5 deletions www/htdocs/central/dataentry/dibujarhojaentrada.php
Original file line number Diff line number Diff line change
Expand Up @@ -964,8 +964,8 @@ function TextBox($linea, $fondocelda, $titulo, $ver, $len, $tag, $ksc, $rep, $de
$campo = $campo;
}
if ($maxlength > 0) {
echo " onKeyDown=\"textCounter(document.forma$ixforms.tag_" . $tag . ",document.forma$ixforms.rem$tag,$maxlength)\"
onKeyUp=\"textCounter(document.forma1.tag" . $tag . ",document.forma1.rem$tag,$maxlength)\"";
echo " onKeyDown=\"textCounter(document.forma1.tag" . $tag . ", document.forma1.rem$tag, $maxlength)\"
onKeyUp=\"textCounter(document.forma1.tag" . $tag . ", document.forma1.rem$tag, $maxlength)\"";
}
echo ' onKeyUp="CheckInventory()" >' . $campo . "</textarea>";
if ($maxlength > 0)
Expand Down Expand Up @@ -1916,7 +1916,6 @@ function OpenAll(){
require_once("../dataentry/javascript_validation.php");
}
?>

<script>
document.addEventListener("DOMContentLoaded", function() {
var seletores = 'input[type="text"][name^="field"], input[type="text"][name^="tag"], textarea[name^="field"], textarea[name^="tag"]';
Expand All @@ -1929,8 +1928,8 @@ function OpenAll(){

var btnLimpar = document.createElement('a');
btnLimpar.href = 'javascript:void(0);';
btnLimpar.title = 'Limpar campo';
btnLimpar.className = 'bt-fdt mb-2 mt-0';
btnLimpar.title = 'Clear field';
btnLimpar.className = 'btn-limpar-abcd';
btnLimpar.innerHTML = '<i class="fas fa-eraser"></i>';

campo.parentNode.insertBefore(btnLimpar, campo.nextSibling);
Expand Down