[Zope-CVS] CVS: Products/CompositePage/zmi - bottom.pt:1.1
header.pt:1.1 top.pt:1.1 zmi_edit.js:1.1
Shane Hathaway
shane at zope.com
Fri Sep 26 17:21:08 EDT 2003
Update of /cvs-repository/Products/CompositePage/zmi
In directory cvs.zope.org:/tmp/cvs-serv25375/zmi
Added Files:
bottom.pt header.pt top.pt zmi_edit.js
Log Message:
Added the CompositePage product.
CompositePage is like the PageDesign product, but simplified, and now based
on PDLib, a Javascript drag and drop / context menu library.
=== Added File Products/CompositePage/zmi/bottom.pt ===
<!-- zmi/bottom.pt -->
<div id="slot-element-context-menu" class="context-menu">
<div class="context-menu-item"
onmouseup="zmi_edit(pd_selected_item)"
filter="pd_selected_item">Edit...</div>
<div class="separator" filter="pd_selected_item"></div>
<div class="context-menu-item"
onmouseup="window.alert('Clipboard functions are not yet implemented.')"
filter="pd_selected_items">Copy</div>
<div class="context-menu-item"
onmouseup="window.alert('Clipboard functions are not yet implemented.')"
filter="pd_selected_items">Cut</div>
<div class="separator"></div>
<div class="context-menu-item" onmouseup="composite_delete(pd_selected_items)"
filter="pd_selected_items">Delete</div>
</div>
<div id="slot-target-context-menu" class="context-menu">
<div class="context-menu-item" onmouseup="zmi_add(pd_selected_item)"
filter="pd_selected_item">Add...</div>
<div class="context-menu-item"
onmouseup="window.alert('Clipboard functions are not yet implemented.')"
filter="pd_selected_item">Paste</div>
</div>
=== Added File Products/CompositePage/zmi/header.pt ===
<!-- zmi/header.pt -->
<tal:block tal:define="url options/transformer/absolute_url">
<link rel="stylesheet" type="text/css"
tal:attributes="href string:${root/absolute_url}/manage_page_style.css" />
<script type="text/javascript"
tal:attributes="src string:${url}/zmi_edit_js"></script>
<script type="text/javascript" tal:content="structure string:
var zmi_transformer_url = '${url}';
"></script>
</tal:block>
=== Added File Products/CompositePage/zmi/top.pt ===
<!-- zmi/top.pt -->
<div tal:replace="structure options/composite/manage_tabs"></div>
<br />
=== Added File Products/CompositePage/zmi/zmi_edit.js ===
// ZMI-specific editing scripts. Referenced by zmi/bottom.pt.
// The variable "zmi_transformer_url" is provided by zmi/header.pt.
function zmi_edit(element) {
var path = escape(element.getAttribute("source_path"));
document.location = zmi_transformer_url + "/showElement?path=" + path;
}
function zmi_add(target) {
// Note that target_index is also available, but the ZMI can't
// make use of it easily.
var path = escape(target.getAttribute("target_path"));
document.location = zmi_transformer_url + "/showSlot?path=" + path;
}
More information about the Zope-CVS
mailing list