Author: jmorliaguet
Date: Sat Dec  3 23:47:52 2005
New Revision: 1951

Modified:
   cpsskins/branches/jmo-perspectives/browser/editing/views.py
Log:

- fixes



Modified: cpsskins/branches/jmo-perspectives/browser/editing/views.py
==============================================================================
--- cpsskins/branches/jmo-perspectives/browser/editing/views.py (original)
+++ cpsskins/branches/jmo-perspectives/browser/editing/views.py Sat Dec  3 
23:47:52 2005
@@ -106,14 +106,21 @@
         display = displayable.getEffectiveDisplay(perspective)
         formattable = IFormattable(display)
         formats = formattable.getFormats()
-        format = format_name and formattable.getFormat(format_name) or None
-        main = format is not None and format or context
+
+        main = context
+        format = None
+
+        if format_name:
+            format = formattable.getFormat(format_name)
+
+        if format is not None:
+            main = format
 
         base_url = self.getAbsoluteURL(main) + '/'
         main_url = main_url or base_url + form.get('action', '@@edit.html')
 
         element_info = {
-            'selected': not format,
+            'selected': not format_name,
             }
 
         return {
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to