Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- _asyncPcrCheck: (collection) ->
- requestBatch = []
- @presentationCollection = collection
- context = this
- presentation_ids = _.map App.data.my_presentations.models, (model) -> model.id
- _.each presentation_ids, (presentation_id) =>
- requestBatch.push(presentation_id)
- if requestBatch.length > 4 or requestBatch.length == presentation_ids.length
- $.ajax
- url: "presentations/moments/presentations_content_refresh"
- conxtext: context
- data:
- presentation_ids: requestBatch
- success: context.presentationUpdateCallback
- presentation_ids = _.difference(presentation_ids, requestBatch)
- requestBatch = []
- return
- _presentationUpdateCallback: (data) ->
- console.log data
- console.log this
- console.log @presentationCollection
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement