![]() |
![]() |
|
|
|
|
You see anyway in there to make the root node have a bit larger and bold font?
![]() |
||
|
__________________
Currently working hard to break the server... >> Help support JSR through our Amazon store |
||
|
|
||
| Sponsored Links |
|
|
|
|
|
|
Ok.. I knew nothing about CSS when you asked this question and now I know just enough beyond nothing to answer your question :P Add this to dtree.js.. The change is near the bottom. Two if statements: if(node.pid == this.root.id) set the style of the root node text.
Code:
// Creates the node icon, url and text
dTree.prototype.node = function(node, nodeId) {
var str = '<div class="dTreeNode"' + this.indent(node, nodeId);
if (this.config.useIcons) {
if (!node.icon) node.icon = (this.root.id == node.pid) ? this.icon.root : ((node._hc) ? this.icon.folder : this.icon.node);
if (!node.iconOpen) node.iconOpen = (node._hc) ? this.icon.folderOpen : this.icon.node;
if (this.root.id == node.pid) {
node.icon = this.icon.root;
node.iconOpen = this.icon.root;
}
str += '<img id="i' + this.obj + nodeId + '" src="' + ((node._io) ? node.iconOpen : node.icon) + '" alt="" />';
}
if (node.url) {
str += '<a id="s' + this.obj + nodeId + '" class="' + ((this.config.useSelection) ? ((node._is ? 'nodeSel' : 'node')) : 'node') + '" href="' + node.url + '"';
if (node.title) str += ' title="' + node.title + '"';
if (node.target) str += ' target="' + node.target + '"';
if (this.config.useStatusText) str += ' onmouseover="window.status=\'' + node.name + '\';return true;" onmouseout="window.status=\'\';return true;" ';
if (this.config.useSelection && ((node._hc && this.config.folderLinks) || !node._hc))
str += ' onclick="javascript: ' + this.obj + '.s(' + nodeId + ');"';
str += '>';
}
else if ((!this.config.folderLinks || !node.url) && node._hc && node.pid != this.root.id)
str += '<a href="javascript: ' + this.obj + '.o(' + nodeId + ');" class="node">';
if(node.pid == this.root.id) {
str += '<font class="nodeROOT">';
}
str += node.name;
if(node.pid == this.root.id) {
str += '</font>';
}
if (node.url || ((!this.config.folderLinks || !node.url) && node._hc)) str += '</a>';
str += '</div>';
if (node._hc) {
str += '<div id="d' + this.obj + nodeId + '" class="clip" style="display:' + ((this.root.id == node.pid || node._io) ? 'block' : 'none') + ';">';
str += this.addNode(node);
str += '</div>';
}
this.aIndent.pop();
return str;
};
Code:
.dtree .nodeROOT {
FONT-SIZE: 20px; FONT-WEIGHT: bold;
}
|
||
|
|
||
|
|
|
Yeah, span won't kick you to a new line like <p> and <div> will. CSS makes my world much easier. It's funny, with js, I look at it and I understand it. I just can't create with it yet. To much of the syntax I don't know yet. It's the opposite with PHP, MySQL, CSS, XTML, etc. I know exactly what to do there. Someday I'll spend some time and read up more on js. It's so useful sometimes.
|
||
|
|
||
|
|
|
So, has the taste changed since you posted it?
Here's the mining data: Ore report Aren't frames evil? So far, what I'd like to see is the real-time amounts of everything at that station, and for everything to be clickable. For example, when looking at Alpaa's I would see that there are no machined parts. I know they are local, but i'd be nice for the locals if you could just click the thing and it would take you to the appropriate item in the station you're currently in. For the imports, i'd like to be able to click them and see where they are made and their ingredients, possibly in the third frame. As soon as I think of more features to request I will ![]() |
||
|
|
||
|
|
|
Ummm, not that I saw in this thread....but me and you are on very different wavelengths so it's easy for me not to understand you. Oh, and please if you do that tree thing, have it open all the sub things be default...
I mean, if I want to not see the not-mined ingredients I can close them, but ya figure if someone wanted to click it, ofcourse they would want the ingredients, and they'd probably want to see all 3 types of ingredients as well. One question i do have, is why have them close automatically? Say for example I'd like to compare ingredients between an alpaa and mortar (to see if i can get one to produce and not waste commods on the other). It'd be convenient to be able to have them both open. |
||
|
|
||
|
|
|
This looks very nice . . and all that geek talk just turns me on!
But the one very high-level comment I have is a kind of personal bias. I think the very best econ tools start with identifying need/problem areas, whereas this starts at a station which may or may not be the source of critically-needed items. If you layered this tool below something that did this, it would be (even more) awesome. |
||
|
|
||