[Zope3-checkins] SVN: Zope3/branches/srichter-blow-services/src/zope/app/component/browser/tools.py Fixed tools a bit. I really need to work on this more.

Stephan Richter srichter at cosmos.phy.tufts.edu
Thu Feb 10 17:01:24 EST 2005


Log message for revision 29113:
  Fixed tools a bit. I really need to work on this more.
  

Changed:
  U   Zope3/branches/srichter-blow-services/src/zope/app/component/browser/tools.py

-=-
Modified: Zope3/branches/srichter-blow-services/src/zope/app/component/browser/tools.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/component/browser/tools.py	2005-02-10 22:00:37 UTC (rev 29112)
+++ Zope3/branches/srichter-blow-services/src/zope/app/component/browser/tools.py	2005-02-10 22:01:23 UTC (rev 29113)
@@ -63,8 +63,13 @@
     def __init__(self, context, request):
         super(SiteManagementView, self).__init__(context, request)
         if 'activeTool' in request:
+            request.response.setCookie('SetActiveTool', request['activeTool'],
+                                       path="/")
             self.activeTool = zapi.getUtility(IToolConfiguration,
                                               request['activeTool'])
+        elif 'SetActiveTool' in request:
+            self.activeTool = zapi.getUtility(IToolConfiguration,
+                                              request['SetActiveTool'])
 
     def update(self):
         """ """
@@ -78,6 +83,7 @@
         if "ADD-TOOL-SUBMIT" in self.request:
             self.action(self.request['type_name'], self.request['id'])
         elif "CANCEL-ADD-TOOL-SUBMIT" in self.request:
+            request.response.expireCookie('SetActiveTool')
             self.activeTool = None
         elif "ACTIVATE-SUBMIT" in self.request:
             self.changeStatus(interfaces.registration.ActiveStatus)



More information about the Zope3-Checkins mailing list