From 3e7cc90040ec26d53c488826b8c73f9075dc47b1 Mon Sep 17 00:00:00 2001 From: rolux Date: Sun, 16 Feb 2014 12:04:52 +0000 Subject: [PATCH] update embed dialog --- static/js/embedDialog.js | 192 ++++++++++++++++++++------------------- 1 file changed, 98 insertions(+), 94 deletions(-) diff --git a/static/js/embedDialog.js b/static/js/embedDialog.js index fb43d480b..d805dbfcf 100644 --- a/static/js/embedDialog.js +++ b/static/js/embedDialog.js @@ -19,6 +19,7 @@ pandora.ui.embedDialog = function(/*[url, ]callback*/) { dialogWidth = listWidth + formWidth + 32 + Ox.UI.SCROLLBAR_SIZE, dialogHeight = 384, linkPlaceholder = '...', + options = {}, positionPlaceholder = '00:00:00.000', sites = [pandora.site.site].concat(pandora.site.sites).map(function(site) { return {id: site.url, title: site.url, https: site.https}; @@ -30,13 +31,13 @@ pandora.ui.embedDialog = function(/*[url, ]callback*/) { { id: 'info', title: Ox._('Info'), - description: Ox._('Embed poster and basic metadata'), + description: Ox._('Embed a Poster and Basic Metadata'), inputs: ['item'] }, { id: 'video', title: Ox._('Video'), - description: Ox._('Embed a clip or a full video'), + description: Ox._('Embed a Clip or a Full Video'), inputs: [ 'item', 'position', 'in', 'out', 'annotation', 'title', 'showTimeline', 'showAnnotations', 'matchRatio' @@ -45,25 +46,25 @@ pandora.ui.embedDialog = function(/*[url, ]callback*/) { { id: 'timeline', title: Ox._('Timeline'), - description: Ox._('Embed a timeline'), + description: Ox._('Embed a Timeline'), inputs: ['item', 'position', 'title'] }, { id: 'list', title: Ox._('List'), - description: Ox._('Embed list icon and description'), + description: Ox._('Embed a List Icon and Description'), inputs: ['list'] }, { id: 'grid', title: Ox._('Grid'), - description: Ox._('Embed movies as a grid'), + description: Ox._('Embed Movies as a Grid'), inputs: ['find', 'sort', 'title'] }, { id: 'map', title: Ox._('Map'), - description: Ox._('Embed a map view'), + description: Ox._('Embed a Map View'), inputs: ['switch', 'item', 'find', 'sort', 'title'] }, { @@ -75,13 +76,13 @@ pandora.ui.embedDialog = function(/*[url, ]callback*/) { { id: 'document', title: Ox._('Document'), - description: Ox._('Embed a document'), + description: Ox._('Embed a Document'), inputs: ['document'] }, { id: 'edit', title: Ox._('Edit'), - description: Ox._('Embed an edited video'), + description: Ox._('Embed an Edited Video'), inputs: [ 'edit', 'position', 'showTimeline', 'showAnnotations', 'matchRatio' @@ -184,13 +185,16 @@ pandora.ui.embedDialog = function(/*[url, ]callback*/) { $($input.advanced.find('.OxButton')[0]).css({margin: 0}); $(that.find('.OxBar')[1]).append($input.advanced); - updateAPI(); + updateOptions(); + updateAPI(function() { + updateDefaults(true); + }); function formatHTML() { var type = $input.type.value(); return type == 'link' ? '' + $input.text.value() + + '">' + $input.link.value() + '' : '