From: Olivier Lamy Date: Fri, 17 Feb 2012 22:50:39 +0000 (+0000) Subject: simply breadcrumb calculation X-Git-Tag: archiva-1.4-M3~1254 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=40298ae97ba74518a377699b8d9e94a463fb4f95;p=archiva.git simply breadcrumb calculation git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1245789 13f79535-47bb-0310-9956-ffa450edef68 --- 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 1ff45a25e..e76c99a54 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 @@ -43,15 +43,21 @@ $(function() { } 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(); + // root level ? + if (!self.parentBrowseViewModel) return []; + + var splitted = self.groupId.split("."); + var breadCrumbEntries=[]; + var curGroupId; + for (var i=0;i
  •   /
  • {{each(i,breadCrumbEntry) breadCrumbEntries}} -
  • ${breadCrumbEntry} /
  • +
  • + ${breadCrumbEntry.displayValue} / +
  • {{/each}} \ No newline at end of file