Skip to content

Commit 3f118ea

Browse files
author
MFC Action
committed
Docs @ c38609e
1 parent 1620840 commit 3f118ea

File tree

8 files changed

+80
-32
lines changed

8 files changed

+80
-32
lines changed

documentation/menu.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,7 @@ function initMenu(relPath,searchEnabled,serverSide,searchPage,search,treeview) {
8484
'</div>');
8585
$('#main-nav').append(makeTree(menudata,relPath));
8686
$('#main-nav').children(':first').addClass('sm sm-dox').attr('id','main-menu');
87-
if (searchBoxHtml) {
88-
$('#main-menu').append('<li id="searchBoxPos2" style="float:right"></li>');
89-
}
87+
$('#main-menu').append('<li id="searchBoxPos2" style="float:right"></li>');
9088
const $mainMenuState = $('#main-menu-state');
9189
let prevWidth = 0;
9290
if ($mainMenuState.length) {

documentation/resize.js

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,30 @@
2424
*/
2525

2626
function initResizable(treeview) {
27-
let sidenav,navtree,content,header,footer,barWidth=6;
27+
let sidenav,mainnav,navtree,content,header,footer,barWidth=6;
2828
const RESIZE_COOKIE_NAME = ''+'width';
2929

3030
function resizeWidth() {
3131
const sidenavWidth = $(sidenav).outerWidth();
32-
content.css({marginLeft:parseInt(sidenavWidth)+"px"});
32+
const widthStr = parseInt(sidenavWidth)+"px";
33+
content.css({marginLeft:widthStr});
3334
if (typeof page_layout!=='undefined' && page_layout==1) {
34-
footer.css({marginLeft:parseInt(sidenavWidth)+"px"});
35+
footer.css({marginLeft:widthStr});
36+
if (mainnav) {
37+
mainnav.css({marginLeft:widthStr});
38+
}
3539
}
3640
Cookie.writeSetting(RESIZE_COOKIE_NAME,sidenavWidth-barWidth);
3741
}
3842

3943
function restoreWidth(navWidth) {
40-
content.css({marginLeft:parseInt(navWidth)+barWidth+"px"});
44+
const widthStr=parseInt(navWidth)+barWidth+"px";
45+
content.css({marginLeft:widthStr});
4146
if (typeof page_layout!=='undefined' && page_layout==1) {
42-
footer.css({marginLeft:parseInt(navWidth)+barWidth+"px"});
47+
footer.css({marginLeft:widthStr});
48+
if (mainnav) {
49+
mainnav.css({marginLeft:widthStr});
50+
}
4351
}
4452
sidenav.css({width:navWidth + "px"});
4553
}
@@ -60,6 +68,9 @@ function initResizable(treeview) {
6068
contentHeight = windowHeight - footerHeight - 1;
6169
navtreeHeight = windowHeight - headerHeight - 1;
6270
sideNavHeight = windowHeight - 1;
71+
if (mainnav) {
72+
contentHeight -= mainnav.outerHeight();
73+
}
6374
}
6475
navtree.css({height:navtreeHeight + "px"});
6576
sidenav.css({height:sideNavHeight + "px"});
@@ -91,6 +102,9 @@ function initResizable(treeview) {
91102
content = $("#doc-content");
92103
footer = $("#nav-path");
93104
sidenav = $("#side-nav");
105+
if (document.getElementById('main-nav')) {
106+
mainnav = $("#main-nav");
107+
}
94108
if (treeview) {
95109
navtree = $("#nav-tree");
96110
$(".side-nav-resizable").resizable({resize: function(e, ui) { resizeWidth(); } });

post_process/menu.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,7 @@ function initMenu(relPath,searchEnabled,serverSide,searchPage,search,treeview) {
8484
'</div>');
8585
$('#main-nav').append(makeTree(menudata,relPath));
8686
$('#main-nav').children(':first').addClass('sm sm-dox').attr('id','main-menu');
87-
if (searchBoxHtml) {
88-
$('#main-menu').append('<li id="searchBoxPos2" style="float:right"></li>');
89-
}
87+
$('#main-menu').append('<li id="searchBoxPos2" style="float:right"></li>');
9088
const $mainMenuState = $('#main-menu-state');
9189
let prevWidth = 0;
9290
if ($mainMenuState.length) {

post_process/resize.js

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,30 @@
2424
*/
2525

2626
function initResizable(treeview) {
27-
let sidenav,navtree,content,header,footer,barWidth=6;
27+
let sidenav,mainnav,navtree,content,header,footer,barWidth=6;
2828
const RESIZE_COOKIE_NAME = ''+'width';
2929

3030
function resizeWidth() {
3131
const sidenavWidth = $(sidenav).outerWidth();
32-
content.css({marginLeft:parseInt(sidenavWidth)+"px"});
32+
const widthStr = parseInt(sidenavWidth)+"px";
33+
content.css({marginLeft:widthStr});
3334
if (typeof page_layout!=='undefined' && page_layout==1) {
34-
footer.css({marginLeft:parseInt(sidenavWidth)+"px"});
35+
footer.css({marginLeft:widthStr});
36+
if (mainnav) {
37+
mainnav.css({marginLeft:widthStr});
38+
}
3539
}
3640
Cookie.writeSetting(RESIZE_COOKIE_NAME,sidenavWidth-barWidth);
3741
}
3842

3943
function restoreWidth(navWidth) {
40-
content.css({marginLeft:parseInt(navWidth)+barWidth+"px"});
44+
const widthStr=parseInt(navWidth)+barWidth+"px";
45+
content.css({marginLeft:widthStr});
4146
if (typeof page_layout!=='undefined' && page_layout==1) {
42-
footer.css({marginLeft:parseInt(navWidth)+barWidth+"px"});
47+
footer.css({marginLeft:widthStr});
48+
if (mainnav) {
49+
mainnav.css({marginLeft:widthStr});
50+
}
4351
}
4452
sidenav.css({width:navWidth + "px"});
4553
}
@@ -60,6 +68,9 @@ function initResizable(treeview) {
6068
contentHeight = windowHeight - footerHeight - 1;
6169
navtreeHeight = windowHeight - headerHeight - 1;
6270
sideNavHeight = windowHeight - 1;
71+
if (mainnav) {
72+
contentHeight -= mainnav.outerHeight();
73+
}
6374
}
6475
navtree.css({height:navtreeHeight + "px"});
6576
sidenav.css({height:sideNavHeight + "px"});
@@ -91,6 +102,9 @@ function initResizable(treeview) {
91102
content = $("#doc-content");
92103
footer = $("#nav-path");
93104
sidenav = $("#side-nav");
105+
if (document.getElementById('main-nav')) {
106+
mainnav = $("#main-nav");
107+
}
94108
if (treeview) {
95109
navtree = $("#nav-tree");
96110
$(".side-nav-resizable").resizable({resize: function(e, ui) { resizeWidth(); } });

pre_process/menu.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,7 @@ function initMenu(relPath,searchEnabled,serverSide,searchPage,search,treeview) {
8484
'</div>');
8585
$('#main-nav').append(makeTree(menudata,relPath));
8686
$('#main-nav').children(':first').addClass('sm sm-dox').attr('id','main-menu');
87-
if (searchBoxHtml) {
88-
$('#main-menu').append('<li id="searchBoxPos2" style="float:right"></li>');
89-
}
87+
$('#main-menu').append('<li id="searchBoxPos2" style="float:right"></li>');
9088
const $mainMenuState = $('#main-menu-state');
9189
let prevWidth = 0;
9290
if ($mainMenuState.length) {

pre_process/resize.js

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,30 @@
2424
*/
2525

2626
function initResizable(treeview) {
27-
let sidenav,navtree,content,header,footer,barWidth=6;
27+
let sidenav,mainnav,navtree,content,header,footer,barWidth=6;
2828
const RESIZE_COOKIE_NAME = ''+'width';
2929

3030
function resizeWidth() {
3131
const sidenavWidth = $(sidenav).outerWidth();
32-
content.css({marginLeft:parseInt(sidenavWidth)+"px"});
32+
const widthStr = parseInt(sidenavWidth)+"px";
33+
content.css({marginLeft:widthStr});
3334
if (typeof page_layout!=='undefined' && page_layout==1) {
34-
footer.css({marginLeft:parseInt(sidenavWidth)+"px"});
35+
footer.css({marginLeft:widthStr});
36+
if (mainnav) {
37+
mainnav.css({marginLeft:widthStr});
38+
}
3539
}
3640
Cookie.writeSetting(RESIZE_COOKIE_NAME,sidenavWidth-barWidth);
3741
}
3842

3943
function restoreWidth(navWidth) {
40-
content.css({marginLeft:parseInt(navWidth)+barWidth+"px"});
44+
const widthStr=parseInt(navWidth)+barWidth+"px";
45+
content.css({marginLeft:widthStr});
4146
if (typeof page_layout!=='undefined' && page_layout==1) {
42-
footer.css({marginLeft:parseInt(navWidth)+barWidth+"px"});
47+
footer.css({marginLeft:widthStr});
48+
if (mainnav) {
49+
mainnav.css({marginLeft:widthStr});
50+
}
4351
}
4452
sidenav.css({width:navWidth + "px"});
4553
}
@@ -60,6 +68,9 @@ function initResizable(treeview) {
6068
contentHeight = windowHeight - footerHeight - 1;
6169
navtreeHeight = windowHeight - headerHeight - 1;
6270
sideNavHeight = windowHeight - 1;
71+
if (mainnav) {
72+
contentHeight -= mainnav.outerHeight();
73+
}
6374
}
6475
navtree.css({height:navtreeHeight + "px"});
6576
sidenav.css({height:sideNavHeight + "px"});
@@ -91,6 +102,9 @@ function initResizable(treeview) {
91102
content = $("#doc-content");
92103
footer = $("#nav-path");
93104
sidenav = $("#side-nav");
105+
if (document.getElementById('main-nav')) {
106+
mainnav = $("#main-nav");
107+
}
94108
if (treeview) {
95109
navtree = $("#nav-tree");
96110
$(".side-nav-resizable").resizable({resize: function(e, ui) { resizeWidth(); } });

simulation/menu.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,7 @@ function initMenu(relPath,searchEnabled,serverSide,searchPage,search,treeview) {
8484
'</div>');
8585
$('#main-nav').append(makeTree(menudata,relPath));
8686
$('#main-nav').children(':first').addClass('sm sm-dox').attr('id','main-menu');
87-
if (searchBoxHtml) {
88-
$('#main-menu').append('<li id="searchBoxPos2" style="float:right"></li>');
89-
}
87+
$('#main-menu').append('<li id="searchBoxPos2" style="float:right"></li>');
9088
const $mainMenuState = $('#main-menu-state');
9189
let prevWidth = 0;
9290
if ($mainMenuState.length) {

simulation/resize.js

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,30 @@
2424
*/
2525

2626
function initResizable(treeview) {
27-
let sidenav,navtree,content,header,footer,barWidth=6;
27+
let sidenav,mainnav,navtree,content,header,footer,barWidth=6;
2828
const RESIZE_COOKIE_NAME = ''+'width';
2929

3030
function resizeWidth() {
3131
const sidenavWidth = $(sidenav).outerWidth();
32-
content.css({marginLeft:parseInt(sidenavWidth)+"px"});
32+
const widthStr = parseInt(sidenavWidth)+"px";
33+
content.css({marginLeft:widthStr});
3334
if (typeof page_layout!=='undefined' && page_layout==1) {
34-
footer.css({marginLeft:parseInt(sidenavWidth)+"px"});
35+
footer.css({marginLeft:widthStr});
36+
if (mainnav) {
37+
mainnav.css({marginLeft:widthStr});
38+
}
3539
}
3640
Cookie.writeSetting(RESIZE_COOKIE_NAME,sidenavWidth-barWidth);
3741
}
3842

3943
function restoreWidth(navWidth) {
40-
content.css({marginLeft:parseInt(navWidth)+barWidth+"px"});
44+
const widthStr=parseInt(navWidth)+barWidth+"px";
45+
content.css({marginLeft:widthStr});
4146
if (typeof page_layout!=='undefined' && page_layout==1) {
42-
footer.css({marginLeft:parseInt(navWidth)+barWidth+"px"});
47+
footer.css({marginLeft:widthStr});
48+
if (mainnav) {
49+
mainnav.css({marginLeft:widthStr});
50+
}
4351
}
4452
sidenav.css({width:navWidth + "px"});
4553
}
@@ -60,6 +68,9 @@ function initResizable(treeview) {
6068
contentHeight = windowHeight - footerHeight - 1;
6169
navtreeHeight = windowHeight - headerHeight - 1;
6270
sideNavHeight = windowHeight - 1;
71+
if (mainnav) {
72+
contentHeight -= mainnav.outerHeight();
73+
}
6374
}
6475
navtree.css({height:navtreeHeight + "px"});
6576
sidenav.css({height:sideNavHeight + "px"});
@@ -91,6 +102,9 @@ function initResizable(treeview) {
91102
content = $("#doc-content");
92103
footer = $("#nav-path");
93104
sidenav = $("#side-nav");
105+
if (document.getElementById('main-nav')) {
106+
mainnav = $("#main-nav");
107+
}
94108
if (treeview) {
95109
navtree = $("#nav-tree");
96110
$(".side-nav-resizable").resizable({resize: function(e, ui) { resizeWidth(); } });

0 commit comments

Comments
 (0)