zapp-cvs-commit Mailing List for ZApp Framework (Page 7)
Brought to you by:
sspickle
You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(24) |
Jul
(14) |
Aug
(19) |
Sep
(3) |
Oct
(21) |
Nov
(9) |
Dec
(8) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(23) |
Feb
(13) |
Mar
(37) |
Apr
(5) |
May
(15) |
Jun
(2) |
Jul
(1) |
Aug
(1) |
Sep
(13) |
Oct
(1) |
Nov
(1) |
Dec
|
| 2005 |
Jan
(2) |
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2006 |
Jan
(4) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
Update of /cvsroot/zapp/ZApp/skins/zapp_generic
In directory sc8-pr-cvs1:/tmp/cvs-serv2885/skins/zapp_generic
Modified Files:
Tag: CMF_relations
zapp_cmf_object_edit.py zapp_cmf_object_edit_form.pt
Added Files:
Tag: CMF_relations
zapp_cmf_object_test.py zapp_cmf_sub_contents.zpt
Log Message:
fixed subclassing problem!
--- NEW FILE: zapp_cmf_object_test.py ---
## Script (Python) "zapp_cmf_object_test"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=
##title=
##
# Example code:
print context.related_object_types
return printed
--- NEW FILE: zapp_cmf_sub_contents.zpt ---
<span tal:replace="structure here/folder_contents"/>
Index: zapp_cmf_object_edit.py
===================================================================
RCS file: /cvsroot/zapp/ZApp/skins/zapp_generic/zapp_cmf_object_edit.py,v
retrieving revision 1.3.2.1
retrieving revision 1.3.2.2
diff -C2 -d -r1.3.2.1 -r1.3.2.2
*** zapp_cmf_object_edit.py 18 Oct 2003 21:07:05 -0000 1.3.2.1
--- zapp_cmf_object_edit.py 28 Oct 2003 18:33:19 -0000 1.3.2.2
***************
*** 8,14 ****
--- 8,20 ----
##title=
##
+
+ title=context.REQUEST.get('title',None)
+ if title is not None:
+ context.manage_changeProperties(title=title)
+
myApp = context.getApplication()
myType = context.portal_type
miscData = myApp.MiscData
+
cmfSpec = context.getMySpecialist()
tpropObjects = miscData.ZApp_getItems(Manager=cmfSpec.getId(), objectID='metaObject', dataType='ZCMFPropsFor' + myType)
***************
*** 54,56 ****
context.safeMiscData.setXMLAttrs(dict = dict)
! context.REQUEST.RESPONSE.redirect('zapp_cmf_object_edit_form')
--- 60,62 ----
context.safeMiscData.setXMLAttrs(dict = dict)
! context.REQUEST.RESPONSE.redirect('zapp_cmf_object_edit_form?portal_status_message=ZApp+CMF+Object+Changed.')
Index: zapp_cmf_object_edit_form.pt
===================================================================
RCS file: /cvsroot/zapp/ZApp/skins/zapp_generic/zapp_cmf_object_edit_form.pt,v
retrieving revision 1.3.2.1
retrieving revision 1.3.2.2
diff -C2 -d -r1.3.2.1 -r1.3.2.2
*** zapp_cmf_object_edit_form.pt 18 Oct 2003 21:07:05 -0000 1.3.2.1
--- zapp_cmf_object_edit_form.pt 28 Oct 2003 18:33:19 -0000 1.3.2.2
***************
*** 38,44 ****
<table tal:condition="myPropSet">
<form action="." tal:attributes="action string:${here/getId}/zapp_cmf_object_edit" method="post">
<tr tal:repeat="propDef myPropSet">
! <td tal:define="propName propDef/name;
! propType propDef/type;
subObject propDef/subObject | python:[];
subDefs subObject/zapp_properties | python:[];
--- 38,45 ----
<table tal:condition="myPropSet">
<form action="." tal:attributes="action string:${here/getId}/zapp_cmf_object_edit" method="post">
+ <tr><td>Title: <input name="title" size="20" value="" tal:attributes="value here/title"/></td></tr>
<tr tal:repeat="propDef myPropSet">
! <td tal:define="propName propDef/name;
! propType propDef/type;
subObject propDef/subObject | python:[];
subDefs subObject/zapp_properties | python:[];
|
|
From: <ssp...@us...> - 2003-10-28 15:46:39
|
Update of /cvsroot/zapp/ZApp
In directory sc8-pr-cvs1:/tmp/cvs-serv4199
Modified Files:
Tag: CMF_relations
ZApp_CMFBase.py
Log Message:
make ZApp_CMF folderish..
Index: ZApp_CMFBase.py
===================================================================
RCS file: /cvsroot/zapp/ZApp/ZApp_CMFBase.py,v
retrieving revision 1.16.2.4
retrieving revision 1.16.2.5
diff -C2 -d -r1.16.2.4 -r1.16.2.5
*** ZApp_CMFBase.py 26 Oct 2003 18:53:43 -0000 1.16.2.4
--- ZApp_CMFBase.py 28 Oct 2003 15:43:33 -0000 1.16.2.5
***************
*** 44,47 ****
--- 44,48 ----
meta_type = 'ZApp CMF Content'
zapp_cmf_type = 1
+ isPrincipiaFolderish = 1
_primaryKeyStringSize=255 # allow for a pretty rediculous size...
***************
*** 123,127 ****
calling setstate.. set state gets called when an object is pulled into memory
"""
! print "in setstate for %s with state '%s'" % (self.id, `state`)
result = SkinnedFolder.__setstate__(self, state)
print "XXXXX*****XXXXXX got result '%s'" % `result`
--- 124,133 ----
calling setstate.. set state gets called when an object is pulled into memory
"""
! try:
! rep = `state`
! except:
! rep = "can't render"
!
! print "in setstate for %s with state '%s'" % (self.id, rep)
result = SkinnedFolder.__setstate__(self, state)
print "XXXXX*****XXXXXX got result '%s'" % `result`
***************
*** 132,136 ****
# save the 'safeStorageID' so we can use it when we're added again..
#
!
oldID = self.getId()
--- 138,142 ----
# save the 'safeStorageID' so we can use it when we're added again..
#
! print "In _setID for ", id
oldID = self.getId()
***************
*** 272,275 ****
--- 278,283 ----
initCMFObjectMetadata(o)
o.change()
+
+ print "Added CMF Object:" , id
if klass != ZApp_CMFBase:
|
|
From: <ssp...@us...> - 2003-10-26 18:57:06
|
Update of /cvsroot/zapp/ZApp
In directory sc8-pr-cvs1:/tmp/cvs-serv16436
Modified Files:
Tag: CMF_relations
ZApp_CMFBase.py
Log Message:
ignore MOSX directory litter
Index: ZApp_CMFBase.py
===================================================================
RCS file: /cvsroot/zapp/ZApp/ZApp_CMFBase.py,v
retrieving revision 1.16.2.3
retrieving revision 1.16.2.4
diff -C2 -d -r1.16.2.3 -r1.16.2.4
*** ZApp_CMFBase.py 18 Oct 2003 21:07:05 -0000 1.16.2.3
--- ZApp_CMFBase.py 26 Oct 2003 18:53:43 -0000 1.16.2.4
***************
*** 88,91 ****
--- 88,97 ----
return "OK!"
+
+ def _canCopy(self, op=0):
+ """
+ Can this object be copied?
+ """
+ return hasattr(self.aq_parent.aq_base, 'zapp_cmf_type')
def _notifyOfCopyTo(self, container, op=0):
***************
*** 103,106 ****
--- 109,130 ----
ZApp_LOG("_notifyOfCopyTo: Setting safeStorageID to " + safeStorageID)
+
+ def __getstate__(self):
+ """
+ getstate is called when an object is being 'saved'
+ """
+ print "in getstate for %s" % self.id
+ result = SkinnedFolder.__getstate__(self)
+ print "XXXXX*****XXXXXX got result '%s'" % `result`
+ return result
+
+ def __setstate__(self, state):
+ """
+ calling setstate.. set state gets called when an object is pulled into memory
+ """
+ print "in setstate for %s with state '%s'" % (self.id, `state`)
+ result = SkinnedFolder.__setstate__(self, state)
+ print "XXXXX*****XXXXXX got result '%s'" % `result`
+ return result
def _setId(self, id):
|
|
From: <ssp...@us...> - 2003-10-26 18:55:38
|
Update of /cvsroot/zapp/ZApp/skins/zapp_generic
In directory sc8-pr-cvs1:/tmp/cvs-serv16436/skins/zapp_generic
Added Files:
Tag: CMF_relations
.cvsignore
Log Message:
ignore MOSX directory litter
--- NEW FILE: .cvsignore ---
.DS*
|
|
From: <ssp...@us...> - 2003-10-19 05:07:31
|
Update of /cvsroot/zapp/ZApp
In directory sc8-pr-cvs1:/tmp/cvs-serv13950
Modified Files:
Tag: CMF_relations
ZApp_Application.py ZApp_CMFBase.py
Log Message:
fixed problem with type info
Index: ZApp_Application.py
===================================================================
RCS file: /cvsroot/zapp/ZApp/ZApp_Application.py,v
retrieving revision 1.25.2.1
retrieving revision 1.25.2.2
diff -C2 -d -r1.25.2.1 -r1.25.2.2
*** ZApp_Application.py 8 Oct 2003 20:37:47 -0000 1.25.2.1
--- ZApp_Application.py 18 Oct 2003 21:07:05 -0000 1.25.2.2
***************
*** 129,132 ****
--- 129,133 ----
applicationMetaType = meta_type = 'Z App Application'
specialistMetaTypes = ['Specialist','Z App Specialist']
+
LOCALE_ID = 'TST'
***************
*** 274,278 ****
SDT = 'SESSION_DATA_TYPE'
!
def getUserSessions(self, browserID=None, create=0):
"""
--- 275,279 ----
SDT = 'SESSION_DATA_TYPE'
!
def getUserSessions(self, browserID=None, create=0):
"""
Index: ZApp_CMFBase.py
===================================================================
RCS file: /cvsroot/zapp/ZApp/ZApp_CMFBase.py,v
retrieving revision 1.16.2.2
retrieving revision 1.16.2.3
diff -C2 -d -r1.16.2.2 -r1.16.2.3
*** ZApp_CMFBase.py 13 Oct 2003 19:36:51 -0000 1.16.2.2
--- ZApp_CMFBase.py 18 Oct 2003 21:07:05 -0000 1.16.2.3
***************
*** 42,46 ****
class ZApp_CMFBase(FreeRangeDS, ZApp_Base, SkinnedFolder, DefaultDublinCoreImpl, ZApp_MiscDataUser, ZApp_RelatedObject):
! meta_type = 'ZApp CMF Content Type'
zapp_cmf_type = 1
--- 42,46 ----
class ZApp_CMFBase(FreeRangeDS, ZApp_Base, SkinnedFolder, DefaultDublinCoreImpl, ZApp_MiscDataUser, ZApp_RelatedObject):
! meta_type = 'ZApp CMF Content'
zapp_cmf_type = 1
***************
*** 201,206 ****
copy object relations that belong to the object I was cloned from...
"""
- #print "copyObjectRelations", theObjectRelations
-
for relationDict in theObjectRelations:
get = relationDict.get
--- 201,204 ----
|
Update of /cvsroot/zapp/ZApp/skins/zapp_generic
In directory sc8-pr-cvs1:/tmp/cvs-serv13950/skins/zapp_generic
Modified Files:
Tag: CMF_relations
zapp_cmf_object_edit.py zapp_cmf_object_edit_form.pt
zapp_cmf_object_type_edit.py zapp_cmf_object_type_edit_form.pt
zapp_cmf_object_view.pt
Log Message:
fixed problem with type info
Index: zapp_cmf_object_edit.py
===================================================================
RCS file: /cvsroot/zapp/ZApp/skins/zapp_generic/zapp_cmf_object_edit.py,v
retrieving revision 1.3
retrieving revision 1.3.2.1
diff -C2 -d -r1.3 -r1.3.2.1
*** zapp_cmf_object_edit.py 28 Aug 2003 17:38:48 -0000 1.3
--- zapp_cmf_object_edit.py 18 Oct 2003 21:07:05 -0000 1.3.2.1
***************
*** 11,15 ****
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 {}
--- 11,16 ----
myType = context.portal_type
miscData = myApp.MiscData
! cmfSpec = context.getMySpecialist()
! tpropObjects = miscData.ZApp_getItems(Manager=cmfSpec.getId(), objectID='metaObject', dataType='ZCMFPropsFor' + myType)
myTPropsObj = tpropObjects and tpropObjects[0]
myTPropDict = (myTPropsObj and myTPropsObj.getXMLDict()) or {}
Index: zapp_cmf_object_edit_form.pt
===================================================================
RCS file: /cvsroot/zapp/ZApp/skins/zapp_generic/zapp_cmf_object_edit_form.pt,v
retrieving revision 1.3
retrieving revision 1.3.2.1
diff -C2 -d -r1.3 -r1.3.2.1
*** zapp_cmf_object_edit_form.pt 18 Aug 2003 13:38:09 -0000 1.3
--- zapp_cmf_object_edit_form.pt 18 Oct 2003 21:07:05 -0000 1.3.2.1
***************
*** 29,34 ****
<div tal:define="myApp python:here.getApplication();
myType here/portal_type;
miscDataSpecialist myApp/MiscData;
! typePropertiesObjects python:miscDataSpecialist.ZApp_getItems(Manager='CMFThings', objectID='metaObject', dataType='ZCMFPropsFor' + myType);
myTPropsMiscData python:typePropertiesObjects and typePropertiesObjects[0].getXMLDict();
myPropSet myTPropsMiscData/zapp_properties | nothing;
--- 29,35 ----
<div tal:define="myApp python:here.getApplication();
myType here/portal_type;
+ cmfSpec python:here.getMySpecialist();
miscDataSpecialist myApp/MiscData;
! typePropertiesObjects python:miscDataSpecialist.ZApp_getItems(Manager=cmfSpec.getId(), objectID='metaObject', dataType='ZCMFPropsFor' + myType);
myTPropsMiscData python:typePropertiesObjects and typePropertiesObjects[0].getXMLDict();
myPropSet myTPropsMiscData/zapp_properties | nothing;
***************
*** 36,40 ****
<table tal:condition="myPropSet">
! <form action="zapp_cmf_object_edit" method="post">
<tr tal:repeat="propDef myPropSet">
<td tal:define="propName propDef/name;
--- 37,41 ----
<table tal:condition="myPropSet">
! <form action="." tal:attributes="action string:${here/getId}/zapp_cmf_object_edit" method="post">
<tr tal:repeat="propDef myPropSet">
<td tal:define="propName propDef/name;
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.3
retrieving revision 1.3.2.1
diff -C2 -d -r1.3 -r1.3.2.1
*** zapp_cmf_object_type_edit.py 28 Aug 2003 17:38:48 -0000 1.3
--- zapp_cmf_object_type_edit.py 18 Oct 2003 21:07:05 -0000 1.3.2.1
***************
*** 11,15 ****
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 {}
--- 11,16 ----
myType = context.portal_type
miscData = myApp.MiscData
! cmfSpec = context.getMySpecialist()
! tpropObjects = miscData.ZApp_getItems(Manager=cmfSpec.getId(), objectID='metaObject', dataType='ZCMFPropsFor' + myType)
myTPropsObj = tpropObjects and tpropObjects[0]
myTPropDict = (myTPropsObj and myTPropsObj.getXMLDict()) or {}
***************
*** 126,130 ****
if not myTPropsObj:
! tpropObjects = miscData.ZApp_getItems(Manager='CMFThings', objectID='metaObject', dataType='ZCMFPropsFor' + myType, createIfNone=1)
myTPropsObj = tpropObjects and tpropObjects[0]
if not myTPropsObj:
--- 127,131 ----
if not myTPropsObj:
! tpropObjects = miscData.ZApp_getItems(Manager=cmfSpec.getId(), objectID='metaObject', dataType='ZCMFPropsFor' + myType, createIfNone=1)
myTPropsObj = tpropObjects and tpropObjects[0]
if not myTPropsObj:
***************
*** 133,135 ****
myTPropsObj.setXMLAttrs({'zapp_properties': myTPropDefs})
! context.REQUEST.RESPONSE.redirect('zapp_cmf_object_type_edit_form')
--- 134,136 ----
myTPropsObj.setXMLAttrs({'zapp_properties': myTPropDefs})
! context.REQUEST.RESPONSE.redirect(context.absolute_url() + '/zapp_cmf_object_type_edit_form')
Index: zapp_cmf_object_type_edit_form.pt
===================================================================
RCS file: /cvsroot/zapp/ZApp/skins/zapp_generic/zapp_cmf_object_type_edit_form.pt,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -C2 -d -r1.4 -r1.4.2.1
*** zapp_cmf_object_type_edit_form.pt 18 Aug 2003 13:38:09 -0000 1.4
--- zapp_cmf_object_type_edit_form.pt 18 Oct 2003 21:07:05 -0000 1.4.2.1
***************
*** 54,63 ****
<div tal:define="myApp python:here.getApplication();
myType here/portal_type;
miscDataSpecialist myApp/MiscData;
! typePropertiesObjects python:miscDataSpecialist.ZApp_getItems(Manager='CMFThings', objectID='metaObject', dataType='ZCMFPropsFor' + myType);
! myTPropsMiscData python:typePropertiesObjects and typePropertiesObjects[0].getXMLDict();
myPropSet myTPropsMiscData/zapp_properties | nothing">
! <form action="zapp_cmf_object_type_edit" method="post">
<table tal:condition="myPropSet">
<tr tal:repeat="propDef myPropSet">
--- 54,64 ----
<div tal:define="myApp python:here.getApplication();
myType here/portal_type;
+ cmfSpec python:here.getMySpecialist();
miscDataSpecialist myApp/MiscData;
! typePropertiesObjects python:miscDataSpecialist.ZApp_getItems(Manager=cmfSpec.getId(), objectID='metaObject', dataType='ZCMFPropsFor' + myType);
! myTPropsMiscData python:typePropertiesObjects and typePropertiesObjects[0].getXMLDict();
myPropSet myTPropsMiscData/zapp_properties | nothing">
! <form action="." tal:attributes="action string:${here/getId}/zapp_cmf_object_type_edit" method="post">
<table tal:condition="myPropSet">
<tr tal:repeat="propDef myPropSet">
Index: zapp_cmf_object_view.pt
===================================================================
RCS file: /cvsroot/zapp/ZApp/skins/zapp_generic/zapp_cmf_object_view.pt,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -C2 -d -r1.4 -r1.4.2.1
*** zapp_cmf_object_view.pt 7 Aug 2003 13:50:32 -0000 1.4
--- zapp_cmf_object_view.pt 18 Oct 2003 21:07:05 -0000 1.4.2.1
***************
*** 11,17 ****
<div tal:define="myApp python:here.getApplication();
myType here/portal_type;
miscDataSpecialist myApp/MiscData;
! typePropertiesObjects python:miscDataSpecialist.ZApp_getItems(Manager='CMFThings', objectID='metaObject', dataType='ZCMFPropsFor' + myType);
! myTypePropertiesMiscData python:typePropertiesObjects and typePropertiesObjects[0].getXMLDict();
myProperties python:here.safeMiscData.getXMLDict()">
--- 11,19 ----
<div tal:define="myApp python:here.getApplication();
myType here/portal_type;
+ cmfSpec python:here.getMySpecialist();
miscDataSpecialist myApp/MiscData;
! typePropertiesObjects python:miscDataSpecialist.ZApp_getItems(Manager=cmfSpec.getId(), objectID='metaObject', dataType='ZCMFPropsFor' + myType);
! myTypePropertiesMiscData python:typePropertiesObjects and typePropertiesObjects[0].getXMLDict();
! myPropSet myTypePropertiesMiscData/zapp_properties | nothing;
myProperties python:here.safeMiscData.getXMLDict()">
|
|
From: <ssp...@us...> - 2003-10-13 19:36:55
|
Update of /cvsroot/zapp/ZApp
In directory sc8-pr-cvs1:/tmp/cvs-serv19993
Modified Files:
Tag: CMF_relations
ZApp_CMFBase.py
Log Message:
try skinned folder?
Index: ZApp_CMFBase.py
===================================================================
RCS file: /cvsroot/zapp/ZApp/ZApp_CMFBase.py,v
retrieving revision 1.16.2.1
retrieving revision 1.16.2.2
diff -C2 -d -r1.16.2.1 -r1.16.2.2
*** ZApp_CMFBase.py 8 Oct 2003 20:37:47 -0000 1.16.2.1
--- ZApp_CMFBase.py 13 Oct 2003 19:36:51 -0000 1.16.2.2
***************
*** 26,31 ****
#
- from Products.CMFCore.PortalContent import PortalContent
from Products.CMFDefault.DublinCore import DefaultDublinCoreImpl
from AccessControl import ClassSecurityInfo, getSecurityManager
from Products.CMFCore import CMFCorePermissions
--- 26,31 ----
#
from Products.CMFDefault.DublinCore import DefaultDublinCoreImpl
+ from Products.CMFDefault.SkinnedFolder import SkinnedFolder
from AccessControl import ClassSecurityInfo, getSecurityManager
from Products.CMFCore import CMFCorePermissions
***************
*** 40,52 ****
import tempfile
! class ZApp_CMFBase(FreeRangeDS, ZApp_Base, PortalContent, DefaultDublinCoreImpl, ZApp_MiscDataUser, ZApp_RelatedObject):
meta_type = 'ZApp CMF Content Type'
zapp_cmf_type = 1
- __implements__ = ( PortalContent.__implements__
- , DefaultDublinCoreImpl.__implements__
- )
-
_primaryKeyStringSize=255 # allow for a pretty rediculous size...
_primaryKeyGenerator='self.calcPathID()'
--- 40,48 ----
import tempfile
! class ZApp_CMFBase(FreeRangeDS, ZApp_Base, SkinnedFolder, DefaultDublinCoreImpl, ZApp_MiscDataUser, ZApp_RelatedObject):
meta_type = 'ZApp CMF Content Type'
zapp_cmf_type = 1
_primaryKeyStringSize=255 # allow for a pretty rediculous size...
_primaryKeyGenerator='self.calcPathID()'
***************
*** 54,58 ****
! manage_options = PortalContent.manage_options
def getPrimaryKeyValue(self):
--- 50,54 ----
! manage_options = SkinnedFolder.manage_options
def getPrimaryKeyValue(self):
***************
*** 159,163 ****
cmf_portal_type = getattr(self, '_v_cmf_portal_type','')
! PortalContent.manage_afterAdd(self, item, container)
ZApp_Base.manage_afterAdd(self, item, container)
--- 155,159 ----
cmf_portal_type = getattr(self, '_v_cmf_portal_type','')
! SkinnedFolder.manage_afterAdd(self, item, container)
ZApp_Base.manage_afterAdd(self, item, container)
|
|
From: <ssp...@us...> - 2003-10-08 20:37:53
|
Update of /cvsroot/zapp/ZApp
In directory sc8-pr-cvs1:/tmp/cvs-serv22274
Modified Files:
Tag: CMF_relations
ZApp_Application.py ZApp_Base.py ZApp_CMFBase.py ZApp_LOG.py
ZApp_MiscData.py ZApp_RelatableItem.py
ZApp_RelationshipItem.py ZApp_RelationshipManager.py
ZApp_Specialist.py
Log Message:
put new relationship stuff in CMF_Relations branch..
Index: ZApp_Application.py
===================================================================
RCS file: /cvsroot/zapp/ZApp/ZApp_Application.py,v
retrieving revision 1.25
retrieving revision 1.25.2.1
diff -C2 -d -r1.25 -r1.25.2.1
*** ZApp_Application.py 12 Sep 2003 15:27:50 -0000 1.25
--- ZApp_Application.py 8 Oct 2003 20:37:47 -0000 1.25.2.1
***************
*** 87,90 ****
--- 87,91 ----
index_html.plain
quickDisplay_html.plain
+ filterDisplay_html.plain
updateItem.plain
updateItem_html.plain """
Index: ZApp_Base.py
===================================================================
RCS file: /cvsroot/zapp/ZApp/ZApp_Base.py,v
retrieving revision 1.20
retrieving revision 1.20.2.1
diff -C2 -d -r1.20 -r1.20.2.1
*** ZApp_Base.py 25 Jun 2003 15:47:30 -0000 1.20
--- ZApp_Base.py 8 Oct 2003 20:37:47 -0000 1.20.2.1
***************
*** 8,12 ****
import os
! ZAPP_DEBUG=os.environ.get('ZAPP_DEBUG',0)
from OFS import SimpleItem
--- 8,13 ----
import os
! undefined_zdb = []
! ZAPP_DEBUG=os.environ.get('ZAPP_DEBUG',undefined_zdb)
from OFS import SimpleItem
***************
*** 46,49 ****
--- 47,52 ----
DataSkin.__get_attr__ = __new__get_attr__
+ if ZAPP_DEBUG is not undefined_zdb:
+
__orig__notify = Trigger._notify
***************
*** 62,65 ****
--- 65,70 ----
Trigger._notify = __new__notify
+ if ZAPP_DEBUG:
+
__orig__AttributeFor = Compute._AttributeFor
***************
*** 168,172 ****
return primary key of self..
"""
! return self.aq_parent.defaultRack.loadAttrib or 'pk'
def applicationURL(self):
--- 173,180 ----
return primary key of self..
"""
! return self._v_dm_.defaultRack.loadAttrib or 'pk'
!
! def getPrimaryKeyValue(self):
! return self.id
def applicationURL(self):
***************
*** 197,204 ****
def beforeChange(self):
pass
def afterChange(self):
try:
! crr = self.aq_parent.ZApp_clearResultCache
except AttributeError:
crr = None
--- 205,216 ----
def beforeChange(self):
pass
+
+ def getMySpecialist(self):
+ """ get my specialist """
+ return self._v_dm_.aq_inner.aq_parent
def afterChange(self):
try:
! crr = self.getMySpecialist().ZApp_clearResultCache
except AttributeError:
crr = None
***************
*** 214,219 ****
argDict = self.get_argument_dictionary( props, REQUEST, kw)
! ZApp_LOG("changing " + self.aq_parent.id + ":" + self.id + ":" + `argDict`)
!
self.beforeChange()
self.manage_changeProperties(argDict)
--- 226,231 ----
argDict = self.get_argument_dictionary( props, REQUEST, kw)
! ZApp_LOG("changing " + self.getMySpecialist().getId() + ":" + self.id + ":" + `argDict`)
!
self.beforeChange()
self.manage_changeProperties(argDict)
Index: ZApp_CMFBase.py
===================================================================
RCS file: /cvsroot/zapp/ZApp/ZApp_CMFBase.py,v
retrieving revision 1.16
retrieving revision 1.16.2.1
diff -C2 -d -r1.16 -r1.16.2.1
*** ZApp_CMFBase.py 11 Sep 2003 09:47:03 -0000 1.16
--- ZApp_CMFBase.py 8 Oct 2003 20:37:47 -0000 1.16.2.1
***************
*** 8,17 ****
from ZApp_Base import ZApp_Base, extendProperties, LeverPropertyCollection, LeverProperty
lpcol = LeverPropertyCollection
lprop = LeverProperty
props = lpcol(
! [lprop(id='cmf_portal_type'),
! ]
)
--- 8,23 ----
from ZApp_Base import ZApp_Base, extendProperties, LeverPropertyCollection, LeverProperty
+ from ZApp_LOG import ZApp_LOG
+
+ missing = []
+
lpcol = LeverPropertyCollection
lprop = LeverProperty
props = lpcol(
! [
! lprop(id='cmf_portal_type'),
! lprop(id='safeStorageID'),
! ]
)
***************
*** 27,30 ****
--- 33,38 ----
from ZApp_RelatableItem import ZApp_RelatedObject
from Products.FreeRangeDS import FreeRangeDS, _v_dm_
+ from OFS.CopySupport import CopySource
+ from Acquisition import ImplicitAcquisitionWrapper,aq_base
from DateTime import DateTime
***************
*** 36,40 ****
meta_type = 'ZApp CMF Content Type'
zapp_cmf_type = 1
- _primaryKeyStringSize=255 # allow for a pretty rediculous size...
__implements__ = ( PortalContent.__implements__
--- 44,47 ----
***************
*** 42,60 ****
)
! manage_options = PortalContent.manage_options
!
! def getMiscDataManager(self):
! """find the id of the specialist for this class.. """
! dm = self.getDataManagerFor( self, None )
! Manager = dm.aq_parent.id
! return Manager
!
! # Declarative security (replaces __ac_permissions__)
!
_primaryKeyGenerator='self.calcPathID()'
_insertQueryPrefix = 'self.checkDups() and '
def checkDups(self):
! return not self.__dict__[_v_dm_].getItem(self.calcPathID())
def calcPathID(self):
--- 49,74 ----
)
! _primaryKeyStringSize=255 # allow for a pretty rediculous size...
_primaryKeyGenerator='self.calcPathID()'
_insertQueryPrefix = 'self.checkDups() and '
+
+
+ manage_options = PortalContent.manage_options
+
+ def getPrimaryKeyValue(self):
+ return self.calcPathID()
def checkDups(self):
! """
! Check for a pre-existing record.... don't rely on data cached in 'self'
! since we could be in a copy/cut/paste operation.
! """
!
! dupID = self.calcPathID()
! spec = self.getMySpecialist()
! pk = spec.getPrimaryKey()
! dup = spec.ZApp_doSelectItem( REQUEST={ pk: dupID })
! result = not dup
! return result
def calcPathID(self):
***************
*** 65,68 ****
--- 79,83 ----
portalPath = ','.join(self.portal_url.getPortalObject().getPhysicalPath()) + ','
result = objPath[len(portalPath)-1:]
+
return result
***************
*** 78,132 ****
return "OK!"
def _setId(self, id):
! # check for rename operation..
! currID = self.__dict__.get('id',None)
! print "in _setID of CMFBase..."
! if currID is not None:
! self.__dict__['_v_ZApp_OrigID'] = currID
! print "currID was not none... but " + currID
else:
! print "currID was None."
! return ZApp_Base._setId(self, id)
!
! def _notifyOfCopyTo(self, container, op=0):
! """we use _notifyOfCopy to save our miscData to a volitile container property
! so that the copy can retrieve it once created..."""
! #ti = self.getTypeInfo to handle media item copy/paste... notify
! #actions = ti.listActions()
! #for action in actions:
! #if action.getId() ==
! print "in notify copy.. "
! copyID = '_v_' + self.id + 'copyXML'
! setattr(container, copyID, self.safeMiscData.getXMLDict())
def manage_afterAdd(self, item, container):
! """ restore XML from volitile attribute.. """
!
! #print "in manage_afterAdd", self.id
PortalContent.manage_afterAdd(self, item, container)
ZApp_Base.manage_afterAdd(self, item, container)
-
- checkID = self.id
! if checkID[:4] == 'copy':
! pos = checkID.find('_of_')
! if pos>3:
! if pos>4:
! try:
! x = int(checkID[4:pos])
! checkID = checkID[pos + 4:]
! except ValueError:
! pass
! else:
! checkID = checkID[pos + 4:]
!
! copyID = '_v_' + checkID + 'copyXML'
! savedXML = getattr(container, copyID, {})
! if savedXML:
! self.safeMiscData.setXMLAttrs( dict = savedXML )
extendProperties(ZApp_CMFBase, props)
--- 93,221 ----
return "OK!"
+ def _notifyOfCopyTo(self, container, op=0):
+ """we use _notifyOfCopy to save our miscData to a property
+ so that the copy can retrieve it once created..."""
+
+ mdm = self.getMiscDataSpecialist()
+ safeStorage = mdm.ZApp_createNewItem(objectID=self.calcPathID(), dataType='copyPasteStorage', Manager=self.safeMiscData.Manager)
+ if safeStorage:
+ safeStorage.setXMLAttrs( operationType = op )
+ safeStorage.setXMLAttrs( oldID = self.calcPathID())
+ safeStorageID = safeStorage.getId()
+ self.change(safeStorageID = safeStorageID )
+ get_transaction().commit(1)
+
+ ZApp_LOG("_notifyOfCopyTo: Setting safeStorageID to " + safeStorageID)
+
def _setId(self, id):
! #
! # save the 'safeStorageID' so we can use it when we're added again..
! #
! oldID = self.getId()
!
! if oldID:
! safeStorageID = getattr(self, 'safeStorageID','')
! cmf_portal_type = getattr(self, 'cmf_portal_type','')
!
! result = ZApp_Base._setId(self, id)
!
! if oldID:
! self._v_safeStorageID = safeStorageID
! self._v_cmf_portal_type = cmf_portal_type
else:
! self._v_safeStorageID = None
! self._v_cmf_portal_type = None
! ZApp_LOG("_setID: SafeStorageID, cmf_portal_type are now %s" % (`(self._v_safeStorageID,oldID,id,self._v_cmf_portal_type)`))
!
! return result
!
! def _getCopy(self, container):
! ZApp_LOG("_getCopy, before" + `self.__dict__`)
!
! safeStorageID = self.safeStorageID
! self = aq_base(self).__of__(container)
! ob = CopySource._getCopy.im_func(self,container)
! ob.__of__(container) # force DM hookup
! if safeStorageID:
! ob.__dict__['safeStorageID'] = safeStorageID
! ob.__dict__['cmf_portal_type'] = self.portal_type
! ZApp_LOG("_getCopy, after" + `ob.__dict__`)
+ return ob
+
def manage_afterAdd(self, item, container):
! """ restore XML from volitile attribute..
!
! at this point 'self' is somewhat bogus. It still has cached DataSkin attributes from its prior self.
!
! """
!
! ZApp_LOG("_manage_afterAdd" + `self.__dict__`)
!
! safeStorageID = getattr(self, '_v_safeStorageID','')
! cmf_portal_type = getattr(self, '_v_cmf_portal_type','')
!
PortalContent.manage_afterAdd(self, item, container)
ZApp_Base.manage_afterAdd(self, item, container)
! if safeStorageID:
! mdm = self.getMiscDataSpecialist()
! safeStorage = mdm.getItem(safeStorageID)
! if safeStorage:
! get = safeStorage.getXMLAttr
! op = get('operationType','')
! oldID = get('oldID','')
! mySpec = self.getMySpecialist()
!
! if mySpec and oldID:
! oldSelf = mySpec.getItem( oldID )
!
! if oldSelf:
! newSelf = mySpec.ZApp_createNewItem(id=self.calcPathID())
! mySpec.commit_subtransaction()
! newSelf.setMiscData( dataDict = oldSelf.safeMiscData.getXMLDict())
! newSelf.change(safeStorageID = '', cmf_portal_type=cmf_portal_type)
! mySpec.commit_subtransaction()
!
! newSelf.copyObjectRelations( oldSelf.objectRelations( returnObjects=1 ))
!
! if op:
! #
! # it's a move operation...
! #
! oldSelf.manage_delete()
! else:
! oldSelf.change(safeStorageID = '')
!
! safeStorage.manage_delete()
!
! if self.safeStorageID:
! self.change(safeStorageID = '')
!
! if hasattr(self, '_v_safeStorageID'):
! del self._v_safeStorageID # we've got it now.. thanks. ;-)
!
!
! def copyObjectRelations(self, theObjectRelations):
! """
! copy object relations that belong to the object I was cloned from...
! """
! #print "copyObjectRelations", theObjectRelations
!
! for relationDict in theObjectRelations:
! get = relationDict.get
! otherObject = get('otherObject','')
! otherRole = get('otherRole','')
! contextID = get('otherContextID','')
! selfContextID = get('selfContextID','')
!
! selfRole = get('selfRole','')
! if otherObject:
! selfRItem = self.addObject( otherObject, otherRole, selfRole, contextID)
! selfRItem.change(contextID=selfContextID)
extendProperties(ZApp_CMFBase, props)
***************
*** 139,143 ****
existingObject = None
!
if id.find(',') != -1:
raise RuntimeError, "Sorry.. no ',' allowed in id!"
--- 228,232 ----
existingObject = None
!
if id.find(',') != -1:
raise RuntimeError, "Sorry.. no ',' allowed in id!"
***************
*** 145,153 ****
if useExisting:
dm = self.getDataManagerFor( klass, None )
if dm != None:
objPath = ','.join(self.getPhysicalPath()) + ',' + id
portalPath = ','.join(self.portal_url.getPortalObject().getPhysicalPath()) + ','
checkID = objPath[len(portalPath):]
! existingObject = dm.getItem( checkID )
if existingObject:
--- 234,243 ----
if useExisting:
dm = self.getDataManagerFor( klass, None )
+
if dm != None:
objPath = ','.join(self.getPhysicalPath()) + ',' + id
portalPath = ','.join(self.portal_url.getPortalObject().getPhysicalPath()) + ','
checkID = objPath[len(portalPath):]
! existingObject = dm.getItem(checkID)
if existingObject:
Index: ZApp_LOG.py
===================================================================
RCS file: /cvsroot/zapp/ZApp/ZApp_LOG.py,v
retrieving revision 1.3
retrieving revision 1.3.4.1
diff -C2 -d -r1.3 -r1.3.4.1
*** ZApp_LOG.py 30 Mar 2003 16:25:02 -0000 1.3
--- ZApp_LOG.py 8 Oct 2003 20:37:47 -0000 1.3.4.1
***************
*** 3,7 ****
from zLOG import register_subsystem, LOG, INFO
! ZAPP_DEBUG=os.environ.get('ZAPP_DEBUG',0)
ZAPP_DEBUG_BREAK=os.environ.get('ZAPP_DEBUG_BREAK',0)
--- 3,7 ----
from zLOG import register_subsystem, LOG, INFO
! ZAPP_DEBUG=os.environ.get('ZAPP_DEBUG',None) is not None
ZAPP_DEBUG_BREAK=os.environ.get('ZAPP_DEBUG_BREAK',0)
Index: ZApp_MiscData.py
===================================================================
RCS file: /cvsroot/zapp/ZApp/ZApp_MiscData.py,v
retrieving revision 1.20
retrieving revision 1.20.2.1
diff -C2 -d -r1.20 -r1.20.2.1
*** ZApp_MiscData.py 23 Sep 2003 18:51:44 -0000 1.20
--- ZApp_MiscData.py 8 Oct 2003 20:37:47 -0000 1.20.2.1
***************
*** 24,28 ****
props = lpcol(
[lprop(id='Manager'),
! lprop(id='objectID', dbSize=1023),
lprop(id='dataType', dbSize=100),
lprop(id='xml', prop_type='text', dbType='text'),
--- 24,28 ----
props = lpcol(
[lprop(id='Manager'),
! lprop(id='objectID', dbSize=255),
lprop(id='dataType', dbSize=100),
lprop(id='xml', prop_type='text', dbType='text'),
***************
*** 171,175 ****
Manager = self.miscDataManagerKey
else:
! Manager = self.aq_inner.aq_parent.id
return Manager
--- 171,175 ----
Manager = self.miscDataManagerKey
else:
! Manager = self.getMySpecialist().getId()
return Manager
***************
*** 191,195 ****
"""
! Manager = Manager or self.miscDataManager
localmdmKey = Manager + ":" + dataType
mdm = self._v_MyMDMCache.get(localmdmKey, missing)
--- 191,195 ----
"""
! Manager = (Manager or '') or self.miscDataManager
localmdmKey = Manager + ":" + dataType
mdm = self._v_MyMDMCache.get(localmdmKey, missing)
***************
*** 239,243 ****
result = []
! myDM = self.__dict__[_v_dm_]
for provider in getattr(myDM,myDM.DataPlugins.attr):
if provider.meta_type == 'DataSkin Class Extender':
--- 239,243 ----
result = []
! myDM = self._v_dm_
for provider in getattr(myDM,myDM.DataPlugins.attr):
if provider.meta_type == 'DataSkin Class Extender':
***************
*** 496,500 ****
"""
result = ZApp_MiscDataAttributeProvider.inheritedAttribute('manage_editProperties')(self, REQUEST)
! myDM = self.aq_parent
propManAttr = 'PropSheetFor_' + self.propsheetname
for provider in getattr(myDM,myDM.DataPlugins.attr):
--- 496,500 ----
"""
result = ZApp_MiscDataAttributeProvider.inheritedAttribute('manage_editProperties')(self, REQUEST)
! myDM = self._v_dm_
propManAttr = 'PropSheetFor_' + self.propsheetname
for provider in getattr(myDM,myDM.DataPlugins.attr):
Index: ZApp_RelatableItem.py
===================================================================
RCS file: /cvsroot/zapp/ZApp/ZApp_RelatableItem.py,v
retrieving revision 1.20
retrieving revision 1.20.2.1
diff -C2 -d -r1.20 -r1.20.2.1
*** ZApp_RelatableItem.py 12 Sep 2003 15:27:50 -0000 1.20
--- ZApp_RelatableItem.py 8 Oct 2003 20:37:48 -0000 1.20.2.1
***************
*** 5,12 ****
--- 5,14 ----
import ZApp_Base
import string
+
lpcol = ZApp_Base.LeverPropertyCollection
lprop = ZApp_Base.LeverProperty
from Products.PageTemplates.PageTemplateFile import PageTemplateFile
+ from ZApp_LOG import ZApp_LOG
class ZApp_RelatableParentMixin:
***************
*** 23,27 ****
if not parentManager:
! parentManager = self.aq_parent.id
conditions={ referenceAttribute:self.id, 'parentManager':parentManager }
--- 25,29 ----
if not parentManager:
! parentManager = self.getMySpecialist().getId()
conditions={ referenceAttribute:self.id, 'parentManager':parentManager }
***************
*** 78,82 ****
if not parentManager:
! parentManager = self.aq_parent.id
conditions={ 'parentID':self.id, 'parentManager':parentManager, 'countMinMax':'contextID::text::int' } # this is PG specific!
--- 80,84 ----
if not parentManager:
! parentManager = self.getMySpecialist().getId()
conditions={ 'parentID':self.id, 'parentManager':parentManager, 'countMinMax':'contextID::text::int' } # this is PG specific!
***************
*** 117,128 ****
contextID = self.nextContextID()
! return {'parentID':self.id, 'parentManager':self.aq_parent.id, 'contextID':contextID}
def getObjectManager(self, objectManagerID=None):
if objectManagerID:
! om = getattr(self.aq_parent, objectManagerID)
else:
! om = (self.childManagers and getattr(self.aq_parent, self.childManagers[0])) or self.aq_parent
return om
--- 119,131 ----
contextID = self.nextContextID()
! return {'parentID':self.id, 'parentManager':self.getMySpecialist().getId(), 'contextID':contextID}
def getObjectManager(self, objectManagerID=None):
if objectManagerID:
! om = getattr(self.getMySpecialist(), objectManagerID)
else:
! mySpec = self.getMySpecialist()
! om = (self.childManagers and getattr(mySpec, self.childManagers[0])) or mySpec
return om
***************
*** 205,210 ****
"""
! refAttr = referenceAttribute or self.parentManager or self.aq_parent.aq_parent.id
! return getattr(self.aq_parent, refAttr, None)
def getParent(self, referenceAttribute='parentID'):
--- 208,214 ----
"""
! mySpec = self.getMySpecialist()
! refAttr = referenceAttribute or self.parentManager or mySpec.aq_parent.getId()
! return getattr(mySpec, refAttr, None)
def getParent(self, referenceAttribute='parentID'):
***************
*** 257,261 ****
--- 261,268 ----
displayCustomUpdate_pt = PageTemplateFile('zpt/Generic_displayRelatedObjects', globals())
+ addRelationship_pt = PageTemplateFile('zpt/addRelationship_ChooseObjectManager_ui', globals())
findNewRelationship_pt = PageTemplateFile('zpt/findNewRelationship_ui', globals())
+
+ class_default_for_related_object_types = () # by default you can't related to anything
_custom_skin_scripts=(
***************
*** 265,268 ****
--- 272,281 ----
)
+ def findSpecialistsForRelationship(self):
+ """
+ in base class we just return our relatable_object_types property.
+ """
+ return self.related_object_types
+
def getRelationshipManager(self):
return self.findApplication().getRelationshipManager()
***************
*** 272,276 ****
get my object manager ID
"""
! return self.aq_parent.getId()
def relationDeleted(self, relationshipItem):
--- 285,289 ----
get my object manager ID
"""
! return self.getMySpecialist().getId()
def relationDeleted(self, relationshipItem):
***************
*** 318,326 ****
if REQUEST is not None:
responseURL = REQUEST.get('responseURL',None)
-
if responseURL:
REQUEST.RESPONSE.redirect(responseURL)
else:
! self.displayUpdateForm_html(self, REQUEST)
def createAndAddObject(self, objectProperties=None, objectManager=None, objectRole=None, selfRole=None, createIfNone=0, contextID='', **kw):
--- 331,342 ----
if REQUEST is not None:
responseURL = REQUEST.get('responseURL',None)
if responseURL:
REQUEST.RESPONSE.redirect(responseURL)
else:
! REQUEST.RESPONSE.redirect(self.REQUEST.URL1 + '/displayUpdateForm_html')
!
! # don't change this return value! We need it for testing....
!
! return "OK!"
def createAndAddObject(self, objectProperties=None, objectManager=None, objectRole=None, selfRole=None, createIfNone=0, contextID='', **kw):
***************
*** 354,361 ****
If objectRole is not None, assign objectRole to the otherObject in this relationship.
If selfRole is not None, assign selfRole to self in this relationship.
"""
rm = self.getRelationshipManager()
! rm.relateObjects( object1=self, object1Role=selfRole, object2=otherObject, object2Role=objectRole, createIfNone=createIfNone, contextID=contextID)
def removeObjectRelations(self, ids=None):
--- 370,379 ----
If objectRole is not None, assign objectRole to the otherObject in this relationship.
If selfRole is not None, assign selfRole to self in this relationship.
+ returns the relatioshipItem for self...
"""
rm = self.getRelationshipManager()
! selfRItem = rm.relateObjects( object1=self, object1Role=selfRole, object2=otherObject, object2Role=objectRole, createIfNone=createIfNone, contextID=contextID)
! return selfRItem
def removeObjectRelations(self, ids=None):
***************
*** 371,374 ****
--- 389,393 ----
if ids:
+ ZApp_LOG("Removing object relations from object:" + `self.getId()` + ":" + `ids`)
self.getRelationshipManager().removeObjectRelations( ids )
***************
*** 406,415 ****
returns a list of dictionaries like so:
[
! {'relationshipID':rid,
! 'otherObjectID':objId,
! 'otherManagerID':manID,
! 'otherRole':otherRole,
! 'selfRole':selfRole,
! },
{....
},
--- 425,439 ----
returns a list of dictionaries like so:
[
! {
! 'relationshipID': the relationshipID,
! 'otherRIID': other object's relationshipItemID,
! 'otherObjectID': other object's ID,
! 'otherManagerID': other object's Manager,
! 'otherRole': other object's role..
! 'otherContextID': other object's contextID,
! 'selfRole': my roleName,
! 'selfRIID': my relationshipItemID,
! 'selfContextID': my contextID,
! },
{....
},
***************
*** 419,423 ****
if returnObjects is true, each dictionary also has 'otherObject':otherObject as a member.
"""
!
if objectTypes:
if type(objectTypes) == type(''):
--- 443,447 ----
if returnObjects is true, each dictionary also has 'otherObject':otherObject as a member.
"""
!
if objectTypes:
if type(objectTypes) == type(''):
Index: ZApp_RelationshipItem.py
===================================================================
RCS file: /cvsroot/zapp/ZApp/ZApp_RelationshipItem.py,v
retrieving revision 1.5
retrieving revision 1.5.2.1
diff -C2 -d -r1.5 -r1.5.2.1
*** ZApp_RelationshipItem.py 2 Jun 2003 14:46:08 -0000 1.5
--- ZApp_RelationshipItem.py 8 Oct 2003 20:37:48 -0000 1.5.2.1
***************
*** 13,18 ****
props = lpcol([
lprop(id='relationshipID'),
! lprop(id='objectID'),
! lprop(id='objectManager'),
lprop(id='roleID'),
lprop(id='contextID'),
--- 13,18 ----
props = lpcol([
lprop(id='relationshipID'),
! lprop(id='objectID',dbSize=255),
! lprop(id='objectManager',dbSize=50),
lprop(id='roleID'),
lprop(id='contextID'),
***************
*** 23,26 ****
--- 23,28 ----
meta_type = 'ZApp RelationshipItem'
+
+ _indexed_attrs = ('objectID',)
def getObject(self):
Index: ZApp_RelationshipManager.py
===================================================================
RCS file: /cvsroot/zapp/ZApp/ZApp_RelationshipManager.py,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -C2 -d -r1.4 -r1.4.2.1
*** ZApp_RelationshipManager.py 3 Jul 2003 18:23:10 -0000 1.4
--- ZApp_RelationshipManager.py 8 Oct 2003 20:37:48 -0000 1.4.2.1
***************
*** 30,44 ****
return getattr(self, rItemsID)
- def getRelationshipItems(self, excludeIDs = None):
- """
- get all the relItems in this relationship.
- """
-
- rItemMan = self.getRelationshipItemManager()
- results = rItemMan.ZApp_getItems(relationshipID = self.id)
- if excludeIDs:
- results = filter(lambda x,eids=excludeIDs: x.id not in eids, results)
- return results
-
def relateObjects(self, object1, object2, object1Role=None, object2Role=None, createIfNone=0, contextID=''):
"""
--- 30,33 ----
***************
*** 65,70 ****
! rItem1 = relItems.ZApp_createNewItem(relationshipID=newR.id, objectID=object1.id, objectManager=object1.Manager, roleID=role1ID)
! rItem2 = relItems.ZApp_createNewItem(relationshipID=newR.id, objectID=object2.id, objectManager=object2.Manager, roleID=role2ID, contextID=contextID)
def removeObjects(self, object1, object2=None, object1Role=None, object2Role=None, object2Type=None, object2Manager=None):
--- 54,60 ----
! rItem1 = relItems.ZApp_createNewItem(relationshipID=newR.id, objectID=object1.getPrimaryKeyValue(), objectManager=object1.Manager, roleID=role1ID)
! rItem2 = relItems.ZApp_createNewItem(relationshipID=newR.id, objectID=object2.getPrimaryKeyValue(), objectManager=object2.Manager, roleID=role2ID, contextID=contextID)
! return rItem1
def removeObjects(self, object1, object2=None, object1Role=None, object2Role=None, object2Type=None, object2Manager=None):
***************
*** 98,102 ****
role2ID = role2IDs and role2IDs[0]
! rItems = rItemsMan.ZApp_getItems(objectID=object1.id, objectManager=object1.Manager, roleID=role1ID)
self.removeObjectRelations( rItems = rItems, role1ID = role1ID, role2ID = role2ID, o2Type = o2Type, o2Manager = o2Manager)
--- 88,92 ----
role2ID = role2IDs and role2IDs[0]
! rItems = rItemsMan.ZApp_getItems(objectID=object1.getPrimaryKeyValue(), objectManager=object1.Manager, roleID=role1ID)
self.removeObjectRelations( rItems = rItems, role1ID = role1ID, role2ID = role2ID, o2Type = o2Type, o2Manager = o2Manager)
***************
*** 166,170 ****
rItemsMan = self.getRelationshipItemManager()
! myRelationshipItems = rItemsMan.ZApp_getItems( objectID=anObject.id, objectManager=anObject.Manager)
riMan = self.getRoleManager()
--- 156,160 ----
rItemsMan = self.getRelationshipItemManager()
! myRelationshipItems = rItemsMan.ZApp_getItems( objectID=anObject.getPrimaryKeyValue(), objectManager=anObject.Manager)
riMan = self.getRoleManager()
***************
*** 234,238 ****
"""
! myRelationshipItems = self.getRelationshipItemManager().ZApp_getItems( objectID=anObject.id, objectManager=anObject.Manager)
riMan = self.getRoleManager()
--- 224,228 ----
"""
! myRelationshipItems = self.getRelationshipItemManager().ZApp_getItems( objectID=anObject.getPrimaryKeyValue(), objectManager=anObject.Manager)
riMan = self.getRoleManager()
***************
*** 254,258 ****
continue
! if (not ((rItem.objectManager == anObject.Manager) and (rItem.objectID == anObject.id))):
if objectTypes and (theObject.objectType not in objectTypes):
continue
--- 244,248 ----
continue
! if (not ((rItem.objectManager == anObject.Manager) and (rItem.objectID == anObject.getPrimaryKeyValue()))):
if objectTypes and (theObject.objectType not in objectTypes):
continue
Index: ZApp_Specialist.py
===================================================================
RCS file: /cvsroot/zapp/ZApp/ZApp_Specialist.py,v
retrieving revision 1.29
retrieving revision 1.29.2.1
diff -C2 -d -r1.29 -r1.29.2.1
*** ZApp_Specialist.py 3 Jul 2003 18:05:07 -0000 1.29
--- ZApp_Specialist.py 8 Oct 2003 20:37:48 -0000 1.29.2.1
***************
*** 5,10 ****
import types
import os
- ZAPP_DEBUG=os.environ.get('ZAPP_DEBUG',0)
- ZAPP_DEBUG_BREAK=os.environ.get('ZAPP_DEBUG_BREAK',0)
from ZApp_LOG import ZApp_LOG
--- 5,8 ----
***************
*** 73,80 ****
class UniqueIDGenerator( Synchronized ):
! def __init__(self, debug=0):
self.lastTime = time.time()
- self.debug = debug
-
minDelta = 0.1
--- 71,76 ----
class UniqueIDGenerator( Synchronized ):
! def __init__(self):
self.lastTime = time.time()
minDelta = 0.1
***************
*** 104,108 ****
meta_type = 'Z App Specialist'
- debug = ZAPP_DEBUG
LeversSetsGroup = PlugInGroup('LeversSetsGroup', ['ZApp Lever Method Sets'], attr='leverList', title='Lever Sets')
--- 100,103 ----
***************
*** 176,189 ****
return 1
- def ZApp_setupDebug(self):
- """
- Just a method we can tickle...
- """
- if ZAPP_DEBUG_BREAK:
- ZApp_LOG("checking for ZAPP_DEBUG_BREAK %s -?- %s" % (ZAPP_DEBUG_BREAK, __name__))
- if ZAPP_DEBUG_BREAK == __name__:
- import pdb
- pdb.set_trace()
-
def ZApp_cleanDate(self, theDate):
""" Clean up a date """
--- 171,174 ----
***************
*** 545,549 ****
def ZApp_clearResultCache( self, itemID ):
! ZApp_LOG( "clearing result cache for itemID %s" % itemID )
self._rmCache( itemID )
--- 530,534 ----
def ZApp_clearResultCache( self, itemID ):
! ZApp_LOG( "clearing result cache for itemID %s in %s" % (itemID, self.getId()))
self._rmCache( itemID )
***************
*** 623,627 ****
return theIDs
! def ZApp_getItems(self, conditions=None, createIfNone=0, debug=0, displayQuery=0, **kw):
""" get my items that match conditions """
--- 608,612 ----
return theIDs
! def ZApp_getItems(self, conditions=None, createIfNone=0, displayQuery=0, **kw):
""" get my items that match conditions """
|
|
From: <ssp...@us...> - 2003-10-08 20:37:52
|
Update of /cvsroot/zapp/ZApp/zpt
In directory sc8-pr-cvs1:/tmp/cvs-serv22274/zpt
Modified Files:
Tag: CMF_relations
Generic_displayRelatedObjects.zpt
Log Message:
put new relationship stuff in CMF_Relations branch..
Index: Generic_displayRelatedObjects.zpt
===================================================================
RCS file: /cvsroot/zapp/ZApp/zpt/Generic_displayRelatedObjects.zpt,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -C2 -d -r1.4 -r1.4.2.1
*** Generic_displayRelatedObjects.zpt 7 Aug 2003 17:51:55 -0000 1.4
--- Generic_displayRelatedObjects.zpt 8 Oct 2003 20:37:48 -0000 1.4.2.1
***************
*** 1,5 ****
<div tal:define="app python:here.findApplication(); appURL app/absolute_url;
! objRelations python:here.objectRelations( returnObjects=1 )">
<form action="" tal:attributes="action request/URL1" method="post">
<table >
<tr tal:condition="objRelations"><td> </td><td>Manager</td><td>ObjectID</td><td>Info</td><td>Context ID</td></tr>
--- 1,7 ----
<div tal:define="app python:here.findApplication(); appURL app/absolute_url;
! objRelations python:here.objectRelations( returnObjects=1 );
! managerIDs here/findSpecialistsForRelationship">
<form action="" tal:attributes="action request/URL1" method="post">
+ <span tal:content="managerIDs"/><br>
<table >
<tr tal:condition="objRelations"><td> </td><td>Manager</td><td>ObjectID</td><td>Info</td><td>Context ID</td></tr>
***************
*** 18,22 ****
<input tal:condition="objRelations" type="submit" value="Edit Selected Relations" name="editRelations_ui:method">
</td></tr>
! <tr><td colspan="3"><input type="submit" value="Relate Other Object" name="findNewRelationship_pt:method">
</td></tr>
</table>
--- 20,24 ----
<input tal:condition="objRelations" type="submit" value="Edit Selected Relations" name="editRelations_ui:method">
</td></tr>
! <tr tal:condition="managerIDs"><td colspan="3"><input type="submit" value="Relate Other Object" name="addRelationship_pt:method">
</td></tr>
</table>
|
|
From: <ssp...@us...> - 2003-10-08 20:37:52
|
Update of /cvsroot/zapp/ZApp/tests
In directory sc8-pr-cvs1:/tmp/cvs-serv22274/tests
Modified Files:
Tag: CMF_relations
test_PGRelations.py
Log Message:
put new relationship stuff in CMF_Relations branch..
Index: test_PGRelations.py
===================================================================
RCS file: /cvsroot/zapp/ZApp/tests/test_PGRelations.py,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -C2 -d -r1.4 -r1.4.2.1
*** test_PGRelations.py 2 Jun 2003 16:41:38 -0000 1.4
--- test_PGRelations.py 8 Oct 2003 20:37:48 -0000 1.4.2.1
***************
*** 17,21 ****
if __name__=='__main__':
-
main(defaultTest='test_suite')
--- 17,20 ----
|
|
From: <ssp...@us...> - 2003-10-08 20:36:31
|
Update of /cvsroot/zapp/ZApp/zpt
In directory sc8-pr-cvs1:/tmp/cvs-serv21927/zpt
Added Files:
addRelationship_ChooseObjectManager_ui.zpt
Log Message:
add new relation ui
--- NEW FILE: addRelationship_ChooseObjectManager_ui.zpt ---
<h2 tal:content="string:${here/Manager} - ${here/id}" />
<form action="findNewRelationship_pt"
tal:attributes="action string:${request/URL1}/findNewRelationship_pt" method="post"
tal:define="managerIDs here/findSpecialistsForRelationship">
<table tal:condition="managerIDs">
<tr><td>Manager</td><td><select name="objectManager"><option value=""></option>
<span tal:repeat="managerID python:here.findSpecialistsForRelationship()" tal:omit-tag="">
<option tal:attributes="value managerID" tal:content="managerID"/>
</span></select></td></tr>
<tr><td colspan="3"><input type="submit" value="Select Related Object Type"></td></tr>
</table>
<table tal:condition="not:managerIDs">
<tr><td>Sorry.. this object can't relate to any other object type. You need to set up a 'related_object_types' attribute.</td></tr>
<tr><td><input type="submit" value="Back to object display." name="displayUpdateForm_html:method"></td></tr>
</table>
</form>
|
|
From: <ssp...@us...> - 2003-10-08 20:34:05
|
Update of /cvsroot/zapp/ZApp/zpt
In directory sc8-pr-cvs1:/tmp/cvs-serv21411/zpt
Modified Files:
findNewRelationship_ui.zpt
Log Message:
adde new ui methods
Index: findNewRelationship_ui.zpt
===================================================================
RCS file: /cvsroot/zapp/ZApp/zpt/findNewRelationship_ui.zpt,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** findNewRelationship_ui.zpt 1 Jul 2003 22:22:03 -0000 1.1
--- findNewRelationship_ui.zpt 8 Oct 2003 20:33:53 -0000 1.2
***************
*** 1,13 ****
<h2 tal:content="string:${here/Manager} - ${here/id}" />
! <form action="" tal:attributes="action request/URL1" method="post">
<table>
! <tr><td>Object ID:</td><td> <input name="objectProperties.objectID:record"></td></tr>
! <tr><td>Manager</td><td><select name="objectManager"><option value=""></option>
! <span tal:repeat="managerID python:here.findSpecialistIDs()" tal:omit-tag="">
! <option tal:attributes="value managerID" tal:content="managerID"/>
! </span></select></td></tr>
! <tr><td>Role</td><td> <input name="objectRole"></td></tr>
! <input type="hidden" name="createIfNone:int" value="1">
! <tr><td colspan="3"><input type="submit" value="Create Relationship" name="createAndAddObject_ui:method"></td></tr>
</table>
! </form>
--- 1,20 ----
<h2 tal:content="string:${here/Manager} - ${here/id}" />
! <div
! tal:define="objectManager request/objectManager | other/objectManager | string:'';
! objectSpec python:here.getSpecialist(objectManager);
! dummy python:request.set('filterProperties',{'objectManager':objectManager, });
! dummy python:request.set('actionProperties',{'objectManager':objectManager, });
! dummy python:request.set('itemIdName','objectProperties.objectID:record');
! dummy python:request.set('itemControlType','radio');
! dummy python:request.set('formParams',{'action':'createAndAddObject_ui', 'submit':'Create Relationship',
! 'hiddenFormItems':[{'name':'objectManager', 'value':objectManager},
! {'name':'createIfNone:int', 'value':'1'}],
! 'formItems':[{'name':'objectRole', 'value':'', 'label':'Object Role'},]});">
!
<table>
! <tr><td>Manager</td><td tal:content="objectManager"/></tr>
</table>
! <div aligh="center">
! <span tal:content="structure python:objectSpec.filterDisplay_html(objectSpec, request)"/><br>
! </div>
! </div>
|
|
From: <ssp...@us...> - 2003-10-08 20:34:05
|
Update of /cvsroot/zapp/ZApp/www_ui
In directory sc8-pr-cvs1:/tmp/cvs-serv21411/www_ui
Added Files:
filterDisplay_html.plain
Log Message:
adde new ui methods
--- NEW FILE: filterDisplay_html.plain ---
Id: filterDisplay_html
Meta-Type: DTML Method
Permissions:
Proxy-Roles:
Title:
<dtml-call "REQUEST.set('size',REQUEST.get('size',20))">
<dtml-let propertyNameList="ZApp_getAttributeList()">
<dtml-call "REQUEST.set('start',REQUEST.get('start',0))">
<dtml-call "REQUEST.set('itemIdName',REQUEST.get('itemIdName','ids:list'))">
<dtml-call "REQUEST.set('itemControlType',REQUEST.get('itemControlType','checkbox'))">
<dtml-call "REQUEST.set('actionProperties', REQUEST.get('actionProperties',{}))">
<dtml-call "REQUEST.get('actionProperties').update({'size:int':size})">
<dtml-call "REQUEST.set('formParams', REQUEST.get('formParams',{}))">
<dtml-call "REQUEST.set('batchSize',size)">
<dtml-call "REQUEST.set('currStart',start)">
<dtml-call "REQUEST.set('nextStart',currStart + batchSize)">
<dtml-call "REQUEST.set('prevStart',currStart - batchSize)">
<form action="&dtml-URL0;"><br><br>
<dtml-in propertyNameList>
<dtml-let tList=sequence-item
currID="tList[0]"
currType="tList[1]"
defVal="tList[2]">
<dtml-if sequence-start>
<dtml-let primaryKey=currID>
<table>
<dtml-call "REQUEST.set('sort_on',REQUEST.get('sort_on',primaryKey))">
<dtml-call "REQUEST.get('actionProperties').update({'sort_on':sort_on})">
</dtml-let>
</dtml-if>
<tr><td> &dtml-currID;:</td>
<td><input name="&dtml-currID;" value="<dtml-var "REQUEST.get(currID,'')" html_quote>"></td>
</tr>
<dtml-call "REQUEST.get('actionProperties').update({currID:REQUEST.get(currID,'')})">
<dtml-if sequence-end>
<tr><td> Size:</td>
<td><input name="size:int" value="&dtml.missing-size;"></td>
</tr>
<tr><td> SortOn:</td>
<td><input name="sort_on" value="&dtml.missing-sort_on;"></td>
</tr>
<dtml-in "filterProperties.keys()">
<input type="hidden" name="&dtml-sequence-item;" value="<dtml-var "filterProperties.get(_['sequence-item'],'')">">
</dtml-in>
<tr><td colspan="2" align="center"><input type="submit" value="filter"></td></tr>
</table>
</dtml-if>
</dtml-let>
</dtml-in>
<br>
</form>
<dtml-call "REQUEST.set('queryDisplayText',ZApp_getItemIds(displayQuery=1))">
<dtml-let searchResults="ZApp_getItemIds()"
foo="REQUEST.set('countMinMax',getPrimaryKey())"
foo="REQUEST.set('start',0)"
foo="REQUEST.set('size',20)"
stats="ZApp_querySearchDirect()"
names="stats.names()"
formAction="formParams.get('action','deleteSelectedItems_html')"
formSubmitValue="formParams.get('submit','Delete Selected Item(s)')"
hiddenFormItems="formParams.get('hiddenFormItems',[])"
formItems="formParams.get('formItems',[])">
<form action="&dtml-formAction;">
<div align="left">
<dtml-in stats>
<dtml-if sequence-start>
<dtml-call "REQUEST.set('countval',countval)">
<dtml-call "REQUEST.set('numBatches',((countval-1)/batchSize) + 1)">
<dtml-call "REQUEST.set('currBatch',(nextStart)/batchSize)">
Page <dtml-var currBatch> out of <dtml-var numBatches> (Total Number of results = <dtml-var countval>)
</dtml-if>
</dtml-in>
</div>
<div align="left">
<dtml-if "currStart != 0">
<a href="&dtml-URL0;?<dtml-var "buildQueryString(actionProperties)">&start:int=<dtml-var prevStart>">Prev Items</a>
</dtml-if>
<dtml-if "nextStart < countval">
<a href="&dtml-URL0;?<dtml-var "buildQueryString(actionProperties)">&start:int=&dtml-nextStart;">Next Items</a>
</dtml-if>
<br>
</div>
<dtml-in searchResults>
<dtml-let itemID=sequence-item
currItem="getItem(itemID)">
<dtml-if sequence-start>
<table>
<dtml-in propertyNameList>
<dtml-let tList=sequence-item
currID="tList[0]"
currType="tList[1]">
<dtml-if sequence-start>
<tr><td> </td>
</dtml-if>
<td align="center">&dtml-currID;</td>
<dtml-if sequence-end>
</tr>
</dtml-if>
</dtml-let>
</dtml-in>
</dtml-if>
<tr>
<dtml-in propertyNameList>
<dtml-let tList=sequence-item
currID="tList[0]">
<dtml-if sequence-start>
<td><input type="&dtml-itemControlType;" name="<dtml-var itemIdName>" value="<dtml-var itemID>"></td>
<td align="center"><a href="<dtml-var "itemID.replace('/',',')" url_quote>/displayUpdateForm_html"><dtml-var itemID html_quote></a></td>
<dtml-else>
<td align="center"><dtml-var "'\n'.join(`_.getattr(currItem,currID,'')`.split(r'\n'))" html_quote></td>
</dtml-if>
</dtml-let>
</dtml-in>
</dtml-let>
</tr>
<dtml-if sequence-end>
<dtml-in hiddenFormItems mapping>
<input type="hidden" name="<dtml-var name>" value="<dtml-var value>">
</dtml-in>
<dtml-in formItems mapping>
<tr><th> &dtml-label; </th> <td align="left" colspan="<dtml-var "_.len(propertyNameList)">">
<input type="input" name="&dtml-name;" value="&dtml-value;">
</tr>
</dtml-in>
<tr><td align="center" colspan="<dtml-var "_.len(propertyNameList)+1">">
<input type="submit" value="&dtml-formSubmitValue;"></td></tr>
</tr>
</table>
</dtml-if>
<dtml-else>
Sorry there are no Items In this Area.
</dtml-in>
<div align="left">
<dtml-if "currStart != 0">
<a href="&dtml-URL0;?<dtml-var "buildQueryString(actionProperties)">&start:int=<dtml-var prevStart>">Prev Items</a>
</dtml-if>
<dtml-if "nextStart < countval">
<a href="&dtml-URL0;?<dtml-var "buildQueryString(actionProperties)">&start:int=&dtml-nextStart;">Next Items</a>
</dtml-if>
<br>
</div>
</dtml-let>
</dtml-let>
<dtml-var queryDisplayText html_quote><br>
|
|
From: <ssp...@us...> - 2003-09-23 18:52:00
|
Update of /cvsroot/zapp/ZApp
In directory sc8-pr-cvs1:/tmp/cvs-serv13473
Modified Files:
ZApp_MiscData.py
Log Message:
fixed indexing for MiscData objects..
Index: ZApp_MiscData.py
===================================================================
RCS file: /cvsroot/zapp/ZApp/ZApp_MiscData.py,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** ZApp_MiscData.py 11 Sep 2003 09:47:03 -0000 1.19
--- ZApp_MiscData.py 23 Sep 2003 18:51:44 -0000 1.20
***************
*** 37,40 ****
--- 37,42 ----
__per_transaction_cache_attrs__ = ('_v_xmlDict',)
+
+ _indexed_attrs = ('objectID',)
def _v_xmlDict(self):
|
|
From: <ssp...@us...> - 2003-09-12 15:28:04
|
Update of /cvsroot/zapp/ZApp
In directory sc8-pr-cvs1:/tmp/cvs-serv11478
Modified Files:
ZApp_Application.py ZApp_RelatableItem.py
Log Message:
added ZApp_Var traversal hook...
Index: ZApp_Application.py
===================================================================
RCS file: /cvsroot/zapp/ZApp/ZApp_Application.py,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** ZApp_Application.py 20 Aug 2003 11:19:26 -0000 1.24
--- ZApp_Application.py 12 Sep 2003 15:27:50 -0000 1.25
***************
*** 25,28 ****
--- 25,30 ----
import Products.ZSQLMethods
+ _marker = []
+
Folder = OFS.Folder.Folder
DTMLMethod = OFS.DTMLMethod
***************
*** 170,173 ****
--- 172,193 ----
manage_leverResults = DTMLFile('manage_ui/leverResults',globals(),management_view='Lever Actions')
+
+
+ def __bobo_traverse__(self, REQUEST, name):
+
+ ob = getattr(self, name, _marker)
+ if ob is _marker:
+ if name[:8] == 'ZApp_Var':
+ vList = name[8:].split('-')
+ vVal = 1
+ if len(vList) > 1:
+ vVal = vList[1]
+ vName = vList[0]
+ REQUEST.set(vName, vVal)
+ ob = self
+ else:
+ raise 'NotFound'
+ return ob
+
def leverNames(self, leverSet=None):
Index: ZApp_RelatableItem.py
===================================================================
RCS file: /cvsroot/zapp/ZApp/ZApp_RelatableItem.py,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** ZApp_RelatableItem.py 18 Aug 2003 13:38:09 -0000 1.19
--- ZApp_RelatableItem.py 12 Sep 2003 15:27:50 -0000 1.20
***************
*** 273,276 ****
--- 273,291 ----
"""
return self.aq_parent.getId()
+
+ def relationDeleted(self, relationshipItem):
+ """
+ a relationshipItem has been terminated.
+ """
+ found = 0
+
+ if self.delete_if_orphaned:
+ for currRelation in self.objectRelations():
+ if relationshipItem.getId() != currRelation.get('selfRIID',None):
+ found = 1
+ break
+
+ if not found:
+ self.manage_delete() # poof!
def getObjectType(self):
|
|
From: <ssp...@us...> - 2003-09-11 09:47:20
|
Update of /cvsroot/zapp/ZApp
In directory sc8-pr-cvs1:/tmp/cvs-serv14377
Modified Files:
ZApp_CMFBase.py ZApp_MiscData.py
Log Message:
improve copy/paste support
Index: ZApp_CMFBase.py
===================================================================
RCS file: /cvsroot/zapp/ZApp/ZApp_CMFBase.py,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** ZApp_CMFBase.py 8 Aug 2003 02:47:54 -0000 1.15
--- ZApp_CMFBase.py 11 Sep 2003 09:47:03 -0000 1.16
***************
*** 78,81 ****
--- 78,94 ----
return "OK!"
+ def _setId(self, id):
+ # check for rename operation..
+ currID = self.__dict__.get('id',None)
+ print "in _setID of CMFBase..."
+
+ if currID is not None:
+ self.__dict__['_v_ZApp_OrigID'] = currID
+ print "currID was not none... but " + currID
+ else:
+ print "currID was None."
+
+ return ZApp_Base._setId(self, id)
+
def _notifyOfCopyTo(self, container, op=0):
"""we use _notifyOfCopy to save our miscData to a volitile container property
***************
*** 86,90 ****
#for action in actions:
#if action.getId() ==
! #print "in notify copy.. "
copyID = '_v_' + self.id + 'copyXML'
setattr(container, copyID, self.safeMiscData.getXMLDict())
--- 99,103 ----
#for action in actions:
#if action.getId() ==
! print "in notify copy.. "
copyID = '_v_' + self.id + 'copyXML'
setattr(container, copyID, self.safeMiscData.getXMLDict())
Index: ZApp_MiscData.py
===================================================================
RCS file: /cvsroot/zapp/ZApp/ZApp_MiscData.py,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** ZApp_MiscData.py 20 Aug 2003 11:19:26 -0000 1.18
--- ZApp_MiscData.py 11 Sep 2003 09:47:03 -0000 1.19
***************
*** 169,173 ****
Manager = self.miscDataManagerKey
else:
! Manager = self.aq_parent.id
return Manager
--- 169,173 ----
Manager = self.miscDataManagerKey
else:
! Manager = self.aq_inner.aq_parent.id
return Manager
***************
*** 200,204 ****
break
! return mdm
def setupMiscData(self, Manager=None, dataType='', checked=0):
--- 200,204 ----
break
! return mdm or None
def setupMiscData(self, Manager=None, dataType='', checked=0):
|
|
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 ----
|
|
From: <ssp...@us...> - 2003-08-28 17:13:04
|
Update of /cvsroot/zapp/ZApp In directory sc8-pr-cvs1:/tmp/cvs-serv7722 Modified Files: __init__.py Log Message: add flash mimetype to Zope Index: __init__.py =================================================================== RCS file: /cvsroot/zapp/ZApp/__init__.py,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** __init__.py 6 Aug 2003 05:36:48 -0000 1.16 --- __init__.py 28 Aug 2003 17:12:46 -0000 1.17 *************** *** 17,20 **** --- 17,23 ---- from ZApp_LOG import ZApp_LOG + import mimetypes + + mimetypes.types_map['.swf'] = 'application/x-shockwave-flash' try: |
|
From: <ssp...@us...> - 2003-08-20 12:24:39
|
Update of /cvsroot/zapp/ZApp
In directory sc8-pr-cvs1:/tmp/cvs-serv15716
Modified Files:
ZApp_Application.py ZApp_MiscData.py
Log Message:
add some utilty/MiscDataUser info
Index: ZApp_Application.py
===================================================================
RCS file: /cvsroot/zapp/ZApp/ZApp_Application.py,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** ZApp_Application.py 12 Aug 2003 13:32:13 -0000 1.23
--- ZApp_Application.py 20 Aug 2003 11:19:26 -0000 1.24
***************
*** 14,17 ****
--- 14,18 ----
import sys
import time
+ import xmlrpclib
from Globals import DTMLFile, MessageDialog, default__class_init__
***************
*** 265,269 ****
if browserID is not None:
! conditions.update({'xml':'<xmlData browserID="%s"/>' % browserID})
return self.MiscData.ZApp_getItems(conditions=conditions, createIfNone=create)
--- 266,270 ----
if browserID is not None:
! conditions.update({'xml':xmlrpclib.dumps(({'browserID':browserID},))})
return self.MiscData.ZApp_getItems(conditions=conditions, createIfNone=create)
Index: ZApp_MiscData.py
===================================================================
RCS file: /cvsroot/zapp/ZApp/ZApp_MiscData.py,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** ZApp_MiscData.py 7 Aug 2003 13:50:32 -0000 1.17
--- ZApp_MiscData.py 20 Aug 2003 11:19:26 -0000 1.18
***************
*** 15,18 ****
--- 15,20 ----
from Products.PlugIns import defaultConstructors
+ from Products.PageTemplates.PageTemplateFile import PageTemplateFile
+
import ZApp_Base
import string
***************
*** 143,146 ****
--- 145,150 ----
"WHEN OBJECT DELETED CALL self.miscData and self.miscData.manage_delete()",
)
+
+ #displayCustomUpdate_pt = PageTemplateFile('zpt/MiscDataUser_displayCustomUpdate', globals())
def _v_MyMDMCache(self):
|
|
From: <ssp...@us...> - 2003-08-20 12:02:38
|
Update of /cvsroot/zapp/ZApp/Extensions
In directory sc8-pr-cvs1:/tmp/cvs-serv15716/Extensions
Added Files:
getSessionInfo.py
Log Message:
add some utilty/MiscDataUser info
--- NEW FILE: getSessionInfo.py ---
def getSessionInfo(self, key):
result = self.session_data_manager.getSessionDataByKey( key )
print result
return result
|
|
From: <ssp...@us...> - 2003-08-20 12:02:18
|
Update of /cvsroot/zapp/ZApp/zpt In directory sc8-pr-cvs1:/tmp/cvs-serv15716/zpt Added Files: MiscDataUser_displayCustomUpdate.zpt Log Message: add some utilty/MiscDataUser info --- NEW FILE: MiscDataUser_displayCustomUpdate.zpt --- <span /> |
|
From: <ssp...@us...> - 2003-08-18 14:02:10
|
Update of /cvsroot/zapp/ZApp/skins/zapp_generic
In directory sc8-pr-cvs1:/tmp/cvs-serv27146/skins/zapp_generic
Modified Files:
zapp_cmf_object_edit_form.pt zapp_cmf_object_get_info.py
zapp_cmf_object_type_edit_form.pt
Log Message:
clean up zapp_cmf skins a bit..
Index: zapp_cmf_object_edit_form.pt
===================================================================
RCS file: /cvsroot/zapp/ZApp/skins/zapp_generic/zapp_cmf_object_edit_form.pt,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** zapp_cmf_object_edit_form.pt 3 Jul 2003 22:30:02 -0000 1.2
--- zapp_cmf_object_edit_form.pt 18 Aug 2003 13:38:09 -0000 1.3
***************
*** 81,85 ****
<table tal:condition="python:subObject and (propType=='records')">
<tr>
! <td><input type="radio" name="propToChange" tal:attributes="value string:${propName}"></td>
<td tal:repeat="subDef subDefs"><span tal:content="string:${subDef/name}(${subDef/type})"/></td>
</tr>
--- 81,85 ----
<table tal:condition="python:subObject and (propType=='records')">
<tr>
! <td><span tal:content="string:${propName}: "/> <input type="radio" name="propToChange" tal:attributes="value string:${propName}"></td>
<td tal:repeat="subDef subDefs"><span tal:content="string:${subDef/name}(${subDef/type})"/></td>
</tr>
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.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** zapp_cmf_object_get_info.py 25 Jun 2003 11:45:53 -0000 1.1
--- zapp_cmf_object_get_info.py 18 Aug 2003 13:38:09 -0000 1.2
***************
*** 1,3 ****
# Example code:
! return context.safeMiscData.getXMLAttr('questionInfo')
--- 1,3 ----
# Example code:
! return context.safeMiscData.getXMLDict()
Index: zapp_cmf_object_type_edit_form.pt
===================================================================
RCS file: /cvsroot/zapp/ZApp/skins/zapp_generic/zapp_cmf_object_type_edit_form.pt,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** zapp_cmf_object_type_edit_form.pt 7 Aug 2003 13:50:32 -0000 1.3
--- zapp_cmf_object_type_edit_form.pt 18 Aug 2003 13:38:09 -0000 1.4
***************
*** 67,71 ****
subDefs subObject/zapp_properties | python:[]">
! <table tal:condition="python:propType in ['float','int','long','string','date','boolean']">
<tr><td><input type="checkbox" name="names:list" tal:attributes="value propName"/></td> <td tal:content="string:${propName}(${propType})"/></tr>
</table>
--- 67,71 ----
subDefs subObject/zapp_properties | python:[]">
! <table tal:condition="python:propType in ['float','int','long','string','date','boolean','text']">
<tr><td><input type="checkbox" name="names:list" tal:attributes="value propName"/></td> <td tal:content="string:${propName}(${propType})"/></tr>
</table>
|
|
From: <ssp...@us...> - 2003-08-18 13:38:12
|
Update of /cvsroot/zapp/ZApp
In directory sc8-pr-cvs1:/tmp/cvs-serv27146
Modified Files:
ZApp_RelatableItem.py
Log Message:
clean up zapp_cmf skins a bit..
Index: ZApp_RelatableItem.py
===================================================================
RCS file: /cvsroot/zapp/ZApp/ZApp_RelatableItem.py,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** ZApp_RelatableItem.py 12 Aug 2003 13:32:13 -0000 1.18
--- ZApp_RelatableItem.py 18 Aug 2003 13:38:09 -0000 1.19
***************
*** 410,414 ****
rm = self.getRelationshipManager()
! return rm.getObjectRelations(anObject=self, objectTypes=objectTypes, objectRoles=objectRoles, selfRoles=selfRoles, returnObjects=returnObjects)
def relatedObjects(self, objectTypes=None, objectRoles=None, selfRoles=None):
--- 410,414 ----
rm = self.getRelationshipManager()
! return (rm or []) and rm.getObjectRelations(anObject=self, objectTypes=objectTypes, objectRoles=objectRoles, selfRoles=selfRoles, returnObjects=returnObjects)
def relatedObjects(self, objectTypes=None, objectRoles=None, selfRoles=None):
|
|
From: <ssp...@us...> - 2003-08-17 13:53:17
|
Update of /cvsroot/zapp/ZApp/Extensions In directory sc8-pr-cvs1:/tmp/cvs-serv16999/Extensions Added Files: .cvsignore Log Message: added .cvsignore to ignore the getDataManagerFor thingy.. --- NEW FILE: .cvsignore --- getDataManagerFor.py |
|
From: <ssp...@us...> - 2003-08-12 13:49:37
|
Update of /cvsroot/zapp/ZApp/skins/zapp_generic
In directory sc8-pr-cvs1:/tmp/cvs-serv3404/skins/zapp_generic
Modified Files:
getApplication.py getCurrentStack.py getTopNamespace.py
manage_edit_stack_levels.py manage_session_stack.pt
setCurrentStack.py
Added Files:
getClipboard.py
Removed Files:
setupRequest.py
Log Message:
fixed bug in removeObjectRelations if there are none..
--- NEW FILE: getClipboard.py ---
## Script (Python) "getClipboard"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=
##title=Get the Clipboard
##
sessionID = context.browser_id_manager.getBrowserId(create=1)
system_app = context.getApplication()
userSessions = system_app.getUserSessions(browserID=sessionID, create=1)
userSession = userSessions and userSessions[0]
if userSession:
SESSION = context.REQUEST.SESSION
clipboard = SESSION.get('ZAPP_CLIPBOARD',{})
return clipboard
else:
raise RuntimeError, "Can setup session!"
Index: getApplication.py
===================================================================
RCS file: /cvsroot/zapp/ZApp/skins/zapp_generic/getApplication.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** getApplication.py 25 Jun 2003 11:45:53 -0000 1.1
--- getApplication.py 12 Aug 2003 13:32:13 -0000 1.2
***************
*** 9,12 ****
##
! return getattr(context, getattr(context, 'hec_app_id', 'HTheatre'))
--- 9,12 ----
##
! return getattr(context, getattr(context, 'zapp_app_id'))
Index: getCurrentStack.py
===================================================================
RCS file: /cvsroot/zapp/ZApp/skins/zapp_generic/getCurrentStack.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** getCurrentStack.py 25 Jun 2003 11:45:53 -0000 1.1
--- getCurrentStack.py 12 Aug 2003 13:32:13 -0000 1.2
***************
*** 11,20 ****
sessionID = context.browser_id_manager.getBrowserId(create=1)
system_app = context.getApplication()
! SESSION = context.REQUEST.SESSION
! currStack = SESSION.get('HEC_STACK',[{}])
! if not len(currStack) :
! currStack = [{}]
!
! return currStack
!
--- 11,30 ----
sessionID = context.browser_id_manager.getBrowserId(create=1)
system_app = context.getApplication()
+ userSessions = system_app.getUserSessions(browserID=sessionID, create=1)
+ userSession = userSessions and userSessions[0]
! if userSession:
! SESSION = context.REQUEST.SESSION
! currStack = SESSION.get('ZAPP_STACK',[{}])
! if not len(currStack) :
! currStack = [{}]
!
! topLevel = currStack[-1]
! if (same_type(topLevel,{})):
! topLevel.update({'app_session_id':userSession.id})
! else:
! raise RuntimeError, "Ack.. top level is " + `topLevel`
!
! return currStack
! else:
! raise RuntimeError, "Can setup session!"
Index: getTopNamespace.py
===================================================================
RCS file: /cvsroot/zapp/ZApp/skins/zapp_generic/getTopNamespace.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** getTopNamespace.py 25 Jun 2003 11:45:53 -0000 1.1
--- getTopNamespace.py 12 Aug 2003 13:32:13 -0000 1.2
***************
*** 15,19 ****
result = currStack[-1]
! result.update({'hec_v_stackSize':len(currStack)})
return result
--- 15,19 ----
result = currStack[-1]
! result.update({'zapp_v_stackSize':len(currStack)})
return result
Index: manage_edit_stack_levels.py
===================================================================
RCS file: /cvsroot/zapp/ZApp/skins/zapp_generic/manage_edit_stack_levels.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** manage_edit_stack_levels.py 25 Jun 2003 11:45:53 -0000 1.1
--- manage_edit_stack_levels.py 12 Aug 2003 13:32:13 -0000 1.2
***************
*** 1,3 ****
! ## Script (Python) "getCurrentStack"
##bind container=container
##bind context=context
--- 1,3 ----
! ## Script (Python) "manage_edit_stack_levels"
##bind container=container
##bind context=context
***************
*** 5,20 ****
##bind script=script
##bind subpath=traverse_subpath
! ##parameters=sessionLevels=None, submit=None, indexes=None
##title=Get the Current Stack
##
if submit == 'EDIT':
indexes = []
! if submit in ['EDIT','DELETE']:
newStack = []
for i in range(len(sessionLevels)):
level = sessionLevels[i]
if level.index not in indexes:
--- 5,34 ----
##bind script=script
##bind subpath=traverse_subpath
! ##parameters=sessionLevels=None, submit=None, indexes=None, newKey='', newType='', newValue=''
##title=Get the Current Stack
##
+ for lev in sessionLevels:
+ #print lev
+ #print "XXXXXXXX"
+ pass
+ import string
+ if indexes is None:
+ indexes = []
+
if submit == 'EDIT':
indexes = []
! #print "indexes:", indexes
! #print "submit:", submit
!
! oldLevels = context.getCurrentStack()
!
! if submit in ['EDIT','DELETE','ADD']:
newStack = []
for i in range(len(sessionLevels)):
level = sessionLevels[i]
+ oldLevel = oldLevels[i]
if level.index not in indexes:
***************
*** 22,32 ****
newStack.append(newLevel)
! for k in level.keys():
! newLevel[k] = level[k]
context.setCurrentStack(newStack)
!
else:
raise RuntimeError, "I don't know that one!: " + `submit` + ":" + `indexes`
context.REQUEST.RESPONSE.redirect( context.REQUEST.URL1 + '/manage_session_stack')
--- 36,66 ----
newStack.append(newLevel)
! for k in oldLevel.keys():
! oldValue = oldLevel.get(k,level.get(k,None))
! itemType = context.guess_type(oldValue)
! if itemType not in ['unknown','structure','list']:
! newLevel[k] = level.get(k, oldValue)
! else:
! newLevel[k] = oldValue
!
! if (submit=='ADD') and newKey:
! if newType != 'string':
! if newType == 'int':
! newValue = string.atoi(newValue)
! elif newType == 'float':
! newValue = string.atof(newValue)
! elif newType == 'list':
! newValue = newValue.split()
! else:
! raise RuntimeError, "I don't know that tupe!: " + `newType` + ":" + `indexes`
!
! newLevel[newKey] = newValue
context.setCurrentStack(newStack)
! #print "newStack:",newStack
!
else:
raise RuntimeError, "I don't know that one!: " + `submit` + ":" + `indexes`
+ #return printed
context.REQUEST.RESPONSE.redirect( context.REQUEST.URL1 + '/manage_session_stack')
Index: manage_session_stack.pt
===================================================================
RCS file: /cvsroot/zapp/ZApp/skins/zapp_generic/manage_session_stack.pt,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** manage_session_stack.pt 25 Jun 2003 11:45:53 -0000 1.1
--- manage_session_stack.pt 12 Aug 2003 13:32:13 -0000 1.2
***************
*** 28,35 ****
<table>
<tr tal:repeat="itemKey itemKeys">
! <tal:block tal:omit-tag="" tal:define="itemValue python:stackLevel[itemKey];
itemType python:here.guess_type(itemValue)">
! <td tal:content="string:${itemKey} (${itemType})"/><td><input size="20" tal:attributes="name string:sessionLevels.${itemKey}:${itemType}:records;
! value itemValue"></td>
</tal:block>
</tr>
--- 28,36 ----
<table>
<tr tal:repeat="itemKey itemKeys">
! <tal:block tal:condition="python:itemKey != 'index'" tal:omit-tag="" tal:define="itemValue python:stackLevel[itemKey];
itemType python:here.guess_type(itemValue)">
! <span tal:condition="python:itemType not in ['unknown','structure','list']" tal:omit-tag=""><td tal:content="string:${itemKey} (${itemType})"/><td><input size="20" tal:attributes="name string:sessionLevels.${itemKey}:${itemType}:records;
! value itemValue"></td></span>
! <span tal:condition="python:itemType in ['unknown','structure','list']" tal:omit-tag=""><td tal:content="string:${itemKey} (${itemType})"/><td><span tal:content="itemValue"/></td></span>
</tal:block>
</tr>
***************
*** 38,45 ****
</td>
</tr>
</table>
<input type="submit" value="EDIT" name="submit">
<input type="submit" value="DELETE" name="submit">
! </form>
</div>
</div>
--- 39,56 ----
</td>
</tr>
+ <tr><td>New Field</td><td><input name="newKey"><select name="newType">
+ <option value="string">string</option>
+ <option value="int">int</option>
+ <option value="float">float</option>
+ <option value="list">tokens</option>
+ </select> <input name="newValue"></td></tr>
+
</table>
<input type="submit" value="EDIT" name="submit">
<input type="submit" value="DELETE" name="submit">
! <input type="submit" value="ADD" name="submit">
! </form>
!
! <div tal:content="python:'Clipboard = ' + `here.getClipboard()`"/>
</div>
</div>
Index: setCurrentStack.py
===================================================================
RCS file: /cvsroot/zapp/ZApp/skins/zapp_generic/setCurrentStack.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** setCurrentStack.py 25 Jun 2003 11:45:53 -0000 1.1
--- setCurrentStack.py 12 Aug 2003 13:32:13 -0000 1.2
***************
*** 9,12 ****
##
SESSION = context.REQUEST.SESSION
! SESSION['BSM_STACK'] = currStack
return "OK!"
--- 9,12 ----
##
SESSION = context.REQUEST.SESSION
! SESSION['ZAPP_STACK'] = currStack
return "OK!"
--- setupRequest.py DELETED ---
|