annotate app/assets/javascripts/zp.new.js @ 215:0e52170b7b6a

Missed the keyword require
author Edho Arief <edho@myconan.net>
date Sun, 12 May 2013 02:47:56 +0900
parents 22c4b5f90e24
children cbd5819d7468
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() {
22c4b5f90e24 Massive javascript and html refactor. Also, ie9
Edho Arief <edho@myconan.net>
parents:
diff changeset
11 if (this.input() == "undefined") { return }
22c4b5f90e24 Massive javascript and html refactor. Also, ie9
Edho Arief <edho@myconan.net>
parents:
diff changeset
12 console.log("wheee~")
22c4b5f90e24 Massive javascript and html refactor. Also, ie9
Edho Arief <edho@myconan.net>
parents:
diff changeset
13 $(document).on('click', "#reset_paste", $.proxy(this.clear, this))
22c4b5f90e24 Massive javascript and html refactor. Also, ie9
Edho Arief <edho@myconan.net>
parents:
diff changeset
14 this.input().autosize({ className: 'mirrored_text row-fluid', append: "\n"});
22c4b5f90e24 Massive javascript and html refactor. Also, ie9
Edho Arief <edho@myconan.net>
parents:
diff changeset
15 $.autosize_box_fix($(".mirrored_text"))
22c4b5f90e24 Massive javascript and html refactor. Also, ie9
Edho Arief <edho@myconan.net>
parents:
diff changeset
16 this.input().focus()
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 }
22c4b5f90e24 Massive javascript and html refactor. Also, ie9
Edho Arief <edho@myconan.net>
parents:
diff changeset
19 })(jQuery)