Sha256: 01a98e62a342c046e8099d1a3ef362f88e00c0a8bf218cff86c90621fcaf749f

Contents?: true

Size: 565 Bytes

Versions: 8

Compression:

Stored size: 565 Bytes

Contents

angular.module("SWAT").factory "RevisionModel", ->
  class RevisionModel
    constructor: (@data) ->
      #@prepareThreads()
      console.log(@data)

    prepareThreads: ->
      for thread in @data.threads
        thread.tests = @data.tests[thread.thread_id] if @data.tests

angular.module("SWAT").factory "RevisionModelFactory", (RevisionModel, GlResponse)->
  (jsonResponse)->
    object = new GlResponse(jsonResponse)
    if _.isArray(object)
      result = object.map (u)-> new RevisionModel(u)

    else
      result = new RevisionModel(object)
    result

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
sw2at-ui-0.0.8 app/assets/javascripts/swat/app/factories/revision_model.coffee
sw2at-ui-0.0.7 app/assets/javascripts/swat/app/factories/revision_model.coffee
sw2at-ui-0.0.6 app/assets/javascripts/swat/app/factories/revision_model.coffee
sw2at-ui-0.0.5 app/assets/javascripts/swat/app/factories/revision_model.coffee
sw2at-ui-0.0.4 app/assets/javascripts/swat/app/factories/revision_model.coffee
sw2at-ui-0.0.3 app/assets/javascripts/swat/app/factories/revision_model.coffee
sw2at-ui-0.0.2 app/assets/javascripts/swat/app/factories/revision_model.coffee
sw2at-ui-0.0.1 app/assets/javascripts/swat/app/factories/revision_model.coffee