Commit graph

7 commits

Author SHA1 Message Date
Krinkle
be06bd4560 Enqueue mw.util.init in document-ready even handler earlier
* Previously $(document).ready(mw.util.init) was in module 'mediawiki.page.ready' (position: bottom). I've now moved this to 'mediawiki.page.startup' so that it'll be enqueued sooner.
* This making it more likely that if someone also enqueues in document-ready that mw.util.init ran before than and thus mw.util.$content populated
* Fixes bug 33711

* All this is still depends on the order in which the event handler queue is executed, which is risky. Bug 30713 will bring the solid "watertight" solution
2012-02-02 00:47:53 +00:00
Krinkle
17cecf2647 Separate execution from definition (mediawiki.util.init)
* bug 30710

Also makes it easier to do unit testing, this way the module can be included and the test can initialize it if and when it wants to.
2011-09-02 21:17:54 +00:00
Roan Kattouw
0554848efa Fix a few comment typos noticed when doing JS review 2011-08-11 14:47:18 +00:00
Krinkle
29976f1c91 Removing calls to deprecated functionality in favor of the new versions. Old version worked fine but shouldn't be used.
Follows-up:
* r75275: Introduced the updateTooltipAccessKeys function in the new library but didn't call it on document ready and left the deprecated one in the onloadhook-run in wikibits.js untouched
* r75287: Introduced jquery.checkboxShiftClick and called on-load but left the load call for the legacy version untouched. Depending on the load order at any given time it may not have been used.

Also reordering the if-else case in mw.util.updateTooltipAccessKeys to allow a call without arguments ("undefined instanceof Foo" throws exception)
2011-07-07 17:52:55 +00:00
Krinkle
a046427547 Revert r90678 per CR 2011-07-04 23:36:54 +00:00
Derk-Jan Hartman
6f225a6c16 Switch jquery.sortable to use mw-sortable and mw-unsortable classes, to be in line with makeCollapsible. Support for legacy .sortable remains.
Follow up to r86088
2011-06-23 21:26:21 +00:00
Krinkle
95173d11f1 New mediawiki.page modules
First step towards cleaning up mw.util.init and removing bugus dependancies on mediawiki.util which are just added there in order to load them on every page and do something on-load.

Introducing mediawiki.page.startup (in the head) and mediawiki.page.ready (on the bottom)

Moved the following to them:
* document.ready from jquery.cient
 -- Shouldn't have been in the plugin itself in the first place
* jquery.placeholder
* jquery.makeCollapsible
* mediawiki.action.view.tablesorting
* jquery.checkboxShiftClick

(This also solves part of bug 26799)
2011-06-22 21:27:12 +00:00