Prerelease 11.10.2017
fix in js
This commit is contained in:
parent
8ad29607f4
commit
d1e4d340c4
|
@ -408,9 +408,10 @@ $(document).ready(function () {
|
||||||
}
|
}
|
||||||
if (($(this).data('id') === 'model_enabled') || ($(this).data('id') === 'model_disabled')) {
|
if (($(this).data('id') === 'model_enabled') || ($(this).data('id') === 'model_disabled')) {
|
||||||
var dev_cmd = $(this).data('id');
|
var dev_cmd = $(this).data('id');
|
||||||
|
var tab_name ='#'+$(this).data('table');
|
||||||
var datas = '';
|
var datas = '';
|
||||||
var i = 0;
|
var i = 0;
|
||||||
$('table').bootstrapTable('getSelections').forEach(function (entry) {
|
$(tab_name).bootstrapTable('getSelections').forEach(function (entry) {
|
||||||
datas = datas + 'model[' + i + ']=' + entry['model'] + '&';
|
datas = datas + 'model[' + i + ']=' + entry['model'] + '&';
|
||||||
i++;
|
i++;
|
||||||
});
|
});
|
||||||
|
@ -512,7 +513,9 @@ $("table").on('check.bs.table', function (e, row) {
|
||||||
});
|
});
|
||||||
$("table").on('uncheck.bs.table', function (e, row) {
|
$("table").on('uncheck.bs.table', function (e, row) {
|
||||||
var id_fld = $(this).data('id');
|
var id_fld = $(this).data('id');
|
||||||
var id_count = $("table").bootstrapTable('getAllSelections').length;
|
var id_parent = '#'+$(this).parent().find('table').attr('id');
|
||||||
|
// console.log(id_parent);
|
||||||
|
var id_count = $(id_parent).bootstrapTable('getAllSelections').length;
|
||||||
if (id_count < 1) {
|
if (id_count < 1) {
|
||||||
$(".btn-tab-select").each(function () {
|
$(".btn-tab-select").each(function () {
|
||||||
$(this).attr('disabled', true);
|
$(this).attr('disabled', true);
|
||||||
|
@ -522,6 +525,9 @@ $("table").on('uncheck.bs.table', function (e, row) {
|
||||||
});
|
});
|
||||||
$("table").on('uncheck-all.bs.table', function (rows) {
|
$("table").on('uncheck-all.bs.table', function (rows) {
|
||||||
var id_fld = $(this).data('id');
|
var id_fld = $(this).data('id');
|
||||||
|
var id_parent = '#'+$(this).parent().find('table').attr('id');
|
||||||
|
// console.log(id_parent);
|
||||||
|
// var id_count = $(id_parent).bootstrapTable('getAllSelections').length;
|
||||||
var id_count = $("table").bootstrapTable('getAllSelections').length;
|
var id_count = $("table").bootstrapTable('getAllSelections').length;
|
||||||
if (id_count < 1) {
|
if (id_count < 1) {
|
||||||
$(".btn-tab-select").each(function () {
|
$(".btn-tab-select").each(function () {
|
||||||
|
|
|
@ -14,10 +14,10 @@
|
||||||
<div class="display no-border">
|
<div class="display no-border">
|
||||||
<div id="toolbar-model">
|
<div id="toolbar-model">
|
||||||
<button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target=".add_new_model"><i class="fa fa-bolt"></i> <?php echo _("Add model"); ?></button>
|
<button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target=".add_new_model"><i class="fa fa-bolt"></i> <?php echo _("Add model"); ?></button>
|
||||||
<button data-id="model_disabled" class="btn btn-danger sccp_update btn-tab-select" data-type="sccp_model" disabled data-section="all">
|
<button data-id="model_disabled" class="btn btn-danger sccp_update btn-tab-select" data-type="sccp_model" data-table="table-models" disabled data-section="all">
|
||||||
<i class="glyphicon glyphicon-remove"></i> <span><?php echo _('Disabled') ?></span>
|
<i class="glyphicon glyphicon-remove"></i> <span><?php echo _('Disabled') ?></span>
|
||||||
</button>
|
</button>
|
||||||
<button data-id="model_enabled" class="btn btn-danger sccp_update btn-tab-select" data-type="sccp_model" disabled data-section="all">
|
<button data-id="model_enabled" class="btn btn-danger sccp_update btn-tab-select" data-table="table-models" data-type="sccp_model" disabled data-section="all">
|
||||||
<i class="glyphicon glyphicon-active"></i> <span><?php echo _('Enabled') ?></span>
|
<i class="glyphicon glyphicon-active"></i> <span><?php echo _('Enabled') ?></span>
|
||||||
</button>
|
</button>
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
|
|
Loading…
Reference in a new issue