From 580e2d95ad6afe49304e3ea1e7a6220820c473d2 Mon Sep 17 00:00:00 2001 From: rlx <0x0073@0x2620.org> Date: Sun, 4 Sep 2011 22:06:14 +0000 Subject: [PATCH] spring-loaded folder lists --- static/js/pandora/pandora.js | 14 ++++++++++++++ static/js/pandora/ui/folders.js | 1 + static/js/pandora/ui/menu.js | 8 ++++---- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/static/js/pandora/pandora.js b/static/js/pandora/pandora.js index 9e6e996..f45eb80 100644 --- a/static/js/pandora/pandora.js +++ b/static/js/pandora/pandora.js @@ -45,6 +45,20 @@ pandora.enableDragAndDrop = function($list, canMove) { title: getTitle(data._event) }).show(data._event); }, + draganddroppause: function(data) { + var $parent = $(data._event.target).parent(), + $grandparent = $parent.parent(), + $panel = $parent.is('.OxCollapsePanel') ? $parent + : $grandparent.is('.OxCollapsePanel') ? $grandparent : null, + $bar, + title; + 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(), $item = $parent.is('.OxItem') ? $parent : $parent.parent(), diff --git a/static/js/pandora/ui/folders.js b/static/js/pandora/ui/folders.js index db3b8b6..55d10c6 100644 --- a/static/js/pandora/ui/folders.js +++ b/static/js/pandora/ui/folders.js @@ -37,6 +37,7 @@ pandora.ui.folders = function() { max: 0, min: 0, selectable: false, + tooltip: 'Manage Personal Lists', type: 'image' }) .bindEvent({ diff --git a/static/js/pandora/ui/menu.js b/static/js/pandora/ui/menu.js index f459280..8634311 100644 --- a/static/js/pandora/ui/menu.js +++ b/static/js/pandora/ui/menu.js @@ -80,11 +80,11 @@ pandora.ui.mainMenu = function() { {}, { id: 'usesiteposter', title: 'Always Use ' + pandora.site.site.name + ' Poster' } ] }, - { id: 'columns', title: 'Column Layout', items: [ - { id: 'loadlayout', title: 'Load...' }, - { id: 'savelayout', title: 'Save...' }, + { id: 'columns', title: 'Columns', items: [ + { id: 'loadcolumns', title: 'Load Layout...' }, + { id: 'savecolumns', title: 'Save Layout...' }, {}, - { id: 'resetlayout', title: 'Reset' } + { id: 'resetcolumns', title: 'Reset to Default' } ]}, {}, { id: 'openmovie', title: ['Open ' + pandora.site.itemName.singular, 'Open ' + pandora.site.itemName.plural], items: [