[Zope-CVS] CVS: Products/PageDesign - PageDesign.py:1.2.2.9 ReferencedElement.py:1.1.2.3 Slot.py:1.1.2.9 zopetop_design.zexp:1.1.2.1
Shane Hathaway
shane@cvs.zope.org
Mon, 12 Aug 2002 10:36:21 -0400
Update of /cvs-repository/Products/PageDesign
In directory cvs.zope.org:/tmp/cvs-serv8185
Modified Files:
Tag: page-redesign-branch
PageDesign.py ReferencedElement.py Slot.py zopetop_design.zexp
Log Message:
Integrated External Editor and updated zopetop_design.
=== Products/PageDesign/PageDesign.py 1.2.2.8 => 1.2.2.9 ===
--- Products/PageDesign/PageDesign.py:1.2.2.8 Sat Aug 10 11:11:11 2002
+++ Products/PageDesign/PageDesign.py Mon Aug 12 10:36:20 2002
@@ -378,6 +378,7 @@
'moveup',
'movedown',
'remove',
+ 'edit',
):
im = ImageFile('%s.gif' % img_name, _www)
im.__roles__ = None
=== Products/PageDesign/ReferencedElement.py 1.1.2.2 => 1.1.2.3 ===
--- Products/PageDesign/ReferencedElement.py:1.1.2.2 Sat Aug 10 11:11:11 2002
+++ Products/PageDesign/ReferencedElement.py Mon Aug 12 10:36:20 2002
@@ -16,6 +16,7 @@
from Acquisition import aq_base, aq_get, aq_inner, aq_parent
from Persistence import Persistent
from OFS.Traversable import Traversable
+from OFS.Application import Application
from IPageElement import IPageElement
@@ -80,5 +81,15 @@
Returns None or a blank string if it is not editable.
"""
+ if hasattr(Application, 'externalEdit_'):
+ ob = self._deref()
+ folder = aq_parent(aq_inner(ob))
+ if hasattr(aq_base(ob), 'getId'):
+ id = ob.getId()
+ else:
+ id = str(ob.id)
+
+ url = '%s/externalEdit_/%s' % (folder.absolute_url(), id)
+ return url
return None
=== Products/PageDesign/Slot.py 1.1.2.8 => 1.1.2.9 ===
--- Products/PageDesign/Slot.py:1.1.2.8 Sat Aug 10 11:11:11 2002
+++ Products/PageDesign/Slot.py Mon Aug 12 10:36:20 2002
@@ -111,13 +111,13 @@
icon_tag = edit_tag = ''
icon_url = element.getIconURL()
if icon_url:
- icon_tag = '<img border="0" src="%s" />' % icon_url
+ icon_tag = '<img border="0" src="%s" /> ' % icon_url
edit_url = element.getEditURL()
if edit_url:
- edit_tag = ('<a href="%s"><img border="0" src="edit_icon" /></a>'
+ edit_tag = (' <a href="%s"><img border="0" src="edit_icon" /></a>'
% edit_url)
- kw['titlebar'] = icon_tag + ' ' + escape(kw['title']) + edit_tag
+ kw['titlebar'] = icon_tag + escape(kw['title']) + edit_tag
kw['controls'] = '\n'.join(c)
return self.element_html % kw
=== Products/PageDesign/zopetop_design.zexp 1.1 => 1.1.2.1 ===