* Code for task #91391.
This commit is contained in:
@@ -68,6 +68,7 @@ i.btn-info, i.btn-info:hover {border: none; background: #fff; box-shadow: unset;
|
||||
.is-sorting > li .flex-start {opacity: 1; border-radius: 4px;}
|
||||
.is-sorting > li ul {display: none !important;}
|
||||
li.drag-shadow ul {display: none !important;}
|
||||
#fileTree a.dragging-shadow {box-shadow: 0 1px 1px rgba(0,0,0,.05), 0 2px 6px 0 rgba(0,0,0,0.1);}
|
||||
</style>
|
||||
|
||||
<?php
|
||||
@@ -81,7 +82,8 @@ js::set('objectID', isset($objectID) ? $objectID : '');
|
||||
js::set('isFirstLoad', isset($isFirstLoad) ? $isFirstLoad: '');
|
||||
js::set('canViewFiles', common::hasPriv('doc', 'showfiles'));
|
||||
js::set('spaceMethod', $config->doc->spaceMethod);
|
||||
js::set('canSortCatalog', common::hasPriv('doc', 'sortCatalog'));
|
||||
js::set('canSortDocCatalog', common::hasPriv('doc', 'sortCatalog'));
|
||||
js::set('canSortAPICatalog', common::hasPriv('api', 'sortCatalog'));
|
||||
?>
|
||||
|
||||
<div id="fileTree" class="file-tree menu-active-primary menu-hover-primary">
|
||||
@@ -267,8 +269,9 @@ $(function()
|
||||
|
||||
var objectType = config.currentModule == 'api' ? item.objectType : item.type;
|
||||
var libClass = ['lib', 'annex', 'api', 'execution'].indexOf(objectType) !== -1 ? 'lib' : '';
|
||||
var moduleClass = item.type == 'doc' ? 'catalog' : '';
|
||||
var sortClass = item.type == 'doc' && canSortCatalog ? ' sort-module' : '';
|
||||
var moduleClass = item.type == 'doc' || item.type == 'apiDoc' ? 'catalog' : '';
|
||||
var sortClass = item.type == 'doc' && canSortDocCatalog ? ' sort-module' : '';
|
||||
if(item.type == 'apiDoc' && canSortAPICatalog) sortClass = 'sort-module';
|
||||
var hasChild = item.children ? !!item.children.length : false;
|
||||
var link = item.type != 'execution' || item.hasAction ? '###' : '#';
|
||||
var $item = '<a href="' + link + '" style="position: relative" data-has-children="' + hasChild + '" title="' + item.name + '" data-id="' + item.id + '" class="' + libClass + sortClass + '" data-type="' + item.type + '" data-action="' + item.hasAction + '">';
|
||||
@@ -399,6 +402,16 @@ $(function()
|
||||
}
|
||||
|
||||
return locatePage(libID, moduleID, $(this).data('type'));
|
||||
}).on('mousedown', 'a.sort-module', function()
|
||||
{
|
||||
var $element = $(this);
|
||||
setTimeout(function()
|
||||
{
|
||||
$element.addClass('dragging-shadow');
|
||||
}, 100);
|
||||
}).on('mouseup', 'a.sort-module', function()
|
||||
{
|
||||
$('a.sort-module').removeClass('dragging-shadow');
|
||||
}).on('click', '.tree-version-trigger', function(e)
|
||||
{
|
||||
$('.dropdown-in-tree').remove();
|
||||
|
||||
Reference in New Issue
Block a user