Changeset 9be8a48 in prototipo_portal_2018 for prototipo/static/js/functions/firmarDocumentoPdf.js


Ignore:
Timestamp:
Nov 14, 2017, 11:57:45 AM (7 years ago)
Author:
José Sulbarán <jsulbaran@…>
Branches:
master
Children:
4f077af
Parents:
a210970
Message:

Se agrego la firma bdoc y se mejoro la firma pdf

File:
1 edited

Legend:

Unmodified
Added
Removed
  • prototipo/static/js/functions/firmarDocumentoPdf.js

    ra210970 r9be8a48  
    3232        headers: {"Authorization":"Basic YWRtaW46YWRtaW4="},
    3333        success: function(response) {
    34                
    35             INFO_DATATABLE = SerealizeMyJson(response);
    36                        
    37                         CONT += 1;
    38                         if (CONT == 1){
    39                                 DATATABLE_SIGN_VISIBLE = DataTablePDF(response);       
    40                         }
    41                         if (CONT > 1){
    42                                 DATATABLE_SIGN_VISIBLE.destroy();
    43                                 DATATABLE_SIGN_VISIBLE = DataTablePDF(response);       
    44                         }       
    45 
    46                         $('table#myJson_wrapper').show();
     34           
     35                        if (FIRMA_VISIBLE == true){             
     36
     37                        INFO_DATATABLE = SerealizeMyJson(response);
     38                               
     39                                CONT += 1;
     40                                if (CONT == 1){
     41                                        DATATABLE_SIGN_VISIBLE = DataTablePDF(response);       
     42
     43                                }
     44                                if (CONT > 1){
     45                                        DATATABLE_SIGN_VISIBLE.destroy();
     46                                        DATATABLE_SIGN_VISIBLE = DataTablePDF(response);       
     47                                }       
     48
     49                                CONTAINER = false;
     50                                $("#firmar-documento").hide();
     51                                $("#pdf-main-container").hide();
     52                                $("#myJson_wrapper").show();                                   
     53                        }
     54                        else{
     55
     56
     57                        INFO_DATATABLE_NO_VISIBLE = SerealizeMyJson(response);
     58                               
     59                                CONT_NO_VISIBLE += 1;
     60                                if (CONT_NO_VISIBLE == 1){
     61                                        DATATABLE_SIGN_NO_VISIBLE = DataTablePDFNoVisible(response);   
     62
     63                                }
     64                                if (CONT_NO_VISIBLE > 1){
     65                                        DATATABLE_SIGN_NO_VISIBLE.destroy();
     66                                        DATATABLE_SIGN_NO_VISIBLE = DataTablePDFNoVisible(response);   
     67                                }       
     68
     69                                CONTAINER2 = false;                             
     70                                $("#firmar-doc-noVisible").hide();
     71                                $("#pdf-main-container2").hide();
     72                                $("#myJsonPDF_NO_VISIBLE_wrapper").show();
     73
     74
     75                        }
     76                       
    4777        },
    4878        error: function(jqXHR, textStatus, errorThrown){
     
    6999                        var linkToDownload = "<a href=\"https://murachi.cenditel.gob.ve/Murachi/0.1/archivos/descargas/" + data['signedFileId'] +"\">descargar archivo firmado</a>";
    70100                        document.getElementById("respuesta").innerHTML = 'Archivo firmado correctamente: ' + data['signedFileId']+ '<br>' +linkToDownload;     
    71 
    72                         $("#firmar-documento").hide();
    73                         $("#pdf-main-container").hide();
    74101                       
    75102                        InfoDocumentDataTablePDF(data['signedFileId']);         
     
    163190                                        "contact":"582746574336",
    164191                                        "signatureVisible":"true"
    165                                         //"page": VALOR_PAGE,
    166                                         //"coord_x": VALOR_X,
    167                                         //"coord_y": VALOR_Y
     192                                        "page": VALOR_PAGE,
     193                                        "coord_x": VALOR_X,
     194                                        "coord_y": VALOR_Y
    168195                                        });
    169196                        }
     
    242269    formData.append("upload", $("#file-sign-ft_Vble")[0].files[0]);     
    243270       
    244         $('#myJson').hide();
     271        $('#myJson_wrapper').hide();
    245272        FIRMA_VISIBLE = true;
    246273        SubirDocumentServer(formData);
Note: See TracChangeset for help on using the changeset viewer.