fix back button css

This commit is contained in:
rolux 2011-10-29 16:57:51 +00:00
parent 50a741c9fa
commit fadbb123bd
2 changed files with 65 additions and 56 deletions

View file

@ -5,7 +5,7 @@ pandora.ui.backButton = function() {
width: 96 width: 96
}).css({ }).css({
float: 'left', float: 'left',
margin: '4px' margin: '4px 0 0 4px'
}) })
.bindEvent({ .bindEvent({
click: function() { click: function() {

View file

@ -1,6 +1,7 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript // vim: et:ts=4:sw=4:sts=4:ft=javascript
pandora.ui.folders = function() { pandora.ui.folders = function() {
var that = Ox.Element() var ui = pandora.user.ui,
that = Ox.Element()
.css({overflowX: 'hidden', overflowY: 'auto'}) .css({overflowX: 'hidden', overflowY: 'auto'})
.bindEvent({ .bindEvent({
resize: pandora.resizeFolders resize: pandora.resizeFolders
@ -14,24 +15,26 @@ pandora.ui.folders = function() {
pandora.$ui.findListSelect = {}; pandora.$ui.findListSelect = {};
pandora.$ui.findListInput = {}; pandora.$ui.findListInput = {};
pandora.$ui.manageListsButton = {}; pandora.$ui.manageListsButton = {};
if (pandora.user.ui.section == 'items') { if (ui.section == 'items') {
pandora.site.sectionFolders.items.forEach(function(folder, i) { pandora.site.sectionFolders.items.forEach(function(folder, i) {
var extras; var extras, $select;
if (folder.id == 'personal') { if (folder.id == 'personal') {
if (pandora.user.level == 'guest') { if (pandora.user.level == 'guest') {
extras = [infoButton('Personal Lists', 'To create and share your own lists of movies, please sign up or sign in.')]; extras = [
infoButton('Personal Lists', 'To create and share your own lists of movies, please sign up or sign in.')
];
} else { } else {
extras = [Ox.Select({ extras = [
pandora.$ui.personalListsSelect = Ox.Select({
items: [ items: [
{ id: 'newlist', title: 'New List...' }, { id: 'newlist', title: 'New List' },
{ id: 'newlistfromselection', title: 'New List from Current Selection...', disabled: true }, { id: 'newlistfromselection', title: 'New List from Selection...', disabled: ui.listSelection.length == 0 },
{ id: 'newsmartlist', title: 'New Smart List' },
{ id: 'newsmartlistfromresults', title: 'New Smart List from Results' },
{}, {},
{ id: 'newsmartlist', title: 'New Smart List...' }, { id: 'duplicatelist', title: 'Duplicate Selected List', disabled: !pandora.user.ui._list },
{ id: 'newsmartlistfromresults', title: 'New Smart List from Current Results...', disabled: true }, { id: 'editlist', title: 'Edit Selected List...', disabled: !pandora.user.ui._list },
{}, { id: 'deletelist', title: 'Delete Selected List...', disabled: !pandora.user.ui._list }
{ id: 'duplicate', title: 'Duplicate List' },
{ id: 'copyselection', title: 'Copy Selection to List...' },
{ id: 'moveselection', title: 'Move Selection to List...' }
], ],
max: 0, max: 0,
min: 0, min: 0,
@ -43,31 +46,37 @@ pandora.ui.folders = function() {
click: function(data) { click: function(data) {
var $list = pandora.$ui.folderList[folder.id]; var $list = pandora.$ui.folderList[folder.id];
// fixme: duplicated // fixme: duplicated
if (data.id == 'new' || data.id == 'newsmart') { if ([
pandora.api.addList({ 'newlist', 'newlistfromselection', 'newsmartlist', 'newsmartlistfromresults'
name: 'Untitled', ].indexOf(data.id) > -1) {
status: 'private', pandora.addList(data.id.indexOf('smart') > -1, data.id.indexOf('from') > -1);
type: data.id == 'new' ? 'static' : 'smart' } else if (data.id == 'duplicatelist') {
}, function(result) { pandora.addList(pandora.user.ui._list);
var id = result.data.id; } else if (data.id == 'editlist') {
pandora.UI.set({ pandora.ui.listDialog().open();
find: { } else if (data.id == 'deletelist') {
conditions: [{key: 'list', value: id, operator: '=='}], pandora.ui.deleteListDialog().open();
operator: '&'
} }
}); },
Ox.Request.clearCache('"findLists"'); pandora_find: function() {
$list.reloadList().bindEventOnce({ /*
load: function(data) { var action = ui._list
$list.gainFocus() && pandora.getListData(ui._list).user == pandora.user.username
.options({selected: [id]}) ? 'enableItem' : 'disableItem';
.editCell(id, 'name'); pandora.$ui.personalListsSelect[action]('editlist');
pandora.$ui.personalListsSelect[action]('duplicatelist');
pandora.$ui.personalListsSelect[action]('deletelist');
pandora.$ui.personalListsSelect[ui.listSelection.length ? 'enableItem' : 'disableItem']('newlistfromselection');
*/
},
pandora_listselection: function(data) {
/*
Ox.print('pandora_listselection', data.value.length)
pandora.$ui.personalListsSelect[data.value.length ? 'enableItem' : 'disableItem']('newlistfromselection');
*/
} }
}); })
}); ];
}
}
})];
} }
} else if (folder.id == 'favorite') { } else if (folder.id == 'favorite') {
if (pandora.user.level == 'guest') { if (pandora.user.level == 'guest') {
@ -190,7 +199,7 @@ pandora.ui.folders = function() {
} }
pandora.$ui.folder[i] = Ox.CollapsePanel({ pandora.$ui.folder[i] = Ox.CollapsePanel({
id: folder.id, id: folder.id,
collapsed: !pandora.user.ui.showFolder.items[folder.id], collapsed: !ui.showFolder.items[folder.id],
extras: extras, extras: extras,
size: 16, size: 16,
title: folder.title title: folder.title