Subversion Repositories SmartDukaan

Rev

Rev 28493 | Rev 32390 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 28493 Rev 28504
Line 13... Line 13...
13
				}
13
				}
14
			});
14
			});
15
}
15
}
16
 
16
 
17
	});
17
	});
-
 
18
 
18
$(document).on('click', ".myFile", function() {
19
$(document).on('click', ".myFile", function() {
19
        
20
    
20
        console.log("hello");
21
    console.log("hello");
21
		if (confirm('Confirm upload ?')) {
22
	if (confirm('Confirm upload ?')) {
-
 
23
		var fileSelector = $(this)[0];
-
 
24
		if (fileSelector != undefined) {
-
 
25
			var url = `${context}/csvFileUploader`;
-
 
26
			console.log(url);
22
			var fileSelector = $(".fileTaxation").val();
27
			var file = $(".fileTaxation")[0].files[0];
-
 
28
			let fileInput = $(this);
-
 
29
		console.log("file"+file);
23
			 console.log("fileSelector"+fileSelector);
30
		console.log("fileInput"+fileInput);
-
 
31
		doAjaxUploadRequestHandler(
24
			
32
				url,
25
			doPostAjaxRequestHandler(context + "/csvFileUploader?fileSelector=" + fileSelector,
33
				'POST',
26
				function(response) {
34
				file,function(response) {
27
 
35
 
28
					console.log("reponse" + response);
36
				console.log("reponse" + response);
29
				});
37
			});
30
		
38
	
31
			 
39
		}		 
32
		}
40
	}
33
		else {
41
	else {
34
		// Do nothing!
42
	// Do nothing!
35
		}
43
	}
36
});
44
});
37
	
45
	
38
	
46
	
39
	$(document).on('click', ".submit-active", function() {
47
	$(document).on('click', ".submit-active", function() {
40
		
48