Prevent locked posts (in process of uploading) from being moved.
This commit is contained in:
parent
339163dfc3
commit
348d448351
@ -370,6 +370,7 @@ QR.post = class
|
|||||||
index = (el) -> [el.parentNode.children...].indexOf el
|
index = (el) -> [el.parentNode.children...].indexOf el
|
||||||
oldIndex = index el
|
oldIndex = index el
|
||||||
newIndex = index @
|
newIndex = index @
|
||||||
|
return if QR.posts[oldIndex].isLocked or QR.posts[newIndex].isLocked
|
||||||
(if oldIndex < newIndex then $.after else $.before) @, el
|
(if oldIndex < newIndex then $.after else $.before) @, el
|
||||||
post = QR.posts.splice(oldIndex, 1)[0]
|
post = QR.posts.splice(oldIndex, 1)[0]
|
||||||
QR.posts.splice newIndex, 0, post
|
QR.posts.splice newIndex, 0, post
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user