jquery.byteLimit fixes:
authorKrinkle <krinkle@users.mediawiki.org>
Tue, 26 Apr 2011 20:00:59 +0000 (20:00 +0000)
committerKrinkle <krinkle@users.mediawiki.org>
Tue, 26 Apr 2011 20:00:59 +0000 (20:00 +0000)
commitdc32287e25b8768c6c039b84ceb4eda05e313c14
treedae88e028aedcd334e12b8174ecba76d3f654d34
parent2da3d34301f16d41546c6f8f9d670b80fedbe9bf
jquery.byteLimit fixes:
* 'this' in a fn/prototype context already points to the jQuery object. Calling $(this) is redundant and goes through $.fn.init again untill it reaches the last else case (luckily $.fn.init() has a failsafe case for that, but also makes it harder to spot)
* Adding support for using the current attribute value (to avoid having to duplicate the values between PHP and JavaScript). Fully backwards compatible, I think it's a very handy feature to be able to pass a custom length, but using the maxLength attribute as a default makes sense.
resources/jquery/jquery.byteLimit.js
resources/mediawiki.special/mediawiki.special.movePage.js