Esempio n. 1
0
 def stylebooks(self):
     """enumerate"""
     if not getattr(self, '_stylebooks', None):
         self._stylebooks = filter(
             lambda o: IChartStyleBook.providedBy(o),
             self.context.objectValues()
             )
     return self._stylebooks
Esempio n. 2
0
 def can_paste_stylebooks(self):
     if self.request.get('__cp', None) is not None:
         if self.context.cb_dataValid():
             oblist = self.context.cb_dataItems()
             if oblist:
                 return all(
                     map(
                         lambda o: IChartStyleBook.providedBy(o),
                         oblist,
                     ))
     return False
Esempio n. 3
0
 def can_paste_stylebooks(self):
     if self.request.get('__cp', None) is not None:
         if self.context.cb_dataValid():
             try:
                 oblist = self.context.cb_dataItems()
                 if oblist:
                     return all(
                         map(
                             lambda o: IChartStyleBook.providedBy(o),
                             oblist,
                             )
                         )
             except KeyError:
                 pass  # object(s) in clipboard subsequently deleted
     return False