Test and fix embedder after changing aspects

This commit is contained in:
Raphael Sofaer 2011-04-25 12:24:38 -07:00
parent ba3b4f7d60
commit 9940f19962
3 changed files with 10 additions and 4 deletions

View file

@ -17,3 +17,9 @@ Feature: embedding
When I follow "Youtube: Leekspin"
And I wait for the ajax to finish
Then I should see "Watch this video on YouTube" within ".video-container"
#After ajax aspect switch
When I follow "Besties"
And I wait for the ajax to finish
And I follow "Youtube: Leekspin"
Then I should see "Watch this video on YouTube" within ".video-container"

View file

@ -9,7 +9,7 @@ var Stream = {
$(".status_message_delete").tipsy({trigger: 'hover', gravity: 'n'});
Diaspora.widgets.subscribe("stream/reloaded", Stream.initialized);
Diaspora.widgets.subscribe("stream/reloaded", Stream.initialize);
Diaspora.widgets.timeago.updateTimeAgo();
Diaspora.widgets.directionDetector.updateBinds();
@ -96,7 +96,7 @@ var Stream = {
Diaspora.widgets.alert.alert('Failed to post message!');
});
$(".stream").find(".comment_delete", ".comment").live('ajax:success', function(data, html, xhr) {
$stream.find(".comment_delete", ".comment").live('ajax:success', function(data, html, xhr) {
var element = $(this),
target = element.parents(".comment"),
post = element.closest('.stream_element'),

View file

@ -52,7 +52,7 @@
};
Embedder.prototype.start = function() {
$(".stream").delegate("a.video-link", "click", this.onVideoLinkClicked);
$("#main_stream a.video-link").live("click", this.onVideoLinkClicked);
this.registerServices();
var $post = $("#main_stream").children(".stream_element:first"),
@ -63,7 +63,7 @@
Embedder.prototype.registerServices = function() {
var watchVideoOn = Diaspora.widgets.i18n.t("videos.watch");
this.register("youtube.com",
'<a href="//www.youtube.com/watch?v={{video-id}}" target="_blank">' + $.mustache(watchVideoOn, { provider: "YouTube" }) + '</a><br />' +
'<iframe class="youtube-player" type="text/html" src="http://www.youtube.com/embed/{{video-id}}?wmode=opaque"></iframe>');