dont use new Ox.

This commit is contained in:
j 2011-06-19 19:49:25 +02:00
parent 0b8b0a6b20
commit 06bea0b116
32 changed files with 140 additions and 140 deletions

View file

@ -3,7 +3,7 @@
Ox.FilesView = function(options, self) { Ox.FilesView = function(options, self) {
var self = self || {}, var self = self || {},
that = new Ox.Element({}, self) that = Ox.Element({}, self)
.defaults({ .defaults({
id: '' id: ''
}) })
@ -11,11 +11,11 @@ Ox.FilesView = function(options, self) {
self.selected = []; self.selected = [];
self.$toolbar = new Ox.Bar({ self.$toolbar = Ox.Bar({
size: 24 size: 24
}); });
self.$orderButton = new Ox.Button({ self.$orderButton = Ox.Button({
title: 'Change Order of Users...' title: 'Change Order of Users...'
}) })
.css({ .css({
@ -24,7 +24,7 @@ Ox.FilesView = function(options, self) {
}) })
.appendTo(self.$toolbar); .appendTo(self.$toolbar);
self.$moveButton = new Ox.Button({ self.$moveButton = Ox.Button({
disabled: 'true', disabled: 'true',
title: 'Move Selected Files...' title: 'Move Selected Files...'
}) })
@ -34,7 +34,7 @@ Ox.FilesView = function(options, self) {
}) })
.appendTo(self.$toolbar); .appendTo(self.$toolbar);
self.$filesList = new Ox.TextList({ self.$filesList = Ox.TextList({
columns: [ columns: [
{ {
align: 'left', align: 'left',

View file

@ -1,7 +1,7 @@
// vim: et:ts=4:sw=4:sts=4:ft=js // vim: et:ts=4:sw=4:sts=4:ft=js
pandora.ui.accountDialog = function(action) { pandora.ui.accountDialog = function(action) {
var that = new Ox.Dialog($.extend({ var that = Ox.Dialog($.extend({
height: 256, height: 256,
id: 'accountDialog', id: 'accountDialog',
minHeight: 256, minHeight: 256,
@ -48,14 +48,14 @@ pandora.ui.accountDialogOptions = function(action, value) {
}; };
function button(type) { function button(type) {
if (type == 'cancel') { if (type == 'cancel') {
return new Ox.Button({ return Ox.Button({
id: 'cancel' + Ox.toTitleCase(action), id: 'cancel' + Ox.toTitleCase(action),
title: 'Cancel' title: 'Cancel'
}).bindEvent('click', function() { }).bindEvent('click', function() {
pandora.$ui.accountDialog.close(); pandora.$ui.accountDialog.close();
}); });
} else if (type == 'submit') { } else if (type == 'submit') {
return new Ox.Button({ return Ox.Button({
disabled: true, disabled: true,
id: 'submit' + Ox.toTitleCase(action), id: 'submit' + Ox.toTitleCase(action),
title: buttonTitle[action] title: buttonTitle[action]
@ -63,7 +63,7 @@ pandora.ui.accountDialogOptions = function(action, value) {
pandora.$ui.accountForm.submit(); pandora.$ui.accountForm.submit();
}); });
} else { } else {
return new Ox.Button({ return Ox.Button({
id: type, id: type,
title: buttonTitle[type] + '...' title: buttonTitle[type] + '...'
}).bindEvent('click', function() { }).bindEvent('click', function() {
@ -79,9 +79,9 @@ pandora.ui.accountDialogOptions = function(action, value) {
}), }),
[button('cancel'), button('submit')] [button('cancel'), button('submit')]
], ],
content: new Ox.Element() content: Ox.Element()
.append( .append(
new Ox.Element() Ox.Element()
.addClass('OxText') .addClass('OxText')
.html(dialogText[action] + '<br/><br/>') .html(dialogText[action] + '<br/><br/>')
) )
@ -118,7 +118,7 @@ pandora.ui.accountForm = function(action, value) {
$items = $.map(items[action], function(v) { $items = $.map(items[action], function(v) {
return item(v, value); return item(v, value);
}), }),
that = new Ox.Form({ that = Ox.Form({
id: 'accountForm' + Ox.toTitleCase(action), id: 'accountForm' + Ox.toTitleCase(action),
items: $items, items: $items,
submit: function(data, callback) { submit: function(data, callback) {
@ -178,7 +178,7 @@ pandora.ui.accountForm = function(action, value) {
that.items = $items; that.items = $items;
function item(type, value) { function item(type, value) {
if (type == 'code') { if (type == 'code') {
return new Ox.Input({ return Ox.Input({
autovalidate: autovalidateCode, autovalidate: autovalidateCode,
id: 'code', id: 'code',
label: 'Code', label: 'Code',
@ -192,7 +192,7 @@ pandora.ui.accountForm = function(action, value) {
width: 352 width: 352
}); });
} else if (type == 'email') { } else if (type == 'email') {
return new Ox.Input({ return Ox.Input({
autovalidate: autovalidateEmail, autovalidate: autovalidateEmail,
id: 'email', id: 'email',
label: 'E-Mail Address', label: 'E-Mail Address',
@ -202,7 +202,7 @@ pandora.ui.accountForm = function(action, value) {
width: 352 width: 352
}); });
} else if (type == 'newPassword') { } else if (type == 'newPassword') {
return new Ox.Input({ return Ox.Input({
autovalidate: /.+/, autovalidate: /.+/,
id: 'password', id: 'password',
label: 'New Password', label: 'New Password',
@ -217,7 +217,7 @@ pandora.ui.accountForm = function(action, value) {
width: 352 width: 352
}); });
} else if (type == 'newUsername') { } else if (type == 'newUsername') {
return new Ox.Input({ return Ox.Input({
autovalidate: pandora.autovalidateUsername, autovalidate: pandora.autovalidateUsername,
id: 'username', id: 'username',
label: 'Username', label: 'Username',
@ -226,7 +226,7 @@ pandora.ui.accountForm = function(action, value) {
width: 352 width: 352
}); });
} else if (type == 'oldUsername') { } else if (type == 'oldUsername') {
return new Ox.Input({ return Ox.Input({
disabled: true, disabled: true,
id: 'username', id: 'username',
label: 'Username', label: 'Username',
@ -235,7 +235,7 @@ pandora.ui.accountForm = function(action, value) {
width: 352 width: 352
}); });
} else if (type == 'password') { } else if (type == 'password') {
return new Ox.Input({ return Ox.Input({
autovalidate: /.+/, autovalidate: /.+/,
id: 'password', id: 'password',
label: 'Password', label: 'Password',
@ -250,7 +250,7 @@ pandora.ui.accountForm = function(action, value) {
width: 352 width: 352
}); });
} else if (type == 'username') { } else if (type == 'username') {
return new Ox.Input({ return Ox.Input({
autovalidate: pandora.autovalidateUsername, autovalidate: pandora.autovalidateUsername,
id: 'username', id: 'username',
label: 'Username', label: 'Username',
@ -259,10 +259,10 @@ pandora.ui.accountForm = function(action, value) {
width: 352 width: 352
}); });
} else if (type == 'usernameOrEmail') { } else if (type == 'usernameOrEmail') {
return new Ox.FormElementGroup({ return Ox.FormElementGroup({
id: 'usernameOrEmail', id: 'usernameOrEmail',
elements: [ elements: [
pandora.$ui.usernameOrEmailSelect = new Ox.Select({ pandora.$ui.usernameOrEmailSelect = Ox.Select({
id: 'usernameOrEmailSelect', id: 'usernameOrEmailSelect',
items: [ items: [
{id: 'username', title: 'Username'}, {id: 'username', title: 'Username'},
@ -281,7 +281,7 @@ pandora.ui.accountForm = function(action, value) {
}).focus(); }).focus();
} }
}), }),
pandora.$ui.usernameOrEmailInput = new Ox.Input({ pandora.$ui.usernameOrEmailInput = Ox.Input({
autovalidate: pandora.autovalidateUsername, autovalidate: pandora.autovalidateUsername,
id: 'usernameOrEmailInput', id: 'usernameOrEmailInput',
validate: pandora.validateUser('username', true), validate: pandora.validateUser('username', true),
@ -298,16 +298,16 @@ pandora.ui.accountForm = function(action, value) {
}; };
pandora.ui.accountLogoutDialog = function() { pandora.ui.accountLogoutDialog = function() {
var that = new Ox.Dialog({ var that = Ox.Dialog({
buttons: [ buttons: [
new Ox.Button({ Ox.Button({
id: 'cancel', id: 'cancel',
title: 'Cancel' title: 'Cancel'
}).bindEvent('click', function() { }).bindEvent('click', function() {
that.close(); that.close();
pandora.$ui.mainMenu.getItem('loginlogout').toggleTitle(); pandora.$ui.mainMenu.getItem('loginlogout').toggleTitle();
}), }),
new Ox.Button({ Ox.Button({
id: 'logout', id: 'logout',
title: 'Logout' title: 'Logout'
}).bindEvent('click', function() { }).bindEvent('click', function() {
@ -317,7 +317,7 @@ pandora.ui.accountLogoutDialog = function() {
}); });
}) })
], ],
content: new Ox.Element().html('Are you sure you want to logout?'), content: Ox.Element().html('Are you sure you want to logout?'),
height: 160, height: 160,
keys: {enter: 'logout', escape: 'cancel'}, keys: {enter: 'logout', escape: 'cancel'},
title: 'Logout', title: 'Logout',
@ -326,10 +326,10 @@ pandora.ui.accountLogoutDialog = function() {
return that; return that;
}; };
pandora.ui.accountWelcomeDialog = function() { pandora.ui.accountWelcomeDialog = function() {
var that = new Ox.Dialog({ var that = Ox.Dialog({
buttons: [ buttons: [
[ [
new Ox.Button({ Ox.Button({
id: 'preferences', id: 'preferences',
title: 'Preferences...' title: 'Preferences...'
}).bindEvent('click', function() { }).bindEvent('click', function() {
@ -337,7 +337,7 @@ pandora.ui.accountWelcomeDialog = function() {
}) })
], ],
[ [
new Ox.Button({ Ox.Button({
id: 'close', id: 'close',
title: 'Close' title: 'Close'
}).bindEvent('click', function() { }).bindEvent('click', function() {
@ -345,7 +345,7 @@ pandora.ui.accountWelcomeDialog = function() {
}) })
] ]
], ],
content: new Ox.Element().html('Welcome, ' + pandora.user.username + '!<br/><br/>Your account has been created.'), content: Ox.Element().html('Welcome, ' + pandora.user.username + '!<br/><br/>Your account has been created.'),
height: 160, height: 160,
keys: {enter: 'close', escape: 'close'}, keys: {enter: 'close', escape: 'close'},
title: 'Welcome to ' + pandora.site.site.name, title: 'Welcome to ' + pandora.site.site.name,

View file

@ -1,6 +1,6 @@
// vim: et:ts=4:sw=4:sts=4:ft=js // vim: et:ts=4:sw=4:sts=4:ft=js
pandora.ui.appPanel = function() { pandora.ui.appPanel = function() {
var that = new Ox.SplitPanel({ var that = Ox.SplitPanel({
elements: [ elements: [
{ {
element: pandora.$ui.mainMenu = pandora.ui.mainMenu(), element: pandora.$ui.mainMenu = pandora.ui.mainMenu(),

View file

@ -3,7 +3,7 @@ pandora.ui.browser = function() {
var that; var that;
if (!pandora.user.ui.item) { if (!pandora.user.ui.item) {
pandora.$ui.groups = pandora.ui.groups(); pandora.$ui.groups = pandora.ui.groups();
that = new Ox.SplitPanel({ that = Ox.SplitPanel({
elements: [ elements: [
{ {
element: pandora.$ui.groups[0], element: pandora.$ui.groups[0],
@ -36,7 +36,7 @@ pandora.ui.browser = function() {
} }
}); });
} else { } else {
var that = new Ox.IconList({ var that = Ox.IconList({
centered: true, centered: true,
id: 'list', id: 'list',
item: function(data, sort, size) { item: function(data, sort, size) {

View file

@ -1,6 +1,6 @@
// vim: et:ts=4:sw=4:sts=4:ft=js // vim: et:ts=4:sw=4:sts=4:ft=js
pandora.ui.contentPanel = function() { pandora.ui.contentPanel = function() {
var that = new Ox.SplitPanel({ var that = Ox.SplitPanel({
elements: pandora.user.ui.item == '' ? [ elements: pandora.user.ui.item == '' ? [
{ {
collapsed: !pandora.user.ui.showGroups, collapsed: !pandora.user.ui.showGroups,

View file

@ -1,6 +1,6 @@
// vim: et:ts=4:sw=4:sts=4:ft=js // vim: et:ts=4:sw=4:sts=4:ft=js
pandora.ui.annotations = function() { pandora.ui.annotations = function() {
var that = new Ox.Element({ var that = Ox.Element({
id: 'annotations' id: 'annotations'
}) })
.bindEvent({ .bindEvent({
@ -16,7 +16,7 @@ pandora.ui.annotations = function() {
}), }),
$bins = []; $bins = [];
$.each(pandora.site.layers, function(i, layer) { $.each(pandora.site.layers, function(i, layer) {
var $bin = new Ox.CollapsePanel({ var $bin = Ox.CollapsePanel({
id: layer.id, id: layer.id,
size: 16, size: 16,
title: layer.title title: layer.title

View file

@ -1,6 +1,6 @@
// vim: et:ts=4:sw=4:sts=4:ft=js // vim: et:ts=4:sw=4:sts=4:ft=js
pandora.ui.filter = function() { pandora.ui.filter = function() {
var that = new Ox.Filter({ var that = Ox.Filter({
findKeys: Ox.map(pandora.site.itemKeys, function(key) { findKeys: Ox.map(pandora.site.itemKeys, function(key) {
return key.id == 'all' ? null : { return key.id == 'all' ? null : {
autocomplete: key.autocomplete, autocomplete: key.autocomplete,

View file

@ -1,8 +1,8 @@
// vim: et:ts=4:sw=4:sts=4:ft=js // vim: et:ts=4:sw=4:sts=4:ft=js
pandora.ui.filterDialog = function() { pandora.ui.filterDialog = function() {
var that = new Ox.Dialog({ var that = Ox.Dialog({
buttons: [ buttons: [
new Ox.Button({ Ox.Button({
id: 'debug', id: 'debug',
title: 'Debug', title: 'Debug',
}) })
@ -11,7 +11,7 @@ pandora.ui.filterDialog = function() {
alert(JSON.stringify(pandora.$ui.filter.options('query'))); alert(JSON.stringify(pandora.$ui.filter.options('query')));
} }
}), }),
new Ox.Button({ Ox.Button({
id: 'cancel', id: 'cancel',
title: 'Cancel' title: 'Cancel'
}) })
@ -20,7 +20,7 @@ pandora.ui.filterDialog = function() {
pandora.$ui.filterDialog.close(); pandora.$ui.filterDialog.close();
} }
}), }),
new Ox.Button({ Ox.Button({
id: 'save', id: 'save',
title: 'Save' title: 'Save'
}) })

View file

@ -6,9 +6,9 @@ pandora.ui.findElement = function() {
findKey = pandora.user.ui.findQuery.conditions[0].key; findKey = pandora.user.ui.findQuery.conditions[0].key;
findValue = pandora.user.ui.findQuery.conditions[0].value; findValue = pandora.user.ui.findQuery.conditions[0].value;
} }
var that = new Ox.FormElementGroup({ var that = Ox.FormElementGroup({
elements: $.merge(pandora.user.ui.list ? [ elements: $.merge(pandora.user.ui.list ? [
pandora.$ui.findListSelect = new Ox.Select({ pandora.$ui.findListSelect = Ox.Select({
items: [ items: [
{id: 'all', title: 'Find: All ' + pandora.site.itemName.plural}, {id: 'all', title: 'Find: All ' + pandora.site.itemName.plural},
{id: 'list', title: 'Find: This List'} {id: 'list', title: 'Find: This List'}
@ -25,7 +25,7 @@ pandora.ui.findElement = function() {
} }
}), }),
] : [], [ ] : [], [
pandora.$ui.findSelect = new Ox.Select({ pandora.$ui.findSelect = Ox.Select({
id: 'select', id: 'select',
items: $.merge($.map(pandora.site.findKeys, items: $.merge($.map(pandora.site.findKeys,
function(key, i) { function(key, i) {
@ -59,7 +59,7 @@ pandora.ui.findElement = function() {
} }
} }
}), }),
pandora.$ui.findInput = new Ox.Input({ pandora.$ui.findInput = Ox.Input({
autocomplete: autocompleteFunction(), autocomplete: autocompleteFunction(),
autocompleteSelect: true, autocompleteSelect: true,
autocompleteSelectHighlight: true, autocompleteSelectHighlight: true,

View file

@ -1,6 +1,6 @@
// vim: et:ts=4:sw=4:sts=4:ft=js // vim: et:ts=4:sw=4:sts=4:ft=js
pandora.ui.flipbook = function(item) { pandora.ui.flipbook = function(item) {
var that = new Ox.Flipbook({ var that = Ox.Flipbook({
}).bindEvent('click', function(event, data) { }).bindEvent('click', function(event, data) {
pandora.UI.set('videoPosition|' + item, data.position); pandora.UI.set('videoPosition|' + item, data.position);
pandora.URL.set(item + '/timeline'); pandora.URL.set(item + '/timeline');

View file

@ -1,6 +1,6 @@
// vim: et:ts=4:sw=4:sts=4:ft=js // vim: et:ts=4:sw=4:sts=4:ft=js
pandora.ui.folderBrowser = function(id) { pandora.ui.folderBrowser = function(id) {
var that = new Ox.SplitPanel({ var that = Ox.SplitPanel({
elements: [ elements: [
{ {
element: pandora.ui.folderBrowserBar(), element: pandora.ui.folderBrowserBar(),

View file

@ -1,9 +1,9 @@
// vim: et:ts=4:sw=4:sts=4:ft=js // vim: et:ts=4:sw=4:sts=4:ft=js
pandora.ui.folderBrowserBar = function(id) { pandora.ui.folderBrowserBar = function(id) {
var that = new Ox.Bar({ var that = Ox.Bar({
size: 24 size: 24
}); });
pandora.$ui.findListInput = new Ox.Input({ pandora.$ui.findListInput = Ox.Input({
placeholder: 'Find User', placeholder: 'Find User',
width: 184 - Ox.UI.SCROLLBAR_SIZE width: 184 - Ox.UI.SCROLLBAR_SIZE
}) })

View file

@ -2,7 +2,7 @@
pandora.ui.folderBrowserList = function(id) { pandora.ui.folderBrowserList = function(id) {
var columnWidth = (pandora.user.ui.sidebarSize - Ox.UI.SCROLLBAR_SIZE - 88) / 2, var columnWidth = (pandora.user.ui.sidebarSize - Ox.UI.SCROLLBAR_SIZE - 88) / 2,
i = Ox.getPositionById(pandora.site.sectionFolders[pandora.user.ui.section], id), i = Ox.getPositionById(pandora.site.sectionFolders[pandora.user.ui.section], id),
that = new Ox.TextList({ that = Ox.TextList({
columns: [ columns: [
{ {
format: function() { format: function() {
@ -193,7 +193,7 @@ pandora.ui.folderList = function(id) {
var i = Ox.getPositionById(pandora.site.sectionFolders[pandora.user.ui.section], id), var i = Ox.getPositionById(pandora.site.sectionFolders[pandora.user.ui.section], id),
that; that;
if (pandora.user.ui.section == 'site') { if (pandora.user.ui.section == 'site') {
that = new Ox.TextList({ that = Ox.TextList({
columns: [ columns: [
{ {
format: function() { format: function() {
@ -238,7 +238,7 @@ pandora.ui.folderList = function(id) {
}, },
}); });
} else if (pandora.user.ui.section == 'items') { } else if (pandora.user.ui.section == 'items') {
that = new Ox.TextList({ that = Ox.TextList({
columns: [ columns: [
{ {
format: function() { format: function() {
@ -464,7 +464,7 @@ pandora.ui.folderList = function(id) {
}; };
pandora.ui.folders = function() { pandora.ui.folders = function() {
var that = new Ox.Element() var that = Ox.Element()
.css({overflowX: 'hidden', overflowY: 'auto'}) .css({overflowX: 'hidden', overflowY: 'auto'})
.bindEvent({ .bindEvent({
resize: function(event, data) { resize: function(event, data) {
@ -479,7 +479,7 @@ pandora.ui.folders = function() {
if (pandora.user.ui.section == 'site') { if (pandora.user.ui.section == 'site') {
$.each(pandora.site.sectionFolders.site, function(i, folder) { $.each(pandora.site.sectionFolders.site, function(i, folder) {
var height = (Ox.getObjectById(pandora.site.sectionFolders.site, folder.id).items.length * 16); var height = (Ox.getObjectById(pandora.site.sectionFolders.site, folder.id).items.length * 16);
pandora.$ui.folder[i] = new Ox.CollapsePanel({ pandora.$ui.folder[i] = Ox.CollapsePanel({
id: folder.id, id: folder.id,
collapsed: !pandora.user.ui.showFolder.site[folder.id], collapsed: !pandora.user.ui.showFolder.site[folder.id],
size: 16, size: 16,
@ -509,7 +509,7 @@ pandora.ui.folders = function() {
$.each(pandora.site.sectionFolders.items, function(i, folder) { $.each(pandora.site.sectionFolders.items, function(i, folder) {
var extras = []; var extras = [];
if (folder.id == 'personal' && pandora.user.level != 'guest') { if (folder.id == 'personal' && pandora.user.level != 'guest') {
extras = [new Ox.Select({ extras = [Ox.Select({
items: [ items: [
{ id: 'new', title: 'New List...' }, { id: 'new', title: 'New List...' },
{ id: 'newfromselection', title: 'New List from Current Selection...', disabled: true }, { id: 'newfromselection', title: 'New List from Current Selection...', disabled: true },
@ -549,7 +549,7 @@ pandora.ui.folders = function() {
} }
})]; })];
} else if (folder.id == 'favorite' && pandora.user.level != 'guest') { } else if (folder.id == 'favorite' && pandora.user.level != 'guest') {
extras = [new Ox.Button({ extras = [Ox.Button({
selectable: true, selectable: true,
style: 'symbol', style: 'symbol',
title: 'Edit', title: 'Edit',
@ -573,7 +573,7 @@ pandora.ui.folders = function() {
} }
})]; })];
} else if (folder.id == 'featured' && pandora.user.level == 'admin') { } else if (folder.id == 'featured' && pandora.user.level == 'admin') {
extras = [new Ox.Button({ extras = [Ox.Button({
selectable: true, selectable: true,
style: 'symbol', style: 'symbol',
title: 'Edit', title: 'Edit',
@ -596,7 +596,7 @@ pandora.ui.folders = function() {
} }
})]; })];
} }
pandora.$ui.folder[i] = new Ox.CollapsePanel({ pandora.$ui.folder[i] = Ox.CollapsePanel({
id: folder.id, id: folder.id,
collapsed: !pandora.user.ui.showFolder.items[folder.id], collapsed: !pandora.user.ui.showFolder.items[folder.id],
extras: extras, extras: extras,

View file

@ -1,6 +1,6 @@
// vim: et:ts=4:sw=4:sts=4:ft=js // vim: et:ts=4:sw=4:sts=4:ft=js
pandora.ui.folders = function() { pandora.ui.folders = function() {
var that = new Ox.Element() var that = Ox.Element()
.css({overflowX: 'hidden', overflowY: 'auto'}) .css({overflowX: 'hidden', overflowY: 'auto'})
.bindEvent({ .bindEvent({
resize: function(event, data) { resize: function(event, data) {
@ -15,7 +15,7 @@ pandora.ui.folders = function() {
if (pandora.user.ui.section == 'site') { if (pandora.user.ui.section == 'site') {
$.each(pandora.site.sectionFolders.site, function(i, folder) { $.each(pandora.site.sectionFolders.site, function(i, folder) {
var height = (Ox.getObjectById(pandora.site.sectionFolders.site, folder.id).items.length * 16); var height = (Ox.getObjectById(pandora.site.sectionFolders.site, folder.id).items.length * 16);
pandora.$ui.folder[i] = new Ox.CollapsePanel({ pandora.$ui.folder[i] = Ox.CollapsePanel({
id: folder.id, id: folder.id,
collapsed: !pandora.user.ui.showFolder.site[folder.id], collapsed: !pandora.user.ui.showFolder.site[folder.id],
size: 16, size: 16,
@ -45,7 +45,7 @@ pandora.ui.folders = function() {
$.each(pandora.site.sectionFolders.items, function(i, folder) { $.each(pandora.site.sectionFolders.items, function(i, folder) {
var extras = []; var extras = [];
if (folder.id == 'personal' && pandora.user.level != 'guest') { if (folder.id == 'personal' && pandora.user.level != 'guest') {
extras = [new Ox.Select({ extras = [Ox.Select({
items: [ items: [
{ id: 'new', title: 'New List...' }, { id: 'new', title: 'New List...' },
{ id: 'newfromselection', title: 'New List from Current Selection...', disabled: true }, { id: 'newfromselection', title: 'New List from Current Selection...', disabled: true },
@ -85,7 +85,7 @@ pandora.ui.folders = function() {
} }
})]; })];
} else if (folder.id == 'favorite' && pandora.user.level != 'guest') { } else if (folder.id == 'favorite' && pandora.user.level != 'guest') {
extras = [new Ox.Button({ extras = [Ox.Button({
selectable: true, selectable: true,
style: 'symbol', style: 'symbol',
title: 'Edit', title: 'Edit',
@ -109,7 +109,7 @@ pandora.ui.folders = function() {
} }
})]; })];
} else if (folder.id == 'featured' && pandora.user.level == 'admin') { } else if (folder.id == 'featured' && pandora.user.level == 'admin') {
extras = [new Ox.Button({ extras = [Ox.Button({
selectable: true, selectable: true,
style: 'symbol', style: 'symbol',
title: 'Edit', title: 'Edit',
@ -132,7 +132,7 @@ pandora.ui.folders = function() {
} }
})]; })];
} }
pandora.$ui.folder[i] = new Ox.CollapsePanel({ pandora.$ui.folder[i] = Ox.CollapsePanel({
id: folder.id, id: folder.id,
collapsed: !pandora.user.ui.showFolder.items[folder.id], collapsed: !pandora.user.ui.showFolder.items[folder.id],
extras: extras, extras: extras,

View file

@ -3,7 +3,7 @@ pandora.ui.folderList = function(id) {
var i = Ox.getPositionById(pandora.site.sectionFolders[pandora.user.ui.section], id), var i = Ox.getPositionById(pandora.site.sectionFolders[pandora.user.ui.section], id),
that; that;
if (pandora.user.ui.section == 'site') { if (pandora.user.ui.section == 'site') {
that = new Ox.TextList({ that = Ox.TextList({
columns: [ columns: [
{ {
format: function() { format: function() {
@ -48,7 +48,7 @@ pandora.ui.folderList = function(id) {
}, },
}); });
} else if (pandora.user.ui.section == 'items') { } else if (pandora.user.ui.section == 'items') {
that = new Ox.TextList({ that = Ox.TextList({
columns: [ columns: [
{ {
format: function() { format: function() {

View file

@ -11,7 +11,7 @@ pandora.ui.group = function(id, query) {
panelWidth = pandora.$ui.document.width() - (pandora.user.ui.showSidebar * pandora.user.ui.sidebarSize) - 1, panelWidth = pandora.$ui.document.width() - (pandora.user.ui.showSidebar * pandora.user.ui.sidebarSize) - 1,
title = Ox.getObjectById(pandora.site.groups, id).title, title = Ox.getObjectById(pandora.site.groups, id).title,
width = pandora.getGroupWidth(i, panelWidth), width = pandora.getGroupWidth(i, panelWidth),
that = new Ox.TextList({ that = Ox.TextList({
columns: [ columns: [
{ {
align: 'left', align: 'left',
@ -70,7 +70,7 @@ pandora.ui.group = function(id, query) {
pandora.reloadGroups(i); pandora.reloadGroups(i);
} }
}); });
new Ox.Select({ Ox.Select({
items: $.map(pandora.site.groups, function(v) { items: $.map(pandora.site.groups, function(v) {
return { return {
checked: v.id == id, checked: v.id == id,
@ -149,7 +149,7 @@ pandora.ui.groups = function() {
}; };
pandora.ui.groupsInnerPanel = function() { pandora.ui.groupsInnerPanel = function() {
var that = new Ox.SplitPanel({ var that = Ox.SplitPanel({
elements: [ elements: [
{ {
element: pandora.$ui.groups[1], element: pandora.$ui.groups[1],

View file

@ -1,8 +1,8 @@
// vim: et:ts=4:sw=4:sts=4:ft=js // vim: et:ts=4:sw=4:sts=4:ft=js
pandora.ui.info = function() { pandora.ui.info = function() {
var that = new Ox.Element() var that = Ox.Element()
.append( .append(
pandora.$ui.infoStill = new Ox.Element() pandora.$ui.infoStill = Ox.Element()
.css({ .css({
position: 'absolute', position: 'absolute',
left: 0, left: 0,
@ -11,7 +11,7 @@ pandora.ui.info = function() {
}) })
) )
.append( .append(
pandora.$ui.infoTimeline = new Ox.Element('<img>') pandora.$ui.infoTimeline = Ox.Element('<img>')
.css({ .css({
position: 'absolute', position: 'absolute',
left: 0, left: 0,

View file

@ -1,6 +1,6 @@
// vim: et:ts=4:sw=4:sts=4:ft=js // vim: et:ts=4:sw=4:sts=4:ft=js
pandora.ui.item = function() { pandora.ui.item = function() {
var that = new Ox.Element(); var that = Ox.Element();
pandora.api.getItem(pandora.user.ui.item, function(result) { pandora.api.getItem(pandora.user.ui.item, function(result) {
if (result.status.code != 200) { if (result.status.code != 200) {
pandora.$ui.contentPanel.replaceElement(1, pandora.$ui.contentPanel.replaceElement(1,
@ -9,7 +9,7 @@ pandora.ui.item = function() {
} else if (pandora.user.ui.itemView == 'calendar') { } else if (pandora.user.ui.itemView == 'calendar') {
pandora.$ui.contentPanel.replaceElement(1, Ox.Element().html('Calendar')); pandora.$ui.contentPanel.replaceElement(1, Ox.Element().html('Calendar'));
} else if (pandora.user.ui.itemView == 'clips') { } else if (pandora.user.ui.itemView == 'clips') {
pandora.$ui.contentPanel.replaceElement(1, new Ox.IconList({ pandora.$ui.contentPanel.replaceElement(1, Ox.IconList({
item: function(data, sort, size) { item: function(data, sort, size) {
size = size || 128; size = size || 128;
var ratio = result.data.stream.aspectRatio, var ratio = result.data.stream.aspectRatio,
@ -45,10 +45,10 @@ pandora.ui.item = function() {
//Ox.print('result.data', result.data) //Ox.print('result.data', result.data)
if (pandora.user.level == 'admin') { if (pandora.user.level == 'admin') {
var $form, var $form,
$edit = new Ox.Element() $edit = Ox.Element()
.append($form = new Ox.FormElementGroup({ .append($form = Ox.FormElementGroup({
elements: Ox.map(pandora.site.itemKeys, function(key) { elements: Ox.map(pandora.site.itemKeys, function(key) {
return new Ox.Input({ return Ox.Input({
id: key.id, id: key.id,
label: key.title, label: key.title,
labelWidth: 100, labelWidth: 100,
@ -61,7 +61,7 @@ pandora.ui.item = function() {
{title: '', width: 0} {title: '', width: 0}
] ]
})) }))
.append(new Ox.Button({ .append(Ox.Button({
title: 'Save', title: 'Save',
type: 'text' type: 'text'
}).bindEvent({ }).bindEvent({
@ -90,14 +90,14 @@ pandora.ui.item = function() {
$.get('/static/html/itemInfo.html', {}, function(template) { $.get('/static/html/itemInfo.html', {}, function(template) {
//Ox.print(template); //Ox.print(template);
pandora.$ui.contentPanel.replaceElement(1, pandora.$ui.contentPanel.replaceElement(1,
pandora.$ui.item = new Ox.Element() pandora.$ui.item = Ox.Element()
.append($.tmpl(template, result.data)) .append($.tmpl(template, result.data))
); );
}); });
} }
} else if (pandora.user.ui.itemView == 'map') { } else if (pandora.user.ui.itemView == 'map') {
pandora.$ui.contentPanel.replaceElement(1, new Ox.SplitPanel({ pandora.$ui.contentPanel.replaceElement(1, Ox.SplitPanel({
elements: [ elements: [
{ {
element: pandora.$ui.map = Ox.Map({ element: pandora.$ui.map = Ox.Map({
@ -120,7 +120,7 @@ pandora.ui.item = function() {
}) })
}, },
{ {
element: new Ox.Element(), element: Ox.Element(),
id: 'place', id: 'place',
size: 144 + Ox.UI.SCROLLBAR_SIZE size: 144 + Ox.UI.SCROLLBAR_SIZE
} }
@ -136,7 +136,7 @@ pandora.ui.item = function() {
video.height = video.profiles[0]; video.height = video.profiles[0];
video.width = parseInt(video.height * video.aspectRatio / 2) * 2; video.width = parseInt(video.height * video.aspectRatio / 2) * 2;
video.url = video.baseUrl + '/' + video.height + 'p.' + format; video.url = video.baseUrl + '/' + video.height + 'p.' + format;
pandora.$ui.contentPanel.replaceElement(1, pandora.$ui.player = new Ox.VideoPanelPlayer({ pandora.$ui.contentPanel.replaceElement(1, pandora.$ui.player = Ox.VideoPanelPlayer({
annotationsSize: pandora.user.ui.annotationsSize, annotationsSize: pandora.user.ui.annotationsSize,
duration: video.duration, duration: video.duration,
height: pandora.$ui.contentPanel.size(1), height: pandora.$ui.contentPanel.size(1),
@ -183,7 +183,7 @@ pandora.ui.item = function() {
$.each(pandora.site.layers, function(i, layer) { $.each(pandora.site.layers, function(i, layer) {
layers[i] = $.extend({}, layer, {items: result.data.layers[layer.id]}); layers[i] = $.extend({}, layer, {items: result.data.layers[layer.id]});
}); });
pandora.$ui.contentPanel.replaceElement(1, pandora.$ui.editor = new Ox.VideoEditor({ pandora.$ui.contentPanel.replaceElement(1, pandora.$ui.editor = Ox.VideoEditor({
annotationsSize: pandora.user.ui.annotationsSize, annotationsSize: pandora.user.ui.annotationsSize,
cuts: cuts, cuts: cuts,
duration: video.duration, duration: video.duration,
@ -263,7 +263,7 @@ pandora.ui.item = function() {
*/ */
} else if (pandora.user.ui.itemView == 'files') { } else if (pandora.user.ui.itemView == 'files') {
pandora.$ui.contentPanel.replaceElement(1, pandora.$ui.contentPanel.replaceElement(1,
pandora.$ui.item = new Ox.FilesView({ pandora.$ui.item = Ox.FilesView({
id: result.data.id id: result.data.id
}) })
); );

View file

@ -1,6 +1,6 @@
// vim: et:ts=4:sw=4:sts=4:ft=js // vim: et:ts=4:sw=4:sts=4:ft=js
pandora.ui.leftPanel = function() { pandora.ui.leftPanel = function() {
var that = new Ox.SplitPanel({ var that = Ox.SplitPanel({
elements: [ elements: [
{ {
element: pandora.$ui.sectionbar = pandora.ui.sectionbar('buttons'), element: pandora.$ui.sectionbar = pandora.ui.sectionbar('buttons'),

View file

@ -12,7 +12,7 @@ pandora.ui.list = function(view) { // fixme: remove view argument
)); ));
Ox.print('$$$$', keys) Ox.print('$$$$', keys)
*/ */
that = new Ox.TextList({ that = Ox.TextList({
columns: $.map(pandora.site.sortKeys, function(key, i) { columns: $.map(pandora.site.sortKeys, function(key, i) {
var position = pandora.user.ui.lists[pandora.user.ui.list].columns.indexOf(key.id); var position = pandora.user.ui.lists[pandora.user.ui.list].columns.indexOf(key.id);
return { return {
@ -70,7 +70,7 @@ pandora.ui.list = function(view) { // fixme: remove view argument
} }
}); });
} else if (view == 'icons') { } else if (view == 'icons') {
that = new Ox.IconList({ that = Ox.IconList({
id: 'list', id: 'list',
item: function(data, sort, size) { item: function(data, sort, size) {
var ratio = data.poster.width / data.poster.height; var ratio = data.poster.width / data.poster.height;
@ -96,7 +96,7 @@ pandora.ui.list = function(view) { // fixme: remove view argument
unique: 'id' unique: 'id'
}); });
} else if (view == 'clip') { } else if (view == 'clip') {
that = new Ox.IconList({ that = Ox.IconList({
item: function(data, sort, size) { item: function(data, sort, size) {
size = size || 128; size = size || 128;
var ratio = data.aspectRatio, var ratio = data.aspectRatio,
@ -132,7 +132,7 @@ pandora.ui.list = function(view) { // fixme: remove view argument
unique: 'id' unique: 'id'
}); });
} else if (view == 'map') { } else if (view == 'map') {
that = new Ox.SplitPanel({ that = Ox.SplitPanel({
elements: [ elements: [
{ {
element: pandora.$ui.map = Ox.Map({ element: pandora.$ui.map = Ox.Map({
@ -151,7 +151,7 @@ pandora.ui.list = function(view) { // fixme: remove view argument
}) })
}, },
{ {
element: new Ox.Element(), element: Ox.Element(),
id: 'place', id: 'place',
size: 144 + Ox.UI.SCROLLBAR_SIZE size: 144 + Ox.UI.SCROLLBAR_SIZE
} }
@ -162,7 +162,7 @@ pandora.ui.list = function(view) { // fixme: remove view argument
pandora.$ui.map.resizeMap(); pandora.$ui.map.resizeMap();
}); });
} else if (view == 'calendar') { } else if (view == 'calendar') {
that = new Ox.SplitPanel({ that = Ox.SplitPanel({
elements: [ elements: [
{ {
element: pandora.$ui.calendar = Ox.Calendar({ element: pandora.$ui.calendar = Ox.Calendar({
@ -188,7 +188,7 @@ pandora.ui.list = function(view) { // fixme: remove view argument
}) })
}, },
{ {
element: new Ox.Element(), element: Ox.Element(),
id: 'place', id: 'place',
size: 144 + Ox.UI.SCROLLBAR_SIZE size: 144 + Ox.UI.SCROLLBAR_SIZE
} }
@ -199,7 +199,7 @@ pandora.ui.list = function(view) { // fixme: remove view argument
}); });
} else { } else {
$list = new Ox.Element('<div>') $list = Ox.Element('<div>')
.css({ .css({
width: '100px', width: '100px',
height: '100px', height: '100px',
@ -313,9 +313,9 @@ pandora.ui.list = function(view) { // fixme: remove view argument
bottom: 0, bottom: 0,
margin: 'auto', margin: 'auto',
}); });
pandora.$ui.previewDialog = new Ox.Dialog({ pandora.$ui.previewDialog = Ox.Dialog({
buttons: [ buttons: [
new Ox.Button({ Ox.Button({
title: 'Close', title: 'Close',
}).bindEvent({ }).bindEvent({
click: function() { click: function() {

View file

@ -1,6 +1,6 @@
// vim: et:ts=4:sw=4:sts=4:ft=js // vim: et:ts=4:sw=4:sts=4:ft=js
pandora.ui.mainPanel = function() { pandora.ui.mainPanel = function() {
var that = new Ox.SplitPanel({ var that = Ox.SplitPanel({
elements: [ elements: [
{ {
collapsible: true, collapsible: true,

View file

@ -1,10 +1,10 @@
// vim: et:ts=4:sw=4:sts=4:ft=js // vim: et:ts=4:sw=4:sts=4:ft=js
pandora.ui.mainMenu = function() { pandora.ui.mainMenu = function() {
var isGuest = pandora.user.level == 'guest', var isGuest = pandora.user.level == 'guest',
that = new Ox.MainMenu({ that = Ox.MainMenu({
extras: [ extras: [
$('<div>').html('beta').css({marginRight: '8px', color: 'rgb(128, 128, 128)'}), $('<div>').html('beta').css({marginRight: '8px', color: 'rgb(128, 128, 128)'}),
pandora.$ui.loadingIcon = new Ox.LoadingIcon({ pandora.$ui.loadingIcon = Ox.LoadingIcon({
size: 'medium' size: 'medium'
}) })
], ],
@ -192,9 +192,9 @@ pandora.ui.mainMenu = function() {
}, },
click: function(event, data) { click: function(event, data) {
if (data.id == 'about') { if (data.id == 'about') {
var $dialog = new Ox.Dialog({ var $dialog = Ox.Dialog({
buttons: [ buttons: [
new Ox.Button({ Ox.Button({
id: 'close', id: 'close',
title: 'Close' title: 'Close'
}).bindEvent({ }).bindEvent({
@ -382,9 +382,9 @@ pandora.ui.mainMenu = function() {
$logo.animate({width: '320px'}, 500); $logo.animate({width: '320px'}, 500);
/* /*
var $dialog = new Ox.Dialog({ var $dialog = Ox.Dialog({
buttons: [ buttons: [
new Ox.Button({ Ox.Button({
id: 'close', id: 'close',
title: 'Close' title: 'Close'
}).bindEvent({ }).bindEvent({
@ -408,20 +408,20 @@ pandora.ui.mainMenu = function() {
} else if (data.id == 'places') { } else if (data.id == 'places') {
pandora.$ui.placesDialog = pandora.ui.placesDialog().open(); pandora.$ui.placesDialog = pandora.ui.placesDialog().open();
/* /*
var $manage = new Ox.SplitPanel({ var $manage = Ox.SplitPanel({
elements: [ elements: [
{ {
collapsible: true, collapsible: true,
element: new Ox.SplitPanel({ element: Ox.SplitPanel({
elements: [ elements: [
{ {
element: new Ox.Toolbar({ element: Ox.Toolbar({
orientation: 'horizontal', orientation: 'horizontal',
size: 44 size: 44
}).append( }).append(
pandora.$ui.findPlacesElement = new Ox.FormElementGroup({ pandora.$ui.findPlacesElement = Ox.FormElementGroup({
elements: [ elements: [
pandora.$ui.findPlacesSelect = new Ox.Select({ pandora.$ui.findPlacesSelect = Ox.Select({
id: 'findPlacesSelect', id: 'findPlacesSelect',
items: [ items: [
{ id: 'name', title: 'Find: Name' }, { id: 'name', title: 'Find: Name' },
@ -439,7 +439,7 @@ pandora.ui.mainMenu = function() {
}); });
} }
}), }),
pandora.$ui.findPlacesInput = new Ox.Input({ pandora.$ui.findPlacesInput = Ox.Input({
clear: true, clear: true,
id: 'findPlacesInput', id: 'findPlacesInput',
placeholder: 'Find: Name', placeholder: 'Find: Name',
@ -453,7 +453,7 @@ pandora.ui.mainMenu = function() {
margin: '4px' margin: '4px'
}) })
).append( ).append(
pandora.$ui.sortPlacesSelect = new Ox.Select({ pandora.$ui.sortPlacesSelect = Ox.Select({
id: 'sortPlacesSelect', id: 'sortPlacesSelect',
items: [ items: [
{ id: 'name', title: 'Sort by Name', checked: true }, { id: 'name', title: 'Sort by Name', checked: true },
@ -476,10 +476,10 @@ pandora.ui.mainMenu = function() {
size: 44 size: 44
}, },
{ {
element: new Ox.Element('div') element: Ox.Element('div')
}, },
{ {
element: new Ox.Toolbar({ element: Ox.Toolbar({
orientation: 'horizontal', orientation: 'horizontal',
size: 16 size: 16
}), }),
@ -491,14 +491,14 @@ pandora.ui.mainMenu = function() {
size: 256 size: 256
}, },
{ {
element: new Ox.SplitPanel({ element: Ox.SplitPanel({
elements: [ elements: [
{ {
element: new Ox.Toolbar({ element: Ox.Toolbar({
orientation: 'horizontal', orientation: 'horizontal',
size: 24 size: 24
}).append( }).append(
pandora.$ui.labelsButton = new Ox.Button({ pandora.$ui.labelsButton = Ox.Button({
id: 'labelsButton', id: 'labelsButton',
title: [ title: [
{id: 'show', title: 'Show Labels'}, {id: 'show', title: 'Show Labels'},
@ -511,7 +511,7 @@ pandora.ui.mainMenu = function() {
margin: '4px' margin: '4px'
}) })
).append( ).append(
pandora.$ui.findMapInput = new Ox.Input({ pandora.$ui.findMapInput = Ox.Input({
clear: true, clear: true,
id: 'findMapInput', id: 'findMapInput',
placeholder: 'Find on Map', placeholder: 'Find on Map',
@ -550,7 +550,7 @@ pandora.ui.mainMenu = function() {
size: 24 size: 24
}, },
{ {
element: pandora.$ui.map = new Ox.Map({ element: pandora.$ui.map = Ox.Map({
places: ['Boston', 'Brussels', 'Barcelona', 'Berlin', 'Beirut', 'Bombay', 'Bangalore', 'Beijing'] places: ['Boston', 'Brussels', 'Barcelona', 'Berlin', 'Beirut', 'Bombay', 'Bangalore', 'Beijing']
}) })
.css({ .css({
@ -582,12 +582,12 @@ pandora.ui.mainMenu = function() {
}) })
}, },
{ {
element: pandora.$ui.bottomBar = new Ox.Toolbar({ element: pandora.$ui.bottomBar = Ox.Toolbar({
orientation: 'horizontal', orientation: 'horizontal',
size: 24 size: 24
}) })
.append( .append(
pandora.$ui.placeNameInput = new Ox.Input({ pandora.$ui.placeNameInput = Ox.Input({
disabled: true, disabled: true,
id: 'placeName', id: 'placeName',
placeholder: 'Name', placeholder: 'Name',
@ -599,7 +599,7 @@ pandora.ui.mainMenu = function() {
}) })
) )
.append( .append(
pandora.$ui.placeAliasesInput = new Ox.Input({ pandora.$ui.placeAliasesInput = Ox.Input({
disabled: true, disabled: true,
id: 'aliases', id: 'aliases',
placeholder: 'Aliases', placeholder: 'Aliases',
@ -611,7 +611,7 @@ pandora.ui.mainMenu = function() {
}) })
) )
.append( .append(
pandora.$ui.placeGeonameLabel = new Ox.Label({ pandora.$ui.placeGeonameLabel = Ox.Label({
disabled: true, disabled: true,
id: 'placeGeoname', id: 'placeGeoname',
title: 'Geoname', title: 'Geoname',
@ -623,7 +623,7 @@ pandora.ui.mainMenu = function() {
}) })
) )
.append( .append(
pandora.$ui.addPlaceButton = new Ox.Button({ pandora.$ui.addPlaceButton = Ox.Button({
disabled: true, disabled: true,
id: 'addPlaceButton', id: 'addPlaceButton',
title: 'add', title: 'add',
@ -635,7 +635,7 @@ pandora.ui.mainMenu = function() {
}) })
) )
.append( .append(
pandora.$ui.removePlaceButton = new Ox.Button({ pandora.$ui.removePlaceButton = Ox.Button({
disabled: true, disabled: true,
id: 'removePlaceButton', id: 'removePlaceButton',
title: 'remove', title: 'remove',
@ -658,7 +658,7 @@ pandora.ui.mainMenu = function() {
top: '24px', top: '24px',
bottom: '24px', bottom: '24px',
}), }),
$dialog = new Ox.Dialog({ $dialog = Ox.Dialog({
buttons: [ buttons: [
{ {
click: function() { click: function() {
@ -681,9 +681,9 @@ pandora.ui.mainMenu = function() {
}).append($manage).open(); }).append($manage).open();
*/ */
} else if (data.id == 'query') { } else if (data.id == 'query') {
var $dialog = new Ox.Dialog({ var $dialog = Ox.Dialog({
buttons: [ buttons: [
new Ox.Button({ Ox.Button({
id: 'close', id: 'close',
title: 'Close' title: 'Close'
}).bindEvent({ }).bindEvent({
@ -692,7 +692,7 @@ pandora.ui.mainMenu = function() {
} }
}) })
], ],
content: new Ox.Element() content: Ox.Element()
.html([ .html([
'Query: ' + JSON.stringify(pandora.Query.toObject()), 'Query: ' + JSON.stringify(pandora.Query.toObject()),
'findQuery: ' + JSON.stringify(pandora.user.ui.findQuery), 'findQuery: ' + JSON.stringify(pandora.user.ui.findQuery),

View file

@ -2,9 +2,9 @@
pandora.ui.placesDialog = function() { pandora.ui.placesDialog = function() {
var height = Math.round(window.innerHeight * 0.9), var height = Math.round(window.innerHeight * 0.9),
width = Math.round(window.innerWidth * 0.9), width = Math.round(window.innerWidth * 0.9),
that = new Ox.Dialog({ that = Ox.Dialog({
buttons: [ buttons: [
new Ox.Button({ Ox.Button({
id: 'done', id: 'done',
title: 'Done' title: 'Done'
}).bindEvent({ }).bindEvent({
@ -13,7 +13,7 @@ pandora.ui.placesDialog = function() {
} }
}) })
], ],
content: pandora.$ui.placesElement = new Ox.ListMap({ content: pandora.$ui.placesElement = Ox.ListMap({
height: height - 48, height: height - 48,
places: function(data, callback) { places: function(data, callback) {
return pandora.api.findPlaces($.extend({ return pandora.api.findPlaces($.extend({

View file

@ -1,8 +1,8 @@
// vim: et:ts=4:sw=4:sts=4:ft=js // vim: et:ts=4:sw=4:sts=4:ft=js
pandora.ui.publicListsDialog = function() { // fixme: unused pandora.ui.publicListsDialog = function() { // fixme: unused
var that = new Ox.Dialog({ var that = Ox.Dialog({
buttons: [ buttons: [
new Ox.Button({ Ox.Button({
id: 'done', id: 'done',
title: 'Done' title: 'Done'
}).bindEvent({ }).bindEvent({

View file

@ -10,14 +10,14 @@ pandora.ui.rightPanel = function() {
} }
}); });
} else { } else {
that = new Ox.Element() that = Ox.Element()
.css({padding: '8px'}); .css({padding: '8px'});
pandora.api.getPage(pandora.user.ui.sitePage, function(result) { pandora.api.getPage(pandora.user.ui.sitePage, function(result) {
that.html(result.data.body).css({overflowY: 'auto'}); that.html(result.data.body).css({overflowY: 'auto'});
}); });
} }
} else if (pandora.user.ui.section == 'items') { } else if (pandora.user.ui.section == 'items') {
that = new Ox.SplitPanel({ that = Ox.SplitPanel({
elements: [ elements: [
{ {
element: pandora.$ui.toolbar = pandora.ui.toolbar(), element: pandora.$ui.toolbar = pandora.ui.toolbar(),

View file

@ -1,6 +1,6 @@
// vim: et:ts=4:sw=4:sts=4:ft=js // vim: et:ts=4:sw=4:sts=4:ft=js
pandora.ui.sectionButtons = function() { pandora.ui.sectionButtons = function() {
var that = new Ox.ButtonGroup({ var that = Ox.ButtonGroup({
buttons: [ buttons: [
{id: 'site', selected: pandora.user.ui.section == 'site', title: pandora.site.site.name}, {id: 'site', selected: pandora.user.ui.section == 'site', title: pandora.site.site.name},
{id: 'items', selected: pandora.user.ui.section == 'items', title: pandora.site.itemName.plural}, {id: 'items', selected: pandora.user.ui.section == 'items', title: pandora.site.itemName.plural},

View file

@ -1,7 +1,7 @@
// vim: et:ts=4:sw=4:sts=4:ft=js // vim: et:ts=4:sw=4:sts=4:ft=js
pandora.ui.sectionSelect = function() { pandora.ui.sectionSelect = function() {
// fixme: duplicated // fixme: duplicated
var that = new Ox.Select({ var that = Ox.Select({
id: 'sectionSelect', id: 'sectionSelect',
items: [ items: [
{checked: pandora.user.ui.section == 'site', id: 'site', title: pandora.site.site.name}, {checked: pandora.user.ui.section == 'site', id: 'site', title: pandora.site.site.name},

View file

@ -1,6 +1,6 @@
// vim: et:ts=4:sw=4:sts=4:ft=js // vim: et:ts=4:sw=4:sts=4:ft=js
pandora.ui.sectionbar = function(mode) { pandora.ui.sectionbar = function(mode) {
var that = new Ox.Bar({ var that = Ox.Bar({
size: 24 size: 24
}) })
.append( .append(

View file

@ -1,6 +1,6 @@
// vim: et:ts=4:sw=4:sts=4:ft=js // vim: et:ts=4:sw=4:sts=4:ft=js
pandora.ui.sortSelect = function() { pandora.ui.sortSelect = function() {
var that = new Ox.Select({ var that = Ox.Select({
id: 'sortSelect', id: 'sortSelect',
items: $.map(pandora.site.sortKeys, function(key) { items: $.map(pandora.site.sortKeys, function(key) {
//Ox.print('????', pandora.user.ui.lists[pandora.user.ui.list].sort.key, key.id) //Ox.print('????', pandora.user.ui.lists[pandora.user.ui.list].sort.key, key.id)

View file

@ -1,6 +1,6 @@
// vim: et:ts=4:sw=4:sts=4:ft=js // vim: et:ts=4:sw=4:sts=4:ft=js
pandora.ui.statusbar = function() { pandora.ui.statusbar = function() {
var that = new Ox.Bar({ var that = Ox.Bar({
size: 16 size: 16
}) })
.css({ .css({

View file

@ -1,6 +1,6 @@
// vim: et:ts=4:sw=4:sts=4:ft=js // vim: et:ts=4:sw=4:sts=4:ft=js
pandora.ui.toolbar = function() { pandora.ui.toolbar = function() {
var that = new Ox.Bar({ var that = Ox.Bar({
size: 24 size: 24
}).css({ }).css({
zIndex: 2 // fixme: remove later zIndex: 2 // fixme: remove later

View file

@ -1,6 +1,6 @@
// vim: et:ts=4:sw=4:sts=4:ft=js // vim: et:ts=4:sw=4:sts=4:ft=js
pandora.ui.viewSelect = function() { pandora.ui.viewSelect = function() {
var that = new Ox.Select({ var that = Ox.Select({
id: 'viewSelect', id: 'viewSelect',
items: !pandora.user.ui.item ? $.map(pandora.site.listViews, function(view) { items: !pandora.user.ui.item ? $.map(pandora.site.listViews, function(view) {
return $.extend($.extend({}, view), { return $.extend($.extend({}, view), {