Skip to content
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

Implementation of Target_Blank option to open External links in a new tab #268

Closed
wants to merge 1 commit into from

Conversation

ChrisCano66
Copy link

@ChrisCano66 ChrisCano66 commented Jun 30, 2021

Fix #79
** External Issue : #74 "Open in new tab"**

Hi !

We are a team that contributes to the improvement and production of free software for the general public. Moreover, being a NextCloud user, we wanted to improve it and especially the External module.

Thus, we wanted to respond to Issue #74 which requires the opening of external links to a new tab.
We have therefore improved the source code of the External module by modifying the following:

On External front-end, we added the possibility to check the "New Tab" option.
We have modified the files "admin.js", "site.handlebars" and "style.css" in the External module where we added a "target" option.
But we needed to modify some Nextcloud files too : "layout.user.php" and "MainMenu.js". So we also made a contribution on NextCloud Server in order for the implementation to be done properly.

For setting up the data option in the database and link the front-end to back-end, we had to modify the following files in External module :
"Application.php", "APIController.php", "SitesManager.php", "Personnal.php", "BeforeTemplateRenderedListener.php" and " Capabilites.php".
In all of this files, we added the "target" option which allows us to follow the activation of the front-end option to the back-end and the database.

If you have any questions about the implementation of the option, please do not hesitate to contact us by email at the following address: contact@fcclvandoeuvre.fr or christophecanovas66@gmail.com.

Regards,

/!\ Careful /!\

The compatibility between the "redirect" option and the "target" option can sometimes create a bug and are not necessarily compatible. But the use of both options at the same time is possible and feature on mozilla/firefox/chrome. However, it is preferable to use either option and not both at the same time.

/!\ Careful /!\

Signed-off-by: christophe canovas <christophecanovas66@gmail.com>
@szaimen
Copy link

szaimen commented Jun 30, 2021

Linked to nextcloud/server#27725

@nickvergessen
Copy link
Member

From my POV the "Redirect" option can be reused to keep it simpler:

A page that needs redirecting is good to leave the origin tab behind so you still find back to your Nextcloud, same that would happen when you CTRL+click and at the same time I don't see a lot use in opening a new tab which is again iframed into Nextcloud.

@nickvergessen nickvergessen mentioned this pull request Feb 15, 2022
1 task
@nickvergessen
Copy link
Member

Replaced by #287

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Open in new tab
4 participants