Author: jmorliaguet
Date: Tue Jan  3 16:48:55 2006
New Revision: 2129

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

- added a demo with contextual menus and panels



Added: 
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_demo.html
==============================================================================
--- (empty file)
+++ 
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_demo.html
 Tue Jan  3 16:48:55 2006
@@ -0,0 +1,109 @@
+<?xml version="1.0" ?>
+<!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";
+      xmlns:cpsskins=http://namespaces.zope.org/cpsskins";>
+<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="../../cpsskins.js" type="text/javascript"></script>
+  <link rel="stylesheet" href="../../cpsskins.css" type="text/css" />
+
+  <style type="text/css">
+    .panel {
+      padding: 1em;
+      margin: 2px;
+      border: 1px solid #999;
+    }
+  </style>
+</head>
+
+<body>
+
+  <h1>CPSSkins panels</h1>
+
+  <!-- json-data:
+  {"perspectives":[
+    {"choice":"site-designer","label":"Site designer"},
+    {"choice":"page-designer","label":"Page designer"},
+    {"choice":"layout-designer","label":"Layout designer"}
+   ]}
+  -->
+  <div id="editArea" style="border: 1px solid #ccc; padding: 2em; margin: 1em">
+
+  <cpsskins:contextmenu controller="controller">
+    <submenu label="Set perspective">
+      <items action="perspective" choices="perspectives"></item>
+    </submenu>
+  </cpsskins:contextmenu>
+
+  <table style="width:100%">
+    <tr style="vertical-align: top">
+      <td colspan="3">
+
+        <cpsskins:panel perspectives="page-designer,layout-designer"
+                        url="panel2.html">
+        </cpsskins:panel>
+
+        <cpsskins:panel perspectives="site-designer" url="panel4.html">
+        </cpsskins:panel>
+
+      </td>
+    </tr>
+
+    <tr style="vertical-align: top">
+      <td style="width: 20%">
+
+        <cpsskins:panel perspectives="page-designer" url="panel4.html">
+        </cpsskins:panel>
+
+        <cpsskins:panel perspectives="site-designer,layout-designer"
+                        url="panel3.html">
+        </cpsskins:panel>
+
+      </td>
+      <td syle="width: 60%">
+
+        <cpsskins:panel perspectives="page-designer" url="panel3.html">
+        </cpsskins:panel>
+
+
+        <cpsskins:panel perspectives="site-designer,page-designer" 
url="panel1.html">
+        </cpsskins:panel>
+
+      </td>
+      <td style="width: 20%">
+
+        <cpsskins:panel perspectives="site-designer,layout-designer"
+                        url="panel4.html">
+        </cpsskins:panel>
+
+        <cpsskins:panel perspectives="site-designer" url="panel3.html">
+        </cpsskins:panel>
+
+        <cpsskins:panel perspectives="page-designer" url="panel4.html">
+        </cpsskins:panel>
+      </td>
+
+    </tr>
+  </table>
+
+  </div>
+
+  <script type="text/javascript">
+    function setPerspective(selected, choice) {
+      CPSSkins.switchPerspective(choice);
+    }
+
+    new CPSSkins.Controller('controller').register({
+      'perspective': setPerspective
+    })
+
+  </script>
+
+</body>
+
+</html>
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to