clean-up inner HTML stuff

git-svn-id: svn://svn.cy55.de/Zope3/src/cybertools/trunk@1300 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
helmutm 2006-08-13 21:59:29 +00:00
parent f03fdc2376
commit dbd3b7b792
5 changed files with 8 additions and 26 deletions

View file

@ -21,8 +21,6 @@ $Id$
""" """
from zope.app.pagetemplate import ViewPageTemplateFile from zope.app.pagetemplate import ViewPageTemplateFile
from zope.formlib.namedtemplate import NamedTemplateImplementation
innerHtml = NamedTemplateImplementation( innerHtml = ViewPageTemplateFile('innerHtml.pt')
ViewPageTemplateFile('innerHtml.pt'))

View file

@ -25,11 +25,4 @@
menu="zmi_views" title="Contents" menu="zmi_views" title="Contents"
/> />
<!-- named template -->
<zope:adapter
factory="cybertools.ajax.innerHtml"
for="zope.publisher.interfaces.browser.IBrowserPublisher"
name="ajax.inner.html" />
</configure> </configure>

View file

@ -1,4 +1 @@
<tal:def define="macroName view/innerHtml_macro; <metal:use use-macro="view/macro" />
tpl nocall:view/innerHtml_template;">
<metal:use use-macro="tpl/macros/?macroName" />
</tal:def>

View file

@ -38,10 +38,13 @@ class ContainerView(JustContents):
# informations for the ajax.inner.html view (template): # informations for the ajax.inner.html view (template):
def innerHtml_template(self): @Lazy
def template(self):
basicView = zapi.getMultiAdapter((self.context, self.request), basicView = zapi.getMultiAdapter((self.context, self.request),
Interface, name=u'contents.html') Interface, name=u'contents.html')
return basicView.index return basicView.index
innerHtml_macro = 'contents' @Lazy
def macro(self):
return self.template.macros['contents']

View file

@ -14,15 +14,6 @@
menu="zmi_views" title="Contents" menu="zmi_views" title="Contents"
/> />
<page
for="zope.app.container.interfaces.IOrderedContainer"
name="ajax.inner.html"
template="../ajax/innerHtml.pt"
class="cybertools.container.ordered.OrderedContainerView"
permission="zope.ManageContent"
menu="zmi_views" title="Contents"
/>
<page <page
for="zope.app.container.interfaces.IContainer" for="zope.app.container.interfaces.IContainer"
name="contents.html" name="contents.html"
@ -36,7 +27,7 @@
for="zope.app.container.interfaces.IContainer" for="zope.app.container.interfaces.IContainer"
name="ajax.inner.html" name="ajax.inner.html"
template="../ajax/innerHtml.pt" template="../ajax/innerHtml.pt"
class="cybertools.container.ordered.ContainerView" class="cybertools.container.base.ContainerView"
permission="zope.ManageContent" permission="zope.ManageContent"
menu="zmi_views" title="Contents" menu="zmi_views" title="Contents"
/> />