[Zope-Checkins] CVS: Packages/OFS - Image.py:1.145.2.8
Andreas Jung
andreas at andreas-jung.com
Sat Oct 30 03:35:39 EDT 2004
Update of /cvs-repository/Packages/OFS
In directory cvs.zope.org:/tmp/cvs-serv23187/lib/python/OFS
Modified Files:
Tag: Zope-2_7-branch
Image.py
Log Message:
- Collector #1557/OFS.Image: Introducing new 'alt' property. The 'alt' attribute
is no longer taken from the 'title' property but from the new 'alt' property.
The border="0" attribute is no longer part of the HTML output except specified
otherwise.
=== Packages/OFS/Image.py 1.145.2.7 => 1.145.2.8 ===
--- Packages/OFS/Image.py:1.145.2.7 Thu Apr 29 11:32:12 2004
+++ Packages/OFS/Image.py Sat Oct 30 03:35:39 2004
@@ -113,6 +113,7 @@
_properties=({'id':'title', 'type': 'string'},
+ {'id':'alt', 'type':'string'},
{'id':'content_type', 'type':'string'},
)
@@ -791,7 +792,7 @@
result='<img src="%s"' % (self.absolute_url())
if alt is None:
- alt=getattr(self, 'title', '')
+ alt=getattr(self, 'alt', '')
result = '%s alt="%s"' % (result, escape(alt, 1))
if title is None:
@@ -804,8 +805,9 @@
if width:
result = '%s width="%s"' % (result, width)
- if not 'border' in [ x.lower() for x in args.keys()]:
- result = '%s border="0"' % result
+ # Collector #1557
+# if not 'border' in [ x.lower() for x in args.keys()]:
+# result = '%s border="0"' % result
if css_class is not None:
result = '%s class="%s"' % (result, css_class)
More information about the Zope-Checkins
mailing list