[Commits] (alecf) Move Title and Body fields to the Note type, so that they don't display with all ContentItems

commits at osafoundation.org commits at osafoundation.org
Tue Feb 1 09:28:31 PST 2005


Commit by: alecf
Modified files:
chandler/parcels/osaf/framework/blocks/detail/Detail.py 1.79 1.80
chandler/parcels/osaf/framework/blocks/detail/parcel.xml 1.59 1.60

Log message:
Move Title and Body fields to the Note type, so that they don't display with all ContentItems
also add support for an HTML display in the detail view

ViewCVS links:
http://cvs.osafoundation.org/index.cgi/chandler/parcels/osaf/framework/blocks/detail/Detail.py.diff?r1=text&tr1=1.79&r2=text&tr2=1.80
http://cvs.osafoundation.org/index.cgi/chandler/parcels/osaf/framework/blocks/detail/parcel.xml.diff?r1=text&tr1=1.59&r2=text&tr2=1.60

Index: chandler/parcels/osaf/framework/blocks/detail/Detail.py
diff -u chandler/parcels/osaf/framework/blocks/detail/Detail.py:1.79 chandler/parcels/osaf/framework/blocks/detail/Detail.py:1.80
--- chandler/parcels/osaf/framework/blocks/detail/Detail.py:1.79	Fri Jan 28 19:31:07 2005
+++ chandler/parcels/osaf/framework/blocks/detail/Detail.py	Tue Feb  1 09:28:29 2005
@@ -1,5 +1,5 @@
-__version__ = "$Revision: 1.79 $"
-__date__ = "$Date: 2005/01/29 03:31:07 $"
+__version__ = "$Revision: 1.80 $"
+__date__ = "$Date: 2005/02/01 17:28:29 $"
 __copyright__ = "Copyright (c) 2004-2005 Open Source Applications Foundation"
 __license__ = "http://osafoundation.org/Chandler_0.1_license_terms.htm"
 
@@ -71,8 +71,8 @@
         ourselves.
           When we get a SelectItem event, we jump across
         the event boundary and call synchronizeItemDetail on each
-        block to give it a chance to synchronize on the details of
-        the Item.  
+        block to give it a chance to update the widget with data
+        from the Item.
           Notify container blocks before their children.
           
           @@@DLD - find a better way to broadcast inside my boundary.
@@ -289,7 +289,7 @@
         # opted for clarity.)
         decoratedSubtreeList = [] # each entry will be (position, path, subtreechild)
         for subtree in self._getSubtrees():
-            if keyItem.isKindOf(subtree.key):
+            if keyItem.isKindOf(subtree.key) and subtree.hasAttributeValue('rootBlocks'):
                 for block in subtree.rootBlocks:
                     entryTobeSorted = (block.getAttributeValue('position', default=sys.maxint), 
                                        block.itsPath,
@@ -1070,3 +1070,11 @@
 
 
 
+class HTMLDetailArea(DetailSynchronizer, ControlBlocks.ItemDetail):
+    def synchronizeItemDetail(self, item):
+        self.selection = item
+        # this ensures that getHTMLText() gets called appropriately on the derived class
+        self.synchronizeWidget()
+        
+    def getHTMLText(self, item):
+        return "<html><body>" + str(item) + "</body></html>"

Index: chandler/parcels/osaf/framework/blocks/detail/parcel.xml
diff -u chandler/parcels/osaf/framework/blocks/detail/parcel.xml:1.59 chandler/parcels/osaf/framework/blocks/detail/parcel.xml:1.60
--- chandler/parcels/osaf/framework/blocks/detail/parcel.xml:1.59	Fri Jan 28 19:31:07 2005
+++ chandler/parcels/osaf/framework/blocks/detail/parcel.xml	Tue Feb  1 09:28:29 2005
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
 
-<!-- $Revision: 1.59 $ -->
-<!-- $Date: 2005/01/29 03:31:07 $ -->
+<!-- $Revision: 1.60 $ -->
+<!-- $Date: 2005/02/01 17:28:29 $ -->
 <!-- Copyright (c) 2003-2005 Open Source Applications Foundation -->
 <!-- License: http://osafoundation.org/Chandler_0.1_license_terms.htm -->
 
@@ -122,17 +122,13 @@
   <!-- 
   Trees of blocks
   -->
-  <!-- Content Item -->
-  <doc:DetailTrunkSubtree itsName="ContentItemSubtree">
-    <key itemref="content:ContentItem"/>
-    <rootBlocks itemref="doc:HeadlineArea"/>
-    <rootBlocks itemref="doc:NotesArea"/>
-  </doc:DetailTrunkSubtree>
   
   <!-- Note -->
   <doc:DetailTrunkSubtree itsName="NoteSubtree">
     <key itemref="content:Note"/>
     <rootBlocks itemref="doc:MarkupBar"/>
+     <rootBlocks itemref="doc:HeadlineArea"/>
+    <rootBlocks itemref="doc:NotesArea"/>
   </doc:DetailTrunkSubtree>
 
   <!-- Calendar Event -->



More information about the Commits mailing list