From f113456cc5dc5d1bf83d1223ef315405a9f2594f Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Fri, 17 Feb 2012 22:50:24 +0000 Subject: [PATCH] [MRM-1573] breadcrumbs in repository browsing. git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1245788 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/webapp/js/archiva/search.js | 15 ++++++++++++++- .../main/webapp/js/archiva/templates/search.html | 12 ++++++++---- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js index 764398360..1ff45a25e 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js @@ -41,9 +41,22 @@ $(function() { browseRoot(); } } + + breadCrumbEntries=function(){ + var curBrowseViewModel=self; + var entries=[]; + do{ + entries.push(curBrowseViewModel.groupId); + curBrowseViewModel=curBrowseViewModel.parentBrowseViewModel; + if (!curBrowseViewModel) return entries.reverse(); + }while(curBrowseViewModel.parentBrowseViewModel) + return entries.reverse(); + } } - + findParentGroupId=function(browseViewModel){ + return browseViewModel.groupId; + } displayGroupDetail=function(groupId,parentBrowseViewModel,restUrl){ var mainContent = $("#main-content"); diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/search.html b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/search.html index 7d8e4dfb8..ac32be8d1 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/search.html +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/search.html @@ -42,11 +42,13 @@