spring-loaded left panel
This commit is contained in:
parent
580e2d95ad
commit
bad8ddb7b8
1 changed files with 19 additions and 10 deletions
|
@ -41,23 +41,32 @@ pandora.enableDragAndDrop = function($list, canMove) {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
draganddrop: function(data) {
|
draganddrop: function(data) {
|
||||||
|
Ox.print(pandora.$ui.folders.$element.scrollTop(0));
|
||||||
$tooltip.options({
|
$tooltip.options({
|
||||||
title: getTitle(data._event)
|
title: getTitle(data._event)
|
||||||
}).show(data._event);
|
}).show(data._event);
|
||||||
},
|
},
|
||||||
draganddroppause: function(data) {
|
draganddroppause: function(data) {
|
||||||
var $parent = $(data._event.target).parent(),
|
var event = data._event,
|
||||||
$grandparent = $parent.parent(),
|
$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
|
$panel = $parent.is('.OxCollapsePanel') ? $parent
|
||||||
: $grandparent.is('.OxCollapsePanel') ? $grandparent : null,
|
: $grandparent.is('.OxCollapsePanel') ? $grandparent : null;
|
||||||
$bar,
|
|
||||||
title;
|
|
||||||
if ($panel) {
|
if ($panel) {
|
||||||
$bar = $panel.children('.OxBar');
|
$bar = $panel.children('.OxBar');
|
||||||
title = $bar.children('.OxTitle')
|
title = $bar.children('.OxTitle')
|
||||||
.html().split(' ')[0].toLowerCase();
|
.html().split(' ')[0].toLowerCase();
|
||||||
!pandora.user.ui.showFolder.items[title] && $bar.trigger('dblclick');
|
!pandora.user.ui.showFolder.items[title] && $bar.trigger('dblclick');
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
draganddropenter: function(data) {
|
draganddropenter: function(data) {
|
||||||
var $parent = $(data._event.target).parent(),
|
var $parent = $(data._event.target).parent(),
|
||||||
|
|
Loading…
Reference in a new issue