Needed for some plugin. Adding
&editsiteid=\d+ should open the specified site directly. There may be edge cases where multiple sites match a searched number maybe but that be edge case as it likely would be only an issue if > 10 sites matched the specified number. Basically, the URL parameter triggers a search for that number / idsite and the site will be opened directly.
Works for me locally. I'm wondering if we should remove the
editsiteid parameter after the user finished editing, otherwise the parameter might stick around and open the same site the next time they visit the manage measurables page.
good point @diosmosis 👍 changed it and also refactored slightly to have less duplicated code.
To be able to change the URL I had to move the id from a search query parameter to a hash so I can remove it without reloading the page. When saving or canceling then I remove the hash but not removing the search query as it's tricky to do and not really needed for now as this link will be used extremely rare. People can in worst case always click on left menu again to get all sites I reckon.