hdoc-tools 0.7.4 → 0.7.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -66,10 +66,16 @@
|
|
|
66
66
|
padding: 0 20px 20px;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
+
.DocSidebar .nogrouplink {
|
|
70
|
+
padding-top: 10px;
|
|
71
|
+
padding-bottom: 0px;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
|
|
69
75
|
.DocSidebar .group {
|
|
70
|
-
margin-top:
|
|
76
|
+
margin-top: 0px;
|
|
71
77
|
margin-bottom: 5px;
|
|
72
|
-
padding-top:
|
|
78
|
+
padding-top: 5px;
|
|
73
79
|
}
|
|
74
80
|
|
|
75
81
|
.DocSidebar .group + .group {
|
package/ui/index.html
CHANGED
|
@@ -161,7 +161,7 @@
|
|
|
161
161
|
<aside class="DocSidebar hb-container-vertical">
|
|
162
162
|
|
|
163
163
|
<nav class="nav hb-container-expand" id="DocSidebarNav" aria-labelledby="sidebar-aria-label" tabindex="-1">
|
|
164
|
-
<div v-for="(navSection,index) in docApp.navSections"
|
|
164
|
+
<div v-for="(navSection,index) in docApp.navSections" v-bind:class="{'group':navSection.items, 'nogrouplink':!navSection.items}">
|
|
165
165
|
|
|
166
166
|
<div v-show="!navSection.items">
|
|
167
167
|
<a class="DocLink link noitems" v-bind:href="navSection.link" v-bind:target="navSection.target || ''" style="padding-left: 0px;">
|
package/ui/js/doc.hornbill.js
CHANGED
|
@@ -319,7 +319,37 @@ function loadContentUrl(linkRef,fromPageRefresh,fromPopState)
|
|
|
319
319
|
|
|
320
320
|
function loadBookDefaultLink()
|
|
321
321
|
{
|
|
322
|
-
$(".DocLink").first().click();
|
|
322
|
+
$(".DocLink.link").first().click();
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
function findFirstClickableBookLink(findByLinkRef,currentNavSection)
|
|
326
|
+
{
|
|
327
|
+
if(currentNavSection === undefined)
|
|
328
|
+
currentNavSection = view.docApp.navSections;
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
for(let x=0;x<currentNavSection.length;x++)
|
|
332
|
+
{
|
|
333
|
+
if(currentNavSection[x].items)
|
|
334
|
+
{
|
|
335
|
+
let clickableItem = findFirstClickableBookLink(findByLinkRef,currentNavSection[x].items);
|
|
336
|
+
if(clickableItem)
|
|
337
|
+
{
|
|
338
|
+
return clickableItem;
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
else if(currentNavSection[x].link)
|
|
342
|
+
{
|
|
343
|
+
if(findByLinkRef)
|
|
344
|
+
{
|
|
345
|
+
if(removeStartingSlash(removeTrailingSlash(currentNavSection[x].link)) == findByLinkRef) return currentNavSection[x].link;
|
|
346
|
+
}
|
|
347
|
+
else
|
|
348
|
+
{
|
|
349
|
+
return currentNavSection[x].link;
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
}
|
|
323
353
|
}
|
|
324
354
|
|
|
325
355
|
function expandNavParentSectionBySelectedLinkHref(findByLinkRef, currentNavSection)
|
|
@@ -469,6 +499,7 @@ async function intialiseApp() {
|
|
|
469
499
|
|
|
470
500
|
//-- check if url is not root - in which case we need to load content for url
|
|
471
501
|
var initialLoadContentHref = window.location.href.replace(window.location.origin+"/","");
|
|
502
|
+
initialLoadContentHref = findFirstClickableBookLink(initialLoadContentHref);
|
|
472
503
|
if(initialLoadContentHref)
|
|
473
504
|
{
|
|
474
505
|
//-- find the link we are going to show and make sure parent/s are set to .expand=true
|
|
@@ -476,8 +507,7 @@ async function intialiseApp() {
|
|
|
476
507
|
}
|
|
477
508
|
else
|
|
478
509
|
{
|
|
479
|
-
|
|
480
|
-
loadBookDefaultLink();
|
|
510
|
+
console.log("initial first view link to laod is not present");
|
|
481
511
|
}
|
|
482
512
|
},200);
|
|
483
513
|
});
|