forked from 0x2620/pandora
add the 'All Movies' list
This commit is contained in:
parent
71e0ab278c
commit
03ed4e74f6
4 changed files with 26 additions and 8 deletions
|
@ -301,6 +301,7 @@ pandora.ui.folderList = function(id) {
|
|||
} else if (data.key == 'status') {
|
||||
var status = that.value(data.id, data.key) == 'private' ? 'public' : 'private';
|
||||
pandora.changeListStatus(data.id, status, function(result) {
|
||||
Ox.print('cLS', result.data);
|
||||
that.value(result.data.id, 'status', result.data.status);
|
||||
});
|
||||
} else if (data.key == 'path') {
|
||||
|
|
|
@ -2,13 +2,15 @@
|
|||
'use strict';
|
||||
pandora.ui.folders = function() {
|
||||
var ui = pandora.user.ui,
|
||||
counter = 0,
|
||||
that = Ox.Element()
|
||||
.css({overflowX: 'hidden', overflowY: 'auto'})
|
||||
.bindEvent({
|
||||
resize: pandora.resizeFolders,
|
||||
});
|
||||
var counter = 0;
|
||||
//var $sections = [];
|
||||
|
||||
pandora.$ui.allItems = pandora.ui.allItems().appendTo(that);
|
||||
pandora.$ui.folder = [];
|
||||
pandora.$ui.folderBrowser = {};
|
||||
pandora.$ui.folderList = {};
|
||||
|
|
|
@ -23,7 +23,7 @@ pandora.ui.listDialog = function(section) {
|
|||
} else if (id == 'icon') {
|
||||
return pandora.ui.listIconPanel(listData);
|
||||
} else if (id == 'query') {
|
||||
return pandora.$ui.filter = pandora.ui.filter(listData);
|
||||
return pandora.$ui.filterForm = pandora.ui.filterForm(listData);
|
||||
}
|
||||
},
|
||||
tabs: tabs
|
||||
|
@ -244,8 +244,14 @@ pandora.ui.listGeneralPanel = function(listData) {
|
|||
}
|
||||
function editStatus(data) {
|
||||
var status = data.selected[0].id;
|
||||
$statusSelect.value(status == 'private' ? 'public' : 'private');
|
||||
pandora.changeListStatus(listData.id, status, function(result) {
|
||||
listData.status = result.data.status;
|
||||
if (result.data.status == 'private') {
|
||||
subscribers = 0;
|
||||
$subscribersInput.options({value: 0});
|
||||
}
|
||||
$statusSelect.value(result.data.status);
|
||||
$subscribersInput[getSubscribersAction()]();
|
||||
$descriptionInput
|
||||
.options({height: getDescriptionHeight()})
|
||||
|
|
|
@ -140,12 +140,20 @@ pandora.changeListStatus = function(id, status, callback) {
|
|||
if (status == 'private') {
|
||||
pandora.api.findLists({
|
||||
query: {conditions: [{key: 'id', value: id, operator: '=='}]},
|
||||
keys: ['subscribers']
|
||||
keys: ['name', 'subscribers']
|
||||
}, function(result) {
|
||||
var subscribers = result.data.items[0].subscribers;
|
||||
var name = result.data.items[0].name,
|
||||
subscribers = result.data.items[0].subscribers;
|
||||
if (subscribers) {
|
||||
pandora.ui.makeListPrivateDialog(subscribers, function(makePrivate) {
|
||||
makePrivate && changeListStatus();
|
||||
pandora.ui.makeListPrivateDialog(name, subscribers, function(makePrivate) {
|
||||
if (makePrivate) {
|
||||
changeListStatus();
|
||||
} else {
|
||||
callback({data: {
|
||||
id: id,
|
||||
status: 'public'
|
||||
}});
|
||||
}
|
||||
}).open();
|
||||
} else {
|
||||
changeListStatus();
|
||||
|
@ -156,7 +164,7 @@ pandora.changeListStatus = function(id, status, callback) {
|
|||
}
|
||||
function changeListStatus() {
|
||||
pandora.api.editList({
|
||||
id: is,
|
||||
id: id,
|
||||
status: status
|
||||
}, callback);
|
||||
}
|
||||
|
@ -505,7 +513,7 @@ pandora.getFoldersWidth = function() {
|
|||
Ox.Log('', 'FOLDERS HEIGHT', pandora.getFoldersHeight(), 'INFO HEIGHT', pandora.getInfoHeight())
|
||||
if (
|
||||
pandora.$ui.appPanel
|
||||
&& pandora.getFoldersHeight() > window.innerHeight - 20 - 24 - 1 - pandora.getInfoHeight()
|
||||
&& pandora.getFoldersHeight() > window.innerHeight - 20 - 24 -16 - 1 - pandora.getInfoHeight()
|
||||
) {
|
||||
width -= Ox.UI.SCROLLBAR_SIZE;
|
||||
}
|
||||
|
@ -809,6 +817,7 @@ pandora.resizeFolders = function() {
|
|||
columnWidth.name = (width - 96) - columnWidth.user;
|
||||
}
|
||||
Ox.Log('', 'RESIZE FOLDERS', width);
|
||||
pandora.$ui.allItems.resizeElement(width - 104);
|
||||
Ox.forEach(pandora.$ui.folderList, function($list, id) {
|
||||
var pos = Ox.getPositionById(pandora.site.sectionFolders[pandora.user.ui.section], id);
|
||||
pandora.$ui.folder[pos].css({width: width + 'px'});
|
||||
|
|
Loading…
Reference in a new issue