[Zope3-checkins] CVS: Zope3/src/zope/app/browser/skins/rotterdam - onlinehelp.js:1.1 configure.zcml:1.14 template.pt:1.36

Roger Ineichen roger@projekt01.ch
Tue, 29 Jul 2003 18:36:32 -0400


Update of /cvs-repository/Zope3/src/zope/app/browser/skins/rotterdam
In directory cvs.zope.org:/tmp/cvs-serv9875

Modified Files:
	configure.zcml template.pt 
Added Files:
	onlinehelp.js 
Log Message:
Added popup link for Onlinehelp, 
move Onlinehelp part from rotterdam/template.pt to 
onlinehelp/template.pt Onlinehelp skin.

=== Added File Zope3/src/zope/app/browser/skins/rotterdam/onlinehelp.js ===
// popup for to open the OnlinHelp in a new window
function popup(page, name, settings) {
  win = window.open(page, name, settings);
  win.focus();
}

=== Zope3/src/zope/app/browser/skins/rotterdam/configure.zcml 1.13 => 1.14 ===
--- Zope3/src/zope/app/browser/skins/rotterdam/configure.zcml:1.13	Thu Jun 12 05:32:06 2003
+++ Zope3/src/zope/app/browser/skins/rotterdam/configure.zcml	Tue Jul 29 18:36:27 2003
@@ -12,6 +12,9 @@
 <browser:resource 
     name="xmltree.js" file="xmltree.js" layer="rotterdam" />
 
+<browser:resource 
+    name="onlinehelp.js" file="onlinehelp.js" layer="rotterdam" />
+    
  <browser:resource
     name="favicon.png" file="favicon.png" layer="rotterdam" />
 


=== Zope3/src/zope/app/browser/skins/rotterdam/template.pt 1.35 => 1.36 ===
--- Zope3/src/zope/app/browser/skins/rotterdam/template.pt:1.35	Sat Jul 26 09:09:43 2003
+++ Zope3/src/zope/app/browser/skins/rotterdam/template.pt	Tue Jul 29 18:36:27 2003
@@ -29,6 +29,11 @@
             tal:attributes="src string:${context/++resource++xmltree.js}" >
     </script>
 
+    <!-- Popup script for the OnlineHelp -->
+    <script type="text/javascript" src="onlinehelp.js"
+            tal:attributes="src string:${context/++resource++onlinehelp.js}" >
+    </script>
+
     <link rel="icon" type="image/png"
           tal:attributes="href context/++resource++favicon.png" />
   </head>
@@ -124,16 +129,43 @@
         </tal:block>
       </div>
 
-      <div id="actions"
-          tal:define="actions context/@@view_get_menu/zmi_actions"
-          tal:condition="actions"
-          metal:define-slot="tabs">
+      <!-- OnlineHelp with popup support like in zope2 -->
+      <div id="actions" 
+           tal:define="help_actions context/@@view_get_menu/help_actions;
+                       actions context/@@view_get_menu/zmi_actions"
+           metal:define-slot="tabs">
+        <span tal:condition="help_actions"
+              tal:repeat="help_info help_actions"
+              tal:omit-tag="">
+          <a href="#"
+               tal:define="url string:'${help_info/action}';
+                           name string:'OnlineHelp';
+                           settings string:'height=400
+                                           ,width=700
+                                           ,resizable=1
+                                           ,scrollbars=yes
+                                           ,location=yes
+                                           ,status=yes
+                                           ,toolbar=yes
+                                           ,menubar=yes'"
+               tal:attributes="href python:'javascript:popup('
+                                           + url + ',' 
+                                           + name + ','
+                                           + settings +')'"
+               tal:content="help_info/title">
+              Action name
+          </a>
+        </span>
+        <span tal:condition="actions"
+              tal:omit-tag="">
           <a href="#"
-               tal:attributes="href info/action"
                tal:repeat="info actions"
+               tal:attributes="href info/action"
                tal:content="info/title">
               Action name
-          </a>&nbsp;
+          </a>
+        </span>
+        &nbsp;
       </div>
 
       <div id="viewspace">