Login | Register
My pages Projects Community openCollabNet

Reply to message

* = Required fields
* Subject
* Body
Send reply to
Author (directly in email)
Please type the letters in the image above.

Original message

Author "EXT-McTaggart, Peter" <peter.mctaggart@boeing.com>
Full name "EXT-McTaggart, Peter" <peter.mctaggart@boeing.com>
Date 2003-07-21 16:26:36 PDT
Message Hi Jason,

Thanks for your help. As usual I wasn't thining straight yesterday.
This was the last issue in a long list I've been working on in my spare

Anyway -- I fixed the HTML and now it works fine.


> Hey Peter,
> I have subscribed you to the dev@sstree mailing list so that you will
> get this reply. The list has very low traffic at the moment.
> >I'm trying to apply the sstree stuff to the module list in
> Scarab. One =
> >thing I have noticed is that if you click on
> >the image associated with a leaf ie. of class =3D "doc" it
> changes the =
> >image to folder-closed. when it should
> >remain unchanged.
> >
> >I'm not very familiar with javascript -- I tried testing the
> class of =
> >the elm or row but it doesn't seem to
> >work.
> I'm glad to see you are trying sstree for scarab. I also hope that
> people will find it to be a useful starting point for other projects
> too.
> I think you need an HTML change rather than a javascript change. The
> class="folder" <a> tags should have onclick="toggle(this)". The
> class='doc" should not have any onclick attribute. That way, nothing
> happens when a user clicks on a "doc", it will just keep the same
> background image. Here is a fragment from
> http://sstree.tigris​.org/nonav/example2.​html that illustrates it:
> <li><a id="impl" href="#default.impl" class="folder"
> onclick="toggle(this​)"></a>Impl​ementation and Testing
> <ol>
> <li><a href="#" class="doc"></a><a
> href="#">Implementation documentation</a​></li>
> <li><a href="#" class="doc"></a><a href="#">User guide</a></li>
> <li><a href="#" class="doc"></a><a href="#">Test suite</a>
> <ul>
> <li><a href="#">Test case format</a></li>
> <li><a href="#">Test cases</a></li>
> </ul>
> </li>
> </ol>
> </li>
> Note that in this example, for the 4th level I just used a <ul>
> without any icons. The <ul> makes it stay open always, only <ol>
> lists expand and collapse in my examples. The reason for that is
> that, for my examples, I think it made sense to show the 4th level of
> detail (sections within a document) as bullets whenever the user
> expresses interest in a particular 2nd level item. If that does not
> make sense in your application, you can just use <ol> for everything,
> or you can change the CSS rules and add a onclick to any node that you
> want to expand, but it should appear as a folder, not a document .
> If you do find that you need to learn more javascript. I recommend
> http://www.amazon.co​m/exec/obidos/ASIN/0​596000480/tigris-20
> And some other books on CSS, etc are at http://jrobbins.org/books/
> I think you should be able to use if (elm.class == 'folder').
> However, the current code also looks for elm's next sibling to be an
> <ol>. If it is a <ul>, then elm's image will be stuck as
> closed-folder. So, that might explain why it looked like you could
> not check the class, depending on exactly how you did the HTML.
> Thanks,
> jason!
> --------------------​--------------------​--------------------​---------
> To unsubscribe, e-mail: dev-unsubscribe@sstr​ee.tigris.org
> For additional commands, e-mail: dev-help at sstree dot tigris dot org

To unsubscribe, e-mail: dev-unsubscribe@sstr​ee.tigris.org
For additional commands, e-mail: dev-help at sstree dot tigris dot org