Hmmm.... does not appear to work for me. I added window.alert("Test"); to
the JavaScript file to make sure.
The relevant sections of each file are listed out below. All of these
sections are in sections of their respective files that are being executed.
SpecialMasterPlanForm.php:
http://pastebin.com/qKmTUvYd
MasterPlanForm.php:
http://pastebin.com/GaqhP55g
js/ext.MasterPlanForm.core.js:
http://pastebin.com/sNcbrYRW
I imagine I'm likely missing something rather obvious. That usually seems
to be the case in matters like these.
Also how does Mediawiki read these files? Does it make a request for them
or does it directly read them off the disc. I'm wondering if I can use PHP
to dynamically generate my JavaScript files at some point in the future (for
now I'm just trying to get them executing even though).
Thank you,
Derric Atzrott
-----Original Message-----
From: wikitech-l-bounces(a)lists.wikimedia.org
[mailto:wikitech-l-bounces@lists.wikimedia.org] On Behalf Of Roan Kattouw
Sent: 25 May 2012 16:16
To: Wikimedia developers
Subject: Re: [Wikitech-l] ResourceManager and Javascript in Mediawiki
On May 25, 2012 10:11 PM, "Derric Atzrott" <datzrott(a)alizeepathology.com>
wrote:
Ah. That would do it. I had forgotten to mention this, but in
SpecialMasterPlanForm.php I have a line "$wgOut->addModules(
'ext.MasterPlanForm.core');" but if I need put that in a
BeforePageDisplay hook, that would explain it.
No, the way you did it is right, I didn't know you had a special page. If
the module names match, then it should work: your JS should load, but only
on the special page. Use alert() to test if your JS is running.
Roan
_______________________________________________
Wikitech-l mailing list
Wikitech-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l