From c18b8229cefae28713c58d6e48acccbedb3f282d Mon Sep 17 00:00:00 2001
From: uhensler <urs.hensler@frentix.com>
Date: Wed, 3 Feb 2021 09:13:16 +0100
Subject: [PATCH] OO-5265: Single page: Open internal links in new window

---
 src/main/webapp/static/js/openolat/iframe.js | 18 +-----------------
 1 file changed, 1 insertion(+), 17 deletions(-)

diff --git a/src/main/webapp/static/js/openolat/iframe.js b/src/main/webapp/static/js/openolat/iframe.js
index a146933fb72..bfd7431ce04 100644
--- a/src/main/webapp/static/js/openolat/iframe.js
+++ b/src/main/webapp/static/js/openolat/iframe.js
@@ -205,23 +205,7 @@ function b_changeLinkTargets() {
 		var anchor = anchors[i];
 		if (anchor.getAttribute('href')) {
 			var target = anchor.getAttribute('target');
-			var href = anchor.getAttribute("href");
-			if ((href.indexOf("/url/") != -1 || href.indexOf("/auth/") != -1) && 
-					(
-						href.indexOf("/repo/go?rid=") != -1 
-						|| href.indexOf("/RepositoryEntry/") != -1 
-						|| href.indexOf("/BusinessGroup/") != -1 
-						|| href.indexOf("Site/") != -1
-						|| href.indexOf("/CatalogEntry/") != -1										
-						|| href.indexOf("/Portal/") != -1
-						|| href.indexOf("/CatalogAdmin/") != -1
-						|| href.indexOf("/GMCMenuTree/") != -1
-					)
-			) {
-				// absolute links to repository entries have to by opened in the parent frame
-				// /auth/repo/ is legacy format, /url/RepositoryEntry/ is new format
-				anchor.target = "_parent";
-			} else if (target != null && target != undefined && (target == '_top' || target == '_parent')) {
+			if (target != null && target != undefined && (target == '_top' || target == '_parent')) {
 				// fix broken legacy links that try to open content in top window
 				// iframe content must always stay within iframe 
 				var mainwindow = b_getMainWindow(window.parent);
-- 
GitLab