Example #1
0
 def update(self):
     self.task_progress.add('collecting', title=u'', progress=0.0)
     event = zope.contentprovider.interfaces.BeforeUpdateEvent
     total = len(self.viewlets)
     for nv, viewlet in enumerate(self.viewlets):
         title = format_message(self.collecting_title,
                                {'name': viewlet.title or _('files')})
         self.task_progress.force('collecting',
                                  title=title,
                                  progress=normalized_progress(nv, total),
                                  active=True)
         zope.event.notify(event(viewlet, self.request))
         viewlet.update()
     title = format_message(self.collecting_title, {'name': _('files')})
     self.task_progress.force('collecting',
                              title=title,
                              progress=None,
                              active=False)
     self.addArchivers()
Example #2
0
 def update(self):
     self.task_progress.add('collecting',
         title=u'', progress=0.0)
     event = zope.contentprovider.interfaces.BeforeUpdateEvent
     total = len(self.viewlets)
     for nv, viewlet in enumerate(self.viewlets):
         title = format_message(self.collecting_title,
                                {'name': viewlet.title or _('files')})
         self.task_progress.force(
             'collecting',
             title=title,
             progress=normalized_progress(nv, total),
             active=True)
         zope.event.notify(event(viewlet, self.request))
         viewlet.update()
     title = format_message(self.collecting_title,
                            {'name': _('files')})
     self.task_progress.force('collecting', title=title, progress=None, active=False)
     self.addArchivers()
Example #3
0
 def __call__(self, *args, **kw):
     if not self._updated:
         event = zope.contentprovider.interfaces.BeforeUpdateEvent
         zope.event.notify(event(self, self.request))
         self.update()
     return self.render(*args, **kw)
Example #4
0
 def update(self):
     event = zope.contentprovider.interfaces.BeforeUpdateEvent
     for viewlet in self.viewlets:
         zope.event.notify(event(viewlet, self.request))
         viewlet.update()
Example #5
0
 def __call__(self, *args, **kw):
     if not self._updated:
         event = zope.contentprovider.interfaces.BeforeUpdateEvent
         zope.event.notify(event(self, self.request))
         self.update()
     return self.render(*args, **kw)
Example #6
0
 def update(self):
     event = zope.contentprovider.interfaces.BeforeUpdateEvent
     for viewlet in self.viewlets:
         zope.event.notify(event(viewlet, self.request))
         viewlet.update()