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):
|
def setParams(self, params):
|
||||||
params = dict(params)
|
params = dict(params)
|
||||||
self.name = params.pop('name', '')
|
self.slot = params.pop('slot', '')
|
||||||
self.identifier = params.pop('identifier', name)
|
self.name = params.pop('name', None)
|
||||||
|
self.identifier = params.pop('identifier', self.name)
|
||||||
self.template = params.pop('template', None)
|
self.template = params.pop('template', None)
|
||||||
self.params = params
|
self.params = params
|
||||||
|
|
|
@ -63,7 +63,7 @@ class Controller(object):
|
||||||
configurator = conf[1]
|
configurator = conf[1]
|
||||||
for item in configurator.getActiveViewProperties():
|
for item in configurator.getActiveViewProperties():
|
||||||
if IMacroViewProperty.providedBy(item):
|
if IMacroViewProperty.providedBy(item):
|
||||||
self.macros.register(item.slot, item.idenitifier,
|
self.macros.register(item.slot, item.identifier,
|
||||||
item.template, item.name,
|
item.template, item.name,
|
||||||
**item.params)
|
**item.params)
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -78,6 +78,10 @@ The tracks of a tracking store may be reindexed:
|
||||||
|
|
||||||
>>> tracks.reindexTracks()
|
>>> tracks.reindexTracks()
|
||||||
|
|
||||||
|
>>> tracks.removeTrack(t4[0])
|
||||||
|
>>> tracks.getUserTracks('a001', 0, 'u2')
|
||||||
|
set([])
|
||||||
|
|
||||||
Runs
|
Runs
|
||||||
----
|
----
|
||||||
|
|
||||||
|
|
|
@ -196,6 +196,14 @@ class TrackingStorage(BTreeContainer):
|
||||||
self.indexTrack(trackNum, track)
|
self.indexTrack(trackNum, track)
|
||||||
return trackId
|
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):
|
def indexTrack(self, trackNum, track):
|
||||||
ixd = track.indexdata
|
ixd = track.indexdata
|
||||||
for attr in self.indexAttributes:
|
for attr in self.indexAttributes:
|
||||||
|
|
Loading…
Add table
Reference in a new issue