From 0848434685f7d017e65d66031b5b013ae46ede4a Mon Sep 17 00:00:00 2001 From: "boyan.tonchev" Date: Wed, 9 Aug 2023 12:37:40 +0300 Subject: [PATCH] Fixes review comments: - add parameter to initResourceReference function; - fixes same as button size. --- src/js/angular/explore/controllers.js | 12 ++++++------ src/pages/explore.html | 5 ++--- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/js/angular/explore/controllers.js b/src/js/angular/explore/controllers.js index 4c9245de3..bcb32e881 100644 --- a/src/js/angular/explore/controllers.js +++ b/src/js/angular/explore/controllers.js @@ -104,23 +104,23 @@ function ExploreCtrl( return ClassInstanceDetailsService.getLocalName(uri); }; - const initResourceReference = () => { + const initResourceReference = (resourceInfo) => { if ($routeParams.prefix && $routeParams.localName && usedPrefixes[$routeParams.prefix]) { // /resource/PREFIX/LOCAL -> URI = expanded PREFIX + LOCAL - $scope.resourceInfo.uri = usedPrefixes[$routeParams.prefix] + $routeParams.localName; + resourceInfo.uri = usedPrefixes[$routeParams.prefix] + $routeParams.localName; } else if ($location.search().uri) { // uri parameter -> URI - $scope.resourceInfo.uri = $location.search().uri + ($location.hash() ? '#' + $location.hash() : ''); + resourceInfo.uri = $location.search().uri + ($location.hash() ? '#' + $location.hash() : ''); } else if ($location.search().triple) { // uri parameter -> URI - $scope.resourceInfo.triple = $location.search().triple + ($location.hash() ? '#' + $location.hash() : ''); + resourceInfo.triple = $location.search().triple + ($location.hash() ? '#' + $location.hash() : ''); } else { // absolute URI -> URI - $scope.resourceInfo.uri = $location.absUrl(); + resourceInfo.uri = $location.absUrl(); } // remove angle brackets which were allowed when filling out the search input field // but are forbidden when passing the uri as a query parameter - $scope.resourceInfo.uri = $scope.resourceInfo.uri && $scope.resourceInfo.uri.replace(/<|>/g, ""); + resourceInfo.uri = resourceInfo.uri && resourceInfo.uri.replace(/<|>/g, ""); }; $scope.loadResource = () => { diff --git a/src/pages/explore.html b/src/pages/explore.html index 1fed6c1d2..644b06765 100644 --- a/src/pages/explore.html +++ b/src/pages/explore.html @@ -71,7 +71,7 @@

-