From ba9cd056dd6c71fbcbc2c65eb7cb1e2b8fe7ed83 Mon Sep 17 00:00:00 2001 From: rolux 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 9e6e99604..f45eb8074 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 db3b8b63c..55d10c6b8 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 f45928085..863431136 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: [