I have added Direct list editing into a CCv5 listing. It is working as expected, but I am running into one issue. As part of my testing I was checking to see what happens if a User were to click the Update List button without having selected any records. I get an alert that shows the URL of the website and "says:" but with no message following.
The jQuery code CCv5 generates is as follows:
You can see that the alert has an empty string as its message.
How can I set a more appropriate and/or custom message to be displayed informing the user they must select at least one record to be updated?
The jQuery code CCv5 generates is as follows:
jQuery("#toolbar-button-save_list").css('background', 'url("https://<website url>/libraries/cegcore/assets/images/toolbar/save_list.png") no-repeat top center #F6F6F6');
jQuery("#toolbar-button-save_list").on('click',
function(){
if(jQuery('#admin_form input.gc_selector:checked').length > 0){
jQuery('#admin_form').attr('action', jQuery("#toolbar-button-save_list").data("url"));
jQuery('#admin_form').submit();
}else{
alert("");
return false;
}
You can see that the alert has an empty string as its message.
How can I set a more appropriate and/or custom message to be displayed informing the user they must select at least one record to be updated?