]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/locale/doc/html/navtree.js
3 [ "Boost.Locale", "index.html", [
4 [ "Modules", "modules.html", "modules" ],
5 [ "Namespaces", null, [
6 [ "Namespace List", "namespaces.html", "namespaces" ],
7 [ "Namespace Members", "namespacemembers.html", [
8 [ "All", "namespacemembers.html", "namespacemembers_dup" ],
9 [ "Functions", "namespacemembers_func.html", "namespacemembers_func" ],
10 [ "Variables", "namespacemembers_vars.html", null ],
11 [ "Typedefs", "namespacemembers_type.html", null ],
12 [ "Enumerations", "namespacemembers_enum.html", null ],
13 [ "Enumerator", "namespacemembers_eval.html", null ]
17 [ "Class List", "annotated.html", "annotated" ],
18 [ "Class Hierarchy", "hierarchy.html", "hierarchy" ],
19 [ "Class Members", "functions.html", [
20 [ "All", "functions.html", "functions_dup" ],
21 [ "Functions", "functions_func.html", "functions_func" ],
22 [ "Variables", "functions_vars.html", null ],
23 [ "Typedefs", "functions_type.html", null ],
24 [ "Enumerations", "functions_enum.html", null ],
25 [ "Enumerator", "functions_eval.html", null ]
29 [ "File List", "files.html", "files" ]
31 [ "Examples", "examples.html", "examples" ]
38 "classboost_1_1locale_1_1generator.html#a767403ea3f6259fd184a6e355caf62f2",
39 "group__boundary.html#ga1d16a23d328240464f9068cf58fb38d7",
40 "group__message.html#ga4f0b199ac8500821ab1106a59f565fb3"
43 var SYNCONMSG
= 'click to disable panel synchronisation';
44 var SYNCOFFMSG
= 'click to enable panel synchronisation';
45 var SYNCONMSG
= 'click to disable panel synchronisation';
46 var SYNCOFFMSG
= 'click to enable panel synchronisation';
47 var navTreeSubIndices
= new Array();
49 function getData(varName
)
51 var i
= varName
.lastIndexOf('/');
52 var n
= i
>=0 ? varName
.substring(i
+1) : varName
;
53 return eval(n
.replace(/\-/g,'_'));
56 function stripPath(uri
)
58 return uri
.substring(uri
.lastIndexOf('/')+1);
61 function stripPath2(uri
)
63 var i
= uri
.lastIndexOf('/');
64 var s
= uri
.substring(i
+1);
65 var m
= uri
.substring(0,i
+1).match(/\/d\w\/d\w\w\/$/);
66 return m
? uri
.substring(i
-6) : s
;
69 function localStorageSupported()
72 return 'localStorage' in window
&& window
['localStorage'] !== null && window
.localStorage
.getItem
;
80 function storeLink(link
)
82 if (!$("#nav-sync").hasClass('sync') && localStorageSupported()) {
83 window
.localStorage
.setItem('navpath',link
);
89 if (localStorageSupported()) {
90 window
.localStorage
.setItem('navpath','');
96 if (localStorageSupported()) {
97 return window
.localStorage
.getItem('navpath');
103 function getScript(scriptName
,func
,show
)
105 var head
= document
.getElementsByTagName("head")[0];
106 var script
= document
.createElement('script');
107 script
.id
= scriptName
;
108 script
.type
= 'text/javascript';
109 script
.onload
= func
;
110 script
.src
= scriptName
+'.js';
111 if ($.browser
.msie
&& $.browser
.version
<=8) {
112 // script.onload does not work with older versions of IE
113 script
.onreadystatechange = function() {
114 if (script
.readyState
=='complete' || script
.readyState
=='loaded') {
115 func(); if (show
) showRoot();
119 head
.appendChild(script
);
122 function createIndent(o
,domNode
,node
,level
)
126 while (n
.parentNode
) { level
++; n
=n
.parentNode
; }
127 if (node
.childrenData
) {
128 var imgNode
= document
.createElement("img");
129 imgNode
.style
.paddingLeft
=(16*level
).toString()+'px';
133 node
.plus_img
= imgNode
;
134 node
.expandToggle
= document
.createElement("a");
135 node
.expandToggle
.href
= "javascript:void(0)";
136 node
.expandToggle
.onclick = function() {
138 $(node
.getChildrenUL()).slideUp("fast");
139 node
.plus_img
.src
= node
.relpath
+"ftv2pnode.png";
140 node
.expanded
= false;
142 expandNode(o
, node
, false, false);
145 node
.expandToggle
.appendChild(imgNode
);
146 domNode
.appendChild(node
.expandToggle
);
147 imgNode
.src
= node
.relpath
+"ftv2pnode.png";
149 var span
= document
.createElement("span");
150 span
.style
.display
= 'inline-block';
151 span
.style
.width
= 16*(level
+1)+'px';
152 span
.style
.height
= '22px';
153 span
.innerHTML
= ' ';
154 domNode
.appendChild(span
);
158 var animationInProgress
= false;
160 function gotoAnchor(anchor
,aname
,updateLocation
)
162 var pos
, docContent
= $('#doc-content');
163 if (anchor
.parent().attr('class')=='memItemLeft' ||
164 anchor
.parent().attr('class')=='fieldtype' ||
165 anchor
.parent().is(':header'))
167 pos
= anchor
.parent().position().top
;
168 } else if (anchor
.position()) {
169 pos
= anchor
.position().top
;
172 var dist
= Math
.abs(Math
.min(
173 pos
-docContent
.offset().top
,
174 docContent
[0].scrollHeight
-
175 docContent
.height()-docContent
.scrollTop()));
176 animationInProgress
=true;
178 scrollTop
: pos
+ docContent
.scrollTop() - docContent
.offset().top
179 },Math
.max(50,Math
.min(500,dist
)),function(){
180 if (updateLocation
) window
.location
.href
=aname
;
181 animationInProgress
=false;
186 function newNode(o
, po
, text
, link
, childrenData
, lastNode
)
188 var node
= new Object();
189 node
.children
= Array();
190 node
.childrenData
= childrenData
;
191 node
.depth
= po
.depth
+ 1;
192 node
.relpath
= po
.relpath
;
193 node
.isLast
= lastNode
;
195 node
.li
= document
.createElement("li");
196 po
.getChildrenUL().appendChild(node
.li
);
197 node
.parentNode
= po
;
199 node
.itemDiv
= document
.createElement("div");
200 node
.itemDiv
.className
= "item";
202 node
.labelSpan
= document
.createElement("span");
203 node
.labelSpan
.className
= "label";
205 createIndent(o
,node
.itemDiv
,node
,0);
206 node
.itemDiv
.appendChild(node
.labelSpan
);
207 node
.li
.appendChild(node
.itemDiv
);
209 var a
= document
.createElement("a");
210 node
.labelSpan
.appendChild(a
);
211 node
.label
= document
.createTextNode(text
);
212 node
.expanded
= false;
213 a
.appendChild(node
.label
);
216 if (link
.substring(0,1)=='^') {
217 url
= link
.substring(1);
220 url
= node
.relpath
+link
;
222 a
.className
= stripPath(link
.replace('#',':'));
223 if (link
.indexOf('#')!=-1) {
224 var aname
= '#'+link
.split('#')[1];
225 var srcPage
= stripPath($(location
).attr('pathname'));
226 var targetPage
= stripPath(link
.split('#')[0]);
227 a
.href
= srcPage
!=targetPage
? url
: "javascript:void(0)";
228 a
.onclick = function(){
230 if (!$(a
).parent().parent().hasClass('selected'))
232 $('.item').removeClass('selected');
233 $('.item').removeAttr('id');
234 $(a
).parent().parent().addClass('selected');
235 $(a
).parent().parent().attr('id','selected');
237 var anchor
= $(aname
);
238 gotoAnchor(anchor
,aname
,true);
242 a
.onclick = function() { storeLink(link
); }
245 if (childrenData
!= null)
247 a
.className
= "nolink";
248 a
.href
= "javascript:void(0)";
249 a
.onclick
= node
.expandToggle
.onclick
;
253 node
.childrenUL
= null;
254 node
.getChildrenUL = function() {
255 if (!node
.childrenUL
) {
256 node
.childrenUL
= document
.createElement("ul");
257 node
.childrenUL
.className
= "children_ul";
258 node
.childrenUL
.style
.display
= "none";
259 node
.li
.appendChild(node
.childrenUL
);
261 return node
.childrenUL
;
269 var headerHeight
= $("#top").height();
270 var footerHeight
= $("#nav-path").height();
271 var windowHeight
= $(window
).height() - headerHeight
- footerHeight
;
272 (function (){ // retry until we can scroll to the selected item
274 var navtree
=$('#nav-tree');
275 navtree
.scrollTo('#selected',0,{offset
:-windowHeight
/2});
277 setTimeout(arguments
.callee
, 0);
282 function expandNode(o
, node
, imm
, showRoot
)
284 if (node
.childrenData
&& !node
.expanded
) {
285 if (typeof(node
.childrenData
)==='string') {
286 var varName
= node
.childrenData
;
287 getScript(node
.relpath
+varName
,function(){
288 node
.childrenData
= getData(varName
);
289 expandNode(o
, node
, imm
, showRoot
);
292 if (!node
.childrenVisited
) {
294 } if (imm
|| ($.browser
.msie
&& $.browser
.version
>8)) {
295 // somehow slideDown jumps to the start of tree for IE9 :-(
296 $(node
.getChildrenUL()).show();
298 $(node
.getChildrenUL()).slideDown("fast");
301 node
.plus_img
.src
= node
.relpath
+"ftv2mlastnode.png";
303 node
.plus_img
.src
= node
.relpath
+"ftv2mnode.png";
305 node
.expanded
= true;
310 function glowEffect(n
,duration
)
312 n
.addClass('glow').delay(duration
).queue(function(next
){
313 $(this).removeClass('glow');next();
317 function highlightAnchor()
319 var aname
= $(location
).attr('hash');
320 var anchor
= $(aname
);
321 if (anchor
.parent().attr('class')=='memItemLeft'){
322 var rows
= $('.memberdecls tr[class$="'+
323 window
.location
.hash
.substring(1)+'"]');
324 glowEffect(rows
.children(),300); // member without details
325 } else if (anchor
.parents().slice(2).prop('tagName')=='TR') {
326 glowEffect(anchor
.parents('div.memitem'),1000); // enum value
327 } else if (anchor
.parent().attr('class')=='fieldtype'){
328 glowEffect(anchor
.parent().parent(),1000); // struct field
329 } else if (anchor
.parent().is(":header")) {
330 glowEffect(anchor
.parent(),1000); // section header
332 glowEffect(anchor
.next(),1000); // normal member
334 gotoAnchor(anchor
,aname
,false);
337 function selectAndHighlight(hash
,n
)
341 var link
=stripPath($(location
).attr('pathname'))+':'+hash
.substring(1);
342 a
=$('.item a[class$="'+link
+'"]');
345 a
.parent().parent().addClass('selected');
346 a
.parent().parent().attr('id','selected');
349 $(n
.itemDiv
).addClass('selected');
350 $(n
.itemDiv
).attr('id','selected');
352 if ($('#nav-tree-contents .item:first').hasClass('selected')) {
353 $('#nav-sync').css('top','30px');
355 $('#nav-sync').css('top','5px');
360 function showNode(o
, node
, index
, hash
)
362 if (node
&& node
.childrenData
) {
363 if (typeof(node
.childrenData
)==='string') {
364 var varName
= node
.childrenData
;
365 getScript(node
.relpath
+varName
,function(){
366 node
.childrenData
= getData(varName
);
367 showNode(o
,node
,index
,hash
);
370 if (!node
.childrenVisited
) {
373 $(node
.getChildrenUL()).css({'display':'block'});
375 node
.plus_img
.src
= node
.relpath
+"ftv2mlastnode.png";
377 node
.plus_img
.src
= node
.relpath
+"ftv2mnode.png";
379 node
.expanded
= true;
380 var n
= node
.children
[o
.breadcrumbs
[index
]];
381 if (index
+1<o
.breadcrumbs
.length
) {
382 showNode(o
,n
,index
+1,hash
);
384 if (typeof(n
.childrenData
)==='string') {
385 var varName
= n
.childrenData
;
386 getScript(n
.relpath
+varName
,function(){
387 n
.childrenData
= getData(varName
);
389 showNode(o
,node
,index
,hash
); // retry with child node expanded
392 var rootBase
= stripPath(o
.toroot
.replace(/\..+$/, ''));
393 if (rootBase
=="index" || rootBase
=="pages" || rootBase
=="search") {
394 expandNode(o
, n
, true, true);
396 selectAndHighlight(hash
,n
);
401 selectAndHighlight(hash
);
405 function removeToInsertLater(element
) {
406 var parentNode
= element
.parentNode
;
407 var nextSibling
= element
.nextSibling
;
408 parentNode
.removeChild(element
);
411 parentNode
.insertBefore(element
, nextSibling
);
413 parentNode
.appendChild(element
);
418 function getNode(o
, po
)
420 var insertFunction
= removeToInsertLater(po
.li
);
421 po
.childrenVisited
= true;
422 var l
= po
.childrenData
.length
-1;
423 for (var i
in po
.childrenData
) {
424 var nodeData
= po
.childrenData
[i
];
425 po
.children
[i
] = newNode(o
, po
, nodeData
[0], nodeData
[1], nodeData
[2],
431 function gotoNode(o
,subIndex
,root
,hash
,relpath
)
433 var nti
= navTreeSubIndices
[subIndex
][root
+hash
];
434 o
.breadcrumbs
= $.extend(true, [], nti
? nti
: navTreeSubIndices
[subIndex
][root
]);
435 if (!o
.breadcrumbs
&& root
!=NAVTREE
[0][1]) { // fallback: show index
436 navTo(o
,NAVTREE
[0][1],"",relpath
);
437 $('.item').removeClass('selected');
438 $('.item').removeAttr('id');
441 o
.breadcrumbs
.unshift(0); // add 0 for root node
442 showNode(o
, o
.node
, 0, hash
);
446 function navTo(o
,root
,hash
,relpath
)
448 var link
= cachedLink();
450 var parts
= link
.split('#');
452 if (parts
.length
>1) hash
= '#'+parts
[1];
455 if (hash
.match(/^#l\d+$/)) {
456 var anchor
=$('a[name='+hash
.substring(1)+']');
457 glowEffect(anchor
.parent(),1000); // line number
458 hash
=''; // strip line number anchors
459 //root=root.replace(/_source\./,'.'); // source link to doc link
463 while (NAVTREEINDEX
[i
+1]<=url
) i
++;
464 if (i
==-1) { i
=0; root
=NAVTREE
[0][1]; } // fallback: show index
465 if (navTreeSubIndices
[i
]) {
466 gotoNode(o
,i
,root
,hash
,relpath
)
468 getScript(relpath
+'navtreeindex'+i
,function(){
469 navTreeSubIndices
[i
] = eval('NAVTREEINDEX'+i
);
470 if (navTreeSubIndices
[i
]) {
471 gotoNode(o
,i
,root
,hash
,relpath
);
477 function showSyncOff(n
,relpath
)
479 n
.html('<img src="'+relpath
+'sync_off.png" title="'+SYNCOFFMSG
+'"/>');
482 function showSyncOn(n
,relpath
)
484 n
.html('<img src="'+relpath
+'sync_on.png" title="'+SYNCONMSG
+'"/>');
487 function toggleSyncButton(relpath
)
489 var navSync
= $('#nav-sync');
490 if (navSync
.hasClass('sync')) {
491 navSync
.removeClass('sync');
492 showSyncOff(navSync
,relpath
);
493 storeLink(stripPath2($(location
).attr('pathname'))+$(location
).attr('hash'));
495 navSync
.addClass('sync');
496 showSyncOn(navSync
,relpath
);
501 function initNavTree(toroot
,relpath
)
503 var o
= new Object();
505 o
.node
= new Object();
506 o
.node
.li
= document
.getElementById("nav-tree-contents");
507 o
.node
.childrenData
= NAVTREE
;
508 o
.node
.children
= new Array();
509 o
.node
.childrenUL
= document
.createElement("ul");
510 o
.node
.getChildrenUL = function() { return o
.node
.childrenUL
; };
511 o
.node
.li
.appendChild(o
.node
.childrenUL
);
513 o
.node
.relpath
= relpath
;
514 o
.node
.expanded
= false;
515 o
.node
.isLast
= true;
516 o
.node
.plus_img
= document
.createElement("img");
517 o
.node
.plus_img
.src
= relpath
+"ftv2pnode.png";
518 o
.node
.plus_img
.width
= 16;
519 o
.node
.plus_img
.height
= 22;
521 if (localStorageSupported()) {
522 var navSync
= $('#nav-sync');
524 showSyncOff(navSync
,relpath
);
525 navSync
.removeClass('sync');
527 showSyncOn(navSync
,relpath
);
529 navSync
.click(function(){ toggleSyncButton(relpath
); });
532 $(window
).load(function(){
533 navTo(o
,toroot
,window
.location
.hash
,relpath
);
537 $(window
).bind('hashchange', function(){
538 if (window
.location
.hash
&& window
.location
.hash
.length
>1){
540 if ($(location
).attr('hash')){
541 var clslink
=stripPath($(location
).attr('pathname'))+':'+
542 $(location
).attr('hash').substring(1);
543 a
=$('.item a[class$="'+clslink
+'"]');
545 if (a
==null || !$(a
).parent().parent().hasClass('selected')){
546 $('.item').removeClass('selected');
547 $('.item').removeAttr('id');
549 var link
=stripPath2($(location
).attr('pathname'));
550 navTo(o
,link
,$(location
).attr('hash'),relpath
);
551 } else if (!animationInProgress
) {
552 $('#doc-content').scrollTop(0);
553 $('.item').removeClass('selected');
554 $('.item').removeAttr('id');
555 navTo(o
,toroot
,window
.location
.hash
,relpath
);