This commit is contained in:
@@ -12,6 +12,21 @@ console.error = function (texto) {
|
||||
setTimeout(function () { if (Metronic && Metronic.unblockUI) { Metronic.unblockUI(); } }, 10);
|
||||
conf.error(texto);
|
||||
};
|
||||
|
||||
function SaveCsv(filename, data) {
|
||||
var blob = new Blob([data], { type: 'text/csv' });
|
||||
if (window.navigator.msSaveOrOpenBlob) {
|
||||
window.navigator.msSaveBlob(blob, filename);
|
||||
}
|
||||
else {
|
||||
var elem = window.document.createElement('a');
|
||||
elem.href = window.URL.createObjectURL(blob);
|
||||
elem.download = filename;
|
||||
document.body.appendChild(elem);
|
||||
elem.click();
|
||||
document.body.removeChild(elem);
|
||||
}
|
||||
}
|
||||
function alertatoast(tipo, Mensaje, Funcion, timeout) {
|
||||
if (timeout) {
|
||||
timeout = timeout * 1000;//convierto a milisegundos
|
||||
|
||||
Reference in New Issue
Block a user