[CMF-checkins] CVS: CMF - folder_copy.dtml:1.2 folder_cut.dtml:1.2 folder_delete.dtml:1.2 folder_paste.dtml:1.2
tseaver@digicool.com
tseaver@digicool.com
Fri, 1 Jun 2001 00:29:10 -0400 (EDT)
Update of /cvs-repository/CMF/CMFDefault/skins/control
In directory korak.digicool.com:/tmp/cvs-serv23877
Modified Files:
folder_copy.dtml folder_cut.dtml folder_delete.dtml
folder_paste.dtml
Log Message:
- Check for appropriate REQUEST variables before invoking CopySupport
machinery, return a nice 'portal_status_message' instead of allowing
the traceback to kick in (Tracker issue #247).
--- Updated File folder_copy.dtml in package CMF --
--- folder_copy.dtml 2001/02/23 14:24:09 1.1
+++ folder_copy.dtml 2001/06/01 04:29:09 1.2
@@ -1,2 +1,10 @@
-<dtml-call expr="manage_copyObjects(REQUEST['ids'], REQUEST, RESPONSE)">
-<dtml-return expr="folder_contents(_.None, _, portal_status_message='Copied.')">
+<dtml-if expr="REQUEST.has_key( 'ids' )">
+ <dtml-call expr="manage_copyObjects(REQUEST['ids'], REQUEST, RESPONSE)">
+ <dtml-call expr="REQUEST['RESPONSE'].redirect(
+ '%s/folder_contents?portal_status_message=Copied.'
+ % absolute_url() )">
+<dtml-else>
+ <dtml-call expr="REQUEST['RESPONSE'].redirect(
+ '%s/folder_contents?portal_status_message='
+ 'Please+select+one+or+more+items+first.' % absolute_url() )">
+</dtml-if>
--- Updated File folder_cut.dtml in package CMF --
--- folder_cut.dtml 2001/02/23 14:24:09 1.1
+++ folder_cut.dtml 2001/06/01 04:29:09 1.2
@@ -1,2 +1,10 @@
-<dtml-call expr="manage_cutObjects(REQUEST['ids'], REQUEST)">
-<dtml-return expr="folder_contents(_.None, _, portal_status_message='Cut.')">
+<dtml-if expr="REQUEST.has_key( 'ids' )">
+ <dtml-call expr="manage_cutObjects(REQUEST['ids'], REQUEST)">
+ <dtml-call expr="REQUEST['RESPONSE'].redirect(
+ '%s/folder_contents?portal_status_message=Cut.'
+ % absolute_url() )">
+<dtml-else>
+ <dtml-call expr="REQUEST['RESPONSE'].redirect(
+ '%s/folder_contents?portal_status_message='
+ 'Please+select+one+or+more+items+first.' % absolute_url() )">
+</dtml-if>
--- Updated File folder_delete.dtml in package CMF --
--- folder_delete.dtml 2001/02/23 14:24:09 1.1
+++ folder_delete.dtml 2001/06/01 04:29:09 1.2
@@ -1,2 +1,10 @@
-<dtml-call expr="manage_delObjects(REQUEST['ids'], REQUEST)">
-<dtml-return expr="folder_contents(_.None, _, portal_status_message='Deleted.')">
+<dtml-if expr="REQUEST.has_key( 'ids' )">
+ <dtml-call expr="manage_delObjects(REQUEST['ids'], REQUEST)">
+ <dtml-call expr="REQUEST['RESPONSE'].redirect(
+ '%s/folder_contents?portal_status_message=Deleted.'
+ % absolute_url() )">
+<dtml-else>
+ <dtml-call expr="REQUEST['RESPONSE'].redirect(
+ '%s/folder_contents?portal_status_message='
+ 'Please+select+one+or+more+items+first.' % absolute_url() )">
+</dtml-if>
--- Updated File folder_paste.dtml in package CMF --
--- folder_paste.dtml 2001/02/23 14:24:09 1.1
+++ folder_paste.dtml 2001/06/01 04:29:09 1.2
@@ -1,2 +1,11 @@
-<dtml-call expr="manage_pasteObjects(REQUEST['__cp'], REQUEST)">
-<dtml-return expr="folder_contents(_.None, _, portal_status_message='Pasted.')">
+<dtml-if expr="REQUEST.has_key( 'ids' )">
+ <dtml-call expr="manage_pasteObjects(REQUEST['__cp'], REQUEST)">
+ <dtml-call expr="REQUEST['RESPONSE'].redirect(
+ '%s/folder_contents?portal_status_message=Pasted.'
+ % absolute_url() )">
+<dtml-else>
+ <dtml-call expr="REQUEST['RESPONSE'].redirect(
+ '%s/folder_contents?portal_status_message='
+ 'Please+copy+or+cut+one+or+more+items+first.'
+ % absolute_url() )">
+</dtml-if>