You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by st...@apache.org on 2004/04/06 00:28:17 UTC

cvs commit: cocoon-2.1/src/blocks/linotype/samples/repository/news/template document.xml

stefano     2004/04/05 15:28:17

  Modified:    src/blocks/linotype/samples sitemap.xmap index.xhtml
               src/blocks/linotype/samples/scripts browser_dependent.js
                        schema.js editor.js utils.js
               src/blocks/linotype/samples/styles editor.css
               src/blocks/linotype/samples/stylesheets
                        news2html-single.xslt news2edit.xslt
               src/blocks/linotype/samples/repository/news/1 document.xml
               src/blocks/linotype TODO.txt
               src/blocks/linotype/samples/repository/news/template
                        document.xml
  Removed:     src/blocks/linotype/samples sitemap.source.xmap
  Log:
  fixed a few things here and there so that now it works with samples, also updated the todo list to reflect the new things
  
  Revision  Changes    Path
  1.10      +6 -6      cocoon-2.1/src/blocks/linotype/samples/sitemap.xmap
  
  Index: sitemap.xmap
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/linotype/samples/sitemap.xmap,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- sitemap.xmap	5 Apr 2004 11:43:34 -0000	1.9
  +++ sitemap.xmap	5 Apr 2004 22:28:16 -0000	1.10
  @@ -160,7 +160,7 @@
   
     <map:component-configurations>
       <global-variables>
  -      <home>/~stefano/linotype</home>
  +      <home>/samples/blocks/linotype</home>
         <count>3</count>
       </global-variables>
     </map:component-configurations>
  @@ -314,14 +314,14 @@
         <map:serialize/>
       </map:match>
            
  -    <map:match pattern="private/">
  +    <map:match pattern="backend/">
         <map:redirect-to uri="news"/>
       </map:match>
   
  -    <map:match pattern="private/edit/news/*/*">
  +    <map:match pattern="backend/edit/news/*/*">
         <map:call function="main">
           <map:parameter name="page" value="edit"/>
  -        <map:parameter name="root" value="{realpath:/}"/>
  +        <map:parameter name="root" value="{realpath:/}{global:home}"/>
           <map:parameter name="base" value="{global:home}"/>
           <map:parameter name="id" value="{1}"/>
           <map:parameter name="type" value="news"/>
  @@ -329,10 +329,10 @@
         </map:call>
       </map:match>
   
  -    <map:match pattern="private/**">
  +    <map:match pattern="backend/**">
         <map:call function="main">
           <map:parameter name="page" value="{1}"/>
  -        <map:parameter name="root" value="{realpath:/}"/>
  +        <map:parameter name="root" value="{realpath:/}{global:home}"/>
           <map:parameter name="base" value="{global:home}"/>
         </map:call>
       </map:match>
  
  
  
  1.6       +2 -4      cocoon-2.1/src/blocks/linotype/samples/index.xhtml
  
  Index: index.xhtml
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/linotype/samples/index.xhtml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- index.xhtml	5 Apr 2004 11:43:34 -0000	1.5
  +++ index.xhtml	5 Apr 2004 22:28:16 -0000	1.6
  @@ -4,8 +4,6 @@
    <head>
     <title>Stefano's Linotype</title>
   
  -  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  -
     <meta name="DC.title" content="Stefano's Linotype"/>
     <meta name="DC.author.personalName" content="Stefano Mazzocchi"/>
     <meta name="description" lang="en" content="Stefano Mazzocchi's Weblog"/>
  @@ -45,7 +43,7 @@
   <div id="page">
    <h1>Stefano's Linotype</h1>
    <h2>Typesetting some of Stefano Mazzocchi's random thoughts</h2>
  - <include:include src="cocoon://news.html" xmlns:include="http://apache.org/cocoon/include/1.0"/>
  + <include:include src="cocoon:/news.html" xmlns:include="http://apache.org/cocoon/include/1.0"/>
   </div>
   
   <div id="footer">
  @@ -53,7 +51,7 @@
   </div>
   
   <div id="sidebar">
  - <a href="private/"><img alt="Linotype" src="images/linotype.jpg" width="156px" height="207px"/></a><br/>
  + <a href="backend/"><img alt="Linotype" src="images/linotype.jpg" width="156px" height="207px"/></a><br/>
    <a href="history">History</a><br/>
    <a href="rss/2.0/index.rss"><img alt="RSS Feed" src="images/rss.gif"/></a><br/>
   </div>
  
  
  
  1.2       +19 -1     cocoon-2.1/src/blocks/linotype/samples/scripts/browser_dependent.js
  
  Index: browser_dependent.js
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/linotype/samples/scripts/browser_dependent.js,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- browser_dependent.js	5 Apr 2004 11:43:33 -0000	1.1
  +++ browser_dependent.js	5 Apr 2004 22:28:16 -0000	1.2
  @@ -1,5 +1,23 @@
  -// ------------------------- Browser dependent functions --------------------
  +/*
  + * Copyright 1999-2004 The Apache Software Foundation
  + *
  + * Licensed under the Apache License, Version 2.0 (the "License");
  + * you may not use this file except in compliance with the License.
  + * You may obtain a copy of the License at
  + *
  + *     http://www.apache.org/licenses/LICENSE-2.0
  + *
  + *  Unless required by applicable law or agreed to in writing, software
  + *  distributed under the License is distributed on an "AS IS" BASIS,
  + *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  + *  See the License for the specific language governing permissions and
  + *  limitations under the License.
  + */
   
  +/*
  + * This is where all the browser dependent functions should be
  + */
  + 
   var IE = (document.all) ? true : false;
   
   function addEvent(obj,type,func,bol) {
  
  
  
  1.2       +22 -0     cocoon-2.1/src/blocks/linotype/samples/scripts/schema.js
  
  Index: schema.js
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/linotype/samples/scripts/schema.js,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- schema.js	5 Apr 2004 11:43:33 -0000	1.1
  +++ schema.js	5 Apr 2004 22:28:16 -0000	1.2
  @@ -1,3 +1,25 @@
  +/*
  + * Copyright 1999-2004 The Apache Software Foundation
  + *
  + * Licensed under the Apache License, Version 2.0 (the "License");
  + * you may not use this file except in compliance with the License.
  + * You may obtain a copy of the License at
  + *
  + *     http://www.apache.org/licenses/LICENSE-2.0
  + *
  + *  Unless required by applicable law or agreed to in writing, software
  + *  distributed under the License is distributed on an "AS IS" BASIS,
  + *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  + *  See the License for the specific language governing permissions and
  + *  limitations under the License.
  + */
  +
  +/*
  + * WARNING: this file is supposed to be cross-browser. All browser-specific features
  + * should be wrapped with a function call and factored out in the "browser_dependent.js"
  + * file. Please, keep it this way.
  + *
  + */
   
   // ----------------------- Schema-related Functions -------------------------
   
  
  
  
  1.7       +22 -0     cocoon-2.1/src/blocks/linotype/samples/scripts/editor.js
  
  Index: editor.js
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/linotype/samples/scripts/editor.js,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- editor.js	5 Apr 2004 11:43:33 -0000	1.6
  +++ editor.js	5 Apr 2004 22:28:16 -0000	1.7
  @@ -1,3 +1,25 @@
  +/*
  + * Copyright 1999-2004 The Apache Software Foundation
  + *
  + * Licensed under the Apache License, Version 2.0 (the "License");
  + * you may not use this file except in compliance with the License.
  + * You may obtain a copy of the License at
  + *
  + *     http://www.apache.org/licenses/LICENSE-2.0
  + *
  + *  Unless required by applicable law or agreed to in writing, software
  + *  distributed under the License is distributed on an "AS IS" BASIS,
  + *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  + *  See the License for the specific language governing permissions and
  + *  limitations under the License.
  + */
  +
  +/*
  + * WARNING: this file is supposed to be cross-browser. All browser-specific features
  + * should be wrapped with a function call and factored out in the "browser_dependent.js"
  + * file. Please, keep it this way.
  + *
  + */
   
   // -------------------------- global variables ------------------------------
   
  
  
  
  1.2       +22 -0     cocoon-2.1/src/blocks/linotype/samples/scripts/utils.js
  
  Index: utils.js
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/linotype/samples/scripts/utils.js,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- utils.js	5 Apr 2004 11:43:33 -0000	1.1
  +++ utils.js	5 Apr 2004 22:28:16 -0000	1.2
  @@ -1,3 +1,25 @@
  +/*
  + * Copyright 1999-2004 The Apache Software Foundation
  + *
  + * Licensed under the Apache License, Version 2.0 (the "License");
  + * you may not use this file except in compliance with the License.
  + * You may obtain a copy of the License at
  + *
  + *     http://www.apache.org/licenses/LICENSE-2.0
  + *
  + *  Unless required by applicable law or agreed to in writing, software
  + *  distributed under the License is distributed on an "AS IS" BASIS,
  + *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  + *  See the License for the specific language governing permissions and
  + *  limitations under the License.
  + */
  +
  +/*
  + * WARNING: this file is supposed to be cross-browser. All browser-specific features
  + * should be wrapped with a function call and factored out in the "browser_dependent.js"
  + * file. Please, keep it this way.
  + *
  + */
   
   // ----------------------------- Utility Functions -------------------------
   
  
  
  
  1.4       +6 -0      cocoon-2.1/src/blocks/linotype/samples/styles/editor.css
  
  Index: editor.css
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/linotype/samples/styles/editor.css,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- editor.css	5 Apr 2004 11:43:33 -0000	1.3
  +++ editor.css	5 Apr 2004 22:28:16 -0000	1.4
  @@ -18,6 +18,12 @@
   #navigation {
   	margin: 10px;
   }
  +
  +#navigation .date {
  +	color: #555;
  +	font-size: 80%;
  +	margin-left: 5px;
  +}	
   	
   #page {
   	margin: 10px;
  
  
  
  1.5       +1 -1      cocoon-2.1/src/blocks/linotype/samples/stylesheets/news2html-single.xslt
  
  Index: news2html-single.xslt
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/linotype/samples/stylesheets/news2html-single.xslt,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- news2html-single.xslt	5 Apr 2004 11:43:33 -0000	1.4
  +++ news2html-single.xslt	5 Apr 2004 22:28:16 -0000	1.5
  @@ -60,7 +60,7 @@
           </div>
   
           <div id="sidebar">
  -          <a href="{$home}/private/"><img alt="Linotype" src="{$home}/images/linotype.jpg" width="156px" height="207px" /></a>
  +          <a href="{$home}/backend/"><img alt="Linotype" src="{$home}/images/linotype.jpg" width="156px" height="207px" /></a>
           </div>
   
           <div id="bottombar">
  
  
  
  1.7       +13 -9     cocoon-2.1/src/blocks/linotype/samples/stylesheets/news2edit.xslt
  
  Index: news2edit.xslt
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/linotype/samples/stylesheets/news2edit.xslt,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- news2edit.xslt	5 Apr 2004 12:34:23 -0000	1.6
  +++ news2edit.xslt	5 Apr 2004 22:28:16 -0000	1.7
  @@ -33,10 +33,13 @@
                       }
                       return;
                   } else {
  -                    form.elements['date'].value = getDate();
  -                    form.elements['time'].value = getTime();
  -                    form.elements['fulldate'].value = getFullDate();
  -                    form.elements['isodate'].value = getISODate();
  +                	if (!form.elements['date'].value || (action == "publish")) {
  +                    	form.elements['date'].value = getDate();
  +	                    form.elements['time'].value = getTime();
  +	                    form.elements['fulldate'].value = getFullDate();
  +	                    form.elements['isodate'].value = getISODate();
  +                    	alert("I am updating date");
  +                    }
                       form.elements['innerHTML'].value = getInnerHTML();
                       form.elements['xml:content'].value = getContent();
                   }
  @@ -56,10 +59,10 @@
           <form name="data" action="{string('#{$continuation/id}')}.kont" method="POST" enctype="multipart/form-data">
             <input type="hidden" name="action"/>
             <input type="hidden" name="author" value="{string('#{userid}')}"/>
  -          <input type="hidden" name="date"/>
  -          <input type="hidden" name="time"/>
  -          <input type="hidden" name="fulldate"/>
  -          <input type="hidden" name="isodate"/>
  +          <input type="hidden" name="date" value="{n:news/@creation-date}"/>
  +          <input type="hidden" name="time" value="{n:news/@creation-time}"/>
  +          <input type="hidden" name="fulldate" value="{n:news/@creation-fulldate}"/>
  +          <input type="hidden" name="isodate" value="{n:news/@creation-isodate}"/>
             <input type="hidden" name="xml:content"/>
             <input type="hidden" name="innerHTML"/>
   
  @@ -120,7 +123,7 @@
             </div>
   
             <div id="navigation">
  -           <a href="../../../../">linotype</a> &#187; <a href="../../../">private</a> &#187; <xsl:value-of select="$id"/>
  +           <a href="../../../../">linotype</a> &#187; <a href="../../../">private</a> &#187; <xsl:value-of select="$id"/> <span class="date">[<xsl:value-of select="n:news/@creation-date"/> ~ <xsl:value-of select="n:news/@creation-time"/>]</span>
             </div>
   
             <xsl:apply-templates/>
  @@ -137,6 +140,7 @@
               <input type="button" value="Save" onclick="doAction('save')"/>
               <input type="button" value="Finish" onclick="doAction('finish')"/>
               <input type="button" value="Publish" onclick="doAction('publish')"/>
  +            <!--input type="checkbox" name="update_date"/><label for="update_date">Update date</label-->
             </div>
             
             <script type="text/javascript">
  
  
  
  1.4       +2 -2      cocoon-2.1/src/blocks/linotype/samples/repository/news/1/document.xml
  
  Index: document.xml
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/linotype/samples/repository/news/1/document.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- document.xml	6 Mar 2004 02:26:06 -0000	1.3
  +++ document.xml	5 Apr 2004 22:28:16 -0000	1.4
  @@ -31,10 +31,10 @@
   <li>Image inclusion, resizing and uploading are all done inside the editor page without a need for external upload.</li>
   <li>The stylesheets are designed for both text readability and elegance. The use of serif fonts is intentional because it increases text readability and gives a pleasant retro style that matches the linotype concept.</li>
   <li>The entire thing has been designed around the <q>less is more</q> paradigm.</li>
  -<li>The code is licensed under the <a href="http://www.apache.org/foundation/licence-FAQ.html">Apache License 1.1</a> which doesn't force code contribution back to the project but does protect the name, thus the project recognition and its community.</li>
  +<li>The code is licensed under the <a href="http://www.apache.org/foundation/licence-FAQ.html">Apache License 2.0</a> which doesn't force code contribution back to the project but does protect the name, thus the project recognition and its community.</li>
   </ul>
   
   <p>Enjoy and spread the word.</p>
   
  -<p><strong xmlns:h="http://www.w3.org/1999/xhtml">Stefano Mazzocchi.</strong></p>
  +<p><strong>Stefano Mazzocchi.</strong></p>
   </body></n:news>
  
  
  
  1.4       +8 -21     cocoon-2.1/src/blocks/linotype/TODO.txt
  
  Index: TODO.txt
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/linotype/TODO.txt,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TODO.txt	30 Oct 2003 17:56:05 -0000	1.3
  +++ TODO.txt	5 Apr 2004 22:28:16 -0000	1.4
  @@ -2,24 +2,11 @@
    What is left to do?
    -------------------
   
  -Tons of stuff, but here is a list of the things that I think are most important 
  -at the moment:
  -
  - - write different rendering stylesheets for mozilla or IE since IE is *really* 
  -   poor at CSS2 compatibility. Why? well, again, 90% of the browsers are IE and 
  -   this is going to take a while to change.
  - 
  - - allow the ability to write essays and not only news and while you do this, 
  -   considering adding pagination capabilities, also at the editing level (for 
  -   example, a button that can trigger the presence of a tag that indicates page 
  -   break)
  - 
  - - improve the ability to redeploy linotype without having to hardwire URLs 
  -   around the sitemap and flowscript. (probably goes along with 
  - 
  - - consider adding the ability to sinchronize two different linotypes. 
  -   For example, if you have one installed in your laptop and you are offline 
  -   for a while, you might want to synchronize it with the one online.
  -
  - - multi-user setup to host multiple weblogs or weblogs authored by multiple 
  -   authors.
  +  - IE support is not finished, but the framework for browser abstraction is there and no 
  +    mozilla-specific features are used.
  +  
  +  - installing/personalizing is a pain.
  +  
  +  - the repository is kind of a joke, it should be using the repository block
  +  
  +  - 
  \ No newline at end of file
  
  
  
  1.3       +1 -1      cocoon-2.1/src/blocks/linotype/samples/repository/news/template/document.xml
  
  Index: document.xml
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/linotype/samples/repository/news/template/document.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- document.xml	6 Mar 2004 02:26:20 -0000	1.2
  +++ document.xml	5 Apr 2004 22:28:17 -0000	1.3
  @@ -16,5 +16,5 @@
   -->
   <n:news xmlns:n="http://www.betaversion.org/linotype/news/1.0" online="on">
     <n:title>Title</n:title>
  -  <body xmlns="http://www.w3.org/1999/xhtml">Content</body>
  +  <body xmlns="http://www.w3.org/1999/xhtml"><p>Content</p></body>
   </n:news>