From ae8f76f19d392138484e61c6605d8864972908cb Mon Sep 17 00:00:00 2001 From: Dan Dascalescu Date: Sun, 12 Apr 2015 18:20:38 -0700 Subject: [PATCH 01/15] {{#sortable}}, not {{sortable}} in README --- meteor/README.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/meteor/README.md b/meteor/README.md index 163223b..0faf2b2 100644 --- a/meteor/README.md +++ b/meteor/README.md @@ -20,13 +20,13 @@ development framework. Read more at [Why Meteor](http://www.meteorpedia.com/read Simplest invocation - order will be lost when the page is refreshed: ```handlebars -{{sortable }} +{{#sortable }} ``` Persist the sort order in the 'order' field of each document in the collection: ```handlebars -{{sortable items= sortField="order"}} +{{#sortable items= sortField="order"}} ``` Along with `items`, `sortField` is the only Meteor-specific option. If it's missing, the package will @@ -39,8 +39,8 @@ reorderings, unlike with [naive solutions](http://programmers.stackexchange.com/ ## Passing options to the Sortable library - {{sortable items= option1=value1 option2=value2...}} - {{sortable items= options=myOptions}} + {{#sortable items= option1=value1 option2=value2...}} + {{#sortable items= options=myOptions}} For available options, please refer to [the main README](../README.md#options). You can pass them directly or under the `options` object. Direct options (`key=value`) override those in `options`. It is best @@ -49,7 +49,7 @@ object, as this will enable designers to work without needing to inspect the Jav Define the options in a helper for the template that calls Sortable: @@ -76,7 +76,7 @@ All the original Sortable events are supported. In addition, they will receive the data context in `event.data`. You can access `event.data.order` this way: ```handlebars -{{sortable items=players options=playersOptions}} +{{#sortable items=players options=playersOptions}} ``` ```js @@ -104,3 +104,4 @@ If you encounter an issue while using this package, please CC @dandv when you fi * Array support * Tests * Misc. - see reactivize.js +* [GitHub issues](https://github.com/RubaXa/Sortable/labels/%E2%98%84%20meteor) From a479eae115afc39d3ffc803cccb74f3a7a61007a Mon Sep 17 00:00:00 2001 From: c4605 Date: Fri, 17 Apr 2015 16:08:47 +0800 Subject: [PATCH 02/15] clean watcher after element destroy --- ng-sortable.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ng-sortable.js b/ng-sortable.js index d340a59..09055b4 100644 --- a/ng-sortable.js +++ b/ng-sortable.js @@ -69,6 +69,7 @@ ngSortable = attrs.ngSortable, options = scope.$eval(ngSortable) || {}, source = getSource(el), + watchers = [], sortable ; @@ -154,7 +155,11 @@ })); $el.on('$destroy', function () { + angular.forEach(watchers, function (/** Function */unwatch) { + unwatch(); + }); sortable.destroy(); + watchers = null; sortable = null; nextSibling = null; }); @@ -164,7 +169,7 @@ 'sort', 'disabled', 'draggable', 'handle', 'animation', 'onStart', 'onEnd', 'onAdd', 'onUpdate', 'onRemove', 'onSort' ], function (name) { - scope.$watch(ngSortable + '.' + name, function (value) { + watchers.push(scope.$watch(ngSortable + '.' + name, function (value) { if (value !== void 0) { options[name] = value; @@ -172,7 +177,7 @@ sortable.option(name, value); } } - }); + })); }); } } From 1ab661f10e69b2e67724f0796a3cd961d7dfacfc Mon Sep 17 00:00:00 2001 From: ha-D Date: Fri, 24 Apr 2015 12:31:34 +0430 Subject: [PATCH 03/15] Use isolated scope with two-way binding in ng-sortable --- ng-sortable.js | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/ng-sortable.js b/ng-sortable.js index 09055b4..c292791 100644 --- a/ng-sortable.js +++ b/ng-sortable.js @@ -64,10 +64,10 @@ // Export return { restrict: 'AC', + scope: { ngSortable: "=?" }, link: function (scope, $el, attrs) { var el = $el[0], - ngSortable = attrs.ngSortable, - options = scope.$eval(ngSortable) || {}, + options = scope.ngSortable || {}, source = getSource(el), watchers = [], sortable @@ -164,22 +164,20 @@ nextSibling = null; }); - if (ngSortable && !/{|}/.test(ngSortable)) { // todo: ugly - angular.forEach([ - 'sort', 'disabled', 'draggable', 'handle', 'animation', - 'onStart', 'onEnd', 'onAdd', 'onUpdate', 'onRemove', 'onSort' - ], function (name) { - watchers.push(scope.$watch(ngSortable + '.' + name, function (value) { - if (value !== void 0) { - options[name] = value; - - if (!/^on[A-Z]/.test(name)) { - sortable.option(name, value); - } + angular.forEach([ + 'sort', 'disabled', 'draggable', 'handle', 'animation', + 'onStart', 'onEnd', 'onAdd', 'onUpdate', 'onRemove', 'onSort' + ], function (name) { + watchers.push(scope.$watch('ngSortable.' + name, function (value) { + if (value !== void 0) { + options[name] = value; + + if (!/^on[A-Z]/.test(name)) { + sortable.option(name, value); } - })); - }); - } + } + })); + }); } }; }]); From 8e8558f023412f20b7690af215b863c4a390099b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matic=20Jurgli=C4=8D?= Date: Wed, 29 Apr 2015 10:33:49 +0200 Subject: [PATCH 04/15] Fix AngularJS typo --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 3e83346..c706443 100644 --- a/index.html +++ b/index.html @@ -173,7 +173,7 @@
-
AngluarJS / ng-sortable
+
AngularJS / ng-sortable
From 08c31fc0bba9509280f2f3847ab47bee2ea9bab9 Mon Sep 17 00:00:00 2001 From: RubaXa Date: Thu, 7 May 2015 23:14:18 +0300 Subject: [PATCH 05/15] #379: + 'delay' description --- README.md | 12 +++++++++++- Sortable.js | 4 +++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a935ba4..4da1a55 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,7 @@ You can use any element for the list and its elements, not just `ul`/`li`. Here var sortable = new Sortable(el, { group: "name", // or { name: "...", pull: [true, false, clone], put: [true, false, array] } sort: true, // sorting inside list + delay: 0, // time in milliseconds to define when the sorting should start disabled: false, // Disables the sortable if set to true. store: null, // @see Store animation: 150, // ms, animation speed moving items when sorting, `0` — without animation @@ -140,7 +141,7 @@ You can also define whether lists can give away, give and keep a copy (`clone`), #### `sort` option -Sorting inside list +Sorting inside list. Demo: http://jsbin.com/xizeh/2/edit?html,js,output @@ -148,6 +149,15 @@ Demo: http://jsbin.com/xizeh/2/edit?html,js,output --- +#### `delay` option +time in milliseconds to define when the sorting should start. + +Demo: http://jsbin.com/xizeh/4/edit?html,js,output + + +--- + + #### `disabled` options Disables the sortable if set to `true`. diff --git a/Sortable.js b/Sortable.js index 6de4e05..c4ab166 100644 --- a/Sortable.js +++ b/Sortable.js @@ -1035,7 +1035,9 @@ /** @returns {HTMLElement|false} */ function _ghostInBottom(el, evt) { - var lastEl = el.lastElementChild, rect = lastEl.getBoundingClientRect(); + var lastEl = el.lastElementChild, + rect = lastEl.getBoundingClientRect(); + return (evt.clientY - (rect.top + rect.height) > 5) && lastEl; // min delta } From 590a5de981ec5de4cdec092ce8455acca4791cc6 Mon Sep 17 00:00:00 2001 From: RubaXa Date: Thu, 7 May 2015 23:15:27 +0300 Subject: [PATCH 06/15] #379: * typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4da1a55..40cc199 100644 --- a/README.md +++ b/README.md @@ -150,7 +150,7 @@ Demo: http://jsbin.com/xizeh/2/edit?html,js,output #### `delay` option -time in milliseconds to define when the sorting should start. +Time in milliseconds to define when the sorting should start. Demo: http://jsbin.com/xizeh/4/edit?html,js,output From 72be2e91aec387a23cf84fb9ec831a906df4ae7c Mon Sep 17 00:00:00 2001 From: RubaXa Date: Thu, 7 May 2015 23:28:28 +0300 Subject: [PATCH 07/15] #376: * fixed 'evt.target' --- Sortable.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sortable.js b/Sortable.js index c4ab166..cf0b5f0 100644 --- a/Sortable.js +++ b/Sortable.js @@ -991,11 +991,11 @@ evt.oldIndex = startIndex; evt.newIndex = newIndex; + rootEl.dispatchEvent(evt); + if (options[onName]) { options[onName].call(sortable, evt); } - - rootEl.dispatchEvent(evt); } From 06f95308549d3f45d921872fc9f0c9729b584743 Mon Sep 17 00:00:00 2001 From: Lebedev Konstantin Date: Fri, 8 May 2015 11:39:30 +0300 Subject: [PATCH 08/15] Update CONTRIBUTING.md --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ef9d5d1..dba0657 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -5,7 +5,7 @@ 1. Try [dev](https://github.com/RubaXa/Sortable/tree/dev/)-branch, perhaps the problem has been solved; 2. [Use the search](https://github.com/RubaXa/Sortable/search?q=problem), maybe already have an answer; - 3. If not found, create example on [jsbin.com](http://jsbin.com/zunibaxada/1/edit?html,js,output) and describe the problem. + 3. If not found, create example on [jsbin.com (draft)](http://jsbin.com/zunibaxada/1/edit?html,js,output) and describe the problem. --- From 9846ed0bc26c04b212ce6aa08b5342ee86e33c03 Mon Sep 17 00:00:00 2001 From: Diego Castillo Date: Mon, 11 May 2015 19:57:53 -0500 Subject: [PATCH 09/15] Fixed small typo on documentation --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c685025..dc380a6 100644 --- a/README.md +++ b/README.md @@ -195,7 +195,7 @@ Sortable.create(el, { Sortable.create(list, { filter: ".js-remove, .js-edit", onFilter: function (evt) { - var item = el.item, + var item = evt.item, ctrl = evt.target; if (Sortable.utils.is(ctrl, ".js-remove")) { // Click on remove button From c132cab953dff19841705ae30bcd033676813767 Mon Sep 17 00:00:00 2001 From: wangchj Date: Tue, 12 May 2015 15:53:42 -0500 Subject: [PATCH 10/15] Remove circular symlink. --- meteor/example/packages/Sortable | 1 - 1 file changed, 1 deletion(-) delete mode 120000 meteor/example/packages/Sortable diff --git a/meteor/example/packages/Sortable b/meteor/example/packages/Sortable deleted file mode 120000 index 1b20c9f..0000000 --- a/meteor/example/packages/Sortable +++ /dev/null @@ -1 +0,0 @@ -../../../ \ No newline at end of file From aa80521cb25b7df076826ca5f8b3d321a35944dc Mon Sep 17 00:00:00 2001 From: Dan Dascalescu Date: Sun, 24 May 2015 20:09:59 -0700 Subject: [PATCH 11/15] Fix security issue allowing modification of arbitrary numeric fields --- meteor/README.md | 12 ++ meteor/example/.meteor/.finished-upgraders | 8 ++ meteor/example/.meteor/.id | 7 ++ meteor/example/.meteor/platforms | 2 + meteor/example/.meteor/release | 2 +- meteor/example/.meteor/versions | 109 +++++++++--------- meteor/example/README.md | 2 +- meteor/example/package.json | 1 - meteor/example/server/sortable-collections.js | 3 + meteor/{methods.js => methods-client.js} | 10 +- meteor/methods-server.js | 31 +++++ meteor/package.js | 9 +- meteor/reactivize.js | 2 +- 13 files changed, 127 insertions(+), 71 deletions(-) create mode 100644 meteor/example/.meteor/.finished-upgraders create mode 100644 meteor/example/.meteor/.id create mode 100644 meteor/example/.meteor/platforms delete mode 120000 meteor/example/package.json create mode 100644 meteor/example/server/sortable-collections.js rename meteor/{methods.js => methods-client.js} (64%) create mode 100644 meteor/methods-server.js diff --git a/meteor/README.md b/meteor/README.md index 0faf2b2..c340358 100644 --- a/meteor/README.md +++ b/meteor/README.md @@ -25,10 +25,18 @@ Simplest invocation - order will be lost when the page is refreshed: Persist the sort order in the 'order' field of each document in the collection: +*Client:* + ```handlebars {{#sortable items= sortField="order"}} ``` +*Server:* + +```js +Sortable.collections = ; // the name, not the variable +``` + Along with `items`, `sortField` is the only Meteor-specific option. If it's missing, the package will assume there is a field called "order" in the collection, holding unique `Number`s such that every `order` differs from that before and after it by at least 1. Basically, keep to 0, 1, 2, ... . @@ -36,6 +44,10 @@ Try not to depend on a particular format for this field; it *is* though guarante produce lexicographical order, and that the order will be maintained after an arbitrary number of reorderings, unlike with [naive solutions](http://programmers.stackexchange.com/questions/266451/maintain-ordered-collection-by-updating-as-few-order-fields-as-possible). +Remember to declare on the server which collections you want to be reorderable from the client. +Otherwise, the library will error because the client would be able to modify numerical fields in +any collection, which represents a security risk. + ## Passing options to the Sortable library diff --git a/meteor/example/.meteor/.finished-upgraders b/meteor/example/.meteor/.finished-upgraders new file mode 100644 index 0000000..8a76103 --- /dev/null +++ b/meteor/example/.meteor/.finished-upgraders @@ -0,0 +1,8 @@ +# This file contains information which helps Meteor properly upgrade your +# app when you run 'meteor update'. You should check it into version control +# with your project. + +notices-for-0.9.0 +notices-for-0.9.1 +0.9.4-platform-file +notices-for-facebook-graph-api-2 diff --git a/meteor/example/.meteor/.id b/meteor/example/.meteor/.id new file mode 100644 index 0000000..b39baa1 --- /dev/null +++ b/meteor/example/.meteor/.id @@ -0,0 +1,7 @@ +# This file contains a token that is unique to your project. +# Check it into your repository along with the rest of this directory. +# It can be used for purposes such as: +# - ensuring you don't accidentally deploy one app on top of another +# - providing package authors with aggregated statistics + +ir0jg2douy3yo5mehw diff --git a/meteor/example/.meteor/platforms b/meteor/example/.meteor/platforms new file mode 100644 index 0000000..8a3a35f --- /dev/null +++ b/meteor/example/.meteor/platforms @@ -0,0 +1,2 @@ +browser +server diff --git a/meteor/example/.meteor/release b/meteor/example/.meteor/release index f1b6255..dab6b55 100644 --- a/meteor/example/.meteor/release +++ b/meteor/example/.meteor/release @@ -1 +1 @@ -METEOR@1.0.1 +METEOR@1.1.0.2 diff --git a/meteor/example/.meteor/versions b/meteor/example/.meteor/versions index ce300af..abcbcf0 100644 --- a/meteor/example/.meteor/versions +++ b/meteor/example/.meteor/versions @@ -1,56 +1,53 @@ -application-configuration@1.0.3 -autopublish@1.0.1 -autoupdate@1.1.3 -base64@1.0.1 -binary-heap@1.0.1 -blaze-tools@1.0.1 -blaze@2.0.3 -boilerplate-generator@1.0.1 -callback-hook@1.0.1 -check@1.0.2 -ctl-helper@1.0.4 -ctl@1.0.2 -dburles:mongo-collection-instances@0.2.5 -ddp@1.0.12 -deps@1.0.5 -ejson@1.0.4 -fastclick@1.0.1 -fezvrasta:bootstrap-material-design@0.2.1 -follower-livedata@1.0.2 -geojson-utils@1.0.1 -html-tools@1.0.2 -htmljs@1.0.2 -http@1.0.8 -id-map@1.0.1 -insecure@1.0.1 -jquery@1.0.1 -json@1.0.1 -launch-screen@1.0.0 -livedata@1.0.11 -logging@1.0.5 -meteor-platform@1.2.0 -meteor@1.1.3 -minifiers@1.1.2 -minimongo@1.0.5 -mobile-status-bar@1.0.1 -mongo@1.0.9 -observe-sequence@1.0.3 -ordered-dict@1.0.1 -random@1.0.1 -reactive-dict@1.0.4 -reactive-var@1.0.3 -reload@1.1.1 -retry@1.0.1 -routepolicy@1.0.2 -rubaxa:sortable@1.0.0 -session@1.0.4 -spacebars-compiler@1.0.3 -spacebars@1.0.3 -templating@1.0.9 -tracker@1.0.3 -twbs:bootstrap@3.3.1 -ui@1.0.4 -underscore@1.0.1 -url@1.0.2 -webapp-hashing@1.0.1 -webapp@1.1.4 +autopublish@1.0.3 +autoupdate@1.2.1 +base64@1.0.3 +binary-heap@1.0.3 +blaze@2.1.2 +blaze-tools@1.0.3 +boilerplate-generator@1.0.3 +callback-hook@1.0.3 +check@1.0.5 +dburles:mongo-collection-instances@0.3.3 +ddp@1.1.0 +deps@1.0.7 +ejson@1.0.6 +fastclick@1.0.3 +fezvrasta:bootstrap-material-design@0.3.0 +geojson-utils@1.0.3 +html-tools@1.0.4 +htmljs@1.0.4 +http@1.1.0 +id-map@1.0.3 +insecure@1.0.3 +jquery@1.11.3_2 +json@1.0.3 +lai:collection-extensions@0.1.3 +launch-screen@1.0.2 +livedata@1.0.13 +logging@1.0.7 +meteor@1.1.6 +meteor-platform@1.2.2 +minifiers@1.1.5 +minimongo@1.0.8 +mobile-status-bar@1.0.3 +mongo@1.1.0 +observe-sequence@1.0.6 +ordered-dict@1.0.3 +random@1.0.3 +reactive-dict@1.1.0 +reactive-var@1.0.5 +reload@1.1.3 +retry@1.0.3 +routepolicy@1.0.5 +rubaxa:sortable@1.2.0 +session@1.1.0 +spacebars@1.0.6 +spacebars-compiler@1.0.6 +templating@1.1.1 +tracker@1.0.7 +twbs:bootstrap@3.3.4 +ui@1.0.6 +underscore@1.0.3 +url@1.0.4 +webapp@1.2.0 +webapp-hashing@1.0.3 diff --git a/meteor/example/README.md b/meteor/example/README.md index 5e48aca..51d1547 100644 --- a/meteor/example/README.md +++ b/meteor/example/README.md @@ -35,7 +35,7 @@ run script: ### Differential Differential wrote [a blog post on reorderable lists with -Meteor](differential.com/blog/sortable-lists-in-meteor-using-jquery-ui) and +Meteor](http://differential.com/blog/sortable-lists-in-meteor-using-jquery-ui) and [jQuery UI Sortable](http://jqueryui.com/sortable/). It served as inspiration for integrating [rubaxa:sortable](rubaxa.github.io/Sortable/), which uses the HTML5 native drag&drop API (not without [its diff --git a/meteor/example/package.json b/meteor/example/package.json deleted file mode 120000 index 138a42c..0000000 --- a/meteor/example/package.json +++ /dev/null @@ -1 +0,0 @@ -../../package.json \ No newline at end of file diff --git a/meteor/example/server/sortable-collections.js b/meteor/example/server/sortable-collections.js new file mode 100644 index 0000000..76069a5 --- /dev/null +++ b/meteor/example/server/sortable-collections.js @@ -0,0 +1,3 @@ +'use strict'; + +Sortable.collections = ['attributes']; diff --git a/meteor/methods.js b/meteor/methods-client.js similarity index 64% rename from meteor/methods.js rename to meteor/methods-client.js index fe8d834..52f4ebe 100644 --- a/meteor/methods.js +++ b/meteor/methods-client.js @@ -2,19 +2,15 @@ Meteor.methods({ /** - * Update the orderField of documents with given ids in a collection, incrementing it by incDec + * Update the sortField of documents with given ids in a collection, incrementing it by incDec * @param {String} collectionName - name of the collection to update * @param {String[]} ids - array of document ids * @param {String} orderField - the name of the order field, usually "order" * @param {Number} incDec - pass 1 or -1 */ - 'rubaxa:sortable/collection-update': function (collectionName, ids, orderField, incDec) { - check(collectionName, String); - check(ids, [String]); - check(orderField, String); - check(incDec, Number); + 'rubaxa:sortable/collection-update': function (collectionName, ids, sortField, incDec) { var selector = {_id: {$in: ids}}, modifier = {$inc: {}}; - modifier.$inc[orderField] = incDec; + modifier.$inc[sortField] = incDec; Mongo.Collection.get(collectionName).update(selector, modifier, {multi: true}); } }); diff --git a/meteor/methods-server.js b/meteor/methods-server.js new file mode 100644 index 0000000..9598bfc --- /dev/null +++ b/meteor/methods-server.js @@ -0,0 +1,31 @@ +'use strict'; + +Sortable = {}; +Sortable.collections = []; // array of collection names that the client is allowed to reorder + +Meteor.methods({ + /** + * Update the sortField of documents with given ids in a collection, incrementing it by incDec + * @param {String} collectionName - name of the collection to update + * @param {String[]} ids - array of document ids + * @param {String} orderField - the name of the order field, usually "order" + * @param {Number} incDec - pass 1 or -1 + */ + 'rubaxa:sortable/collection-update': function (collectionName, ids, sortField, incDec) { + check(collectionName, String); + // don't allow the client to modify just any collection + if (!Sortable || !Array.isArray(Sortable.collections)) { + throw new Meteor.Error(500, 'Please define Sortable.collections'); + } + if (Sortable.collections.indexOf(collectionName) === -1) { + throw new Meteor.Error(403, 'Collection <' + collectionName + '> is not Sortable. Please add it to Sortable.collections in server code.'); + } + + check(ids, [String]); + check(sortField, String); + check(incDec, Number); + var selector = {_id: {$in: ids}}, modifier = {$inc: {}}; + modifier.$inc[sortField] = incDec; + Mongo.Collection.get(collectionName).update(selector, modifier, {multi: true}); + } +}); diff --git a/meteor/package.js b/meteor/package.js index 148561a..51bf04b 100644 --- a/meteor/package.js +++ b/meteor/package.js @@ -10,20 +10,21 @@ Package.describe({ summary: 'Sortable: reactive minimalist reorderable drag-and-drop lists on modern browsers and touch devices', version: packageJson.version, git: 'https://github.com/RubaXa/Sortable.git', - readme: 'https://github.com/RubaXa/Sortable/blob/master/meteor/README.md' + documentation: 'meteor/README.md' }); 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.6'); // to watch collections getting created - api.export('Sortable'); + api.use('dburles:mongo-collection-instances@0.3.3'); // to watch collections getting created + api.export('Sortable'); // exported on the server too, as a global to hold the array of sortable collections (for security) api.addFiles([ 'Sortable.js', 'meteor/template.html', // the HTML comes first, so reactivize.js can refer to the template in it 'meteor/reactivize.js' ], 'client'); - api.addFiles('meteor/methods.js'); // add to both client and server + api.addFiles('meteor/methods-client.js', 'client'); + api.addFiles('meteor/methods-server.js', 'server'); }); Package.onTest(function (api) { diff --git a/meteor/reactivize.js b/meteor/reactivize.js index 34ff501..a068a5e 100644 --- a/meteor/reactivize.js +++ b/meteor/reactivize.js @@ -1,6 +1,6 @@ /* Make a Sortable reactive by binding it to a Mongo.Collection. -Calls `rubaxa:sortable/collection-update` on the server to update the sortField or affected records. +Calls `rubaxa:sortable/collection-update` on the server to update the sortField of affected records. TODO: * supply consecutive values if the `order` field doesn't have any From 107bfa25c02f32cd0253460481e15b9c6c2a8fbb Mon Sep 17 00:00:00 2001 From: RubaXa Date: Sat, 30 May 2015 13:58:01 +0300 Subject: [PATCH 12/15] v1.2.1 - #376: 'target' is NULL --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6b40d2a..344c30b 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "sortablejs", "exportName": "Sortable", - "version": "1.2.0", + "version": "1.2.1", "devDependencies": { "grunt": "*", "grunt-version": "*", From 86d3d8b2287bdd69af5f9e8b9f05682f623bbdc6 Mon Sep 17 00:00:00 2001 From: Adam Fleming Date: Wed, 10 Jun 2015 12:46:14 -0400 Subject: [PATCH 13/15] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 344c30b..2a1c170 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "drag", "meteor", "angular", - "ng-srotable", + "ng-sortable", "react", "mixin" ], From be0fd1a1266820e1cb218a24bee7d2ff3d56fa40 Mon Sep 17 00:00:00 2001 From: Adam Fleming Date: Wed, 10 Jun 2015 13:10:51 -0400 Subject: [PATCH 14/15] Include ng-sortable.js in bower distribution --- bower.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bower.json b/bower.json index 4ae98d7..acfb17d 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,9 @@ { "name": "Sortable", - "main": "Sortable.js", + "main": [ + "Sortable.js", + "ng-sortable.js" + ], "version": "1.2.0", "homepage": "http://rubaxa.github.io/Sortable/", "authors": [ From f4502a72b773c7f29587d28153264f4bcb5644c1 Mon Sep 17 00:00:00 2001 From: Adam Fleming Date: Wed, 10 Jun 2015 14:05:56 -0400 Subject: [PATCH 15/15] Update bower.json --- bower.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bower.json b/bower.json index acfb17d..741a052 100644 --- a/bower.json +++ b/bower.json @@ -2,7 +2,9 @@ "name": "Sortable", "main": [ "Sortable.js", - "ng-sortable.js" + "ng-sortable.js", + "knockout-sortable.js", + "react-sortable-mixin.js" ], "version": "1.2.0", "homepage": "http://rubaxa.github.io/Sortable/",