[Zope-CVS] CVS: Products/PageDesign/www - movedown.gif:1.1.2.1 moveup.gif:1.1.2.1 remove.gif:1.1.2.1 object_list_rows.pt:1.1.2.2 pagedesign.css:1.1.1.1.2.5 scripts.js:1.2.2.4
Shane Hathaway
shane@cvs.zope.org
Fri, 9 Aug 2002 23:33:41 -0400
Update of /cvs-repository/Products/PageDesign/www
In directory cvs.zope.org:/tmp/cvs-serv3516/www
Modified Files:
Tag: page-redesign-branch
object_list_rows.pt pagedesign.css scripts.js
Added Files:
Tag: page-redesign-branch
movedown.gif moveup.gif remove.gif
Log Message:
Added the remove, move up, and move down controls for each slot element.
Made the element wrapper look consistent.
=== Added File Products/PageDesign/www/movedown.gif ===
<Binary-ish file>
=== Added File Products/PageDesign/www/moveup.gif ===
<Binary-ish file>
=== Added File Products/PageDesign/www/remove.gif ===
<Binary-ish file>
=== Products/PageDesign/www/object_list_rows.pt 1.1.2.1 => 1.1.2.2 ===
--- Products/PageDesign/www/object_list_rows.pt:1.1.2.1 Wed Aug 7 23:57:06 2002
+++ Products/PageDesign/www/object_list_rows.pt Fri Aug 9 23:33:41 2002
@@ -21,8 +21,8 @@
sort_on=column, sort_order=(sort_order == 'normal'
and 'reverse' or 'normal'))"><img border="0" tal:attributes="src
python: here.absolute_url() + '/' + (
- sort_order == 'normal' and 'sorted_down' or
- 'sorted_up')" /></a>
+ sort_order == 'normal' and 'sorted_down_icon' or
+ 'sorted_up_icon')" /></a>
</th>
</tr>
=== Products/PageDesign/www/pagedesign.css 1.1.1.1.2.4 => 1.1.1.1.2.5 ===
--- Products/PageDesign/www/pagedesign.css:1.1.1.1.2.4 Thu Aug 8 22:58:46 2002
+++ Products/PageDesign/www/pagedesign.css Fri Aug 9 23:33:41 2002
@@ -7,7 +7,7 @@
}
.design-element {
- border: 1px solid black;
+ border: 1px outset darkblue;
}
.design-element-titlebar {
@@ -15,6 +15,12 @@
color: #ffffff;
font-weight: bold;
text-align: left;
+ border: 1px outset darkblue;
+ border-spacing: 0px;
+}
+
+.design-element-body {
+ border: 1px inset darkblue;
}
.design-target {
=== Products/PageDesign/www/scripts.js 1.2.2.3 => 1.2.2.4 ===
--- Products/PageDesign/www/scripts.js:1.2.2.3 Tue Aug 6 22:37:22 2002
+++ Products/PageDesign/www/scripts.js Fri Aug 9 23:33:41 2002
@@ -17,6 +17,10 @@
var all_targets = [];
var design_url = ''; // Set by PageDesign outside this script
+var target_normal_border = "2px solid #eeeeee";
+var target_highlighted_border = "2px dotted red"
+var target_loading_border = "2px solid green";
+
function hasAncestor(node, ancestor) {
var p = node;
@@ -36,7 +40,7 @@
function unhighlightTarget() {
if (highlighted_target) {
- highlighted_target.style.border = "2px solid #eeeeee";
+ highlighted_target.style.border = target_normal_border;
highlighted_target = null;
}
}
@@ -47,7 +51,7 @@
e = event;
// e.stopPropagation();
unhighlightTarget();
- node.style.border = "2px dotted red";
+ node.style.border = target_highlighted_border;
highlighted_target = node;
}
@@ -65,8 +69,6 @@
function setupDrag(x, y) {
var i;
- var id_before=null;
- var id_after=null;
init_complete = true;
dragnode.style.left = x + 5;
@@ -75,18 +77,8 @@
dragnode.style.height = highlighted_element.offsetHeight - 2;
dragnode.style.display = "block";
- id_before = 'targets/' + highlighted_element.id;
- parts = String(highlighted_element.id).split('/', 2);
- if (parts.length == 2) {
- i = parseInt(parts[1]);
- id_after = 'targets/' + parts[0] + '/' + (i + 1);
- }
for (i = 0; i < all_targets.length; i++) {
node = all_targets[i];
- if (node.id == id_before || node.id == id_after) {
- // Don't let the user drag to the same spot.
- continue;
- }
if (hasAncestor(node, highlighted_element)) {
// Don't let the user drag an outer element to an inner target.
// If we allowed this, the item would just disappear unless
@@ -124,7 +116,7 @@
dragnode.style.display = "none";
if (highlighted_target) {
- highlighted_target.style.border = "2px solid green";
+ highlighted_target.style.border = target_loading_border;
document.location = ('moveElement' +
"?source_path=" + escape(highlighted_element.id) +
"&target_path=" + escape(highlighted_target.id));
@@ -141,13 +133,17 @@
function initDesignNodes(node) {
- if (node.className == "design-element") {
+ if (node.className == "design-element-body") {
+ if (!node.onclick) {
+ node.onclick = ignore;
+ }
+ }
+ else if (node.className == "design-element-titlebar") {
if (!node.onmousedown) {
function callDragElement(e) {
- dragElement(e, node);
+ dragElement(e, node.parentNode);
}
node.onmousedown = callDragElement;
- node.onclick = ignore;
}
}
else if (node.className == "design-target") {