Author: bree
Date: Thu Feb  2 16:40:42 2006
New Revision: 2271

Added:
   azax/branches/snowsprint/tests/kukitresponse_test.pt
Modified:
   azax/branches/snowsprint/azaxview.py
   azax/branches/snowsprint/browser/kukitresponse.pt
Log:
Fixing IE support for entities.

(test is not yet finished)

Modified: azax/branches/snowsprint/azaxview.py
==============================================================================
--- azax/branches/snowsprint/azaxview.py        (original)
+++ azax/branches/snowsprint/azaxview.py        Thu Feb  2 16:40:42 2006
@@ -58,8 +58,8 @@
     
     def __init__(self, value):
         self.soup = self.BeautifulSoup(value)
-        for param in self.soup.fetch('kukit:param', {'name': 'html'}):
-            param['xmlns'] = "http://www.w3.org/1999/xhtml";
+        for tag in self.soup:
+            tag['xmlns'] = "http://www.w3.org/1999/xhtml";
 
     def __call__(self):
         return str(self.soup)
@@ -121,6 +121,15 @@
     # XML output gets rendered via a page template
     render = ViewPageTemplateFile('browser/kukitresponse.pt', 
content_type='text/xml')
 
+    # XXX test only, hardcoded HTML for the first button of the first demo
+    ##render = ViewPageTemplateFile('tests/kukitresponse_test.pt', 
content_type='text/xml')
+
+    # fix for IE
+    _render = render
+    def render(self):
+        result = self._render()
+        return result.replace(' ', ' ')
+
     def __init__(self, context, request):
         BrowserView.__init__(self, context, request)
         self.commands = []

Modified: azax/branches/snowsprint/browser/kukitresponse.pt
==============================================================================
--- azax/branches/snowsprint/browser/kukitresponse.pt   (original)
+++ azax/branches/snowsprint/browser/kukitresponse.pt   Thu Feb  2 16:40:42 2006
@@ -1,4 +1,4 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"file:///var/lib/zope2.8/instance/kukit/Products/azax/dtds/xhtml1-transitional.dtd">
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
 <html xmlns="http://www.w3.org/1999/xhtml";
       xmlns:kukit="http://www.kukit.org/commands/1.0";
       xmlns:tal="http://xml.zope.org/namespaces/tal";

Added: azax/branches/snowsprint/tests/kukitresponse_test.pt
==============================================================================
--- (empty file)
+++ azax/branches/snowsprint/tests/kukitresponse_test.pt        Thu Feb  2 
16:40:42 2006
@@ -0,0 +1,16 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
+<html xmlns="http://www.w3.org/1999/xhtml"; 
+         xmlns:kukit="http://www.kukit.org/commands/1.0";>
+       <body>
+               <kukit:command selector="div#demo" name="setHtmlAsChild">
+                       <kukit:param name="html">
+                               <h1 xmlns="http://www.w3.org/1999/xhtml";>it 
worked</h1>
+                       </kukit:param>
+               </kukit:command>
+               <kukit:command selector="div#demo" name="setHtmlAsChild">
+                       <kukit:param name="html">
+                               <h1 xmlns="http://www.w3.org/1999/xhtml";>it 
worked&nbsp;again (test)</h1>
+                       </kukit:param>
+               </kukit:command>
+       </body>
+</html>
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to