Correct Device Reset page reload
Stay on page with page reset Correct output Switch from modal to Toast
This commit is contained in:
parent
707371cb92
commit
5ea2c83115
|
@ -580,10 +580,10 @@ $(document).ready(function () {
|
|||
var i = 0;
|
||||
var conf_msg = '??????';
|
||||
if ($(this).data('id') === 'reset_dev') {
|
||||
conf_msg = 'Reset All device ?';
|
||||
conf_msg = 'Reset ALL devices ?';
|
||||
}
|
||||
if ($(this).data('id') === 'reset_token') {
|
||||
conf_msg = 'Reset Token on All device ?';
|
||||
conf_msg = 'Reset Token on ALL devices ?';
|
||||
}
|
||||
if ($(this).data('id') === 'update_button_label') {
|
||||
conf_msg = 'Update Button Labels on ALL devices ?';
|
||||
|
@ -628,11 +628,11 @@ $(document).ready(function () {
|
|||
} else {
|
||||
if (Array.isArray(data.message)) {
|
||||
data.message.forEach(function (entry) {
|
||||
bs_alert(entry,data.status);
|
||||
fpbxToast(data.message[1],_('Error Result'), 'warning');
|
||||
});
|
||||
} else {
|
||||
if (data.message) {
|
||||
bs_alert(data.message,data.status);
|
||||
fpbxToast(data.message,_('Error Result'), 'warning');
|
||||
} else {
|
||||
if (data) {
|
||||
bs_alert(data,data.status);
|
||||
|
|
|
@ -140,7 +140,7 @@ trait ajaxHelper {
|
|||
case 'reset_dev':
|
||||
$msg = '';
|
||||
$msgr = array();
|
||||
$msgr[] = 'Reset command send';
|
||||
$msgr[] = "Reset command sent to device(s) ";
|
||||
if (!empty($request['name'])) {
|
||||
foreach ($request['name'] as $idv) {
|
||||
$msg = strpos($idv, 'SEP-');
|
||||
|
@ -153,13 +153,14 @@ trait ajaxHelper {
|
|||
$msgr[] = $msg . ' ' . $res['Response'] . ' ' . $res['data'];
|
||||
}
|
||||
}
|
||||
|
||||
if ($idv == 'all') {
|
||||
$dev_list = $this->aminterface->sccp_get_active_device();
|
||||
foreach ($dev_list as $key => $data) {
|
||||
if ($cmd_id == 'reset_token') {
|
||||
if (($data['token'] == 'Rej') || ($data['status'] == 'Token ')) {
|
||||
$res = $this->aminterface->sccpDeviceReset($idv, 'tokenack');
|
||||
$msgr[] = 'Send Token reset to :' . $key;
|
||||
$msgr[] = 'Sent Token reset to :' . $key;
|
||||
}
|
||||
} else {
|
||||
$res = $this->aminterface->sccpDeviceReset($idv, 'reset');
|
||||
|
@ -169,7 +170,7 @@ trait ajaxHelper {
|
|||
}
|
||||
}
|
||||
}
|
||||
return array('status' => true, 'message' => $msgr, 'reload' => true);
|
||||
return array('status' => (($res['Response'] == 'Error')? false : true ), 'message' => $msgr, 'reload' => false, 'table_reload' => true);
|
||||
break;
|
||||
case 'update_button_label':
|
||||
$msg = '';
|
||||
|
|
Loading…
Reference in a new issue