JS Modules

You can define new Javascript modules in your EPT which will be available to users whose role comes from the EPT's owning enterprise.

Just like any other entity in EPT, use the EPT.<EptName> namespace for your JS modules.

Assuming the following javascript is in web/public/jsmodules.JSModule.js, it will be available as require.js module EPT/Foo/JSModule:


define(function() {
Ext.ns("EPT.Foo");
EPT.Foo.JSModule = Ext.extend(Ext.Container, {
html: "<span style="color: red"><div>\
<span style="color: red"><img></img></span> This is an EPT JS module loaded with require.js!</div></span>"
});
});


Similar to modules, there is also a GlobalRegistry.js file available for adding scripts to instance.js for load on every page. As with modules, this should be reserved primarily for detail registration.

You can submit the JS file to the running server as part of EPT.

JS modules defined in EPT won't be available for users outside the EPT's enterprise.