mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Target_Blank option to open External links
Signed-off-by: christophe canovas <christophecanovas66@gmail.com> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
This commit is contained in:
parent
ba7a31d73b
commit
d6a9278422
4 changed files with 7 additions and 5 deletions
|
|
@ -72,7 +72,7 @@ export const setUp = () => {
|
|||
if (!$app.is('a')) {
|
||||
$app = $app.closest('a')
|
||||
}
|
||||
if (event.which === 1 && !event.ctrlKey && !event.metaKey) {
|
||||
if (event.which === 1 && !event.ctrlKey && !event.metaKey && $app.attr('target') !== '_blank') {
|
||||
$app.find('svg').remove()
|
||||
$app.find('div').remove() // prevent odd double-clicks
|
||||
// no need for theming, loader is already inverted on dark mode
|
||||
|
|
@ -100,7 +100,7 @@ export const setUp = () => {
|
|||
$app = $app.closest('a')
|
||||
}
|
||||
|
||||
if (event.which === 1 && !event.ctrlKey && !event.metaKey && $app.parent('#more-apps').length === 0) {
|
||||
if (event.which === 1 && !event.ctrlKey && !event.metaKey && $app.parent('#more-apps').length === 0 && $app.attr('target') !== '_blank') {
|
||||
$app.find('svg').remove()
|
||||
$app.find('div').remove() // prevent odd double-clicks
|
||||
$app.prepend($('<div/>').addClass(
|
||||
|
|
|
|||
|
|
@ -69,6 +69,7 @@ $getUserAvatar = static function (int $size) use ($_): string {
|
|||
<?php foreach ($_['navigation'] as $entry): ?>
|
||||
<li data-id="<?php p($entry['id']); ?>" class="hidden" tabindex="-1">
|
||||
<a href="<?php print_unescaped($entry['href']); ?>"
|
||||
<?php if ($entry['target']): ?> target="_blank" rel="noreferrer noopener"<?php endif; ?>
|
||||
<?php if ($entry['active']): ?> class="active"<?php endif; ?>
|
||||
aria-label="<?php p($entry['name']); ?>">
|
||||
<svg width="24" height="20" viewBox="0 0 24 20" alt=""<?php if ($entry['unread'] !== 0) { ?> class="has-unread"<?php } ?>>
|
||||
|
|
@ -105,6 +106,7 @@ $getUserAvatar = static function (int $size) use ($_): string {
|
|||
<?php foreach ($_['navigation'] as $entry): ?>
|
||||
<li data-id="<?php p($entry['id']); ?>">
|
||||
<a href="<?php print_unescaped($entry['href']); ?>"
|
||||
<?php if ($entry['target']): ?> target="_blank" rel="noreferrer noopener"<?php endif; ?>
|
||||
<?php if ($entry['active']): ?> class="active"<?php endif; ?>
|
||||
aria-label="<?php p($entry['name']); ?>">
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" alt=""<?php if ($entry['unread'] !== 0) { ?> class="has-unread"<?php } ?>>
|
||||
|
|
|
|||
4
dist/core-main.js
vendored
4
dist/core-main.js
vendored
File diff suppressed because one or more lines are too long
2
dist/core-main.js.map
vendored
2
dist/core-main.js.map
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue