Author: jmorliaguet
Date: Tue Dec 27 16:28:49 2005
New Revision: 2088

Modified:
   
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/contextualmenus.css
   
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_contextualmenu_test.html
   
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_tooltip.html
   cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/tooltip.css
Log:

- more explicit XML for declaring widgets, controls ...



Modified: 
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/contextualmenus.css
==============================================================================
--- 
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/contextualmenus.css
        (original)
+++ 
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/contextualmenus.css
        Tue Dec 27 16:28:49 2005
@@ -46,7 +46,6 @@
 
 .contextMenu {
   position: absolute;
-  display: none;
   cursor: default;
   z-index: 2000;
   display: table;
@@ -64,8 +63,6 @@
 
 .contextMenu .submenu { 
   position: absolute;
-  top: auto;
-  left: auto;
   border-width: 1px 2px 2px 1px;
   border-style: solid;
   border-color: #333;
@@ -74,8 +71,6 @@
 
 .contextMenu .submenu a {
   background: #f6f3f3;
-  background-repeat: no-repeat;
-  background-position: 6px center;
 }
 
 .contextMenu .submenu a:hover {
@@ -83,10 +78,6 @@
   color: #fff;
 }
 
-.contextMenu .submenu > .items { /* ignored by IE */
-  margin-top: -20px;
-}
-
 
 .large {
   font: 11px Verdana, Arial, Helvetica, sans-serif;

Modified: 
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_contextualmenu_test.html
==============================================================================
--- 
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_contextualmenu_test.html
  (original)
+++ 
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_contextualmenu_test.html
  Tue Dec 27 16:28:49 2005
@@ -12,29 +12,13 @@
   <link rel="stylesheet" href="../test.css" type="text/css" />
   <link rel="stylesheet" href="contextualmenus.css" type="text/css" />
 
-  <script type="text/javascript">
-    function displayChoice(selected, choice) {
-      alert('You have clicked on "' + selected.getAttribute('id')
-            + '" and selected the "' + choice + '" menu item.');
-    }
-    var menu_actions = new CPSSkins.Controller('actions');
-    menu_actions.add({
-      'edit': displayChoice,
-      'copy': displayChoice,
-      'paste': displayChoice,
-      'format': displayChoice,
-      'delete': displayChoice,
-      });
-
-  </script>
-
 </head>
 
 <body>
 
   <h1>CPSSkins Contextual menus</h1>
 
-  <div id="message">...</div>
+  <pre id="message">...</pre>
 
   <div style="float: left; margin: 1em">
     <h2>Menu 1</h2>
@@ -53,29 +37,72 @@
   <div style="float: left; margin: 1em">
     <h2>Menu 2</h2>
     <div id="testArea2">
-      <div id="area6" class="pad" editable="1" formattable="1">area6</div>
+      <div id="area6" class="pad" editable="1" formattable="1"
+           targets="here:Paste here,above:Paste above"
+           formats="style:Style,widget:Widget">area6</div>
     </div>
   </div>
 
-  <cpsskins:contextmenu controller="actions" area="testArea1" class="large">
-    <item action="edit" visible="editable">Edit</item>
-    <item action="copy">Copy</item>
-    <item action="paste" visible="editable">Paste</item>
-    <item action="format" visible="format">Formattable</item>
-    <item action="delete" visible="editable"
-          confirm="Deleting, are you sure?">Delete</item>
-  </cpsskins:contextmenu>
+  <cpsskins:contextmenu
+      controller="controller"
+      area="testArea1"
+      class="large">
+
+    <item
+        label="Edit"
+        action="edit"
+        visible="editable"
+    />
+
+    <item
+        label="Copy"
+        action="copy"
+    />
+
+    <item
+        label="Paste"
+        action="paste"
+        visible="editable"
+    />
+
+    <submenu
+        label="Format"
+        visible="formattable">
+
+      <items
+          action="format"
+          choices="formats"
+      />
+
+    </submenu>
+
+    <item
+        label="Delete"
+        action="delete"
+        visible="editable"
+        confirm="Deleting, are you sure?"
+    />
 
-  <cpsskins:contextmenu controller="actions" area="testArea2" class="small">
-    <item action="edit" visible="editable">Edit</item>
-    <item action="copy">Copy</item>
-    <item action="paste" visible="editable">Paste</item>
-    <item action="format" visible="format">Formattable</item>
-    <item action="delete" visible="editable"
-          confirm="Deleting, are you sure?">Delete</item>
   </cpsskins:contextmenu>
 
 
+
+  <script type="text/javascript">
+    function displayChoice(selected, choice) {
+      alert('You have clicked on "' + selected.getAttribute('id')
+            + '" and selected the "' + choice + '" menu item.');
+    }
+
+    new CPSSkins.Controller('controller').register({
+      'edit': displayChoice,
+      'copy': displayChoice,
+      'paste': displayChoice,
+      'format': displayChoice,
+      'delete': displayChoice
+    });
+
+  </script>
+
 </body>
 
 </html>

Modified: 
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_tooltip.html
==============================================================================
--- 
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_tooltip.html
      (original)
+++ 
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_tooltip.html
      Tue Dec 27 16:28:49 2005
@@ -1,6 +1,6 @@
 <?xml version="1.0" ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
+ "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";>
@@ -9,13 +9,11 @@
   <meta http-equiv="content-type" content="text/html; charset=utf-8" />
   <script src="../../prototype.js" type="text/javascript"></script>
   <script src="../../cpsskins.js" type="text/javascript"></script>
-  <link rel="stylesheet" href="../test.css" type="text/css" />
   <link rel="stylesheet" href="tooltip.css" type="text/css" />
 </head>
-
 <body>
 
-  <h1>CPSSkins tooltips</h1>
+  <h1>CPSSkins tooltip</h1>
 
   <div id="area1">
     <a href="#" hint="Click here to open.">Open</a>
@@ -31,12 +29,13 @@
     <p>Delay: 100ms</p>
   </div>
 
-  <cpsskins:tooltip area="area1" delay="1500" class="tooltip1" text="hint">
+  <cpsskins:tooltip area="area1" delay="1500">
+    <div class="tooltip1">%(hint)</div>
   </cpsskins:tooltip>
 
-  <cpsskins:tooltip area="area2" delay="100" class="tooltip2" text="hint">
+  <cpsskins:tooltip area="area2" delay="100">
+    <div class="tooltip2">%(hint)</div>
   </cpsskins:tooltip>
 
 </body>
-
 </html>

Modified: 
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/tooltip.css
==============================================================================
--- 
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/tooltip.css    
    (original)
+++ 
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/tooltip.css    
    Tue Dec 27 16:28:49 2005
@@ -9,18 +9,23 @@
 
 .tooltip2 {
   padding: 0.8em;
-  background-color: #ddf;
-  border: 1px dotted #000;
+  background-color: #f3f3f9;
+  border-width: 1px 2px 2px 1px;
+  border-color: #666;
+  border-style: solid;
   font: italic 13px arial, sans-serif;
 }
 
 #area1 {
   margin: 1em;
+  padding: 2em;
   float: left;
+  border: 1px solid #ccc;
+  background: #f9f9f9;
 }
 
 #area1 a {
-  border: 1px solid #ccc;
+  border: 1px solid #999;
   text-decoration: none;
   padding: 0.1em 0.9em;
   margin: 0 0.2em;
@@ -30,14 +35,17 @@
 
 #area2 {
   margin: 1em;
+  padding: 2em;
   float: left;
+  border: 1px solid #ccc;
+  background: #f9f9f9;
 }
 
 #area2 a {
-  border: 1px solid #ccc;
+  border: 1px solid #999;
   text-decoration: none;
   padding: 0.1em 0.9em;
   margin: 0 0.2em;
   color: #000;
-  background-color: #fec;
+  background-color: #ffe;
 }
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to