Hi to all!
Need to catch click event of this button to set custom dropdown filters to their default values.
Is it possible at all?
Thanks.
How to add custom action to [Show All] button?
Re: How to add custom action to [Show All] button?
https://imgur.com/q7CyFdG
After pressing 1 [Show All] want to set both dropdown lists 2, 3 to their default values.
doesn't work...
After pressing 1 [Show All] want to set both dropdown lists 2, 3 to their default values.
Code: Select all
jQuery('#NoFilter').on('click', function (){
//some code
}
Re: How to add custom action to [Show All] button?
Please post the code you used to display the dropdowns.
AppGini plugins to add more power to your apps:
- DataTalk is an innovative AppGini plugin based on ChatGPT that allows you to interact with your AppGini database using natural language questions, without writing any SQL. Check the demo video
- Mass Update plugin: Update multiple records at once and improve your workflow efficiency.
- Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.
Re: How to add custom action to [Show All] button?
Code: Select all
jQuery(function changeStatus (){
var str1 = '<select class="btn btn-default" name="status_flt" id="status_flt">';
str1 = str1 + '<option value="">All Statuses</option>';
str1 = str1 + '<option value="Onboarding">Onboarding</option>';
str1 = str1 + '<option value="Active">Active</option>';
str1 = str1 + '<option value="Offboarded">Offboarded</option>';
str1 = str1 + '<option value="On_leave">On leave</option>';
str1 = str1 + '</select>';
jQuery('#Filter').after(str1);
jQuery('#status_flt').on('change', function() {
var empl_Status = document.getElementById('status_flt').value;
localStorage.setItem('status_flt_value', empl_Status);
var filter_field = 11;
var url = encodeURI('Employee_Directory_view.php?FilterField[1]=' + filter_field + '&FilterOperator[1]=like&FilterValue[1]=' + empl_Status);
window.open(url, '_self')
});
jQuery(document).ready(function() {
if (jQuery('#status_flt').length) {
var saved_val = (localStorage.getItem('status_flt_value'));
jQuery('#status_flt').val(saved_val);
}
});
});
Re: How to add custom action to [Show All] button?
Try to catch with
Code: Select all
$j('button[name="NoFilter_x"]').on('click', function() { /*yourcode*/ });
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: How to add custom action to [Show All] button?
pböttcher, you are AppGenius!
It works.
Thanks!
It works.
Thanks!