Merge pull request #1170 from rasika/fix-1629

Fixing group operations bar not shown when "Select All" is clicked
revert-70aa11f8
Rasika Perera 7 years ago committed by GitHub
commit 16b0615577
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -69,7 +69,7 @@
</div> </div>
<div id="role-table" data-cloud={{isCloud}} data-role={{adminRole}}> <div id="role-table" data-cloud={{isCloud}} data-role={{adminRole}}>
<table class="table table-striped table-hover list-table display responsive nowrap data-table grid-view" <table class="table table-striped table-hover list-table display responsive nowrap data-table grid-view un-selectable"
id="role-grid"> id="role-grid">
<thead> <thead>
<tr class="sort-row"> <tr class="sort-row">

@ -154,19 +154,24 @@ $.fn.datatables_extended = function (settings) {
} }
function getAdvanceToolBar() { function getAdvanceToolBar() {
var selectableBtnHtml = "";
if (!table.hasClass('no-toolbar')) { if (!table.hasClass('no-toolbar')) {
if (table.hasClass('sorting-enabled')) { if (table.hasClass('sorting-enabled')) {
return '<ul class="nav nav-pills navbar-right remove-margin" role="tablist">' + if(!table.hasClass('un-selectable')) {
'<li><button data-click-event="toggle-selectable" class="btn btn-default btn-primary select-enable-btn">Select</li>' + selectableBtnHtml = '<li><button data-click-event="toggle-selectable" class="btn btn-default btn-primary select-enable-btn">Select</li>' +
'<li><button data-click-event="toggle-selected" id="dt-select-all" class="btn btn-default btn-primary disabled">Select All</li>' + '<li><button data-click-event="toggle-selected" id="dt-select-all" class="btn btn-default btn-primary disabled">Select All</li>';
}
return '<ul class="nav nav-pills navbar-right remove-margin" role="tablist">' + selectableBtnHtml +
'<li><button data-click-event="toggle-list-view" data-view="grid" class="btn btn-default"><i class="fw fw-grid"></i></button></li>' + '<li><button data-click-event="toggle-list-view" data-view="grid" class="btn btn-default"><i class="fw fw-grid"></i></button></li>' +
'<li><button data-click-event="toggle-list-view" data-view="list" class="btn btn-default"><i class="fw fw-list"></i></button></li>' + '<li><button data-click-event="toggle-list-view" data-view="list" class="btn btn-default"><i class="fw fw-list"></i></button></li>' +
'<li><button class="btn btn-default" data-toggle="dropdown"><i class="fw fw-sort"></i></button>' + dropdownmenu[0].outerHTML + '</li>' + '<li><button class="btn btn-default" data-toggle="dropdown"><i class="fw fw-sort"></i></button>' + dropdownmenu[0].outerHTML + '</li>' +
'</ul>' '</ul>'
} else { } else {
return '<ul class="nav nav-pills navbar-right remove-margin" role="tablist">' + if(!table.hasClass('un-selectable')) {
'<li><button data-click-event="toggle-selectable" class="btn btn-default btn-primary select-enable-btn">Select</li>' + selectableBtnHtml = '<li><button data-click-event="toggle-selectable" class="btn btn-default btn-primary select-enable-btn">Select</li>' +
'<li><button data-click-event="toggle-selected" id="dt-select-all" class="btn btn-default btn-primary disabled">Select All</li>' + '<li><button data-click-event="toggle-selected" id="dt-select-all" class="btn btn-default btn-primary disabled">Select All</li>';
}
return '<ul class="nav nav-pills navbar-right remove-margin" role="tablist">' + selectableBtnHtml +
'<li><button data-click-event="toggle-list-view" data-view="grid" class="btn btn-default"><i class="fw fw-grid"></i></button></li>' + '<li><button data-click-event="toggle-list-view" data-view="grid" class="btn btn-default"><i class="fw fw-grid"></i></button></li>' +
'<li><button data-click-event="toggle-list-view" data-view="list" class="btn btn-default"><i class="fw fw-list"></i></button></li>' + '<li><button data-click-event="toggle-list-view" data-view="list" class="btn btn-default"><i class="fw fw-list"></i></button></li>' +
'</ul>' '</ul>'

@ -223,23 +223,27 @@ $.fn.datatables_extended_serverside_paging = function (settings, url, dataFilter
} }
function getAdvanceToolBar() { function getAdvanceToolBar() {
var selectableBtnHtml = "";
if (table.hasClass('sorting-enabled')) { if (table.hasClass('sorting-enabled')) {
return '<ul class="nav nav-pills navbar-right remove-margin" role="tablist">' + if(!table.hasClass('un-selectable')){
'<li><button data-click-event="toggle-selectable" class="btn btn-default btn-primary select-enable-btn">Select</li>' + selectableBtnHtml = '<li><button data-click-event="toggle-selectable" class="btn btn-default btn-primary select-enable-btn">Select</li>' +
'<li><button data-click-event="toggle-selected" id="dt-select-all" class="btn btn-default btn-primary disabled">Select All</li>' + '<li><button data-click-event="toggle-selected" id="dt-select-all" class="btn btn-default btn-primary disabled">Select All</li>';
}
return '<ul class="nav nav-pills navbar-right remove-margin" role="tablist">' + selectableBtnHtml +
'<li><button data-click-event="toggle-list-view" data-view="grid" class="btn btn-default"><i class="fw fw-grid"></i></button></li>' + '<li><button data-click-event="toggle-list-view" data-view="grid" class="btn btn-default"><i class="fw fw-grid"></i></button></li>' +
'<li><button data-click-event="toggle-list-view" data-view="list" class="btn btn-default"><i class="fw fw-list"></i></button></li>' + '<li><button data-click-event="toggle-list-view" data-view="list" class="btn btn-default"><i class="fw fw-list"></i></button></li>' +
'<li><button class="btn btn-default" data-toggle="dropdown"><i class="fw fw-sort"></i></button>' + dropdownmenu[0].outerHTML + '</li>' + '<li><button class="btn btn-default" data-toggle="dropdown"><i class="fw fw-sort"></i></button>' + dropdownmenu[0].outerHTML + '</li>' +
'</ul>' '</ul>';
} else { } else {
return '<ul class="nav nav-pills navbar-right remove-margin" role="tablist">' + if(!table.hasClass('un-selectable')){
'<li><button data-click-event="toggle-selectable" class="btn btn-default btn-primary select-enable-btn">Select</li>' + selectableBtnHtml = '<li><button data-click-event="toggle-selectable" class="btn btn-default btn-primary select-enable-btn">Select</li>' +
'<li><button data-click-event="toggle-selected" id="dt-select-all" class="btn btn-default btn-primary disabled">Select All</li>' + '<li><button data-click-event="toggle-selected" id="dt-select-all" class="btn btn-default btn-primary disabled">Select All</li>';
}
return '<ul class="nav nav-pills navbar-right remove-margin" role="tablist">' + selectableBtnHtml +
'<li><button data-click-event="toggle-list-view" data-view="grid" class="btn btn-default"><i class="fw fw-grid"></i></button></li>' + '<li><button data-click-event="toggle-list-view" data-view="grid" class="btn btn-default"><i class="fw fw-grid"></i></button></li>' +
'<li><button data-click-event="toggle-list-view" data-view="list" class="btn btn-default"><i class="fw fw-list"></i></button></li>' + '<li><button data-click-event="toggle-list-view" data-view="list" class="btn btn-default"><i class="fw fw-list"></i></button></li>' +
'</ul>' '</ul>';
} }
;
} }

Loading…
Cancel
Save