Allow data to be passed for confirmAjaxCall
This commit is contained in:
@@ -141,14 +141,14 @@ DOCUMENTATION :: END
|
|||||||
'The database will be downloaded from <a href="${anon_url("https://dev.maxmind.com/geoip/geoip2/geolite2/")}" target="_blank">MaxMind</a>, <br />' +
|
'The database will be downloaded from <a href="${anon_url("https://dev.maxmind.com/geoip/geoip2/geolite2/")}" target="_blank">MaxMind</a>, <br />' +
|
||||||
'and requires <strong>100MB</strong> of free space to install in your PlexPy directory.<br />'
|
'and requires <strong>100MB</strong> of free space to install in your PlexPy directory.<br />'
|
||||||
var url = 'install_geoip_db';
|
var url = 'install_geoip_db';
|
||||||
confirmAjaxCall(url, msg, 'Installing GeoLite2 database.', getConfigurationTable);
|
confirmAjaxCall(url, msg, null, 'Installing GeoLite2 database.', getConfigurationTable);
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#uninstall_geoip_db").click(function () {
|
$("#uninstall_geoip_db").click(function () {
|
||||||
var msg = 'Are you sure you want to uninstall the GeoLite2 database?<br /><br />' +
|
var msg = 'Are you sure you want to uninstall the GeoLite2 database?<br /><br />' +
|
||||||
'You will not be able to lookup IP address geolocation info.';
|
'You will not be able to lookup IP address geolocation info.';
|
||||||
var url = 'uninstall_geoip_db';
|
var url = 'uninstall_geoip_db';
|
||||||
confirmAjaxCall(url, msg, 'Uninstalling GeoLite2 database.', getConfigurationTable);
|
confirmAjaxCall(url, msg, null, 'Uninstalling GeoLite2 database.', getConfigurationTable);
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.guidelines-modal-link').on('click', function (e) {
|
$('.guidelines-modal-link').on('click', function (e) {
|
||||||
|
@@ -54,7 +54,7 @@ function showMsg(msg, loader, timeout, ms, error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function confirmAjaxCall(url, msg, loader_msg, callback) {
|
function confirmAjaxCall(url, msg, data, loader_msg, callback) {
|
||||||
$("#confirm-message").html(msg);
|
$("#confirm-message").html(msg);
|
||||||
$('#confirm-modal').modal();
|
$('#confirm-modal').modal();
|
||||||
$('#confirm-modal').one('click', '#confirm-button', function () {
|
$('#confirm-modal').one('click', '#confirm-button', function () {
|
||||||
@@ -64,6 +64,9 @@ function confirmAjaxCall(url, msg, loader_msg, callback) {
|
|||||||
$.ajax({
|
$.ajax({
|
||||||
url: url,
|
url: url,
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
|
cache: false,
|
||||||
|
async: true,
|
||||||
|
data: data,
|
||||||
complete: function (xhr, status) {
|
complete: function (xhr, status) {
|
||||||
var result = $.parseJSON(xhr.responseText);
|
var result = $.parseJSON(xhr.responseText);
|
||||||
var msg = result.message;
|
var msg = result.message;
|
||||||
|
Reference in New Issue
Block a user