Author: jmorliaguet
Date: Mon Feb  6 22:36:10 2006
New Revision: 2312

Modified:
   
cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/functional/chat/browser.py
   
cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/functional/chat/cpsskins_chat.pt
Log:

- added some documentation

- moved the chat input below te messages



Modified: 
cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/functional/chat/browser.py
==============================================================================
--- 
cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/functional/chat/browser.py
      (original)
+++ 
cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/functional/chat/browser.py
      Mon Feb  6 22:36:10 2006
@@ -33,9 +33,9 @@
 
             user = data.get('user')
             date = time.strftime("%H:%M:%S", time.gmtime())
-            messages.insert(0, {'text': input, 'user': user, 'date': date});
             if len(messages) > MAX_MESSAGES:
-                messages.pop()
+                messages.pop(0)
+            messages.append({'text': input, 'user': user, 'date': date});
             del data['input']
 
         data['status'] = ''

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
        Mon Feb  6 22:36:10 2006
@@ -26,7 +26,7 @@
     }
 
     input {
-      border: 1px solid #000;
+      border: 1px solid #999;
       padding: 0.2em;
       margin: 0 1em 0 0;
       font: 15px verdana, arial, sans-serif;
@@ -38,7 +38,7 @@
 
     button {
       background-color: #efc;
-      border: 1px solid #009;
+      border: 1px solid #999;
       padding: 0.2em;
       margin: 0 1em 0 0;
       font: 15px arial, sans-serif;
@@ -59,7 +59,7 @@
       margin: 0.3em 0;
       margin-bottom: 1em;
       position: absolute;
-      top: 20px;
+      top: 40px;
       right: 20px;
     }
 
@@ -163,6 +163,7 @@
           text: "SEND!"
         });
         form.appendChild(button);
+
         Event.observe(form, "submit", this.changeEvent);
         Form.focusFirstElement(form);
       },
@@ -194,6 +195,13 @@
 
   <h1>CPSSkins: chat</h1>
 
+  <p>This chat application stores data in 4 different types of storages:
+     The user's input is sent to the remote server where all messages are
+     stored, the status message is stored in RAM on the client, while the 
user's
+     nickname is locally stored in a cookie.
+  </p>
+  <p>There are two main views: the chat area and the input form</p>
+
   <ins class="controller">
   {"id": "controller",
    "handlers": {
@@ -288,18 +296,18 @@
 
     <ins class="view">
     {"widget": {
-      "type": "inputbox"
+      "type": "chatbox"
      },
-     "model": "form",
-     "controller": "controller"
+     "model": "chat"
     }
     </ins>
 
     <ins class="view">
     {"widget": {
-      "type": "chatbox"
+      "type": "inputbox"
      },
-     "model": "chat"
+     "model": "form",
+     "controller": "controller"
     }
     </ins>
 
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to