Skip to content

Commit b2ab7b7

Browse files
committed
Update pages. See main branch for changes
1 parent 5da17ea commit b2ab7b7

File tree

6 files changed

+90
-46
lines changed

6 files changed

+90
-46
lines changed

css/application.css

Lines changed: 34 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4673,13 +4673,23 @@ a.label:hover, a.badge:hover {
46734673
.page-header h1, h2 {
46744674
padding-top: 40px; }
46754675

4676-
/* line 15, application.css.sass */
4676+
/* line 14, application.css.sass */
4677+
.footer {
4678+
margin-top: 45px;
4679+
padding: 35px 0 36px;
4680+
border-top: 1px solid #e5e5e5; }
4681+
/* line 18, application.css.sass */
4682+
.footer p {
4683+
margin-bottom: 0;
4684+
color: #555555; }
4685+
4686+
/* line 22, application.css.sass */
46774687
table.docs {
46784688
table-layout: fixed; }
4679-
/* line 18, application.css.sass */
4689+
/* line 25, application.css.sass */
46804690
table.docs th:nth-child(1) {
46814691
width: 150px; }
4682-
/* line 20, application.css.sass */
4692+
/* line 27, application.css.sass */
46834693
table.docs th:nth-child(2) {
46844694
width: 350px; }
46854695

@@ -4724,55 +4734,55 @@ ol.vertical {
47244734
border-left-color: red;
47254735
border-right: none; }
47264736

4727-
/* line 25, application.css.sass */
4737+
/* line 32, application.css.sass */
47284738
ol {
47294739
list-style-type: none; }
4730-
/* line 27, application.css.sass */
4740+
/* line 34, application.css.sass */
47314741
ol i.icon-move {
47324742
cursor: pointer; }
4733-
/* line 29, application.css.sass */
4743+
/* line 36, application.css.sass */
47344744
ol li.highlight {
47354745
background: #333333;
47364746
color: #999999; }
4737-
/* line 32, application.css.sass */
4747+
/* line 39, application.css.sass */
47384748
ol li.highlight i.icon-move {
47394749
background-image: url("../img/glyphicons-halflings-white.png"); }
47404750

4741-
/* line 35, application.css.sass */
4751+
/* line 42, application.css.sass */
47424752
ol.nested_with_switch, ol.nested_with_switch ol {
47434753
border: 1px solid #eeeeee; }
4744-
/* line 37, application.css.sass */
4754+
/* line 44, application.css.sass */
47454755
ol.nested_with_switch.active, ol.nested_with_switch ol.active {
47464756
border: 1px solid #333333; }
47474757

4748-
/* line 41, application.css.sass */
4758+
/* line 48, application.css.sass */
47494759
ol.nested_with_switch li, ol.simple_with_animation li, ol.default li {
47504760
cursor: pointer; }
47514761

4752-
/* line 44, application.css.sass */
4762+
/* line 51, application.css.sass */
47534763
.switch-container {
47544764
display: block;
47554765
margin-left: auto;
47564766
margin-right: auto;
47574767
width: 80px; }
47584768

4759-
/* line 50, application.css.sass */
4769+
/* line 57, application.css.sass */
47604770
.navbar-sort-container {
47614771
height: 200px; }
47624772

4763-
/* line 54, application.css.sass */
4773+
/* line 61, application.css.sass */
47644774
ol.nav li, ol.nav li a {
47654775
cursor: pointer; }
4766-
/* line 56, application.css.sass */
4776+
/* line 63, application.css.sass */
47674777
ol.nav .divider-vertical {
47684778
cursor: default; }
4769-
/* line 59, application.css.sass */
4779+
/* line 66, application.css.sass */
47704780
ol.nav li.dragged {
47714781
background-color: #2c2c2c; }
4772-
/* line 61, application.css.sass */
4782+
/* line 68, application.css.sass */
47734783
ol.nav li.placeholder {
47744784
position: relative; }
4775-
/* line 63, application.css.sass */
4785+
/* line 70, application.css.sass */
47764786
ol.nav li.placeholder:before {
47774787
content: "";
47784788
position: absolute;
@@ -4783,7 +4793,7 @@ ol.nav li.placeholder {
47834793
top: -6px;
47844794
margin-left: -5px;
47854795
border-bottom: none; }
4786-
/* line 74, application.css.sass */
4796+
/* line 81, application.css.sass */
47874797
ol.nav ol.dropdown-menu li.placeholder:before {
47884798
border: 5px solid transparent;
47894799
border-left-color: red;
@@ -4793,18 +4803,18 @@ ol.nav ol.dropdown-menu li.placeholder:before {
47934803
left: 10px;
47944804
border-right: none; }
47954805

4796-
/* line 84, application.css.sass */
4806+
/* line 91, application.css.sass */
47974807
.sorted_table tr {
47984808
cursor: pointer; }
4799-
/* line 86, application.css.sass */
4809+
/* line 93, application.css.sass */
48004810
.sorted_table tr.placeholder {
48014811
display: block;
48024812
background: red;
48034813
position: relative;
48044814
margin: 0;
48054815
padding: 0;
48064816
border: none; }
4807-
/* line 93, application.css.sass */
4817+
/* line 100, application.css.sass */
48084818
.sorted_table tr.placeholder:before {
48094819
content: "";
48104820
position: absolute;
@@ -4816,10 +4826,10 @@ ol.nav ol.dropdown-menu li.placeholder:before {
48164826
left: -5px;
48174827
border-right: none; }
48184828

4819-
/* line 104, application.css.sass */
4829+
/* line 111, application.css.sass */
48204830
.sorted_head th {
48214831
cursor: pointer; }
4822-
/* line 106, application.css.sass */
4832+
/* line 113, application.css.sass */
48234833
.sorted_head th.placeholder {
48244834
display: block;
48254835
background: red;
@@ -4828,7 +4838,7 @@ ol.nav ol.dropdown-menu li.placeholder:before {
48284838
height: 0;
48294839
margin: 0;
48304840
padding: 0; }
4831-
/* line 114, application.css.sass */
4841+
/* line 121, application.css.sass */
48324842
.sorted_head th.placeholder:before {
48334843
content: "";
48344844
position: absolute;

index.html

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ <h1>jQuery Sortable</h1>
7878
<a class='btn btn-large btn-success' href='js/jquery-sortable.js'>
7979
<i class='icon-hdd icon-white'></i>
8080
Download
81-
(v0.9)
81+
(v0.9.1)
8282
</a>
8383
</p>
8484
<p>
@@ -341,7 +341,12 @@ <h2>Sort handle and limited drag/drop</h2>
341341
<div class="CodeRay">
342342
<div class="code"><pre><span class="predefined">$</span>(<span class="string"><span class="delimiter">&quot;</span><span class="content">ol.simple_with_drop</span><span class="delimiter">&quot;</span></span>).sortable({
343343
<span class="key">group</span>: <span class="string"><span class="delimiter">'</span><span class="content">no-drop</span><span class="delimiter">'</span></span>,
344-
<span class="key">handle</span>: <span class="string"><span class="delimiter">'</span><span class="content">i.icon-move</span><span class="delimiter">'</span></span>
344+
<span class="key">handle</span>: <span class="string"><span class="delimiter">'</span><span class="content">i.icon-move</span><span class="delimiter">'</span></span>,
345+
<span class="function">onDragStart</span>: <span class="keyword">function</span> (item, container, _super) {
346+
<span class="keyword">if</span>(!container.options.drop)
347+
item.clone().insertAfter(item)
348+
_super(item)
349+
}
345350
})
346351
<span class="predefined">$</span>(<span class="string"><span class="delimiter">&quot;</span><span class="content">ol.simple_with_no_drop</span><span class="delimiter">&quot;</span></span>).sortable({
347352
<span class="key">group</span>: <span class="string"><span class="delimiter">'</span><span class="content">no-drop</span><span class="delimiter">'</span></span>,
@@ -365,6 +370,10 @@ <h2>Sort handle and limited drag/drop</h2>
365370
<strong>drag/drop</strong>
366371
container
367372
</li>
373+
<li>
374+
<strong>Clone</strong>
375+
items on drag
376+
</li>
368377
</ul>
369378
<p><div class="btn btn-primary show-code" data-toggle="button"><i class="icon-chevron-down"></i> show me the code</div></p>
370379
</div>
@@ -630,7 +639,10 @@ <h2>Sorting a bootstrap menu</h2>
630639
</div>
631640
</div>
632641
<div id='table'>
633-
<h2>Sort tables</h2>
642+
<h2>
643+
Sort tables
644+
<small>(doesn't work well in Konqueror and IE)</small>
645+
</h2>
634646
<div class='row'>
635647
<div class="span12 example">
636648
<div class="CodeRay">
@@ -1008,6 +1020,16 @@ <h1>Alternatives</h1>
10081020
</li>
10091021
</ul>
10101022
</div>
1023+
<footer class='footer'>
1024+
<p>Created by
1025+
<a href="https://github.com/johnny">Jonas von Andrian</a>.</p>
1026+
1027+
<p>jquery-sortable.js is released under the
1028+
<a href="http://www.xfree86.org/3.3.6/COPYRIGHT2.html#5">Modified BSD License</a>.</p>
1029+
1030+
<p>Built with <a href="http://twitter.github.com/bootstrap/">Bootstrap</a>.
1031+
Icons from <a href="http://glyphicons.com/">Glyphicons Free</a>.</p>
1032+
</footer>
10111033
</div>
10121034
<script src='js/application.js'></script>
10131035
</body>

js/application.js

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1082,21 +1082,21 @@ colors = jQuery.Color.names = {
10821082

10831083
}(window.jQuery);
10841084
/* ===================================================
1085-
* jquery-sortable.js v0.9
1086-
* http://johnny.github.com/jquery-sortable/
1085+
* jquery-sortable.js v0.9.1
1086+
* http://johnny.github.com/jquery-sortable/
10871087
* ===================================================
10881088
* Copyright (c) 2012 Jonas von Andrian
10891089
* All rights reserved.
10901090
*
10911091
* Redistribution and use in source and binary forms, with or without
10921092
* modification, are permitted provided that the following conditions are met:
10931093
* * Redistributions of source code must retain the above copyright
1094-
* notice, this list of conditions and the following disclaimer.
1094+
* notice, this list of conditions and the following disclaimer.
10951095
* * Redistributions in binary form must reproduce the above copyright
1096-
* notice, this list of conditions and the following disclaimer in the
1097-
* documentation and/or other materials provided with the distribution.
1096+
* notice, this list of conditions and the following disclaimer in the
1097+
* documentation and/or other materials provided with the distribution.
10981098
* * The name of the author may not be used to endorse or promote products
1099-
* derived from this software without specific prior written permission.
1099+
* derived from this software without specific prior written permission.
11001100
*
11011101
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
11021102
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
@@ -1270,6 +1270,7 @@ colors = jQuery.Color.names = {
12701270

12711271
// get item to drag
12721272
this.item = $(e.target).closest(this.options.itemSelector)
1273+
this.itemContainer = itemContainer
12731274

12741275
this.setPointer(e)
12751276
},
@@ -1279,7 +1280,7 @@ colors = jQuery.Color.names = {
12791280
if(!this.dragging){
12801281
processChildContainers(this.item, this.options.containerSelector, "disable", true)
12811282

1282-
this.options.onDragStart(this.item, this, groupDefaults.onDragStart)
1283+
this.options.onDragStart(this.item, this.itemContainer, groupDefaults.onDragStart)
12831284
this.dragging = true
12841285
}
12851286

@@ -1641,7 +1642,12 @@ $(function () {
16411642
$(function() {
16421643
$("ol.simple_with_drop").sortable({
16431644
group: 'no-drop',
1644-
handle: 'i.icon-move'
1645+
handle: 'i.icon-move',
1646+
onDragStart: function (item, container, _super) {
1647+
if(!container.options.drop)
1648+
item.clone().insertAfter(item)
1649+
_super(item)
1650+
}
16451651
})
16461652
$("ol.simple_with_no_drop").sortable({
16471653
group: 'no-drop',

js/examples/simple_with_no_drop.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
$(function() {
22
$("ol.simple_with_drop").sortable({
33
group: 'no-drop',
4-
handle: 'i.icon-move'
4+
handle: 'i.icon-move',
5+
onDragStart: function (item, container, _super) {
6+
if(!container.options.drop)
7+
item.clone().insertAfter(item)
8+
_super(item)
9+
}
510
})
611
$("ol.simple_with_no_drop").sortable({
712
group: 'no-drop',

js/jquery-sortable-min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/jquery-sortable.js

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
/* ===================================================
2-
* jquery-sortable.js v0.9
3-
* http://johnny.github.com/jquery-sortable/
2+
* jquery-sortable.js v0.9.1
3+
* http://johnny.github.com/jquery-sortable/
44
* ===================================================
55
* Copyright (c) 2012 Jonas von Andrian
66
* All rights reserved.
77
*
88
* Redistribution and use in source and binary forms, with or without
99
* modification, are permitted provided that the following conditions are met:
1010
* * Redistributions of source code must retain the above copyright
11-
* notice, this list of conditions and the following disclaimer.
11+
* notice, this list of conditions and the following disclaimer.
1212
* * Redistributions in binary form must reproduce the above copyright
13-
* notice, this list of conditions and the following disclaimer in the
14-
* documentation and/or other materials provided with the distribution.
13+
* notice, this list of conditions and the following disclaimer in the
14+
* documentation and/or other materials provided with the distribution.
1515
* * The name of the author may not be used to endorse or promote products
16-
* derived from this software without specific prior written permission.
16+
* derived from this software without specific prior written permission.
1717
*
1818
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
1919
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
@@ -187,6 +187,7 @@
187187

188188
// get item to drag
189189
this.item = $(e.target).closest(this.options.itemSelector)
190+
this.itemContainer = itemContainer
190191

191192
this.setPointer(e)
192193
},
@@ -196,7 +197,7 @@
196197
if(!this.dragging){
197198
processChildContainers(this.item, this.options.containerSelector, "disable", true)
198199

199-
this.options.onDragStart(this.item, this, groupDefaults.onDragStart)
200+
this.options.onDragStart(this.item, this.itemContainer, groupDefaults.onDragStart)
200201
this.dragging = true
201202
}
202203

0 commit comments

Comments
 (0)