Forum OpenACS Development: Javascript tree menu for bookmarks package

The current javascript used in the bookmarks package (tree-static.js) does not work in some of the Mozilla browsers and is so slow in Explorer that the browser pops up a dialog box offering the user the option to kill the script.

I found an alternative script that is half the size of the one we're currently using, works on all the recent browsers I tried it on (mozilla, explorer, galeon, konqueror, etc...), is faster than the old one, and seems to me to be cleaner and easier to maintain than the old one.

Some of its other relevant features:

  • unlimited tree menu depth
  • any icons set can be used
  • low weight (~5KB)
  • highly optimized code guarantees incredible performance (good results on trees containing 10,000+ items)
  • can be used either inline or with frames
  • future browser's versions ready
  • simple configuration file structure, easy to generate dynamically from database
  • object oriented JavaScript implementation for those who want to learn DHTML programming

Their terms of use are:

"There is no license fee or royalty fee to be paid at any time for using the Tigra Tree Menu v1.x. You may include the source code or modified source code within your own projects for either personal or commercial use but excluding the restrictions outlined below. The following restrictions apply to all parts of the component, including all source code, samples and documentation.

  • Header block of script file (tree.js) CAN NOT be modified or removed.
  • The above items CAN NOT be sold as are, either individually or together.
  • The above items CAN NOT be modified and then sold as a library component, either individually or together.

My question is as follows: given the terms of use above, can this script be included in OpenACS? If the answer is "yes" I already have all the required changes ready to go. If not, then I can either contact them to see if they can give us permission to use it, or maybe we can find an alternative script that's just as easy to use. Of all the ones I've looked at, this is the easiest to use with OpenACS.

Collapse
Posted by Malte Sussdorff on
Could you contact them and ask under which conditions their software might be included in a GPLed software ?

Furthermore, if the answer is no, would you mind posting what you did to get it to work, so everyone interested could install this seperately on his /her own.

Collapse
Posted by Jeff Davis on
It's definitely not GPL compatible given the restrictions on resale. Furthermore, the low weight is due to the code being compressed and variables being shortened to 3 characters. And given that the code is compressed and the variable names are essentially meaningless changing or improving it is much more difficult than it needs to be.

Considering we are talking about something on the order of about 200 lines of javascript shouldn't we just fix what we have?

Collapse
Posted by Gabriel Burca on
The version I am using is uncompressed. I wouldn't use the compressed one since it only saves 2k over the uncompressed version and it would be a pain to modify. The uncompressed one is still half the size of the current one and much faster.

Yes, we could try fixing what we have. It was easier though to get an updated script that works and is effectively a drop-in replacement of the old one. That's because I don't know enough about the subtle differences between the browsers to figure out why it works in some but not others.

I'll see if they're willing to let us include it in OpenACS.

Collapse
Posted by Gabriel Burca on
I asked if I can include their javascript tree-menu in GPS software. Their response:

-----
Ticket Ref : 5170-ERTP-0150
Ticket Subject : Inclusion in GPL software

Reply:
You're allowed to use our free products in GPL licensed software.
-----

That should be sufficient for our purposes. I will setup a test server, or create a patch file, so other people can test it with some other browsers. If there are no objections, I will submit the new script in a few days.

Collapse
Posted by Gabriel Burca on
Correction, that was GPL software, not GPS software. I've been doing too much GPS work lately ...
Collapse
Posted by Gabriel Burca on
The new proposed javascripted bookmarks display is available for the next few days at:

http://web.burca.name:8002/bookmarks/

I tested it with a few of the browsers I have access to and it works. I don't have access to any Mac browsers so I can't tell if it works on those, but it should.

I've uploaded some sample bookmarks I found on the web for test purposes. Select the "view public bookmarks of registered users" link to see them and then go to the "Javascript" tab.

If you create a test account and upload bookmarks, be aware that there's currently an open bug which makes it look like the bookmark import has failed. To get around it, just start over from the index page after importing the bookmarks.

Collapse
Posted by Malte Sussdorff on
I like it and with their response I don't see us in trouble if we include it with Bookmarks in the CVS tree. But til this happens, where can I get your code :).