[Zope-CVS] CVS: Products/CompositePage/manual - body.pt:1.5 manual.js:1.3 manual_styles.css:1.5

Shane Hathaway shane at zope.com
Tue Mar 2 18:40:48 EST 2004


Update of /cvs-repository/Products/CompositePage/manual
In directory cvs.zope.org:/tmp/cvs-serv25987/manual

Modified Files:
	body.pt manual.js manual_styles.css 
Log Message:
Template selection in the manual UI is now functional.


=== Products/CompositePage/manual/body.pt 1.4 => 1.5 ===
--- Products/CompositePage/manual/body.pt:1.4	Tue Mar  2 17:08:45 2004
+++ Products/CompositePage/manual/body.pt	Tue Mar  2 18:40:47 2004
@@ -55,7 +55,8 @@
      tal:content="structure element_info/error">Bad Element</span>
 </div>
 <div>
-<span tal:attributes="source_path element_info/source_path">
+<span tal:attributes="source_path element_info/source_path;
+     object_path element_info/source_path">
   <a href="#" onclick="manual_edit(this); return false;">edit</a> |
   <a href="#" onclick="manual_preview(this); return false;">preview</a>
   <span tal:condition="element_info/can_move_up"> |
@@ -71,9 +72,14 @@
 </span>
 </div>
 </td>
-<td valign="top" align="right" width="20%">
+<td valign="top" align="right" nowrap="nowrap">
 View:
-<select>
+<select tal:attributes="source_path element_info/source_path"
+   name="template" onchange="manual_changeView(this);">
+<option tal:repeat="template_info element_info/available_templates"
+  tal:content="template_info/title" tal:attributes="value template_info/id;
+  selected python: template_info['id'] == element_info['template']"
+  >Standard</option>
 </select>
 </td>
 </tr>


=== Products/CompositePage/manual/manual.js 1.2 => 1.3 ===
--- Products/CompositePage/manual/manual.js:1.2	Thu Feb 26 16:38:13 2004
+++ Products/CompositePage/manual/manual.js	Tue Mar  2 18:40:47 2004
@@ -114,3 +114,11 @@
   target = findTargetNode(target);
   composite_paste(target);
 }
+
+function manual_changeView(node) {
+  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;
+}


=== Products/CompositePage/manual/manual_styles.css 1.4 => 1.5 ===
--- Products/CompositePage/manual/manual_styles.css:1.4	Tue Mar  2 17:08:45 2004
+++ Products/CompositePage/manual/manual_styles.css	Tue Mar  2 18:40:47 2004
@@ -29,10 +29,6 @@
   padding-right: 0.5em;
 }
 
-.slot_element select, .slot_element_highlighted select {
-  margin-left: 1em;
-}
-
 .slot_element input, .slot_element_highlighted input {
   margin-right: 0.5em;
 }




More information about the Zope-CVS mailing list