Subversion Repositories SmartDukaan

Rev

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

Rev 24016 Rev 24020
Line 371... Line 371...
371
            'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
371
            'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
372
         }
372
         }
373
	}
373
	}
374
	return rangedDatePicker;
374
	return rangedDatePicker;
375
}
375
}
376
$(function(){
-
 
377
	if (typeof latitude=="undefined" && navigator.geolocation && typeof latitude=="undefined") {
-
 
378
        navigator.geolocation.getCurrentPosition(showPosition);
-
 
379
    } else { 
-
 
380
        console.log("Geolocation is not supported by browser.");
-
 
381
    }
-
 
382
	dateRangeCallback(moment(),moment());
-
 
383
	loaderDialogObj = bootbox.dialog({
-
 
384
	    message: '<div class="container text-center"><i class="text-large fa fa-spinner"></i>Loading...</4>',
-
 
385
	    show: false	
-
 
386
	});
-
 
387
});
-
 
388
 
-
 
389
function showPosition(position) {
376
function showPosition(position) {
390
	var coords = {latitude:position.coords.latitude, longitude:position.coords.longitude}
377
	var coords = {latitude:position.coords.latitude, longitude:position.coords.longitude}
391
	doAjaxRequestWithJsonHandler('partner/location', 'PUT', JSON.stringify(coords), function(){
378
	doAjaxRequestWithJsonHandler('partner/location', 'PUT', JSON.stringify(coords), function(){
392
		if(typeof latitude == "undefined") {
379
		if(typeof latitude == "undefined") {
393
			latitude = position.coords.latitude;
380
			latitude = position.coords.latitude;