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})"
|
||||
|
||||
.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
|
||||
#file-upload
|
||||
= image_tag 'icons/photos.png'
|
||||
|
|
|
|||
|
|
@ -52,7 +52,6 @@ var Stream = {
|
|||
});
|
||||
|
||||
$(".new_status_message").live('ajax:success', function(data, json, xhr) {
|
||||
json = $.parseJSON(json);
|
||||
WebSocketReceiver.addPostToStream(json.post_id, json.html);
|
||||
//collapse publisher
|
||||
Publisher.close();
|
||||
|
|
|
|||
Loading…
Reference in a new issue