comparison app/assets/javascripts/zp.new.js @ 217:cbd5819d7468

Completely wtf init for zp.new
author Edho Arief <edho@myconan.net>
date Sun, 12 May 2013 02:52:49 +0900
parents 0e52170b7b6a
children 45bd94c70896
comparison
equal deleted inserted replaced
216:e043da06b85f 217:cbd5819d7468
6 clear: function(e) { 6 clear: function(e) {
7 this.input().val("").focus() 7 this.input().val("").focus()
8 e.preventDefault() 8 e.preventDefault()
9 }, 9 },
10 init: function() { 10 init: function() {
11 if (this.input() == "undefined") { return } 11 if (this.input().length === 0) { return }
12 console.log("wheee~")
13 $(document).on('click', "#reset_paste", $.proxy(this.clear, this)) 12 $(document).on('click', "#reset_paste", $.proxy(this.clear, this))
14 this.input().autosize({ className: 'mirrored_text row-fluid', append: "\n"}); 13 this.input().autosize({ className: 'mirrored_text row-fluid', append: "\n"});
15 $.autosize_box_fix($(".mirrored_text")) 14 $.autosize_box_fix($(".mirrored_text"))
16 this.input().focus() 15 this.input().focus()
17 } 16 }