annotate 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
215
0e52170b7b6a Missed the keyword require
Edho Arief <edho@myconan.net>
parents: 214
diff changeset
1 //= require jquery.autosize
214
22c4b5f90e24 Massive javascript and html refactor. Also, ie9
Edho Arief <edho@myconan.net>
parents:
diff changeset
2 //= require autosize-box-fix
22c4b5f90e24 Massive javascript and html refactor. Also, ie9
Edho Arief <edho@myconan.net>
parents:
diff changeset
3 (function($) {
22c4b5f90e24 Massive javascript and html refactor. Also, ie9
Edho Arief <edho@myconan.net>
parents:
diff changeset
4 window.zp.new = {
22c4b5f90e24 Massive javascript and html refactor. Also, ie9
Edho Arief <edho@myconan.net>
parents:
diff changeset
5 input: function() { return $("#paste_paste") },
22c4b5f90e24 Massive javascript and html refactor. Also, ie9
Edho Arief <edho@myconan.net>
parents:
diff changeset
6 clear: function(e) {
22c4b5f90e24 Massive javascript and html refactor. Also, ie9
Edho Arief <edho@myconan.net>
parents:
diff changeset
7 this.input().val("").focus()
22c4b5f90e24 Massive javascript and html refactor. Also, ie9
Edho Arief <edho@myconan.net>
parents:
diff changeset
8 e.preventDefault()
22c4b5f90e24 Massive javascript and html refactor. Also, ie9
Edho Arief <edho@myconan.net>
parents:
diff changeset
9 },
22c4b5f90e24 Massive javascript and html refactor. Also, ie9
Edho Arief <edho@myconan.net>
parents:
diff changeset
10 init: function() {
217
cbd5819d7468 Completely wtf init for zp.new
Edho Arief <edho@myconan.net>
parents: 215
diff changeset
11 if (this.input().length === 0) { return }
214
22c4b5f90e24 Massive javascript and html refactor. Also, ie9
Edho Arief <edho@myconan.net>
parents:
diff changeset
12 $(document).on('click', "#reset_paste", $.proxy(this.clear, this))
262
45bd94c70896 Fix class name for form autoresizer.
edogawaconan <me@myconan.net>
parents: 217
diff changeset
13 this.input().autosize({ className: 'mirrored_text form-control', append: "\n"});
214
22c4b5f90e24 Massive javascript and html refactor. Also, ie9
Edho Arief <edho@myconan.net>
parents:
diff changeset
14 $.autosize_box_fix($(".mirrored_text"))
22c4b5f90e24 Massive javascript and html refactor. Also, ie9
Edho Arief <edho@myconan.net>
parents:
diff changeset
15 this.input().focus()
22c4b5f90e24 Massive javascript and html refactor. Also, ie9
Edho Arief <edho@myconan.net>
parents:
diff changeset
16 }
22c4b5f90e24 Massive javascript and html refactor. Also, ie9
Edho Arief <edho@myconan.net>
parents:
diff changeset
17 }
22c4b5f90e24 Massive javascript and html refactor. Also, ie9
Edho Arief <edho@myconan.net>
parents:
diff changeset
18 })(jQuery)