diff --git a/README.md b/README.md index c84cfc5..2d202b8 100644 --- a/README.md +++ b/README.md @@ -202,7 +202,7 @@ Sortable.create(list, { #### `ghostClass` option Class name for the drop placeholder. -Demo: http://jsbin.com/boqugumiqi/1/edit?css,js,output +Demo: http://jsbin.com/hunifu/1/edit?css,js,output ```css .ghost { @@ -430,7 +430,7 @@ Link to the active instance. ## MIT LICENSE -Copyright 2013-2014 Lebedev Konstantin +Copyright 2013-2015 Lebedev Konstantin http://rubaxa.github.io/Sortable/ Permission is hereby granted, free of charge, to any person obtaining diff --git a/Sortable.js b/Sortable.js index 5d10475..4b82eec 100644 --- a/Sortable.js +++ b/Sortable.js @@ -809,7 +809,7 @@ do { if ( (tag === '>*' && el.parentNode === ctx) || ( - (tag === '' || el.nodeName == tag) && + (tag === '' || el.nodeName.toUpperCase() == tag) && (!selector.length || ((' ' + el.className + ' ').match(re) || []).length == selector.length) ) ) { @@ -937,7 +937,7 @@ */ function _index(/**HTMLElement*/el) { var index = 0; - while (el && (el = el.previousElementSibling) && (el.nodeName !== 'TEMPLATE')) { + while (el && (el = el.previousElementSibling) && (el.nodeName.toUpperCase() !== 'TEMPLATE')) { index++; } return index; diff --git a/meteor/package.js b/meteor/package.js index 823a0ac..148561a 100644 --- a/meteor/package.js +++ b/meteor/package.js @@ -16,7 +16,7 @@ Package.describe({ Package.onUse(function (api) { api.versionsFrom(['METEOR@0.9.0', 'METEOR@1.0']); api.use('templating', 'client'); - api.use('dburles:mongo-collection-instances@0.2.5'); // to watch collections getting created + api.use('dburles:mongo-collection-instances@0.2.6'); // to watch collections getting created api.export('Sortable'); api.addFiles([ 'Sortable.js', diff --git a/ng-sortable.js b/ng-sortable.js index 12b9388..f6ec09b 100644 --- a/ng-sortable.js +++ b/ng-sortable.js @@ -3,7 +3,7 @@ * @licence MIT */ angular.module('ng-sortable', []) - .constant('$version', '0.3.2') + .constant('$version', '0.3.3') .directive('ngSortable', ['$parse', function ($parse) { 'use strict'; @@ -17,7 +17,9 @@ angular.module('ng-sortable', []) (node.nodeValue.indexOf('ngRepeat:') !== -1) ); })[0]; - ngRepeat = ngRepeat.nodeValue.match(/ngRepeat:\s*([^\s]+)\s+in\s+([^\s|]+)/); + + // tests: http://jsbin.com/kosubutilo/1/edit?js,output + ngRepeat = ngRepeat.nodeValue.match(/ngRepeat:\s*(?:\(.*?,\s*)?([^\s)]+)[\s)]+in\s+([^\s|]+)/); var itemExpr = $parse(ngRepeat[1]); var itemsExpr = $parse(ngRepeat[2]); diff --git a/package.json b/package.json index cade1db..5b50d73 100644 --- a/package.json +++ b/package.json @@ -25,5 +25,12 @@ "drag" ], "author": "Konstantin Lebedev ", - "license": "MIT" + "license": "MIT", + "spm": { + "main": "Sortable.js", + "ignore": [ + "meteor", + "st" + ] + } }