Skip to content

Commit

Permalink
- Bug Fix Sip
Browse files Browse the repository at this point in the history
  • Loading branch information
PhantomVl committed Nov 14, 2019
1 parent e2761e5 commit 6e00f1f
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 deletions assets/js/sccp_manager.js
Expand Up @@ -577,26 +577,29 @@ $(document).ready(function () {
datas = datas + 'idn[' + i + ']=' + entry['name'] + '&';
i++;
});
$('#table-sip').bootstrapTable('getSelections').forEach(function (entry) {
datas = datas + 'idn[' + i + ']=' + entry['name'] + '&';
i++;
});
if (document.getElementById('table-sip') != null ) {
$('#table-sip').bootstrapTable('getSelections').forEach(function (entry) {
datas = datas + 'idn[' + i + ']=' + entry['name'] + '&';
i++;
});
}
console.log(datas);

}
if ($(this).data('id') === 'delete_hardware') {
var dev_cmd = $(this).data('id');
var datas = '';
var i = 0;
// $('table').bootstrapTable('getSelections').forEach(function (entry) {
$('#table-sccp').bootstrapTable('getSelections').forEach(function (entry) {
datas = datas + 'idn[' + i + ']=' + entry['name'] + '&';
i++;
});
$('#table-sip').bootstrapTable('getSelections').forEach(function (entry) {
datas = datas + 'idn[' + i + ']=' + entry['name'] + '&';
i++;
});
if (document.getElementById('table-sip') != null ) {
$('#table-sip').bootstrapTable('getSelections').forEach(function (entry) {
datas = datas + 'idn[' + i + ']=' + entry['name'] + '&';
i++;
});
}
if (!confirm(_('Are you sure you wish to delete selected device ?'))) {
dev_cmd = '';
}
Expand All @@ -616,15 +619,16 @@ $(document).ready(function () {
if ($(this).data('id') === 'update_button_label') {
conf_msg = 'Update Butons Labels on All device ?';
}
// $('table').bootstrapTable('getSelections').forEach(function (entry) {
$('#table-sccp').bootstrapTable('getSelections').forEach(function (entry) {
datas = datas + 'name[' + i + ']=' + entry['name'] + '&';
i++;
});
$('#table-sip').bootstrapTable('getSelections').forEach(function (entry) {
datas = datas + 'name[' + i + ']=' + entry['name'] + '&';
i++;
});
if (document.getElementById('table-sip') != null ) {
$('#table-sip').bootstrapTable('getSelections').forEach(function (entry) {
datas = datas + 'name[' + i + ']=' + entry['name'] + '&';
i++;
});
}

if (datas === '') {
if (confirm(conf_msg)) {
Expand Down

0 comments on commit 6e00f1f

Please sign in to comment.