Menu

#184 Mods to option open reports new Tab

open
nobody
None
5
2012-06-08
2012-06-08
No

This is an possible way to make opening reports in the frame or a separate tab. Seems like an easy way to do it. I only implemented the change on two menu entries for this review. I am interested in thought about this method. I think the funtion (genNewTab) may need some of the 'disabled' checking like gneMiscLink as well

https://github.com/tmccormi/openemr/compare/report_in_tab

left_nav.php is the worst tangled up pile of stuff now... so I don't want to add anything too complicated...
--Tony

Discussion

  • Brady Miller

    Brady Miller - 2012-06-08

    Placed comments on github.

     
  • Kevin Yeh

    Kevin Yeh - 2012-06-08

    Something to consider is that rather than create a new function and have to duplicate the "disabled" checking that you add a new optional parameter to genMiscLink which specifies that the menu item can be opened in a new tab.
    Also genMiscLink returns the link wrapped in <li></li> tags so your new function may not format the same.
    Because of the "tangled pile" issue I think that adding a new function makes it worse. Better to extend/modify the existing function and keep things together. I couldn't see the li tag issue/difference in github.

     
  • Tony McCormick

    Tony McCormick - 2012-06-08

    I actually tried doing this originally as an if block inside the genMiscLink function but it broke the menu entirely and after a while I gave up and made it a separate function. I might try it again...

     

Log in to post a comment.