fix js error; stream ajax success handler should expect json
This commit is contained in:
parent
ead1f80b08
commit
c7362707b3
2 changed files with 1 additions and 2 deletions
|
|
@ -19,7 +19,7 @@
|
||||||
= "(#{@aspect_ids.length} #{t('_aspects').downcase})"
|
= "(#{@aspect_ids.length} #{t('_aspects').downcase})"
|
||||||
|
|
||||||
.content_creation
|
.content_creation
|
||||||
= form_for(StatusMessage.new, :remote => true) do |status|
|
= form_for(StatusMessage.new, :remote => true, :html => {"data-type" => "json"}) do |status|
|
||||||
= status.error_messages
|
= status.error_messages
|
||||||
#file-upload
|
#file-upload
|
||||||
= image_tag 'icons/photos.png'
|
= image_tag 'icons/photos.png'
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,6 @@ var Stream = {
|
||||||
});
|
});
|
||||||
|
|
||||||
$(".new_status_message").live('ajax:success', function(data, json, xhr) {
|
$(".new_status_message").live('ajax:success', function(data, json, xhr) {
|
||||||
json = $.parseJSON(json);
|
|
||||||
WebSocketReceiver.addPostToStream(json.post_id, json.html);
|
WebSocketReceiver.addPostToStream(json.post_id, json.html);
|
||||||
//collapse publisher
|
//collapse publisher
|
||||||
Publisher.close();
|
Publisher.close();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue