hdoc-tools 0.7.4 → 0.7.6
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
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
<style>
|
|
22
22
|
.hb-hidden
|
|
23
23
|
{
|
|
24
|
-
visibility:hidden;
|
|
24
|
+
visibility:hidden !important;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
</style>
|
|
@@ -155,13 +155,13 @@
|
|
|
155
155
|
</div>
|
|
156
156
|
|
|
157
157
|
<!-- 100% horizontal col below toolbar and auto adjust vertical to take rest of avail height -->
|
|
158
|
-
<div class="main-layout hb-container-horizontal hb-container-expand">
|
|
158
|
+
<div class="main-layout hb-container-horizontal hb-container-expand hb-hidden">
|
|
159
159
|
|
|
160
160
|
<!-- the left hand nav col -->
|
|
161
|
-
<aside class="DocSidebar hb-container-vertical">
|
|
161
|
+
<aside class="DocSidebar hb-container-vertical hb-hidden">
|
|
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)
|
|
@@ -461,24 +491,29 @@ async function intialiseApp() {
|
|
|
461
491
|
//-- now render out the nav menu
|
|
462
492
|
view.renderNavigation();
|
|
463
493
|
|
|
464
|
-
$("#vDocDevApp").removeClass("hb-hidden");
|
|
465
494
|
|
|
466
495
|
setTimeout(function()
|
|
467
|
-
{
|
|
496
|
+
{
|
|
468
497
|
listenForHrefClicks();
|
|
469
498
|
|
|
470
499
|
//-- check if url is not root - in which case we need to load content for url
|
|
471
500
|
var initialLoadContentHref = window.location.href.replace(window.location.origin+"/","");
|
|
501
|
+
initialLoadContentHref = findFirstClickableBookLink(initialLoadContentHref);
|
|
502
|
+
|
|
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
|
|
475
506
|
loadContentUrl(initialLoadContentHref,true,false);
|
|
507
|
+
|
|
508
|
+
|
|
476
509
|
}
|
|
477
510
|
else
|
|
478
511
|
{
|
|
479
|
-
|
|
480
|
-
loadBookDefaultLink();
|
|
512
|
+
console.log("initial first view link to laod is not present");
|
|
481
513
|
}
|
|
514
|
+
|
|
515
|
+
$(".hb-hidden").removeClass("hb-hidden");
|
|
516
|
+
|
|
482
517
|
},200);
|
|
483
518
|
});
|
|
484
519
|
});
|