From a53929880ed4a0570be64511750bf9417edf668d Mon Sep 17 00:00:00 2001 From: David Bushell Date: Tue, 12 Jun 2012 18:18:46 +0100 Subject: [PATCH 01/27] First page commit --- index.html | 1 + 1 file changed, 1 insertion(+) create mode 100644 index.html diff --git a/index.html b/index.html new file mode 100644 index 0000000..03f9801 --- /dev/null +++ b/index.html @@ -0,0 +1 @@ +My GitHub Page From e1619b47a6e00e2ad53be5ec60e2098a93c8dbdc Mon Sep 17 00:00:00 2001 From: David Bushell Date: Tue, 12 Jun 2012 18:26:08 +0100 Subject: [PATCH 02/27] demo --- index.html | 140 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 140 insertions(+) diff --git a/index.html b/index.html index 03f9801..743016e 100644 --- a/index.html +++ b/index.html @@ -1 +1,141 @@ My GitHub Page + + + + + + + + + + Nestable + + + + +

Nestable

+ +

Drag & drop hierarchical list (mouse and touch compatible)

+ +

Code on GitHub

+ + + + + + +
+
    +
  • +
    Item 1
    +
  • +
  • +
    Item 2
    +
      +
    • Sub Item 2.1
    • +
    • Sub Item 2.2
    • +
    • Sub Item 2.3
    • +
    • Sub Item 2.4
    • +
    • Sub Item 2.5
    • +
    +
  • +
  • +
    Item 3
    +
      +
    • Sub Item 3.1
    • +
    • Sub Item 3.2
    • +
    • Sub Item 3.3
    • +
    +
  • +
  • +
    Item 4
    +
  • +
  • +
    Item 5
    +
  • +
+
+ +

Copyright © David Bushell | Made for Browser

+ + + + + + \ No newline at end of file From 3ee06cb9e6093c64f33e6a16f8777a2f686512e3 Mon Sep 17 00:00:00 2001 From: David Bushell Date: Tue, 12 Jun 2012 18:28:21 +0100 Subject: [PATCH 03/27] code link --- index.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/index.html b/index.html index 743016e..223f08f 100644 --- a/index.html +++ b/index.html @@ -1,4 +1,3 @@ -My GitHub Page @@ -70,7 +69,7 @@

Nestable

Drag & drop hierarchical list (mouse and touch compatible)

-

Code on GitHub

+

Code on GitHub

From 4bd97368f9dd57fa329f0aa4999f7272be577733 Mon Sep 17 00:00:00 2001 From: David Bushell Date: Tue, 12 Jun 2012 18:42:08 +0100 Subject: [PATCH 04/27] text --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 223f08f..18d722d 100644 --- a/index.html +++ b/index.html @@ -67,7 +67,7 @@

Nestable

-

Drag & drop hierarchical list (mouse and touch compatible)

+

Drag & drop hierarchical list with mouse and touch compatibility (jQuery plugin)

Code on GitHub

From 42ff00105a8a222daff73073ef5594fe82c66491 Mon Sep 17 00:00:00 2001 From: David Bushell Date: Tue, 12 Jun 2012 20:39:36 +0100 Subject: [PATCH 05/27] demo --- index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 18d722d..72cb1bd 100644 --- a/index.html +++ b/index.html @@ -26,7 +26,7 @@ .small { color: #666; font-size: 0.875em; } .large { font-size: 1.25em; } -.dd { position: relative; display: block; width: 500px; list-style: none; font-size: 13px; line-height: 20px; margin: 0; padding: 0; } +.dd { position: relative; display: block; max-width: 500px; list-style: none; font-size: 13px; line-height: 20px; margin: 0; padding: 0; } .dd ul, .dd-item ul { display: block; position: relative; list-style: none; padding: 0 0 0 30px; margin: 0; /* border: 1px dotted #ccc; */ } @@ -51,7 +51,7 @@ .dd-collapsed > ul { display: none; } .dd-placeholder { background: #f2fbff; border: 1px dashed #b6bcbf; box-sizing: border-box; -moz-box-sizing: border-box; } -.dd-dragel { position: absolute; z-index: 9999; pointer-events: none; } +.dd-dragel { position: absolute; margin-top: -5px; z-index: 9999; pointer-events: none; } .dd-dragel .dd-handle { -webkit-box-shadow: 2px 4px 6px 0 rgba(0,0,0,.1); From d0e89c75de932a8974df1bdbcd79dd3ffe012faf Mon Sep 17 00:00:00 2001 From: David Bushell Date: Tue, 12 Jun 2012 21:52:33 +0100 Subject: [PATCH 06/27] output --- index.html | 88 +++++++++++++++++++++++++++++++++++------------------- 1 file changed, 58 insertions(+), 30 deletions(-) diff --git a/index.html b/index.html index 72cb1bd..6ef5dcc 100644 --- a/index.html +++ b/index.html @@ -26,7 +26,7 @@ .small { color: #666; font-size: 0.875em; } .large { font-size: 1.25em; } -.dd { position: relative; display: block; max-width: 500px; list-style: none; font-size: 13px; line-height: 20px; margin: 0; padding: 0; } +.dd { position: relative; display: block; max-width: 600px; list-style: none; font-size: 13px; line-height: 20px; margin: 0; padding: 0; } .dd ul, .dd-item ul { display: block; position: relative; list-style: none; padding: 0 0 0 30px; margin: 0; /* border: 1px dotted #ccc; */ } @@ -58,8 +58,9 @@ box-shadow: 2px 4px 6px 0 rgba(0,0,0,.1); } +#nestable-menu { padding: 0; margin: 20px 0; } -.dd-menu { padding: 0; margin: 20px 0; } +#nestable-output { width: 100%; max-width: 600px; font-size: 0.75em; line-height: 1.333333em; height: 10em; padding: 5px; box-sizing: border-box; -moz-box-sizing: border-box; } @@ -71,43 +72,54 @@

Nestable

Code on GitHub

- + -
-
    -
  • +
    +
      +
    1. Item 1
    2. -
    3. +
    4. Item 2
      -
        -
      • Sub Item 2.1
      • -
      • Sub Item 2.2
      • -
      • Sub Item 2.3
      • -
      • Sub Item 2.4
      • -
      • Sub Item 2.5
      • -
      +
        +
      1. Sub Item 2.1
      2. +
      3. Sub Item 2.2
      4. +
      5. +
        Sub Item 2.3
        +
          +
        1. Sub Item 3.1
        2. +
        3. Sub Item 3.2
        4. +
        5. Sub Item 3.3
        6. +
        +
      6. +
      7. Sub Item 2.4
      8. +
      9. Sub Item 2.5
      10. +
    5. -
    6. +
    7. Item 3
      -
        -
      • Sub Item 3.1
      • -
      • Sub Item 3.2
      • -
      • Sub Item 3.3
      • -
      +
        +
      1. Sub Item 3.1
      2. +
      3. Sub Item 3.2
      4. +
      5. Sub Item 3.3
      6. +
    8. -
    9. +
    10. Item 4
    11. -
    12. +
    13. Item 5
    14. -
+
+

Serialised Output

+ + +

Copyright © David Bushell | Made for Browser

@@ -117,23 +129,39 @@

Nestable

$(document).ready(function() { - // nestable - $('.dd').nestable(); + var list = $('#nestable'), + output = $('#nestable-output'); + + var updateList = function() + { + var data = list.nestable('serialize'); + if (window.JSON) { + output.val(window.JSON.stringify(data)); + } else { + output.val('JSON browser support required for this demo.'); + } + }; + + list.nestable({ + listNodeName : 'ol', + itemIdAttribute : 'data-id' + }) + .on('change', updateList); - // events - $('.dd-menu').on('click', function(e) + updateList(); + + $('#nestable-menu').on('click', function(e) { var target = $(e.target), action = target.data('action'); if (action === 'expand-all') { - $('.dd').nestable('expandAll'); + list.nestable('expandAll'); } if (action === 'collapse-all') { - $('.dd').nestable('collapseAll'); + list.nestable('collapseAll'); } }); - }); From 89e3f31e6c003cdad454c706c3a6585ae3f76ae3 Mon Sep 17 00:00:00 2001 From: David Bushell Date: Thu, 21 Jun 2012 15:08:19 +0100 Subject: [PATCH 07/27] update demo --- index.html | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/index.html b/index.html index 6ef5dcc..c613e94 100644 --- a/index.html +++ b/index.html @@ -60,7 +60,7 @@ #nestable-menu { padding: 0; margin: 20px 0; } -#nestable-output { width: 100%; max-width: 600px; font-size: 0.75em; line-height: 1.333333em; height: 10em; padding: 5px; box-sizing: border-box; -moz-box-sizing: border-box; } +#nestable-output { width: 100%; max-width: 600px; height: 30em; font-size: 0.75em; line-height: 1.333333em; font-family: Consolas, monospace; padding: 5px; box-sizing: border-box; -moz-box-sizing: border-box; } @@ -136,15 +136,14 @@

Nestable

{ var data = list.nestable('serialize'); if (window.JSON) { - output.val(window.JSON.stringify(data)); + output.val(window.JSON.stringify(data, null, 2)); } else { output.val('JSON browser support required for this demo.'); } }; list.nestable({ - listNodeName : 'ol', - itemIdAttribute : 'data-id' + listNodeName : 'ol' }) .on('change', updateList); From ad2e5a798587640085d01652487d5dd8a1917c71 Mon Sep 17 00:00:00 2001 From: David Bushell Date: Thu, 21 Jun 2012 19:47:57 +0100 Subject: [PATCH 08/27] script type --- index.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index c613e94..9aa3554 100644 --- a/index.html +++ b/index.html @@ -122,9 +122,9 @@

Nestable

Copyright © David Bushell | Made for Browser

- - - + + - + - - + + \ No newline at end of file From 03242fe12d35d1054444ffa1dc6b21d644d61735 Mon Sep 17 00:00:00 2001 From: David Bushell Date: Thu, 28 Jun 2012 16:47:10 +0100 Subject: [PATCH 19/27] github watch --- index.html | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 67 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index 696b824..41a992d 100644 --- a/index.html +++ b/index.html @@ -147,9 +147,14 @@

Nestable

Download on GitHub

-

+ + + + Watch on GitHub + + @@ -304,6 +309,8 @@

Nestable

}); + + /*! * Socialite v2.0 * http://socialitejs.com @@ -311,6 +318,63 @@

Nestable

* Dual-licensed under the BSD or MIT licenses: http://socialitejs.com/license.txt */ window.Socialite=function(e,t,n){"use strict";var r=0,i=[],s={},o={},u=/^($|loaded|complete)/,a=e.encodeURIComponent,f={settings:{},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},hasClass:function(e,t){return(" "+e.className+" ").indexOf(" "+t+" ")!==-1},addClass:function(e,t){f.hasClass(e,t)||(e.className=e.className===""?t:e.className+" "+t)},removeClass:function(e,t){e.className=f.trim(" "+e.className+" ".replace(" "+t+" "," "))},extendObject:function(e,t,r){for(var i in t){var s=e[i]!==n;if(s&&typeof t[i]=="object")f.extendObject(e[i],t[i],r);else if(r||!s)e[i]=t[i]}},getElements:function(e,t){var n=0,r=[],i=!!e.getElementsByClassName,s=i?e.getElementsByClassName(t):e.getElementsByTagName("*");for(;n \ No newline at end of file From e8dbaa5ffe31f7a51a005260285604c1a20bd6fc Mon Sep 17 00:00:00 2001 From: David Bushell Date: Thu, 28 Jun 2012 16:48:01 +0100 Subject: [PATCH 20/27] github watch repo --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 41a992d..2f2da18 100644 --- a/index.html +++ b/index.html @@ -151,7 +151,7 @@

Nestable

- + Watch on GitHub From ee2134db968e99da7911beae8d465f44417c2820 Mon Sep 17 00:00:00 2001 From: David Bushell Date: Thu, 28 Jun 2012 16:49:32 +0100 Subject: [PATCH 21/27] css --- index.html | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 2f2da18..ebd8eb4 100644 --- a/index.html +++ b/index.html @@ -137,6 +137,12 @@ .dd3-handle:before { content: '≡'; display: block; position: absolute; left: 0; top: 3px; width: 100%; text-align: center; text-indent: 0; color: #fff; font-size: 20px; font-weight: normal; } .dd3-handle:hover { background: #ddd; } +/** + * Socialite + */ + +.socialite { display: block; float: left; margin-right: 1em; } + @@ -147,13 +153,14 @@

Nestable

Download on GitHub

- + From e04f13e17544fb61225a9f34fb603049a1bb28fc Mon Sep 17 00:00:00 2001 From: David Bushell Date: Thu, 28 Jun 2012 16:51:08 +0100 Subject: [PATCH 22/27] social css --- index.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/index.html b/index.html index ebd8eb4..5462cc1 100644 --- a/index.html +++ b/index.html @@ -141,7 +141,7 @@ * Socialite */ -.socialite { display: block; float: left; margin-right: 1em; } +.socialite { display: block; float: left; margin-right: 1em; height: 35px; } @@ -154,12 +154,12 @@

Nestable

Download on GitHub

From 33a4b72c909e1d010ff6bd2270bee2cce284f9c2 Mon Sep 17 00:00:00 2001 From: David Bushell Date: Thu, 28 Jun 2012 16:51:47 +0100 Subject: [PATCH 23/27] social css --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 5462cc1..340c9ad 100644 --- a/index.html +++ b/index.html @@ -141,7 +141,7 @@ * Socialite */ -.socialite { display: block; float: left; margin-right: 1em; height: 35px; } +.socialite { display: block; float: left; height: 35px; } From 8de6727d09f532426941c60b23214359eefb6001 Mon Sep 17 00:00:00 2001 From: David Bushell Date: Wed, 15 Aug 2012 10:25:21 +0100 Subject: [PATCH 24/27] removed github button --- index.html | 3 --- 1 file changed, 3 deletions(-) diff --git a/index.html b/index.html index 340c9ad..3287830 100644 --- a/index.html +++ b/index.html @@ -154,9 +154,6 @@

Nestable

Download on GitHub

- - Watch on GitHub - From 953e690e7dab585b9f439ded7b901db1e7e8f3db Mon Sep 17 00:00:00 2001 From: David Bushell Date: Mon, 15 Oct 2012 08:39:43 +0100 Subject: [PATCH 25/27] update --- jquery.nestable.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/jquery.nestable.js b/jquery.nestable.js index dc6c7bb..b2e34a7 100644 --- a/jquery.nestable.js +++ b/jquery.nestable.js @@ -42,8 +42,8 @@ collapsedClass : 'dd-collapsed', placeClass : 'dd-placeholder', emptyClass : 'dd-empty', - expandBtnHTML : '', - collapseBtnHTML : '', + expandBtnHTML : '', + collapseBtnHTML : '', group : 0, maxDepth : 5, threshold : 20 @@ -257,7 +257,7 @@ this.dragEl = $(document.createElement(this.options.listNodeName)).addClass(this.options.listClass + ' ' + this.options.dragClass); this.dragEl.css('width', dragItem.width()); - dragItem.replaceWith(this.placeEl).appendTo(this.dragEl); + dragItem.after(this.placeEl).detach().appendTo(this.dragEl); $(document.body).append(this.dragEl); this.dragEl.css({ 'left' : e.pageX - mouse.offsetX, @@ -276,7 +276,7 @@ dragStop: function(e) { - this.placeEl.replaceWith(this.dragEl.html()); + this.placeEl.replaceWith(this.dragEl.children(this.options.itemNodeName + ':first').detach()); this.dragEl.remove(); this.el.trigger('change'); if (this.hasNewRoot) { From 6595e981f1025471dc94f74bf05886e4201c6276 Mon Sep 17 00:00:00 2001 From: David Bushell Date: Mon, 15 Oct 2012 09:23:16 +0100 Subject: [PATCH 26/27] fix merge --- jquery.nestable.js | 8 -------- 1 file changed, 8 deletions(-) diff --git a/jquery.nestable.js b/jquery.nestable.js index 7598372..6e3cf78 100644 --- a/jquery.nestable.js +++ b/jquery.nestable.js @@ -257,9 +257,6 @@ this.dragEl = $(document.createElement(this.options.listNodeName)).addClass(this.options.listClass + ' ' + this.options.dragClass); this.dragEl.css('width', dragItem.width()); -<<<<<<< HEAD - dragItem.after(this.placeEl).detach().appendTo(this.dragEl); -======= // fix for zepto.js //dragItem.after(this.placeEl).detach().appendTo(this.dragEl); @@ -267,7 +264,6 @@ dragItem[0].parentNode.removeChild(dragItem[0]); dragItem.appendTo(this.dragEl); ->>>>>>> master $(document.body).append(this.dragEl); this.dragEl.css({ 'left' : e.pageX - mouse.offsetX, @@ -286,16 +282,12 @@ dragStop: function(e) { -<<<<<<< HEAD - this.placeEl.replaceWith(this.dragEl.children(this.options.itemNodeName + ':first').detach()); -======= // fix for zepto.js //this.placeEl.replaceWith(this.dragEl.children(this.options.itemNodeName + ':first').detach()); var el = this.dragEl.children(this.options.itemNodeName).first(); el[0].parentNode.removeChild(el[0]); this.placeEl.replaceWith(el); ->>>>>>> master this.dragEl.remove(); this.el.trigger('change'); if (this.hasNewRoot) { From 5a5e94fc0ebfef5c8cfd6dabc417d24b788589f3 Mon Sep 17 00:00:00 2001 From: David Bushell Date: Fri, 28 Apr 2017 08:46:28 +0100 Subject: [PATCH 27/27] Update index.html fix https --- index.html | 73 ++---------------------------------------------------- 1 file changed, 2 insertions(+), 71 deletions(-) diff --git a/index.html b/index.html index 24e9a79..caed324 100644 --- a/index.html +++ b/index.html @@ -261,9 +261,9 @@

Nestable

-

Copyright © David Bushell | Made for Browser

+

Copyright © David Bushell | Made for Browser

- +