From 75149e715b5d17a6a56aa0d3a502918e7324d711 Mon Sep 17 00:00:00 2001 From: j Date: Thu, 31 Jan 2019 13:40:37 +0530 Subject: [PATCH 1/2] fix sortLists --- oml/user/api.py | 1 + 1 file changed, 1 insertion(+) diff --git a/oml/user/api.py b/oml/user/api.py index 7f138c8..87185c2 100644 --- a/oml/user/api.py +++ b/oml/user/api.py @@ -348,6 +348,7 @@ def sortLists(data): ''' n = 0 logger.debug('sortLists %s', data) + lists = [] for id in data['ids']: l = models.List.get(id) l.index_ = n From b1a21063818e404337735731b258f62088426fda Mon Sep 17 00:00:00 2001 From: j Date: Thu, 31 Jan 2019 13:40:49 +0530 Subject: [PATCH 2/2] cleanup before backend returns --- static/js/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/js/utils.js b/static/js/utils.js index 94a1003..3ac249e 100644 --- a/static/js/utils.js +++ b/static/js/utils.js @@ -432,6 +432,7 @@ oml.enableDragAndDrop = function($list, canMove) { ) { var targets = drag.action == 'copy' ? drag.target.id : [oml.user.ui._list, drag.target.id]; + cleanup(250); oml.doHistory(drag.action, data.ids, targets, function() { Ox.Request.clearCache('find'); oml.api.find({ @@ -449,7 +450,6 @@ oml.enableDragAndDrop = function($list, canMove) { drag.target.id, 'items', result.data.items ); */ - cleanup(250); }); oml.$ui.folders.updateItems(); if (drag.action == 'move') {