From: Mark G. <gi...@cr...> - 2005-09-19 07:53:30
|
Robert Treat wrote: > one of the things we do in the older version is allow you to click on the icon > to go directly to browse. i'm hoping we can support that in the new version > too. I took a look at the code but it seemed pretty hairy to me, so i thought > i would get a sanity check on the steps involved. > 1. Add some attributes into doTree() in tables.php for iconaction and then > build a url for browsing > 2. Modify printTreeXML in class/Misc.php to interpret the new items and add > them into the tree > 3. There is no step 3? I feel like I need to tell the js code somewhere about > the new url and what not, but can't find any place that looks resonable... is > there more to do? xloadtree2.js, line 276, in function: WebFXLoadTree.createItemFromElement I think that the XML attribute is read here and loaded into a property of the tree node. So we'll need to add something like: if (jsAttrs.iconAction) { jsNode.iconAction = jsAttrs.iconAction; } and in xtree2.js, around line 1126: _p._onclick = function(e) just after the expand icon is handled: if (/webfx-tree-icon/.test(el.className) && this.iconAction !== null) { window.open(this.iconAction, this.target || "_self"); } Although I haven't had time to test any of this, hope it helps. -- Mark Gibson <gibsonm |AT| cromwell |DOT| co |DOT| uk> Web Developer & Database Admin Cromwell Tools Ltd. Leicester, England. ___________________________________________________ This email is intended for the named recipient. The information contained in it is confidential. You should not copy it for any purposes, nor disclose its contents to any other party. If you received this email in error, please notify the sender immediately via email, and delete it from your computer. Any views or opinions presented are solely those of the author and do not necessarily represent those of the company. Registered Office: PO Box 14, Chartwell Dr, Wigston, Leicester. LE18 1AT __________________________________________________ |