fix back button css
This commit is contained in:
parent
50a741c9fa
commit
fadbb123bd
2 changed files with 65 additions and 56 deletions
|
@ -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() {
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
// 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,
|
||||||
.css({overflowX: 'hidden', overflowY: 'auto'})
|
that = Ox.Element()
|
||||||
.bindEvent({
|
.css({overflowX: 'hidden', overflowY: 'auto'})
|
||||||
resize: pandora.resizeFolders
|
.bindEvent({
|
||||||
});
|
resize: pandora.resizeFolders
|
||||||
|
});
|
||||||
var counter = 0;
|
var counter = 0;
|
||||||
//var $sections = [];
|
//var $sections = [];
|
||||||
pandora.$ui.folder = [];
|
pandora.$ui.folder = [];
|
||||||
|
@ -14,60 +15,68 @@ 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 = [
|
||||||
items: [
|
pandora.$ui.personalListsSelect = Ox.Select({
|
||||||
{ id: 'newlist', title: 'New List...' },
|
items: [
|
||||||
{ id: 'newlistfromselection', title: 'New List from Current Selection...', disabled: true },
|
{ id: 'newlist', title: 'New List' },
|
||||||
{},
|
{ id: 'newlistfromselection', title: 'New List from Selection...', disabled: ui.listSelection.length == 0 },
|
||||||
{ id: 'newsmartlist', title: 'New Smart List...' },
|
{ id: 'newsmartlist', title: 'New Smart List' },
|
||||||
{ id: 'newsmartlistfromresults', title: 'New Smart List from Current Results...', disabled: true },
|
{ id: 'newsmartlistfromresults', title: 'New Smart List from Results' },
|
||||||
{},
|
{},
|
||||||
{ id: 'duplicate', title: 'Duplicate List' },
|
{ id: 'duplicatelist', title: 'Duplicate Selected List', disabled: !pandora.user.ui._list },
|
||||||
{ id: 'copyselection', title: 'Copy Selection to List...' },
|
{ id: 'editlist', title: 'Edit Selected List...', disabled: !pandora.user.ui._list },
|
||||||
{ id: 'moveselection', title: 'Move Selection to List...' }
|
{ id: 'deletelist', title: 'Delete Selected List...', disabled: !pandora.user.ui._list }
|
||||||
],
|
],
|
||||||
max: 0,
|
max: 0,
|
||||||
min: 0,
|
min: 0,
|
||||||
selectable: false,
|
selectable: false,
|
||||||
tooltip: 'Manage Personal Lists',
|
tooltip: 'Manage Personal Lists',
|
||||||
type: 'image'
|
type: 'image'
|
||||||
})
|
})
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
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: '&'
|
}
|
||||||
}
|
},
|
||||||
});
|
pandora_find: function() {
|
||||||
Ox.Request.clearCache('"findLists"');
|
/*
|
||||||
$list.reloadList().bindEventOnce({
|
var action = ui._list
|
||||||
load: function(data) {
|
&& pandora.getListData(ui._list).user == pandora.user.username
|
||||||
$list.gainFocus()
|
? 'enableItem' : 'disableItem';
|
||||||
.options({selected: [id]})
|
pandora.$ui.personalListsSelect[action]('editlist');
|
||||||
.editCell(id, 'name');
|
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
|
||||||
|
|
Loading…
Reference in a new issue