This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2022-07-04 10:47:41 -07:00
parent 1064eae93e
commit a28cc5492d
14 changed files with 6988 additions and 34 deletions

View File

@@ -70,21 +70,37 @@ function log(mensaje) {
console.log(mensaje);
}
function FiltrarTabla(idtxt, idtable, idcontador) {
if ($('#' + idtxt).val() == '') { $('table#' + idtable + ' tr').css('display', 'table-row'); }
if ($('#' + idtxt).val() == '') { $('table#' + idtable + ' tr').css('display', ''); }
else {
$('table#' + idtable + ' tr:not(.ADtr)').css('display', 'none'); $('table#' + idtable + ' tr:contains("' + $('#' + idtxt).val() + '")').css('display', 'table-row');
$('table#' + idtable + ' tr:not(.ADtr)').css('display', 'none'); $('table#' + idtable + ' tr:contains("' + $('#' + idtxt).val() + '")').css('display', '');
$('div.ADScroller .ADScroller-header table#' + idtable + ' tr:not(.ADtr)').css('display', '');
}
if ($('#' + idcontador).length > 0) {
$('#' + idcontador).html($('#' + idtable + ' tr:visible').length);
}
}
function FiltrarTablaClass(idtxt, idtable, idcontador, resta) {
if (resta == null) {
resta =1
}
if ($('#' + idtxt).val() == '') { $('table#' + idtable + ' tr').removeClass('hidetrad') }
else {
$('table#' + idtable + ' tr:not(.ADtr)').addClass('hidetrad'); $('table#' + idtable + ' tr:contains("' + $('#' + idtxt).val() + '")').removeClass('hidetrad');
$('div.ADScroller .ADScroller-header table#' + idtable + ' tr:not(.ADtr)').removeClass('hidetrad');
}
if ($('#' + idcontador).length > 0) {
let numconta = $('#' + idtable + ' tr:not(.hidetrad):not(.ADtr)').length;
if (numconta > 0) { numconta - resta}
$('#' + idcontador).html(numconta );
}
}
function FiltrarTablaV2(idtxt, idtable, idcontador) {
if ($(idtxt).val() == '') { $(idtable + ' tr').css('display', ''); }
else {
$(idtable + ' tr:not(.ADtr)').css('display', 'none'); $(idtable + ' tr:contains("' + $(idtxt).val() + '")').css('display', '');
$('div.ADScroller .ADScroller-header '+idtable + ' tr:not(.ADtr)').css('display', '');
$('div.ADScroller .ADScroller-header ' + idtable + ' tr:not(.ADtr)').css('display', '');
}
if ($('#' + idcontador).length > 0) {
$('#' + idcontador).html($(idtable + ' tr:visible').length);
@@ -542,7 +558,7 @@ function ADScroller2() {
function () { $('table#ADCol' + Tid + ' tr:nth-child(' + ($(this).index() + 1) + ')').addClass('hover'); },
function () { $('table#ADCol' + Tid + ' tr:nth-child(' + ($(this).index() + 1) + ')').removeClass('hover'); });
setTimeout(sizeoftablefunc, 100);
Tthis.parent().parent().bind('resize', function () {
setTimeout(resizefncscroller, 100);
})
@@ -912,7 +928,7 @@ ADSScroll = function (tablescroll) {
//objDiv.append(tablescroll);
if (firsttr) {
let childitem = firsttr.find('> td,th').length;
let contador =1
let contador = 1
firsttr.find('> td,th').each(function () {
var thistd = $(this);
let widthitem = thistd.width();
@@ -1099,7 +1115,7 @@ function ADDropzone(txtid) {
document.getElementById(txtid + '-paste').onpaste = function (event) {
var __This = myDropzone;
var objfiles = JSON.parse(TxtField.val());
if ((maxFile != null) || (maxFile < 1) || objfiles.length < maxFile) {
if ((maxFile != null) || (maxFile < 1) || objfiles.length < maxFile) {
// use event.originalEvent.clipboard for newer chrome versions
var items = (event.clipboardData || event.originalEvent.clipboardData).items;
//console.log(JSON.stringify(items)); // will give you the mime types