view app/assets/javascripts/zp.new.js @ 284:bd29f6af1f1c

Add a bit more padding on footer.
author edogawaconan <me@myconan.net>
date Wed, 16 Oct 2013 04:02:57 +0900
parents 45bd94c70896
children 3ce44f960d3a
line wrap: on
line source

//= require jquery.autosize
//= require autosize-box-fix
(function($) {
  window.zp.new = {
    input: function() { return $("#paste_paste") },
    clear: function(e) {
      this.input().val("").focus()
      e.preventDefault()
    },
    init: function() {
      if (this.input().length === 0) { return }
      $(document).on('click', "#reset_paste", $.proxy(this.clear, this))
      this.input().autosize({ className: 'mirrored_text form-control', append: "\n"});
      $.autosize_box_fix($(".mirrored_text"))
      this.input().focus()
    }
  }
})(jQuery)