Browse Source

v0.1.7: * draggable (#18)

pull/29/head
RubaXa 11 years ago
parent
commit
d400370a44
  1. 12
      Sortable.js
  2. 4
      Sortable.min.js
  3. 2
      bower.json
  4. 2
      package.json

12
Sortable.js

@ -69,7 +69,7 @@
// Defaults // Defaults
options.group = options.group || Math.random(); options.group = options.group || Math.random();
options.handle = options.handle || null; options.handle = options.handle || null;
options.draggable = options.draggable || el.children[0] && el.children[0].nodeName || 'li'; options.draggable = options.draggable || el.children[0] && el.children[0].nodeName || (/[uo]l/i.test(el.nodeName) ? 'li' : '*');
options.ghostClass = options.ghostClass || 'sortable-ghost'; options.ghostClass = options.ghostClass || 'sortable-ghost';
options.onAdd = _bind(this, options.onAdd || noop); options.onAdd = _bind(this, options.onAdd || noop);
@ -128,7 +128,7 @@
target = _closest(target, options.draggable, el); target = _closest(target, options.draggable, el);
//IE 9 Support // IE 9 Support
if( target && evt.type == 'selectstart' ){ if( target && evt.type == 'selectstart' ){
if( target.tagName != 'A' && target.tagName != 'IMG'){ if( target.tagName != 'A' && target.tagName != 'IMG'){
target.dragDrop(); target.dragDrop();
@ -159,7 +159,6 @@
_on(this.el, 'dragstart', this._onDragStart); _on(this.el, 'dragstart', this._onDragStart);
_on(this.el, 'dragend', this._onDrop); _on(this.el, 'dragend', this._onDrop);
_on(document, 'dragover', _globalDragOver); _on(document, 'dragover', _globalDragOver);
@ -412,7 +411,10 @@
function _closest(el, selector, ctx){ function _closest(el, selector, ctx){
if( el ){ if( selector === '*' ){
return el;
}
else if( el ){
ctx = ctx || document; ctx = ctx || document;
selector = selector.split('.'); selector = selector.split('.');
@ -519,7 +521,7 @@
}; };
Sortable.version = '0.1.6'; Sortable.version = '0.1.7';
// Export // Export
return Sortable; return Sortable;

4
Sortable.min.js vendored

File diff suppressed because one or more lines are too long

2
bower.json

@ -1,7 +1,7 @@
{ {
"name": "Sortable", "name": "Sortable",
"main": "Sortable.js", "main": "Sortable.js",
"version": "0.1.6", "version": "0.1.7",
"homepage": "http://rubaxa.github.io/Sortable/", "homepage": "http://rubaxa.github.io/Sortable/",
"authors": [ "authors": [
"RubaXa <ibnRubaXa@gmail.com>" "RubaXa <ibnRubaXa@gmail.com>"

2
package.json

@ -1,7 +1,7 @@
{ {
"name": "sortable", "name": "sortable",
"exportName": "Sortable", "exportName": "Sortable",
"version": "0.1.6", "version": "0.1.7",
"devDependencies": { "devDependencies": {
"grunt": "*", "grunt": "*",
"grunt-version": "*", "grunt-version": "*",

Loading…
Cancel
Save