From a00b12e6b6dd349cc701c2547078f25cd1c9ffc3 Mon Sep 17 00:00:00 2001 From: dmendez Date: Thu, 12 Jul 2018 21:00:45 +0000 Subject: [PATCH] Generacion de Archivos con Nombre (Matriz o Foro ) git-tfs-id: [http://192.168.1.10:8080/tfs/AyA]$/SINORT;C223 --- .../DetallePropuestaNormativa.js | 33 ++----------------- 1 file changed, 2 insertions(+), 31 deletions(-) diff --git a/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/PropuestaNormativa/DetallePropuestaNormativa.js b/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/PropuestaNormativa/DetallePropuestaNormativa.js index 9db54c336..33237c61a 100644 --- a/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/PropuestaNormativa/DetallePropuestaNormativa.js +++ b/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/PropuestaNormativa/DetallePropuestaNormativa.js @@ -1687,36 +1687,7 @@ this.ExportarADoc = function (TipoComentario, filename) { html = html + postHtml; - var blob = new Blob(['\ufeff', html], { - type: 'application/msword' - }); - - // Specify link url - //var url = 'data:application/vnd.ms-word;charset=utf-8,' + encodeURIComponent(html); - var url = 'data:application/vnd.ms-word;charset=utf-8,' + encodeURIComponent(html); - - // Specify file name - filename = filename ? filename + '.doc' : 'document.doc'; - - // Create download link element - var downloadLink = document.createElement("a"); - - document.body.appendChild(downloadLink); - - if (navigator.msSaveOrOpenBlob) { - navigator.msSaveOrOpenBlob(blob, filename); - } else { - // Create a link to the file - downloadLink.href = url; - - // Setting the file name - downloadLink.download = filename; - - //triggering the function - downloadLink.click(); - } - - document.body.removeChild(downloadLink); - + ExportarAMsWord(html, filename); + }; \ No newline at end of file