[Zope-CVS] CVS: Products/CompositePage/common - edit.js:1.4 pdlib.js:1.4 pdstyles.css:1.4

Shane Hathaway shane at zope.com
Sat Dec 27 13:40:51 EST 2003


Update of /cvs-repository/Products/CompositePage/common
In directory cvs.zope.org:/tmp/cvs-serv4578/common

Modified Files:
	edit.js pdlib.js pdstyles.css 
Log Message:
Added a header to the context menus and began work on inline views.


=== Products/CompositePage/common/edit.js 1.3 => 1.4 ===
--- Products/CompositePage/common/edit.js:1.3	Mon Dec 22 15:21:14 2003
+++ Products/CompositePage/common/edit.js	Sat Dec 27 13:40:20 2003
@@ -59,18 +59,8 @@
   f.submit();
 }
 
-function composite_highlightTarget(node, state) {
-  if (state == 0)
-    node.style.className = "slot_target";
-  else if (state == 1)
-    node.style.className = "slot_target_active";
-  else if (state == 2)
-    node.style.className = "";
-}
-
-
 function setUpSlotTarget(node) {
-  pd_setupDropTarget(node, 0, composite_highlightTarget);
+  pd_setupDropTarget(node, 0);
   pd_setupContextMenu(node, 'slot-target-context-menu', null, true);
 }
 


=== Products/CompositePage/common/pdlib.js 1.3 => 1.4 ===
--- Products/CompositePage/common/pdlib.js:1.3	Fri Dec 26 14:00:33 2003
+++ Products/CompositePage/common/pdlib.js	Sat Dec 27 13:40:20 2003
@@ -22,6 +22,7 @@
 //   pd_selected_item
 //   pd_selected_items
 //   pd_library_version
+//   pd_filter_object
 //
 //   pd_stopEvent()
 //   pd_findEventTarget()
@@ -48,6 +49,7 @@
 var pd_node_setup = {};          // Object containing node setup functions
 var pd_max_contextmenu_width = 250; // Threshold for faulty browsers
 var pd_invisible_targets = [];   // A list of normally invisible drop targets
+var pd_filter_object = null;  // The object being filtered
 
 
 function pd_hasAncestor(node, ancestor) {
@@ -155,11 +157,12 @@
   if (node.getAttribute) {
     f = node.getAttribute("filter");
     if (f) {
+      pd_filter_object = node;
       enabled = eval(f);
-      if (enabled)
-        node.style.display = "";
-      else
+      if (!enabled)
         node.style.display = "none";
+      else if (node.style.display == "none")
+        node.style.display = "";
     }
   }
   for (i = 0; i < node.childNodes.length; i++)


=== Products/CompositePage/common/pdstyles.css 1.3 => 1.4 ===
--- Products/CompositePage/common/pdstyles.css:1.3	Mon Dec 22 12:28:10 2003
+++ Products/CompositePage/common/pdstyles.css	Sat Dec 27 13:40:20 2003
@@ -15,23 +15,15 @@
   z-index: 1000;
   visibility: hidden;
   display: table;
-  padding: 1px;
 }
 
-div.context-menu-item {
+div.context-menu-item, div.context-menu-item_highlighted {
   cursor: default;
-  padding-left: 10px;
-  padding-right: 10px;
-  padding-top: 2px;
-  padding-bottom: 2px;
+  padding: 1px 10px 1px 10px;
+  border: 1px solid #ddd;
 }
 
 div.context-menu-item_highlighted {
-  cursor: default;
-  padding-left: 10px;
-  padding-right: 10px;
-  padding-top: 2px;
-  padding-bottom: 2px;
   color: HighlightText;
   background-color: Highlight;
 }
@@ -39,4 +31,19 @@
 div.context-menu div.separator {
   border-top: 1px inset #ccc;
   border-bottom: 1px inset #ccc;
+}
+
+div.context-menu-header {
+  background-color: #999;
+  color: #000;
+  text-align: center;
+  font-weight: bold;
+  white-space: nowrap;
+  margin-bottom: 4px;
+  padding: 2px 4px 0px 4px;
+  cursor: default;
+}
+
+div.context-menu-header img {
+  margin-right: 6px;
 }




More information about the Zope-CVS mailing list