Author: jmorliaguet
Date: Sat Nov 26 16:22:47 2005
New Revision: 1936

Modified:
   cpsskins/branches/jmo-perspectives/browser/editing/edit_menu.pt
   cpsskins/branches/jmo-perspectives/browser/editing/portlet_editor.pt
   cpsskins/branches/jmo-perspectives/engines/authoring/authoring_macros.pt
   cpsskins/branches/jmo-perspectives/interfaces.py
   cpsskins/branches/jmo-perspectives/thememanager.py
Log:

- last fixes



Modified: cpsskins/branches/jmo-perspectives/browser/editing/edit_menu.pt
==============================================================================
--- cpsskins/branches/jmo-perspectives/browser/editing/edit_menu.pt     
(original)
+++ cpsskins/branches/jmo-perspectives/browser/editing/edit_menu.pt     Sat Nov 
26 16:22:47 2005
@@ -5,7 +5,7 @@
                 perspective context/@@getPerspective;
                 format_name request/form/format|string:;
                 location request/form/location|nothing;
-                current_theme python:tmutil.getThemeInContext(context);
+                current_theme python:tmutil.getEffectiveTheme(context);
                 displayable context/displayable:this;
                 actual_display python: displayable.getDisplay(perspective);
                 display python: displayable.getEffectiveDisplay(perspective);

Modified: cpsskins/branches/jmo-perspectives/browser/editing/portlet_editor.pt
==============================================================================
--- cpsskins/branches/jmo-perspectives/browser/editing/portlet_editor.pt        
(original)
+++ cpsskins/branches/jmo-perspectives/browser/editing/portlet_editor.pt        
Sat Nov 26 16:22:47 2005
@@ -2,7 +2,7 @@
   <head>
     <tal:style metal:fill-slot="style"
                define="tmutil context/@@getThemeManager;
-                       current_theme 
python:tmutil.getThemeInContext(context);">
+                       current_theme 
python:tmutil.getEffectiveTheme(context);">
       <link rel="Stylesheet" type="text/css"
             href="/++skin++cpsskins/@@/++resource++widgets.css" />
       <style type="text/css" media="all"

Modified: 
cpsskins/branches/jmo-perspectives/engines/authoring/authoring_macros.pt
==============================================================================
--- cpsskins/branches/jmo-perspectives/engines/authoring/authoring_macros.pt    
(original)
+++ cpsskins/branches/jmo-perspectives/engines/authoring/authoring_macros.pt    
Sat Nov 26 16:22:47 2005
@@ -147,7 +147,7 @@
 <metal:block define-slot="doctype"><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 
1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";></metal:block>
 <html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en"
   tal:define="tmutil context/@@getThemeManager;
-              current_theme python:tmutil.getThemeInContext(context);
+              current_theme python:tmutil.getEffectiveTheme(context);
               effective_page python:tmutil.getEffectivePage(context, request)">
   <head>
     <metal:block define-slot="css" />

Modified: cpsskins/branches/jmo-perspectives/interfaces.py
==============================================================================
--- cpsskins/branches/jmo-perspectives/interfaces.py    (original)
+++ cpsskins/branches/jmo-perspectives/interfaces.py    Sat Nov 26 16:22:47 2005
@@ -68,7 +68,7 @@
         """Return the effective page
         (the one that will be effectively displayed)"""
 
-    def getThemeInContext(context):
+    def getThemeInContext(context, request):
         """Return the theme in which the element is located.
 
         A context must be provided with.

Modified: cpsskins/branches/jmo-perspectives/thememanager.py
==============================================================================
--- cpsskins/branches/jmo-perspectives/thememanager.py  (original)
+++ cpsskins/branches/jmo-perspectives/thememanager.py  Sat Nov 26 16:22:47 2005
@@ -144,6 +144,9 @@
         res = relations.search(predicate=isDefault, first=object)
         return res is not []
 
+    ###################################################################
+    # TODO: this should be a view
+
     def getDefaultTheme(self):
         """ """
         for theme in self.getThemes():
@@ -175,13 +178,15 @@
         # use the default page
         return self.getDefaultPage()
 
-    def getThemeInContext(self, context=None):
+    def getThemeInContext(self, context=None, request=None):
         """Return the theme in a given context.
         """
         if ITheme.providedBy(context):
             return context
         return queryUtility(ITheme, context=context)
 
+    ####################################################################
+
     def setAsDefault(self, object=None):
         """Set the default theme
         """
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to