This topic is locked

How to hide 'Edit selected'/'Delete selected' buttons

11/17/2010 12:23:12 PM
PHPRunner Tips and Tricks
Sergey Kornilov admin

PHPRunner 5.2/5.3
Sometimes you need to show 'Edit selected' and 'Delete selected' only when there are selected records on the list page. For this purpose add the following code to 'List page: Javascript OnLoad' event

$('span[@id=record_controls1]').hide();
$('input[@type=checkbox][@name^=selection],[@id^=chooseAll]').click(function() {

if ($('input[@type=checkbox][@checked][@name^=selection]').length)

{

$('span[@id=record_controls1]').show();

}

else

{

$('span[@id=record_controls1]').hide();

}
});