forked from 0x2620/pandora
spring-loaded left panel
This commit is contained in:
parent
ba9cd056dd
commit
02582aa432
1 changed files with 19 additions and 10 deletions
|
@ -41,23 +41,32 @@ pandora.enableDragAndDrop = function($list, canMove) {
|
|||
});
|
||||
},
|
||||
draganddrop: function(data) {
|
||||
Ox.print(pandora.$ui.folders.$element.scrollTop(0));
|
||||
$tooltip.options({
|
||||
title: getTitle(data._event)
|
||||
}).show(data._event);
|
||||
},
|
||||
draganddroppause: function(data) {
|
||||
var $parent = $(data._event.target).parent(),
|
||||
$grandparent = $parent.parent(),
|
||||
var event = data._event,
|
||||
$parent, $grandparent, $panel, $bar, title;
|
||||
if (
|
||||
// fixme: should be named showLists in the user ui prefs!
|
||||
!pandora.user.ui.showSidebar && event.clientX < 16
|
||||
&& event.clientY >= 44 && event.clientY < window.innerHeight - 16
|
||||
) {
|
||||
pandora.$ui.mainPanel.toggle(0);
|
||||
} else {
|
||||
$parent = $(data._event.target).parent();
|
||||
$grandparent = $parent.parent();
|
||||
$panel = $parent.is('.OxCollapsePanel') ? $parent
|
||||
: $grandparent.is('.OxCollapsePanel') ? $grandparent : null,
|
||||
$bar,
|
||||
title;
|
||||
: $grandparent.is('.OxCollapsePanel') ? $grandparent : null;
|
||||
if ($panel) {
|
||||
$bar = $panel.children('.OxBar');
|
||||
title = $bar.children('.OxTitle')
|
||||
.html().split(' ')[0].toLowerCase();
|
||||
!pandora.user.ui.showFolder.items[title] && $bar.trigger('dblclick');
|
||||
}
|
||||
}
|
||||
},
|
||||
draganddropenter: function(data) {
|
||||
var $parent = $(data._event.target).parent(),
|
||||
|
|
Loading…
Reference in a new issue