| Line 79... |
Line 79... |
| 79 |
$('#retailerDocument').change(function(){
|
79 |
$('#retailerDocument').change(function(){
|
| 80 |
//alert("Retailer Shop Document has been selected, Do you want to upload");
|
80 |
//alert("Retailer Shop Document has been selected, Do you want to upload");
|
| 81 |
if (confirm('Retailer Document has been selected, Do you want to upload ?')) {
|
81 |
if (confirm('Retailer Document has been selected, Do you want to upload ?')) {
|
| 82 |
var fileSelector = $('#retailerDocument')[0];
|
82 |
var fileSelector = $('#retailerDocument')[0];
|
| 83 |
if(fileSelector != undefined && fileSelector.files[0] != undefined){
|
83 |
if(fileSelector != undefined && fileSelector.files[0] != undefined){
|
| 84 |
var url = 'http://'+ webApiHost + ':' + webApiPort + '/profitmandi-web/document-upload';
|
84 |
var url = webApiScheme + '://'+ webApiPort + '/profitmandi-web/document-upload';
|
| 85 |
var file = this.files[0];
|
85 |
var file = this.files[0];
|
| 86 |
doAjaxUploadRequestHandler(url, 'POST', file, function(response){
|
86 |
doAjaxUploadRequestHandler(url, 'POST', file, function(response){
|
| 87 |
var documentId = response.response.document_id;
|
87 |
var documentId = response.response.document_id;
|
| 88 |
console.log("documentId : "+documentId);
|
88 |
console.log("documentId : "+documentId);
|
| 89 |
localStorage.setItem("retailerDocument", documentId);
|
89 |
localStorage.setItem("retailerDocument", documentId);
|
| Line 103... |
Line 103... |
| 103 |
//console.log("#retailerShopDocument"+i+" change event called");
|
103 |
//console.log("#retailerShopDocument"+i+" change event called");
|
| 104 |
//alert("Retailer Shop Document has been selected, Do you want to upload");
|
104 |
//alert("Retailer Shop Document has been selected, Do you want to upload");
|
| 105 |
console.log($(this).attr("id"));
|
105 |
console.log($(this).attr("id"));
|
| 106 |
if (confirm('Retailer Shop Document has been selected, Do you want to upload ?')) {
|
106 |
if (confirm('Retailer Shop Document has been selected, Do you want to upload ?')) {
|
| 107 |
var fileSelector = $(this)[0];
|
107 |
var fileSelector = $(this)[0];
|
| 108 |
var url = 'http://'+ webApiHost + ':' + webApiPort + '/profitmandi-web/document-upload';
|
108 |
var url = webApiScheme + '://'+ webApiHost + ':' + webApiPort + '/profitmandi-web/document-upload';
|
| 109 |
var file = this.files[0];
|
109 |
var file = this.files[0];
|
| 110 |
var retailerShopDocumentKey = $(this).attr("id");
|
110 |
var retailerShopDocumentKey = $(this).attr("id");
|
| 111 |
doAjaxUploadRequestHandler(url, 'POST', file, function(response){
|
111 |
doAjaxUploadRequestHandler(url, 'POST', file, function(response){
|
| 112 |
var documentId = response.response.document_id;
|
112 |
var documentId = response.response.document_id;
|
| 113 |
console.log("documentId : " + documentId);
|
113 |
console.log("documentId : " + documentId);
|