Basically, the following code hooks/tablename-tv.js tweaks a few column headings and adds a breadcrumb.
One of the major annoyances of AG is that, once you've opened a table, then a detail record, then child records - there's no clean way to get back to the parent detail record.
This hook fixes that.
Code: Select all
// hooks/order_items-tv.js
$j(function(){
// right align a couple of table headers
$j('th.order_items-quantity').addClass('text-right');
$j('th.order_items-amount').addClass('text-right');
// add a back-to-orders link if item table view with a filter set
var view=$j('#current_view').val();
var id=$j('input[name="filterer_orders_id"]').val()*1;
if(view=='TV' && id>0){
var linktext='<a style="text-decoration: none; color: inherit;" href="orders_view.php?SelectedID='+id+'"><img src="resources/table_icons/cart.png"> Orders </a> ';
$j('a[href="order_items_view.php"]').before(linktext);
}
});
Of course, you can tweak the hook. Drop the image. Alter the url. Don't add a new <a> tag, but alter the existing one. Just depends on your skills with jquery. And google
Enjoy!