fixes on view configurator (used for setting up portlets)
git-svn-id: svn://svn.cy55.de/Zope3/src/cybertools/trunk@2451 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
76e6742b25
commit
24af73ca1f
4 changed files with 16 additions and 3 deletions
|
@ -136,7 +136,8 @@ class MacroViewProperty(ViewProperty):
|
|||
|
||||
def setParams(self, params):
|
||||
params = dict(params)
|
||||
self.name = params.pop('name', '')
|
||||
self.identifier = params.pop('identifier', name)
|
||||
self.slot = params.pop('slot', '')
|
||||
self.name = params.pop('name', None)
|
||||
self.identifier = params.pop('identifier', self.name)
|
||||
self.template = params.pop('template', None)
|
||||
self.params = params
|
||||
|
|
|
@ -63,7 +63,7 @@ class Controller(object):
|
|||
configurator = conf[1]
|
||||
for item in configurator.getActiveViewProperties():
|
||||
if IMacroViewProperty.providedBy(item):
|
||||
self.macros.register(item.slot, item.idenitifier,
|
||||
self.macros.register(item.slot, item.identifier,
|
||||
item.template, item.name,
|
||||
**item.params)
|
||||
else:
|
||||
|
|
|
@ -78,6 +78,10 @@ The tracks of a tracking store may be reindexed:
|
|||
|
||||
>>> tracks.reindexTracks()
|
||||
|
||||
>>> tracks.removeTrack(t4[0])
|
||||
>>> tracks.getUserTracks('a001', 0, 'u2')
|
||||
set([])
|
||||
|
||||
Runs
|
||||
----
|
||||
|
||||
|
|
|
@ -196,6 +196,14 @@ class TrackingStorage(BTreeContainer):
|
|||
self.indexTrack(trackNum, track)
|
||||
return trackId
|
||||
|
||||
def removeTrack(self, track):
|
||||
trackId = str(track.__name__)
|
||||
trackNum = int(trackId)
|
||||
for attr in self.indexAttributes:
|
||||
self.indexes[attr].unindex_doc(trackNum)
|
||||
if trackId in self:
|
||||
del self[trackId]
|
||||
|
||||
def indexTrack(self, trackNum, track):
|
||||
ixd = track.indexdata
|
||||
for attr in self.indexAttributes:
|
||||
|
|
Loading…
Add table
Reference in a new issue