[CMF-checkins] SVN: CMF/trunk/C backported some changes from
folder_contents view:
Yvo Schubbe
y.2006_ at wcm-solutions.de
Wed Feb 1 06:13:26 EST 2006
Log message for revision 41527:
backported some changes from folder_contents view:
- fixed cb_dataValid call
- split off validateClipboardData from folder_paste_control
- some cleanup
- updated cmf_default.pot
Changed:
U CMF/trunk/CHANGES.txt
U CMF/trunk/CMFDefault/locales/cmf_default.pot
UU CMF/trunk/CMFDefault/skins/zpt_control/folder_paste_control.py
A CMF/trunk/CMFDefault/skins/zpt_control/validateClipboardData.py
UU CMF/trunk/CMFDefault/skins/zpt_generic/folder_contents.py
-=-
Modified: CMF/trunk/CHANGES.txt
===================================================================
--- CMF/trunk/CHANGES.txt 2006-02-01 09:00:56 UTC (rev 41526)
+++ CMF/trunk/CHANGES.txt 2006-02-01 11:13:25 UTC (rev 41527)
@@ -128,6 +128,9 @@
Bug Fixes
+ - CMFDefault skins: Fixed clipboard data validation.
+ Split off validateClipboardData from folder_paste_control.
+
- CMFDefault skins: Refactored and improved discussion_reply_form.
- CMFDefault utils: Fixed html_marshal function.
Modified: CMF/trunk/CMFDefault/locales/cmf_default.pot
===================================================================
--- CMF/trunk/CMFDefault/locales/cmf_default.pot 2006-02-01 09:00:56 UTC (rev 41526)
+++ CMF/trunk/CMFDefault/locales/cmf_default.pot 2006-02-01 11:13:25 UTC (rev 41527)
@@ -13,7 +13,7 @@
msgid ""
msgstr ""
"Project-Id-Version: CMF 2.0\n"
-"POT-Creation-Date: Mon Jan 30 18:05:55 2006\n"
+"POT-Creation-Date: Wed Feb 01 11:59:02 2006\n"
"Language-Team: CMF Developers <zope-cmf at zope.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -755,26 +755,22 @@
msgid "Item moved down."
msgstr ""
-#: CMFDefault/skins/zpt_control/folder_paste_control.py:12
+#: CMFDefault/skins/zpt_control/folder_paste_control.py:11
msgid "Item pasted."
msgstr ""
-#: CMFDefault/skins/zpt_control/folder_paste_control.py:14
+#: CMFDefault/skins/zpt_control/folder_paste_control.py:13
msgid "Items pasted."
msgstr ""
-#: CMFDefault/skins/zpt_control/folder_paste_control.py:16
+#: CMFDefault/skins/zpt_control/folder_paste_control.py:15
msgid "CopyError: Paste failed."
msgstr ""
-#: CMFDefault/skins/zpt_control/folder_paste_control.py:18
+#: CMFDefault/skins/zpt_control/folder_paste_control.py:17
msgid "Unauthorized: Paste failed."
msgstr ""
-#: CMFDefault/skins/zpt_control/folder_paste_control.py:20
-msgid "Please copy or cut one or more items to paste first."
-msgstr ""
-
#: CMFDefault/skins/zpt_control/folder_rename_control.py:11
msgid "Item renamed."
msgstr ""
@@ -884,6 +880,10 @@
msgid "UpdatePeriod"
msgstr ""
+#: CMFDefault/skins/zpt_control/validateClipboardData.py:8
+msgid "Please copy or cut one or more items to paste first."
+msgstr ""
+
#: CMFDefault/skins/zpt_control/validateId.py:11
msgid "Please enter an ID."
msgstr ""
@@ -948,48 +948,47 @@
msgid "Reply body"
msgstr ""
-#: CMFDefault/skins/zpt_generic/folder_contents.py:109
+#: CMFDefault/skins/zpt_generic/folder_contents.py:110
#: CMFDefault/skins/zpt_generic/metadata_help.pt:114
#: CMFDefault/skins/zpt_generic/review.pt:29
#: CMFDefault/skins/zpt_generic/search_results_template.pt:18
msgid "Type"
msgstr ""
-#: CMFDefault/skins/zpt_generic/folder_contents.py:113
+#: CMFDefault/skins/zpt_generic/folder_contents.py:114
msgid "Name"
msgstr ""
-#: CMFDefault/skins/zpt_generic/folder_contents.py:117
+#: CMFDefault/skins/zpt_generic/folder_contents.py:118
msgid "Last Modified"
msgstr ""
-#: CMFDefault/skins/zpt_generic/folder_contents.py:121
+#: CMFDefault/skins/zpt_generic/folder_contents.py:122
msgid "Position"
msgstr ""
-#: CMFDefault/skins/zpt_generic/folder_contents.py:168
+#: CMFDefault/skins/zpt_generic/folder_contents.py:169
#: CMFDefault/skins/zpt_generic/members_manage_form.py:49
msgid "New..."
msgstr ""
-#: CMFDefault/skins/zpt_generic/folder_contents.py:170
-#: CMFDefault/skins/zpt_generic/folder_rename_form.py:42
-msgid "Rename"
+#: CMFDefault/skins/zpt_generic/folder_contents.py:172
+msgid "Rename..."
msgstr ""
-#: CMFDefault/skins/zpt_generic/folder_contents.py:172
+#: CMFDefault/skins/zpt_generic/folder_contents.py:174
msgid "Cut"
msgstr ""
-#: CMFDefault/skins/zpt_generic/folder_contents.py:173
+#: CMFDefault/skins/zpt_generic/folder_contents.py:175
msgid "Copy"
msgstr ""
-#: CMFDefault/skins/zpt_generic/folder_contents.py:175
+#: CMFDefault/skins/zpt_generic/folder_contents.py:177
msgid "Paste"
msgstr ""
-#: CMFDefault/skins/zpt_generic/folder_contents.py:177
+#: CMFDefault/skins/zpt_generic/folder_contents.py:179
#: CMFDefault/skins/zpt_generic/members_delete_form.py:27
#: CMFDefault/skins/zpt_generic/folder_localrole_form.pt:201
msgid "Delete"
@@ -1136,6 +1135,10 @@
msgid "Email address"
msgstr ""
+#: CMFDefault/skins/zpt_generic/folder_rename_form.py:42
+msgid "Rename"
+msgstr ""
+
#: CMFDefault/skins/zpt_generic/folder_rename_form.py:43
#: CMFDefault/skins/zpt_generic/join_form.py:55
#: CMFDefault/skins/zpt_generic/members_delete_form.py:28
Modified: CMF/trunk/CMFDefault/skins/zpt_control/folder_paste_control.py
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_control/folder_paste_control.py 2006-02-01 09:00:56 UTC (rev 41526)
+++ CMF/trunk/CMFDefault/skins/zpt_control/folder_paste_control.py 2006-02-01 11:13:25 UTC (rev 41527)
@@ -5,17 +5,13 @@
from Products.CMFDefault.exceptions import zExceptions_Unauthorized
from Products.CMFDefault.utils import Message as _
-if context.cb_dataValid:
- try:
- result = context.manage_pasteObjects(context.REQUEST['__cp'])
- if len(result) == 1:
- return context.setStatus(True, _('Item pasted.'))
- else:
- return context.setStatus(True, _('Items pasted.'))
- except CopyError:
- return context.setStatus(False, _('CopyError: Paste failed.'))
- except zExceptions_Unauthorized:
- return context.setStatus(False, _('Unauthorized: Paste failed.'))
-else:
- return context.setStatus(False, _('Please copy or cut one or more items '
- 'to paste first.'))
+try:
+ result = context.manage_pasteObjects(context.REQUEST['__cp'])
+ if len(result) == 1:
+ return context.setStatus(True, _(u'Item pasted.'))
+ else:
+ return context.setStatus(True, _(u'Items pasted.'))
+except CopyError:
+ return context.setStatus(False, _(u'CopyError: Paste failed.'))
+except zExceptions_Unauthorized:
+ return context.setStatus(False, _(u'Unauthorized: Paste failed.'))
Property changes on: CMF/trunk/CMFDefault/skins/zpt_control/folder_paste_control.py
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
Added: CMF/trunk/CMFDefault/skins/zpt_control/validateClipboardData.py
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_control/validateClipboardData.py 2006-02-01 09:00:56 UTC (rev 41526)
+++ CMF/trunk/CMFDefault/skins/zpt_control/validateClipboardData.py 2006-02-01 11:13:25 UTC (rev 41527)
@@ -0,0 +1,9 @@
+##parameters=**kw
+##
+from Products.CMFDefault.utils import Message as _
+
+if context.cb_dataValid():
+ return context.setStatus(True)
+else:
+ return context.setStatus(False, _(u'Please copy or cut one or more items '
+ u'to paste first.'))
Property changes on: CMF/trunk/CMFDefault/skins/zpt_control/validateClipboardData.py
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: CMF/trunk/CMFDefault/skins/zpt_generic/folder_contents.py
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_generic/folder_contents.py 2006-02-01 09:00:56 UTC (rev 41526)
+++ CMF/trunk/CMFDefault/skins/zpt_generic/folder_contents.py 2006-02-01 11:13:25 UTC (rev 41527)
@@ -38,6 +38,7 @@
context.setRedirect(context, 'object/new'):
return
elif items_paste and \
+ context.validateClipboardData(**form) and \
context.folder_paste_control(**form) and \
context.setRedirect(context, default_target, **default_kw):
return
@@ -106,19 +107,19 @@
is_default = 0
columns = ( {'key': 'Type',
- 'title': _('Type'),
+ 'title': _(u'Type'),
'width': '20',
'colspan': '2'}
, {'key': 'getId',
- 'title': _('Name'),
+ 'title': _(u'Name'),
'width': '360',
'colspan': None}
, {'key': 'modified',
- 'title': _('Last Modified'),
+ 'title': _(u'Last Modified'),
'width': '180',
'colspan': None}
, {'key': 'position',
- 'title': _('Position'),
+ 'title': _(u'Position'),
'width': '80',
'colspan': None }
)
@@ -165,16 +166,17 @@
buttons = []
if items_manage_allowed:
if items_add_allowed and context.allowedContentTypes():
- buttons.append( {'name': 'items_new', 'value': _('New...')} )
+ buttons.append( {'name': 'items_new', 'value': _(u'New...')} )
if items:
- buttons.append( {'name': 'items_rename', 'value': _('Rename')} )
+ buttons.append( {'name': 'items_rename',
+ 'value': _(u'Rename...')} )
if items:
- buttons.append( {'name': 'items_cut', 'value': _('Cut')} )
- buttons.append( {'name': 'items_copy', 'value': _('Copy')} )
+ buttons.append( {'name': 'items_cut', 'value': _(u'Cut')} )
+ buttons.append( {'name': 'items_copy', 'value': _(u'Copy')} )
if items_add_allowed and context.cb_dataValid():
- buttons.append( {'name': 'items_paste', 'value': _('Paste')} )
+ buttons.append( {'name': 'items_paste', 'value': _(u'Paste')} )
if items_delete_allowed and items:
- buttons.append( {'name': 'items_delete', 'value': _('Delete')} )
+ buttons.append( {'name': 'items_delete', 'value': _(u'Delete')} )
length = batch_obj.sequence_length
is_orderable = items_move_allowed and (key == 'position') and length > 1
is_sortable = items_move_allowed and not is_default
Property changes on: CMF/trunk/CMFDefault/skins/zpt_generic/folder_contents.py
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
More information about the CMF-checkins
mailing list