https://bugzilla.wikimedia.org/show_bug.cgi?id=27771

Krinkle <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #7 from Krinkle <[email protected]> 2011-04-04 12:05:54 UTC ---
Libs:
## MediaWiki:Gadget-Libs-Foobar.js
window.Foobar { lib: true, myLib: 'awesome' };

Gadget dependancies:
## MediaWiki:Gadget-Gadgetname.js
GadgetName = {
  init: function(){
   $( Foobar.buildCool ).appendTo( 'body' );
 },
 doStuff: function(){
   $('#cool').tabs();
 }
}

mw.loader.using( ['ext.gadget.Libs-Foobar', 'jquery.ui.tabs'], GadgetName.init
);

Load by default: pending (bug 13742) 
Show only for certain user rights: [rights:block] fixed (bug 12211)
Dependancies: fixed (via mw.loader.using, or via [dependancies:] r76639 ) - 

(In reply to comment #6)
> If the thing you depend on is a ResourceLoader module, you can use:
> 
> mediaWiki.loader.using

Gadget's [dependencies:] is passed as second argument to
ResourceLoaderWikiModule (via extending GadgetResourceLoaderModule class), so
either way the modules must be registered in ResourceLoader, which makes sense.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to