JavaScript customization
Customizing AC JavaScript without breaking its native functionality requires a more careful approach and can be done in multiple ways. I will describe each approach and provide some examples to give you a clear understanding of this process. Now, before I jump into the customization process, I would like to introduce and clarify the terminology used in the AC framework and where the modules are placed. AC core modules use three types of modules (returned by the RequireJS factory method):
- functions, which are also called actions, and are placed under the
web/js/actions
folder in the module-related area (frontend/backend) - objects, which are used as models and are placed under the
web/js/models
folder in the module-related area (frontend/backend) - uiComponents, which are called also views and are placed under the
web/js/view
folder inside module related area
Overriding a file
AC uses RequireJS for JavaScript file loading and dependencies...