diff --git a/README.md b/README.md index 6913825..7429153 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,14 @@ +# 29 July 2014 +**nestedSortable is currently maintained at [ilikenwf/nestedSortable](https://github.com/ilikenwf/nestedSortable). Please [go there](https://github.com/ilikenwf/nestedSortable).** + +**~~DEVELOPER NEEDED~~** +**~~I'm sorry to say that I am not able to keep the pace developing this project anymore. I know how much nestedSortable is important for web applications, and I still can't understand why it's not part of jQuery-UI. I also think the base of the plugin is very strong, and deserves much more attention and involvement. If anybody is willing to take this project, please say so [here](https://github.com/mjsarfatti/nestedSortable/issues/95).~~** +**~~Thank you.~~** + # nestedSortable jQuery plugin -*nestedSortable* is a jQuery plugin that extends jQuery Sortable UI functionalities to nested lists. +*nestedSortable* is a jQuery plugin that extends jQuery Sortable UI functionalities to nested lists. +*Note:* **Version 2.0** *is published in branch '2.0alpha' and is ready for testing! At the moment it has only been tested in Firefox and Chrome, if you work with IE feel free to give it a shot and let me know if something goes wrong.* ## Features @@ -119,4 +127,4 @@ Tested with: IE 6/7/8, Firefox 3.6/4, Chrome, Safari 3 This work is licensed under the MIT License. This work is *pizzaware*. If it saved your life, or you just feel good at heart, please consider offering me a pizza. This can be done in two ways: (1) follow [this link](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=RSJEW3N9PRMYY&lc=IT&item_name=Manuele%20Sarfatti¤cy_code=EUR&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted) to donate through paypal; (2) send me cash via traditional mail to my home address in Italy. Is the second method legal? It is in Italy if you use Posta assicurata. You should check with your local laws if you live elsewhere. - \ No newline at end of file + diff --git a/jquery.mjs.nestedSortable.js b/jquery.mjs.nestedSortable.js index 33dcf01..e6c0d62 100644 --- a/jquery.mjs.nestedSortable.js +++ b/jquery.mjs.nestedSortable.js @@ -54,9 +54,11 @@ this.lastPositionAbs = this.positionAbs; } + var o = this.options; + //Do scrolling if(this.options.scroll) { - var o = this.options, scrolled = false; + var scrolled = false; if(this.scrollParent[0] != document && this.scrollParent[0].tagName != 'HTML') { if((this.overflowOffset.top + this.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) @@ -401,7 +403,7 @@ // Is the root protected? // Are we trying to nest under a no-nest? // Are we nesting too deep? - if (!o.isAllowed(this.placeholder, parentItem) || + if (!o.isAllowed(this.currentItem, parentItem) || parentItem && parentItem.hasClass(o.disableNesting) || o.protectRoot && (parentItem == null && !isRoot || isRoot && level > 1)) { this.placeholder.addClass(o.errorClass);