Author: jmorliaguet
Date: Mon Jan  2 21:05:43 2006
New Revision: 2124

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

- added separators (<separator>)



Modified: cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.css
==============================================================================
--- cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.css        
(original)
+++ cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.css        Mon Jan 
 2 21:05:43 2006
@@ -34,6 +34,11 @@
   width: 86px;
 }
 
+.contextMenu .separator {
+  border-bottom: 1px solid #ccc;
+  margin: 3px;
+}
+
 .contextMenu a.disabled {
   color: #ccc;
 }

Modified: cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js
==============================================================================
--- cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js (original)
+++ cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js Mon Jan  2 
21:05:43 2006
@@ -474,15 +474,27 @@
           break;
         };
 
+        case "separator": {
+          Canvas.addNode(container, {
+            tag: "div",
+            class: "separator"
+          });
+          break;
+        };
+
         case "submenu": {
-          if (disabled) break;
-          var item = Canvas.addNode(container, {
+          var options = {
             tag: "a",
+            class: "submenuitem",
             content: tag.getAttribute("label"),
             style: {display: "block"},
-            class: "submenuitem",
             attributes: {href:"javascript:void(0)"}
-          });
+          };
+
+          if (disabled) { options.class = "disabled"; }
+          var item = Canvas.addNode(container, options);
+
+          if (disabled) break;
 
           var submenu = Canvas.addNode(item, {
             tag: "div",

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
  Mon Jan  2 21:05:43 2006
@@ -26,11 +26,15 @@
       <item label="Edit" icon="edit.png" action="edit"
             visible="editable"></item>
 
+      <separator></separator>
+
       <item label="Copy" icon="copy.png" action="copy"></item>
 
       <item label="Paste" icon="paste.png" action="paste"
             visible="editable"></item>
 
+      <separator></separator>
+
       <submenu label="Format" visible="formattable">
         <items action="format" choices="formats"></items>
         <submenu label="Size" visible="sizable">
@@ -42,6 +46,8 @@
         <items action="size" choices="sizes"></items>
       </submenu>
 
+      <separator></separator>
+
       <item label="Delete" icon="delete.png" action="delete"
             visible="editable" confirm="Deleting, are you sure?"></item>
     </cpsskins:contextmenu>
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to