cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jer...@apache.org
Subject cvs commit: xml-cocoon2/src/scratchpad/webapp/mount/editor/editor/stylesheets editor-alpha-components.xsl editor-bravo-components.xsl editor-page2html.xsl
Date Mon, 18 Mar 2002 18:27:52 GMT
jeremy      02/03/18 10:27:51

  Modified:    src/scratchpad/webapp/mount/editor/editor/docs
                        alpha-config.xml bravo-config.xml
               src/scratchpad/webapp/mount/editor/editor/stylesheets
                        editor-alpha-components.xsl
                        editor-bravo-components.xsl editor-page2html.xsl
  Log:
  updated preview behaviour, uses a hidden form in the preview page
  
  Revision  Changes    Path
  1.4       +2 -1      xml-cocoon2/src/scratchpad/webapp/mount/editor/editor/docs/alpha-config.xml
  
  Index: alpha-config.xml
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/webapp/mount/editor/editor/docs/alpha-config.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- alpha-config.xml	17 Mar 2002 21:26:55 -0000	1.3
  +++ alpha-config.xml	18 Mar 2002 18:27:51 -0000	1.4
  @@ -38,7 +38,8 @@
   <!-- text for form buttons -->	
   	<button behaviour="new" tip="This will create a new file at the location specified
in the 'Save as' field">Make New File</button>
   	<button behaviour="get" tip="View the result of your changes, without overwriting the
original">Preview My Changes</button>
  -	<button behaviour="pre" tip="Your changes will written">Save My Changes</button>
  +	<button behaviour="pre" tip="Your changes will written">Save</button>
  +	<button behaviour="back" tip="You can re-edit the form">Cancel</button>
   
   <!-- the tools available to each behaviour -->
   	<tools behaviour="new">
  
  
  
  1.5       +3 -2      xml-cocoon2/src/scratchpad/webapp/mount/editor/editor/docs/bravo-config.xml
  
  Index: bravo-config.xml
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/webapp/mount/editor/editor/docs/bravo-config.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- bravo-config.xml	17 Mar 2002 21:26:55 -0000	1.4
  +++ bravo-config.xml	18 Mar 2002 18:27:51 -0000	1.5
  @@ -25,7 +25,7 @@
   	<notes behaviour="put">Thanks for using &lt;slash-edit/&gt;</notes>
   	<notes behaviour="see">This is the editor-view of your Document, internal links
are not likely to work correctly.</notes>
   	<notes behaviour="dir">Please choose a Document to view in the editor</notes>
  -	<notes behaviour="pre">Please confirm your changes, or fix your mistakes</notes>
  +	<notes behaviour="pre">Please confirm your changes</notes>
   
   <!-- The commands -->
   	<command behaviour="new" tip="Make a new Document" icon="new.gif">new(bravo)</command>
  @@ -38,7 +38,8 @@
   <!-- text for form buttons -->	
   	<button behaviour="new" tip="This will create a new document at the location specified
in the 'Save as' field">Make New Document</button>
   	<button behaviour="get" tip="View the result of your changes, without overwriting the
original">Preview My Changes</button>
  -	<button behaviour="pre" tip="Your changes will written">Save My Changes</button>
  +	<button behaviour="pre" tip="Your changes will written">Yes</button>
  +	<button behaviour="back" tip="You can re-edit the form">No</button>
   
   <!-- the tools available to each behaviour -->
   	<tools behaviour="new">
  
  
  
  1.5       +8 -17     xml-cocoon2/src/scratchpad/webapp/mount/editor/editor/stylesheets/editor-alpha-components.xsl
  
  Index: editor-alpha-components.xsl
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/webapp/mount/editor/editor/stylesheets/editor-alpha-components.xsl,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- editor-alpha-components.xsl	17 Mar 2002 21:26:55 -0000	1.4
  +++ editor-alpha-components.xsl	18 Mar 2002 18:27:51 -0000	1.5
  @@ -49,27 +49,18 @@
   		<br/>
   		<table bgcolor="#0086B2" border="0" cellspacing="1" cellpadding="5">
   			<tr>
  -				<td class="block-title" colspan="2">Confirm</td>
  +				<td class="notes" colspan="2">Confirm</td>
   			</tr>
   			<tr>
  -				<td bgcolor="white">
  +				<td bgcolor="white" align="right">Are you sure you want to save these changes?

   					<form method="post">
   						<xsl:attribute name="action"><xsl:value-of select="$command-base"/><xsl:value-of
select="$config/command[@behaviour = 'put']"/></xsl:attribute>
  -						<table border="0" cellspacing="0" cellpadding="5" width="100%">
  -							<tr>
  -								<td colspan="2"><span class="block-title">XML content: </span><br/><textarea
name="{$config/xml-field-name}" rows="6" cols="80" xml:space="preserve" onchange="changed=true;"><xsl:apply-templates
select="."/> </textarea></td>
  -							</tr>
  -							<tr>
  -								<td valign="middle">
  -									<span class="block-title">Save as: </span><br/><input type="text"
name="target" value="{$newfile}" size="40" title="Note: to make a new directory, prepend the
filename with a directory path"/>
  -								</td>
  -								<td align="right">
  -									<input type="hidden" name="xml-field-name" value="{$config/xml-field-name}"/>
  -									<input class="submit" type="submit" value="{$config/button[@behaviour = $behaviour]}"/>
  -								</td>
  -							</tr>
  -						</table>						
  -					</form>
  +						<input type="button" value="{$config/button[@behaviour = 'back']}" onClick="history.back()"
title="{$config/button[@behaviour = 'back']/@tip}" class="button"/> 
  +						<textarea class="hidden" name="{$config/xml-field-name}" xml:space="preserve"
onchange="changed=true;"><xsl:apply-templates select="."/> </textarea>
  +						<input name="target" type="hidden" value="{$newfile}"/>
  +						<input type="hidden" name="xml-field-name" value="{$config/xml-field-name}"/>
  +						<input name="{$config/button[@behaviour = $behaviour]}" class="submit" type="submit"
title="{$config/button[@behaviour = $behaviour]/@tip}" value="{$config/button[@behaviour =
$behaviour]}"/>
  +					</form>	
   				</td>
   			</tr>
   		</table>
  
  
  
  1.5       +14 -19    xml-cocoon2/src/scratchpad/webapp/mount/editor/editor/stylesheets/editor-bravo-components.xsl
  
  Index: editor-bravo-components.xsl
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/webapp/mount/editor/editor/stylesheets/editor-bravo-components.xsl,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- editor-bravo-components.xsl	17 Mar 2002 21:26:55 -0000	1.4
  +++ editor-bravo-components.xsl	18 Mar 2002 18:27:51 -0000	1.5
  @@ -49,31 +49,19 @@
   		 <tr><td bgcolor="white"><xsl:apply-templates mode="editor-view"/></td></tr>
   		</table>
   		<br/>
  -		
   		<table bgcolor="#0086B2" border="0" cellspacing="1" cellpadding="5">
   			<tr>
   				<td class="notes" colspan="2">Confirm</td>
   			</tr>
   			<tr>
  -				<td bgcolor="white">
  +				<td bgcolor="white" align="right">Are you sure you want to save these changes?

   					<form method="post">
   						<xsl:attribute name="action"><xsl:value-of select="$command-base"/><xsl:value-of
select="$config/command[@behaviour = 'put']"/></xsl:attribute>
  -						<table border="0" cellspacing="0" cellpadding="5" width="100%">
  -							<tr>
  -								<td><span class="block-title">Title: </span><br/><input
name="title" size="40"  onchange="changed=true;" value="{normalize-space(title)}"/></td>
  -							</tr>
  -							<tr>
  -								<td colspan="2"><span class="block-title">Body: </span><br/><textarea
name="content" rows="6" cols="80" xml:space="preserve" onchange="changed=true;"><xsl:apply-templates
select="content/*" mode="bravo"/> </textarea></td>
  -							</tr>
  -							<tr>
  -								<td valign="middle">
  -									<span class="block-title">Save as: </span><br/><input type="text"
name="target" value="{$newfile}" size="40" title="Note: to make a new directory, prepend the
filename with a directory path"/>
  -								</td>
  -								<td align="right">
  -									<input class="submit" type="submit" value="{$config/button[@behaviour = $behaviour]}"/>
  -								</td>
  -							</tr>
  -						</table>						
  +						<input type="button" value="{$config/button[@behaviour = 'back']}" onClick="history.back()"
title="{$config/button[@behaviour = 'back']/@tip}" class="button"/> 
  +						<input name="title" type="hidden" value="{normalize-space(title)}"/>
  +						<textarea class="hidden" name="content" xml:space="preserve" onchange="changed=true;"><xsl:apply-templates
select="content/*" mode="bravo"/> </textarea>
  +						<input name="target" type="hidden" value="{$newfile}"/>
  +						<input name="{$config/button[@behaviour = $behaviour]}" class="submit" type="submit"
value="{$config/button[@behaviour = $behaviour]}"/>
   					</form>	
   				</td>
   			</tr>
  @@ -81,7 +69,14 @@
   		<br/>
     </xsl:template>
   
  -	<xsl:template match="para" mode="bravo"><!-- also strips 'br' tags, so they need
a CR after them to survive! -->
  +	<!--<xsl:template match="b|i|a|strong|em|ul|ol|li" mode="bravo"><xsl:copy><xsl:apply-templates
select="@*|*|text()"/></xsl:copy></xsl:template>
  +
  +	<xsl:template match="br" mode="bravo">
  +		<xsl:text>
  +</xsl:text>
  +	</xsl:template>-->
  +
  +	<xsl:template match="para" mode="bravo"><!-- strips 'br' tags, so they need a
CR after them to survive! -->
   		<xsl:value-of select="."/>
   		<xsl:text>
   
  
  
  
  1.7       +13 -5     xml-cocoon2/src/scratchpad/webapp/mount/editor/editor/stylesheets/editor-page2html.xsl
  
  Index: editor-page2html.xsl
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/webapp/mount/editor/editor/stylesheets/editor-page2html.xsl,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- editor-page2html.xsl	17 Mar 2002 21:26:55 -0000	1.6
  +++ editor-page2html.xsl	18 Mar 2002 18:27:51 -0000	1.7
  @@ -8,6 +8,9 @@
   
    >
   
  +
  +
  +
   	<!-- 
   		This is the main Editor Stylesheet
   		It adapts itself to the particular command being sent in the structure of the XML.
  @@ -37,7 +40,10 @@
   					}
   					//return false;
   				}]]>
  -				<xsl:if test="editor/validationResult/pattern/error">changed = true;</xsl:if>
  +				<xsl:choose><!-- check user exiting, while the changes are still not saved
-->
  +					<xsl:when test="editor/validationResult/pattern/error">changed = true;</xsl:when>
  +					<xsl:when test="$behaviour = 'pre'">changed = true;</xsl:when>
  +				</xsl:choose>
   			</script>
       </xsl:if>
       
  @@ -50,12 +56,14 @@
   			.notify{font-size:15px;background:white;}
   			.notes{font-size:12px;font-weight:bold;color:white;background:#0086B2}
   			.result{font-size:12px;color:black;background:white}
  -			.failure{font-size:12px;font-weight:bold;color:red}
  +			.failure{font-size:12px;font-weight:bold;color:#BB0000}
   			.success{font-size:12px;font-weight:bold;color:green}
   			.caption{font-size:12px;font-weight:bold;color:black;}
  -			textarea{background-color:#EEFFFF;font-size:12px;font-family : geneva,arial,sans-serif;border-color:#0086B2;border-width:1px;padding;1px;}
  -			input{background-color:#EEFFFF;font-size:12px;font-family : geneva,arial,sans-serif;font-weight;border-color:#0086B2;border-width:1px;padding-left;3px;}
  -			input.submit{background-color:#0086B2;font-size:12px;font-family:geneva,arial,sans-serif;border-color:black;border-width:1px;padding;10px;font-weight:bold;color:white;}
  +			textarea{background-color:#EEFFFF;font-size:12px;font-family:geneva,arial,sans-serif;border-color:#0086B2;border-width:1px;padding-left:2px;}
  +			textarea.hidden{display:none;}
  +			input{background-color:#EEFFFF;font-size:12px;font-family:geneva,arial,sans-serif;border-color:#0086B2;border-width:1px;padding-left:2px;}
  +			input.submit{background-color:#0086B2;font-size:12px;font-family:geneva,arial,sans-serif;border-color:black;border-width:1px;padding:2px
6px;margin:10px;font-weight:bold;color:white;}
  +			input.button{background-color:#BB0000;font-size:12px;font-family:geneva,arial,sans-serif;border-color:black;border-width:1px;padding:2px
6px;margin:10px;font-weight:bold;color:white;}
   			.block-title{font-size:12px;font-weight:bold;color:white;background:#0086B2;padding:4px;}
   			.row{background:#EEFFFF;}
   
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message