Skip to content

Commit

Permalink
bump version to 0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukas Oppermann committed Aug 7, 2015
1 parent 187030f commit 866ee48
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 9 deletions.
6 changes: 5 additions & 1 deletion AUTHORS
@@ -1,18 +1,21 @@
146 Lukas Oppermann
158 Lukas Oppermann
92 Alexandru Badiu
22 Ali Farhadi
6 Jonathan Berger
4 Brandon Ferens
4 Steven Farthing
4 Jacob Magnusson
3 Christian
3 Andy Burke
2 flying sheep
2 Rodolfo Spalenza
1 Keith Walsh
1 Oscar Godson
1 PolyFloyd
1 Sebastian Plagemann
1 Sérgio Batista
1 TV-productions
1 Tobias Kündig
1 Wesley Overdijk
1 adamedoe
1 afaenger
Expand All @@ -29,3 +32,4 @@
1 Egor Khmelev
1 Eric Heikes
1 Fredrik Forsmo
1 Joseph Nudell
2 changes: 1 addition & 1 deletion bower.json
@@ -1,6 +1,6 @@
{
"name": "html.sortable",
"version": "0.2.9",
"version": "0.3.0",
"repository": {
"type": "git",
"url": "https://github.com/voidberg/html5sortable.git"
Expand Down
24 changes: 20 additions & 4 deletions dist/html.sortable.js
Expand Up @@ -174,7 +174,8 @@ var _enableSortable = function(sortable) {
// IE FIX for ghost
// can be disabled as it has the side effect that other events
// (e.g. click) will be ignored
if (typeof document.createElement('span').dragDrop === 'function' && !opts.disableIEFix) {
var spanEl = (document || window.document).createElement('span');
if (typeof spanEl.dragDrop === 'function' && !opts.disableIEFix) {
handles.on('mousedown.h5s', function() {
if (items.index(this) !== -1) {
this.dragDrop();
Expand Down Expand Up @@ -227,7 +228,8 @@ var sortable = function(selector, options) {
dragImage: null,
disableIEFix: false,
placeholderClass: 'sortable-placeholder',
draggingClass: 'sortable-dragging'
draggingClass: 'sortable-dragging',
hoverClass: false
}, options);

/* TODO: maxstatements should be 25, fix and remove line below */
Expand Down Expand Up @@ -271,6 +273,20 @@ var sortable = function(selector, options) {
items.attr('role', 'option');
items.attr('aria-grabbed', 'false');

// Mouse over class
if (options.hoverClass) {
var hoverClass = 'sortable-over';
if (typeof options.hoverClass === 'string') {
hoverClass = options.hoverClass;
}

items.hover(function() {
$(this).addClass(hoverClass);
}, function() {
$(this).removeClass(hoverClass);
});
}

// Handle drag events on draggable items
items.on('dragstart.h5s', function(e) {
e.stopImmediatePropagation();
Expand Down Expand Up @@ -298,6 +314,7 @@ var sortable = function(selector, options) {
// trigger sortstar update
dragging.parent().triggerHandler('sortstart', {
item: dragging,
placeholder: placeholder,
startparent: startParent
});
});
Expand Down Expand Up @@ -346,8 +363,7 @@ var sortable = function(selector, options) {
});

// Handle dragover and dragenter events on draggable items
// TODO: REMOVE placeholder?????
items.add([this, placeholder]).on('dragover.h5s dragenter.h5s', function(e) {
items.add([this]).on('dragover.h5s dragenter.h5s', function(e) {
if (!_listsConnected($sortable, $(dragging).parent())) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion dist/html.sortable.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 866ee48

Please sign in to comment.