Commit f2b3ca02 authored by Yoshinori Okuji's avatar Yoshinori Okuji

Renamed from folder_cut.py to Folder_cut.py.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@1550 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent fb2910bf
## Script (Python) "folder_cut" ## Script (Python) "Folder_cut"
##title=Cut objects from a folder and copy to the clipboard ##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=form_id,selection_name='',uids=[],listbox_uid=[] ##parameters=form_id,selection_name='',uids=[],listbox_uid=[]
##title=Cut objects from a folder and copy to the clipboard
##
selected_uids = context.portal_selections.updateSelectionCheckedUidList(selection_name,listbox_uid,uids) selected_uids = context.portal_selections.updateSelectionCheckedUidList(selection_name,listbox_uid,uids)
uids = context.portal_selections.getSelectionCheckedUidsFor(selection_name) uids = context.portal_selections.getSelectionCheckedUidsFor(selection_name)
# make sure nothing is checked after # make sure nothing is checked after
...@@ -11,11 +17,11 @@ REQUEST=context.REQUEST ...@@ -11,11 +17,11 @@ REQUEST=context.REQUEST
# do we still need ids ? XXX finish the work here # do we still need ids ? XXX finish the work here
#if REQUEST.has_key('ids'): #if REQUEST.has_key('ids'):
# context.manage_cutObjects(REQUEST['ids'], REQUEST) # context.manage_cutObjects(REQUEST['ids'], REQUEST)
# return REQUEST.RESPONSE.redirect(context.absolute_url() + '/' + form_id + '/folder_contents?portal_status_message=Item(s)+Cut.') # return REQUEST.RESPONSE.redirect(context.absolute_url() + '/' + form_id + '/Folder_viewContentList?portal_status_message=Item(s)+Cut.')
#elif REQUEST.has_key('uids'): #elif REQUEST.has_key('uids'):
if uids != []: if uids != []:
#context.manage_cutObjects(uids=REQUEST['uids'], REQUEST=REQUEST) #context.manage_cutObjects(uids=REQUEST['uids'], REQUEST=REQUEST)
context.manage_cutObjects(uids=uids, REQUEST=REQUEST) context.manage_cutObjects(uids=uids, REQUEST=REQUEST)
return REQUEST.RESPONSE.redirect(context.absolute_url() + '/' + form_id + '?portal_status_message=Item(s)+Cut.') return REQUEST.RESPONSE.redirect(context.absolute_url() + '/' + form_id + '?portal_status_message=Item(s)+Cut.')
else: else:
return REQUEST.RESPONSE.redirect(context.absolute_url() + '/folder_contents?portal_status_message=Please+select+one+or+more+items+to+cut+first.') return REQUEST.RESPONSE.redirect(context.absolute_url() + '/Folder_viewContentList?portal_status_message=Please+select+one+or+more+items+to+cut+first.')
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