Sha256: 85bfaf1f2c79c6382dc18f957dbcd0f25744c95e56d00dc19fce0373845042d7

Contents?: true

Size: 712 Bytes

Versions: 8

Compression:

Stored size: 712 Bytes

Contents

window.ManualClone =
  init: ->
    form = $('.manual_clone')
    field = form.find('input')
    button = form.find('button')
    manual_clone = ->
      input = field.val()
      if input.length > 0
        if not button.attr('disabled')
          button.attr('disabled', 'disabled')
          $.post '/build/create', {clone_url: input}, (response) ->
            field.val('')
            button.removeAttr('disabled')
      else
        alert "Enter a local path or remote url to a git repo, e.g.:\n
        Local: /Users/your/project\n
        Remote: https://github.com/your/project"

    field.keypress (e) ->
      if e.keyCode is 13
        manual_clone()

    button.on 'click', ->
      manual_clone()

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
bait-0.5.13 app/js/manual_clone.coffee
bait-0.5.12 app/js/manual_clone.coffee
bait-0.5.11 app/js/manual_clone.coffee
bait-0.5.10 app/js/manual_clone.coffee
bait-0.5.9 app/js/manual_clone.coffee
bait-0.5.6 app/js/manual_clone.coffee
bait-0.5.5 app/js/manual_clone.coffee
bait-0.5.4 app/js/manual_clone.coffee