diff --git a/static/js/api/pandora.js b/static/js/api/pandora.js index 6c45fddc0..fe063b8a1 100755 --- a/static/js/api/pandora.js +++ b/static/js/api/pandora.js @@ -26,9 +26,10 @@ var app = new Ox.App({ app.api.api({docs: true, code: true}, function(results) { app.actions = results.data.actions; - - if(document.location.hash) { - app.$ui.actionList.triggerEvent('select', {ids: document.location.hash.substring(1).split(',')}); + if (document.location.hash) { + app.$ui.actionList.triggerEvent('select', { + ids: document.location.hash.substring(1).split(',') + }); } }); @@ -84,11 +85,7 @@ function constructList() { id: 'actionList', items: function(data, callback) { function _sort(a, b) { - if(a.name > b.name) - return 1; - else if(a.name == b.name) - return 0; - return -1; + return a.name > b.name ? 1 : a.name == b.name ? 0 : -1; } if (!data.keys) { app.api.api(function(results) { @@ -123,10 +120,10 @@ function constructList() { select: function(data) { var info = $('
').addClass('OxSelectable'), hash = '#'; - if(data.ids.length) + if (data.ids.length) data.ids.forEach(function(id) { info.append( - $("

") + $('

') .html(id) .css({ marginBottom: '8px' diff --git a/static/js/embed/pandora.js b/static/js/embed/pandora.js index 5feb89948..79dc57584 100755 --- a/static/js/embed/pandora.js +++ b/static/js/embed/pandora.js @@ -57,9 +57,11 @@ Ox.load('UI', { Ox.UI.hideLoadingScreen(); function checkRange(data) { - if(data.position < options['in'] - 0.04 - || data.position > options.out) { - if(!pandora.player.options('paused')) { + if ( + data.position < options['in'] - 0.04 + || data.position > options.out + ) { + if (!pandora.player.options('paused')) { pandora.player.togglePaused(); } pandora.player.options({ diff --git a/static/js/pandora.js b/static/js/pandora.js index e12285c87..2f7f1709a 100644 --- a/static/js/pandora.js +++ b/static/js/pandora.js @@ -320,12 +320,12 @@ appPanel }); pandora.site.sectionButtonsWidth = pandora.$ui.sectionButtons.width() + 8; - if(localStorage && localStorage['pandora.onload']) { + if (localStorage && localStorage['pandora.onload']) { try { eval(localStorage['pandora.onload']) - } catch(e) { - } + } catch(e) {} } + }); } diff --git a/static/js/pandora/embedDialog.js b/static/js/pandora/embedDialog.js index e1d17b288..a4b781d89 100644 --- a/static/js/pandora/embedDialog.js +++ b/static/js/pandora/embedDialog.js @@ -2,6 +2,7 @@ 'use strict'; pandora.ui.embedDialog = function(data) { + var content = Ox.Element().css({margin: '16px'}), height = 360, width = 640, @@ -33,36 +34,41 @@ pandora.ui.embedDialog = function(data) { data.view = 'video'; - function constructUrl(data) { + content.html('To embed this video use this code on your page:
'); + content.append( + $('