Last change
on this file since 3665 was
1,
checked in by myroslav, 19 years ago
|
Building directory structure
|
-
Property svn:eol-style set to
native
|
File size:
621 bytes
|
Rev | Line | |
---|
[1] | 1 | from Products.CMFCore.utils import getToolByName |
---|
| 2 | from Products.ResourceRegistries.browser.scripts import ScriptsView as base |
---|
| 3 | |
---|
| 4 | class ScriptsView(base): |
---|
| 5 | """ Information for script rendering. """ |
---|
| 6 | |
---|
| 7 | def scripts(self): |
---|
| 8 | scripts = super(ScriptsView, self).scripts() |
---|
| 9 | portal_url = getToolByName(self.context, 'portal_url') |
---|
| 10 | new_url = portal_url() |
---|
| 11 | portal_url = portal_url.getPortalObject().absolute_url() |
---|
| 12 | for script in scripts: |
---|
| 13 | src = script.get('src', '') |
---|
| 14 | if src != '': |
---|
| 15 | script['src'] = src.replace(portal_url, new_url, 1) |
---|
| 16 | return scripts |
---|
Note: See
TracBrowser
for help on using the repository browser.