|
|
@ -90,7 +90,7 @@ Template.sortable.created = function () { |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
templateInstance.adjustOrders = function adjustOrders(itemId, orderPrevItem, orderNextItem) { |
|
|
|
templateInstance.adjustOrders = function adjustOrders(itemId, orderPrevItem, orderNextItem) { |
|
|
|
var orderField = templateInstance.options.sortField; |
|
|
|
var orderField = templateInstance.options.sortField; |
|
|
|
var selector = {}, modifier = {$set: {}}; |
|
|
|
var selector = templateInstance.options.selector || {}, modifier = {$set: {}}; |
|
|
|
var ids = []; |
|
|
|
var ids = []; |
|
|
|
var startOrder = templateInstance.collection.findOne(itemId)[orderField]; |
|
|
|
var startOrder = templateInstance.collection.findOne(itemId)[orderField]; |
|
|
|
if (orderPrevItem !== null) { |
|
|
|
if (orderPrevItem !== null) { |
|
|
|