Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include JS/CSS resources only once #1875

Open
mvorisek opened this issue Oct 1, 2022 · 2 comments
Open

Include JS/CSS resources only once #1875

mvorisek opened this issue Oct 1, 2022 · 2 comments

Comments

@mvorisek
Copy link
Member

mvorisek commented Oct 1, 2022

should be probably solved in atk4/ui

image

see demos

same problem in atk4/ui atk4/ui/demos/interactive/jssortable.php demo

@mvorisek mvorisek transferred this issue from atk4/chart Oct 2, 2022
@mvorisek mvorisek changed the title Include resource only once Include JS/CSS resources only once Oct 2, 2022
@mvorisek
Copy link
Member Author

mvorisek commented Oct 9, 2022

related with AJAX/lazy load #1896

@DarkSide666
Copy link
Member

Also there should be a way how any View can request to load additional JS/CSS files on view rendering (if they are not already loaded). That's important when you put View in modal window for example and from server receive only data with cut this view object.

For example, if i have rich text editor which requires additional JS/CSS includes then the only way is to add them globally in whole app. But we only need it in pages (forms, modal forms etc) where this field is actually shown. Probably some way of javascript-based includeJs and includeCss would be good to have for such cases. They could use jquery.getScript() or some other mechanism to load.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants