Merge pull request #4531 from tractorcow/pulls/3.2/block-archived-dragdrop

BUG disable archived pages from being droppable
This commit is contained in:
Sam Minnée 2015-08-24 17:04:41 +12:00
commit 5c5dd7efce

View File

@ -178,6 +178,8 @@
var isAllowed = ( var isAllowed = (
// Don't allow moving the root node // Don't allow moving the root node
movedNode.data('id') !== 0 movedNode.data('id') !== 0
// Archived pages can't be moved
&& !movedNode.hasClass('status-archived')
// Only allow moving node inside the root container, not before/after it // Only allow moving node inside the root container, not before/after it
&& (!isMovedOntoContainer || data.p == 'inside') && (!isMovedOntoContainer || data.p == 'inside')
// Children are generally allowed on parent // Children are generally allowed on parent