annotate app/assets/javascripts/zp.new.coffee @ 370:5a4d31e97937

Remove extra file extensions.
author edogawaconan <me@myconan.net>
date Tue, 14 Apr 2015 00:22:07 +0900
parents app/assets/javascripts/zp.new.js.coffee@66fd92af3977
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
351
66fd92af3977 coffee: new.
edogawaconan <me@myconan.net>
parents: 347
diff changeset
1 #= require jquery.autosize
66fd92af3977 coffee: new.
edogawaconan <me@myconan.net>
parents: 347
diff changeset
2 #= require autosize_box_fix
66fd92af3977 coffee: new.
edogawaconan <me@myconan.net>
parents: 347
diff changeset
3 window.zp.new =
66fd92af3977 coffee: new.
edogawaconan <me@myconan.net>
parents: 347
diff changeset
4 input: -> $("#paste_paste")
66fd92af3977 coffee: new.
edogawaconan <me@myconan.net>
parents: 347
diff changeset
5
66fd92af3977 coffee: new.
edogawaconan <me@myconan.net>
parents: 347
diff changeset
6 clear: (e) ->
66fd92af3977 coffee: new.
edogawaconan <me@myconan.net>
parents: 347
diff changeset
7 e.preventDefault()
66fd92af3977 coffee: new.
edogawaconan <me@myconan.net>
parents: 347
diff changeset
8 @input().val("").focus()
66fd92af3977 coffee: new.
edogawaconan <me@myconan.net>
parents: 347
diff changeset
9
66fd92af3977 coffee: new.
edogawaconan <me@myconan.net>
parents: 347
diff changeset
10 init: ->
66fd92af3977 coffee: new.
edogawaconan <me@myconan.net>
parents: 347
diff changeset
11 return unless @input().length
66fd92af3977 coffee: new.
edogawaconan <me@myconan.net>
parents: 347
diff changeset
12
66fd92af3977 coffee: new.
edogawaconan <me@myconan.net>
parents: 347
diff changeset
13 $(document).on "click", "#reset_paste", $.proxy(@clear, this)
66fd92af3977 coffee: new.
edogawaconan <me@myconan.net>
parents: 347
diff changeset
14 @input().autosize className: "mirrored_text form-control", append: "\n"
66fd92af3977 coffee: new.
edogawaconan <me@myconan.net>
parents: 347
diff changeset
15 $.autosize_box_fix $(".mirrored_text")
66fd92af3977 coffee: new.
edogawaconan <me@myconan.net>
parents: 347
diff changeset
16 @input().focus()