mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-07 05:31:15 -07:00
Fix success message show incorrectly when sending test notification
* Due to saving the settings before sending the notification
This commit is contained in:
parent
de3f813b46
commit
ce1d2a0fd9
3 changed files with 6 additions and 6 deletions
|
@ -80,9 +80,9 @@ function confirmAjaxCall(url, msg, loader_msg, callback) {
|
|||
});
|
||||
}
|
||||
|
||||
function doAjaxCall(url, elem, reload, form, callback) {
|
||||
function doAjaxCall(url, elem, reload, form, showMsg, callback) {
|
||||
// Set Message
|
||||
feedback = $("#ajaxMsg");
|
||||
feedback = (showMsg) ? $("#ajaxMsg") : $();
|
||||
update = $("#updatebar");
|
||||
if (update.is(":visible")) {
|
||||
var height = update.height() + 35;
|
||||
|
|
|
@ -148,7 +148,7 @@
|
|||
|
||||
$('#save-notification-item').click(function () {
|
||||
// Reload modal to update certain fields
|
||||
doAjaxCall('set_notification_config', $(this), 'tabs', true, reloadModal);
|
||||
doAjaxCall('set_notification_config', $(this), 'tabs', true, true, reloadModal);
|
||||
return false;
|
||||
});
|
||||
|
||||
|
@ -176,7 +176,7 @@
|
|||
})
|
||||
|
||||
$('#test_notifier').click(function () {
|
||||
doAjaxCall('set_notification_config', $(this), 'tabs', true, sendTestNotification);
|
||||
doAjaxCall('set_notification_config', $(this), 'tabs', true, false, sendTestNotification);
|
||||
});
|
||||
|
||||
function sendTestNotification() {
|
||||
|
@ -219,7 +219,7 @@
|
|||
|
||||
$('#pushbullet_apikey, #pushover_apitoken, #scripts_folder, #join_apikey').on('change', function () {
|
||||
// Reload modal to update certain fields
|
||||
doAjaxCall('set_notification_config', $(this), 'tabs', true, reloadModal);
|
||||
doAjaxCall('set_notification_config', $(this), 'tabs', true, false, reloadModal);
|
||||
return false;
|
||||
});
|
||||
|
||||
|
|
|
@ -2204,7 +2204,7 @@ $(document).ready(function() {
|
|||
|
||||
function saveSettings() {
|
||||
if (configForm.parsley().validate()) {
|
||||
doAjaxCall('configUpdate', $(this), 'tabs', true, postSaveChecks);
|
||||
doAjaxCall('configUpdate', $(this), 'tabs', true, true, postSaveChecks);
|
||||
return false;
|
||||
} else {
|
||||
showMsg('<i class="fa fa-exclamation-circle"></i> Please verify your settings.', false, true, 5000, true)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue