Fixing the issue where bulk actions are shown without bulk action getting triggered in cloud

revert-70aa11f8
Imesh Chandrasiri 7 years ago
parent b7d28754c6
commit 13b3f0999d

@ -176,7 +176,7 @@
<th data-for="By Ownership" class="select-filter"></th> <th data-for="By Ownership" class="select-filter"></th>
<th class="no-sort"></th> <th class="no-sort"></th>
</tr> </tr>
<tr class="bulk-action-row"> <tr class="bulk-action-row hidden">
<th colspan="7"> <th colspan="7">
<ul class="tiles"> <ul class="tiles">
{{#unless group}} {{#unless group}}

@ -138,7 +138,7 @@
<th data-for="By Status" class="select-filter"></th> <th data-for="By Status" class="select-filter"></th>
<th class="no-sort"></th> <th class="no-sort"></th>
</tr> </tr>
<tr class="bulk-action-row"> <tr class="bulk-action-row hidden">
<th colspan="9"> <th colspan="9">
<ul class="tiles"> <ul class="tiles">
{{#if removePermitted}} {{#if removePermitted}}

@ -77,7 +77,7 @@
<tr class="sort-row"> <tr class="sort-row">
<th>By Username</th> <th>By Username</th>
</tr> </tr>
<tr class="bulk-action-row"> <tr class="bulk-action-row hidden">
<th colspan="3"> <th colspan="3">
<ul class="tiles"> <ul class="tiles">
<li class="square"> <li class="square">

@ -285,6 +285,7 @@ $.fn.datatables_extended_serverside_paging = function (settings, url, dataFilter
$(document).off('click', '.viewEnabledIcon'); $(document).off('click', '.viewEnabledIcon');
//--- End of EMM related codes //--- End of EMM related codes
} else if ($(button).html() == 'Cancel') { } else if ($(button).html() == 'Cancel') {
$('.bulk-action-row').addClass('hidden');
thisTable.removeClass("table-selectable"); thisTable.removeClass("table-selectable");
$(button).addClass("active").html('Select'); $(button).addClass("active").html('Select');
$(button).parent().next().children().addClass("disabled"); $(button).parent().next().children().addClass("disabled");
@ -322,6 +323,13 @@ $.fn.datatables_extended_serverside_paging = function (settings, url, dataFilter
$('body').on('click', '[data-type=selectable]', function () { $('body').on('click', '[data-type=selectable]', function () {
var rowSelectedClass = 'DTTT_selected selected'; var rowSelectedClass = 'DTTT_selected selected';
$(this).toggleClass(rowSelectedClass); $(this).toggleClass(rowSelectedClass);
if($('.table-selectable .DTTT_selected').length > 0){
$('.bulk-action-row').removeClass('hidden');
}else{
$('.bulk-action-row').addClass('hidden');
}
var button = this, var button = this,
thisTable = $(this).closest('.dataTables_wrapper').find('.dataTable').dataTable(); thisTable = $(this).closest('.dataTables_wrapper').find('.dataTable').dataTable();

Loading…
Cancel
Save