SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Member
    Join Date
    Mar 2006
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Lightbulb Sortable Collapsible Nested Lists

    Thought I'd let people know about this script I've written as I know I'd been looking for something to do this for a long time.

    Sortable Collapsible Nested Lists

    It's available here: http://www.clanccc.co.uk/moo/sortlist.html

    You can drag any item around the lists, the lists are also optionally collapsible, there are optional sorting restrictions such as same depth only, you can insert/delete items and the script is happen to carry on plus it'll serialize the ID's into a JavaScript variable ready for submitting via which ever method you choose.

    It's based on the development version of mootools.

    Compared to the scriptaculous effort, it's totally solid as I've tried to make sure there isn't any "jumpyness", incorrect movements and difficulties making an item a child of a childless item.

  2. #2
    SitePoint Zealot
    Join Date
    Jul 2006
    Posts
    151
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Sortable Lists

    This is terrific. I just finished my own version of this script which you can view here.

    I don't have the collasible bit yet, which is an important enhancement that I need for a CMS module I'm working on, so I suspect I will be taking a good look at your script and likely using it instead...

    Thanks a bunch!

    Dave

  3. #3
    SitePoint Zealot
    Join Date
    Jul 2006
    Posts
    151
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Script without Mootools

    Hey there,

    Your script is great, and I want to try and use with a CMS module I'm creating for Drupal. It's definitely much better than mine. However, I'll need to disengage it (if possible) from Mootools.js as that is released under an MIT license and Drupal is under the GPL. Could you point me at which portions of your script would need to be changed?

    One obvious change I see is the use of $('') for document.getElementById('') as $ is used as a major feature of the library I intend to use, jQuery.

    Any help you could give would be greatly appreciated.

    Dave

  4. #4
    SitePoint Member
    Join Date
    Mar 2006
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmmm... haven't looked at JQuery much after I fell for mootools

    I'll have a look and do a port as I know jQuery is used by quite a few people, shouldn't be too much work... I hope :P

  5. #5
    SitePoint Zealot
    Join Date
    Jul 2006
    Posts
    151
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Mootools does a lot more, but Jquery has most of the important tools and the basic file is less than half the size of Mootools.js. Also, jQuery has a bunch of various add-ons that people have written for it. Anyway, it does come down to personal choice.

    Dave

  6. #6
    SitePoint Member
    Join Date
    Mar 2006
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Awww, why do people keep mis-judging mootools. It does come as an all-on-one pack. It's actually module based, if you look at http://mootools.net/build/index.php you'll see you can select which-ever modules you want to take advantage of. If you don't want certain effects, functions etc... don't select them. I think the file size is pretty comparable if you only selected the modules to provide the same functions as jQuery.

    But before we get into a giant mootools Vs jQuery discussion, as soon as I rewrite the nested class for jQuery I'll let you know
    Last edited by PestyBandit; Jan 19, 2007 at 07:37.

  7. #7
    SitePoint Zealot
    Join Date
    Jul 2006
    Posts
    151
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Haha, fair enough I do remember being able to select the library modules I wanted. I'm sure Mootools is fine, I just happen to need jQuery because of function/object naming conflicts with the default JS library Drupal uses.

    Dave


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •