Failure

User tests: Successful: Unsuccessful:

avatar anibalsanchez
anibalsanchez
3 Jun 2013

Following the thread, this is the PR to add support for RequireJS (dependecy management)

  • With this new JDocument method, a set of Javascript modules (with dependencies can be declared)
  • The modules can have a common $moduleId "name", so it can be shared CMS-wide Ej jquery17, backbone, underscore, etc.
  • If multiples modules with the same name are defined, it wins the last one.

https://groups.google.com/forum/?fromgroups#!topic/joomla-dev-cms/s2Wqo7eNKfo

/**
 * Adds a linked javascript module to the page.
 *
 * Example:
 *
 * $doc->addJavascriptModule('mediamanager', 'media/media/js/mediamanager.js');
 * $doc->addJavascriptModule('installation', 'installation/template/js/installation.js', array('mediamanager'));
 *
 * Reference: Why AMD? http://requirejs.org/docs/whyamd.html
 *
 * @param   string   $moduleId      Value of module identication in the module loader.
 * @param   string   $url           URL to the linked script
 * @param   array    $dependencies  Array of module dependencies
 *
 * @return  JDocument instance of $this to allow chaining
 *
 * @since   11.1
 */
public function addJavascriptModule($moduleId, $url, $dependencies = array())
avatar anibalsanchez anibalsanchez - open - 3 Jun 2013
avatar brianteeman
brianteeman - comment - 13 Oct 2013

Please can you create a corresponding joomlacode tracker item for this - thanks

avatar brianteeman
brianteeman - comment - 23 Jul 2014

Closing as per the comment on joomlacode

avatar brianteeman brianteeman - close - 23 Jul 2014

Add a Comment

Login with GitHub to post a comment