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

Replaced inline JavaScript in wrapper #3849

Closed
wants to merge 0 commits into from
Closed

Conversation

J0WI
Copy link
Contributor

@J0WI J0WI commented Jun 30, 2014

See #3838

Not sure if media/mod_wrapper is a good location for shared scripts. Alternative?

}
}
</script>
<script src="../media/mod_wrapper/js/iframe-height.min.js"></script>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use the API to load scripts so they can potentially be overridden by templates.
Michael did an excellent blog post once on how to use the API. See http://www.babdev.com/blog/139-use-the-media-folder-allow-overridable-media

@J0WI
Copy link
Contributor Author

J0WI commented Jun 30, 2014

Making use of JHtml::script().
Is iframe-height.min.js now obsolete?

I'm still confused if mod_wrapper is the best location, because the same script is also used by com_wrapper.

@Bakual
Copy link
Contributor

Bakual commented Jun 30, 2014

Making use of JHtml::script(). Is iframe-height.min.js now obsolete?

Joomla will load the min version. WHen debug is turned on, it will load the uncompressed version. So both files are needed.

I'm still confused if mod_wrapper is the best location, because the same script is also used by com_wrapper.

Personally I would put it into the component location when it's used for both a component and a module.

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

Successfully merging this pull request may close these issues.

None yet

3 participants