Author: jmorliaguet
Date: Sun Jun  4 21:03:47 2006
New Revision: 3302

Added:
   cpsskins/branches/paris-sprint-2006/ui/screens/common/icons/noicon-16.png   
(contents, props changed)
Modified:
   cpsskins/branches/paris-sprint-2006/lib/cpsskins/src/cpsskins.css
   cpsskins/branches/paris-sprint-2006/lib/cpsskins/src/cpsskins.js
   cpsskins/branches/paris-sprint-2006/ui/screens/common/authoring.css
   cpsskins/branches/paris-sprint-2006/ui/screens/common/icons/configure.zcml
   cpsskins/branches/paris-sprint-2006/ui/screens/definitions.py

Log:

- cosmetic fixes in the context menu (arrow / noicon)



Modified: cpsskins/branches/paris-sprint-2006/lib/cpsskins/src/cpsskins.css
==============================================================================
--- cpsskins/branches/paris-sprint-2006/lib/cpsskins/src/cpsskins.css   
(original)
+++ cpsskins/branches/paris-sprint-2006/lib/cpsskins/src/cpsskins.css   Sun Jun 
 4 21:03:47 2006
@@ -73,12 +73,6 @@
   color: #fff;
 }
 
-.contextMenu a.submenuitem {
-  background-image: url(arrow.png);
-  background-repeat: no-repeat;
-  background-position: 95% center;
-}
-
 .contextMenu .submenu {
   background-color: #eeeeec;
   border-width: 1px 2px 2px 1px;

Modified: cpsskins/branches/paris-sprint-2006/lib/cpsskins/src/cpsskins.js
==============================================================================
--- cpsskins/branches/paris-sprint-2006/lib/cpsskins/src/cpsskins.js    
(original)
+++ cpsskins/branches/paris-sprint-2006/lib/cpsskins/src/cpsskins.js    Sun Jun 
 4 21:03:47 2006
@@ -2237,10 +2237,11 @@
       return node;
     }
     return null;
+
   },
 
   _renderFragment: function(container, fragment, data) {
-
+    var noicon = this.def.noicon;
     var createNode = CPSSkins.Canvas.createNode;
     fragment.items.each(function(item) {
       var type = item.type;
@@ -2249,9 +2250,7 @@
       if (data && visible) {
         if (!data[visible]) disabled = true;
       }
-
       switch (type) {
-
         case "item": {
           var options = {
             tag: 'a',
@@ -2262,30 +2261,24 @@
               href: 'javascript:void(0)'
             }
           }
-
           var confirm = item.confirm;
           if (confirm && !disabled) {
             options.attributes.confirm = confirm;
           }
-
           if (disabled) {
             options.attributes.disabled = true;
             options.classes.push("disabled");
           }
           var a = createNode(options);
-
-          var icon = disabled ? "noicon.png": (item.icon || "noicon.png");
+          var icon = disabled ? noicon: (item.icon || noicon);
           a.appendChild(createNode({
             tag: 'img',
             attributes: {src: icon, alt: '*'}
           }));
-
           container.appendChild(a);
           a.appendChild(document.createTextNode(item.label));
-
           break;
         };
-
         case "selection": {
           if (!data) return;
           var choices = item.choices;
@@ -2300,19 +2293,16 @@
               }
             }
             var a = createNode(options);
-
-            var icon = disabled ? "noicon.png": (item.icon || "noicon.png");
+            var icon = disabled ? noicon: (item.icon || noicon);
             a.appendChild(createNode({
               tag: 'img',
               attributes: {src: icon, alt: '*'}
             }));
-
             container.appendChild(a);
             a.appendChild(document.createTextNode(s.label));
           });
           break;
         };
-
         case "separator": {
           var node = createNode({
             tag: 'div',
@@ -2321,7 +2311,6 @@
           container.appendChild(node);
           break;
         };
-
         case "submenu": {
           var options = {
             tag: 'a',
@@ -2329,23 +2318,16 @@
             style: {display: 'block'},
             attributes: {href: 'javascript:void(0)'}
           };
-
           if (disabled) { options.classes = "disabled"; }
           var submenuitem = container.appendChild(createNode(options));
-
-          var icon = item.icon || "noicon.png";
+          var icon = item.icon || noicon;
           submenuitem.appendChild(createNode({
             tag: 'img',
-            attributes: {
-              src: icon,
-              alt: '*'
-            }
+            attributes: {src: icon, alt: '*'}
           }));
-
           if (!this.submenuLeft) {
             this.submenuLeft = $(this.widget).getDimensions().width -2;
           }
-
           var submenu = createNode({
             tag: 'div',
             classes: 'submenu',
@@ -2358,9 +2340,7 @@
           });
           submenuitem.appendChild(document.createTextNode(item.label));
           submenuitem.appendChild(submenu);
-
           this._renderFragment(submenu, item, data);
-
           break;
         };
       }
@@ -2478,7 +2458,8 @@
       }
 
       var a = createNode(options);
-      var icon = disabled ? "noicon.png": (item.icon || "noicon.png");
+      var noicon = this.def.noicon;
+      var icon = disabled ? noicon: (item.icon || noicon);
       a.appendChild(createNode({
         tag: 'img',
         attributes: {src: icon, alt: '*', width: '16px', height: '16px'}

Modified: cpsskins/branches/paris-sprint-2006/ui/screens/common/authoring.css
==============================================================================
--- cpsskins/branches/paris-sprint-2006/ui/screens/common/authoring.css 
(original)
+++ cpsskins/branches/paris-sprint-2006/ui/screens/common/authoring.css Sun Jun 
 4 21:03:47 2006
@@ -306,6 +306,13 @@
 }
 
 a.back:hover {
-  background-color: #fcc;
-  color: #300;
+  background-color: #fce94f;
+  color: #600;
 }
+
+.contextMenu a.submenuitem {
+  background-image: url(++resource++li-16.png);
+  background-repeat: no-repeat;
+  background-position: 95% center;
+}
+

Modified: 
cpsskins/branches/paris-sprint-2006/ui/screens/common/icons/configure.zcml
==============================================================================
--- cpsskins/branches/paris-sprint-2006/ui/screens/common/icons/configure.zcml  
(original)
+++ cpsskins/branches/paris-sprint-2006/ui/screens/common/icons/configure.zcml  
Sun Jun  4 21:03:47 2006
@@ -3,6 +3,10 @@
     xmlns:zope="http://namespaces.zope.org/zope";>
 
   <resource
+      name="noicon-16.png" file="noicon-16.png"
+      layer="cpsskins.browser.skin.cpsskins" />
+
+  <resource
       name="edit-12.png" file="edit-12.png"
       layer="cpsskins.browser.skin.cpsskins" />
 

Added: cpsskins/branches/paris-sprint-2006/ui/screens/common/icons/noicon-16.png
==============================================================================
Binary file. No diff available.

Modified: cpsskins/branches/paris-sprint-2006/ui/screens/definitions.py
==============================================================================
--- cpsskins/branches/paris-sprint-2006/ui/screens/definitions.py       
(original)
+++ cpsskins/branches/paris-sprint-2006/ui/screens/definitions.py       Sun Jun 
 4 21:03:47 2006
@@ -459,6 +459,7 @@
     'context-menu': {
         'id': 'context-menu',
         'area': 'canvasArea',
+        'noicon': '++resource++noicon-16.png',
         'perspectives': ['page-designer', 'content-author'],
         'controllers': ['menu-actions', 'main-editor-perspectives',
                         'show-hide-menu'],
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to