-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NEW Add option to open files in new tab #29604
Conversation
I've added the condition on MAIN_DISABLE_FORCE_SAVEAS so those who do not have it won't open a new tab when then have the popup to download the file. I don't know how to solve the missing check |
Thanks @hregis , i hadn't test enough 😞 |
I don't think we must introduce a second option. Because the feature is dependent on MAIN_DISABLE_FORCE_SAVEAS activation or not, i think it must be a third value of MAIN_DISABLE_FORCE_SAVEAS Because having MAIN_DISABLE_FORCE_SAVEAS off and MAIN_FILES_OPEN_SAMETAB on has no sense. |
Of course, you're perfectly right. |
This is a feature that is recurringly requested along with the modification of "MAIN_DISABLE_FORCE_SAVEAS"
See for exemple :
https://www.dolibarr.org/forum/t/option-to-open-pdf-in-new-window/8389
https://www.dolibarr.org/forum/t/open-links-in-new-tab/14791
https://www.dolibarr.fr/forum/t/ouverture-des-pdf-dans-une-nouvelle-page/30766
https://www.dolibarr.fr/forum/t/pdf-dans-une-autre-fenetre/8058
https://www.dolibarr.fr/forum/t/ouverture-des-pdf/9447
In this PR, it is adding the option "MAIN_FILES_OPEN_NEWTAB" to open most files inside a newtab if it is not empty.
I will update the wiki once/if this PR is merge.
I suggest is to make this behavior as defaut, as it is the main behavior of all the main tools on the web.
In compensation, we could have an option "MAIN_FILES_OPEN_SAMETAB".
But it require consent from the experts who prefer otherwise, because the consensus will be status quo.