Merge branch 'cyy_fixbug' into 'master'
* Modify catalog sort. See merge request easycorp/zentaopms!7463
This commit is contained in:
@@ -182,6 +182,7 @@ $(function()
|
||||
};
|
||||
|
||||
var versionsData = {};
|
||||
var visibleSort = false;
|
||||
|
||||
/**
|
||||
* Render Dropdown dom.
|
||||
@@ -406,13 +407,15 @@ $(function()
|
||||
return locatePage(libID, moduleID, $(this).data('type'));
|
||||
}).on('mousedown', 'a.sort-module', function()
|
||||
{
|
||||
visibleSort = true;
|
||||
var $element = $(this);
|
||||
setTimeout(function()
|
||||
{
|
||||
$element.addClass('dragging-shadow');
|
||||
if(visibleSort) $element.addClass('dragging-shadow');
|
||||
}, 500);
|
||||
}).on('mouseup', 'a.sort-module', function()
|
||||
{
|
||||
visibleSort = false;
|
||||
$('a.sort-module').removeClass('dragging-shadow');
|
||||
}).on('click', '.tree-version-trigger', function(e)
|
||||
{
|
||||
@@ -672,8 +675,10 @@ $(function()
|
||||
nested: true,
|
||||
selector: 'li',
|
||||
dragCssClass: 'drop-here',
|
||||
noShadow: false,
|
||||
start: function()
|
||||
{
|
||||
visibleSort = false;
|
||||
$('#dropDownCatalogue').remove();
|
||||
$('a.sort-module').removeClass('dragging-shadow');
|
||||
},
|
||||
@@ -697,7 +702,9 @@ $(function()
|
||||
},
|
||||
finish: function(e)
|
||||
{
|
||||
$('a.sort-module').removeClass('dragging-shadow');
|
||||
visibleSort = false;
|
||||
e.target.siblings().find('a.sort-module').removeClass('dragging-shadow');
|
||||
|
||||
if(!e.changed) return;
|
||||
|
||||
var orders = {};
|
||||
|
||||
Reference in New Issue
Block a user