Commit 69f6f129 authored by Casey Duncan's avatar Casey Duncan

Fixed PropertyManager/PropertySheets so that you can add a property named

'ids' without the sky falling.
parent 3933e8af
...@@ -56,6 +56,9 @@ Zope Changes ...@@ -56,6 +56,9 @@ Zope Changes
Bugs: Bugs:
- Fixed PropertyManager/PropertySheets so that you can safely add a
property named 'ids' without breaking your properties page.
- Removed spurious 'self' from scarecrow interfaces; updated - Removed spurious 'self' from scarecrow interfaces; updated
method-generation in Interface package to ignore self when method-generation in Interface package to ignore self when
source is a method (rather than a function). source is a method (rather than a function).
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
############################################################################## ##############################################################################
"""Property management""" """Property management"""
__version__='$Revision: 1.43 $'[11:-2] __version__='$Revision: 1.44 $'[11:-2]
import ExtensionClass, Globals import ExtensionClass, Globals
import ZDOM import ZDOM
...@@ -310,6 +310,10 @@ class PropertyManager(ExtensionClass.Base, ZDOM.ElementWithAttributes): ...@@ -310,6 +310,10 @@ class PropertyManager(ExtensionClass.Base, ZDOM.ElementWithAttributes):
def manage_delProperties(self, ids=None, REQUEST=None): def manage_delProperties(self, ids=None, REQUEST=None):
"""Delete one or more properties specified by 'ids'.""" """Delete one or more properties specified by 'ids'."""
if REQUEST:
# Bugfix for property named "ids" (Casey)
if ids == self.getProperty('ids', None): ids = None
ids = REQUEST.get('_ids', ids)
if ids is None: if ids is None:
return MessageDialog( return MessageDialog(
title='No property specified', title='No property specified',
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
############################################################################## ##############################################################################
"""Property sheets""" """Property sheets"""
__version__='$Revision: 1.82 $'[11:-2] __version__='$Revision: 1.83 $'[11:-2]
import time, App.Management, Globals import time, App.Management, Globals
from webdav.WriteLockInterface import WriteLockInterface from webdav.WriteLockInterface import WriteLockInterface
...@@ -421,6 +421,10 @@ class PropertySheet(Traversable, Persistent, Implicit): ...@@ -421,6 +421,10 @@ class PropertySheet(Traversable, Persistent, Implicit):
def manage_delProperties(self, ids=None, REQUEST=None): def manage_delProperties(self, ids=None, REQUEST=None):
"""Delete one or more properties specified by 'ids'.""" """Delete one or more properties specified by 'ids'."""
if REQUEST:
# Bugfix for properties named "ids" (casey)
if ids == self.getProperty('ids', None): ids = None
ids = REQUEST.get('_ids', ids)
if ids is None: if ids is None:
return MessageDialog( return MessageDialog(
title='No property specified', title='No property specified',
......
...@@ -42,7 +42,7 @@ property values, edit the values and click "Save Changes". ...@@ -42,7 +42,7 @@ property values, edit the values and click "Save Changes".
<tr> <tr>
<td align="left" valign="top" width="16"> <td align="left" valign="top" width="16">
<dtml-if "'d' in _['sequence-item'].get('mode', 'awd')"> <dtml-if "'d' in _['sequence-item'].get('mode', 'awd')">
<input type="checkbox" name="ids:list" value="<dtml-var id html_quote>" <input type="checkbox" name="_ids:list" value="<dtml-var id html_quote>"
id="cb-<dtml-var id>"> id="cb-<dtml-var id>">
<dtml-else> <dtml-else>
</dtml-if> </dtml-if>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment