app/assets/javascripts/arclight/collection_navigation.js in arclight-0.1.4 vs app/assets/javascripts/arclight/collection_navigation.js in arclight-0.2.0
- old
+ new
@@ -7,15 +7,18 @@
function convertDocsForContext(id, $doc) {
var newDocs;
var $currentDoc;
var $previousDocs;
var $nextDocs;
- var headers = $doc.find('article header[data-document-id="' + id + '"]')
- if (headers.length == 0) {
+ var headers = $doc.find('article div[data-document-id="' + id + '"]');
+ if (headers.length === 0) {
$.error('Document is missing id=' + id);
}
$currentDoc = $(headers[0].parentNode); // need article element
$currentDoc.addClass('al-hierarchy-highlight');
+
+ // Unlink the current component - just show the title
+ $currentDoc.find('a').contents().unwrap();
// We want to show 0-1 or 0-2 siblings depending on where highlighted component is
$previousDocs = $currentDoc.prevUntil().slice(0, 2);
$nextDocs = $currentDoc.nextUntil().slice(0, 2);