Use Laravel url helpers to improve functionality without dns name (#10227)

* Use Laravel url helpers to improve functionality without dns name
Not exhaustive...

* Fix Url generated urls

* Bump js version
This commit is contained in:
Tony Murray
2019-05-20 11:47:34 -05:00
committed by GitHub
parent 604a200891
commit e9ae08d5db
22 changed files with 66 additions and 69 deletions

View File

@@ -148,7 +148,7 @@ function submitCustomRange(frmdata) {
function updateResolution(refresh)
{
$.post('ajax/set_resolution',
$.post(ajax_url + '/set_resolution',
{
width: $(window).width(),
height:$(window).height()
@@ -422,7 +422,7 @@ function init_map_marker(leaflet, latlng) {
function update_location(id, latlng, callback) {
$.ajax({
method: 'PATCH',
url: "ajax/location/" + id,
url: ajax_url + '/location/' + id,
data: {lat: latlng.lat, lng: latlng.lng}
}).success(function () {
toastr.success('Location updated');
@@ -488,7 +488,7 @@ function init_select2(selector, type, data, selected, placeholder) {
placeholder: placeholder,
allowClear: true,
ajax: {
url: 'ajax/select/' + type,
url: ajax_url + '/select/' + type,
delay: 150,
data: data_function
}