Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
7289f70e
Commit
7289f70e
authored
Aug 28, 2007
by
Philipp von Weitershausen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small cleanup
parent
849b2fb6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
11 deletions
+10
-11
lib/python/Products/Five/viewlet/viewlet.py
lib/python/Products/Five/viewlet/viewlet.py
+10
-11
No files found.
lib/python/Products/Five/viewlet/viewlet.py
View file @
7289f70e
...
...
@@ -16,17 +16,16 @@
$Id$
"""
import
os
from
zope.viewlet
import
viewlet
as
orig_viewlet
import
zope.viewlet.viewlet
from
Products.Five.browser.pagetemplatefile
import
ViewPageTemplateFile
from
Products.Five.browser.pagetemplatefile
import
ZopeTwoPageTemplateFile
class
ViewletBase
(
orig_viewlet
.
ViewletBase
):
class
ViewletBase
(
zope
.
viewlet
.
viewlet
.
ViewletBase
):
pass
class
SimpleAttributeViewlet
(
orig_
viewlet
.
SimpleAttributeViewlet
):
class
SimpleAttributeViewlet
(
zope
.
viewlet
.
viewlet
.
SimpleAttributeViewlet
):
pass
class
simple
(
orig_
viewlet
.
simple
):
class
simple
(
zope
.
viewlet
.
viewlet
.
simple
):
# We need to ensure that the proper __init__ is called.
__init__
=
ViewletBase
.
__init__
.
im_func
...
...
@@ -39,7 +38,7 @@ def SimpleViewletClass(template, bases=(), attributes=None,
# Create the base class hierarchy
bases
+=
(
simple
,
ViewletBase
)
attrs
=
{
'index'
:
ZopeTwo
PageTemplateFile
(
template
),
attrs
=
{
'index'
:
View
PageTemplateFile
(
template
),
'__name__'
:
name
}
if
attributes
:
attrs
.
update
(
attributes
)
...
...
@@ -50,7 +49,7 @@ def SimpleViewletClass(template, bases=(), attributes=None,
return
class_
class
ResourceViewletBase
(
orig_
viewlet
.
ResourceViewletBase
):
class
ResourceViewletBase
(
zope
.
viewlet
.
viewlet
.
ResourceViewletBase
):
pass
def
JavaScriptViewlet
(
path
):
...
...
@@ -59,13 +58,13 @@ def JavaScriptViewlet(path):
klass
=
type
(
'JavaScriptViewlet'
,
(
ResourceViewletBase
,
ViewletBase
),
{
'index'
:
ZopeTwo
PageTemplateFile
(
src
),
{
'index'
:
View
PageTemplateFile
(
src
),
'_path'
:
path
})
return
klass
class
CSSResourceViewletBase
(
orig_
viewlet
.
CSSResourceViewletBase
):
class
CSSResourceViewletBase
(
zope
.
viewlet
.
viewlet
.
CSSResourceViewletBase
):
pass
def
CSSViewlet
(
path
,
media
=
"all"
,
rel
=
"stylesheet"
):
...
...
@@ -74,7 +73,7 @@ def CSSViewlet(path, media="all", rel="stylesheet"):
klass
=
type
(
'CSSViewlet'
,
(
CSSResourceViewletBase
,
ViewletBase
),
{
'index'
:
ZopeTwo
PageTemplateFile
(
src
),
{
'index'
:
View
PageTemplateFile
(
src
),
'_path'
:
path
,
'_media'
:
media
,
'_rel'
:
rel
})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment