Subversion Repositories SmartDukaan

Rev

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

Rev 27231 Rev 27516
Line 1... Line 1...
1
$(function() {
1
$(function () {
2
 
2
 
3
	$("#retailer-details-search-button").live(
3
    $("#retailer-details-search-button").live('click', function () {
4
			'click',
4
        searchContent = $("#retailer-details-search-text").val();
5
			function() {
5
        if (typeof (searchContent) == "undefined" || !searchContent) {
6
				searchContent = $("#retailer-details-search-text").val();
6
            searchContent = "";
7
				if (typeof (searchContent) == "undefined" || !searchContent) {
7
        }
8
					searchContent = "";
8
        getRetailerDetailsByEmailIdOrMobileNumber(
9
				}
9
            "retailer-details-container", searchContent);
10
				getRetailerDetailsByEmailIdOrMobileNumber(
10
    });
11
						"retailer-details-container", searchContent);
11
 
12
			});
12
    $(".active-store").live('click', function () {
13
 
13
        storeInfo("main-content");
14
	$(".active-store").live('click', function() {
14
    });
15
		storeInfo("main-content");
15
    $(".inactive-store").live('click', function () {
16
	});
16
        inactiveStoreInfo("main-content");
17
	$(".inactive-store").live('click', function() {
17
    });
18
		inactiveStoreInfo("main-content");
18
    $(".retailer-info").live('click', function () {
19
	});
19
        retailerInfo("main-content");
20
	$(".retailer-info").live('click', function() {
20
    });
21
		retailerInfo("main-content");
21
 
22
	});
22
 
23
	
23
    $(".partner-readonly-info").live('click', function () {
24
	
24
        partnerInfo("main-content")
25
	$(".partner-readonly-info").live('click', function() {
25
 
26
		partnerInfo("main-content")
26
 
27
	
27
    });
28
 
28
 
29
	});
29
 
30
	
30
    $(".partnerInfoReadOnly")
31
	
31
        .live(
32
	$(".partnerInfoReadOnly")
32
            'click',
33
	.live(
33
            function () {
34
			'click',
34
 
35
			function() {
35
                var fofoId = $('#fofo-users').val();
36
 
36
                loginAsPartnerReadonly(fofoId);
37
				var fofoId = $('#fofo-users').val();
37
            });
38
				loginAsPartnerReadonly(fofoId);
38
    $("#retailerAddressPinCode").live(
39
			});
39
        'change',
40
	$("#retailerAddressPinCode").live(
40
        function () {
41
			'change',
41
 
42
			function() {
42
            var pincode = $('#retailerAddressPinCode').val();
43
 
43
 
44
				var pincode = $('#retailerAddressPinCode').val();
44
            if (undefined != pincode) {
45
 
45
                doGetAjaxRequestHandler(context + "/postOffice?pinCode="
46
				if (undefined != pincode) {
46
                    + pincode,
47
					doGetAjaxRequestHandler(context + "/postOffice?pinCode="
47
                    function (response) {
48
							+ pincode,
48
                        console.log(response.response.state);
49
							function(response) {
49
                        $('#retailerAddressCity').find('option').not(':first').remove();
50
								console.log(response.response.state);
50
                        $('#retailerAddressState').val("");
51
								 $('#retailerAddressCity').find('option').not(':first').remove();
51
                        $('#retailerAddressState').val(
52
								 $('#retailerAddressState').val("");
52
                            response.response.state);
53
								$('#retailerAddressState').val(
53
                        loadDistrictNames(response.response.state);
54
										response.response.state);
54
                        for (let city of response.response.cities) {
55
								loadDistrictNames(response.response.state);
55
                            var opt = $("<option>").val(city).text(city);
56
								for(let city of response.response.cities){
56
                            $('#retailerAddressCity').append(opt);
57
									    var opt = $("<option>").val(city).text(city);
57
 
58
				                        $('#retailerAddressCity').append(opt);
58
                        }
59
							           
59
 
60
								}
60
                    });
61
								
61
            }
62
							});
62
        });
63
				}
63
 
64
			});
64
    $("#retailer-details-search-text").live("keyup", function (e) {
65
 
65
        var keyCode = e.keyCode || e.which;
66
	$("#retailer-details-search-text").live("keyup", function(e) {
66
        if (keyCode == 13) {
67
		var keyCode = e.keyCode || e.which;
67
            $("#retailer-details-search-button").click();
68
		if (keyCode == 13) {
68
        }
69
			$("#retailer-details-search-button").click();
69
    });
70
		}
70
 
71
	});
71
    $(".deactivate-store").live('click', function () {
72
 
72
        var fofoId = $(this).data("fofoid");
73
	$(".deactivate-store").live('click', function() {
73
        console.log(fofoId);
74
		var fofoId = $(this).data("fofoid");
74
        if (confirm("Are you sure you want to deactivate store!") == true) {
75
		console.log(fofoId);
75
            deactivateStore("main-content", fofoId);
76
		if (confirm("Are you sure you want to deactivate store!") == true) {
76
        }
77
			deactivateStore("main-content", fofoId);
77
 
78
		}
78
    });
79
 
79
    $(".login_as").live('click', function () {
80
	});
80
        var fofoId = $('#partnerId').val();
81
	$(".login_as").live('click', function() {
81
        loginAsPartner(fofoId);
82
		var fofoId = $('#partnerId').val();
82
 
83
		loginAsPartner(fofoId);
83
    });
84
 
84
 
85
	});
85
    $(".extend-billing").live('click', function () {
86
 
86
        var fofoId = $(this).data("fofoid");
87
	$(".extend-billing").live('click', function() {
87
        console.log(fofoId);
88
		var fofoId = $(this).data("fofoid");
88
        if (confirm("Are you sure you want to extend Billing?")) {
89
		console.log(fofoId);
89
            extendBilling($(this).parent(), fofoId);
90
		if (confirm("Are you sure you want to extend Billing?")) {
90
        }
91
			extendBilling($(this).parent(), fofoId);
91
 
92
		}
92
    });
93
 
93
 
94
	});
94
    /*
95
	
95
     * $('#retailerAddressState').live('change', function() { var stateName =
96
	/*
96
     * $(this).find('option:selected').text();
97
	 * $('#retailerAddressState').live('change', function() { var stateName =
97
     *
98
	 * $(this).find('option:selected').text();
98
     * loadDistrictNames(stateName); });
99
	 * 
99
     */
100
	 * loadDistrictNames(stateName); });
100
 
101
	 */
101
 
102
	 
102
    $("#location").live('click', function () {
103
 
103
        if ($(this).is(":checked")) {
104
	$("#location").live('click', function() {
104
 
105
		if ($(this).is(":checked")) {
105
            $("#divLocation").show();
106
 
106
 
107
			$("#divLocation").show();
107
        } else {
108
 
108
            $("#divLocation").hide();
109
		} else {
109
        }
110
			$("#divLocation").hide();
110
    });
111
		}
111
 
112
	});
112
    $(".addlocationbutton").live(
113
 
113
        'click',
114
	$(".addlocationbutton").live(
114
        function () {
115
			'click',
115
            var userId = $('#retailerId').text();
116
			function() {
116
            var name = $('#personName').val();
117
				var userId = $('#retailerId').text();
117
            var line1 = $('#line1').val();
118
				var name = $('#personName').val();
118
            var line2 = $('#line2').val();
119
				var line1 = $('#line1').val();
119
            var city = $('#city').val();
120
				var line2 = $('#line2').val();
120
            var state = $('#state').val();
121
				var city = $('#city').val();
121
            var pin = $('#pinCode').val();
122
				var state = $('#state').val();
122
 
123
				var pin = $('#pinCode').val();
123
            if (name === "" && line1 === "" && city === "" && pin === "") {
124
 
124
                alert("Field can't be empty");
125
				if (name === "" && line1 === "" && city === "" && pin === "") {
125
                return;
126
					alert("Field can't be empty");
126
            }
127
					return;
127
            if (name === "") {
128
				}
128
                alert("name is required");
129
				if (name === "") {
129
                return;
130
					alert("name is required");
130
            }
131
					return;
131
            if (line1 === "") {
132
				}
132
                alert("line1 is required");
133
				if (line1 === "") {
133
                return;
134
					alert("line1 is required");
134
            }
135
					return;
135
            if (city === "") {
136
				}
136
                alert("city is required");
137
				if (city === "") {
137
                return;
138
					alert("city is required");
138
            }
139
					return;
139
            if (pin === "") {
140
				}
140
                alert("pin is required");
141
				if (pin === "") {
141
                return;
142
					alert("pin is required");
142
            }
143
					return;
143
 
144
				}
144
            var locationData = {};
145
 
145
            locationData['userId'] = $('#retailerId').text();
146
				var locationData = {};
146
            locationData['name'] = $('#personName').val();
147
				locationData['userId'] = $('#retailerId').text();
147
            locationData['line1'] = $('#line1').val();
148
				locationData['name'] = $('#personName').val();
148
            locationData['line2'] = $('#line2').val();
149
				locationData['line1'] = $('#line1').val();
149
            locationData['city'] = $('#city').val();
150
				locationData['line2'] = $('#line2').val();
150
            locationData['state'] = $('#state').val();
151
				locationData['city'] = $('#city').val();
151
            locationData['pin'] = $('#pinCode').val();
152
				locationData['state'] = $('#state').val();
152
 
153
				locationData['pin'] = $('#pinCode').val();
153
            if (confirm("Are you sure you want to add location!") == true) {
154
 
154
                doPostAjaxRequestWithJsonHandler(context + "/addLocation",
155
				if (confirm("Are you sure you want to add location!") == true) {
155
                    JSON.stringify(locationData), function (response) {
156
					doPostAjaxRequestWithJsonHandler(context + "/addLocation",
156
                        if (response == 'true') {
157
							JSON.stringify(locationData), function(response) {
157
                            alert("successfully Add");
158
								if (response == 'true') {
158
                            $("#addLocationModal").modal('hide');
159
									alert("successfully Add");
159
 
160
									$("#addLocationModal").modal('hide');
160
                        }
161
 
161
                    });
162
								}
162
 
163
							});
163
                return false;
164
 
164
            }
165
					return false;
165
        });
166
				}
-
 
167
			});
-
 
168
 
166
 
169
});
167
});
170
 
168
 
171
function getDistance(lat1, lon1, lat2, lon2) {
169
function getDistance(lat1, lon1, lat2, lon2) {
172
	var deg2rad = 0.017453292519943295; // === Math.PI / 180
170
    var deg2rad = 0.017453292519943295; // === Math.PI / 180
173
	var cos = Math.cos;
171
    var cos = Math.cos;
174
	lat1 *= deg2rad;
172
    lat1 *= deg2rad;
175
	lon1 *= deg2rad;
173
    lon1 *= deg2rad;
176
	lat2 *= deg2rad;
174
    lat2 *= deg2rad;
177
	lon2 *= deg2rad;
175
    lon2 *= deg2rad;
178
	var diam = 12742; // Diameter of the earth in km (2 * 6371)
176
    var diam = 12742; // Diameter of the earth in km (2 * 6371)
179
	var dLat = lat2 - lat1;
177
    var dLat = lat2 - lat1;
180
	var dLon = lon2 - lon1;
178
    var dLon = lon2 - lon1;
181
	var a = ((1 - cos(dLat)) + (1 - cos(dLon)) * cos(lat1) * cos(lat2)) / 2;
179
    var a = ((1 - cos(dLat)) + (1 - cos(dLon)) * cos(lat1) * cos(lat2)) / 2;
182
 
180
 
183
	return parseFloat(diam * Math.asin(Math.sqrt(a))).toFixed(2);
181
    return parseFloat(diam * Math.asin(Math.sqrt(a))).toFixed(2);
184
}
182
}
185
 
183
 
186
function getRetailerDetailsByEmailIdOrMobileNumber(domId, emailIdOrMobileNumber) {
184
function getRetailerDetailsByEmailIdOrMobileNumber(domId, emailIdOrMobileNumber) {
187
	doGetAjaxRequestHandler(context + "/retailerDetails?emailIdOrMobileNumber="
185
    doGetAjaxRequestHandler(context + "/retailerDetails?emailIdOrMobileNumber="
188
			+ emailIdOrMobileNumber, function(response) {
186
        + emailIdOrMobileNumber, function (response) {
189
		$('#' + domId).html(response);
187
        $('#' + domId).html(response);
190
		if ($("#location").is(":checked")) {
188
        if ($("#location").is(":checked")) {
191
 
189
 
192
			$("#divLocation").show();
190
            $("#divLocation").show();
193
		}
191
        }
194
	});
192
    });
195
}
193
}
196
 
194
 
197
function updateRetailerDocument() {
195
function updateRetailerDocument() {
198
	// $("#updateRetailerShopDocument0").click( function() {
196
    // $("#updateRetailerShopDocument0").click( function() {
199
	console.log("Update Retailer Document Clicked");
197
    console.log("Update Retailer Document Clicked");
200
	// console.log(ownerId);
198
    // console.log(ownerId);
201
	var emailIdOrMobileNumber = $('#retailer-details-search-text').val();
199
    var emailIdOrMobileNumber = $('#retailer-details-search-text').val();
202
	console.log("emailIdOrMobileNumber: " + emailIdOrMobileNumber);
200
    console.log("emailIdOrMobileNumber: " + emailIdOrMobileNumber);
203
	var file = $('#retailerDocument')[0].files[0];
201
    var file = $('#retailerDocument')[0].files[0];
204
	console.log("file : " + file.name);
202
    console.log("file : " + file.name);
205
	uploadRetailerDocument("retailer-details-container", file,
203
    uploadRetailerDocument("retailer-details-container", file,
206
			emailIdOrMobileNumber);
204
        emailIdOrMobileNumber);
207
}
205
}
208
 
206
 
209
function updateRetailerShopDocument(ownerId) {
207
function updateRetailerShopDocument(ownerId) {
210
	// $("#updateRetailerShopDocument0").click( function() {
208
    // $("#updateRetailerShopDocument0").click( function() {
211
	console.log("Update Retailer Shop Document Clicked");
209
    console.log("Update Retailer Shop Document Clicked");
212
	console.log(ownerId);
210
    console.log(ownerId);
213
	var shopSize = parseInt($("#shopDetailsSize").attr('size'));
211
    var shopSize = parseInt($("#shopDetailsSize").attr('size'));
214
	console.log("size : " + shopSize);
212
    console.log("size : " + shopSize);
215
	for (var index = 0; index < shopSize; index++) {
213
    for (var index = 0; index < shopSize; index++) {
216
		if ("updateRetailerShopDocument" + index == ownerId) {
214
        if ("updateRetailerShopDocument" + index == ownerId) {
217
			var emailIdOrMobileNumber = $('#retailer-details-search-text')
215
            var emailIdOrMobileNumber = $('#retailer-details-search-text')
218
					.val();
216
                .val();
219
			console.log("emailIdOrMobileNumber: " + emailIdOrMobileNumber);
217
            console.log("emailIdOrMobileNumber: " + emailIdOrMobileNumber);
220
			var shopId = $('#retailerShopDocument' + index).attr("shopId");
218
            var shopId = $('#retailerShopDocument' + index).attr("shopId");
221
			console.log("shopId : " + shopId);
219
            console.log("shopId : " + shopId);
222
			var file = $('#retailerShopDocument' + index)[0].files[0];
220
            var file = $('#retailerShopDocument' + index)[0].files[0];
223
			console.log("file : " + file.name);
221
            console.log("file : " + file.name);
224
			uploadRetailerShopDocument("retailer-details-container", file,
222
            uploadRetailerShopDocument("retailer-details-container", file,
225
					emailIdOrMobileNumber, shopId);
223
                emailIdOrMobileNumber, shopId);
226
		}
224
        }
227
	}
225
    }
228
}
226
}
229
 
227
 
230
function loadDistrictNames(stateName) {
228
function loadDistrictNames(stateName) {
231
	if (undefined != $("#districtName")) {
229
    if (undefined != $("#districtName")) {
232
		doGetAjaxRequestHandler(
230
        doGetAjaxRequestHandler(
233
				context + "/district/all/stateName?stateName=" + stateName,
231
            context + "/district/all/stateName?stateName=" + stateName,
234
				function(response) {
232
            function (response) {
235
					console.log(response);
233
                console.log(response);
236
					var districtMasters = response.response;
234
                var districtMasters = response.response;
237
					// districtMasters = districtMasters.response;
235
                // districtMasters = districtMasters.response;
238
					var districtNameElements = '<option value="" disabled selected>District Name</option>';
236
                var districtNameElements = '<option value="" disabled selected>District Name</option>';
239
					for (index = 0; index < districtMasters.length; index++) {
237
                for (index = 0; index < districtMasters.length; index++) {
240
						districtNameElements = districtNameElements
238
                    districtNameElements = districtNameElements
241
								+ '<option value="'
239
                        + '<option value="'
242
								+ districtMasters[index].name + '">'
240
                        + districtMasters[index].name + '">'
243
								+ districtMasters[index].name + '</option>';
241
                        + districtMasters[index].name + '</option>';
244
					}
242
                }
245
					$('#districtName').html(districtNameElements);
243
                $('#districtName').html(districtNameElements);
246
				});
244
            });
247
	}
245
    }
248
}
246
}
249
 
247
 
250
function retailerInfo(domId) {
248
function retailerInfo(domId) {
251
	doGetAjaxRequestHandler(context + "/retailerInfo", function(response) {
249
    doGetAjaxRequestHandler(context + "/retailerInfo", function (response) {
252
		$('#' + domId).html(response);
250
        $('#' + domId).html(response);
253
 
251
 
254
	});
252
    });
255
 
253
 
256
}
254
}
257
function partnerInfo(domId){
-
 
258
	doGetAjaxRequestHandler(context + "/getPartnerReadonlyInfo", function(response) {
-
 
259
		$('#' + domId).html(response);
-
 
260
 
255
 
-
 
256
function partnerInfo(domId) {
-
 
257
    doGetAjaxRequestHandler(context + "/getPartnerReadonlyInfo", function (response) {
-
 
258
        $('#' + domId).html(response);
-
 
259
 
261
	});
260
    });
262
}
261
}
-
 
262
 
263
function storeInfo(domId) {
263
function storeInfo(domId) {
264
	doGetAjaxRequestHandler(context + "/getAllStores", function(response) {
264
    doGetAjaxRequestHandler(context + "/getAllStores", function (response) {
265
		$('#' + domId).html(response);
265
        $('#' + domId).html(response);
266
	});
266
    });
267
}
267
}
-
 
268
 
268
function inactiveStoreInfo(domId) {
269
function inactiveStoreInfo(domId) {
269
	doGetAjaxRequestHandler(context + "/getAllInactiveStores", function(
270
    doGetAjaxRequestHandler(context + "/getAllInactiveStores", function (
270
			response) {
271
        response) {
271
		$('#' + domId).html(response);
272
        $('#' + domId).html(response);
272
	});
273
    });
273
}
274
}
-
 
275
 
274
function deactivateStore(domId, fofoId) {
276
function deactivateStore(domId, fofoId) {
275
	doPostAjaxRequestHandler(context + "/deactivateStore?fofoId=" + fofoId,
277
    doPostAjaxRequestHandler(context + "/deactivateStore?fofoId=" + fofoId,
276
			function(response) {
278
        function (response) {
277
				if (response == "true") {
279
            if (response == "true") {
278
					alert("successfully deactivated!");
280
                alert("successfully deactivated!");
279
					storeInfo(domId);
281
                storeInfo(domId);
280
				}
282
            }
281
 
283
 
282
			});
284
        });
283
}
285
}
-
 
286
 
284
function loginAsPartner(fofoId) {
287
function loginAsPartner(fofoId) {
285
	doGetAjaxRequestHandler(context + "/login-as-partner?fofoId=" + fofoId,
288
    doGetAjaxRequestHandler(context + "/login-as-partner?fofoId=" + fofoId,
286
			function(response) {
289
        function (response) {
287
				window.create({
290
            window.create({
288
					"url" : "/dashboard",
291
                "url": "/dashboard",
289
					"incognito" : true
292
                "incognito": true
290
				});
293
            });
291
			});
294
        });
292
}
295
}
293
 
296
 
294
function loginAsPartnerReadonly(fofoId) {
297
function loginAsPartnerReadonly(fofoId) {
295
	doGetAjaxRequestHandler(context + "/login-as-partner-readonly?fofoId=" + fofoId,
298
    doGetAjaxRequestHandler(context + "/login-as-partner-readonly?fofoId=" + fofoId,
296
			function(response) {
299
        function (response) {
297
				window.create({
300
            window.create({
298
					"url" : "/dashboard",
301
                "url": "/dashboard",
299
					"incognito" : true
302
                "incognito": true
300
				});
303
            });
301
			});
304
        });
302
}
305
}
-
 
306
 
303
function extendBilling(container, fofoId) {
307
function extendBilling(container, fofoId) {
304
	doPostAjaxRequestHandler(context + "/extendBilling?fofoId=" + fofoId,
308
    doPostAjaxRequestHandler(context + "/extendBilling?fofoId=" + fofoId,
305
			function(response) {
309
        function (response) {
306
				if (isFinite(response)) {
310
            if (isFinite(response)) {
307
					alert("successfully deactivated!");
311
                alert("successfully deactivated!");
308
					container.html("Billing extended upto "
312
                container.html("Billing extended upto "
309
							+ moment().add(1, 'day').format("DD-MM-YY")
313
                    + moment().add(1, 'day').format("DD-MM-YY")
310
							+ " Grace count(" + response + ")");
314
                    + " Grace count(" + response + ")");
311
				}
315
            }
312
			});
316
        });
313
}
317
}
314
 
318
 
315
function updateLocationButton(id) {
319
function updateLocationButton(id) {
316
 
320
 
317
	var userId = id;
321
    var userId = id;
318
	var name = $('#personName').val();
322
    var name = $('#personName').val();
319
	var line1 = $('#line1').val();
323
    var line1 = $('#line1').val();
320
	var line2 = $('#line2').val();
324
    var line2 = $('#line2').val();
321
	var city = $('#city').val();
325
    var city = $('#city').val();
322
	var state = $('#state').val();
326
    var state = $('#state').val();
323
	var pin = $('#pinCode').val();
327
    var pin = $('#pinCode').val();
324
	console.log(id);
328
    console.log(id);
325
	if (name === "" && line1 === "" && city === "" && pin === "") {
329
    if (name === "" && line1 === "" && city === "" && pin === "") {
326
		alert("Field can't be empty");
330
        alert("Field can't be empty");
327
		return;
331
        return;
328
	}
332
    }
329
	if (name === "") {
333
    if (name === "") {
330
		alert("name is required");
334
        alert("name is required");
331
		return;
335
        return;
332
	}
336
    }
333
	if (line1 === "") {
337
    if (line1 === "") {
334
		alert("line1 is required");
338
        alert("line1 is required");
335
		return;
339
        return;
336
	}
340
    }
337
	if (city === "") {
341
    if (city === "") {
338
		alert("city is required");
342
        alert("city is required");
339
		return;
343
        return;
340
	}
344
    }
341
	if (pin === "") {
345
    if (pin === "") {
342
		alert("pin is required");
346
        alert("pin is required");
343
		return;
347
        return;
344
	}
348
    }
345
 
349
 
346
	var changeLocationData = {};
350
    var changeLocationData = {};
347
 
351
 
348
	changeLocationData['userId'] = id;
352
    changeLocationData['userId'] = id;
349
	changeLocationData['name'] = $('#personName').val();
353
    changeLocationData['name'] = $('#personName').val();
350
	changeLocationData['line1'] = $('#line1').val();
354
    changeLocationData['line1'] = $('#line1').val();
351
	changeLocationData['line2'] = $('#line2').val();
355
    changeLocationData['line2'] = $('#line2').val();
352
	changeLocationData['city'] = $('#city').val();
356
    changeLocationData['city'] = $('#city').val();
353
	changeLocationData['state'] = $('#state').val();
357
    changeLocationData['state'] = $('#state').val();
354
	changeLocationData['pin'] = $('#pinCode').val();
358
    changeLocationData['pin'] = $('#pinCode').val();
355
 
359
 
356
	console.log(changeLocationData);
360
    console.log(changeLocationData);
357
 
361
 
358
	if (confirm("Are you sure you want to add location!") == true) {
362
    if (confirm("Are you sure you want to add location!") == true) {
359
		doPostAjaxRequestWithJsonHandler(context + "/updateLocation", JSON
363
        doPostAjaxRequestWithJsonHandler(context + "/updateLocation", JSON
360
				.stringify(changeLocationData), function(response) {
364
            .stringify(changeLocationData), function (response) {
361
			if (response == 'true') {
365
            if (response == 'true') {
362
				alert("successfully Update");
366
                alert("successfully Update");
363
 
367
 
364
				$("#addLocationModal").modal('hide');
368
                $("#addLocationModal").modal('hide');
365
 
369
 
366
			}
370
            }
367
		});
371
        });
368
 
372
 
369
		return false;
373
        return false;
370
	}
374
    }
371
 
375
 
372
}
376
}
373
377