put ajax:success for publisher where it belongs
This commit is contained in:
parent
d5916c9287
commit
01e557ba7a
2 changed files with 3 additions and 5 deletions
|
|
@ -17,11 +17,6 @@
|
||||||
$("#publisher .options_and_submit").show();
|
$("#publisher .options_and_submit").show();
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#publisher form").live("ajax:success", function(){
|
|
||||||
$("#publisher").addClass("closed");
|
|
||||||
$("#photodropzone").find('li').remove();
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#click_to_share").find("a").bind("click", function(evt){
|
$("#click_to_share").find("a").bind("click", function(evt){
|
||||||
$("#publisher").removeClass("closed");
|
$("#publisher").removeClass("closed");
|
||||||
$("#publisher").find("textarea").focus();
|
$("#publisher").find("textarea").focus();
|
||||||
|
|
|
||||||
|
|
@ -95,6 +95,9 @@ var Stream = {
|
||||||
$(".new_status_message").bind('ajax:success', function(data, json, xhr) {
|
$(".new_status_message").bind('ajax:success', function(data, json, xhr) {
|
||||||
json = $.parseJSON(json);
|
json = $.parseJSON(json);
|
||||||
WebSocketReceiver.addPostToStream(json['post_id'], json['html']);
|
WebSocketReceiver.addPostToStream(json['post_id'], json['html']);
|
||||||
|
//collapse publisher
|
||||||
|
$("#publisher").addClass("closed");
|
||||||
|
$("#photodropzone").find('li').remove();
|
||||||
});
|
});
|
||||||
$(".new_status_message").bind('ajax:failure', function(data, html, xhr) {
|
$(".new_status_message").bind('ajax:failure', function(data, html, xhr) {
|
||||||
alert('failed to post message!');
|
alert('failed to post message!');
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue