Commit eb7e1435 authored by chandi's avatar chandi

use absolut paths for xhr.php requests

parent 3fcae57c
Pipeline #48467631 passed with stages
in 13 minutes and 55 seconds
......@@ -683,7 +683,7 @@ export function pictureCrop (id, img) {
})
} else {
showLoader()
$(`#${id}-form`).attr('action', `xhr.php?f=pictureCrop&id=${id}&img=${img}`)
$(`#${id}-form`).attr('action', `/xhr.php?f=pictureCrop&id=${id}&img=${img}`)
$(`#${id}-form`).trigger('submit')
}
}
......
......@@ -28,7 +28,7 @@ $('#verifyconfirm-dialog').dialog({
click: function () {
showLoader()
$.ajax({
url: `xhr.php?f=verify&fid=${verify_fid}&v=1`,
url: `/xhr.php?f=verify&fid=${verify_fid}&v=1`,
dataType: 'json',
success: function (data) {
verify_el.removeClass('verify-n')
......@@ -89,7 +89,7 @@ $('.verify').on('click', function () {
} else {
showLoader()
$.ajax({
url: `xhr.php?f=verify&fid=${$this.parent().parent().children('td:first').children('input').val()}&v=0`,
url: `/xhr.php?f=verify&fid=${$this.parent().parent().children('td:first').children('input').val()}&v=0`,
dataType: 'json',
success: function (data) {
if (data.status == '0') {
......
......@@ -98,7 +98,7 @@ $('#u_undate').dialog({
click: function () {
showLoader()
$.ajax({
url: 'xhr.php?f=delDate',
url: '/xhr.php?f=delDate',
data: { 'date': $('#undate-date').val(), 'bid': store.id },
dataType: 'json',
success: function (ret) {
......@@ -131,7 +131,7 @@ $('#u_undate').dialog({
click: function () {
showLoader()
$.ajax({
url: 'xhr.php?f=delDate',
url: '/xhr.php?f=delDate',
data: { 'date': $('#undate-date').val(), 'msg': $('#team_msg').val(), 'bid': store.id },
dataType: 'json',
success: function (ret) {
......@@ -169,7 +169,7 @@ $('div#pinnwand form').on('submit', function (e) {
$.ajax({
dataType: 'json',
data: $('div#pinnwand form').serialize(),
url: `xhr.php?f=addPinPost&team=${store.team_js}`,
url: `/xhr.php?f=addPinPost&team=${store.team_js}`,
success: function (data) {
if (data.status == 1) {
$('div#pinnwand form textarea').val($('div#pinnwand form textarea').attr('title'))
......@@ -216,7 +216,7 @@ $('#delete_shure').dialog({
showLoader()
const pid = $(this).data('pid')
$.ajax({
url: 'xhr.php?f=delBPost',
url: '/xhr.php?f=delBPost',
data: { 'pid': pid },
success: function (ret) {
if (ret == 1) {
......@@ -267,7 +267,7 @@ $('#timedialog').dialog({
buttons: {
'Eintragen': function () {
$.ajax({
url: 'xhr.php?f=addFetcher',
url: '/xhr.php?f=addFetcher',
data: {
date: $('#timedialog-date').val(),
bid: store.id,
......
......@@ -19,7 +19,7 @@ export function u_updatePosts () {
$.ajax({
dataType: 'json',
data: $('div#pinnwand form').serialize(),
url: 'xhr.php?f=getPinPost',
url: '/xhr.php?f=getPinPost',
success: function (data) {
if (data.status == 1) {
$('#pinnwand .posts').html(data.html)
......@@ -57,7 +57,7 @@ export function u_fetchconfirm (fsid, date, el) {
var item = $(el)
showLoader()
$.ajax({
url: 'xhr.php?f=fetchConfirm',
url: '/xhr.php?f=fetchConfirm',
data: {
fsid: parseInt(fsid),
bid: store.id,
......@@ -78,7 +78,7 @@ export function u_fetchdeny (fsid, date, el) {
var item = $(el)
showLoader()
$.ajax({
url: 'xhr.php?f=fetchDeny',
url: '/xhr.php?f=fetchDeny',
data: {
fsid: parseInt(fsid),
bid: store.id,
......@@ -101,7 +101,7 @@ export function acceptRequest (fsid, bid) {
$.ajax({
dataType: 'json',
data: 'fsid=' + fsid + '&bid=' + bid,
url: 'xhr.php?f=acceptRequest',
url: '/xhr.php?f=acceptRequest',
success: function (data) {
if (data.status == 1) {
reload()
......@@ -115,7 +115,7 @@ export function warteRequest (fsid, bid) {
$.ajax({
dataType: 'json',
data: 'fsid=' + fsid + '&bid=' + bid,
url: 'xhr.php?f=warteRequest',
url: '/xhr.php?f=warteRequest',
success: function (data) {
if (data.status == 1) {
reload()
......@@ -129,7 +129,7 @@ export function denyRequest (fsid, bid) {
$.ajax({
dataType: 'json',
data: 'fsid=' + fsid + '&bid=' + bid,
url: 'xhr.php?f=denyRequest',
url: '/xhr.php?f=denyRequest',
success: function (data) {
if (data.status == 1) {
reload()
......@@ -149,7 +149,7 @@ export function u_contextAction (action, fsid) {
} else {
showLoader()
$.ajax({
url: 'xhr.php?f=bcontext',
url: '/xhr.php?f=bcontext',
data: { 'action': action, 'fsid': fsid, 'bid': store.id, 'bzid': store.bezirk_id },
dataType: 'json',
success: function (data) {
......
......@@ -151,7 +151,7 @@ $('#work_group_form_photo-opener').button().on('click', function () {
})
const tageditOptions = {
autocompleteURL: 'xhr.php?f=getRecip',
autocompleteURL: '/xhr.php?f=getRecip',
allowEdit: false,
allowAdd: false,
animSpeed: 100
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment