Author: jmorliaguet
Date: Sat Feb 11 18:55:28 2006
New Revision: 2360

Added:
   
cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/functional/chat/chatbox.pt
   (contents, props changed)
   
cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/functional/chat/chatinput.pt
   (contents, props changed)
Modified:
   
cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/functional/chat/configure.zcml
   
cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/functional/chat/cpsskins_chat.pt
Log:

- replaced the chat box with a template



Added: 
cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/functional/chat/chatbox.pt
==============================================================================
--- (empty file)
+++ 
cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/functional/chat/chatbox.pt
      Sat Feb 11 18:55:28 2006
@@ -0,0 +1,7 @@
+<div class="chatbox">
+  <div class="message" ctal:repeat="message messages">
+     [<span ctal:content="message/date">00:00:00</span>]
+     <strong ctal:content="message/user">User</strong>:
+     <span ctal:content="message/text">Text</span>
+  </div>
+</div>

Added: 
cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/functional/chat/chatinput.pt
==============================================================================
--- (empty file)
+++ 
cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/functional/chat/chatinput.pt
    Sat Feb 11 18:55:28 2006
@@ -0,0 +1,3 @@
+<form method="post">
+  not done yet
+</form>

Modified: 
cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/functional/chat/configure.zcml
==============================================================================
--- 
cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/functional/chat/configure.zcml
  (original)
+++ 
cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/functional/chat/configure.zcml
  Sat Feb 11 18:55:28 2006
@@ -9,6 +9,22 @@
       template="cpsskins_chat.pt"
   />
 
+  <browser:page
+      for="*"
+      layer="cpsskins"
+      name="chatinput.html"
+      permission="zope.Public"
+      template="chatinput.pt"
+  />
+
+  <browser:page
+      for="*"
+      layer="cpsskins"
+      name="chatbox.html"
+      permission="zope.Public"
+      template="chatbox.pt"
+  />
+
   <browser:pages
       layer="cpsskins"
       for="*"

Modified: 
cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/functional/chat/cpsskins_chat.pt
==============================================================================
--- 
cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/functional/chat/cpsskins_chat.pt
        (original)
+++ 
cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/functional/chat/cpsskins_chat.pt
        Sat Feb 11 18:55:28 2006
@@ -9,6 +9,8 @@
           type="text/javascript"></script>
   <script src="/++skin++cpsskins/@@/++resource++json.js"
           type="text/javascript"></script>
+  <script src="/++skin++cpsskins/@@/++resource++ctal.js"
+          type="text/javascript"></script>
   <script src="/++skin++cpsskins/@@/++resource++cpsskins.js"
           type="text/javascript"></script>
   <link rel="stylesheet" type="text/css"
@@ -69,14 +71,6 @@
 
     Object.extend(Widgets, {
 
-      chatbox: function(def) {
-        var widget = Canvas.createNode({
-          tag: "div",
-          classes: "chatbox"
-        });
-        return new ChatBox(widget, def);
-      },
-
       inputbox: function(def) {
         var widget = Canvas.createNode({
           tag: "form",
@@ -88,26 +82,6 @@
 
     });
 
-    ChatBox = Class.create();
-    ChatBox.prototype = Object.extend(new CPSSkins.View(), {
-
-      render: function(data) {
-        var widget = this.widget;
-        widget.innerHTML = '';
-        var messages = data.messages;
-
-        $A(messages).each(function(m, index) {
-          var message = Canvas.createNode({
-            tag: "div",
-            classes: "message",
-            text: '[' + m.date + '] ' + m.user + ': ' + m.text
-          });
-          widget.appendChild(message);
-        });
-      }
-
-    });
-
     InputBox = Class.create();
     InputBox.prototype = Object.extend(new CPSSkins.View(), {
 
@@ -276,7 +250,7 @@
 
     <ins class="view">
     {"widget": {
-      "type": "chatbox"
+      "template": "chatbox.html"
      },
      "model": "chat"
     }
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to