pyrocms/pyrocms — pull request #1229 by petsagouris (2012-03-19 16:56:59+00:00)
Title: Files module optimizations

- "selector-to-jquery-call"
- replaced `$.inArray` with `array.indexOf` which is faster.
- rephrased some event bindings [example: `$().click(fn);` -> `$().on('click', fn);`] as per jQuery recommendations.
- chaining some calls. [example: `$('.class').fn1(); $('.class').fn2();` -> `$('.class').fn1().fn2();` ]
- caching some jQuery selector results. [example: `$('.class').fn1(); $('.class').fn2();` -> `var $c=$('.class'); $c.fn1(); $c.fn2();` ]
- merged some variable declarations [example: `var one; var two;` -> `var one, two;` ]