[Zope3-checkins] CVS: Products3/NewsSite/skins/newssite - __init__.py:1.1 __init__.pyc:1.1 configure.zcml:1.1 copy_of_template.pt:1.1 dialog_macros.pt:1.1 folder_contents.pt:1.1 logo.gif:1.1 mi.gif:1.1 pl.gif:1.1 standardmacros.py:1.1 standardmacros.pyc:1.1 template.pt:1.1 view_macros.pt:1.1 xmltree.js:1.1 zope3.css:1.1 zope3logo.gif:1.1

Axel Bringenberg A.Bringenberg@srz-berlin.de
Thu, 27 Mar 2003 10:04:05 -0500


Update of /cvs-repository/Products3/NewsSite/skins/newssite
In directory cvs.zope.org:/tmp/cvs-serv24908

Added Files:
	__init__.py __init__.pyc configure.zcml copy_of_template.pt 
	dialog_macros.pt folder_contents.pt logo.gif mi.gif pl.gif 
	standardmacros.py standardmacros.pyc template.pt 
	view_macros.pt xmltree.js zope3.css zope3logo.gif 
Log Message:
 - added skin


=== Added File Products3/NewsSite/skins/newssite/__init__.py ===


=== Added File Products3/NewsSite/skins/newssite/__init__.pyc ===
  <Binary-ish file>

=== Added File Products3/NewsSite/skins/newssite/configure.zcml ===
<zopeConfigure
   xmlns='http://namespaces.zope.org/zope'
   xmlns:browser='http://namespaces.zope.org/browser'
>

<browser:resource 
    name="zope3.css" file="zope3.css" layer="newssite" />

<browser:resource
    name="xmltree.js" file="xmltree.js" layer="newssite" />

<browser:resource
    name="zope3logo.gif" file="zope3logo.gif" layer="newssite" />

<browser:resource
    name="logo.gif" file="logo.gif" layer="newssite" />

<browser:resource
    name="pl.gif" file="pl.gif" layer="newssite" />

<browser:resource
    name="mi.gif" file="mi.gif" layer="newssite" />
 
 
<!-- below overrides the standard_macros by Rotterdam Skin -->
<browser:page
    for="*"
    name="standard_macros"
    permission="zope.View"
    class=".standardmacros.StandardMacros"
    layer="newssite"
    allowed_interface="zope.interface.common.mapping.IItemMapping"
    />

<browser:page
    for="*"
    name="skin_macros"
    permission="zope.View"
    layer="newssite"
    template="template.pt"
    />
 
<browser:page
    for="*"
    name="view_macros"
    permission="zope.View"
    layer="newssite"
    template="view_macros.pt" />

<browser:page
    for="*"
    name="dialog_macros"
    permission="zope.View"
    layer="newssite"
    template="dialog_macros.pt" />

<browser:page
    name="contents.html"
    for="zope.app.interfaces.content.folder.IFolder"
    permission="zope.ManageContent"
    layer="newssite"
    class="zope.app.browser.container.contents.Contents"
    template="folder_contents.pt"
    />
  
</zopeConfigure>


=== Added File Products3/NewsSite/skins/newssite/copy_of_template.pt ===
<metal:block define-macro="page"><metal:block define-slot="doctype"><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"></metal:block>
<html xmlns="http://www.w3.org/1999/xhtml"
  xml:lang="en"
  lang="en">

<head>
    <title metal:define-slot="title">Z3 UI</title>


    <style type="text/css" 
           media="all"
           tal:content=
           "string: @import url(${context/++resource++zope3.css});"
           >
      @import url(zope3.css);
    </style>
	
    <meta http-equiv="Content-Type"
          content="text/html;charset=utf-8" />

    <metal:block define-slot="headers" />
    <metal:block define-slot="style_slot" />
    <metal:block define-slot="ecmascript_slot" />

    <script type="text/javascript" src="xmltree.js" 
            tal:attributes="src string:${context/++resource++xmltree.js}"></script>
</head>

<body onload="loadtree('');"
        tal:define="rooturl     request/getApplicationURL;
                    thisbaseurl request/URL/-1;
                    "
        tal:attributes="
          onload string:loadtree('${rooturl}/', '${thisbaseurl}/');
          " 
        >

    <div id="global">
        <img tal:attributes="src context/++resource++zope3logo.gif" />
    </div>


    <div id="personal">

  		<div id="userDetails">

        <metal:block define-macro="logged_user">
          User:
          <tal:block replace="request/user/getTitle">
            User
          </tal:block>
        </metal:block>
  		
  		</div>

      [Personalized Elements]

    </div>

    <div id="navigators">

      <div class="box" id="navigationTree">

        <h4>Navigation</h4>

        <div 
          xmlns="http://www.zope.org/zope3xmltree"
          id="navtreecontents" 
          class="body" 
          onclick="treeclicked(event);" 
          >Loading...
        </div>

      </div>

      <div class="box" id="commonTasks"
           tal:define="view context/@@commonTasks|nothing"
           tal:condition="view/strip|nothing">

        <h4>Common Tasks</h4>

        <div class="body">

              <span tal:replace="structure view" />

        </div>

      </div>

    </div>


    <div id="workspace">

        <div class="itemViews"
             metal:define-slot="tabs">

        <tal:block repeat="view context/@@view_get_menu/zmi_views">

          <a href="" 
            tal:attributes="href view/action;
                            class view/selected;" 
            tal:content="view/title">

            label

          </a>

        </tal:block>

      </div>
			
      <div id="actions"
          tal:define="actions context/@@view_get_menu/zmi_actions"
          tal:condition="actions"
          metal:define-slot="tabs">
          <a href="#" 
               tal:attributes="href info/action" 
               tal:repeat="info actions"
               tal:content="info/title">
              Action name
          </a>&nbsp;
      </div>
			
      <div id="viewspace">

        <div id="breadcrumbs"
         metal:define-macro="breadcrumbs"
         > Location:&nbsp;<tal:block
             repeat="breadcrumb context/@@absolute_url/breadcrumbs"
            ><a href=""
                tal:condition="repeat/breadcrumb/start"
                tal:content="string:[top]"
                tal:attributes="
                href string:${breadcrumb/url}/@@SelectedManagementView.html"
                >XXX should not hardcode root folder name string</a
               ><a href=""
                   tal:condition="not:repeat/breadcrumb/start"
                   tal:content="string:${breadcrumb/name}"
                   tal:attributes="
                   href string:${breadcrumb/url}/@@SelectedManagementView.html"
                    >breadcrumb item</a> / </tal:block>
  		  </div>
		
      <div metal:define-slot="message" id="message">

      </div>

      <div id="content">
      <metal:block define-slot="body">

      <table class="listing">
	<thead>
	<th>Test</th>
	<th>Another</th>
	</thead>
	<tbody>
	<tr>
	  <td>content</td>
	  <td>thingy</td>
	</tr>
	<tr class="even">
	  <td>more</td>
	  <td>data</td>
	</tr>
	</tbody>
      </table>
      </metal:block>
      </div>

      <div id="context_information">

      <div id="helpers">

        <div class="box" id="itemHelp" tal:condition="pagetip|nothing">

          <h4>Tip</h4>

          <div class="body">

            <div class="content odd">

              <metal:block define-slot="pagetip" tal:replace="pagetip">
                A short tip goes here              
              </metal:block>

            </div>

          </div>

        </div>

      </div>

      <div id="inspectors">

       <div class="box" id="metadata"
	  tal:define="view context/@@MetaDataBox|nothing"
	  tal:condition="view/strip|nothing">

          <h4>Metadata</h4>

          <div class="body">
					
	  <div class="content" tal:content="structure view">
	  Some metadata
	  </div>
	  
	</div>
       </div>
     </div>
    </div>      

    <div class="spacer">
	  &nbsp;
    </div>

   </div>

   <div class="box" id="help" 
	  tal:define="results view/@@find_help_topics|nothing"
	  tal:condition="results">
	  <h4>Online Help</h4>
          <div class="body">
            <a href="#" 
                tal:repeat="entry results"
		            tal:attributes="href entry/url">
              <div tal:define="oddrow repeat/entry/odd"
                  tal:attributes="class python:oddrow and 'even' or 'odd'"
                  tal:content="entry/topic/title">Topic Title
              </div>
            </a>
	  </div>
        </div>

    </div>
    <div id="footer"
      metal:define-macro="footer">
    </div>
   <div id="logger" />

</body>

</html>

</metal:block>



=== Added File Products3/NewsSite/skins/newssite/dialog_macros.pt ===
<metal:block define-macro="dialog"><metal:block define-slot="doctype"><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"></metal:block>

<html
  xmlns="http://www.w3.org/1999/xhtml"
  xml:lang="en"
  lang="en" >

  <head>
    <!-- Waaa -->
    <title metal:define-slot="title">Z3 UI</title>


    <style type="text/css" 
           media="all"
           tal:content=
           "string: @import url(${context/++resource++zope3.css});"
           >
      @import url(zope3.css);
    </style>

    <metal:block define-slot="headers" />
    <metal:block define-slot="style_slot" />
    <metal:block define-slot="ecmascript_slot" />

    <script type="text/javascript" src="xmltree.js" 
            tal:attributes="src string:${context/++resource++xmltree.js}"
            ></script>
  </head>

  <body onload="loadtree('');"
        tal:define="rooturl     request/getApplicationURL;
                    thisbaseurl request/URL/-1;
                    "
        tal:attributes="
          onload string:loadtree('${rooturl}/', '${thisbaseurl}/');
          " 
        >

    <div id="global">
        <img tal:attributes="src context/++resource++zope3logo.gif" />
    </div>

    <div id="personal">

      <metal:block define-macro="logged_user">
        User:
        <tal:block replace="request/user/getTitle">
          User
        </tal:block>
      </metal:block>

      (Personal elements)
    </div>


    <div id="navigators">

      <div class="box" id="navigationTree">

        <h4>Navigation</h4>

        <div 
          xmlns="http://www.zope.org/zope3xmltree"
          id="navtreecontents" 
          class="body" 
          onclick="treeclicked(event);" 
          onmouseover="mouseOverTree(event);"
          onmouseout="mouseOutTree(event);"
          >
        </div>

      </div>
    </div>

    <div id="content">


      <div class="itemViewsBar">
      &nbsp;
      </div>

      <div class="item">

        <metal:block define-slot="body">

            <table class="listing">

              <thead>

                <th>Test</th>
                <th>Another</th>

              </thead>


              <tbody>

                <tr>

                  <td>content</td>
                  <td>thingy</td>

                </tr>


                <tr class="even">

                  <td>more</td>
                  <td>data</td>

                </tr>

              </tbody>

            </table>
        </metal:block>
        </div>

    </div>


    <div id="context_information">

    <div id="helpers">

      <div class="box" id="itemHelp" tal:condition="pagetip|nothing">

        <h4>Tip</h4>

        <div class="body">

          <div class="content odd">

            <metal:block define-slot="pagetip" tal:replace="pagetip">
              A short tip goes here              
            </metal:block>

          </div>

        </div>

      </div>

    </div>



    </div>


    <div id="footer"
      metal:define-macro="footer">
      Powered by Zope
    </div>


  </body>

</html>

</metal:block>




=== Added File Products3/NewsSite/skins/newssite/folder_contents.pt ===
<html metal:use-macro="views/standard_macros/page">
<head>
<style metal:fill-slot="headers" type="text/css">
</style>
</head>
<body>
<div metal:fill-slot="commonTasks">
Add new content:<br>
    <tal:block repeat="info context/@@+/addingInfo">
    <a href="#"
       tal:attributes="href string:${request/getURL}?type_name=${info/action};
                       class info/selected" >
    <div tal:define="oddrow repeat/info/odd"
                tal:attributes="class python:oddrow and 'even' or 'odd'; value info/id|default"
            tal:content="info/title">Folder
    </div>
    </a>
    </tal:block>

</div>
<div metal:fill-slot="body">
<div metal:define-macro="contents">

      <table id="sortable" class="listing" summary="Content listing"
             tal:condition="request/type_name|nothing"
             tal:define="container_contents view/listContentInfo"
             >
    
        <thead> 
          <tr>
            <th>&nbsp;</th>
            <th>Name</th>
            <th>Title</th>
            <th>Size</th>
            <th>Created</th>
            <th>Modified</th>
          </tr>
        </thead>

        <tbody>
          <tr>
          <td></td>
          <td>
          <form name="addForm" action="+/action.html" method="POST">
            <input type="hidden" name="type_name" 
                   tal:attributes="value request/type_name">
            <input name="id" value="">
          </form>
          </td>
          <td></td>
          <td></td>
          <td></td>
          </tr>

          <metal:block tal:repeat="item container_contents">
            <tr tal:define="oddrow repeat/item/odd; url item/url"
                tal:attributes="class python:oddrow and 'even' or 'odd'" > 
              <td>
                <input type="checkbox" class="noborder" name="ids:list" id="#"
                       value="#"
                       tal:attributes="value item/id;
                                       id python: 'cb_'+item['id'];
                                       checked request/ids_checked|nothing;"/>
              </td>
              <td> 
                <a href="#" 
                   tal:attributes="href 
                                   string:${url}/@@SelectedManagementView.html"
                   tal:content="structure item/icon|default"
                   >
                </a> 
                <a href="#" 
                   tal:attributes="href 
                                   string:${url}/@@SelectedManagementView.html"
                   tal:content="item/id"
                   >foo</a> 
              </td>
              <td><span tal:content="item/title|default">&nbsp;</span></td>
              <td><span tal:attributes="size item/size/sizeForSorting"
                        tal:content="item/size/sizeForDisplay">&nbsp;</span></td>
              <td><span tal:define="created item/created|default"
                        tal:content="created">&nbsp;</span></td>
              <td><span tal:define="modified item/modified|default"
                        tal:content="modified">&nbsp;</span></td>
            </tr>
          </metal:block>

        </tbody> 
      </table>

      <script tal:condition="request/type_name|nothing"><!--
          prettydump('focus', LG_INFO);
          document.addForm.id.focus();
          //-->
      </script>


  <form name="containerContentsForm" method="get" action="." 
        tal:condition="not:request/type_name|nothing"
        tal:define="container_contents view/listContentInfo"
        >


      <table id="sortable" class="listing" summary="Content listing"
             metal:define-macro="contents_table"
             >
    
        <thead> 
          <tr>
            <th>&nbsp;</th>
            <th>Name</th>
            <th>Title</th>
            <th>Size</th>
            <th>Created</th>
            <th>Modified</th>
          </tr>
        </thead>

        <tbody>

        <metal:block tal:repeat="item container_contents">
          <tr tal:define="oddrow repeat/item/odd; url item/url"
              tal:attributes="class python:oddrow and 'even' or 'odd'" > 
            <td>
              <input type="checkbox" class="noborder" name="ids:list" id="#"
                     value="#"
                     tal:attributes="value item/id;
                                     id python: 'cb_'+item['id'];
                                     checked request/ids_checked|nothing;"/>
            </td>
            <td> 
              <a href="#" 
                 tal:attributes="href 
                                 string:${url}/@@SelectedManagementView.html"
                 tal:content="structure item/icon|default"
                 >
              </a> 
              <a href="#" 
                 tal:attributes="href 
                                 string:${url}/@@SelectedManagementView.html"
                 tal:content="item/id"
                 >foo</a> 
            </td>
            <td><span tal:content="item/title|default">&nbsp;</span></td>
            <td><span tal:attributes="size item/size/sizeForSorting"
                      tal:content="item/size/sizeForDisplay">&nbsp;</span></td>
            <td><span tal:define="created item/created|default"
                      tal:content="created">&nbsp;</span></td>
            <td><span tal:define="modified item/modified|default"
                      tal:content="modified">&nbsp;</span></td>
          </tr>
        </metal:block>

        </tbody> 
      </table>

      <input type="submit" name="@@rename.html:method" value="Rename" />
      <input type="submit" name="@@cutObjects.html:method" value="Cut"/>
      <input type="submit" name="@@copyObjects.html:method" value="Copy"/>
      <input type="submit" name="@@pasteObjects.html:method" value="Paste"
             tal:condition="view/hasClipboardContents" />
      <input type="submit" name="@@removeObjects.html:method" value="Delete"/>

  </form>

</div>

</div>
</body>
</html>






=== Added File Products3/NewsSite/skins/newssite/logo.gif ===
  <Binary-ish file>

=== Added File Products3/NewsSite/skins/newssite/mi.gif ===
  <Binary-ish file>

=== Added File Products3/NewsSite/skins/newssite/pl.gif ===
  <Binary-ish file>

=== Added File Products3/NewsSite/skins/newssite/standardmacros.py ===
from zope.app.browser.skins.basic.standardmacros import StandardMacros

BaseMacros = StandardMacros

class StandardMacros(BaseMacros):
    __implements__ = BaseMacros.__implements__
    macro_pages = ('skin_macros', 'view_macros', 'dialog_macros')



=== Added File Products3/NewsSite/skins/newssite/standardmacros.pyc ===
  <Binary-ish file>

=== Added File Products3/NewsSite/skins/newssite/template.pt ===
<metal:block define-macro="page"><metal:block define-slot="doctype"><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"></metal:block>
<html xmlns="http://www.w3.org/1999/xhtml"
  xml:lang="en"
  lang="en">

<head>
    <title metal:define-slot="title">Z3 UI</title>


    <style type="text/css" 
           media="all"
           tal:content=
           "string: @import url(${context/++resource++zope3.css});"
           >
      @import url(zope3.css);
    </style>
	
    <meta http-equiv="Content-Type"
          content="text/html;charset=utf-8" />

    <metal:block define-slot="headers" />
    <metal:block define-slot="style_slot" />
    <metal:block define-slot="ecmascript_slot" />

    <script type="text/javascript" src="xmltree.js" 
            tal:attributes="src string:${context/++resource++xmltree.js}"></script>
</head>

<body onload="loadtree('');"
        tal:define="rooturl     request/getApplicationURL;
                    thisbaseurl request/URL/-1;
                    "
        tal:attributes="
          onload string:loadtree('${rooturl}/', '${thisbaseurl}/');
          " 
        >

    <!-- div id="global">
        <img tal:attributes="src context/++resource++zope3logo.gif" />
    </div -->


    <!-- div id="personal">

  		<div id="userDetails">

        <metal:block define-macro="logged_user">
          User:
          <tal:block replace="request/user/getTitle">
            User
          </tal:block>
        </metal:block>
  		
  		</div>

      [Personalized Elements]

    </div -->

    <!-- div id="navigators">

      <div class="box" id="navigationTree">

        <h4>Navigation</h4>

        <div 
          xmlns="http://www.zope.org/zope3xmltree"
          id="navtreecontents" 
          class="body" 
          onclick="treeclicked(event);" 
          >Loading...
        </div>

      </div>


    </div -->

    <div id="workspace">

        <div class="itemViews"
             metal:define-slot="tabs">

        <tal:block repeat="view context/@@view_get_menu/zmi_views">

          <a href="" 
            tal:attributes="href view/action;
                            class view/selected;" 
            tal:content="view/title">

            label

          </a>

        </tal:block>

      </div>
			
      <div id="actions"
          tal:define="actions context/@@view_get_menu/zmi_actions"
          tal:condition="actions"
          metal:define-slot="tabs">
          <a href="#" 
               tal:attributes="href info/action" 
               tal:repeat="info actions"
               tal:content="info/title">
              Action name
          </a>&nbsp;
      </div>
			
      <div id="viewspace">

        <div id="breadcrumbs"
         metal:define-macro="breadcrumbs"
         > Location:&nbsp;<tal:block
             repeat="breadcrumb context/@@absolute_url/breadcrumbs"
            ><a href=""
                tal:condition="repeat/breadcrumb/start"
                tal:content="string:[top]"
                tal:attributes="
                href string:${breadcrumb/url}/@@SelectedManagementView.html"
                >XXX should not hardcode root folder name string</a
               ><a href=""
                   tal:condition="not:repeat/breadcrumb/start"
                   tal:content="string:${breadcrumb/name}"
                   tal:attributes="
                   href string:${breadcrumb/url}/@@SelectedManagementView.html"
                    >breadcrumb item</a> / </tal:block>
  		  </div>
		
      <div metal:define-slot="message" id="message">

      </div>

      <div id="content">
      <metal:block define-slot="body">

      <table class="listing">
	<thead>
	<th>Test</th>
	<th>Another</th>
	</thead>
	<tbody>
	<tr>
	  <td>content</td>
	  <td>thingy</td>
	</tr>
	<tr class="even">
	  <td>more</td>
	  <td>data</td>
	</tr>
	</tbody>
      </table>
      </metal:block>
      </div>

      <div id="context_information">

      <div id="helpers">

        <div class="box" id="itemHelp" tal:condition="pagetip|nothing">

          <h4>Tip</h4>

          <div class="body">

            <div class="content odd">

              <metal:block define-slot="pagetip" tal:replace="pagetip">
                A short tip goes here              
              </metal:block>

            </div>

          </div>

        </div>

      </div>

      <!-- div id="inspectors">

       <div class="box" id="metadata"
	  tal:define="view context/@@MetaDataBox|nothing"
	  tal:condition="view/strip|nothing">

          <h4>Metadata</h4>

          <div class="body">
					
	  <div class="content" tal:content="structure view">
	  Some metadata
	  </div>
	  
	</div>
       </div>
     </div -->
    </div>      

    <div class="spacer">
	  &nbsp;
    </div>

   </div>

   <div class="box" id="help" 
	  tal:define="results view/@@find_help_topics|nothing"
	  tal:condition="results">
	  <h4>Online Help</h4>
          <div class="body">
            <a href="#" 
                tal:repeat="entry results"
		            tal:attributes="href entry/url">
              <div tal:define="oddrow repeat/entry/odd"
                  tal:attributes="class python:oddrow and 'even' or 'odd'"
                  tal:content="entry/topic/title">Topic Title
              </div>
            </a>
	  </div>
        </div>

    </div>

    <div id="footer"
      metal:define-macro="footer">
    </div>
   <div id="logger" />

</body>

</html>

</metal:block>



=== Added File Products3/NewsSite/skins/newssite/view_macros.pt ===
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html metal:define-macro="page">
<head metal:define-macro="head">
  <title 
    metal:define-slot="title"
    tal:content="options/getTitle|view/getTitle|context/getTitle|default"
    >Zope</title>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  <link href="/@@/zopetopBasic.css" rel="stylesheet" type="text/css"
        tal:attributes="href string:/@@/zopetopBasic.css" />
  <link href="/@@/zopetopWidgets.css" rel="stylesheet" type="text/css"
        tal:attributes="href string:/@@/zopetopWidgets.css" />
  <link href="/@@/zopetopStructure.css" rel="stylesheet" type="text/css"
        tal:attributes="href string:/@@/zopetopStructure.css" />
  <div metal:define-slot="headers">
  </div>
</head>
<body>

  <table metal:define-macro="zmi_tabs"><tr>
    <td tal:repeat="view context/@@view_get_menu/zmi_views">
    <a href="" tal:attributes="href view/action" tal:content="view/title">
	label</a>
    <tal:block condition="not: repeat/view/end">'</tal:block>
    </td>
   </tr></table>

  <div metal:define-slot="body">
     <p>Body here</p>
  </div>

  <div metal:define-macro="logged_user">
  <p>User: <span tal:replace="request/user/getTitle">User</span></p>
  </div>

  <div metal:define-macro="footer">
  <p>Powered by Zope</p>
  </div>

</body>
</html>



=== Added File Products3/NewsSite/skins/newssite/xmltree.js ===
//constants
var ELEMENT_NODE = 1;
var TEXT_NODE = 3;
var COLLECTION = 'COLLECTION';
var ICON = 'ICON';
var EXPAND = 'EXPAND';
var XML_CHILDREN_VIEW = '@@children.xml';
var SINGLE_BRANCH_TREE_VIEW = '@@singleBranchTree.xml';
var CONTENT_VIEW = '@@manage';


var LG_DEBUG = 6;
var LG_TRACE_EVENTS = 5;
var LG_TRACE = 4;
var LG_INFO = 3;
var LG_NOLOG = 0;


// globals
var baseurl;
var navigationTree;
var docNavTree;
var loglevel = LG_NOLOG;



//class navigationTreeNode
function navigationTreeNode (domNode) {
        this.childNodes = new Array();
        this.isEmpty = 1;
        this.isCollapsed = 1;
        this.domNode = domNode;
        this.loadingNode = null;
        this.path = '';
        this.parentNode = null;
}

navigationTreeNode.prototype.appendChild = function(node) {
        this.childNodes.push(node);
        this.domNode.appendChild(node.domNode);
        node.parentNode = this;
}

navigationTreeNode.prototype.setPath = function(path) {
        this.path = path;
        this.domNode.setAttribute("path", path);
}

navigationTreeNode.prototype.collapse = function() {
 	this.isCollapsed = 1;
        this.changeExpandIcon("pl.gif"); 
}

navigationTreeNode.prototype.expand = function() {
 	this.isCollapsed = 0;
        this.changeExpandIcon("mi.gif"); 
}

navigationTreeNode.prototype.changeExpandIcon = function(icon) {
        var expand = this.domNode.getElementsByTagName('expand')[0];
        expand.style.backgroundImage = 'url("' + baseurl + '@@/' + icon + '")';
        }

navigationTreeNode.prototype.getNodeByPath = function(path) {
        var numchildren = this.childNodes.length;
        if (path == this.path) {
                return this;
                }
        else {
                for (var i=0; i< numchildren; i++) {
                        foundChild = this.childNodes[i].getNodeByPath(path);
                        if (foundChild) {
                                return foundChild;
                                }
                        }        
                }
        return null;
}

navigationTreeNode.prototype.toggleExpansion = function() {
with (this) {
        prettydump('toggleExpansion', LG_TRACE);
        // If this collection is empty, load it from server
        // todo xxx optimize for the case where collection has null length
        if (isEmpty) {
                startLoadingChildren();
                }
        else
                {
                refreshExpansion();
                }

        }
} 

navigationTreeNode.prototype.startLoadingChildren = function() {
with (this) {
        loadingNode = createLoadingNode();
        domNode.appendChild(loadingNode);
        var url = baseurl + path + XML_CHILDREN_VIEW;
        loadtreexml(url, this);
        }
}

navigationTreeNode.prototype.finishLoadingChildren = function() {
with (this) {
        isEmpty = 0;
        refreshExpansion();
        domNode.removeChild(loadingNode);
        loadingNode = null;
        }
}

navigationTreeNode.prototype.refreshExpansion = function() {
with (this) {
        if (isCollapsed) {
	 	expand();
                showChildren();
   		}
        else {
                collapse();
                hideChildren();
   		}
        }
}


navigationTreeNode.prototype.hideChildren = function() {
with (this) {
        prettydump('hideChildren', LG_TRACE);
        var num = childNodes.length;
	for (var i = num - 1; i >=0; i--) {
	        childNodes[i].domNode.style.display = 'none';
        	}
        }
}

navigationTreeNode.prototype.showChildren = function() {
with (this) {
        prettydump('showChildren', LG_TRACE);
        var num = childNodes.length;
	for (var i = num - 1; i >=0; i--) {
	        childNodes[i].domNode.style.display = 'block';
        	}
        }
}

// utilities
function prettydump(s, locallog) {
        // Put the string "s" in a box on the screen as an log message
        if (locallog <= loglevel) {
                var logger = document.getElementById('logger');
  	        var msg = document.createElement('code');
	        var br1 = document.createElement('br');
  	        var br2 = document.createElement('br');
  	        var msg_text = document.createTextNode(s);
  	        msg.appendChild(msg_text);
          	logger.insertBefore(br1, logger.firstChild);
  	        logger.insertBefore(br2, logger.firstChild);
          	logger.insertBefore(msg, logger.firstChild);
	        }
        }


function debug(s) {
        var oldlevel = loglevel;
        loglevel = LG_DEBUG;
        prettydump("Debug : " + s, LG_DEBUG);
        loglevel = oldlevel;
}

// DOM utilities
function getTreeEventTarget(e) {
	var elem;
        if(e.target) {
                // Mozilla uses this
       		if (e.target.nodeType == TEXT_NODE) {
                        elem=e.target.parentNode;
		        }
		else {
		        elem=e.target;
			}
                }
        else {
                // IE uses this
                elem=e.srcElement;
                }
        return elem;
        }

function isCollection(elem) {
	return (checkTagName(elem, COLLECTION));
	}


function isIcon(elem) {
	return (checkTagName(elem, ICON));
	}

function isExpand(elem) {
	return (checkTagName(elem, EXPAND));
	}

function checkTagName(elem, tagName) {
	return (elem.tagName.toUpperCase() == tagName);
	}

function getCollectionChildNodes(xmlDomElem) {
        // get collection element nodes among childNodes of elem
        var result = new Array();
        
        var items = xmlDomElem.childNodes;
        var numitems = items.length;
        var currentItem;
        for (var i = 0; i < numitems; i++) {
                currentItem = items[i];

                if (currentItem.nodeType != ELEMENT_NODE) {
                        continue;
                        }

                if (!isCollection(currentItem)) {
                        continue;
                        }
                result.push(currentItem);
                }
        return result;
        }

//events
function treeclicked (e) {
        prettydump('treeclicked', LG_TRACE_EVENTS);
        var elem = getTreeEventTarget(e);
        if (elem.id == 'navtree') return;

        // if node clicked is expand elem, toggle expansion
        if (isExpand(elem)) {
                //get collection node
                elem = elem.parentNode;
                var navTreeNode = navigationTree.getNodeByPath(elem.getAttribute('path'));
                navTreeNode.toggleExpansion();
                }
        }

// helpers
function getControlPrefix() {
        if (getControlPrefix.prefix)
                return getControlPrefix.prefix;
   
        var prefixes = ["MSXML2", "Microsoft", "MSXML", "MSXML3"];
        var o, o2;
        for (var i = 0; i < prefixes.length; i++) {
                try {
                        // try to create the objects
                        o = new ActiveXObject(prefixes[i] + ".XmlHttp");
                        o2 = new ActiveXObject(prefixes[i] + ".XmlDom");
                        return getControlPrefix.prefix = prefixes[i];
                        }
                catch (ex) {};
                }
   
        throw new Error("Could not find an installed XML parser");
        }


// XmlHttp factory
function XmlHttp() {}


XmlHttp.create = function () {
if (window.XMLHttpRequest) {
        var req = new XMLHttpRequest();
         
        // some older versions of Moz did not support the readyState property
        // and the onreadystate event so we patch it!
        if (req.readyState == null) {
                req.readyState = 1;
                req.addEventListener("load", function () {
                                req.readyState = 4;
                                if (typeof req.onreadystatechange == "function")
                                req.onreadystatechange();}, false);
                }
 
                return req;
        }
if (window.ActiveXObject) {
        s = getControlPrefix() + '.XmlHttp';
        return new ActiveXObject(getControlPrefix() + ".XmlHttp");
        }
return;
};

function loadtreexml (url, node) {
        var xmlHttp = XmlHttp.create(); 
        if (xmlHttp) {
                prettydump('URL ' + url, LG_INFO);
                xmlHttp.open('GET', url, true); 


                xmlHttp.onreadystatechange = function () {
        		if (xmlHttp.readyState == 4) {
                                prettydump('Response XML ' + xmlHttp.responseText, LG_INFO);
			        parseXML(xmlHttp.responseXML, node);
		                }
	                };

                // call in new thread to allow ui to update
	        window.setTimeout(function () {
		        xmlHttp.send(null);
	                }, 10);
                }
        else {
                }
        }  

function loadtree (rooturl, thisbaseurl) {
        baseurl = rooturl;  // Global baseurl
        docNavTree = document.getElementById('navtreecontents');
  
	var url = thisbaseurl + SINGLE_BRANCH_TREE_VIEW;
        loadtreexml(url, null);
        }


function removeChildren(node) {
        var items = node.childNodes;
        var numitems = items.length;
        for (var i = 0; i < numitems; i++) {
                node.removeChild(items[i]);
                }
        }


function parseXML(responseXML, node) {
        if (responseXML) {
                var data = responseXML.documentElement;
                if (node == null) {
                        //[top] node
                        removeChildren(docNavTree);
                        addNavigationTreeNodes(data, null, 1);
//                        docNavTree.appendChild(navigationTree.domNode);
                        }
                else {
                        //expanding nodes
                        addNavigationTreeNodes(data, node, 0);
                        node.finishLoadingChildren();
                        }
                }             
        }

function addNavigationTreeNodes(sourceNode, targetNavTreeNode, deep) {
        // create tree nodes from XML children nodes of sourceNode         
        // and add them to targetNode
        // if deep, create all descendants of sourceNode
        var basePath = "";
        if (targetNavTreeNode) {
                basePath = targetNavTreeNode.path;
                }
        var items = getCollectionChildNodes(sourceNode);
        var numitems = items.length;
        for (var i=0; i< numitems; i++) {
                var navTreeChild = createNavigationTreeNode(items[i], basePath, deep);
                if (targetNavTreeNode) {
                        targetNavTreeNode.appendChild(navTreeChild);
                        }
                }
        }       


function createPresentationNodes(title, targetUrl, icon_url, length) {
        // create nodes hierarchy for one collection (without children)
        
        // create elem for plus/minus icon
        var expandElem = document.createElement('expand');
        // create elem for item icon
        var iconElem = document.createElement('icon');
        expandElem.appendChild(iconElem);
        // Mozilla tries to infer an URL if url is empty and reloads containing page
        if (icon_url != '')  {
                iconElem.style.backgroundImage = 'url("' + icon_url + '")';
                }
        // create link
        var linkElem = document.createElement('a');
        var titleTextNode = document.createTextNode(title);
        
        linkElem.appendChild(titleTextNode);
        linkElem.setAttribute('title', 'Contains ' + length + ' item(s)');
        linkElem.setAttribute('href', targetUrl);
        
        iconElem.appendChild(linkElem);

        return expandElem;
        }

function createLoadingNode() {
        var loadingElem = document.createElement('loading');
        //XXX should not hardcode loading string
        var titleTextNode = document.createTextNode('Loading...');
        
        loadingElem.appendChild(titleTextNode);

        return loadingElem;
        }

function createNavigationTreeNode(source, basePath, deep) {
        var newelem = document.createElement(source.tagName);

        var navTreeNode = new navigationTreeNode(newelem);
        var elemPath;
        var elemTitle;
        //XXX should not hardcode root folder title string
        if (source.getAttribute('isroot') != null) {
                elemTitle = '[top]';
                elemPath = basePath;
                newelem.style.marginLeft = '0px';
                navigationTree = navTreeNode;
                docNavTree.appendChild(newelem);
                }
        else {
                elemTitle = source.getAttribute('name');
                elemPath = basePath + elemTitle + '/';
                }
        navTreeNode.setPath(elemPath);
        
        //could show number of child items
        var length = source.getAttribute('length');
        
        var icon_url = source.getAttribute('icon_url');  

        var targetUrl = baseurl;
	targetUrl = targetUrl + elemPath;
	targetUrl = targetUrl + CONTENT_VIEW;        

        var expandElem = createPresentationNodes(elemTitle, targetUrl, icon_url, length);
        newelem.appendChild(expandElem);


        if (deep) {
                var children = getCollectionChildNodes(source);
                var numchildren = children.length;
                for (var i=0; i< numchildren; i++) {
                        var navTreeNodeChild =  createNavigationTreeNode(children[i], navTreeNode.path, deep); 
                        navTreeNode.appendChild(navTreeNodeChild);
                        }
                if (numchildren) {
                        navTreeNode.isEmpty = 0;
                        navTreeNode.expand();
                        }
                else {
                        navTreeNode.isEmpty = 1;
                        navTreeNode.collapse();
                        }
                }
        else {
                navTreeNode.isEmpty = 1;
                navTreeNode.collapse();
                }
        return navTreeNode;
        }



=== Added File Products3/NewsSite/skins/newssite/zope3.css === (422/522 lines abridged)
/*
** Zope3 style sheet for CSS2-capable browsers.
**
*/

/*
* { border: 1px dotted red }
*/


/* Basic Elements */

body {
    font: 85% Helvetica, Arial, sans-serif;
    background: #F5FFFA;
    color: Black;
    margin: 0;
    padding: 0;
/* These work in IE only, changes the look of the scrollbar + textareas */
    scrollbar-base-color: White;
    scrollbar-highlight-color: White;
    scrollbar-track-color: #F8F8F8;
    scrollbar-darkshadow-color: #F8F8F8;
    scrollbar-3dlight-color: #336699;
    scrollbar-shadow-color: #336699;
    scrollbar-arrow-color: Black;
}

table {
    font-size: 100%;
}

a {
    text-decoration: none;
    color: #336699;
    background-color: transparent;
}


table {

}


img {
    border: none;
    vertical-align: middle;
}

p {

[-=- -=- -=- 422 lines omitted -=- -=- -=-]

table.listing tr.odd {
    /*every second line should be shaded */
    background: White;
}

table.listing tr.even {
    background: #F8F8F8;
}

table.listing td {
    border-right: 1px solid #CCCCCC;
    padding: 0em 1em;
    text-align: left;
}


table.listing img {
    vertical-align: middle;
}


div.spacer {
	clear: both;
}





div.message {
    background: #FFCE7B;
    border: 1px solid #FFA500;
    color: Black;
    font: bold 80% Verdana, Helvetica, Arial, sans-serif;
    margin: 2em 0em 1em 0em;
    padding: 0.5em 1em;
    vertical-align: middle;
}

div.message a {
    color: Black;
    text-decoration: underline;
}









=== Added File Products3/NewsSite/skins/newssite/zope3logo.gif ===
  <Binary-ish file>