Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Wikipedia: Mediawiki

JS2 and jquery

 

 

Wikipedia mediawiki RSS feed   Index | Next | Previous | View Threaded


g.m.hagedorn at gmail

Oct 16, 2009, 8:33 AM

Post #1 of 2 (667 views)
Permalink
JS2 and jquery

We need some help with the new JS2 method. Th documentation is
understandably a bit patchy
(http://www.mediawiki.org/wiki/Talk:JS2_Overview - anything better or
more?).

Scenario: we use jquery for javascript that resides in the mediawiki
namespace and is called through mediawiki:common.js
In the last months, the usability initiative has provided the
necessary jquery core library. With the update to the current
mediawiki revision (as used by wikipedia) this no longer works. I
understand that JS2 provides a superior mechanism. And I understand
that ulitmately, putting language strings into php might be
beneficial.

For the moment, however: Is there a simple cooking recipe to simply
make use of JS2 for having jquery loaded? We could write an extension,
to hardcode that, but we would like to move forward and start using
JS2.

thanks in advance!

Gregor

--
---------------------------------
Dr. Gregor Hagedorn
Heinrich-Seidel-Str. 2
12167 Berlin
skype: g.hagedorn

This message is sent on a personal basis and does not constitute an
activity of the German Federal Government or its research
institutions. Together with any attachments, this message is intended
only for the person to whom it is addressed and may not be
redistributed or published without permission.

_______________________________________________
MediaWiki-l mailing list
MediaWiki-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l


g.m.hagedorn at gmail

Oct 16, 2009, 10:14 AM

Post #2 of 2 (613 views)
Permalink
Re: JS2 and jquery [In reply to]

Answering my own question: it works with the following localsettings:

$wgEnableJS2system = true;
$wgEnableScriptLoader = false;
$wgEnableScriptMinify = false;
$wgDebugJavaScript = false;
$wgEnableScriptLoaderJsFile = true;

(and probably more combinations of the 2nd and later configuration variables)

The first variable was NOT yet mentioned on the documentation page for
JS2, which caused my confusion.

Gregor

_______________________________________________
MediaWiki-l mailing list
MediaWiki-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

Wikipedia mediawiki RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.