[ZCM] [ZC] 1907/ 3 Comment "cannot edit alt attribute / property for images"

Collector: Zope Bugs, Features, and Patches ... zope-coders-admin at zope.org
Fri Sep 23 17:32:46 EDT 2005


Issue #1907 Update (Comment) "cannot edit alt attribute / property for images"
 Status Pending, Zope/bug medium
To followup, visit:
  http://www.zope.org/Collectors/Zope/1907

==============================================================
= Comment - Entry #3 by camil7 on Sep 23, 2005 5:32 pm


Uploaded:  "imageView.patch"
 - http://www.zope.org/Collectors/Zope/1907/imageView.patch/view
As a note the problem is also present
in the svn head, and the patch applies there, too
(with a little fuzz)

As some more andom remark the "view" tab of the ZMI
still shows the title of the image al "alt"
attribute, and no title attribute at all, because
it renders the <img> tag manually.
 The attached patch fixes that by using the build in "tag"
instead.

 Just tell me, if I should stop sending nitpicking patches,
or if You would appreciate an aggregated patch file.
   
________________________________________
= Comment - Entry #2 by camil7 on Sep 23, 2005 1:09 pm


Uploaded:  "testFileAndImage.patch"
 - http://www.zope.org/Collectors/Zope/1907/testFileAndImage.patch/view
Hm, I should have marked this as "bug+solution"
instead og "bug" - sorry, cannot change this now.

Anyway, as a second patch here is a modification
of the unit tests checking the issue.
________________________________________
= Request - Entry #1 by camil7 on Sep 23, 2005 1:06 pm


Uploaded:  "Image.patch"
 - http://www.zope.org/Collectors/Zope/1907/Image.patch/view
issue 1752 fixes the problem that no separate "alt" attribute existed
for an OFS.Image.Image; this always used the title instead.

Now the image shows the "alt" attribute different from the title,
with an empty string as fallback; however one cannot edit 
that "alt" attribute via the ZMI.

 The "File" class now has an "alt" property, but
the "Image" has not. So one cannot set the alt-attribute
via the "Properties" tab of the Image:

 a) there is no "alt" property by default
 b) if trying to add a property with the name "alt",
    a "BadRequest" is thown, because there is already an "alt"
    attribute (the fallback in the "File" class)

The fix is easy: just add "alt" to the properties of the "Image", too.
Patch is attached (hopefully). Works for me with Zope 2.7.7;
have not checked 2.8, sorry.

By the way: why is the "alt" property defined for the File?
Most probably this is an oversight, as it should have been defined
on the Image in the first place?

==============================================================



More information about the Zope-Collector-Monitor mailing list