-
☆ A M B ☆
- 24,524 Posts
Java’s AjaxTags ported to php:
http://sourceforge.net/projects/phpajaxtags
(maybe we ought to have a forum topic just for Ajax stuff?)
-
MODX Staff
- 12,272 Posts
Good idea on the dedicated forum.
Ryan Thrash, MODX Co-Founder
Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
-
☆ A M B ☆
- 24,524 Posts
It took me very little time to implement this in my developing ShopX management module.
You can see the skeleton in action if you log in to
http://www.sottwell.com/manager as guest, password guestuser, and run the shopx module.
This is not just the basic tabs from MODx any more, this is AjaxTags tabs.
It was a little complicated at first, until I understood what it was all about. Fantastic!
-
☆ A M B ☆
- 24,524 Posts
Well, I really like that library, but it’s a bit much for what I’m doing at the moment. So I’ve switched to using pure Prototype library functions, per this tutorial:
http://www.ajaxlessons.com/2006/02/18/ajax-workshop-2-building-tabbed-content/
-
☆ A M B ☆
- 24,524 Posts
I found a lovely little tree control, very simple, works "out-of-the-box", although I did tweak the css a bit to better suit my purpose. Now my category list is in a very nice tree form.
http://www.silverstripe.com/downloads/tree/#Demo
My only problem with it now is to figure out how to get it to activate as soon as the "Categories" tab is opened, as it is you have to refresh the list to get it started. I do wish I understood javascript better!
Ok, got it...just added a call to the tree init function at the end of the tab’s response handler. Sweet!
-
☆ A M B ☆
- 24,524 Posts
This is a whole different thing, it’s "unobtrusive" javascript. All you do is create your unordered list, with the outermost ul having class="tree" and the li text exclosed with <a href="#">item one</a> tags. The javascript adds some nested <span> tags, then the whole thing is styled with css. So basically you get your list anyway, for those without javascript, and the javascript just adds styling elements and clicky open/close functionality to the plus and minus marks.
It is perfect for an AJAX implementation, where the list is generated by a server-side script, then as part of your response processing just call the tree init function.
He’s working on adding other functionality, such as maintaining tree state with cookies, built-in AJAX functions to section large lists, etc (although I’m dealing with that in my own AJAX functions). Some have complained that it does’t work well with the Prototype library, but I’m using the Prototype library that comes with MODx for all the tabs and the AJAX calls, and having no problems.
-
MODX Staff
- 12,272 Posts
Interesting. The coolest thing about the Yahoo one though is that (I believe) it can load only parts of the tree. So for sites with thousands of pages, that can be a very good thing.
Ryan Thrash, MODX Co-Founder
Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
-
☆ A M B ☆
- 24,524 Posts
I’m not too worried about it at this point, I’m still getting the category management module set up and doubt that there will be such a horrible number of categories in anybody’s catalog. Now it will be a different matter when I start working on the products module. I’ll probably go with one of the fancy scrolling tables for that. Rico has a nice one, and they use Prototype.
What I need to find out how to do is what is done with the "parent" in the document editor, so that when you click on the little folder icon clicking on a document’s name will give the item the document’s id as parent, otherwise clicking on a document’s name sets up the document editing form. This way I can have category editing behave in the same way.