Category dTree - Style / howTo edit dtree.js

Before you ask about IDnR Addon see the VirtueMart - Invoice, Delivery Note and Receipt Addon
torminalis
Phoca Newbie
Phoca Newbie
Posts: 1
Joined: 29 Jan 2013, 17:45

Category dTree - Style / howTo edit dtree.js

Post by torminalis »

Hi at Phoca,

I like your dTree very much - but I'd like to to have a 'special' style.
And - I cannot work it out.

So - what would I like to do:
- I want every OPEN node to be displayed in an color (RED)
- I just get it for the NodeSel

See my added Screenshot.

I tried to edit the dtree.js. Hmmm - the whole tree was gone ...
Even when I add an comment, the tree wont work any more.
What do I have to care about when modifying the dtree.js?

Please give a hint howTo solve this.

I'd need to color the text after the MINUS-Nodes.
somewhere here?

Code: Select all

/* Highlights the selected node*/
dTree2749.prototype.s = function(id) {
	if (!this.config.useSelection) return;
	var cn = this.aNodes[id];
	if (cn._hc && !this.config.folderLinks) return;
	if (this.selectedNode != id) {
		if (this.selectedNode || this.selectedNode==0) {
			eOld = document.getElementById("s" + this.obj + this.selectedNode);
			eOld.className = "node";
		}
		eNew = document.getElementById("s" + this.obj + id);
		eNew.className = "nodeSel";
		this.selectedNode = id;
		if (this.config.useCookies) this.setCookie('cs' + this.obj, cn.id);
	}
};
thanx 4 your help.
Christian

Image
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47870
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Category dTree - Style / howTo edit dtree.js

Post by Jan »

Hi, unfortunatelly, I am not developer of the dtree.js and I am not javascript expert so cannot give any clue advice regarding this :-( :-(

Jan
If you find Phoca extensions useful, please support the project
Post Reply