Details
-
Improvement
-
Resolution: Fixed
-
Neutral
-
1.0
-
None
-
-
Empty show more show less
-
Kromeriz 110
-
3
Description
In a JavaScript model you can load other js files which define other JavaScript classes.
Currently it works like this:
load(__PATH__ + "/../js/utils.js");
The _PATH_ variable is evaluated by the system, it is the path of the script (which calls load) on the file system.
This is breaking the concept that a JS model can be any Magnolia resource (currently a Magnolia resource can be from the file system, from classpath or a file representation in a JCR node).
An improved version should support something like this:
loadScript('/path/to/resource/in/our/resource/origin')
e.g.
loadScript('/javascript-model-samples/templates/js/formProcessors/saveContact.js')
Checklists
Acceptance criteria