From 89fe90d2cafaecf19798e6dea323a393cc26d187 Mon Sep 17 00:00:00 2001 From: steve-lad <72376554+steve-lad@users.noreply.github.com> Date: Mon, 14 Jun 2021 10:23:23 +0200 Subject: [PATCH] Replace modal on save config Remove modal with close waiting on user input and replace with Toast --- assets/js/sccp_manager.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/assets/js/sccp_manager.js b/assets/js/sccp_manager.js index e60ffc1..313a103 100644 --- a/assets/js/sccp_manager.js +++ b/assets/js/sccp_manager.js @@ -88,9 +88,6 @@ $(document).ready(function () { data: vdata, success: function (data) { if (data.status === true) { - if (data.message) { - var old_style = bs_alert(data.message, data.status, data.reload); - } if (data.table_reload === true) { $('table').bootstrapTable('refresh'); } @@ -106,8 +103,12 @@ $(document).ready(function () { if (data.search != null) { location.search = data.search; } - if (data.reload === true && old_style ===true ) { - location.reload(); + if (data.message) { + fpbxToast(_('Configuration saved. Reloading Module'),_('Configuration saved'), 'success'); + if (data.reload === true) { + //Need setTimout or reload will kill Toast + setTimeout(function(){location.reload();},500); + } } } else { bs_alert(data.message,data.status);