Author: jmorliaguet
Date: Fri Feb 10 14:00:26 2006
New Revision: 2337

Added:
   
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_widget_templates.html
   (contents, props changed)
   cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/template.pt 
  (contents, props changed)
Log:

- added functional test for widget templates



Added: 
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_widget_templates.html
==============================================================================
--- (empty file)
+++ 
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_widget_templates.html
     Fri Feb 10 14:00:26 2006
@@ -0,0 +1,60 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
+<html xml:lang="en" lang="en"
+      xmlns="http://www.w3.org/1999/xhtml";>
+<head>
+  <title>CPSSkins Unit test file</title>
+  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+  <script src="../../prototype.js" type="text/javascript"></script>
+  <script src="../../json.js" type="text/javascript"></script>
+  <script src="../../ctal.js" type="text/javascript"></script>
+  <script src="../../cpsskins.js" type="text/javascript"></script>
+  <link rel="stylesheet" href="../../cpsskins.css" type="text/css" />
+
+  <style stype="text/css">
+  .frame {
+    background-color: #f9f3f3;
+    padding: 0.5em;
+    width: 250px;
+    border: 1px solid #999;
+    font: 1.3em arial, sans-serif;
+  }
+
+  .frame h2 {
+    border-bottom: 1px solid #000;
+  }
+  </style>
+
+</head>
+<body>
+
+  <h1>CPSSkins: view templates</h1>
+
+  <p>Widgets can be rendered using an external template.</p>
+
+  <p>CTAL templates are very similar to Zope Page Templates.</p>
+
+
+  <ins class="model">
+  {"id": "template-data",
+   "data": {
+     "test": {
+       "title": "Hello world"
+     }
+   },
+   "storage": {
+     "type": "ram"
+     }
+  }}
+  </ins>
+
+  <ins class="view">
+  {"widget": {
+     "template": "template.pt"
+   },
+   "model": "template-data"
+  }
+  </ins>
+
+</body>
+</html

Added: 
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/template.pt
==============================================================================
--- (empty file)
+++ 
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/template.pt    
    Fri Feb 10 14:00:26 2006
@@ -0,0 +1,8 @@
+
+<div class="frame">
+
+  <h2 ctal:content="test/title">The title comes here</h2>
+
+  <p>This paragraph comes from the template.</p>
+
+</div>
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to