Commit 363c5490 by E. Kolpakov Committed by Zia Fazal

Global setting for asynchronous ajax calls - to overcome firefox's strictness…

Global setting for asynchronous ajax calls - to overcome firefox's strictness about using synchronous ajax with credentials
parent af2a3a53
...@@ -99,7 +99,6 @@ if Backbone? ...@@ -99,7 +99,6 @@ if Backbone?
@$el.append($discussion) @$el.append($discussion)
@newPostForm = $('.new-post-article') @newPostForm = $('.new-post-article')
async = @options.async_thread_views
@threadviews = @discussion.map (thread) => @threadviews = @discussion.map (thread) =>
view = new DiscussionThreadView( view = new DiscussionThreadView(
el: @$("article#thread_#{thread.id}"), el: @$("article#thread_#{thread.id}"),
......
...@@ -22,8 +22,6 @@ if Backbone? ...@@ -22,8 +22,6 @@ if Backbone?
if @mode not in ["tab", "inline"] if @mode not in ["tab", "inline"]
throw new Error("invalid mode: " + @mode) throw new Error("invalid mode: " + @mode)
@async_thread_views = if options.async_thread_views? then options.async_thread_views else false
# Quick fix to have an actual model when we're receiving new models from # Quick fix to have an actual model when we're receiving new models from
# the server. # the server.
@model.collection.on "reset", (collection) => @model.collection.on "reset", (collection) =>
...@@ -229,7 +227,7 @@ if Backbone? ...@@ -229,7 +227,7 @@ if Backbone?
renderResponseToList: (response, listSelector, options) => renderResponseToList: (response, listSelector, options) =>
response.set('thread', @model) response.set('thread', @model)
view = new ThreadResponseView($.extend({model: response, async: @async_thread_views}, options)) view = new ThreadResponseView($.extend({model: response}, options))
view.on "comment:add", @addComment view.on "comment:add", @addComment
view.on "comment:endorse", @endorseThread view.on "comment:endorse", @endorseThread
view.render() view.render()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment