'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',