trailing comma removal,

This commit is contained in:
j 2012-05-26 15:46:24 +00:00
parent 9ed863c6a6
commit 6946ce333d
30 changed files with 44 additions and 46 deletions

View file

@ -20,10 +20,9 @@ appPanel
*/ */
(function() { (function() {
window.onerror = function(error, url, line) { window.onerror = function(error, url, line) {
try { try {
pandora.api.log({ !isMSIE && pandora.api.log({
text: error, text: error,
url: url, url: url,
line: line line: line
@ -210,7 +209,6 @@ appPanel
function initPandora(data) { function initPandora(data) {
Ox.Log('', 'Ox.App load', data); Ox.Log('', 'Ox.App load', data);
Ox.extend(pandora, { Ox.extend(pandora, {
$ui: { $ui: {
body: $('body'), body: $('body'),

View file

@ -62,7 +62,7 @@ pandora.validateNewEmail = function(value, callback) {
}) : callback({ }) : callback({
message: value.length ? 'Invalid e-mail address' : '', message: value.length ? 'Invalid e-mail address' : '',
// message: (!value.length ? 'Missing' : 'Invalid') + ' e-mail address', // message: (!value.length ? 'Missing' : 'Invalid') + ' e-mail address',
valid: false, valid: false
}); });
}; };

View file

@ -61,7 +61,7 @@ pandora.ui.contactForm = function() {
value: '', value: '',
width: width width: width
}) })
], ]
}) })
.css({width: width + 'px'}) .css({width: width + 'px'})
.bindEvent({ .bindEvent({

View file

@ -84,7 +84,7 @@ pandora.ui.editor = function(data) {
modified: created, modified: created,
out: data.out, out: data.out,
user: pandora.user.username, user: pandora.user.username,
value: '', value: ''
}, },
type == 'place' ? { type == 'place' ? {
place: {lat: null, lng: null} place: {lat: null, lng: null}

View file

@ -233,7 +233,7 @@ pandora.ui.filesView = function(options, self) {
self.numberOfItems = data.items; self.numberOfItems = data.items;
}, },
open: openFiles, open: openFiles,
select: selectFiles, select: selectFiles
}); });
self.$instancesList = Ox.TextList({ self.$instancesList = Ox.TextList({

View file

@ -238,7 +238,7 @@ pandora.ui.filtersInnerPanel = function() {
size: pandora.user.ui.filterSizes[1] size: pandora.user.ui.filterSizes[1]
}, },
{ {
element: pandora.$ui.filters[2], element: pandora.$ui.filters[2]
}, },
{ {
element: pandora.$ui.filters[3], element: pandora.$ui.filters[3],

View file

@ -34,12 +34,12 @@ pandora.ui.findElement = function() {
}).map(function(key) { }).map(function(key) {
return { return {
id: key.id, id: key.id,
title: 'Find: ' + key.title, title: 'Find: ' + key.title
}; };
}), }),
[{}, { [{}, {
id: 'advanced', id: 'advanced',
title: 'Find: Advanced', title: 'Find: Advanced'
}] }]
), ),
overlap: 'right', overlap: 'right',

View file

@ -37,7 +37,7 @@ pandora.ui.folderBrowserBar = function(id) {
updateList(key, value); updateList(key, value);
} }
}) })
], ]
}) })
.css({ .css({
float: 'right', float: 'right',

View file

@ -156,7 +156,7 @@ pandora.ui.folderBrowserList = function(id) {
} else if (data.key == 'subscribed') { } else if (data.key == 'subscribed') {
var subscribed = that.value(data.id, 'subscribed'); var subscribed = that.value(data.id, 'subscribed');
pandora.api[subscribed ? 'unsubscribeFromList' : 'subscribeToList']({ pandora.api[subscribed ? 'unsubscribeFromList' : 'subscribeToList']({
id: data.id, id: data.id
}, function(result) { }, function(result) {
that.value(data.id, 'subscribed', !subscribed); that.value(data.id, 'subscribed', !subscribed);
}); });
@ -208,4 +208,4 @@ pandora.ui.folderBrowserList = function(id) {
} }
}); });
return that; return that;
}; };

View file

@ -254,7 +254,7 @@ pandora.ui.folderList = function(id) {
.css({ .css({
left: 0, left: 0,
top: 0, top: 0,
width: pandora.user.ui.sidebarWidth + 'px', width: pandora.user.ui.sidebarWidth + 'px'
}) })
.bindEvent({ .bindEvent({
add: function(event) { add: function(event) {

View file

@ -6,7 +6,7 @@ pandora.ui.folders = function() {
that = Ox.Element() that = Ox.Element()
.css({overflowX: 'hidden', overflowY: 'auto'}) .css({overflowX: 'hidden', overflowY: 'auto'})
.bindEvent({ .bindEvent({
resize: pandora.resizeFolders, resize: pandora.resizeFolders
}); });
//var $sections = []; //var $sections = [];

View file

@ -39,7 +39,7 @@ pandora.ui.home = function() {
bottom: 0, bottom: 0,
width: '320px', width: '320px',
height: '160px', height: '160px',
margin: 'auto', margin: 'auto'
}) })
.appendTo(that), .appendTo(that),
$logo = $('<img>') $logo = $('<img>')

View file

@ -56,7 +56,7 @@ pandora.ui.homePage = function() {
} }
}); });
$findElement = Ox.FormElementGroup({ $findElement = Ox.FormElementGroup({
elements: [$select, $input], elements: [$select, $input]
}) })
.css({marginTop: '16px'}) .css({marginTop: '16px'})
.appendTo($center); .appendTo($center);

View file

@ -28,7 +28,7 @@ pandora.ui.importAnnotations = function(data) {
importButton = Ox.Button({ importButton = Ox.Button({
disabled: true, disabled: true,
id: 'import', id: 'import',
title: 'Import', title: 'Import'
}).bindEvent({ }).bindEvent({
click: function() { click: function() {
importButton.hide(); importButton.hide();
@ -46,7 +46,7 @@ pandora.ui.importAnnotations = function(data) {
height: height, height: height,
removeOnClose: true, removeOnClose: true,
width: width, width: width,
title: 'Import Annotations', title: 'Import Annotations'
}) })
.bindEvent({ .bindEvent({
close: function(data) { close: function(data) {
@ -95,7 +95,7 @@ pandora.ui.importAnnotations = function(data) {
selectLayer = Ox.Select({ selectLayer = Ox.Select({
items: layers, items: layers,
value: layer, value: layer,
label: 'Layer', label: 'Layer'
}) })
.bindEvent({ .bindEvent({
change: function(data) { change: function(data) {

View file

@ -279,7 +279,7 @@ pandora.ui.listInfo = function() {
return { return {
width: size + 'px', width: size + 'px',
height: size + 'px', height: size + 'px',
borderRadius: Math.round(size / 4) + 'px', borderRadius: Math.round(size / 4) + 'px'
}; };
} }
that.resizeInfo = function() { that.resizeInfo = function() {

View file

@ -35,7 +35,7 @@ pandora.ui.infoView = function(data) {
position: 'absolute', position: 'absolute',
left: canEdit && !ui.showIconBrowser ? -listWidth + 'px' : 0, left: canEdit && !ui.showIconBrowser ? -listWidth + 'px' : 0,
top: 0, top: 0,
right: 0, right: 0
}) })
.appendTo(that.$element), .appendTo(that.$element),
@ -121,7 +121,7 @@ pandora.ui.infoView = function(data) {
position: 'absolute', position: 'absolute',
left: margin + (iconSize == 256 ? 256 : iconWidth) + margin + 'px', left: margin + (iconSize == 256 ? 256 : iconWidth) + margin + 'px',
top: margin + 'px', top: margin + 'px',
right: margin + statisticsWidth + margin + 'px', right: margin + statisticsWidth + margin + 'px'
}) })
.bindEvent(canEdit && !isEditable ? { .bindEvent(canEdit && !isEditable ? {
doubleclick: reloadMetadata doubleclick: reloadMetadata
@ -849,7 +849,7 @@ pandora.ui.infoView = function(data) {
height: iconSize / 2 + 'px' height: iconSize / 2 + 'px'
}, 250); }, 250);
$text.animate({ $text.animate({
left: margin + (iconSize == 256 ? 256 : iconWidth) + margin + 'px', left: margin + (iconSize == 256 ? 256 : iconWidth) + margin + 'px'
}, 250); }, 250);
pandora.UI.set({infoIconSize: iconSize}); pandora.UI.set({infoIconSize: iconSize});
} }

View file

@ -45,7 +45,7 @@ pandora.ui.itemClips = function(options) {
title: annotations.map(function(annotation) { title: annotations.map(function(annotation) {
return Ox.stripTags(annotation.value.replace(/\n/g, ' ')); return Ox.stripTags(annotation.value.replace(/\n/g, ' '));
}).join('; '), }).join('; '),
url: url, url: url
}) })
.addClass('OxInfoIcon') .addClass('OxInfoIcon')
.css({ .css({
@ -55,7 +55,7 @@ pandora.ui.itemClips = function(options) {
: '2px' : '2px'
}) })
.data(Ox.extend(annotations.length ? { .data(Ox.extend(annotations.length ? {
annotation: annotations[0].id.split('/')[1], annotation: annotations[0].id.split('/')[1]
} : {}, {'in': clip['in'], out: clip.out})); } : {}, {'in': clip['in'], out: clip.out}));
$item.find('.OxTarget').addClass('OxSpecialTarget'); $item.find('.OxTarget').addClass('OxSpecialTarget');
that.append($item); that.append($item);

View file

@ -486,7 +486,7 @@ pandora.ui.list = function() {
} else { } else {
pandora.$ui.previewDialog.options({ pandora.$ui.previewDialog.options({
content: pandora.$ui.previewImage, content: pandora.$ui.previewImage,
title: title, title: title
}) })
.setSize(width, height); .setSize(width, height);
} }

View file

@ -75,7 +75,7 @@ pandora.ui.listDialog = function(section) {
); );
} }
}) })
], ]
}) })
.css({ .css({
float: 'right', float: 'right',

View file

@ -57,7 +57,7 @@ pandora.ui.logsDialog = function() {
id: 'id', id: 'id',
title: 'ID', title: 'ID',
unique: true, unique: true,
visible: false, visible: false
}, },
{ {
format: function(value) { format: function(value) {
@ -207,7 +207,7 @@ pandora.ui.logsDialog = function() {
bottom: '4px', bottom: '4px',
paddingTop: '2px', paddingTop: '2px',
fontSize: '9px', fontSize: '9px',
textAlign: 'center', textAlign: 'center'
}) })
.appendTo(that.find('.OxButtonsbar')); .appendTo(that.find('.OxButtonsbar'));

View file

@ -116,7 +116,7 @@ pandora.ui.mediaView = function() {
left: imageLeft + 'px', left: imageLeft + 'px',
top: imageTop + 'px', top: imageTop + 'px',
width: imageWidth + 'px', width: imageWidth + 'px',
height: imageHeight + 'px', height: imageHeight + 'px'
}) })
); );
if (view == 'frames') { if (view == 'frames') {
@ -157,4 +157,4 @@ pandora.ui.mediaView = function() {
return that; return that;
} }

View file

@ -55,7 +55,7 @@ pandora.ui.mainMenu = function() {
{ id: 'items', title: 'View ' + pandora.site.itemName.plural, items: [ { id: 'items', title: 'View ' + pandora.site.itemName.plural, items: [
{ group: 'listview', min: 1, max: 1, items: pandora.site.listViews.map(function(view) { { group: 'listview', min: 1, max: 1, items: pandora.site.listViews.map(function(view) {
return Ox.extend({ return Ox.extend({
checked: ui.listView == view.id, checked: ui.listView == view.id
}, view); }, view);
}) }, }) },
]}, ]},
@ -83,7 +83,7 @@ pandora.ui.mainMenu = function() {
{ id: 'item', title: ['Open ' + pandora.site.itemName.singular, 'Open ' + pandora.site.itemName.plural], items: [ { id: 'item', title: ['Open ' + pandora.site.itemName.singular, 'Open ' + pandora.site.itemName.plural], items: [
{ group: 'itemview', min: 1, max: 1, items: pandora.site.itemViews.map(function(view) { { group: 'itemview', min: 1, max: 1, items: pandora.site.itemViews.map(function(view) {
return Ox.extend({ return Ox.extend({
checked: ui.itemView == view.id, checked: ui.itemView == view.id
}, view); }, view);
}) }, }) },
] }, ] },

View file

@ -103,7 +103,7 @@ pandora.ui.namesDialog = function() {
$findButton = Ox.Button({ $findButton = Ox.Button({
disabled: true, disabled: true,
title: 'Find', title: 'Find',
width: 48, width: 48
}).bindEvent({ }).bindEvent({
click: function() { click: function() {
that.close(); that.close();
@ -176,7 +176,7 @@ pandora.ui.namesDialog = function() {
bottom: '4px', bottom: '4px',
paddingTop: '2px', paddingTop: '2px',
fontSize: '9px', fontSize: '9px',
textAlign: 'center', textAlign: 'center'
}) })
.appendTo(that.find('.OxButtonsbar')); .appendTo(that.find('.OxButtonsbar'));

View file

@ -89,7 +89,7 @@ pandora.ui.navigationView = function(type, videoRatio) {
that = Ox.SplitPanel({ that = Ox.SplitPanel({
elements: [ elements: [
{ {
element: $element, element: $element
}, },
{ {
element: $listPanel, element: $listPanel,
@ -214,7 +214,7 @@ pandora.ui.navigationView = function(type, videoRatio) {
query: { query: {
conditions: [{key: itemName, value: id, operator:'=='}], conditions: [{key: itemName, value: id, operator:'=='}],
operator: '&' operator: '&'
}, }
}, data), callback); }, data), callback);
} }
}); });

View file

@ -115,7 +115,7 @@ pandora.ui.news = function(width, height) {
tooltip: isEditable ? 'Doubleclick to edit' : '', tooltip: isEditable ? 'Doubleclick to edit' : '',
type: 'textarea', type: 'textarea',
value: items[index].text, value: items[index].text,
width: width - 512, width: width - 512
}) })
.css({ .css({
MozUserSelect: 'text', MozUserSelect: 'text',

View file

@ -76,7 +76,7 @@ pandora.ui.siteDialog = function(section) {
Ox.Theme.formatColor(330 + 30 * i, 'gradient') Ox.Theme.formatColor(330 + 30 * i, 'gradient')
.css({ .css({
padding: '4px', padding: '4px',
marginTop: '8px', marginTop: '8px'
}) })
.html( .html(
'<b>' + name + '</b><br/><div style="padding-top: 2px; font-size: 9px; opacity: 0.75">' '<b>' + name + '</b><br/><div style="padding-top: 2px; font-size: 9px; opacity: 0.75">'

View file

@ -38,7 +38,7 @@ pandora.ui.titlesDialog = function() {
id: 'id', id: 'id',
title: 'ID', title: 'ID',
unique: true, unique: true,
visible: false, visible: false
}, },
{ {
id: 'title', id: 'title',
@ -92,7 +92,7 @@ pandora.ui.titlesDialog = function() {
$findButton = Ox.Button({ $findButton = Ox.Button({
disabled: true, disabled: true,
title: 'Find', title: 'Find',
width: 48, width: 48
}).bindEvent({ }).bindEvent({
click: function() { click: function() {
that.close(); that.close();
@ -165,7 +165,7 @@ pandora.ui.titlesDialog = function() {
bottom: '4px', bottom: '4px',
paddingTop: '2px', paddingTop: '2px',
fontSize: '9px', fontSize: '9px',
textAlign: 'center', textAlign: 'center'
}) })
.appendTo(that.find('.OxButtonsbar')); .appendTo(that.find('.OxButtonsbar'));

View file

@ -63,7 +63,7 @@ pandora.ui.tv = function() {
controlsTooltips: { controlsTooltips: {
open: 'Open in ' + Ox.getObjectById( open: 'Open in ' + Ox.getObjectById(
pandora.site.itemViews, pandora.user.ui.videoView pandora.site.itemViews, pandora.user.ui.videoView
).title + ' View', ).title + ' View'
}, },
controlsTop: ['close', 'title', 'open'], controlsTop: ['close', 'title', 'open'],
duration: result.data.duration, duration: result.data.duration,

View file

@ -47,7 +47,7 @@ pandora.ui.uploadDialog = function(data) {
height: 128, height: 128,
removeOnClose: true, removeOnClose: true,
width: 368, width: 368,
title: 'Upload Video', title: 'Upload Video'
}) })
.bindEvent({ .bindEvent({
close: function(data) { close: function(data) {

View file

@ -99,7 +99,7 @@ pandora.ui.usersDialog = function() {
id: 'id', id: 'id',
title: 'ID', title: 'ID',
unique: true, unique: true,
visible: false, visible: false
}, },
{ {
format: function(value, data) { format: function(value, data) {