cleanup, remove trailing whitespace

This commit is contained in:
rolux 2011-10-29 19:46:46 +02:00
parent c6f11433f9
commit 51e9e72f32
34 changed files with 63 additions and 72 deletions

View file

@ -144,7 +144,7 @@ function constructList() {
.appendTo(info) .appendTo(info)
var f = app.actions[id].code[0]; var f = app.actions[id].code[0];
$('<span>').html(' View Source ('+f+')').appendTo(info) $('<span>').html(' View Source ('+f+')').appendTo(info)
$('<pre>').append($code).appendTo(info) $('<pre>').append($code).appendTo(info)
hljs.highlightBlock($code[0], ' '); hljs.highlightBlock($code[0], ' ');
hash += id + ',' hash += id + ','

View file

@ -58,7 +58,7 @@ Ox.load('UI', {
Ox.UI.hideLoadingScreen(); Ox.UI.hideLoadingScreen();
}); });
return that; return that;
}, },
}); });
Ox.extend(pandora.user, { Ox.extend(pandora.user, {
videoFormat: Ox.UI.getVideoFormat(pandora.site.video.formats) videoFormat: Ox.UI.getVideoFormat(pandora.site.video.formats)

View file

@ -132,7 +132,7 @@ window.onerror = function(error, url, line) {
script.onload = callback; script.onload = callback;
script.src = '/static/oxjs/dev/Ox.js'; script.src = '/static/oxjs/dev/Ox.js';
script.type = 'text/javascript'; script.type = 'text/javascript';
document.head.appendChild(script); document.head.appendChild(script);
} }
function loadOxUI(callback) { function loadOxUI(callback) {
@ -226,13 +226,13 @@ window.onerror = function(error, url, line) {
edits: [ edits: [
{id: 'personal', title: 'Personal Edits'}, {id: 'personal', title: 'Personal Edits'},
{id: 'favorite', title: 'Favorite Edits', showBrowser: false}, {id: 'favorite', title: 'Favorite Edits', showBrowser: false},
{id: 'featured', title: 'Featured Edits', showBrowser: false} {id: 'featured', title: 'Featured Edits', showBrowser: false}
], ],
texts: [ texts: [
{id: 'personal', title: 'Personal Texts'}, {id: 'personal', title: 'Personal Texts'},
{id: 'favorite', title: 'Favorite Texts', showBrowser: false}, {id: 'favorite', title: 'Favorite Texts', showBrowser: false},
{id: 'featured', title: 'Featured Texts', showBrowser: false} {id: 'featured', title: 'Featured Texts', showBrowser: false}
] ]
}, },
sortKeys: Ox.map(pandora.site.itemKeys, function(key) { sortKeys: Ox.map(pandora.site.itemKeys, function(key) {
return key.columnWidth ? Ox.extend(key, { return key.columnWidth ? Ox.extend(key, {
@ -270,7 +270,7 @@ window.onerror = function(error, url, line) {
Ox.Theme(pandora.user.ui.theme); Ox.Theme(pandora.user.ui.theme);
localStorage.theme = pandora.user.ui.theme; localStorage.theme = pandora.user.ui.theme;
pandora.$ui.appPanel = pandora.ui.appPanel().display(); pandora.$ui.appPanel = pandora.ui.appPanel().display();
Ox.Request.requests() && pandora.$ui.loadingIcon.start(); Ox.Request.requests() && pandora.$ui.loadingIcon.start();
pandora.$ui.body.ajaxStart(pandora.$ui.loadingIcon.start); pandora.$ui.body.ajaxStart(pandora.$ui.loadingIcon.start);
pandora.$ui.body.ajaxStop(pandora.$ui.loadingIcon.stop); pandora.$ui.body.ajaxStop(pandora.$ui.loadingIcon.stop);
@ -278,7 +278,7 @@ window.onerror = function(error, url, line) {
pandora.site.sectionButtonsWidth = pandora.$ui.sectionButtons.width() + 8; pandora.site.sectionButtonsWidth = pandora.$ui.sectionButtons.width() + 8;
}); });
} }
function loadBrowserMessage() { function loadBrowserMessage() {
@ -345,14 +345,13 @@ window.onerror = function(error, url, line) {
.css({width: '32px', height: '32px', margin: '4px'}) .css({width: '32px', height: '32px', margin: '4px'})
) )
.appendTo($images); .appendTo($images);
}); });
$('<div>') $('<div>')
.css({ .css({
textAlign: 'center' textAlign: 'center'
}) })
.html(html) .html(html)
.appendTo($message); .appendTo($message);
}); });
function loadImages(images, callback) { function loadImages(images, callback) {

View file

@ -166,7 +166,7 @@ pandora.Query = (function() {
}).length; }).length;
// indices of non-advanced find queries // indices of non-advanced find queries
indices = Ox.map(pandora.site.findKeys, function(findKey) { indices = Ox.map(pandora.site.findKeys, function(findKey) {
var key = findKey.id == 'all' ? '' : findKey.id, var key = findKey.id == 'all' ? '' : findKey.id,
index = oneCondition(ret.query.conditions, key, ''); index = oneCondition(ret.query.conditions, key, '');
return index > -1 ? index : null; return index > -1 ? index : null;
}); });
@ -178,7 +178,7 @@ pandora.Query = (function() {
index: indices[0], index: indices[0],
key: ret.query.conditions[indices[0]].key, key: ret.query.conditions[indices[0]].key,
value: decodeURIComponent(ret.query.conditions[indices[0]].value) value: decodeURIComponent(ret.query.conditions[indices[0]].value)
} : {index: -1, key: 'advanced', value: ''} } : {index: -1, key: 'advanced', value: ''}
} }
} }
} }
@ -287,7 +287,6 @@ pandora.Query = (function() {
find: constructFind(pandora.user.ui.query), find: constructFind(pandora.user.ui.query),
sort: (operator == pandora.getSortOperator(key) ? '' : operator) + key sort: (operator == pandora.getSortOperator(key) ? '' : operator) + key
}); });
} else { } else {
return pandora.user.ui.item + '/' + pandora.user.ui.itemView; return pandora.user.ui.item + '/' + pandora.user.ui.itemView;
} }

View file

@ -18,7 +18,7 @@ pandora.UI = (function() {
pandora.user.ui = pandora.site.user.ui; pandora.user.ui = pandora.site.user.ui;
pandora.user.ui._list = pandora.getListsState(pandora.user.ui.find); pandora.user.ui._list = pandora.getListsState(pandora.user.ui.find);
pandora.user.ui._groupsState = pandora.getGroupsState(pandora.user.ui.find); pandora.user.ui._groupsState = pandora.getGroupsState(pandora.user.ui.find);
pandora.user.ui._findState = pandora.getFindState(pandora.user.ui.find); pandora.user.ui._findState = pandora.getFindState(pandora.user.ui.find);
}; };
// sets pandora.user.ui.key to val // sets pandora.user.ui.key to val

View file

@ -124,7 +124,6 @@ pandora.URL = (function() {
pandora.user.ui._list = pandora.getListsState(pandora.user.ui.find); pandora.user.ui._list = pandora.getListsState(pandora.user.ui.find);
pandora.user.ui._groupsState = pandora.getGroupsState(pandora.user.ui.find); pandora.user.ui._groupsState = pandora.getGroupsState(pandora.user.ui.find);
pandora.user.ui._findState = pandora.getFindState(pandora.user.ui.find); pandora.user.ui._findState = pandora.getFindState(pandora.user.ui.find);
} else { } else {
/* /*
pandora.UI.set({ pandora.UI.set({
@ -166,7 +165,7 @@ pandora.URL = (function() {
callback && callback(); callback && callback();
} else { } else {
var set = { var set = {
section: state.type == pandora.site.itemsSection ? 'items' : state.type, section: state.type == pandora.site.itemsSection ? 'items' : state.type,
item: state.item, item: state.item,
@ -243,7 +242,7 @@ pandora.URL = (function() {
} }
pandora.user.ui.showHome = false; pandora.user.ui.showHome = false;
} }
that.init = function() { that.init = function() {
@ -417,7 +416,7 @@ pandora.URL = (function() {
} else { } else {
action = 'push'; action = 'push';
} }
self.URL[action](getState(), pandora.getPageTitle(), getState(/*keys*/)); self.URL[action](getState(), pandora.getPageTitle(), getState(/*keys*/));
} }
}; };

View file

@ -271,7 +271,7 @@ pandora.ui.accountForm = function(action, value) {
labelWidth: 120, labelWidth: 120,
validate: pandora.validateUser('username', true), validate: pandora.validateUser('username', true),
width: 320 width: 320
}); });
} else if (type == 'usernameOrEmail') { } else if (type == 'usernameOrEmail') {
return Ox.FormElementGroup({ return Ox.FormElementGroup({
id: 'usernameOrEmail', id: 'usernameOrEmail',
@ -310,7 +310,7 @@ pandora.ui.accountForm = function(action, value) {
}); });
} }
} }
return that; return that;
}; };
pandora.ui.accountSignoutDialog = function() { pandora.ui.accountSignoutDialog = function() {

View file

@ -115,7 +115,7 @@ pandora.ui.browser = function() {
}, },
select: function(data) { select: function(data) {
pandora.UI.set({ pandora.UI.set({
'item': data.ids[0] 'item': data.ids[0]
}); });
}, },
toggle: function(data) { toggle: function(data) {

View file

@ -190,7 +190,7 @@ pandora.ui.clipList = function(videoRatio) {
} }
}, },
pandora_itemsort: function(data) { pandora_itemsort: function(data) {
that.options({sort: data.value}); that.options({sort: data.value});
}, },
pandora_listsort: function(data) { pandora_listsort: function(data) {
that.options({sort: data.value}); that.options({sort: data.value});

View file

@ -39,7 +39,7 @@ pandora.ui.clipPlayer = function() {
pandora.api.get({id: id, keys: ['durations']}, function(result) { pandora.api.get({id: id, keys: ['durations']}, function(result) {
//Ox.print('API get item', id, 'result', result.data); //Ox.print('API get item', id, 'result', result.data);
var points = [item['in'], item.out], var points = [item['in'], item.out],
partsAndPoints = pandora.getVideoPartsAndPoints(result.data.durations, points); partsAndPoints = pandora.getVideoPartsAndPoints(result.data.durations, points);
data[i] = { data[i] = {
parts: partsAndPoints.parts.map(function(i) { parts: partsAndPoints.parts.map(function(i) {
var part = (i + 1), var part = (i + 1),

View file

@ -59,7 +59,7 @@ pandora.ui.eventsDialog = function() {
$content; $content;
pandora.api.findEvents({ pandora.api.findEvents({
query: {conditions: [], operator: '&'} query: {conditions: [], operator: '&'}
}, function(result) { }, function(result) {
pandora.api.findEvents({ pandora.api.findEvents({
query: {conditions: [], operator: '&'}, query: {conditions: [], operator: '&'},

View file

@ -125,7 +125,7 @@ pandora.ui.filesView = function(options, self) {
{ {
align: 'right', align: 'right',
format: {type: 'value', args: ['B']}, format: {type: 'value', args: ['B']},
id: 'size', id: 'size',
operator: '-', operator: '-',
title: 'Size', title: 'Size',
visible: true, visible: true,

View file

@ -46,7 +46,6 @@ pandora.ui.filter = function(list) {
pandora.$ui.groups.forEach(function($group) { pandora.$ui.groups.forEach(function($group) {
$group.reloadList(); $group.reloadList();
}); });
}); });
} else { } else {
pandora.UI.set({find: data.query}); pandora.UI.set({find: data.query});

View file

@ -139,7 +139,7 @@ pandora.ui.findElement = function() {
callback(result.data.items); callback(result.data.items);
}); });
} else { } else {
callback([]); callback([]);
} }
} : null; } : null;
} }

View file

@ -240,7 +240,7 @@ pandora.ui.folderList = function(id) {
min: 0, min: 0,
pageLength: 1000, pageLength: 1000,
//selected: pandora.getListData().folder == id ? [pandora.user.ui._list] : [], //selected: pandora.getListData().folder == id ? [pandora.user.ui._list] : [],
sort: [{key: 'position', operator: '+'}], sort: [{key: 'position', operator: '+'}],
sortable: id != 'featured' || pandora.user.level == 'admin' sortable: id != 'featured' || pandora.user.level == 'admin'
}) })
.css({ .css({
@ -296,7 +296,6 @@ pandora.ui.folderList = function(id) {
//var $list = pandora.$ui.folderList[id]; //var $list = pandora.$ui.folderList[id];
if (data.key == 'user') { if (data.key == 'user') {
pandora.$ui.listDialog = pandora.ui.listDialog('icon').open(); pandora.$ui.listDialog = pandora.ui.listDialog('icon').open();
} else if (data.key == 'type') { } else if (data.key == 'type') {
if (that.value(data.id, 'type') == 'smart') { if (that.value(data.id, 'type') == 'smart') {
pandora.$ui.listDialog = pandora.ui.listDialog('query').open(); pandora.$ui.listDialog = pandora.ui.listDialog('query').open();

View file

@ -32,5 +32,4 @@ pandora.ui.helpDialog = function() {
content.html('Help is coming soon...') content.html('Help is coming soon...')
}); });
return that; return that;
}; };

View file

@ -157,7 +157,7 @@ pandora.ui.home = function() {
pandora.URL.push('/signup'); pandora.URL.push('/signup');
that.fadeOutScreen(); that.fadeOutScreen();
} }
}), }),
$signinButton = Ox.Button({ $signinButton = Ox.Button({
title: 'Sign In', title: 'Sign In',
width: 74 width: 74
@ -176,7 +176,7 @@ pandora.ui.home = function() {
pandora.URL.push('/signin'); pandora.URL.push('/signin');
that.fadeOutScreen(); that.fadeOutScreen();
} }
}), }),
$preferencesButton = Ox.Button({ $preferencesButton = Ox.Button({
title: 'Preferences', title: 'Preferences',
width: 156 width: 156
@ -195,7 +195,7 @@ pandora.ui.home = function() {
pandora.URL.push('/preferences'); pandora.URL.push('/preferences');
that.fadeOutScreen(); that.fadeOutScreen();
} }
}), }),
$aboutButton = Ox.Button({ $aboutButton = Ox.Button({
title: 'About ' + pandora.site.site.name, title: 'About ' + pandora.site.site.name,
width: 156 width: 156
@ -228,7 +228,7 @@ pandora.ui.home = function() {
height: '16px', height: '16px',
margin: 'auto', margin: 'auto',
opacity: 0, opacity: 0,
textAlign: 'center' textAlign: 'center'
}) })
.appendTo(that); .appendTo(that);
@ -276,5 +276,5 @@ pandora.ui.home = function() {
}; };
return that; return that;
}; };

View file

@ -1,6 +1,6 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript // vim: et:ts=4:sw=4:sts=4:ft=javascript
pandora.ui.info = function() { pandora.ui.info = function() {
var ui = pandora.user.ui, var ui = pandora.user.ui,
view = getView(), view = getView(),
@ -63,7 +63,7 @@ pandora.ui.info = function() {
function updateInfo() { function updateInfo() {
var id = getId(), var id = getId(),
previousView = view; previousView = view;
view = getView(); view = getView();
if (view == 'list') { if (view == 'list') {
that.empty().append(pandora.$ui.listInfo = pandora.ui.listInfo()); that.empty().append(pandora.$ui.listInfo = pandora.ui.listInfo());
previousView == 'video' && resizeInfo(); previousView == 'video' && resizeInfo();

View file

@ -141,7 +141,7 @@ pandora.ui.infoView = function(data) {
format: function(value) { format: function(value) {
return formatTitle(value); return formatTitle(value);
}, },
tooltip: isEditable ? 'Doubleclick to edit' : '', tooltip: isEditable ? 'Doubleclick to edit' : '',
value: data.title value: data.title
}) })
.css({ .css({
@ -411,7 +411,7 @@ pandora.ui.infoView = function(data) {
) )
.appendTo($text); .appendTo($text);
}); });
$('<div>').css({height: '16px'}).appendTo($text); $('<div>').css({height: '16px'}).appendTo($text);
// Hue, Saturation, Lightness, Volume -------------------------------------- // Hue, Saturation, Lightness, Volume --------------------------------------
@ -469,7 +469,7 @@ pandora.ui.infoView = function(data) {
}) })
) )
.appendTo($statistics); .appendTo($statistics);
} }
$('<div>').css({height: '16px'}).appendTo($statistics); $('<div>').css({height: '16px'}).appendTo($statistics);
@ -738,7 +738,6 @@ pandora.ui.infoView = function(data) {
}) })
.appendTo($info); .appendTo($info);
}); });
} }
function renderRightsLevel() { function renderRightsLevel() {
@ -794,7 +793,7 @@ pandora.ui.infoView = function(data) {
left: margin + iconLeft + 'px', left: margin + iconLeft + 'px',
width: iconWidth + 'px', width: iconWidth + 'px',
height: iconHeight + 'px', height: iconHeight + 'px',
borderRadius: borderRadius + 'px' borderRadius: borderRadius + 'px'
}, 250); }, 250);
$reflection.animate({ $reflection.animate({
top: margin + iconHeight + 'px', top: margin + iconHeight + 'px',

View file

@ -98,7 +98,7 @@ pandora.ui.item = function() {
labelWidth: 100, labelWidth: 100,
value: result.data[key.id], value: result.data[key.id],
type: 'text', type: 'text',
width: 500 width: 500
}); });
}), }),
separators: [ separators: [
@ -126,7 +126,7 @@ pandora.ui.item = function() {
pandora.api.edit(Ox.extend(changed, {id: pandora.user.ui.item}), function(result) { pandora.api.edit(Ox.extend(changed, {id: pandora.user.ui.item}), function(result) {
//fixme just reload parts that need reloading //fixme just reload parts that need reloading
window.location.reload(); window.location.reload();
}); });
} }
} }
})); }));
@ -280,7 +280,6 @@ pandora.ui.item = function() {
//fixme: check that edit was successfull //fixme: check that edit was successfull
pandora.api.editAnnotation(data, function(result) { pandora.api.editAnnotation(data, function(result) {
Ox.print('done updateAnnotation', result); Ox.print('done updateAnnotation', result);
}); });
}, },
pandora_showannotations: function(data) { pandora_showannotations: function(data) {

View file

@ -115,7 +115,7 @@ pandora.ui.list = function() {
pandora.UI.set({listColumns: data.ids}); pandora.UI.set({listColumns: data.ids});
/* /*
data.ids.forEach(function(id) { data.ids.forEach(function(id) {
columnWidth[id] = columnWidth[id] =
pandora.user.ui.lists[pandora.user.ui.list].columnWidth[id] pandora.user.ui.lists[pandora.user.ui.list].columnWidth[id]
|| Ox.getObjectById(pandora.site.sortKeys, id).width || Ox.getObjectById(pandora.site.sortKeys, id).width
}); });
@ -515,7 +515,7 @@ pandora.ui.list = function() {
pandora.$ui.mainMenu.enableItem('openmovie'); pandora.$ui.mainMenu.enableItem('openmovie');
} else { } else {
pandora.$ui.mainMenu.disableItem('copy'); pandora.$ui.mainMenu.disableItem('copy');
pandora.$ui.mainMenu.disableItem('openmovie'); pandora.$ui.mainMenu.disableItem('openmovie');
} }
pandora.$ui.leftPanel.replaceElement(2, pandora.$ui.info = pandora.ui.info()); pandora.$ui.leftPanel.replaceElement(2, pandora.$ui.info = pandora.ui.info());
pandora.api.find({ pandora.api.find({
@ -540,7 +540,7 @@ pandora.ui.list = function() {
that.options({sort: data.value}); that.options({sort: data.value});
} }
}); });
} }
if (['grid', 'timelines'].indexOf(pandora.user.ui.listView) > -1) { if (['grid', 'timelines'].indexOf(pandora.user.ui.listView) > -1) {

View file

@ -34,7 +34,7 @@ pandora.ui.mainPanel = function() {
} }
if (!Ox.isEqual(data.find, previousUI._groupsState[i].find)) { if (!Ox.isEqual(data.find, previousUI._groupsState[i].find)) {
pandora.$ui.groups[i].reloadList(); pandora.$ui.groups[i].reloadList();
} }
}); });
} else { } else {
that.replaceElement(1, pandora.$ui.rightPanel = pandora.ui.rightPanel()); that.replaceElement(1, pandora.$ui.rightPanel = pandora.ui.rightPanel());

View file

@ -98,7 +98,7 @@ pandora.ui.mediaView = function() {
function renderPreview() { function renderPreview() {
var previewWidth = pandora.$ui.document.width() - pandora.$ui.mainPanel.size(0) - 1 - listWidth, var previewWidth = pandora.$ui.document.width() - pandora.$ui.mainPanel.size(0) - 1 - listWidth,
previewHeight = pandora.$ui.contentPanel.size(1), previewHeight = pandora.$ui.contentPanel.size(1),
previewRatio = previewWidth / previewHeight, previewRatio = previewWidth / previewHeight,
imageRatio = selectedImage.width / selectedImage.height, imageRatio = selectedImage.width / selectedImage.height,
imageWidth = imageRatio > previewRatio ? previewWidth : Math.round(previewHeight * imageRatio), imageWidth = imageRatio > previewRatio ? previewWidth : Math.round(previewHeight * imageRatio),
imageHeight = imageRatio < previewRatio ? previewHeight : Math.round(previewWidth / imageRatio), imageHeight = imageRatio < previewRatio ? previewHeight : Math.round(previewWidth / imageRatio),

View file

@ -190,7 +190,7 @@ pandora.ui.mainMenu = function() {
sort: [{key: key, operator: operator}] sort: [{key: key, operator: operator}]
}); });
groups[position].sort[0].key = key; groups[position].sort[0].key = key;
pandora.UI.set({groups: groups}); pandora.UI.set({groups: groups});
} else if (data.id == 'sortmovies') { } else if (data.id == 'sortmovies') {
pandora.UI.set({listSort: [{key: value, operator: ''}]}); pandora.UI.set({listSort: [{key: value, operator: ''}]});
} else if (data.id == 'viewicons') { } else if (data.id == 'viewicons') {

View file

@ -29,7 +29,7 @@ pandora.ui.namesDialog = function() {
query: query query: query
}), callback); }), callback);
} }
}); });
} }
}), }),
@ -116,7 +116,7 @@ pandora.ui.namesDialog = function() {
}) })
} }
}), }),
that = Ox.Dialog({ that = Ox.Dialog({
buttons: [ buttons: [
Ox.Button({ Ox.Button({

View file

@ -182,7 +182,7 @@ pandora.ui.navigationView = function(type, videoRatio) {
); );
// needed for resize handlers further up // needed for resize handlers further up
pandora.$ui.map = $element; pandora.$ui.map = $element;
} else { } else {
pandora.api.findEvents({ pandora.api.findEvents({
@ -214,7 +214,7 @@ pandora.ui.navigationView = function(type, videoRatio) {
); );
// needed for resize handlers further up // needed for resize handlers further up
pandora.$ui.calendar = $element; pandora.$ui.calendar = $element;
}); });
} }

View file

@ -140,5 +140,5 @@ pandora.ui.preferencesDialog = function() {
}); });
return $dialog; return $dialog;
}; };

View file

@ -90,5 +90,5 @@ pandora.ui.siteDialog = function(section) {
}); });
return $dialog; return $dialog;
}; };

View file

@ -6,7 +6,6 @@ pandora.ui.status = function(key, data) {
if (!pandora.user.ui.item && pandora.user.ui.listView == 'clip') { if (!pandora.user.ui.item && pandora.user.ui.listView == 'clip') {
itemName = data.items != 1 ? 'Clips' : 'Clip'; itemName = data.items != 1 ? 'Clips' : 'Clip';
} }
segments.push(Ox.formatNumber(data.items) + ' '+ itemName); segments.push(Ox.formatNumber(data.items) + ' '+ itemName);
if (data.runtime) if (data.runtime)
segments.push(Ox.formatDuration(data.runtime, 'short')); segments.push(Ox.formatDuration(data.runtime, 'short'));

View file

@ -27,7 +27,7 @@ pandora.ui.titlesDialog = function() {
query: query query: query
}), callback); }), callback);
} }
}); });
} }
}), }),

View file

@ -11,7 +11,7 @@ pandora.ui.toolbar = function() {
pandora.$ui.backButton = pandora.ui.backButton() pandora.$ui.backButton = pandora.ui.backButton()
); );
that.append( that.append(
pandora.$ui.viewSelect = pandora.ui.viewSelect() pandora.$ui.viewSelect = pandora.ui.viewSelect()
); );
if (!ui.item || pandora.isClipView()) { if (!ui.item || pandora.isClipView()) {
that.append( that.append(
@ -38,7 +38,7 @@ pandora.ui.toolbar = function() {
// fixme: maybe there's a better method name for this? // fixme: maybe there's a better method name for this?
pandora.api.updateExternalData({ pandora.api.updateExternalData({
id: ui.item id: ui.item
}, function(result) { }, function(result) {
Ox.Request.clearCache(item); Ox.Request.clearCache(item);
if (ui.item == item && ui.itemView == 'info') { if (ui.item == item && ui.itemView == 'info') {
pandora.$ui.contentPanel.replaceElement( pandora.$ui.contentPanel.replaceElement(

View file

@ -210,7 +210,7 @@ pandora.ui.usersDialog = function() {
$status.html( $status.html(
Ox.formatNumber(numberOfUsers) Ox.formatNumber(numberOfUsers)
+ ' user' + (numberOfUsers == 1 ? '' : 's') + ' user' + (numberOfUsers == 1 ? '' : 's')
+ ' (' + Ox.formatNumber(numberOfUsers) + ' registered, 0 guests)' + ' (' + Ox.formatNumber(numberOfUsers) + ' registered, 0 guests)'
); );
}, },
select: function(data) { select: function(data) {
@ -305,7 +305,7 @@ pandora.ui.usersDialog = function() {
} }
], ],
orientation: 'vertical' orientation: 'vertical'
}) })
}, },
{ {
element: Ox.SplitPanel({ element: Ox.SplitPanel({
@ -432,7 +432,7 @@ pandora.ui.usersDialog = function() {
} else { } else {
data[event.id] = event.data.value; data[event.id] = event.data.value;
} }
$list.value(userData.id, event.id, data[event.id]); $list.value(userData.id, event.id, data[event.id]);
pandora.api.editUser(data, function(result) { pandora.api.editUser(data, function(result) {
Ox.Request.clearCache('findUsers'); Ox.Request.clearCache('findUsers');
}); });
@ -454,7 +454,7 @@ pandora.ui.usersDialog = function() {
query: query query: query
}), callback); }), callback);
} }
}); });
} }
return that; return that;

View file

@ -87,7 +87,7 @@ pandora.addList = function() {
var posterFrames = result.data.items.map(function(item) { var posterFrames = result.data.items.map(function(item) {
return {item: item.id, position: item.posterFrame}; return {item: item.id, position: item.posterFrame};
}); });
posterFrames = posterFrames.length == 1 posterFrames = posterFrames.length == 1
? Ox.repeat([posterFrames[0]], 4) ? Ox.repeat([posterFrames[0]], 4)
: posterFrames.length == 2 : posterFrames.length == 2
? [posterFrames[0], posterFrames[1], posterFrames[1], posterFrames[0]] ? [posterFrames[0], posterFrames[1], posterFrames[1], posterFrames[0]]
@ -128,7 +128,7 @@ pandora.addList = function() {
conditions: [{key: 'list', value: newList, operator: '=='}], conditions: [{key: 'list', value: newList, operator: '=='}],
operator: '&' operator: '&'
} }
}); });
} }
}).reloadList(); }).reloadList();
} }
@ -340,7 +340,7 @@ pandora.enableDragAndDrop = function($list, canMove) {
drag.item == 1 ? 'singular' : 'plural' drag.item == 1 ? 'singular' : 'plural'
].toLowerCase() ].toLowerCase()
) + '</br> to ' + ( ) + '</br> to ' + (
drag.target && !drag.target.selected drag.target && !drag.target.selected
? 'the list "' + drag.target.name + '"' ? 'the list "' + drag.target.name + '"'
: 'another list' : 'another list'
); );
@ -489,7 +489,7 @@ pandora.getInfoHeight = function(includeHidden) {
); );
return (pandora.user.ui.showInfo || includeHidden) * Math.min( return (pandora.user.ui.showInfo || includeHidden) * Math.min(
isVideoPreview isVideoPreview
? Math.round(pandora.user.ui.sidebarSize / (16/9)) + 16 ? Math.round(pandora.user.ui.sidebarSize / (16/9)) + 16
: pandora.user.ui.sidebarSize, : pandora.user.ui.sidebarSize,
window.innerHeight - 109 // 20 menu + 24 bar + 64 (4 closed folders) + 1 resizebar window.innerHeight - 109 // 20 menu + 24 bar + 64 (4 closed folders) + 1 resizebar
); );
@ -616,7 +616,7 @@ pandora.getMetadataByIdOrName = function(item, view, str, callback) {
pandora.getPageTitle = function(itemTitle) { pandora.getPageTitle = function(itemTitle) {
Ox.print('ITEM TITLES', itemTitles) Ox.print('ITEM TITLES', itemTitles)
if (itemTitle) { if (itemTitle) {
itemTitles[pandora.user.ui.item] = itemTitle itemTitles[pandora.user.ui.item] = itemTitle
} }
var parts = [pandora.site.site.name]; var parts = [pandora.site.site.name];
if (!pandora.user.ui.item) { if (!pandora.user.ui.item) {
@ -760,7 +760,7 @@ pandora.resizeFolders = function() {
.resizeColumn('name', columnWidth.name); .resizeColumn('name', columnWidth.name);
} else { } else {
$list.resizeColumn(id == 'favorite' ? 'id' : 'name', width - 96); $list.resizeColumn(id == 'favorite' ? 'id' : 'name', width - 96);
} }
} }
if (!pandora.user.ui.showFolder[pandora.user.ui.section][id]) { if (!pandora.user.ui.showFolder[pandora.user.ui.section][id]) {
pandora.$ui.folder[pos].update(); pandora.$ui.folder[pos].update();

View file

@ -47,7 +47,7 @@ pandora.ui.viewSelect = function() {
pandora_itemview: function(data) { pandora_itemview: function(data) {
that.selectItem(data.value); that.selectItem(data.value);
} }
}); });
return that; return that;
}; };