i-net-software / dokuwiki-plugin-multiorphan

Administrative GUI to find all sorts of orphaned or wanted pages and media. This works using AJAX instead of loading everything into one page.
https://www.dokuwiki.org/plugin:multiorphan
5 stars 5 forks source link

Don't use popups, they are blocked in browsers #21

Closed micgro42 closed 7 years ago

micgro42 commented 7 years ago

Basically, all modern browsers (or at least Firefox and Chrome) block popups (i.e. windows opened by window.open) by default. So this makes for a suboptimal user experience.

The way around this is to add the final URL and target="_blank" to the link by default and let the browser execute the default action.

When creating the link, it is necessary to differentiate between the different actions. We currently could use the label-key, however, at some point, we might want to localize that 'label' key. Hence an actionId is added to reliably identify the action.

This should fix #20

PS: I we could now remove the viewPage and viewUrl cases from the ajax handler in the backend?

micgro42 commented 7 years ago

I just noticed this isn't working for external links. I look into it.

micgro42 commented 7 years ago

Unfortunately I see no easy way to differentiate between internal and external links 😞

gamma commented 7 years ago

I'll have a look at it next week.

micgro42 commented 7 years ago

That commit 14c22af should resolve the problem with the external links.

gamma commented 7 years ago

I'll merge the request. The JSINFO should still only be added when this is the multi orphan page. But that can be done in a second stage.