Skip to content
Browse files

Merge branch 'staging' into dev

  • Loading branch information...
2 parents b9bfd2c + cd7c69f commit ef28a5141dcf41f1b09594df3e770e66eb0271e9 @arthur-debert arthur-debert committed Sep 11, 2012
View
2 media/css/embedder/amara.scss
@@ -100,7 +100,6 @@ div.amara-tools {
@include vertical-gradient(#1B1C1D, #212223);
a.amara-button {
- // TODO: Have the CSS compiler convert these to absolute URLs.
background: transparent url('/site_media/images/embedder/amara-sprites.png') 0 0 no-repeat;
display: inline-block;
height: 36px;
@@ -177,7 +176,6 @@ div.amara-tools {
width: 21%;
.amara-current-language {
- // TODO: Have the CSS compiler convert these to absolute URLs.
background: transparent url('/site_media/images/embedder/amara-sprites.png') right -139px no-repeat;
color: #DEDEDE;
display: block;
View
1 media/js/embedder/amara-dev.js
@@ -12340,7 +12340,6 @@ Popcorn.plugin('amarasubtitle', {
style.rel = 'stylesheet';
style.type = 'text/css';
- // TODO: This needs to be a production URL based on DEBUG or not.
style.href = '/site_media/css/embedder/amara-dev.css';
tag.parentNode.insertBefore(style, tag);
View
1 media/js/embedder/amara.js
@@ -12340,7 +12340,6 @@ Popcorn.plugin('amarasubtitle', {
style.rel = 'stylesheet';
style.type = 'text/css';
- // TODO: This needs to be a production URL based on DEBUG or not.
style.href = 'http://staging.universalsubtitles.org/site_media/css/embedder/amara.css';
tag.parentNode.insertBefore(style, tag);
View
4 media/js/embedder/compile-embedder.sh
@@ -18,8 +18,8 @@ cp media/js/embedder/amara-dev.js media/js/embedder/amara.js
cp media/css/embedder/amara-dev.css media/css/embedder/amara.css
sed -i -e 's/amara-dev/amara/g' media/js/embedder/amara.js
-sed -i -e 's/\/site_media/http:\/\/staging.universalsubtitles.org\/site_media/g' media/js/embedder/amara.js
-sed -i -e 's/\/site_media/http:\/\/staging.universalsubtitles.org\/site_media/g' media/css/embedder/amara.css
+sed -i -e 's/\/site_media/https:\/\/staging.universalsubtitles.org\/site_media/g' media/js/embedder/amara.js
+sed -i -e 's/\/site_media/https:\/\/staging.universalsubtitles.org\/site_media/g' media/css/embedder/amara.css
rm media/css/embedder/amara.css-e
rm media/js/embedder/amara.js-e
View
1 media/js/embedder/embedder.js
@@ -554,7 +554,6 @@
style.rel = 'stylesheet';
style.type = 'text/css';
- // TODO: This needs to be a production URL based on DEBUG or not.
style.href = '/site_media/css/embedder/amara-dev.css';
tag.parentNode.insertBefore(style, tag);
View
52 templates/embedder-offsite.html
@@ -0,0 +1,52 @@
+<!DOCTYPE html>
+ <html lang="en">
+ <head>
+ <title>Embedder test for external sites.</title>
+ <meta charset="utf-8" />
+ <link rel="stylesheet" href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css" type="text/css" />
+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script>
+ <script type="text/javascript">
+ (function (window, document) {
+ var loader = function () {
+ var script = document.createElement('script'), tag = document.getElementsByTagName('script')[0];
+ script.src = 'https://staging.universalsubtitles.org/site_media/js/embedder/amara.js';
+ tag.parentNode.insertBefore(script, tag);
+ };
+ window.addEventListener ? window.addEventListener('load', loader, false) : window.attachEvent('onload', loader);
+ })(window, document);
+ </script>
+ <style type="text/css" media="screen">
+ body {
+ margin: 20px 0 500px 0;
+ }
+ p {
+ margin: 20px 0;
+ }
+ </style>
+ </head>
+ <body>
+ <div class="container main">
+ <div class="navbar">
+ <div class="navbar-inner">
+ <div class="container">
+ <a class="brand" href="/embedder/">
+ Amara Embedder
+ </a>
+ <ul class="nav pull-right">
+ <li><a href="http://universalsubtitles.org">Amara (Universal Subtitles)</a></li>
+ <li><a href="http://popcornjs.org">Popcorn.js</a></li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ <section class="main">
+ <p>Step 1: paste this in-between your head tags:</p>
+ <script type="text/javascript" src="https://snipt.net/embed/b40956e6b61188ed54e001dc6382bf04/"></script>
+ <p>Step 2: paste this somewhere inside your HTML body, with the video URL, height, and width of your choosing:</p>
+ <script type="text/javascript" src="https://snipt.net/embed/0f2bd07c64809fab54ec2b2a7a9ea34d/"></script>
+ <p>Demo:</p>
+ <div class="amara-embed" style="height: 480px; width: 854px" data-url="http://www.youtube.com/watch?v=bNySL-ihAvo"></div>
+ </section>
+ </div>
+ </body>
+</html>
View
12 templates/videos/subtitle-view.html
@@ -167,22 +167,22 @@ <h2 class="main-title">
</span>
<ul>
<li>
- <a href="{% url widget:download_srt %}?video_id={{ video.video_id }}{% if not language.is_original %}&lang_pk={{ language.pk }}{% endif %}&revision={{ last_version.version_no }}">SRT</a>
+ <a href="{% url widget:download_srt %}?video_id={{ video.video_id }}&lang_pk={{ language.pk }}&revision={{ last_version.version_no }}">SRT</a>
</li>
<li>
- <a href="{% url widget:download_ssa %}?video_id={{ video.video_id }}{% if not language.is_original %}&lang_pk={{ language.pk }}{% endif %}&revision={{ last_version.version_no }}">SSA</a>
+ <a href="{% url widget:download_ssa %}?video_id={{ video.video_id }}&lang_pk={{ language.pk }}&revision={{ last_version.version_no }}">SSA</a>
</li>
<li>
- <a href="{% url widget:download_ttml %}?video_id={{ video.video_id }}{% if not language.is_original %}&lang_pk={{ language.pk }}{% endif %}&revision={{ last_version.version_no }}">TTML</a>
+ <a href="{% url widget:download_ttml %}?video_id={{ video.video_id }}&lang_pk={{ language.pk }}&revision={{ last_version.version_no }}">TTML</a>
</li>
<li>
- <a href="{% url widget:download_txt %}?video_id={{ video.video_id }}{% if not language.is_original %}&lang_pk={{ language.pk }}{% endif %}&revision={{ last_version.version_no }}">TXT</a>
+ <a href="{% url widget:download_txt %}?video_id={{ video.video_id }}&lang_pk={{ language.pk }}&revision={{ last_version.version_no }}">TXT</a>
</li>
<li>
- <a href="{% url widget:download_sbv %}?video_id={{ video.video_id }}{% if not language.is_original %}&lang_pk={{ language.pk }}{% endif %}&revision={{ last_version.version_no }}">SBV</a>
+ <a href="{% url widget:download_sbv %}?video_id={{ video.video_id }}&lang_pk={{ language.pk }}&revision={{ last_version.version_no }}">SBV</a>
</li>
<li>
- <a href="{% url widget:download_dfxp %}?video_id={{ video.video_id }}{% if not language.is_original %}&lang_pk={{ language.pk }}{% endif %}&revision={{ last_version.version_no }}">DFXP</a>
+ <a href="{% url widget:download_dfxp %}?video_id={{ video.video_id }}&lang_pk={{ language.pk }}&revision={{ last_version.version_no }}">DFXP</a>
</li>
</ul>
</div>
View
2 urls.py
@@ -112,6 +112,8 @@
{'template': 'enterprise.html'}, 'enterprise_page'),
url(r'^embedder/$', 'django.views.generic.simple.direct_to_template',
{'template': 'embedder.html'}, 'embedder_page'),
+ url(r'^embedder-offsite/$', 'django.views.generic.simple.direct_to_template',
+ {'template': 'embedder-offsite.html'}, 'embedder_page_offsite'),
url(r'^streaming-transcript/$', 'django.views.generic.simple.direct_to_template',
{'template': 'streaming-transcript.html'}, 'streaming_transcript_demo'),
url(r'^w3c/p3p.xml$', 'django.views.generic.simple.direct_to_template',

0 comments on commit ef28a51

Please sign in to comment.
Something went wrong with that request. Please try again.