Customization Javascript
Structure
Js file structure
We have added all layouts files in the wwwroot/assets/js
folder.
app.js
- To set active menu, and layout settings and basic setup of the theme.
plugins.js
- To setup all toast-list, data-choices and data-provider add the script based on it.
pages
- All the pages init js files are added in the pages folder. We have named the js files based on the plugins and package so it will be easy to identify the init js file.
app.js Methods
Method | Description |
---|---|
setDefaultAttribute(); |
Set themes default attributes from sessionStorage. |
isCustomDropdown(); |
Manage the custom dropdown. |
isCustomDropdownResponsive(); |
Manage the custom dropdown. |
initFullScreen(); |
Manage the full screen JS. |
initModeSetting(); |
Manage the right sidebar mode settings. |
windowLoadContent(); |
Manage resize, scroll and hamburger menu events. |
counter(); |
Customer counter number code for widgets. |
initComponents(); |
initialize tooltip and Popover js. |
resetLayout(); |
Reset to default layout set from the body tag. |
pluginData(); |
Toastify, Choices, flatpickr & tabs code manage with attributes. |
initLanguage(); |
Set selected language with Ajax call. |
isCollapseMenu(); |
Manage navbar collapse menu code. |
inputSpinComponets() |
Custom code for input spin with numbers. |