Subversion Repositories SmartDukaan

Rev

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

Rev 23494 Rev 23495
Line 14... Line 14...
14
				var json = retailerDetailsJson();
14
				var json = retailerDetailsJson();
15
				console.log("retailerJson = " + json);
15
				console.log("retailerJson = " + json);
16
				if(confirm("Are you sure you want to update Retailer Details!") == true){
16
				if(confirm("Are you sure you want to update Retailer Details!") == true){
17
					doAjaxRequestWithJsonHandler(context+"/retailerDetails", "PUT", json, function(response){
17
					doAjaxRequestWithJsonHandler(context+"/retailerDetails", "PUT", json, function(response){
18
						$('#retailer-details-container').html(response);
18
						$('#retailer-details-container').html(response);
19
						if($('#retailerDocument').val() != undefined && localStorage.getItem("retailerDocument") == null){
19
						if(localStorage.getItem("retailerDocument") != null){
20
							localStorage.removeItem("retailerDocument");
20
							localStorage.removeItem("retailerDocument");
21
						}
21
						}
22
						var shopDetailsSize = $("#shopDetailsSize").attr("size");
22
						var shopDetailsSize = $("#shopDetailsSize").attr("size");
23
						for(var i = 0; i < shopDetailsSize; i++){
23
						for(var i = 0; i < shopDetailsSize; i++){
24
							if($('#retailerShopDocument'+i).val() != undefined && localStorage.getItem("retailerShopDocument"+i) == null){
24
							if(localStorage.getItem("retailerShopDocument"+i) != null){
25
								localStorage.removeItem("retailerShopDocument"+i);
25
								localStorage.removeItem("retailerShopDocument"+i);
26
							}
26
							}
27
						}
27
						}
-
 
28
						alert("Retailer Details has been successfully.");
28
					});
29
					});
29
		            return false; // required to block normal submit since you used ajax
30
		            return false; // required to block normal submit since you used ajax
30
				}
31
				}
31
	       }
32
	       }
32
	});
33
	});