def unactivate(self):
     csstool = self.getCSSRegistry()
     stylesheet = csstool.getResourcesDict().get(self.stylesheetid, None)
     if stylesheet:
         csstool.unregisterResource(self.stylesheetid)
         csstool.cookResources()
     else:
         logger.info('can t unactivate %s' % self.stylesheetid)
 def unactivate(self):
     csstool = self.getCSSRegistry()
     stylesheet = csstool.getResourcesDict().get(self.stylesheetid, None)
     if stylesheet:
         csstool.unregisterResource(self.stylesheetid)
         csstool.cookResources()
     else:
         logger.info('can t unactivate %s' % self.stylesheetid)
 def __call__(self, context):
     """Retrieve available themes inside persistent resource and add
     sunburst and collective.js.jqueryui themes"""
     tm = self.getThemeManager()
     try:
         ids = tm.getThemeIds()
         ids.sort()
         items = [(id, id) for id in ids if id]
         return SimpleVocabulary.fromItems(items)
     except TypeError:
         logger.info('kss inline validation ... getSite doesn t return Plone site')
         return SimpleVocabulary.fromItems([('sunburst','sunburst')])
Exemple #4
0
 def __call__(self, context):
     """Retrieve available themes inside persistent resource and add
     sunburst and collective.js.jqueryui themes"""
     tm = self.getThemeManager()
     try:
         ids = tm.getThemeIds()
         ids.sort()
         items = [(themeid, themeid) for themeid in ids if id]
         return SimpleVocabulary.fromItems(items)
     except TypeError:
         msg = 'kss inline validation ... getSite doesn t return Plone site'
         logger.info(msg)
         return SimpleVocabulary.fromItems([('sunburst', 'sunburst')])