'use strict';

This commit is contained in:
rolux 2011-11-05 18:04:10 +01:00
parent 586aeb75bb
commit e6b49b908e
59 changed files with 97 additions and 3 deletions

View file

@ -1,4 +1,9 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
// FIXME: remove this
pandora.Query = (function() {
function constructFind(query) {

View file

@ -1,4 +1,7 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
pandora.UI = (function() {
var self = {}, that = {};

View file

@ -1,5 +1,7 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
pandora.URL = (function() {
var self = {}, that = {};

View file

@ -1,5 +1,7 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
pandora.ui.accountDialog = function(action) {
var that = Ox.Dialog(Ox.extend({
fixedSize: true,

View file

@ -1,4 +1,5 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
pandora.ui.appPanel = function() {
var that = Ox.SplitPanel({
elements: [

View file

@ -1,5 +1,7 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
pandora.autovalidateCode = function(value, blur, callback) {
value = value.toUpperCase().split('').map(function(v) {
return /[A-Z]/.test(v) ? v : null;

View file

@ -1,4 +1,5 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
pandora.ui.backButton = function() {
var that = Ox.Button({
title: 'Back to ' + pandora.site.itemName.plural,

View file

@ -1,4 +1,5 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
pandora.ui.browser = function() {
var that;
if (!pandora.user.ui.item) {

View file

@ -1,5 +1,7 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
pandora.ui.clipList = function(videoRatio) {
var ui = pandora.user.ui,

View file

@ -1,4 +1,5 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
pandora.ui.clipPlayer = function() {
// FIXME: is clipPlayer the best name for this?
var that = Ox.VideoPlayer({

View file

@ -1,5 +1,7 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
pandora.ui.clipsView = function(videoRatio) {
var that = Ox.SplitPanel({

View file

@ -1,5 +1,7 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
pandora.ui.contactForm = function() {
var that = Ox.Element(),

View file

@ -1,4 +1,5 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
pandora.ui.contentPanel = function() {
var that = Ox.SplitPanel({
elements: !pandora.user.ui.item ? [

View file

@ -1,5 +1,7 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
pandora.ui.deleteListDialog = function() {
var listData = pandora.getListData(),

View file

@ -1,5 +1,7 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
// fixme: this should be deleted!!
pandora.ui.annotations = function() {

View file

@ -1,5 +1,7 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
pandora.ui.eventsDialog = function() {
var height = Math.round((window.innerHeight - 48) * 0.9),
width = Math.round(window.innerWidth * 0.9),

View file

@ -1,5 +1,7 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
pandora.ui.filesView = function(options, self) {
var self = self || {},

View file

@ -1,4 +1,7 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
pandora.ui.filter = function(list) {
var that = Ox.Filter({
findKeys: Ox.merge(Ox.map(pandora.site.itemKeys, function(key) {

View file

@ -1,4 +1,5 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
pandora.ui.filterDialog = function(list) {
var that = Ox.Dialog({
buttons: [

View file

@ -1,4 +1,5 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
pandora.ui.findElement = function() {
var findIndex = pandora.user.ui._findState.index,
findKey = pandora.user.ui._findState.key,

View file

@ -1,4 +1,5 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
pandora.ui.folderBrowser = function(id) {
var that = Ox.SplitPanel({
elements: [

View file

@ -1,4 +1,5 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
pandora.ui.folderBrowserBar = function(id) {
var that = Ox.Bar({
size: 24

View file

@ -1,4 +1,5 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
pandora.ui.folderBrowserList = function(id) {
// fixme: user and name are set to the same width here,
// but resizeFolders will set them to different widths

View file

@ -1,5 +1,5 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
pandora.ui.folderList = function(id) {
var i = Ox.getPositionById(pandora.site.sectionFolders[pandora.user.ui.section], id),
that;

View file

@ -1,4 +1,5 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
pandora.ui.folders = function() {
var ui = pandora.user.ui,
that = Ox.Element()

View file

@ -1,4 +1,5 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
pandora.ui.group = function(id) {
var i = Ox.getPositionById(pandora.user.ui.groups, id),
group = Ox.getObjectById(pandora.site.groups, id),

View file

@ -1,4 +1,5 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
pandora.ui.helpDialog = function() {
var content = Ox.Element().css({margin: '16px'}),
that = Ox.Dialog({

View file

@ -1,5 +1,7 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
pandora.ui.home = function() {
var that = $('<div>')

View file

@ -1,5 +1,7 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
// fixme: remove
pandora.ui.homePage = function() {

View file

@ -1,4 +1,5 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
pandora.ui.info = function() {
var ui = pandora.user.ui,

View file

@ -1,3 +1,5 @@
'use strict';
pandora.ui.infoView = function(data) {
// fixme: given that currently, the info view doesn't scroll into view nicely

View file

@ -1,3 +1,5 @@
'use strict';
pandora.ui.itemClips = function(options) {
var self = {},

View file

@ -1,4 +1,5 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
pandora.ui.leftPanel = function() {
var that = Ox.SplitPanel({
elements: [

View file

@ -1,5 +1,7 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
pandora.ui.listDialog = function(section) {
section = section || 'general';

View file

@ -1,5 +1,7 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
pandora.ui.logsDialog = function() {
var height = Math.round((window.innerHeight - 48) * 0.9),
width = Math.round(window.innerWidth * 0.9),

View file

@ -1,4 +1,5 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
pandora.ui.mainPanel = function() {
var that = Ox.SplitPanel({
elements: [

View file

@ -1,3 +1,5 @@
'use strict';
pandora.ui.mediaView = function() {
var item = pandora.user.ui.item,

View file

@ -1,4 +1,5 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
pandora.ui.mainMenu = function() {
var isAdmin = pandora.user.level == 'admin',

View file

@ -1,4 +1,5 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
pandora.ui.namesDialog = function() {
// FIXME: add cache invalidation

View file

@ -1,5 +1,5 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
pandora.ui.navigationView = function(type, videoRatio) {
var ui = pandora.user.ui,

View file

@ -1,5 +1,5 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
pandora.ui.orderButton = function(isNavigationView) {
var sortKey = !pandora.user.ui.item ? 'listSort' : 'itemSort',
that = Ox.Button({

View file

@ -1,5 +1,7 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
pandora.ui.placesDialog = function() {
var height = Math.round((window.innerHeight - 48) * 0.9),
width = Math.round(window.innerWidth * 0.9),

View file

@ -1,3 +1,5 @@
'use strict';
pandora.ui.preferencesDialog = function() {
var tabs = [

View file

@ -1,4 +1,5 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
pandora.ui.publicListsDialog = function() { // fixme: unused
var that = Ox.Dialog({
buttons: [

View file

@ -1,5 +1,7 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
pandora.ui.rightPanel = function() {
var that;
if (pandora.user.ui.section == 'items') {

View file

@ -1,4 +1,5 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
pandora.ui.sectionButtons = function() {
var that = Ox.ButtonGroup({
buttons: [

View file

@ -1,4 +1,5 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
pandora.ui.sectionSelect = function() {
// fixme: duplicated
var that = Ox.Select({

View file

@ -1,4 +1,5 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
pandora.ui.sectionbar = function(mode) {
var that = Ox.Bar({
size: 24

View file

@ -1,4 +1,7 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
pandora.ui.siteDialog = function(section) {
var tabs = Ox.merge(

View file

@ -1,5 +1,7 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
pandora.ui.sortMenu = function() {
// fixme: unused

View file

@ -1,5 +1,7 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
pandora.ui.sortSelect = function(isNavigationView) {
var isClipView = pandora.isClipView(),
items = [],

View file

@ -1,4 +1,5 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
pandora.ui.status = function(key, data) {
var itemName = data.items != 1 ? pandora.site.itemName.plural : pandora.site.itemName.singular,
segments = [],

View file

@ -1,4 +1,5 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
pandora.ui.statusbar = function() {
var that = Ox.Bar({
size: 16

View file

@ -1,4 +1,5 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
pandora.ui.titlesDialog = function() {
var height = Math.round((window.innerHeight - 48) * 0.9),

View file

@ -1,5 +1,7 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
pandora.ui.toolbar = function() {
var ui = pandora.user.ui,
isNavigationView = !ui.item

View file

@ -1,4 +1,7 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
pandora.ui.usersDialog = function() {
var height = Math.round((window.innerHeight - 48) * 0.9),

View file

@ -1,5 +1,7 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
pandora.addList = function() {
// addList(isSmart, isFrom) or addList(list) [=duplicate]
var $folderList = pandora.$ui.folderList.personal,

View file

@ -1,5 +1,7 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
pandora.ui.videoPreview = function(data) {
var that = Ox.VideoPreview({
duration: data.duration,

View file

@ -1,5 +1,7 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
pandora.ui.viewSelect = function() {
var ui = pandora.user.ui,
sortKey = !ui.item ? 'listSort' : 'itemSort',