This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2020-05-20 19:55:26 -07:00
parent 8d365fb311
commit 766873b1b0
19 changed files with 1005 additions and 342 deletions

View File

@@ -12,11 +12,11 @@ console.error = function (texto) {
setTimeout(function () { if (Metronic && Metronic.unblockUI) { Metronic.unblockUI(); } }, 10);
conf.error(texto);
};
function alertatoast(tipo,Mensaje,Funcion,timeout){
function alertatoast(tipo, Mensaje, Funcion, timeout) {
if (timeout) {
timeout = timeout * 1000;//convierto a milisegundos
} else { timeout = 0;}
let opciones ={
} else { timeout = 0; }
let opciones = {
"closeButton": true,
"debug": false,
"positionClass": "toast-top-right",
@@ -31,7 +31,7 @@ function alertatoast(tipo,Mensaje,Funcion,timeout){
"hideMethod": "fadeOut"
}
switch (tipo) {
case 5:
toastr.success(Mensaje, "", opciones);
@@ -48,7 +48,7 @@ function alertatoast(tipo,Mensaje,Funcion,timeout){
default:
toastr.info(Mensaje, "", opciones);
}
}
function log(mensaje) {
console.log(mensaje);
@@ -469,7 +469,7 @@ function CargaPickers() {
let button = $(datetimeButton);
if (button && button.length) {
button.unbind("click");
button.bind("click", function () {
button.bind("click", function () {
TThis.datetimepicker('show')
});
} else {
@@ -761,7 +761,7 @@ ADSScroll = function (tablescroll) {
/* Se Combinan las tablas titulo y cuerpo */
if (idTheader && idTheader.length) {
if ($(idTheader).length) {
$($(idTheader + "> tbody > tr," + idTheader + "> thead > tr," + idTheader +"> tr").get().reverse()).each(function () {
$($(idTheader + "> tbody > tr," + idTheader + "> thead > tr," + idTheader + "> tr").get().reverse()).each(function () {
var trthis = $(this);
tablescroll.prepend(trthis);
rowVisibles += 1;
@@ -1745,7 +1745,7 @@ jQuery(document).ready(function () {
$("body").on("click", ".ajax__tab_outer .ajax__tab_inner .ajax__tab_tab", function () {
setTimeout(loadadscroll, 10);
});
//KeppMenuOpen
//KeppMenuOpen
{
let varpath = window.location.pathname;
if (window.location.pathname != '') {
@@ -1754,7 +1754,7 @@ jQuery(document).ready(function () {
objmenu.parents().filter("li").addClass('active open')
objmenu.parents().filter(".sub-menu").css("display", "")
}
}
}
@@ -1785,8 +1785,8 @@ jQuery(document).ready(function () {
let ckedit = CKEDITOR.replace(id, { /*height: 260,*/autoUpdateElement: false });
ckedit.on('change', function () { $Tthis.val(ckedit.getData().replace(/</gi, '< ')); });
ckedit.on("instanceReady", function () { $Tthis.val($Tthis.val().replace(/</gi, '< '));});
ckedit.on("instanceReady", function () { $Tthis.val($Tthis.val().replace(/</gi, '< ')); });
//CKEDITOR.instances[id].on('change', function () { CKEDITOR.instances[i].updateElement(); });
});
buscadorMenuCaudi();
@@ -1826,7 +1826,49 @@ jQuery(document).ready(function () {
});
//INICIA FUNCION TOOLTIP
$('[data-toggle="tooltip"]').tooltip();
$('table.ConBuscador').each(function () {
let $this = $(this);
let tickBarBmaster = 0;
let strtxtBuscador = $this.data('txtBuscador');
let input = $(strtxtBuscador);
if (strtxtBuscador && strtxtBuscador.length > 0) {
let showhideRows = function () {
usuariotext = input.val();
let strusuario = usuariotext.length > 0 ? ':contains("' + usuariotext + '")' : '';// td:nth-child(2)
$this.find('tr.items').attr('hide', '1');//oculto todos
$this.find('tr.items' + strusuario).attr('hide', '');//muestro los que tienen filtro
};
let txtOnchange = function () {
let obj = input;
let text = '';
tickBarBmaster = tickBarBmaster + 1;
tickBarnew = tickBarBmaster;
setTimeout(function () {
if (tickBarnew == tickBarBmaster) {
if ((text = obj.val().trim()) != usuariotext) {
usuariotext = text;
showhideRows();
}
}
}, 500);
};
if (!input.hasClass('ConEvento')) {
input.bind({
copy: TxtUsuario_Onchange
, paste: TxtUsuario_Onchange
, cut: TxtUsuario_Onchange
, keydown: TxtUsuario_Onchange
, keyup: TxtUsuario_Onchange
});
input.addClass('ConEvento');
}
showhideRows();
}
});
ADSReady();
}
@@ -1834,8 +1876,7 @@ jQuery(document).ready(function () {
if (Notification.permission !== 'denied') {
Notification.requestPermission(function (permission) {
// If the user accepts, let's create a notification
if (permission === "granted") {
}
//if (permission === "granted") { }
});
}