diff --git a/pandora/urls.py b/pandora/urls.py index 939a5f88..ad2b3c12 100644 --- a/pandora/urls.py +++ b/pandora/urls.py @@ -49,7 +49,7 @@ urlpatterns += patterns('', (r'^(V[a-z0-9]*/.*)$', 'urlalias.views.padma_video'), ) urlpatterns += patterns('', - (r'^(?P[A-Z0-9].+)/embed', 'app.views.embed'), + (r'^(?P[A-Z0-9].*)/embed', 'app.views.embed'), (r'^(?P[A-Z0-9].*)$', 'item.views.item'), (r'^[a-z0-9].+$', 'app.views.index'), (r'^$', 'app.views.index'), diff --git a/static/js/pandora/embedDialog.js b/static/js/pandora/embedDialog.js new file mode 100644 index 00000000..70d6c42e --- /dev/null +++ b/static/js/pandora/embedDialog.js @@ -0,0 +1,39 @@ +// vim: et:ts=4:sw=4:sts=4:ft=javascript +'use strict'; + +pandora.ui.embedDialog = function(data) { + var content = Ox.Element().css({margin: '16px'}), + height = 240, + width = 320, + that = Ox.Dialog({ + buttons: [ + Ox.Button({ + id: 'close', + title: 'Close' + }).bindEvent({ + click: function() { + that.close(); + } + }) + ], + closeButton: true, + content: content, + height: Math.round((window.innerHeight - 24) * 0.75), + keys: { + 'escape': 'close' + }, + maximizeButton: true, + minHeight: 256, + minWidth: 640, + title: 'Embed Video', + width: Math.round(window.innerWidth * 0.75) + }) + .bindEvent({ + close: function(data) { + } + }), + url = document.location.origin + '/' + pandora.user.ui.item + '/embed'; + content.html('To embed this video you need unicorns... or try this code:
'); + content.append($('