Lines Matching refs:id

33  *  - div#cdtree_<id indexmenu>  div top level
34 * - div#dtree_<id indexmenu> div contains all nodes
35 * - div#toc_<id indexmenu> ??
37 * - img#i<id indexmenu><nodenr?> icon
38 * - a#s<id indexmenu><nodenr?> url to page/namespace with title
39 * - div#t<id indexmenu><nodenr?> button for opening ToC, included if hovered
40 * - div.d<id indexmenu><nodenr?>
42 * repeats: - div.d<id indexmenu><nodenr?>
43 * - z<id indexmenu> scroll rightward arrows
44 * - left_<id indexmenu> scroll leftward arrows
47 * - picker_<id indexmenu> popup with ToC
48 * - r<id indexmenu> rightmouse button menu
54 * @param {string} dokuid page id of node
55 * @param {number} id node id
56 * @param {number} pid parent node id
58 * @param {number|string} hns page id of headpage of namespace
63 function dTreeNode(dokuid, id, pid, name, hns, isdir, ajax) {
65 this.dokuid = dokuid; // page id of node
67 this.id = id; // id number of node
69 this.pid = pid; // id number of parent node
87 this._ai = 0; // id number of first child....
105 * @param {string} treeName id of the indexmenu, has form 'indexmenu_<identifier>'
112 urlbase: DOKU_BASE + 'doku.php?id=', // base of dokuwiki (set in page)
150 this.selectedNode = undefined; // node id
156 this.scrllTmr = 0; // store timer id for horizontal scrolling the page
158 this.pageid = JSINFO.id || ''; // current page
176 * @param {string} dokuid page id of node
177 * @param {number} id node id
178 * @param {number} pid parent node id
180 * @param {number|string} hns page id of headpage of namespace
184 dTree.prototype.add = function (dokuid, id, pid, name, hns, isdir, ajax) {
185 this.aNodes[this.aNodes.length] = new dTreeNode(dokuid, id, pid, name, hns, isdir, ajax);
206 str += '<div id="cdtree_' + this.treeName + '" class="dtree" style="position:relative;overflow:hidden;width:100%;">';
208 str += '<div id="dtree_' + this.treeName + '" class="dtree ' + this.config.theme + '" style="overflow:';
216 str += '<div class="error">Indexmenu id conflict</div>';
219 str += '<div id="t' + this.treeName + '" class="indexmenu_tocbullet ' + this.config.theme + '" style="display:none;" title="Table of contents"></div>';
220 str += '<div id="toc_' + this.treeName + '" style="display:none;"></div>';
227 str += '<div id="z' + this.treeName + '" class="indexmenu_rarrow"></div>';
228 str += '<div id="left_' + this.treeName + '" class="indexmenu_larrow" style="display:none;" title="Click to scroll back" onmousedown="' + this.treeName + '.scroll(\'r\',1)" onmouseup="' + this.treeName + '.stopscroll()"></div>';
246 if (this.aNodes[n].pid === pNode.id) {
253 cn._io = this.isOpen(cn.id);
257 } else if (cn.id === this.selectedNode && !this.selectedFound) {
306 node.icon = (this.root.id === node.pid) ? this.icon.root : ((node.hns) ? this.icon.folderH : ((node._hc) ? this.icon.folder : this.icon.node));
308 if (this.root.id === node.pid) {
312 str += '<img id="i' + this.treeName + nodeId + '" src="' + ((node._io) ? node.iconOpen : node.icon) + '" alt="" />';
314 str += '<a id="s' + this.treeName + nodeId + '" class="' + ((node._cp) ? 'navSel' : ((node._is) ? 'nodeSel' : (node._hc) ? 'nodeFdUrl' : 'nodeUrl'));
321 else if (node.pid !== this.root.id) {
322 str += '<a id="s' + this.treeName + nodeId + '" href="javascript: ' + this.treeName + '.o(' + nodeId + '); " class="node"' + jsfnc + '>' + node.name + '</a>';
328 str += '<div id="d' + this.treeName + nodeId + '" class="clip" style="display:' + ((this.root.id === node.pid || node._io) ? 'block' : 'none') + ';">';
347 if (this.root.id !== node.pid) {
358 '<img id="j' + this.treeName + nodeId + '" src="' +
376 if (this.aNodes[n].pid === node.id) {
380 lastId = this.aNodes[n].id;
383 if (lastId === node.id) {
391 * @returns {int} node id
401 * @param {int} id node id
403 dTree.prototype.s = function (id) {
404 let eOld, eNew, cn = this.aNodes[id];
405 if (this.selectedNode !== id) {
406 eNew = jQuery("#s" + this.treeName + id)[0];
415 this.selectedNode = id;
417 this.setCookie('cs' + this.treeName, cn.id);
425 * @param {int} id node id
427 dTree.prototype.o = function (id) {
428 let cn = this.aNodes[id];
429 this.nodeStatus(!cn._io, id, cn._ls);
446 if (this.aNodes[n]._hc && this.aNodes[n].pid !== this.root.id) {
459 * @param {number} nId node id
467 if (this.aNodes[n].id === nId) {
475 if (cn.pid === this.root.id || !cn._p) {
507 * @param {int} id node id
510 dTree.prototype.nodeStatus = function (status, id, bottom) {
511 if (status && !this.fill(id)) {
515 eJoin = jQuery('#j' + this.treeName + id)[0];
516 eIcon = jQuery('#i' + this.treeName + id)[0];
517 eIcon.src = (status) ? this.aNodes[id].iconOpen : this.aNodes[id].icon;
519 jQuery('#d' + this.treeName + id)[0].style.display = (status) ? 'block' : 'none';
576 if (this.aNodes[n]._io && this.aNodes[n].pid !== this.root.id) {
580 str += this.aNodes[n].id;
587 * [Cookie] Checks if a node id is in the cookie
589 * @param {int} id node id
592 dTree.prototype.isOpen = function (id) {
595 if (parseInt(aOpen[n],10) === id) {
621 this.openTo(cn.id, false, true);
634 this.openTo(cna.id, false, true);
641 * @param {int} id node id
644 dTree.prototype.fill = function (id) {
645 if (id === -1 || this.aNodes[id]._ok) {
648 let n = id, $eLoad, a, rd, ln, eDiv;
671 id = rd[ln];
672 a = this.aNodes[id];
673 eDiv = jQuery('#d' + this.treeName + id)[0];
715 * @param {int} n parent node id
801 * @param {int} n node id
804 var w, div, id, dtree, dtreel, self, node = jQuery('#s' + this.treeName + n)[0];
808 id = (this.aNodes[n].hns) ? this.aNodes[n].hns : this.aNodes[n].dokuid;
810 IndexmenuContextmenu.createTocMenu('call=indexmenu&req=toc&id=' + decodeURIComponent(id), 'picker_' + self.treeName, 't' + self.treeName);
872 * @param {int} n node id
898 ajxnode[2] = (ajxnode[2] == 0) ? node.id : ajxnode[2] + plus;
906 selft.openTo(node.id, false, true);
933 * @param {int} n node id
962 * Show/hide object with given id of current indexmenu
964 * @param {string} objName name of object, which is combined with the unique id of the indexmenu