ajaxCategories fixes:
authorKrinkle <krinkle@users.mediawiki.org>
Fri, 15 Jul 2011 19:25:16 +0000 (19:25 +0000)
committerKrinkle <krinkle@users.mediawiki.org>
Fri, 15 Jul 2011 19:25:16 +0000 (19:25 +0000)
commitcb6029734f22f25e8871fc9f9c4385c6327e793d
treec895a1eb9e7e92b33806b55c683299792467db0e
parent74f0c77f76d1e740aa5ddb4aecd14e2b83758537
ajaxCategories fixes:
* Partial revert of r92264. mw.ajaxCategories has nothing to do with mediawiki.util.init, moved into separate initiation module, only loaded when ajax categories is enabled.
* Removing instantiation from the script. mw.ajaxCategories is now a public accessible constructor
* Fix Uncaught ReferenceError: wgUserGroups is not defined
($wgLegacyJavaScriptGlobals = false;)
* Renamimng stripIllegals() to clean(), adding '#' to the regex as those are not allowed either.
* Combining var statements by separating them with comma's ( var foo, bar, baz; ) instead of "var foo; var bar; var baz;"svn up
* Using dot.notation for objects instead of array-like['string'] keys
* Whitespace conventions
* Using inArray utility instead of indexOf (cross-browser support, mostly IE6)
** $.inArray uses Array.prototype.indexOf if available, otherwise fallback to a loop. mw.util.inArray is a wrapper around $.inArray to return a boolean value (since inArray/indexOf may return 0)
* Don't use $( '#bodyContent' ) (skin specific) but mw.util.$content
* Using mw.Title
* Re-using helper functions from the outer-closure instead of re-declaring them privately for every instance again (performance!)

Follows-up: r92112, r92151, r92264
includes/OutputPage.php
resources/Resources.php
resources/mediawiki.page/mediawiki.page.ajaxCategories.init.js [new file with mode: 0644]
resources/mediawiki.page/mediawiki.page.ajaxCategories.js
resources/mediawiki/mediawiki.util.js