[Zope-CVS] CVS: Products/CompositePage/manual -
add_rollover.gif:1.1 copy_rollover.gif:1.1
cut_rollover.gif:1.1 paste_rollover.gif:1.1
remove_rollover.gif:1.1 body.pt:1.10 manual.js:1.5
Shane Hathaway
shane at zope.com
Tue Mar 16 10:33:09 EST 2004
Update of /cvs-repository/Products/CompositePage/manual
In directory cvs.zope.org:/tmp/cvs-serv31588/manual
Modified Files:
body.pt manual.js
Added Files:
add_rollover.gif copy_rollover.gif cut_rollover.gif
paste_rollover.gif remove_rollover.gif
Log Message:
Various manual UI fixes.
- Use POST to change templates
- Use the correct URL of the composite tool
- Rollovers
=== Added File Products/CompositePage/manual/add_rollover.gif ===
<Binary-ish file>
=== Added File Products/CompositePage/manual/copy_rollover.gif ===
<Binary-ish file>
=== Added File Products/CompositePage/manual/cut_rollover.gif ===
<Binary-ish file>
=== Added File Products/CompositePage/manual/paste_rollover.gif ===
<Binary-ish file>
=== Added File Products/CompositePage/manual/remove_rollover.gif ===
<Binary-ish file>
=== Products/CompositePage/manual/body.pt 1.9 => 1.10 ===
--- Products/CompositePage/manual/body.pt:1.9 Mon Mar 15 08:33:12 2004
+++ Products/CompositePage/manual/body.pt Tue Mar 16 10:33:07 2004
@@ -13,19 +13,24 @@
tal:define="ui_url options/ui/absolute_url">
<a href="#" onclick="manual_add(this.parentNode); return false;"
><img tal:attributes="src string:${ui_url}/add_icon" align="center"
- alt="Add" title="Add" /></a>
- <a href="#" onclick="manual_delete(); return false;"
+ onmouseover="rollover(this);" onmouseout="rollout(this);"
+ alt="Add" title="Add" /></a><a
+ href="#" onclick="manual_delete(); return false;"
><img tal:attributes="src string:${ui_url}/remove_icon" align="center"
- alt="Remove" title="Remove" /></a>
- <a href="#" onclick="manual_copy(); return false;"
+ onmouseover="rollover(this);" onmouseout="rollout(this);"
+ alt="Remove" title="Remove" /></a><a
+ href="#" onclick="manual_copy(); return false;"
><img tal:attributes="src string:${ui_url}/copy_icon" align="center"
- alt="Copy" title="Copy" /></a>
- <a href="#" onclick="manual_cut(); return false;"
+ onmouseover="rollover(this);" onmouseout="rollout(this);"
+ alt="Copy" title="Copy" /></a><a
+ href="#" onclick="manual_cut(); return false;"
><img tal:attributes="src string:${ui_url}/cut_icon" align="center"
- alt="Cut" title="Cut" /></a>
- <tal:block tal:condition="request/__cp|nothing">
- <a href="#" onclick="manual_paste(this.parentNode); return false;"
+ onmouseover="rollover(this);" onmouseout="rollout(this);"
+ alt="Cut" title="Cut" /></a><tal:block
+ tal:condition="request/__cp|nothing"><a
+ href="#" onclick="manual_paste(this.parentNode); return false;"
><img tal:attributes="src string:${ui_url}/paste_icon" align="center"
+ onmouseover="rollover(this);" onmouseout="rollout(this);"
alt="Paste" title="Paste" /></a>
</tal:block>
</span>
@@ -44,12 +49,12 @@
target_index element_info/index"></td>
</tr>
<tr>
-<td valign="top" width="0%">
+<td valign="top" width="1%">
<input type="checkbox" name="source_paths:list"
tal:attributes="value element_info/source_path;
source_path element_info/source_path" />
</td>
-<td width="80%">
+<td width="60%">
<div>
<img tal:condition="element_info/icon"
tal:attributes="src element_info/icon"
@@ -75,7 +80,7 @@
</span>
</div>
</td>
-<td valign="top" align="right" nowrap="nowrap">
+<td valign="top" align="right">
View:
<select tal:attributes="source_path element_info/source_path"
name="template" onchange="manual_changeTemplate(this);">
@@ -109,15 +114,6 @@
<tr>
<td class="slot_bottom">
-<!--span target_index="0" tal:attributes="target_path slot_info/target_path">
- <a href="#" onclick="manual_add(this); return false;">Add</a> |
- <a href="#" onclick="manual_delete(); return false;">Remove</a> |
- <a href="#" onclick="manual_copy(); return false;">Copy</a> |
- <a href="#" onclick="manual_cut(); return false;">Cut</a>
- <tal:block tal:condition="request/__cp|nothing"> |
- <a href="#" onclick="manual_paste(this); return false;">Paste</a>
- </tal:block>
-</span-->
</td>
</tr>
=== Products/CompositePage/manual/manual.js 1.4 => 1.5 ===
--- Products/CompositePage/manual/manual.js:1.4 Wed Mar 3 11:06:22 2004
+++ Products/CompositePage/manual/manual.js Tue Mar 16 10:33:07 2004
@@ -75,7 +75,6 @@
target = findTargetNode(target);
var path = target.getAttribute("target_path");
var index = target.getAttribute("target_index");
- //window.top.document.location = transformer_url + "/showSlot?path=" + path;
var url = ui_url + '/add_element_dialog?target_path=' + escape(path);
if (index) {
url = url + '&target_index=' + escape(index);
@@ -116,9 +115,21 @@
}
function manual_changeTemplate(node) {
+ var f = document.forms.changeTemplate;
var element = findSourceNode(node);
- var path = escape(element.getAttribute("source_path"));
- var url = ui_url + "/changeTemplate?reload=y&paths=" + path;
- url = url + '&template=' + node.options[node.selectedIndex].value;
- window.top.document.location = url;
+ f.elements.paths.value = element.getAttribute("source_path");
+ f.elements.template.value = node.options[node.selectedIndex].value;
+ f.submit();
+}
+
+function rollover(node) {
+ var src = node.src;
+ if (src && src.substr(src.length - 5) == "_icon")
+ node.src = src.substr(0, src.length - 5) + "_rollover";
+}
+
+function rollout(node) {
+ var src = node.src;
+ if (src && src.substr(src.length - 9) == "_rollover")
+ node.src = src.substr(0, src.length - 9) + "_icon";
}
More information about the Zope-CVS
mailing list