Sha256: 5fea26e0ce071d1135342e01ff385e4c0ac290e6dd5877f885e24c67dca744cd

Contents?: true

Size: 959 Bytes

Versions: 1

Compression:

Stored size: 959 Bytes

Contents

class Ponytail.Views.Index extends Backbone.View
  events:
    "click .close a": "closeNotice"
    "click .migration_files .filename": "clickFileName"
    "click .new_button": "clickNewButton"
    "click .migrate_button": "clickMigrateButton"
    "click .rollback_button": "clickRollbackButton"

  closeNotice: ->
    $(".notice").hide()
    false

  clickFileName: (e) ->
    @$(".migration_file .migration_filename").text(e.target.innerHTML)
    @$(".migration_file .migration_filename").removeClass("highlight")
    setTimeout( ->
      @$(".migration_file .migration_filename").addClass("highlight")
    , 100)
    raw_content = $(e.target).parent().find(".raw_content").text()
    @$(".migration_file .raw_content pre").text(raw_content)

  clickNewButton: ->
    window.location.href = "migrations/new"

  clickMigrateButton: ->
    window.location.href = "migrations/migrate"

  clickRollbackButton: ->
    window.location.href = "migrations/rollback"

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ponytail-0.4.0 app/assets/javascripts/ponytail/views/index.coffee