From 06bea0b1165ca5c8ffa72bd10d24d2dad5f56868 Mon Sep 17 00:00:00 2001
From: j <0x006A@0x2620.org>
Date: Sun, 19 Jun 2011 19:49:25 +0200
Subject: [PATCH] dont use new Ox.
---
static/js/pandora/ui/Ox.FilesView.js | 10 ++--
static/js/pandora/ui/account.js | 50 +++++++++----------
static/js/pandora/ui/appPanel.js | 2 +-
static/js/pandora/ui/browser.js | 4 +-
static/js/pandora/ui/contentPanel.js | 2 +-
static/js/pandora/ui/editor.js | 4 +-
static/js/pandora/ui/filter.js | 2 +-
static/js/pandora/ui/filterDialog.js | 8 +--
static/js/pandora/ui/findElement.js | 8 +--
static/js/pandora/ui/flipbook.js | 2 +-
static/js/pandora/ui/folderBrowser.js | 2 +-
static/js/pandora/ui/folderBrowserBar.js | 4 +-
static/js/pandora/ui/folderBrowserList.js | 18 +++----
static/js/pandora/ui/folders.js | 12 ++---
static/js/pandora/ui/foldersList.js | 4 +-
static/js/pandora/ui/group.js | 6 +--
static/js/pandora/ui/info.js | 6 +--
static/js/pandora/ui/item.js | 24 ++++-----
static/js/pandora/ui/leftPanel.js | 2 +-
static/js/pandora/ui/list.js | 20 ++++----
static/js/pandora/ui/mainPanel.js | 2 +-
static/js/pandora/ui/menu.js | 60 +++++++++++------------
static/js/pandora/ui/placesDialog.js | 6 +--
static/js/pandora/ui/publicLists.js | 4 +-
static/js/pandora/ui/rightPanel.js | 4 +-
static/js/pandora/ui/sectionButtons.js | 2 +-
static/js/pandora/ui/sectionSelect.js | 2 +-
static/js/pandora/ui/sectionbar.js | 2 +-
static/js/pandora/ui/sortSelect.js | 2 +-
static/js/pandora/ui/statusbar.js | 2 +-
static/js/pandora/ui/toolbar.js | 2 +-
static/js/pandora/ui/viewSelect.js | 2 +-
32 files changed, 140 insertions(+), 140 deletions(-)
diff --git a/static/js/pandora/ui/Ox.FilesView.js b/static/js/pandora/ui/Ox.FilesView.js
index 3886b8105..176141cd8 100644
--- a/static/js/pandora/ui/Ox.FilesView.js
+++ b/static/js/pandora/ui/Ox.FilesView.js
@@ -3,7 +3,7 @@
Ox.FilesView = function(options, self) {
var self = self || {},
- that = new Ox.Element({}, self)
+ that = Ox.Element({}, self)
.defaults({
id: ''
})
@@ -11,11 +11,11 @@ Ox.FilesView = function(options, self) {
self.selected = [];
- self.$toolbar = new Ox.Bar({
+ self.$toolbar = Ox.Bar({
size: 24
});
- self.$orderButton = new Ox.Button({
+ self.$orderButton = Ox.Button({
title: 'Change Order of Users...'
})
.css({
@@ -24,7 +24,7 @@ Ox.FilesView = function(options, self) {
})
.appendTo(self.$toolbar);
- self.$moveButton = new Ox.Button({
+ self.$moveButton = Ox.Button({
disabled: 'true',
title: 'Move Selected Files...'
})
@@ -34,7 +34,7 @@ Ox.FilesView = function(options, self) {
})
.appendTo(self.$toolbar);
- self.$filesList = new Ox.TextList({
+ self.$filesList = Ox.TextList({
columns: [
{
align: 'left',
diff --git a/static/js/pandora/ui/account.js b/static/js/pandora/ui/account.js
index 30fab3d52..d89290fb5 100644
--- a/static/js/pandora/ui/account.js
+++ b/static/js/pandora/ui/account.js
@@ -1,7 +1,7 @@
// vim: et:ts=4:sw=4:sts=4:ft=js
pandora.ui.accountDialog = function(action) {
- var that = new Ox.Dialog($.extend({
+ var that = Ox.Dialog($.extend({
height: 256,
id: 'accountDialog',
minHeight: 256,
@@ -48,14 +48,14 @@ pandora.ui.accountDialogOptions = function(action, value) {
};
function button(type) {
if (type == 'cancel') {
- return new Ox.Button({
+ return Ox.Button({
id: 'cancel' + Ox.toTitleCase(action),
title: 'Cancel'
}).bindEvent('click', function() {
pandora.$ui.accountDialog.close();
});
} else if (type == 'submit') {
- return new Ox.Button({
+ return Ox.Button({
disabled: true,
id: 'submit' + Ox.toTitleCase(action),
title: buttonTitle[action]
@@ -63,7 +63,7 @@ pandora.ui.accountDialogOptions = function(action, value) {
pandora.$ui.accountForm.submit();
});
} else {
- return new Ox.Button({
+ return Ox.Button({
id: type,
title: buttonTitle[type] + '...'
}).bindEvent('click', function() {
@@ -79,9 +79,9 @@ pandora.ui.accountDialogOptions = function(action, value) {
}),
[button('cancel'), button('submit')]
],
- content: new Ox.Element()
+ content: Ox.Element()
.append(
- new Ox.Element()
+ Ox.Element()
.addClass('OxText')
.html(dialogText[action] + '
')
)
@@ -118,7 +118,7 @@ pandora.ui.accountForm = function(action, value) {
$items = $.map(items[action], function(v) {
return item(v, value);
}),
- that = new Ox.Form({
+ that = Ox.Form({
id: 'accountForm' + Ox.toTitleCase(action),
items: $items,
submit: function(data, callback) {
@@ -178,7 +178,7 @@ pandora.ui.accountForm = function(action, value) {
that.items = $items;
function item(type, value) {
if (type == 'code') {
- return new Ox.Input({
+ return Ox.Input({
autovalidate: autovalidateCode,
id: 'code',
label: 'Code',
@@ -192,7 +192,7 @@ pandora.ui.accountForm = function(action, value) {
width: 352
});
} else if (type == 'email') {
- return new Ox.Input({
+ return Ox.Input({
autovalidate: autovalidateEmail,
id: 'email',
label: 'E-Mail Address',
@@ -202,7 +202,7 @@ pandora.ui.accountForm = function(action, value) {
width: 352
});
} else if (type == 'newPassword') {
- return new Ox.Input({
+ return Ox.Input({
autovalidate: /.+/,
id: 'password',
label: 'New Password',
@@ -217,7 +217,7 @@ pandora.ui.accountForm = function(action, value) {
width: 352
});
} else if (type == 'newUsername') {
- return new Ox.Input({
+ return Ox.Input({
autovalidate: pandora.autovalidateUsername,
id: 'username',
label: 'Username',
@@ -226,7 +226,7 @@ pandora.ui.accountForm = function(action, value) {
width: 352
});
} else if (type == 'oldUsername') {
- return new Ox.Input({
+ return Ox.Input({
disabled: true,
id: 'username',
label: 'Username',
@@ -235,7 +235,7 @@ pandora.ui.accountForm = function(action, value) {
width: 352
});
} else if (type == 'password') {
- return new Ox.Input({
+ return Ox.Input({
autovalidate: /.+/,
id: 'password',
label: 'Password',
@@ -250,7 +250,7 @@ pandora.ui.accountForm = function(action, value) {
width: 352
});
} else if (type == 'username') {
- return new Ox.Input({
+ return Ox.Input({
autovalidate: pandora.autovalidateUsername,
id: 'username',
label: 'Username',
@@ -259,10 +259,10 @@ pandora.ui.accountForm = function(action, value) {
width: 352
});
} else if (type == 'usernameOrEmail') {
- return new Ox.FormElementGroup({
+ return Ox.FormElementGroup({
id: 'usernameOrEmail',
elements: [
- pandora.$ui.usernameOrEmailSelect = new Ox.Select({
+ pandora.$ui.usernameOrEmailSelect = Ox.Select({
id: 'usernameOrEmailSelect',
items: [
{id: 'username', title: 'Username'},
@@ -281,7 +281,7 @@ pandora.ui.accountForm = function(action, value) {
}).focus();
}
}),
- pandora.$ui.usernameOrEmailInput = new Ox.Input({
+ pandora.$ui.usernameOrEmailInput = Ox.Input({
autovalidate: pandora.autovalidateUsername,
id: 'usernameOrEmailInput',
validate: pandora.validateUser('username', true),
@@ -298,16 +298,16 @@ pandora.ui.accountForm = function(action, value) {
};
pandora.ui.accountLogoutDialog = function() {
- var that = new Ox.Dialog({
+ var that = Ox.Dialog({
buttons: [
- new Ox.Button({
+ Ox.Button({
id: 'cancel',
title: 'Cancel'
}).bindEvent('click', function() {
that.close();
pandora.$ui.mainMenu.getItem('loginlogout').toggleTitle();
}),
- new Ox.Button({
+ Ox.Button({
id: 'logout',
title: 'Logout'
}).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,
keys: {enter: 'logout', escape: 'cancel'},
title: 'Logout',
@@ -326,10 +326,10 @@ pandora.ui.accountLogoutDialog = function() {
return that;
};
pandora.ui.accountWelcomeDialog = function() {
- var that = new Ox.Dialog({
+ var that = Ox.Dialog({
buttons: [
[
- new Ox.Button({
+ Ox.Button({
id: 'preferences',
title: 'Preferences...'
}).bindEvent('click', function() {
@@ -337,7 +337,7 @@ pandora.ui.accountWelcomeDialog = function() {
})
],
[
- new Ox.Button({
+ Ox.Button({
id: 'close',
title: 'Close'
}).bindEvent('click', function() {
@@ -345,7 +345,7 @@ pandora.ui.accountWelcomeDialog = function() {
})
]
],
- content: new Ox.Element().html('Welcome, ' + pandora.user.username + '!
Your account has been created.'),
+ content: Ox.Element().html('Welcome, ' + pandora.user.username + '!
Your account has been created.'),
height: 160,
keys: {enter: 'close', escape: 'close'},
title: 'Welcome to ' + pandora.site.site.name,
diff --git a/static/js/pandora/ui/appPanel.js b/static/js/pandora/ui/appPanel.js
index 9dd411e4f..882391133 100644
--- a/static/js/pandora/ui/appPanel.js
+++ b/static/js/pandora/ui/appPanel.js
@@ -1,6 +1,6 @@
// vim: et:ts=4:sw=4:sts=4:ft=js
pandora.ui.appPanel = function() {
- var that = new Ox.SplitPanel({
+ var that = Ox.SplitPanel({
elements: [
{
element: pandora.$ui.mainMenu = pandora.ui.mainMenu(),
diff --git a/static/js/pandora/ui/browser.js b/static/js/pandora/ui/browser.js
index 7430fa110..c4de5c578 100644
--- a/static/js/pandora/ui/browser.js
+++ b/static/js/pandora/ui/browser.js
@@ -3,7 +3,7 @@ pandora.ui.browser = function() {
var that;
if (!pandora.user.ui.item) {
pandora.$ui.groups = pandora.ui.groups();
- that = new Ox.SplitPanel({
+ that = Ox.SplitPanel({
elements: [
{
element: pandora.$ui.groups[0],
@@ -36,7 +36,7 @@ pandora.ui.browser = function() {
}
});
} else {
- var that = new Ox.IconList({
+ var that = Ox.IconList({
centered: true,
id: 'list',
item: function(data, sort, size) {
diff --git a/static/js/pandora/ui/contentPanel.js b/static/js/pandora/ui/contentPanel.js
index 51e3c8831..89a17d730 100644
--- a/static/js/pandora/ui/contentPanel.js
+++ b/static/js/pandora/ui/contentPanel.js
@@ -1,6 +1,6 @@
// vim: et:ts=4:sw=4:sts=4:ft=js
pandora.ui.contentPanel = function() {
- var that = new Ox.SplitPanel({
+ var that = Ox.SplitPanel({
elements: pandora.user.ui.item == '' ? [
{
collapsed: !pandora.user.ui.showGroups,
diff --git a/static/js/pandora/ui/editor.js b/static/js/pandora/ui/editor.js
index 66306ef1f..702a6c1ef 100644
--- a/static/js/pandora/ui/editor.js
+++ b/static/js/pandora/ui/editor.js
@@ -1,6 +1,6 @@
// vim: et:ts=4:sw=4:sts=4:ft=js
pandora.ui.annotations = function() {
- var that = new Ox.Element({
+ var that = Ox.Element({
id: 'annotations'
})
.bindEvent({
@@ -16,7 +16,7 @@ pandora.ui.annotations = function() {
}),
$bins = [];
$.each(pandora.site.layers, function(i, layer) {
- var $bin = new Ox.CollapsePanel({
+ var $bin = Ox.CollapsePanel({
id: layer.id,
size: 16,
title: layer.title
diff --git a/static/js/pandora/ui/filter.js b/static/js/pandora/ui/filter.js
index f3d31d3c8..aabf6c9d7 100644
--- a/static/js/pandora/ui/filter.js
+++ b/static/js/pandora/ui/filter.js
@@ -1,6 +1,6 @@
// vim: et:ts=4:sw=4:sts=4:ft=js
pandora.ui.filter = function() {
- var that = new Ox.Filter({
+ var that = Ox.Filter({
findKeys: Ox.map(pandora.site.itemKeys, function(key) {
return key.id == 'all' ? null : {
autocomplete: key.autocomplete,
diff --git a/static/js/pandora/ui/filterDialog.js b/static/js/pandora/ui/filterDialog.js
index d9e9eb8a1..ed0f07b7e 100644
--- a/static/js/pandora/ui/filterDialog.js
+++ b/static/js/pandora/ui/filterDialog.js
@@ -1,8 +1,8 @@
// vim: et:ts=4:sw=4:sts=4:ft=js
pandora.ui.filterDialog = function() {
- var that = new Ox.Dialog({
+ var that = Ox.Dialog({
buttons: [
- new Ox.Button({
+ Ox.Button({
id: 'debug',
title: 'Debug',
})
@@ -11,7 +11,7 @@ pandora.ui.filterDialog = function() {
alert(JSON.stringify(pandora.$ui.filter.options('query')));
}
}),
- new Ox.Button({
+ Ox.Button({
id: 'cancel',
title: 'Cancel'
})
@@ -20,7 +20,7 @@ pandora.ui.filterDialog = function() {
pandora.$ui.filterDialog.close();
}
}),
- new Ox.Button({
+ Ox.Button({
id: 'save',
title: 'Save'
})
diff --git a/static/js/pandora/ui/findElement.js b/static/js/pandora/ui/findElement.js
index 05c237b70..4ce6dfcb0 100644
--- a/static/js/pandora/ui/findElement.js
+++ b/static/js/pandora/ui/findElement.js
@@ -6,9 +6,9 @@ pandora.ui.findElement = function() {
findKey = pandora.user.ui.findQuery.conditions[0].key;
findValue = pandora.user.ui.findQuery.conditions[0].value;
}
- var that = new Ox.FormElementGroup({
+ var that = Ox.FormElementGroup({
elements: $.merge(pandora.user.ui.list ? [
- pandora.$ui.findListSelect = new Ox.Select({
+ pandora.$ui.findListSelect = Ox.Select({
items: [
{id: 'all', title: 'Find: All ' + pandora.site.itemName.plural},
{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',
items: $.merge($.map(pandora.site.findKeys,
function(key, i) {
@@ -59,7 +59,7 @@ pandora.ui.findElement = function() {
}
}
}),
- pandora.$ui.findInput = new Ox.Input({
+ pandora.$ui.findInput = Ox.Input({
autocomplete: autocompleteFunction(),
autocompleteSelect: true,
autocompleteSelectHighlight: true,
diff --git a/static/js/pandora/ui/flipbook.js b/static/js/pandora/ui/flipbook.js
index ee3fad8b2..7ce9e2ee0 100644
--- a/static/js/pandora/ui/flipbook.js
+++ b/static/js/pandora/ui/flipbook.js
@@ -1,6 +1,6 @@
// vim: et:ts=4:sw=4:sts=4:ft=js
pandora.ui.flipbook = function(item) {
- var that = new Ox.Flipbook({
+ var that = Ox.Flipbook({
}).bindEvent('click', function(event, data) {
pandora.UI.set('videoPosition|' + item, data.position);
pandora.URL.set(item + '/timeline');
diff --git a/static/js/pandora/ui/folderBrowser.js b/static/js/pandora/ui/folderBrowser.js
index f5d7785f3..b628a7fc6 100644
--- a/static/js/pandora/ui/folderBrowser.js
+++ b/static/js/pandora/ui/folderBrowser.js
@@ -1,6 +1,6 @@
// vim: et:ts=4:sw=4:sts=4:ft=js
pandora.ui.folderBrowser = function(id) {
- var that = new Ox.SplitPanel({
+ var that = Ox.SplitPanel({
elements: [
{
element: pandora.ui.folderBrowserBar(),
diff --git a/static/js/pandora/ui/folderBrowserBar.js b/static/js/pandora/ui/folderBrowserBar.js
index 146c633ca..2aab4abe8 100644
--- a/static/js/pandora/ui/folderBrowserBar.js
+++ b/static/js/pandora/ui/folderBrowserBar.js
@@ -1,9 +1,9 @@
// vim: et:ts=4:sw=4:sts=4:ft=js
pandora.ui.folderBrowserBar = function(id) {
- var that = new Ox.Bar({
+ var that = Ox.Bar({
size: 24
});
- pandora.$ui.findListInput = new Ox.Input({
+ pandora.$ui.findListInput = Ox.Input({
placeholder: 'Find User',
width: 184 - Ox.UI.SCROLLBAR_SIZE
})
diff --git a/static/js/pandora/ui/folderBrowserList.js b/static/js/pandora/ui/folderBrowserList.js
index 68c86793e..78d3d871c 100644
--- a/static/js/pandora/ui/folderBrowserList.js
+++ b/static/js/pandora/ui/folderBrowserList.js
@@ -2,7 +2,7 @@
pandora.ui.folderBrowserList = function(id) {
var columnWidth = (pandora.user.ui.sidebarSize - Ox.UI.SCROLLBAR_SIZE - 88) / 2,
i = Ox.getPositionById(pandora.site.sectionFolders[pandora.user.ui.section], id),
- that = new Ox.TextList({
+ that = Ox.TextList({
columns: [
{
format: function() {
@@ -193,7 +193,7 @@ pandora.ui.folderList = function(id) {
var i = Ox.getPositionById(pandora.site.sectionFolders[pandora.user.ui.section], id),
that;
if (pandora.user.ui.section == 'site') {
- that = new Ox.TextList({
+ that = Ox.TextList({
columns: [
{
format: function() {
@@ -238,7 +238,7 @@ pandora.ui.folderList = function(id) {
},
});
} else if (pandora.user.ui.section == 'items') {
- that = new Ox.TextList({
+ that = Ox.TextList({
columns: [
{
format: function() {
@@ -464,7 +464,7 @@ pandora.ui.folderList = function(id) {
};
pandora.ui.folders = function() {
- var that = new Ox.Element()
+ var that = Ox.Element()
.css({overflowX: 'hidden', overflowY: 'auto'})
.bindEvent({
resize: function(event, data) {
@@ -479,7 +479,7 @@ pandora.ui.folders = function() {
if (pandora.user.ui.section == 'site') {
$.each(pandora.site.sectionFolders.site, function(i, folder) {
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,
collapsed: !pandora.user.ui.showFolder.site[folder.id],
size: 16,
@@ -509,7 +509,7 @@ pandora.ui.folders = function() {
$.each(pandora.site.sectionFolders.items, function(i, folder) {
var extras = [];
if (folder.id == 'personal' && pandora.user.level != 'guest') {
- extras = [new Ox.Select({
+ extras = [Ox.Select({
items: [
{ id: 'new', title: 'New List...' },
{ 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') {
- extras = [new Ox.Button({
+ extras = [Ox.Button({
selectable: true,
style: 'symbol',
title: 'Edit',
@@ -573,7 +573,7 @@ pandora.ui.folders = function() {
}
})];
} else if (folder.id == 'featured' && pandora.user.level == 'admin') {
- extras = [new Ox.Button({
+ extras = [Ox.Button({
selectable: true,
style: 'symbol',
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,
collapsed: !pandora.user.ui.showFolder.items[folder.id],
extras: extras,
diff --git a/static/js/pandora/ui/folders.js b/static/js/pandora/ui/folders.js
index 3144657f1..f58d4d6d8 100644
--- a/static/js/pandora/ui/folders.js
+++ b/static/js/pandora/ui/folders.js
@@ -1,6 +1,6 @@
// vim: et:ts=4:sw=4:sts=4:ft=js
pandora.ui.folders = function() {
- var that = new Ox.Element()
+ var that = Ox.Element()
.css({overflowX: 'hidden', overflowY: 'auto'})
.bindEvent({
resize: function(event, data) {
@@ -15,7 +15,7 @@ pandora.ui.folders = function() {
if (pandora.user.ui.section == 'site') {
$.each(pandora.site.sectionFolders.site, function(i, folder) {
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,
collapsed: !pandora.user.ui.showFolder.site[folder.id],
size: 16,
@@ -45,7 +45,7 @@ pandora.ui.folders = function() {
$.each(pandora.site.sectionFolders.items, function(i, folder) {
var extras = [];
if (folder.id == 'personal' && pandora.user.level != 'guest') {
- extras = [new Ox.Select({
+ extras = [Ox.Select({
items: [
{ id: 'new', title: 'New List...' },
{ 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') {
- extras = [new Ox.Button({
+ extras = [Ox.Button({
selectable: true,
style: 'symbol',
title: 'Edit',
@@ -109,7 +109,7 @@ pandora.ui.folders = function() {
}
})];
} else if (folder.id == 'featured' && pandora.user.level == 'admin') {
- extras = [new Ox.Button({
+ extras = [Ox.Button({
selectable: true,
style: 'symbol',
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,
collapsed: !pandora.user.ui.showFolder.items[folder.id],
extras: extras,
diff --git a/static/js/pandora/ui/foldersList.js b/static/js/pandora/ui/foldersList.js
index ea0b97172..9e4813b28 100644
--- a/static/js/pandora/ui/foldersList.js
+++ b/static/js/pandora/ui/foldersList.js
@@ -3,7 +3,7 @@ pandora.ui.folderList = function(id) {
var i = Ox.getPositionById(pandora.site.sectionFolders[pandora.user.ui.section], id),
that;
if (pandora.user.ui.section == 'site') {
- that = new Ox.TextList({
+ that = Ox.TextList({
columns: [
{
format: function() {
@@ -48,7 +48,7 @@ pandora.ui.folderList = function(id) {
},
});
} else if (pandora.user.ui.section == 'items') {
- that = new Ox.TextList({
+ that = Ox.TextList({
columns: [
{
format: function() {
diff --git a/static/js/pandora/ui/group.js b/static/js/pandora/ui/group.js
index abc540548..a2914ee83 100644
--- a/static/js/pandora/ui/group.js
+++ b/static/js/pandora/ui/group.js
@@ -11,7 +11,7 @@ pandora.ui.group = function(id, query) {
panelWidth = pandora.$ui.document.width() - (pandora.user.ui.showSidebar * pandora.user.ui.sidebarSize) - 1,
title = Ox.getObjectById(pandora.site.groups, id).title,
width = pandora.getGroupWidth(i, panelWidth),
- that = new Ox.TextList({
+ that = Ox.TextList({
columns: [
{
align: 'left',
@@ -70,7 +70,7 @@ pandora.ui.group = function(id, query) {
pandora.reloadGroups(i);
}
});
- new Ox.Select({
+ Ox.Select({
items: $.map(pandora.site.groups, function(v) {
return {
checked: v.id == id,
@@ -149,7 +149,7 @@ pandora.ui.groups = function() {
};
pandora.ui.groupsInnerPanel = function() {
- var that = new Ox.SplitPanel({
+ var that = Ox.SplitPanel({
elements: [
{
element: pandora.$ui.groups[1],
diff --git a/static/js/pandora/ui/info.js b/static/js/pandora/ui/info.js
index e8a95b344..77de3690d 100644
--- a/static/js/pandora/ui/info.js
+++ b/static/js/pandora/ui/info.js
@@ -1,8 +1,8 @@
// vim: et:ts=4:sw=4:sts=4:ft=js
pandora.ui.info = function() {
- var that = new Ox.Element()
+ var that = Ox.Element()
.append(
- pandora.$ui.infoStill = new Ox.Element()
+ pandora.$ui.infoStill = Ox.Element()
.css({
position: 'absolute',
left: 0,
@@ -11,7 +11,7 @@ pandora.ui.info = function() {
})
)
.append(
- pandora.$ui.infoTimeline = new Ox.Element('')
+ pandora.$ui.infoTimeline = Ox.Element('')
.css({
position: 'absolute',
left: 0,
diff --git a/static/js/pandora/ui/item.js b/static/js/pandora/ui/item.js
index a0902d587..3c9d18413 100644
--- a/static/js/pandora/ui/item.js
+++ b/static/js/pandora/ui/item.js
@@ -1,6 +1,6 @@
// vim: et:ts=4:sw=4:sts=4:ft=js
pandora.ui.item = function() {
- var that = new Ox.Element();
+ var that = Ox.Element();
pandora.api.getItem(pandora.user.ui.item, function(result) {
if (result.status.code != 200) {
pandora.$ui.contentPanel.replaceElement(1,
@@ -9,7 +9,7 @@ pandora.ui.item = function() {
} else if (pandora.user.ui.itemView == 'calendar') {
pandora.$ui.contentPanel.replaceElement(1, Ox.Element().html('Calendar'));
} 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) {
size = size || 128;
var ratio = result.data.stream.aspectRatio,
@@ -45,10 +45,10 @@ pandora.ui.item = function() {
//Ox.print('result.data', result.data)
if (pandora.user.level == 'admin') {
var $form,
- $edit = new Ox.Element()
- .append($form = new Ox.FormElementGroup({
+ $edit = Ox.Element()
+ .append($form = Ox.FormElementGroup({
elements: Ox.map(pandora.site.itemKeys, function(key) {
- return new Ox.Input({
+ return Ox.Input({
id: key.id,
label: key.title,
labelWidth: 100,
@@ -61,7 +61,7 @@ pandora.ui.item = function() {
{title: '', width: 0}
]
}))
- .append(new Ox.Button({
+ .append(Ox.Button({
title: 'Save',
type: 'text'
}).bindEvent({
@@ -90,14 +90,14 @@ pandora.ui.item = function() {
$.get('/static/html/itemInfo.html', {}, function(template) {
//Ox.print(template);
pandora.$ui.contentPanel.replaceElement(1,
- pandora.$ui.item = new Ox.Element()
+ pandora.$ui.item = Ox.Element()
.append($.tmpl(template, result.data))
);
});
}
} else if (pandora.user.ui.itemView == 'map') {
- pandora.$ui.contentPanel.replaceElement(1, new Ox.SplitPanel({
+ pandora.$ui.contentPanel.replaceElement(1, Ox.SplitPanel({
elements: [
{
element: pandora.$ui.map = Ox.Map({
@@ -120,7 +120,7 @@ pandora.ui.item = function() {
})
},
{
- element: new Ox.Element(),
+ element: Ox.Element(),
id: 'place',
size: 144 + Ox.UI.SCROLLBAR_SIZE
}
@@ -136,7 +136,7 @@ pandora.ui.item = function() {
video.height = video.profiles[0];
video.width = parseInt(video.height * video.aspectRatio / 2) * 2;
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,
duration: video.duration,
height: pandora.$ui.contentPanel.size(1),
@@ -183,7 +183,7 @@ pandora.ui.item = function() {
$.each(pandora.site.layers, function(i, layer) {
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,
cuts: cuts,
duration: video.duration,
@@ -263,7 +263,7 @@ pandora.ui.item = function() {
*/
} else if (pandora.user.ui.itemView == 'files') {
pandora.$ui.contentPanel.replaceElement(1,
- pandora.$ui.item = new Ox.FilesView({
+ pandora.$ui.item = Ox.FilesView({
id: result.data.id
})
);
diff --git a/static/js/pandora/ui/leftPanel.js b/static/js/pandora/ui/leftPanel.js
index aa0718bd7..10276feb1 100644
--- a/static/js/pandora/ui/leftPanel.js
+++ b/static/js/pandora/ui/leftPanel.js
@@ -1,6 +1,6 @@
// vim: et:ts=4:sw=4:sts=4:ft=js
pandora.ui.leftPanel = function() {
- var that = new Ox.SplitPanel({
+ var that = Ox.SplitPanel({
elements: [
{
element: pandora.$ui.sectionbar = pandora.ui.sectionbar('buttons'),
diff --git a/static/js/pandora/ui/list.js b/static/js/pandora/ui/list.js
index 4f5eccd0b..86fe56c63 100644
--- a/static/js/pandora/ui/list.js
+++ b/static/js/pandora/ui/list.js
@@ -12,7 +12,7 @@ pandora.ui.list = function(view) { // fixme: remove view argument
));
Ox.print('$$$$', keys)
*/
- that = new Ox.TextList({
+ that = Ox.TextList({
columns: $.map(pandora.site.sortKeys, function(key, i) {
var position = pandora.user.ui.lists[pandora.user.ui.list].columns.indexOf(key.id);
return {
@@ -70,7 +70,7 @@ pandora.ui.list = function(view) { // fixme: remove view argument
}
});
} else if (view == 'icons') {
- that = new Ox.IconList({
+ that = Ox.IconList({
id: 'list',
item: function(data, sort, size) {
var ratio = data.poster.width / data.poster.height;
@@ -96,7 +96,7 @@ pandora.ui.list = function(view) { // fixme: remove view argument
unique: 'id'
});
} else if (view == 'clip') {
- that = new Ox.IconList({
+ that = Ox.IconList({
item: function(data, sort, size) {
size = size || 128;
var ratio = data.aspectRatio,
@@ -132,7 +132,7 @@ pandora.ui.list = function(view) { // fixme: remove view argument
unique: 'id'
});
} else if (view == 'map') {
- that = new Ox.SplitPanel({
+ that = Ox.SplitPanel({
elements: [
{
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',
size: 144 + Ox.UI.SCROLLBAR_SIZE
}
@@ -162,7 +162,7 @@ pandora.ui.list = function(view) { // fixme: remove view argument
pandora.$ui.map.resizeMap();
});
} else if (view == 'calendar') {
- that = new Ox.SplitPanel({
+ that = Ox.SplitPanel({
elements: [
{
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',
size: 144 + Ox.UI.SCROLLBAR_SIZE
}
@@ -199,7 +199,7 @@ pandora.ui.list = function(view) { // fixme: remove view argument
});
} else {
- $list = new Ox.Element('