Sha256: eeb7aee547fbad4fe53432f29aee0a229b8d0ff9024406bb460e5a88d63a0903

Contents?: true

Size: 501 Bytes

Versions: 13

Compression:

Stored size: 501 Bytes

Contents

#= require teaspoon/reporters/html/progress_view

class Teaspoon.Reporters.HTML.SimpleProgressView extends Teaspoon.Reporters.HTML.ProgressView

  build: ->
    @el = @createEl("div", "simple-progress")
    @el.innerHTML = """
      <em id="teaspoon-progress-percent">0%</em>
      <span id="teaspoon-progress-span" class="teaspoon-indicator"></span>
    """


  update: (total, run) ->
    percent = if total then Math.ceil((run * 100) / total) else 0
    @setHtml("progress-percent", "#{percent}%")

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
teaspoon-1.4.0 app/assets/javascripts/teaspoon/reporters/html/simple_progress_view.coffee
teaspoon-1.2.2 app/assets/javascripts/teaspoon/reporters/html/simple_progress_view.coffee
teaspoon-1.2.1 app/assets/javascripts/teaspoon/reporters/html/simple_progress_view.coffee
teaspoon-1.2.0 app/assets/javascripts/teaspoon/reporters/html/simple_progress_view.coffee
teaspoon-1.1.5 app/assets/javascripts/teaspoon/reporters/html/simple_progress_view.coffee
teaspoon-1.1.4 app/assets/javascripts/teaspoon/reporters/html/simple_progress_view.coffee
teaspoon-1.1.3 app/assets/javascripts/teaspoon/reporters/html/simple_progress_view.coffee
teaspoon-1.1.2 app/assets/javascripts/teaspoon/reporters/html/simple_progress_view.coffee
teaspoon-1.1.1 app/assets/javascripts/teaspoon/reporters/html/simple_progress_view.coffee
teaspoon-1.1.0 app/assets/javascripts/teaspoon/reporters/html/simple_progress_view.coffee
teaspoon-1.0.2 app/assets/javascripts/teaspoon/reporters/html/simple_progress_view.coffee
teaspoon-1.0.1 app/assets/javascripts/teaspoon/reporters/html/simple_progress_view.coffee
teaspoon-1.0.0 app/assets/javascripts/teaspoon/reporters/html/simple_progress_view.coffee