Mercurial > zeropaste
annotate app/assets/javascripts/zp.new.coffee @ 379:2ad092e60975
[mq]: new-design
| author | nanaya <me@myconan.net> |
|---|---|
| date | Sun, 07 Jun 2015 02:35:12 +0900 |
| parents | 5a4d31e97937 |
| children |
| rev | line source |
|---|---|
| 351 | 1 #= require jquery.autosize |
| 2 #= require autosize_box_fix | |
| 3 window.zp.new = | |
| 4 input: -> $("#paste_paste") | |
| 5 | |
| 6 clear: (e) -> | |
| 7 e.preventDefault() | |
| 8 @input().val("").focus() | |
| 9 | |
| 10 init: -> | |
| 11 return unless @input().length | |
| 12 | |
| 13 $(document).on "click", "#reset_paste", $.proxy(@clear, this) | |
| 14 @input().autosize className: "mirrored_text form-control", append: "\n" | |
| 15 $.autosize_box_fix $(".mirrored_text") | |
| 16 @input().focus() |
