Not sure of the correct term 'jump' or 'focus' but is it possible that when saving a product after editing that the page can jump/focus/scroll to that product?
Just trying to save a bit of time when editing products and having to keep scrolling down the page to the next product to edit.
How to jump/focus on the product that has been saved
- tessthepup
- Certified Developer
- Posts: 383
- Joined: Mon Mar 01, 2021 5:55 pm
- Phoenix Version:
- Has thanked: 56 times
- Been thanked: 62 times
-
ecartz
- Core Team
- Posts: 3084
- Joined: Tue Nov 05, 2019 6:02 pm
- Phoenix Version:
- Has thanked: 4 times
- Been thanked: 208 times
Re: How to jump/focus on the product that has been saved
Code: Select all
class hook_admin_catalog_scroll_to_active {
public function listen_infoBox() {
if (empty($GLOBALS['action']) || ('default' === $GLOBALS['action'])) {
echo <<<'EOJS'
<script>
document.getElementsByClassName('table-active')[0].scrollIntoView();
</script>
EOJS;
}
}
}https://stackoverflow.com/a/22292000/6660678
https://stackoverflow.com/q/21436550/6660678
- tessthepup
- Certified Developer
- Posts: 383
- Joined: Mon Mar 01, 2021 5:55 pm
- Phoenix Version:
- Has thanked: 56 times
- Been thanked: 62 times