You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by gr...@apache.org on 2004/03/10 14:41:33 UTC
cvs commit: cocoon-lenya/src/webapp/lenya/xslt/authoring asset.xsl
gregor 2004/03/10 05:41:33
Modified: src/webapp/lenya/xslt/bxeng image.xsl asset.xsl
src/webapp/lenya/xslt/authoring asset.xsl
Log:
make warning message more legible for wrong filetype warning
Revision Changes Path
1.5 +6 -5 cocoon-lenya/src/webapp/lenya/xslt/bxeng/image.xsl
Index: image.xsl
===================================================================
RCS file: /home/cvs/cocoon-lenya/src/webapp/lenya/xslt/bxeng/image.xsl,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- image.xsl 10 Mar 2004 11:46:10 -0000 1.4
+++ image.xsl 10 Mar 2004 13:41:33 -0000 1.5
@@ -15,8 +15,9 @@
<xsl:param name="lenya.step"/>
<xsl:variable name="noimages"/>
<xsl:param name="error"/>
- <xsl:param name="extensions"
- select="'doc,dot,rtf,txt,asc,ascii,xls,xlw,xlt,ppt,pot,gif,jpg,png,tif,eps,pct,mu3,kar,mid,smf,mp3,swa,mpg,mpv,mp4,mov,bin,sea,hqx,sit,zip,jmx,jcl,qz,jbc,jmt,cfg'"/>
+
+ <xsl:param name="extensions" select="'doc dot rtf txt asc ascii xls xlw xlt ppt pot gif jpg png tif eps pct m3u kar mid smf mp3 swa mpg mpv mp4 mov bin sea hqx sit zip jmx jcl qz jbc jmt cfg pdf'"/>
+
<xsl:template match="lenya-info:assets">
<page:page>
<page:title>Insert Image</page:title>
@@ -43,7 +44,7 @@
function check(fileinput) {
var i = 0;
var ext = '<xsl:value-of select="$extensions"/>';
- var delimiter = ',';
+ var delimiter = ' ';
var thefile = fileinput["properties.asset.data"].value;
var _tempArray = new Array();
_tempArray = ext.split(delimiter);
@@ -52,7 +53,7 @@
return true;
}
} // file does not have one of the accepted extensions.
- alert("You tried to upload a file with an invalid extension. Valid extensions are <xsl:value-of select="$extensions"/>");
+ alert("You tried to upload a file with an invalid extension. Valid extensions are:\n\n<xsl:value-of select="$extensions"/>");
return false;
}
</script>
1.5 +4 -4 cocoon-lenya/src/webapp/lenya/xslt/bxeng/asset.xsl
Index: asset.xsl
===================================================================
RCS file: /home/cvs/cocoon-lenya/src/webapp/lenya/xslt/bxeng/asset.xsl,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- asset.xsl 14 Feb 2004 16:26:33 -0000 1.4
+++ asset.xsl 10 Mar 2004 13:41:33 -0000 1.5
@@ -22,7 +22,7 @@
<xsl:param name="error"/>
- <xsl:param name="extensions" select="'pdf,doc,dot,rtf,txt,asc,ascii,xls,xlw,xlt,ppt,pot,gif,jpg,png,tif,eps,pct,m3u,kar,mid,smf,mp3,swa,mpg,mpv,mp4,mov,bin,sea,hqx,sit,zip,jmx,jcl,qz,jbc,jmt,cfg'"/>
+ <xsl:param name="extensions" select="'doc dot rtf txt asc ascii xls xlw xlt ppt pot gif jpg png tif eps pct m3u kar mid smf mp3 swa mpg mpv mp4 mov bin sea hqx sit zip jmx jcl qz jbc jmt cfg pdf'"/>
<xsl:template match="lenya-info:assets">
<page:page>
@@ -39,7 +39,7 @@
function check(fileinput) {
var i = 0;
var ext = '<xsl:value-of select="$extensions"/>';
- var delimiter = ',';
+ var delimiter = ' ';
var thefile = fileinput["properties.asset.data"].value;
var _tempArray = new Array();
_tempArray = ext.split(delimiter);
@@ -52,7 +52,7 @@
}
}
// file does not have one of the accepted extensions.
- alert("You tried to upload a file with an invalid extension. Valid extensions are <xsl:value-of select="$extensions"/>");
+ alert("You tried to upload a file with an invalid extension. Valid extensions are:\n\n<xsl:value-of select="$extensions"/>");
return false;
}
</script>
1.36 +9 -5 cocoon-lenya/src/webapp/lenya/xslt/authoring/asset.xsl
Index: asset.xsl
===================================================================
RCS file: /home/cvs/cocoon-lenya/src/webapp/lenya/xslt/authoring/asset.xsl,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- asset.xsl 24 Feb 2004 18:49:16 -0000 1.35
+++ asset.xsl 10 Mar 2004 13:41:33 -0000 1.36
@@ -2,9 +2,13 @@
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:usecase="http://apache.org/cocoon/lenya/usecase/1.0"
- xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:lenya-info="http://apache.org/cocoon/lenya/info/1.0"
+ xmlns:wf="http://apache.org/cocoon/lenya/workflow/1.0"
+ xmlns:rc="http://apache.org/cocoon/lenya/rc/1.0"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
+ xmlns:usecase="http://apache.org/cocoon/lenya/usecase/1.0"
exclude-result-prefixes="lenya-info wf rc dc usecase"
>
@@ -20,7 +24,7 @@
<xsl:param name="error"/>
- <xsl:param name="extensions" select="'doc,dot,rtf,txt,asc,ascii,xls,xlw,xlt,ppt,pot,gif,jpg,png,tif,eps,pct,m3u,kar,mid,smf,mp3,swa,mpg,mpv,mp4,mov,bin,sea,hqx,sit,zip,jmx,jcl,qz,jbc,jmt,cfg,pdf'"/>
+ <xsl:param name="extensions" select="'doc dot rtf txt asc ascii xls xlw xlt ppt pot gif jpg png tif eps pct m3u kar mid smf mp3 swa mpg mpv mp4 mov bin sea hqx sit zip jmx jcl qz jbc jmt cfg pdf'"/>
<xsl:template match="/">
<page:page xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0">
@@ -82,7 +86,7 @@
function check(fileinput) {
var i = 0;
var ext = '<xsl:value-of select="$extensions"/>';
- var delimiter = ',';
+ var delimiter = ' ';
var thefile = fileinput["properties.asset.data"].value;
var _tempArray = new Array();
_tempArray = ext.split(delimiter);
@@ -96,7 +100,7 @@
}
}
// file does not have one of the accepted extensions.
- alert("You tried to upload a file with an invalid extension. Valid extensions are <xsl:value-of select="$extensions"/>");
+ alert("You tried to upload a file with an invalid extension. Valid extensions are:\n\n<xsl:value-of select="$extensions"/>");
return false;
}
</script>
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-cvs-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-cvs-help@cocoon.apache.org