Subversion Repositories SmartDukaan

Rev

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

Rev 27067 Rev 30601
Line 1... Line 1...
1
<script type="text/javascript">
1
<script type="text/javascript">
2
	var customRetailers = ${customRetailers};
2
	var customRetailers = ${customRetailers};
3
	$("#FofoId").typeahead({
3
	$("#FofoId").typeahead({
4
	  source: customRetailers,
4
		source: customRetailers,
5
	  autoSelect: true,
5
		autoSelect: true,
-
 
6
		displayText: function (item) {
6
	  displayText:function(item){return item.businessName + "-" + item.address.city;},
7
			return item.businessName + "-" + item.address.city;
-
 
8
		},
7
	  afterSelect:	function(currentItem){
9
		afterSelect: function (currentItem) {
8
	  					currentFofoId = currentItem.partnerId;
10
			currentFofoId = currentItem.partnerId;
9
	  				}
11
		}
10
	});
12
	});
11
	
13
 
12
	$('#businessDate').daterangepicker(getSingleDatePicker(true), dateRangeCallback);
14
	$('#businessDate').daterangepicker(getSingleDatePicker());
13
	
15
 
14
	$('button.btnuploadcns').on('click', function() {
16
	$('button.btnuploadcns').on('click', function () {
15
		var fileSelector = $('#uploadcns')[0];
17
		var fileSelector = $('#uploadcns')[0];
16
		if(fileSelector != undefined && fileSelector.files[0] != undefined) {
18
		if (fileSelector != undefined && fileSelector.files[0] != undefined) {
17
			if(confirm("Confirm Upload?")) {
19
			if (confirm("Confirm Upload?")) {
18
				doAjaxUploadRequestHandler("${rc.contextPath}/wallet/upload", "POST", fileSelector.files[0], function(response){
20
				doAjaxUploadRequestHandler("${rc.contextPath}/wallet/upload", "POST", fileSelector.files[0], function(response){
19
					if(response) {
21
					if(response) {
20
						alert("Content updated successfully");
22
						alert("Content updated successfully");
21
					}
23
					}
22
				});
24
				});