[Zope-CVS] CVS: Products/CompositePage/cmf - bottom.pt:1.1
cmf_edit.js:1.1 header.pt:1.1
Shane Hathaway
shane at zope.com
Thu Oct 9 17:29:16 EDT 2003
Update of /cvs-repository/Products/CompositePage/cmf
In directory cvs.zope.org:/tmp/cvs-serv9150/cmf
Added Files:
bottom.pt cmf_edit.js header.pt
Log Message:
Added a basic CMF UI to composites.
Refactored the ZMI interface somewhat, moving common elements down.
=== Added File Products/CompositePage/cmf/bottom.pt ===
<!-- cmf/bottom.pt -->
<div id="slot-element-context-menu" class="context-menu">
<div class="context-menu-item"
onmouseup="cmf_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="cmf_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/cmf/cmf_edit.js ===
// CMF-specific editing scripts. Referenced by cmf/bottom.pt.
// The variable "transformer_url" is provided by common/header.pt.
function cmf_edit(element) {
var path = escape(element.getAttribute("source_path"));
window.top.document.location = transformer_url + "/showElement?path=" + path;
}
function cmf_add(target) {
// Note that target_index is also available.
var path = escape(target.getAttribute("target_path"));
window.top.document.location = transformer_url + "/showSlot?path=" + path;
}
=== Added File Products/CompositePage/cmf/header.pt ===
<!-- cmf/header.pt -->
<tal:block tal:define="url options/transformer/absolute_url">
<script type="text/javascript"
tal:attributes="src string:${url}/cmf_edit_js"></script>
</tal:block>
More information about the Zope-CVS
mailing list