Opened 13 years ago
Closed 8 years ago
#3844 closed enhancement (wontfix)
Dynamically generate bp-default's global.js with PHP
Reported by: | r-a-y | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Templates | Keywords: | |
Cc: |
Description
There are many instances where I wanted to modify or add a few items to global.js, but had to resort to deregistering global.js and making a copy of global.js.
In a future release, I'd like to see global.js dynamically generated with hooks so plugin authors can manipulate the contents of it.
There are some issues to work around (namely browser caching and backpat), but the pros outweigh the cons.
Change History (5)
#2
@
13 years ago
If we were consistent about how we bind events to elements, you could just use $.unbind() in your own scripts. But your point is well taken. Would like to see a patch for how this might look.
I think this will be mostly mitigated when we split "core" javascript (whatever that's decided to be) out of the default theme, into its own file. We'll end up with something like small nuggets of functionality, which will avoid the "one size fits all" approach to the current javascript and its markup dependencies.