From d3512032aa5f26e8fc22a10ddf1f9744dbf073ae Mon Sep 17 00:00:00 2001 From: Royce Feng Date: Thu, 5 Jul 2012 13:40:30 -0400 Subject: [PATCH 01/11] Allow a doNotClear field for lists that should not be cleared when empty --- jquery.mjs.nestedSortable.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/jquery.mjs.nestedSortable.js b/jquery.mjs.nestedSortable.js index 019aa09..f347418 100644 --- a/jquery.mjs.nestedSortable.js +++ b/jquery.mjs.nestedSortable.js @@ -19,6 +19,7 @@ tabSize: 20, disableNesting: 'mjs-nestedSortable-no-nesting', errorClass: 'mjs-nestedSortable-error', + doNotClear: 'mjs-doNotClear', listType: 'ol', maxLevels: 0, protectRoot: false, @@ -357,7 +358,7 @@ _clearEmpty: function(item) { var emptyList = $(item).children(this.options.listType); - if (emptyList.length && !emptyList.children().length) { + if (emptyList.length && !emptyList.children().length && !emptyList.hasClass(this.options.doNotClear)) { emptyList.remove(); } @@ -423,4 +424,4 @@ })); $.mjs.nestedSortable.prototype.options = $.extend({}, $.ui.sortable.prototype.options, $.mjs.nestedSortable.prototype.options); -})(jQuery); \ No newline at end of file +})(jQuery); From 317ddd62d9a8a230e3978783866a2700a1a7d1c7 Mon Sep 17 00:00:00 2001 From: Royce Feng Date: Fri, 13 Jul 2012 09:26:53 -0400 Subject: [PATCH 02/11] Change doNotClear to a flag instead of class --- jquery.mjs.nestedSortable.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jquery.mjs.nestedSortable.js b/jquery.mjs.nestedSortable.js index f347418..1eaf979 100644 --- a/jquery.mjs.nestedSortable.js +++ b/jquery.mjs.nestedSortable.js @@ -19,7 +19,7 @@ tabSize: 20, disableNesting: 'mjs-nestedSortable-no-nesting', errorClass: 'mjs-nestedSortable-error', - doNotClear: 'mjs-doNotClear', + doNotClear: false, listType: 'ol', maxLevels: 0, protectRoot: false, @@ -358,7 +358,7 @@ _clearEmpty: function(item) { var emptyList = $(item).children(this.options.listType); - if (emptyList.length && !emptyList.children().length && !emptyList.hasClass(this.options.doNotClear)) { + if (emptyList.length && !emptyList.children().length && !this.options.doNotClear) { emptyList.remove(); } From ff99d424b530bb3c868ecab7af9ddb85841c8675 Mon Sep 17 00:00:00 2001 From: adrian Date: Wed, 8 Aug 2012 10:21:07 +0200 Subject: [PATCH 03/11] Corrected argument order for isAllowed function --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 48ef9d6..6913825 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ Also, the default list type is `
    `.
    rtl
    Set this to true if you have a right-to-left page. Default: false
    isAllowed (function)
    -
    You can specify a custom function to verify if a drop location is allowed. Default: function(parent, item) { return true; }
    +
    You can specify a custom function to verify if a drop location is allowed. Default: function(item, parent) { return true; }
    ## Custom Methods From c1d6a863a66636c5b27c9abe25178dca62443ba7 Mon Sep 17 00:00:00 2001 From: Manuele J Sarfatti Date: Thu, 16 Aug 2012 17:51:18 +0300 Subject: [PATCH 04/11] fix isAllowed custom function and readme --- jquery.mjs.nestedSortable.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jquery.mjs.nestedSortable.js b/jquery.mjs.nestedSortable.js index 1eaf979..33dcf01 100644 --- a/jquery.mjs.nestedSortable.js +++ b/jquery.mjs.nestedSortable.js @@ -401,7 +401,7 @@ // Is the root protected? // Are we trying to nest under a no-nest? // Are we nesting too deep? - if (!o.isAllowed(parentItem, this.placeholder) || + if (!o.isAllowed(this.placeholder, parentItem) || parentItem && parentItem.hasClass(o.disableNesting) || o.protectRoot && (parentItem == null && !isRoot || isRoot && level > 1)) { this.placeholder.addClass(o.errorClass); From 552453c2a78aba614ac8cb47002fc7bd30236600 Mon Sep 17 00:00:00 2001 From: Manuele J Sarfatti Date: Fri, 7 Sep 2012 12:46:21 +0300 Subject: [PATCH 05/11] Fix Issue #51 --- jquery.mjs.nestedSortable.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jquery.mjs.nestedSortable.js b/jquery.mjs.nestedSortable.js index 33dcf01..8eaf402 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) From 28fc2a03db30f1c3ff5aabf92099cb5417c9c2c7 Mon Sep 17 00:00:00 2001 From: vcarel Date: Tue, 11 Sep 2012 13:25:06 +0300 Subject: [PATCH 06/11] Fix call to isAllowed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Referring to the discussion about commit c1d6a86, isAllowed should be called with the currentItem instead of the item's placeholder, which is pretty useless. --- jquery.mjs.nestedSortable.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jquery.mjs.nestedSortable.js b/jquery.mjs.nestedSortable.js index 8eaf402..e6c0d62 100644 --- a/jquery.mjs.nestedSortable.js +++ b/jquery.mjs.nestedSortable.js @@ -403,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); From c2067c4281268b608478296d4d4fc323a1c607aa Mon Sep 17 00:00:00 2001 From: Manuele J Sarfatti Date: Mon, 29 Oct 2012 19:09:21 +0100 Subject: [PATCH 07/11] Update README.md to announce version 2.0 --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6913825..4c6782a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # 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 From 5e74da18f298c6f45681f4d134b9613137a3900d Mon Sep 17 00:00:00 2001 From: Manuele J Sarfatti Date: Mon, 29 Oct 2012 19:09:47 +0100 Subject: [PATCH 08/11] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4c6782a..a0a8a9d 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # nestedSortable jQuery plugin *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.* +*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 From ad442245af7e48527bddc36b56f62b4f04de3021 Mon Sep 17 00:00:00 2001 From: Manuele J Sarfatti Date: Mon, 10 Jun 2013 12:02:09 +0300 Subject: [PATCH 09/11] Add "developer needed" announcement --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a0a8a9d..042f91c 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,7 @@ +**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. @@ -120,4 +124,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 + From cf72a2526e2d0263fde7d5df063d0747a201545f Mon Sep 17 00:00:00 2001 From: Manuele J Sarfatti Date: Mon, 10 Jun 2013 12:02:47 +0300 Subject: [PATCH 10/11] Fix "developer needed" announcement --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 042f91c..5138dde 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -**DEVELOPER NEEDED** +**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.** From dfd95dda908ce48f96341fcfa7f2fa117812e7d0 Mon Sep 17 00:00:00 2001 From: Manuele J Sarfatti Date: Tue, 29 Jul 2014 11:21:31 +0200 Subject: [PATCH 11/11] new maintainer --- README.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5138dde..7429153 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,9 @@ -**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.** +# 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