expose new URL controller as pandora._URL
This commit is contained in:
parent
49c013c4ef
commit
6029217e4a
10 changed files with 217 additions and 25 deletions
|
|
@ -8,9 +8,9 @@ pandora.ui.filter = function(list) {
|
|||
format: key.format,
|
||||
id: key.id,
|
||||
title: key.title,
|
||||
type: key.type == 'layer' ? Ox.getObjectById(
|
||||
pandora.site.layers, key.id
|
||||
).type : key.type
|
||||
type: key.type == 'layer'
|
||||
? Ox.getObjectById(pandora.site.layers, key.id).type
|
||||
: key.type
|
||||
};
|
||||
}), {
|
||||
id: 'list',
|
||||
|
|
@ -34,9 +34,6 @@ pandora.ui.filter = function(list) {
|
|||
query: data.query
|
||||
}, function(result) {
|
||||
Ox.Request.clearCache(list.id);
|
||||
pandora.$ui.groups.forEach(function($group) {
|
||||
$group.reloadList();
|
||||
});
|
||||
pandora.$ui.list
|
||||
.bindEventOnce({
|
||||
init: function(data) {
|
||||
|
|
@ -46,6 +43,10 @@ pandora.ui.filter = function(list) {
|
|||
}
|
||||
})
|
||||
.reloadList();
|
||||
pandora.$ui.groups.forEach(function($group) {
|
||||
$group.reloadList();
|
||||
});
|
||||
|
||||
});
|
||||
} else {
|
||||
pandora.user.ui.query = data.query;
|
||||
|
|
|
|||
|
|
@ -388,6 +388,7 @@ pandora.ui.folderList = function(id) {
|
|||
data_ = {id: data.id};
|
||||
data_[data.key] = data.value;
|
||||
pandora.api.editList(data_, function(result) {
|
||||
// fixme: we may want slashes in list names
|
||||
if (result.data.id != data.id) {
|
||||
pandora.$ui.folderList[id].value(data.id, 'name', result.data.name);
|
||||
pandora.$ui.folderList[id].value(data.id, 'id', result.data.id);
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ pandora.ui.item = function() {
|
|||
}*/
|
||||
|
||||
if (!result.data.rendered && [
|
||||
'clips', 'map', 'player', 'timeline'
|
||||
'clips', 'map', 'video', 'timeline'
|
||||
].indexOf(pandora.user.ui.itemView)>-1) {
|
||||
pandora.$ui.contentPanel.replaceElement(1,
|
||||
Ox.Element()
|
||||
|
|
@ -250,7 +250,7 @@ pandora.ui.item = function() {
|
|||
|
||||
pandora.$ui.contentPanel.replaceElement(1, stats);
|
||||
|
||||
} else if (pandora.user.ui.itemView == 'player') {
|
||||
} else if (pandora.user.ui.itemView == 'video') {
|
||||
// fixme: duplicated
|
||||
var layers = [],
|
||||
video = {};
|
||||
|
|
|
|||
|
|
@ -647,8 +647,7 @@ pandora.ui.list = function() { // fixme: remove view argument
|
|||
},
|
||||
select: function(data) {
|
||||
var $still, $timeline;
|
||||
pandora.UI.set(['lists', pandora.user.ui.list, 'selected'].join('|'), data.ids);
|
||||
//pandora.user.ui.lists[pandora.user.ui.list].selected = data.ids;
|
||||
pandora.UI.set('lists|' + pandora.user.ui.list + '|selected', data.ids);
|
||||
if (data.ids.length) {
|
||||
pandora.$ui.mainMenu.enableItem('copy');
|
||||
pandora.$ui.mainMenu.enableItem('openmovie');
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// vim: et:ts=4:sw=4:sts=4:ft=javascript
|
||||
pandora.ui.status = function(key, data) {
|
||||
var that = Ox.toTitleCase(key) + ': ' + [
|
||||
Ox.formatNumber(data.items) + ' '+ (data.items != 1 ? pandora.site.itemName.plural : pandora.site.itemName.sinular),
|
||||
Ox.formatNumber(data.items) + ' '+ (data.items != 1 ? pandora.site.itemName.plural : pandora.site.itemName.singular),
|
||||
Ox.formatDuration(data.runtime, 'medium'),
|
||||
data.files + ' file' + (data.files != 1 ? 's' : ''),
|
||||
Ox.formatDuration(data.duration, 'short'),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue