Exemplo n.º 1
0
 def _process(self):
     styleMgr = info.HelperMaKaCInfo.getMaKaCInfoInstance().getStyleManager(
     )
     if self._new != "":
         if self._xslfile not in styleMgr.getStylesheets().keys(
         ) and self._name != "":
             styles = styleMgr.getStylesheets()
             styles[self._xslfile] = self._name
             styleMgr.setStylesheets(styles)
     if self._action == "default" and self._eventType != "" and self._xslfile != "":
         styleMgr.setDefaultStyle(self._xslfile, self._eventType)
     if self._action == "delete" and self._eventType != "" and self._xslfile != "":
         styleMgr.removeStyle(self._xslfile, self._eventType)
     if self._action == "add" and self._eventType != "" and self._newstyle != "":
         styleMgr.addStyleToEventType(self._newstyle, self._eventType)
     p = admins.WPAdminsStyles(self)
     return p.display()
Exemplo n.º 2
0
 def _process( self ):
     styleMgr = info.HelperMaKaCInfo.getMaKaCInfoInstance().getStyleManager()
     if self._new != "":
         if self._styleID not in styleMgr.getStyles().keys() and self._name != "" and self._styleID != "":
             styles = styleMgr.getStyles()
             if not self._useCss:
                 self._cssfile = None
             if self._typeTemplate == 'xsl':
                 file = self._stylesheetfile
             else:
                 file = self._tplfile
             styles[self._styleID] = (self._name, file, self._cssfile)
             styleMgr.setStyles(styles)
     if self._action == "default" and self._eventType != "" and self._tplfile != "":
         styleMgr.setDefaultStyle(self._tplfile, self._eventType)
     if self._action == "delete" and self._eventType != "" and self._tplfile != "":
         styleMgr.removeStyle(self._tplfile, self._eventType)
     if self._action == "add" and self._eventType != "" and self._newstyle != "":
         styleMgr.addStyleToEventType(self._newstyle, self._eventType)
     p = admins.WPAdminsStyles( self )
     return p.display()