mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
part two of checkin for checkpoint of demo for virgin money last week.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@3476 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* Copyright (C) 2005 Alfresco, Inc.
|
||||
*
|
||||
* Licensed under the Mozilla Public License version 1.1
|
||||
* with a permitted attribution clause. You may obtain a
|
||||
* copy of the License at
|
||||
*
|
||||
* http://www.alfresco.org/legal/license.txt
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
package org.alfresco.web.templating.xforms;
|
||||
|
||||
import java.io.*;
|
||||
import org.alfresco.web.templating.*;
|
||||
import org.chiba.xml.util.DOMUtil;
|
||||
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Node;
|
||||
|
||||
public class FreeMarkerOutputMethod
|
||||
implements TemplateOutputMethod
|
||||
{
|
||||
|
||||
public FreeMarkerOutputMethod()
|
||||
{
|
||||
}
|
||||
|
||||
public void generate(final Document xmlContent,
|
||||
final TemplateType tt,
|
||||
final Writer out)
|
||||
{
|
||||
}
|
||||
}
|
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
* Copyright (C) 2005 Alfresco, Inc.
|
||||
*
|
||||
* Licensed under the Mozilla Public License version 1.1
|
||||
* with a permitted attribution clause. You may obtain a
|
||||
* copy of the License at
|
||||
*
|
||||
* http://www.alfresco.org/legal/license.txt
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
package org.alfresco.web.templating.xforms;
|
||||
|
||||
import java.io.*;
|
||||
import org.alfresco.web.templating.*;
|
||||
import org.chiba.xml.util.DOMUtil;
|
||||
import javax.xml.parsers.ParserConfigurationException;
|
||||
import javax.xml.transform.Source;
|
||||
import javax.xml.transform.Templates;
|
||||
import javax.xml.transform.Transformer;
|
||||
import javax.xml.transform.TransformerConfigurationException;
|
||||
import javax.xml.transform.TransformerException;
|
||||
import javax.xml.transform.TransformerFactory;
|
||||
import javax.xml.transform.URIResolver;
|
||||
import javax.xml.transform.dom.DOMSource;
|
||||
import javax.xml.transform.sax.SAXTransformerFactory;
|
||||
import javax.xml.transform.sax.TransformerHandler;
|
||||
import javax.xml.transform.stream.StreamResult;
|
||||
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Node;
|
||||
import org.xml.sax.SAXException;
|
||||
|
||||
public class XSLTOutputMethod
|
||||
implements TemplateOutputMethod
|
||||
{
|
||||
|
||||
private final File file;
|
||||
|
||||
public XSLTOutputMethod(final File f)
|
||||
{
|
||||
this.file = f;
|
||||
}
|
||||
|
||||
public void generate(final Document xmlContent,
|
||||
final TemplateType tt,
|
||||
final Writer out)
|
||||
throws ParserConfigurationException,
|
||||
TransformerConfigurationException,
|
||||
TransformerException,
|
||||
SAXException,
|
||||
IOException
|
||||
{
|
||||
TransformerFactory tf = TransformerFactory.newInstance();
|
||||
TemplatingService ts = TemplatingService.getInstance();
|
||||
DOMSource source = new DOMSource(ts.parseXML(this.file));
|
||||
final Templates templates = tf.newTemplates(source);
|
||||
final Transformer t = templates.newTransformer();
|
||||
final StreamResult result = new StreamResult(out);
|
||||
t.transform(new DOMSource(xmlContent), result);
|
||||
}
|
||||
}
|
@@ -0,0 +1,85 @@
|
||||
<%--
|
||||
Copyright (C) 2005 Alfresco, Inc.
|
||||
|
||||
Licensed under the Mozilla Public License version 1.1
|
||||
with a permitted attribution clause. You may obtain a
|
||||
copy of the License at
|
||||
|
||||
http://www.alfresco.org/legal/license.txt
|
||||
|
||||
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.
|
||||
--%>
|
||||
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
|
||||
<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
|
||||
<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
|
||||
<%@ page import="java.io.*" %>
|
||||
<%@ page import="org.alfresco.web.bean.FileUploadBean" %>
|
||||
|
||||
<f:verbatim>
|
||||
<script type="text/javascript">
|
||||
function upload_file(el)
|
||||
{
|
||||
el.form.method = "post";
|
||||
el.form.enctype = "multipart/form-data";
|
||||
el.form.action = "<%= request.getContextPath() %>/uploadFileServlet";
|
||||
el.form.submit();
|
||||
}
|
||||
</script>
|
||||
</f:verbatim>
|
||||
|
||||
<h:panelGrid columns="1" cellpadding="2" style="padding-top: 4px; padding-bottom: 4px;"
|
||||
width="100%" rowClasses="wizardSectionHeading">
|
||||
<h:outputText value=" #{msg.general_properties}" escape="false" />
|
||||
</h:panelGrid>
|
||||
|
||||
<h:panelGrid id="panel_grid_3"
|
||||
columns="3" cellpadding="3" cellspacing="3" border="0"
|
||||
width="100%">
|
||||
<h:graphicImage value="/images/icons/required_field.gif" alt="Required Field" />
|
||||
<h:outputText id="panel_grid_3_output_text_1"
|
||||
value="Presentation Template Type:" escape="false" />
|
||||
<h:selectOneRadio value="#{WizardManager.bean.presentationTemplateType}">
|
||||
<f:selectItems value="#{WizardManager.bean.createPresentationTemplateTypes}"/>
|
||||
</h:selectOneRadio>
|
||||
|
||||
<h:graphicImage id="required_image_pt"
|
||||
value="/images/icons/required_field.gif" alt="Required Field" />
|
||||
<h:outputText id="output_text_pt"
|
||||
value="Presentation Template:"/>
|
||||
<h:column id="column_pt">
|
||||
<%
|
||||
FileUploadBean upload = (FileUploadBean)session.getAttribute(FileUploadBean.getKey("pt"));
|
||||
if (upload == null || upload.getFile() == null)
|
||||
{
|
||||
%>
|
||||
<f:verbatim>
|
||||
<input type="hidden" name="upload-id" value="pt"/>
|
||||
<input type="hidden" name="return-page" value="<%= request.getContextPath() %>/faces<%= request.getServletPath() %>"/>
|
||||
<input id="wizard:wizard-body:file-input" type="file" size="35" name="alfFileInput" onchange="javascript:upload_file(this)"/>
|
||||
</f:verbatim>
|
||||
<%
|
||||
} else {
|
||||
%>
|
||||
<h:outputText id="output_text_schema_name"
|
||||
value="#{WizardManager.bean.presentationTemplateFileName}"/>
|
||||
<h:outputText id="output_text_schema_space"
|
||||
value=" "
|
||||
escape="false"/>
|
||||
<a:actionLink id="action_link_remove_schema"
|
||||
image="/images/icons/delete.gif"
|
||||
value="#{msg.remove}"
|
||||
action="#{WizardManager.bean.removeUploadedPresentationTemplateFile}"
|
||||
showLink="false"
|
||||
target="top"/>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
</h:column>
|
||||
|
||||
</h:panelGrid>
|
@@ -1,142 +0,0 @@
|
||||
/* ***************************************************************************** */
|
||||
/* *** styles for Chiba website *** */
|
||||
body{
|
||||
background-color:white;
|
||||
font-family: Tahoma, Arial, Helvetica, sans-serif;
|
||||
}
|
||||
*{
|
||||
font-family: Tahoma, Arial, Helvetica, sans-serif;
|
||||
font-size:11px;
|
||||
color:black;
|
||||
}
|
||||
a:hover{color:#dd5300;}
|
||||
|
||||
td{
|
||||
font-family: Tahoma, Arial, Helvetica, sans-serif;
|
||||
}
|
||||
li{
|
||||
padding-right:10px;
|
||||
margin-bottom:2px;
|
||||
}
|
||||
.title{
|
||||
display:block;
|
||||
font-weight:bold;
|
||||
font-size:11px;
|
||||
margin-bottom:10px;
|
||||
}
|
||||
|
||||
.subtitle{
|
||||
display:block;
|
||||
font-weight:bold;
|
||||
margin-bottom:5px;
|
||||
border-bottom:thin solid #cccccc;
|
||||
margin-right:10px;
|
||||
color:#4C5C5C;
|
||||
}
|
||||
|
||||
.subtitle a{
|
||||
color:#4C5C5C;
|
||||
}
|
||||
|
||||
.para{
|
||||
display:block;
|
||||
margin-bottom:10px;
|
||||
margin-right:10px;
|
||||
}
|
||||
#dear{
|
||||
display:block;
|
||||
margin-bottom:2px;
|
||||
}
|
||||
|
||||
.donate{
|
||||
border-right:thin groove;
|
||||
width:110px;
|
||||
padding-top:10px;
|
||||
}
|
||||
#donation-text{
|
||||
font-weight:bold;
|
||||
display:block;
|
||||
font-size:8pt;
|
||||
padding:5px;
|
||||
}
|
||||
.donation-button{
|
||||
}
|
||||
|
||||
.donation-button:hover{
|
||||
border-color:orange;
|
||||
}
|
||||
|
||||
.content-area{
|
||||
padding-left:10px;
|
||||
padding-top:10px;
|
||||
background:white;
|
||||
border-right:thin groove;
|
||||
}
|
||||
|
||||
#news{
|
||||
padding-left:10px;
|
||||
padding-top:10px;
|
||||
width:150px;
|
||||
}
|
||||
.headline{
|
||||
border:thin solid;
|
||||
border-color:#4C5C5C;
|
||||
-moz-border-radius:6px;
|
||||
margin-bottom:5px;
|
||||
padding:3px;
|
||||
background:#FCF6E3;
|
||||
}
|
||||
.headline *{
|
||||
color:#4C5C5C;
|
||||
}
|
||||
.headline .para{
|
||||
font-style:italic;
|
||||
}
|
||||
.date{
|
||||
display:block;
|
||||
border-bottom:thin solid #4c5c5c;
|
||||
margin-bottom:3px;
|
||||
}
|
||||
#osi{
|
||||
display:block;
|
||||
border:thin solid;
|
||||
border-color:#4C5C5C;
|
||||
-moz-border-radius:6px;
|
||||
margin-bottom:5px;
|
||||
padding:3px;
|
||||
background:white;
|
||||
text-align:center;
|
||||
}
|
||||
#main{
|
||||
border:thin solid #4C5C5C;
|
||||
padding:10px;
|
||||
margin-bottom:10px;
|
||||
margin-right:10px;
|
||||
background:#FCF6D3;
|
||||
-moz-border-radius:6px;
|
||||
}
|
||||
|
||||
#main *{color:#4C5C5C;}
|
||||
#nav {
|
||||
border-bottom:thin groove #4C5C5C;
|
||||
}
|
||||
#footer{
|
||||
border-top:thin groove;
|
||||
padding-top:10px;
|
||||
}
|
||||
|
||||
.questions{
|
||||
display:block;
|
||||
margin-right:10px;
|
||||
margin-bottom:20px;
|
||||
border-bottom:thin groove;
|
||||
padding-bottom:10px;
|
||||
|
||||
}
|
||||
.questions a{
|
||||
margin-bottom:3px;
|
||||
}
|
||||
.answers .para{
|
||||
line-height:1.4;
|
||||
text-align:justify;
|
||||
}
|
Reference in New Issue
Block a user