efa7cc97603e1c9d6696c2b21f69e020f6ae4f6c
1 ##parameters=delete='', empty='', indexes=[], ajax=''
2 from ZTUtils
import make_query
3 request
= context
.REQUEST
4 response
= request
.RESPONSE
7 message
= 'Clipboard emptied.'
8 response
.expireCookie('__cp', path
=request
['BASEPATH1'] or "/")
11 message
= 'Please select one or more items first.'
12 elif len(indexes
) == 1 :
13 message
= 'Item removed from clipboard.'
15 message
= 'Items removed from clipboard.'
16 context
.popCP(indexes
)
20 redirUrl
= request
['HTTP_REFERER'].split('?')[0] + \
21 '?' + make_query(portal_status_message
=message
)
22 response
.redirect(redirUrl
)
25 options
['template'] = 'widgets'
26 options
['macro'] = 'clipboard'
27 options
['fragmentId'] = 'clipboard'
28 return context
.use_macro(**options
)