cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From reinh...@apache.org
Subject cvs commit: cocoon-2.1/src/blocks/forms/samples/resources forms-advanced-field-styling.xsl forms-field-styling.xsl forms.css forms-lib.js forms-page-styling.xsl forms-calendar-styling.xsl forms-calendar.css
Date Wed, 10 Mar 2004 21:52:00 GMT
reinhard    2004/03/10 13:52:00

  Modified:    src/blocks/forms/samples/resources
                        forms-advanced-field-styling.xsl
                        forms-field-styling.xsl forms.css forms-lib.js
                        forms-page-styling.xsl forms-calendar-styling.xsl
                        forms-calendar.css
  Log:
  Woody-->CocoonForms
  
  Revision  Changes    Path
  1.2       +5 -5      cocoon-2.1/src/blocks/forms/samples/resources/forms-advanced-field-styling.xsl
  
  Index: forms-advanced-field-styling.xsl
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/forms/samples/resources/forms-advanced-field-styling.xsl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- forms-advanced-field-styling.xsl	9 Mar 2004 10:34:10 -0000	1.1
  +++ forms-advanced-field-styling.xsl	10 Mar 2004 21:52:00 -0000	1.2
  @@ -19,8 +19,8 @@
                   xmlns:fi="http://apache.org/cocoon/forms/1.0#instance"
                   exclude-result-prefixes="fi">
     <!--+
  -      | This stylesheet is designed to be included by 'woody-samples-styling.xsl'.
  -      | It extends the 'woody-field-styling.xsl' with additional stylings.
  +      | This stylesheet is designed to be included by 'forms-samples-styling.xsl'.
  +      | It extends the 'forms-field-styling.xsl' with additional stylings.
         | The very specific advanced stylings as the calendar or htmlarea (both
         | also need additional JS files) are separated out of this file.
         +-->
  @@ -48,7 +48,7 @@
     </xsl:template>
   
     <!--+ This template should not be necessary as this stylesheet "inherits"
  -      | all templates from 'woody-field-styling.xsl', but without it, it does
  +      | all templates from 'forms-field-styling.xsl', but without it, it does
         | not work for me (using Xalan 2.5.1). It's like adding all methods of
         | a superclass in a subclass and calling everywhere only the super
         | implementation.
  @@ -74,7 +74,7 @@
         <xsl:apply-templates select="node()"/>
       </div>
       <script type="text/javascript">
  -      var helpWin<xsl:value-of select="$id"/> = woody_createPopupWindow('help<xsl:value-of
select="$id"/>');
  +      var helpWin<xsl:value-of select="$id"/> = forms_createPopupWindow('help<xsl:value-of
select="$id"/>');
       </script>
       <a id="{$id}" href="#" onclick="helpWin{$id}.showPopup('{$id}');return false;"><img
border="0" src="resources/help.gif"/></a>
     </xsl:template>
  @@ -154,7 +154,7 @@
           </tr>
         </table>
         <script type="text/javascript">
  -        var opt<xsl:value-of select="generate-id()"/> = woody_createOptionTransfer('<xsl:value-of
select="@id"/>');
  +        var opt<xsl:value-of select="generate-id()"/> = forms_createOptionTransfer('<xsl:value-of
select="@id"/>');
         </script>
       </span>
     </xsl:template>
  
  
  
  1.2       +5 -5      cocoon-2.1/src/blocks/forms/samples/resources/forms-field-styling.xsl
  
  Index: forms-field-styling.xsl
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/forms/samples/resources/forms-field-styling.xsl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- forms-field-styling.xsl	9 Mar 2004 10:34:10 -0000	1.1
  +++ forms-field-styling.xsl	10 Mar 2004 21:52:00 -0000	1.2
  @@ -32,7 +32,7 @@
     </xsl:template>
   
     <xsl:template match="body" mode="woody-field">
  -    <xsl:attribute name="onload">woody_onload(); <xsl:value-of select="@onload"/></xsl:attribute>
  +    <xsl:attribute name="onload">forms_onload(); <xsl:value-of select="@onload"/></xsl:attribute>
     </xsl:template>
   
     <!--+
  @@ -87,7 +87,7 @@
   
     <xsl:template match="fi:styling/@submit-on-change" mode="styling">
       <xsl:if test=". = 'true'">
  -      <xsl:attribute name="onchange">woody_submitForm(this)</xsl:attribute>
  +      <xsl:attribute name="onchange">forms_submitForm(this)</xsl:attribute>
       </xsl:if>
     </xsl:template>
   
  @@ -393,9 +393,9 @@
     <xsl:template match="fi:form-template|fi:form-generated">
       <form>
         <xsl:copy-of select="@*"/>
  -      <xsl:attribute name="onsubmit">woody_onsubmit(); <xsl:value-of select="@onsubmit"/></xsl:attribute>
  +      <xsl:attribute name="onsubmit">forms_onsubmit(); <xsl:value-of select="@onsubmit"/></xsl:attribute>
         <!-- hidden field to store the submit id -->
  -      <input type="hidden" name="woody_submit_id"/>
  +      <input type="hidden" name="forms_submit_id"/>
         <xsl:apply-templates/>
         
         <!-- TODO: consider putting this in the xml stream from the generator? -->
  
  
  
  1.2       +3 -3      cocoon-2.1/src/blocks/forms/samples/resources/forms.css
  
  Index: forms.css
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/forms/samples/resources/forms.css,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- forms.css	9 Mar 2004 10:34:10 -0000	1.1
  +++ forms.css	10 Mar 2004 21:52:00 -0000	1.2
  @@ -13,7 +13,7 @@
   * See the License for the specific language governing permissions and
   * limitations under the License.
   */
  -.woody-tab {
  +.forms-tab {
       background-color: white;
       border: 1px solid black;
       border-bottom-width: 0px;
  @@ -26,14 +26,14 @@
       cursor: pointer;
   }
   
  -.woody-tab.woody-activeTab {
  +.forms-tab.forms-activeTab {
       font-weight: bold;
       padding-top: 5px;
       cursor: default;
       z-index: 3;
   }
   
  -.woody-tabContent {
  +.forms-tabContent {
       background-color: white;
       border: 1px solid black;
       padding: 1em;
  
  
  
  1.2       +35 -35    cocoon-2.1/src/blocks/forms/samples/resources/forms-lib.js
  
  Index: forms-lib.js
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/forms/samples/resources/forms-lib.js,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- forms-lib.js	9 Mar 2004 10:34:10 -0000	1.1
  +++ forms-lib.js	10 Mar 2004 21:52:00 -0000	1.2
  @@ -21,49 +21,49 @@
    */
   
   // Handlers that are to be called in the document's "onload" event
  -var woody_onloadHandlers = new Array();
  +var forms_onloadHandlers = new Array();
   
  -function woody_onload() {
  -    for (var i = 0; i < woody_onloadHandlers.length; i++) {
  -        woody_onloadHandlers[i].woody_onload();
  +function forms_onload() {
  +    for (var i = 0; i < forms_onloadHandlers.length; i++) {
  +        forms_onloadHandlers[i].forms_onload();
       }
       // Clear it (we no more need them)
  -    woody_onloadHandlers = null;
  +    forms_onloadHandlers = null;
   }
   
   // Handlers that are to be called in form's "onsubmit" event
  -//FIXME: this single var implies only one woody form per page, and needs to be
  +//FIXME: this single var implies only one form per page, and needs to be
   //       visited if we decide to support several forms per page.
  -var woody_onsubmitHandlers = new Array();
  +var forms_onsubmitHandlers = new Array();
   
  -function woody_onsubmit() {
  -    if (woody_onsubmitHandlers == null) {
  +function forms_onsubmit() {
  +    if (forms_onsubmitHandlers == null) {
           alert("onsubmit called twice!");
       }
   
  -    for (var i = 0; i < woody_onsubmitHandlers.length; i++) {
  -        woody_onsubmitHandlers[i].woody_onsubmit();
  +    for (var i = 0; i < forms_onsubmitHandlers.length; i++) {
  +        forms_onsubmitHandlers[i].forms_onsubmit();
       }
       // clear it
  -    woody_onsubmitHandlers = null;
  +    forms_onsubmitHandlers = null;
   }
   
   /**
    * Submit the form containing an element, also storing in the hidden
  - * 'woody_submit_id' field the name of the element which triggered the submit.
  + * 'forms_submit_id' field the name of the element which triggered the submit.
    */
  -function woody_submitForm(element, name) {
  +function forms_submitForm(element, name) {
       if (name == undefined) {
           name = element.name;
       }
       
  -    var form = woody_getForm(element);
  +    var form = forms_getForm(element);
       if (form == null) {
           alert("Cannot find form for " + element);
       } else {
  -        form["woody_submit_id"].value = name;
  +        form["forms_submit_id"].value = name;
           // FIXME: programmatically submitting the form doesn't trigger onsubmit ? (both
in IE and Moz)
  -        woody_onsubmit();
  +        forms_onsubmit();
           form.submit();
       }
   }
  @@ -71,7 +71,7 @@
   /**
    * Crawl the parents of an element up to finding a form.
    */
  -function woody_getForm(element) {
  +function forms_getForm(element) {
       while(element != null && element.tagName != "FORM") {
           element = element.parentNode;
       }
  @@ -86,7 +86,7 @@
    * See http://www.w3.org/TR/CSS21/visudet.html#containing-block-details 4
    */
   
  -function woody_moveInBody(element) {
  +function forms_moveInBody(element) {
       element.parentNode.removeChild(element);
       document.body.appendChild(element);
   }
  @@ -96,39 +96,39 @@
    *
    * @param id the ID of the element to make a popup with.
    */
  -function woody_createPopupWindow(id) {
  +function forms_createPopupWindow(id) {
       var result = new PopupWindow(id);
       result.autoHide();
       // add to onload handlers
  -    result.woody_id = id;
  -    result.woody_onload = function() {
  -        woody_moveInBody(document.getElementById(this.woody_id));
  +    result.forms_id = id;
  +    result.forms_onload = function() {
  +        forms_moveInBody(document.getElementById(this.forms_id));
       }
  -    woody_onloadHandlers.push(result);
  +    forms_onloadHandlers.push(result);
       return result;
   }
   
   
  -function woody_createOptionTransfer(id) {
  +function forms_createOptionTransfer(id) {
       var result = new OptionTransfer(id + ".unselected", id);
       result.setAutoSort(true);
       // add to onload handlers
  -    result.woody_id = id;
  -    result.woody_onload = function() {
  -        var form = woody_getForm(document.getElementById(this.woody_id));
  +    result.forms_id = id;
  +    result.forms_onload = function() {
  +        var form = forms_getForm(document.getElementById(this.forms_id));
           this.init(form);
           sortSelect(this.left);
           sortSelect(this.right);
       }
  -    woody_onloadHandlers.push(result);
  +    forms_onloadHandlers.push(result);
       
       // add to onsubmit handlers
  -    result.woody_onsubmit = function() {
  +    result.forms_onsubmit = function() {
           // Select all options in the "selected" list to that
           // its values are sent.
           selectAllOptions(this.right);
       }
  -    woody_onsubmitHandlers.push(result);
  +    forms_onsubmitHandlers.push(result);
       return result;
   }
   
  @@ -141,12 +141,12 @@
    * @param length (integer) total number of tabs
    * @param state (string, optional) name of the input storing the tabgroup state
    */
  -function woody_showTab(tabgroup, idx, length, state) {
  +function forms_showTab(tabgroup, idx, length, state) {
       for (var i = 0; i < length; i++) {
           // Change tab status (selected/unselected)
           var tab = document.getElementById(tabgroup + "_tab_" + i);
           if (tab != null) {
  -            tab.className = (i == idx) ? 'woody-tab woody-activeTab': 'woody-tab';
  +            tab.className = (i == idx) ? 'forms-tab forms-activeTab': 'forms-tab';
           }
           // Change tab content visibilty
           var tabitems = document.getElementById(tabgroup + "_items_" + i);
  @@ -158,4 +158,4 @@
       if (state.length > 0) {
           document.forms[0][state].value = idx;
       }
  -}
  +}
  \ No newline at end of file
  
  
  
  1.2       +7 -7      cocoon-2.1/src/blocks/forms/samples/resources/forms-page-styling.xsl
  
  Index: forms-page-styling.xsl
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/forms/samples/resources/forms-page-styling.xsl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- forms-page-styling.xsl	9 Mar 2004 10:34:10 -0000	1.1
  +++ forms-page-styling.xsl	10 Mar 2004 21:52:00 -0000	1.2
  @@ -67,13 +67,13 @@
           <input type="hidden" name="{$state-widget}" value="{$active}"/>
         </xsl:if>
         <!-- div containing the tabs -->
  -      <div class="woody-tabArea">
  +      <div class="forms-tabArea">
           <xsl:for-each select="fi:items/fi:*">
             <xsl:variable name="pos" select="position() - 1"/>
  -          <span id="{$id}_tab_{$pos}" onclick="woody_showTab('{$id}', {$pos}, {last()},
'{$state-widget}')">
  +          <span id="{$id}_tab_{$pos}" onclick="forms_showTab('{$id}', {$pos}, {last()},
'{$state-widget}')">
               <xsl:attribute name="class">
  -              <xsl:text>woody-tab</xsl:text>
  -              <xsl:if test="$active = $pos"> woody-activeTab</xsl:if>
  +              <xsl:text>forms-tab</xsl:text>
  +              <xsl:if test="$active = $pos"> forms-activeTab</xsl:if>
               </xsl:attribute>
               <xsl:copy-of select="fi:label/node()"/>
               <xsl:if test="fi:items/*//fi:validation-message">
  @@ -85,7 +85,7 @@
         <!-- a div for each of the items -->
         <xsl:for-each select="fi:items/fi:*">
           <xsl:variable name="pos" select="position() - 1"/>
  -        <div class="woody-tabContent" id="{$id}_items_{$pos}">
  +        <div class="forms-tabContent" id="{$id}_items_{$pos}">
             <xsl:if test="$active != $pos">
               <xsl:attribute name="style">display:none</xsl:attribute>
             </xsl:if>
  @@ -100,7 +100,7 @@
     -->
     <xsl:template match="fi:group[fi:styling/@type='choice']">
       <!-- find the currently selected tab.
  -         Thoughts still needed here, such as autogenerating a field in the woodytransformer
  +         Thoughts still needed here, such as autogenerating a field in the formstransformer
            to hold this state.
       -->
       <xsl:variable name="active">
  @@ -119,7 +119,7 @@
       <fieldset id="{$id}">
         <legend title="{fi:hint}">
           <xsl:apply-templates select="fi:label/node()"/>
  -        <select name="{$state-widget}" onchange="woody_showTab('{$id}', this.selectedIndex,
{count(fi:items/*)}, '{$state-widget}')">
  +        <select name="{$state-widget}" onchange="forms_showTab('{$id}', this.selectedIndex,
{count(fi:items/*)}, '{$state-widget}')">
             <xsl:for-each select="fi:items/fi:*">
               <xsl:variable name="pos" select="position() - 1"/>
               <option>
  
  
  
  1.2       +8 -8      cocoon-2.1/src/blocks/forms/samples/resources/forms-calendar-styling.xsl
  
  Index: forms-calendar-styling.xsl
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/forms/samples/resources/forms-calendar-styling.xsl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- forms-calendar-styling.xsl	9 Mar 2004 10:34:10 -0000	1.1
  +++ forms-calendar-styling.xsl	10 Mar 2004 21:52:00 -0000	1.2
  @@ -19,7 +19,7 @@
                   xmlns:fi="http://apache.org/cocoon/forms/1.0#instance"
                   exclude-result-prefixes="fi">
     <!--+
  -      | This stylesheet is designed to be included by 'woody-advanced-styling.xsl'.
  +      | This stylesheet is designed to be included by 'forms-advanced-styling.xsl'.
         +-->
   
     <!-- Location of the resources directory, where JS libs and icons are stored -->
  @@ -30,17 +30,17 @@
       <script src="{$resources-uri}/mattkruse-lib/date.js" type="text/javascript"/>
       <script type="text/javascript">
         // Setup calendar
  -      var woody_calendar = CalendarPopup('woody_calendarDiv');
  -      woody_calendar.setWeekStartDay(1);
  -      woody_calendar.showYearNavigation();
  -      woody_calendar.showYearNavigationInput();
  -      woody_calendar.setCssPrefix("woody_");
  +      var forms_calendar = CalendarPopup('forms_calendarDiv');
  +      forms_calendar.setWeekStartDay(1);
  +      forms_calendar.showYearNavigation();
  +      forms_calendar.showYearNavigationInput();
  +      forms_calendar.setCssPrefix("forms_");
       </script>
       <link rel="stylesheet" type="text/css" href="{$resources-uri}/forms-calendar.css"/>
     </xsl:template>
   
     <xsl:template match="body" mode="woody-calendar">
  -    <div id="woody_calendarDiv"/>
  +    <div id="forms_calendarDiv"/>
     </xsl:template>
   
     <!--+
  @@ -64,7 +64,7 @@
       
       <!-- calendar popup -->
       <a href="#" name="{generate-id()}" id="{generate-id()}"
  -       onClick="woody_calendar.select(woody_getForm(this)['{@id}'],'{generate-id()}','{$format}');
return false;">
  +       onClick="forms_calendar.select(forms_getForm(this)['{@id}'],'{generate-id()}','{$format}');
return false;">
         <img src="{$resources-uri}/cal.gif" border="0" alt="Calendar"/>
       </a>
   
  
  
  
  1.2       +16 -16    cocoon-2.1/src/blocks/forms/samples/resources/forms-calendar.css
  
  Index: forms-calendar.css
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/forms/samples/resources/forms-calendar.css,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- forms-calendar.css	9 Mar 2004 10:34:10 -0000	1.1
  +++ forms-calendar.css	10 Mar 2004 21:52:00 -0000	1.2
  @@ -13,14 +13,14 @@
   * See the License for the specific language governing permissions and
   * limitations under the License.
   */
  -#woody_calendarDiv {
  +#forms_calendarDiv {
       position: absolute;
       visibility: hidden;
       background-color: white;
       layer-background-color: white;
   }
   
  -.woody_cpYearNavigation, .woody_cpMonthNavigation {
  +.forms_cpYearNavigation, .forms_cpMonthNavigation {
       background-color:#C0C0C0;
       text-align:center;
       vertical-align:center;
  @@ -29,64 +29,64 @@
       font-weight:bold;
   }
     
  -.woody_cpDayColumnHeader, .woody_cpYearNavigation, .woody_cpMonthNavigation, .woody_cpCurrentMonthDate,
.woody_cpCurrentMonthDateDisabled, .woody_cpOtherMonthDate, .woody_cpOtherMonthDateDisabled,
.woody_cpCurrentDate, .woody_cpCurrentDateDisabled, .woody_cpTodayText, .woody_cpTodayTextDisabled,
.woody_cpText {
  +.forms_cpDayColumnHeader, .forms_cpYearNavigation, .forms_cpMonthNavigation, .forms_cpCurrentMonthDate,
.forms_cpCurrentMonthDateDisabled, .forms_cpOtherMonthDate, .forms_cpOtherMonthDateDisabled,
.forms_cpCurrentDate, .forms_cpCurrentDateDisabled, .forms_cpTodayText, .forms_cpTodayTextDisabled,
.forms_cpText {
       font-family:arial;
       font-size:8pt;
   }
     
  -TD.woody_cpDayColumnHeader {
  +TD.forms_cpDayColumnHeader {
       text-align:right;
       border:solid thin #C0C0C0;
  -    border-width:0 0 1 0;
  +    border-width:0 0 19 0;
   }
     
  -.woody_cpCurrentMonthDate, .woody_cpOtherMonthDate, .woody_cpCurrentDate  {
  +.forms_cpCurrentMonthDate, .forms_cpOtherMonthDate, .forms_cpCurrentDate  {
       text-align:right;
       text-decoration:none;
   }
     
  -.woody_cpCurrentMonthDateDisabled, .woody_cpOtherMonthDateDisabled, .woody_cpCurrentDateDisabled
{
  +.forms_cpCurrentMonthDateDisabled, .forms_cpOtherMonthDateDisabled, .forms_cpCurrentDateDisabled
{
       color:#D0D0D0;
       text-align:right;
       text-decoration:line-through;
   }
     
  -.woody_cpCurrentMonthDate, .woody_cpCurrentDate {
  +.forms_cpCurrentMonthDate, .forms_cpCurrentDate {
       color:#000000;
   }
     
  -.woody_cpOtherMonthDate {
  +.forms_cpOtherMonthDate {
       color:#808080;
   }
     
  -TD.woody_cpCurrentDate {
  +TD.forms_cpCurrentDate {
       color:white; background-color: #C0C0C0;
       border-width:1;
       border:solid thin #800000;
   }
     
  -TD.woody_cpCurrentDateDisabled {
  +TD.forms_cpCurrentDateDisabled {
       border-width:1;
       border:solid thin #FFAAAA;
   }
     
  -TD.woody_cpTodayText, TD.woody_cpTodayTextDisabled {
  +TD.forms_cpTodayText, TD.forms_cpTodayTextDisabled {
       border:solid thin #C0C0C0;
       border-width:1 0 0 0;
   }
     
  -A.woody_cpTodayText, SPAN.woody_cpTodayTextDisabled {
  +A.forms_cpTodayText, SPAN.forms_cpTodayTextDisabled {
       height:20px;
   }
     
  -A.woody_cpTodayText {
  +A.forms_cpTodayText {
       color:black;
   }
     
  -.woody_cpTodayTextDisabled {
  +.forms_cpTodayTextDisabled {
       color:#D0D0D0;
   }
     
  -.woody_cpBorder {
  +.forms_cpBorder {
       border:solid thin #808080;
   }
  
  
  

Mime
View raw message