Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

<base_dir>/js/modules/requireconfig.min.jsmodule used to store access configurartion items
<base_dir>/js/main.min.jsconfigures module loading and default js modules
<base_dir>/js/rogo.min.jsinitialisation script - sets configuration items etc
<base_dir>/js/require.jsthe requirejs library

...

Loading config into js

Config is loading loaded into the js via the rogoconfig element on the page. rogo.js reads the attributes in as follows:

...

The jsxls module can then access the strings using the landlang_string method. i.e.

Code Block
languagejs
titleexample.js
requirejs(['jsxls', 'jquery', 'jqueryvalidate'], function (jsxls, $) {
    $('#forgotten_pw').validate({
        messages: {
            email: jsxls.lang_string['emailaddressinvalid'],
        }
    });
});

...