Hi i have a code i use the Highlights rows based on what selected.
i like to Hide a row for example if(status == 'Invoiced') like to hide that row.
can anyone Help?
Thanks.
<script>
$j(function(){
$j('.Tickets-Status').each(function(){
var status = $j(this).text();
if(status == 'New'){
$j(this).parents('tr').addClass('info');
}
if(status == 'Complete'){
$j(this).parents('tr').addClass('success');
}
if(status == 'Invoiced'){
$j(this).parents('tr').addClass('warning');
}
if(status == 'On Hold'){
$j(this).parents('tr').addClass('danger');
}
if(status == 'Close'){
$j(this).parents('tr').addClass('danger');
}
})
})
</script>
Hide Row based on value
Re: Hide Row based on value
Instead of using javascript for hiding the already loaded table rows, what about filtering records already on serverside using AppGini's built in filtering options?
Doing it that way the pagination/paging would still work as expected and not showing misleading values ("Showing records 1-10 of 60" First/Prev/Next/Last buttons, Page 1 / 2 / ...)
Just an idea.
Doing it that way the pagination/paging would still work as expected and not showing misleading values ("Showing records 1-10 of 60" First/Prev/Next/Last buttons, Page 1 / 2 / ...)
Just an idea.
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 25.10 + all AppGini Helper tools
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityAppGini 25.10 + all AppGini Helper tools
Re: Hide Row based on value
Code: Select all
// ...
if(status == 'Invoiced')
$j(this).closest('tr').fadeOut();
// or $j(this).closest('tr').hide();
// or $j(this).closest('tr').addClass('hidden');
// ...
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 25.10 + all AppGini Helper tools
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityAppGini 25.10 + all AppGini Helper tools
Re: Hide Row based on value
jsetzer Thank you so much for you reply.
1st option seems like a much better idea.
only Problem is i m not familiar with these filtering options.
any help would be much appreciated.
1st option seems like a much better idea.
only Problem is i m not familiar with these filtering options.
any help would be much appreciated.
Re: Hide Row based on value
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 25.10 + all AppGini Helper tools
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityAppGini 25.10 + all AppGini Helper tools
Re: Hide Row based on value
Is there a way to run this link
<a href="http://localhost/jfs/Tickets_view.php?S ... >Filter</a>
when opening this one?
<a href="Tickets_view.php"></i>Tickets</a>
<a href="http://localhost/jfs/Tickets_view.php?S ... >Filter</a>
when opening this one?
<a href="Tickets_view.php"></i>Tickets</a>
Re: Hide Row based on value
Hi, when posting code (for example HTML, PHP, CSS or Javascript-code, here: your links) can you please use
[code]
... [/code]
. This will help us reading your post and helping you. Thank you.See here:
app.php/help/bbcode#f2r1
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 25.10 + all AppGini Helper tools
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityAppGini 25.10 + all AppGini Helper tools
Re: Hide Row based on value
Well, there are many places where you would have to replace the original link by the custom link. If I was you, I would not do so.jfehr wrote: ↑2022-02-01 05:09Is there a way to run this link
<a href="http://localhost/jfs/Tickets_view.php?SortField=&SortDirection=&FilterAnd%5B1%5D=and&FilterField%5B1%5D=13&FilterOperator%5B1%5D=not-equal-to&FilterValue%5B1%5D=Invoiced">Filter</a>
when opening this one?
<a href="Tickets_view.php"></i>Tickets</a>
Alternatives:
- You can add the link for the filtered view into menu
see hooks/links-navmenu.php - You can add the link for the filtered view to your homepage
see hooks/links-home.php - You can add filters in TABLENAME_init() function as described here:
https://bigprof.com/appgini/tips-and-tu ... ult-filter - If you don't want users of a certain group to see those invalid records, you can consider changing ownership of those records to a user of a different group (for example to "admin") using
set_record_owner
function, then limit read-permissions for the group to "Group only". As admin you will still see those records, but the users will not. Just as an idea.
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 25.10 + all AppGini Helper tools
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityAppGini 25.10 + all AppGini Helper tools