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
b17b217e
Commit
b17b217e
authored
Aug 24, 2006
by
Stefan H. Holek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved 'alt' property from File to Image.
Fixes
http://www.zope.org/Collectors/Zope/1907
parent
84bf1298
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
9 deletions
+11
-9
doc/CHANGES.txt
doc/CHANGES.txt
+2
-0
lib/python/OFS/Image.py
lib/python/OFS/Image.py
+2
-3
lib/python/OFS/dtml/imageView.dtml
lib/python/OFS/dtml/imageView.dtml
+1
-4
lib/python/OFS/tests/testFileAndImage.py
lib/python/OFS/tests/testFileAndImage.py
+6
-2
No files found.
doc/CHANGES.txt
View file @
b17b217e
...
@@ -8,6 +8,8 @@ Zope Changes
...
@@ -8,6 +8,8 @@ Zope Changes
Bugs fixed
Bugs fixed
- Collector #1907: Moved 'alt' property from File to Image.
- Collector #1983: Specifying session-resolution-seconds >= 1200 caused
- Collector #1983: Specifying session-resolution-seconds >= 1200 caused
Zope startup to fail.
Zope startup to fail.
...
...
lib/python/OFS/Image.py
View file @
b17b217e
...
@@ -77,7 +77,6 @@ class File(Persistent, Implicit, PropertyManager,
...
@@ -77,7 +77,6 @@ class File(Persistent, Implicit, PropertyManager,
precondition
=
''
precondition
=
''
size
=
None
size
=
None
alt
=
''
manage_editForm
=
DTMLFile
(
'dtml/fileEdit'
,
globals
(),
manage_editForm
=
DTMLFile
(
'dtml/fileEdit'
,
globals
(),
Kind
=
'File'
,
kind
=
'file'
)
Kind
=
'File'
,
kind
=
'file'
)
...
@@ -115,7 +114,6 @@ class File(Persistent, Implicit, PropertyManager,
...
@@ -115,7 +114,6 @@ class File(Persistent, Implicit, PropertyManager,
_properties
=
({
'id'
:
'title'
,
'type'
:
'string'
},
_properties
=
({
'id'
:
'title'
,
'type'
:
'string'
},
{
'id'
:
'alt'
,
'type'
:
'string'
},
{
'id'
:
'content_type'
,
'type'
:
'string'
},
{
'id'
:
'content_type'
,
'type'
:
'string'
},
)
)
...
@@ -719,7 +717,7 @@ class Image(File):
...
@@ -719,7 +717,7 @@ class Image(File):
__implements__
=
(
WriteLockInterface
,)
__implements__
=
(
WriteLockInterface
,)
meta_type
=
'Image'
meta_type
=
'Image'
alt
=
''
height
=
''
height
=
''
width
=
''
width
=
''
...
@@ -738,6 +736,7 @@ class Image(File):
...
@@ -738,6 +736,7 @@ class Image(File):
)
)
_properties
=
({
'id'
:
'title'
,
'type'
:
'string'
},
_properties
=
({
'id'
:
'title'
,
'type'
:
'string'
},
{
'id'
:
'alt'
,
'type'
:
'string'
},
{
'id'
:
'content_type'
,
'type'
:
'string'
,
'mode'
:
'w'
},
{
'id'
:
'content_type'
,
'type'
:
'string'
,
'mode'
:
'w'
},
{
'id'
:
'height'
,
'type'
:
'string'
},
{
'id'
:
'height'
,
'type'
:
'string'
},
{
'id'
:
'width'
,
'type'
:
'string'
},
{
'id'
:
'width'
,
'type'
:
'string'
},
...
...
lib/python/OFS/dtml/imageView.dtml
View file @
b17b217e
...
@@ -2,10 +2,7 @@
...
@@ -2,10 +2,7 @@
<dtml-var manage_tabs>
<dtml-var manage_tabs>
<p>
<p>
<img src="&dtml-absolute_url;" <dtml-if
<dtml-var tag>
width>width="&dtml-width;" </dtml-if><dtml-if
height>height="&dtml-height;" </dtml-if
> alt="&dtml-title_or_id;" />
</p>
</p>
<dtml-var manage_page_footer>
<dtml-var manage_page_footer>
...
...
lib/python/OFS/tests/testFileAndImage.py
View file @
b17b217e
...
@@ -272,8 +272,12 @@ class ImageTests(FileTests):
...
@@ -272,8 +272,12 @@ class ImageTests(FileTests):
(
'<img src="http://foo/file" alt="" title="" height="16" width="16" />'
))
(
'<img src="http://foo/file" alt="" title="" height="16" width="16" />'
))
def
testTag
(
self
):
def
testTag
(
self
):
self
.
assertEqual
(
self
.
file
.
tag
(),
tag_fmt
=
'<img src="http://foo/file" alt="%s" title="%s" height="16" width="16" />'
(
'<img src="http://foo/file" alt="" title="" height="16" width="16" />'
))
self
.
assertEqual
(
self
.
file
.
tag
(),
(
tag_fmt
%
(
''
,
''
)))
self
.
file
.
manage_changeProperties
(
title
=
'foo'
)
self
.
assertEqual
(
self
.
file
.
tag
(),
(
tag_fmt
%
(
''
,
'foo'
)))
self
.
file
.
manage_changeProperties
(
alt
=
'bar'
)
self
.
assertEqual
(
self
.
file
.
tag
(),
(
tag_fmt
%
(
'bar'
,
'foo'
)))
def
testViewImageOrFile
(
self
):
def
testViewImageOrFile
(
self
):
pass
# dtml method,screw it
pass
# dtml method,screw it
...
...
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