|
|
@ -233,13 +233,13 @@ $(document).ready(function() { |
|
|
|
{ |
|
|
|
{ |
|
|
|
event.preventDefault(); |
|
|
|
event.preventDefault(); |
|
|
|
|
|
|
|
|
|
|
|
const purgeType = $(this).attr('data-type'); |
|
|
|
|
|
|
|
const csrfToken = $(this).attr('data-token'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!confirm('Are you sure you want to continue?')) { |
|
|
|
if (!confirm('Are you sure you want to continue?')) { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const purgeType = $(this).attr('data-type'); |
|
|
|
|
|
|
|
const csrfToken = $(this).attr('data-token'); |
|
|
|
|
|
|
|
|
|
|
|
$.ajax({ |
|
|
|
$.ajax({ |
|
|
|
url: $(this).attr('href'), |
|
|
|
url: $(this).attr('href'), |
|
|
|
type: 'POST', |
|
|
|
type: 'POST', |
|
|
@ -272,8 +272,20 @@ $(document).ready(function() { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$.get('/admin/cache/toggle').done(function(data) |
|
|
|
const dataHref = $(this).attr('data-href'); |
|
|
|
|
|
|
|
const csrfToken = $(this).attr('data-token'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$.ajax({ |
|
|
|
|
|
|
|
url: dataHref, |
|
|
|
|
|
|
|
type: 'POST', |
|
|
|
|
|
|
|
data: { _token: csrfToken }, |
|
|
|
|
|
|
|
success: function(data) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
if (data == '') { |
|
|
|
|
|
|
|
alert("Development mode could not be enabled!"); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const response = JSON.parse(data); |
|
|
|
const response = JSON.parse(data); |
|
|
|
if (response.success == false) { |
|
|
|
if (response.success == false) { |
|
|
|
console.log(data); |
|
|
|
console.log(data); |
|
|
@ -292,6 +304,7 @@ $(document).ready(function() { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
alert("Development mode has been set to: '" + response.result.value + "'"); |
|
|
|
alert("Development mode has been set to: '" + response.result.value + "'"); |
|
|
|
|
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|