From 3154c180671c883eee52f1c2165b549854b9f3b4 Mon Sep 17 00:00:00 2001 From: rolux Date: Fri, 9 Sep 2011 12:09:05 +0000 Subject: [PATCH] make theme selectable --- static/js/pandora/ui/folderBrowserList.js | 15 --------------- static/js/pandora/ui/list.js | 2 +- static/js/pandora/ui/menu.js | 12 +++++++++++- 3 files changed, 12 insertions(+), 17 deletions(-) diff --git a/static/js/pandora/ui/folderBrowserList.js b/static/js/pandora/ui/folderBrowserList.js index f9353080..e92b8fbb 100644 --- a/static/js/pandora/ui/folderBrowserList.js +++ b/static/js/pandora/ui/folderBrowserList.js @@ -20,11 +20,6 @@ pandora.ui.folderBrowserList = function(id) { operator: '+', title: $('').attr({ src: Ox.UI.getImageURL('symbolIcon') - }) - .css({ - width: '10px', - height: '10px', - padding: '3px', }), unique: true, visible: true, @@ -74,11 +69,6 @@ pandora.ui.folderBrowserList = function(id) { title: $('') .attr({ src: Ox.UI.getImageURL('symbolEdit') - }) - .css({ - width: '10px', - height: '10px', - padding: '3px', }), tooltip: function(data) { return data.type == 'smart' @@ -113,11 +103,6 @@ pandora.ui.folderBrowserList = function(id) { src: Ox.UI.getImageURL( 'symbol' + (id == 'favorite' ? 'Like' : 'Star') ) - }) - .css({ - width: '10px', - height: '10px', - padding: '3px' }), tooltip: function(data) { var checked = id == 'favorite' ? data.subscribed : data.status == 'featured'; diff --git a/static/js/pandora/ui/list.js b/static/js/pandora/ui/list.js index 29dddf96..e6acb7a4 100644 --- a/static/js/pandora/ui/list.js +++ b/static/js/pandora/ui/list.js @@ -530,7 +530,7 @@ pandora.ui.list = function() { // fixme: remove view argument copy: function(data) { Ox.Clipboard.copy({ items: data.ids, - text: $.map(data.ids, function(id) { + text: data.ids.map(function(id) { return pandora.$ui.list.value(id, 'title'); }).join('\n') }); diff --git a/static/js/pandora/ui/menu.js b/static/js/pandora/ui/menu.js index 86343113..6f4c02ac 100644 --- a/static/js/pandora/ui/menu.js +++ b/static/js/pandora/ui/menu.js @@ -103,7 +103,14 @@ pandora.ui.mainMenu = function() { { id: 'lists', title: 'Hide Lists', keyboard: 'shift l' }, { id: 'info', title: 'Hide Info', keyboard: 'shift i' }, { id: 'groups', title: 'Hide Groups', keyboard: 'shift g' }, - { id: 'movies', title: 'Hide ' + pandora.site.itemName.plural, disabled: true, keyboard: 'shift m' } + { id: 'movies', title: 'Hide ' + pandora.site.itemName.plural, disabled: true, keyboard: 'shift m' }, + {}, + { id: 'theme', title: 'Theme', items: [ + { group: 'settheme', min: 1, max: 1, items: [ + { id: 'classic', title: 'Classic', checked: pandora.user.ui.theme == 'classic'}, + { id: 'modern', title: 'Modern', checked: pandora.user.ui.theme == 'modern' } + ]} + ] } ]}, { id: 'sortMenu', title: 'Sort', items: [ { id: 'sortmovies', title: 'Sort ' + pandora.site.itemName.plural + ' by', items: [ @@ -179,6 +186,9 @@ pandora.ui.mainMenu = function() { pandora.UI.set(['lists', pandora.user.ui.list, 'sort'].join('|'), [{key: key, operator: operator}]); //pandora.user.ui.lists[pandora.user.ui.list].sort[0] = {key: key, operator: operator}; pandora.URL.push(pandora.Query.toString()); + } else if (data.id == 'settheme') { + Ox.Theme(value); + pandora.UI.set('theme', value); } else if (data.id == 'sortmovies') { var operator = pandora.getSortOperator(value); pandora.$ui.mainMenu.checkItem('sortMenu_ordermovies_' + (operator == '+' ? 'ascending' : 'descending'));