Back to index

plone3  3.1.7
Public Member Functions
ResourceRegistries.browser.scripts.ScriptsView Class Reference
Inheritance diagram for ResourceRegistries.browser.scripts.ScriptsView:
Inheritance graph
[legend]
Collaboration diagram for ResourceRegistries.browser.scripts.ScriptsView:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def registry
def skinname
def scripts

Detailed Description

Information for script rendering. 

Definition at line 7 of file scripts.py.


Member Function Documentation

Definition at line 10 of file scripts.py.

00010 
00011     def registry(self):
00012         return getToolByName(aq_inner(self.context), 'portal_javascripts')

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 16 of file scripts.py.

00016 
00017     def scripts(self):
00018         registry = self.registry()
00019         registry_url = registry.absolute_url()
00020 
00021         scripts = registry.getEvaluatedResources(self.context)
00022         skinname = url_quote(self.skinname())
00023         result = []
00024         for script in scripts:
00025             inline = bool(script.getInline())
00026             if inline:
00027                 content = registry.getInlineResource(script.getId(),
00028                                                      self.context)
00029                 data = {'inline': inline,
00030                         'content': content}
00031             else:
00032                 src = "%s/%s/%s" % (registry_url, skinname, script.getId())
00033                 data = {'inline': inline,
00034                         'src': src}
00035             result.append(data)
00036         return result

Here is the call graph for this function:

Definition at line 13 of file scripts.py.

00013 
00014     def skinname(self):
00015         return self.context.getCurrentSkinName()

Here is the caller graph for this function:


The documentation for this class was generated from the following file: