Mercurial > zeropaste
comparison app/assets/javascripts/zp.new.js @ 214:22c4b5f90e24
Massive javascript and html refactor. Also, ie9
author | Edho Arief <edho@myconan.net> |
---|---|
date | Sun, 12 May 2013 02:43:38 +0900 |
parents | |
children | 0e52170b7b6a |
comparison
equal
deleted
inserted
replaced
213:0993715b455d | 214:22c4b5f90e24 |
---|---|
1 //= jquery.autosize | |
2 //= require autosize-box-fix | |
3 (function($) { | |
4 window.zp.new = { | |
5 input: function() { return $("#paste_paste") }, | |
6 clear: function(e) { | |
7 this.input().val("").focus() | |
8 e.preventDefault() | |
9 }, | |
10 init: function() { | |
11 if (this.input() == "undefined") { return } | |
12 console.log("wheee~") | |
13 $(document).on('click', "#reset_paste", $.proxy(this.clear, this)) | |
14 this.input().autosize({ className: 'mirrored_text row-fluid', append: "\n"}); | |
15 $.autosize_box_fix($(".mirrored_text")) | |
16 this.input().focus() | |
17 } | |
18 } | |
19 })(jQuery) |