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" When I follow "Youtube: Leekspin"
And I wait for the ajax to finish And I wait for the ajax to finish
Then I should see "Watch this video on YouTube" within ".video-container" 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'}); $(".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.timeago.updateTimeAgo();
Diaspora.widgets.directionDetector.updateBinds(); Diaspora.widgets.directionDetector.updateBinds();
@ -96,7 +96,7 @@ var Stream = {
Diaspora.widgets.alert.alert('Failed to post message!'); 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), var element = $(this),
target = element.parents(".comment"), target = element.parents(".comment"),
post = element.closest('.stream_element'), post = element.closest('.stream_element'),

View file

@ -52,7 +52,7 @@
}; };
Embedder.prototype.start = function() { Embedder.prototype.start = function() {
$(".stream").delegate("a.video-link", "click", this.onVideoLinkClicked); $("#main_stream a.video-link").live("click", this.onVideoLinkClicked);
this.registerServices(); this.registerServices();
var $post = $("#main_stream").children(".stream_element:first"), var $post = $("#main_stream").children(".stream_element:first"),