[Zapp-cvs-commit] ZApp/skins/zapp_generic zapp_cmf_object_edit.py,1.2,1.3 zapp_cmf_object_get_info.p
Brought to you by:
sspickle
|
From: <ssp...@us...> - 2003-08-28 17:38:53
|
Update of /cvsroot/zapp/ZApp/skins/zapp_generic
In directory sc8-pr-cvs1:/tmp/cvs-serv12794/zapp_generic
Modified Files:
zapp_cmf_object_edit.py zapp_cmf_object_get_info.py
zapp_cmf_object_type_edit.py
Log Message:
added xml type to zapp_cmf_object_types..
Index: zapp_cmf_object_edit.py
===================================================================
RCS file: /cvsroot/zapp/ZApp/skins/zapp_generic/zapp_cmf_object_edit.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** zapp_cmf_object_edit.py 3 Jul 2003 18:05:07 -0000 1.2
--- zapp_cmf_object_edit.py 28 Aug 2003 17:38:48 -0000 1.3
***************
*** 1,6 ****
! ## Script (Python) "question_edit"
dict = {}
! dict.update(context.REQUEST.form)
submitValue = context.REQUEST.get('submit','')
--- 1,27 ----
! ## Script (Python) "zapp_cmf_object_edit"
! ##bind container=container
! ##bind context=context
! ##bind namespace=
! ##bind script=script
! ##bind subpath=traverse_subpath
! ##parameters=inputDict=None
! ##title=
! ##
! myApp = context.getApplication()
! myType = context.portal_type
! miscData = myApp.MiscData
! tpropObjects = miscData.ZApp_getItems(Manager='CMFThings', objectID='metaObject', dataType='ZCMFPropsFor' + myType)
! myTPropsObj = tpropObjects and tpropObjects[0]
! myTPropDict = (myTPropsObj and myTPropsObj.getXMLDict()) or {}
! myTPropDefs = myTPropDict.get('zapp_properties',[])
!
! import xmlrpclib
dict = {}
!
! if inputDict is None:
! dict.update(context.REQUEST.form)
! else:
! dict.update(inputDict)
submitValue = context.REQUEST.get('submit','')
***************
*** 20,24 ****
if currVal:
currVal = currVal[:-1]
!
context.safeMiscData.setXMLAttrs(dict = dict)
--- 41,54 ----
if currVal:
currVal = currVal[:-1]
!
! for item in myTPropDefs:
! propName = item.get('name')
! propType = item.get('type')
! if (propName in dict.keys()) and (propType == 'xml'):
! inputValue = dict.get(propName,'')
! if inputValue:
! inputValue = xmlrpclib.loads(inputValue)
! dict[propName] = inputValue[0][0]
!
context.safeMiscData.setXMLAttrs(dict = dict)
Index: zapp_cmf_object_get_info.py
===================================================================
RCS file: /cvsroot/zapp/ZApp/skins/zapp_generic/zapp_cmf_object_get_info.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** zapp_cmf_object_get_info.py 18 Aug 2003 13:38:09 -0000 1.2
--- zapp_cmf_object_get_info.py 28 Aug 2003 17:38:48 -0000 1.3
***************
*** 1,2 ****
--- 1,11 ----
+ ## Script (Python) "zapp_cmf_object_get_info"
+ ##bind container=container
+ ##bind context=context
+ ##bind namespace=
+ ##bind script=script
+ ##bind subpath=traverse_subpath
+ ##parameters=
+ ##title=
+ ##
# Example code:
Index: zapp_cmf_object_type_edit.py
===================================================================
RCS file: /cvsroot/zapp/ZApp/skins/zapp_generic/zapp_cmf_object_type_edit.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** zapp_cmf_object_type_edit.py 3 Jul 2003 22:30:02 -0000 1.2
--- zapp_cmf_object_type_edit.py 28 Aug 2003 17:38:48 -0000 1.3
***************
*** 1,4 ****
! ## Script (Python) "question_edit"
!
myApp = context.getApplication()
myType = context.portal_type
--- 1,11 ----
! ## Script (Python) "zapp_cmf_object_type_edit"
! ##bind container=container
! ##bind context=context
! ##bind namespace=
! ##bind script=script
! ##bind subpath=traverse_subpath
! ##parameters=
! ##title=
! ##
myApp = context.getApplication()
myType = context.portal_type
***************
*** 127,129 ****
context.REQUEST.RESPONSE.redirect('zapp_cmf_object_type_edit_form')
-
--- 134,135 ----
|