mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
ExternalAccessServlet now supports launching Alfresco dialogs/wizards via URL, My Web Forms template improvements.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5585 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -15,21 +15,6 @@
|
|||||||
<script>
|
<script>
|
||||||
// create manager object for the pop-up summary panels
|
// create manager object for the pop-up summary panels
|
||||||
var TaskInfoMgr = new Alfresco.PanelManager("TaskInfoBean.sendTaskInfo", "taskId");
|
var TaskInfoMgr = new Alfresco.PanelManager("TaskInfoBean.sendTaskInfo", "taskId");
|
||||||
|
|
||||||
function taskMouseOver(el)
|
|
||||||
{
|
|
||||||
el._prevbg = el.style.backgroundColor;
|
|
||||||
el.style.backgroundColor = "#FFE500";
|
|
||||||
el.style.borderBottom = "1px solid #82770B";
|
|
||||||
el.style.borderTop = "1px solid #82770B";
|
|
||||||
}
|
|
||||||
|
|
||||||
function taskMouseOut(el)
|
|
||||||
{
|
|
||||||
el.style.backgroundColor = el._prevbg;
|
|
||||||
el.style.borderBottom = "1px solid #EBE398";
|
|
||||||
el.style.borderTop = "1px solid #FEF8BC";
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<#-- get the filter mode from the passed in args -->
|
<#-- get the filter mode from the passed in args -->
|
||||||
|
@@ -8,24 +8,49 @@
|
|||||||
<table cellspacing=0 cellpadding=0 border=0 class="formsTable">
|
<table cellspacing=0 cellpadding=0 border=0 class="formsTable">
|
||||||
<tr><td>
|
<tr><td>
|
||||||
<div id="formsPanel">
|
<div id="formsPanel">
|
||||||
|
<#assign formcount=0>
|
||||||
|
<#assign projectcount=0>
|
||||||
<#assign search="TYPE:\"{http://www.alfresco.org/model/wcmappmodel/1.0}webfolder\"">
|
<#assign search="TYPE:\"{http://www.alfresco.org/model/wcmappmodel/1.0}webfolder\"">
|
||||||
<#list companyhome.childrenByLuceneSearch[search] as wp>
|
<#list companyhome.childrenByLuceneSearch[search] as wp>
|
||||||
<#list wp.childAssocs["wca:webuser"] as user>
|
<#list wp.childAssocs["wca:webuser"] as user>
|
||||||
<#if user.properties["wca:username"] = person.properties.userName>
|
<#if user.properties["wca:username"] = person.properties.userName>
|
||||||
<div class="webProjectRow"><a class="webProjectLink" href="${url.context}${wp.url}">${wp.name}</a></div>
|
<#assign projectcount=projectcount+1>
|
||||||
|
<div class="webProjectRow">
|
||||||
|
<div class="webProjectTitle">
|
||||||
|
<#-- TEMP: ${url.context}/navigate/wizard/createWebsite -->
|
||||||
|
<a class="webProjectLink" href="${url.context}${wp.url}" target="new"><img src="${url.context}/images/icons/website_large.gif" width=32 height=32 border=0><span class="websiteLink">${wp.name}</span></a>
|
||||||
|
<#if wp.properties.description?exists && wp.properties.description?length!=0>
|
||||||
|
<br>
|
||||||
|
<span class="webprojectDesc">${wp.properties.description}</span>
|
||||||
|
</#if>
|
||||||
|
</div>
|
||||||
|
<div class="webProjectForms"> <#-- marker class for rollover script -->
|
||||||
<#if wp.childAssocs["wca:webform"]?exists>
|
<#if wp.childAssocs["wca:webform"]?exists>
|
||||||
|
<div class="formsRowSeparator"></div>
|
||||||
<#list wp.childAssocs["wca:webform"] as form>
|
<#list wp.childAssocs["wca:webform"] as form>
|
||||||
|
<#assign formcount=formcount+1>
|
||||||
<div class="formsRow">
|
<div class="formsRow">
|
||||||
${form.properties["wca:formname"]}
|
<img src="${url.context}/images/icons/webform_large.gif" width=32 height=32 border=0>
|
||||||
|
<span class="webformLink">${form.properties["wca:formname"]}</span>
|
||||||
|
<#--<span>${form.properties.description}</span>-->
|
||||||
</div>
|
</div>
|
||||||
</#list>
|
</#list>
|
||||||
</#if>
|
</#if>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</#if>
|
</#if>
|
||||||
</#list>
|
</#list>
|
||||||
</#list>
|
</#list>
|
||||||
</div>
|
</div>
|
||||||
</td></tr>
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<div class="formsFooter">
|
||||||
|
Showing ${formcount} form(s) in ${projectcount} web project(s)
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<STYLE type="text/css">
|
<STYLE type="text/css">
|
||||||
@@ -37,6 +62,7 @@
|
|||||||
|
|
||||||
#formsPanel
|
#formsPanel
|
||||||
{
|
{
|
||||||
|
height: 480px;
|
||||||
width: 716px;
|
width: 716px;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
@@ -50,19 +76,36 @@ a.webProjectLink:link, a.webProjectLink:visited, a.webProjectLink:hover
|
|||||||
}
|
}
|
||||||
|
|
||||||
.webProjectRow
|
.webProjectRow
|
||||||
|
{
|
||||||
|
background-color: #EEF7FB;
|
||||||
|
border-bottom: 1px solid #CCD4DB;
|
||||||
|
}
|
||||||
|
|
||||||
|
.webprojectDesc
|
||||||
|
{
|
||||||
|
color: #5A5741;
|
||||||
|
font-family: Trebuchet MS, Arial, Helvetica, sans-serif;
|
||||||
|
padding-left: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.webProjectTitle
|
||||||
{
|
{
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
border-top: 1px solid #CCD4DB;
|
}
|
||||||
|
|
||||||
|
.formsRowSeparator
|
||||||
|
{
|
||||||
|
border-bottom: 1px dotted #CCD4DB;
|
||||||
}
|
}
|
||||||
|
|
||||||
.formsRow, a.formsRow:link, a.formsRow:visited, a.formsRow:hover
|
.formsRow, a.formsRow:link, a.formsRow:visited, a.formsRow:hover
|
||||||
{
|
{
|
||||||
|
background-color: #F8FCFD;
|
||||||
color: #5A5741;
|
color: #5A5741;
|
||||||
font-family: Trebuchet MS, Arial, Helvetica, sans-serif;
|
font-family: Trebuchet MS, Arial, Helvetica, sans-serif;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
padding-left: 32px;
|
padding-left: 44px;
|
||||||
padding-top: 4px;
|
padding-top: 4px;
|
||||||
padding-bottom: 4px;
|
|
||||||
border-bottom: 1px solid #F8FCFD;
|
border-bottom: 1px solid #F8FCFD;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -70,12 +113,23 @@ a.webProjectLink:link, a.webProjectLink:visited, a.webProjectLink:hover
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
span.websiteLink
|
||||||
|
{
|
||||||
|
padding-left:8px;
|
||||||
|
vertical-align:60%;
|
||||||
|
}
|
||||||
|
|
||||||
|
span.webformLink
|
||||||
|
{
|
||||||
|
vertical-align:50%;
|
||||||
|
}
|
||||||
|
|
||||||
.formsFooter
|
.formsFooter
|
||||||
{
|
{
|
||||||
width: 700px;
|
width: 700px;
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
border: 1px solid #F8FCFD;
|
border: 1px solid #F8FCFD;
|
||||||
background-image: url();
|
background-image: url(../images/parts/doclist_footerbg.png);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: #515D6B;
|
color: #515D6B;
|
||||||
font-family: Trebuchet MS, Arial, Helvetica, sans-serif;
|
font-family: Trebuchet MS, Arial, Helvetica, sans-serif;
|
||||||
@@ -92,14 +146,6 @@ a.webProjectLink:link, a.webProjectLink:visited, a.webProjectLink:hover
|
|||||||
padding: 0px 8px 6px 8px;
|
padding: 0px 8px 6px 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.formsIcon
|
|
||||||
{
|
|
||||||
width: 32px;
|
|
||||||
float: left;
|
|
||||||
padding-left: 16px;
|
|
||||||
padding-top: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.formsDetail
|
.formsDetail
|
||||||
{
|
{
|
||||||
background-color: #CCE7F3;
|
background-color: #CCE7F3;
|
||||||
|
@@ -75,6 +75,8 @@ public class ExternalAccessServlet extends BaseServlet
|
|||||||
public final static String OUTCOME_BROWSE = "browse";
|
public final static String OUTCOME_BROWSE = "browse";
|
||||||
public final static String OUTCOME_MYALFRESCO = "myalfresco";
|
public final static String OUTCOME_MYALFRESCO = "myalfresco";
|
||||||
public final static String OUTCOME_LOGOUT = "logout";
|
public final static String OUTCOME_LOGOUT = "logout";
|
||||||
|
public final static String OUTCOME_DIALOG = "dialog";
|
||||||
|
public final static String OUTCOME_WIZARD = "wizard";
|
||||||
|
|
||||||
private static final String ARG_TEMPLATE = "template";
|
private static final String ARG_TEMPLATE = "template";
|
||||||
private static final String ARG_PAGE = "page";
|
private static final String ARG_PAGE = "page";
|
||||||
@@ -248,6 +250,14 @@ public class ExternalAccessServlet extends BaseServlet
|
|||||||
NavigationHandler navigationHandler = fc.getApplication().getNavigationHandler();
|
NavigationHandler navigationHandler = fc.getApplication().getNavigationHandler();
|
||||||
navigationHandler.handleNavigation(fc, null, outcome);
|
navigationHandler.handleNavigation(fc, null, outcome);
|
||||||
}
|
}
|
||||||
|
else if (OUTCOME_DIALOG.equals(outcome) || OUTCOME_WIZARD.equals(outcome))
|
||||||
|
{
|
||||||
|
if (args.length != 0)
|
||||||
|
{
|
||||||
|
NavigationHandler navigationHandler = fc.getApplication().getNavigationHandler();
|
||||||
|
navigationHandler.handleNavigation(fc, null, outcome + ':' + args[0]);
|
||||||
|
}
|
||||||
|
}
|
||||||
else if (OUTCOME_LOGOUT.equals(outcome))
|
else if (OUTCOME_LOGOUT.equals(outcome))
|
||||||
{
|
{
|
||||||
// special case for logout
|
// special case for logout
|
||||||
|
130
source/web/jsp/wizard/plain-container.jsp
Normal file
130
source/web/jsp/wizard/plain-container.jsp
Normal file
@@ -0,0 +1,130 @@
|
|||||||
|
<%--
|
||||||
|
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
||||||
|
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation; either version 2
|
||||||
|
* of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
* As a special exception to the terms and conditions of version 2.0 of
|
||||||
|
* the GPL, you may redistribute this Program in connection with Free/Libre
|
||||||
|
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
||||||
|
* FLOSS exception. You should have recieved a copy of the text describing
|
||||||
|
* the FLOSS exception, and it is also available here:
|
||||||
|
* http://www.alfresco.com/legal/licensing"
|
||||||
|
--%>
|
||||||
|
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
|
||||||
|
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
|
||||||
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
|
||||||
|
<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
|
||||||
|
<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
|
||||||
|
|
||||||
|
<%@ page buffer="32kb" contentType="text/html;charset=UTF-8" %>
|
||||||
|
<%@ page isELIgnored="false" %>
|
||||||
|
<%@ page import="org.alfresco.web.app.Application" %>
|
||||||
|
<%@ page import="org.alfresco.web.ui.common.PanelGenerator" %>
|
||||||
|
|
||||||
|
<r:page title="<%=Application.getWizardManager().getTitle() %>">
|
||||||
|
|
||||||
|
<f:view>
|
||||||
|
|
||||||
|
<%-- load a bundle of properties with I18N strings --%>
|
||||||
|
<f:loadBundle basename="alfresco.messages.webclient" var="msg"/>
|
||||||
|
|
||||||
|
<h:form acceptcharset="UTF-8" id="wizard">
|
||||||
|
|
||||||
|
<table cellspacing="0" cellpadding="3" border="0" width="100%">
|
||||||
|
<tr>
|
||||||
|
<td width="20%" valign="top">
|
||||||
|
<% PanelGenerator.generatePanelStart(out, request.getContextPath(), "greyround", "#F5F5F5"); %>
|
||||||
|
<h:outputText styleClass="mainSubTitle" value="#{msg.steps}"/><br>
|
||||||
|
<a:modeList itemSpacing="3" iconColumnWidth="2" selectedStyleClass="statusListHighlight"
|
||||||
|
value="#{WizardManager.currentStepAsString}" disabled="true">
|
||||||
|
<a:listItems value="#{WizardManager.stepItems}" />
|
||||||
|
</a:modeList>
|
||||||
|
<% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "greyround"); %>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td width="100%" valign="top">
|
||||||
|
|
||||||
|
<a:errors message="#{WizardManager.errorMessage}" styleClass="errorMessage" />
|
||||||
|
|
||||||
|
<% PanelGenerator.generatePanelStart(out, request.getContextPath(), "white", "white"); %>
|
||||||
|
<table cellpadding="2" cellspacing="2" border="0" width="100%">
|
||||||
|
<tr>
|
||||||
|
<td class="mainSubTitle"><h:outputText value="#{WizardManager.stepTitle}" /></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="mainSubText"><h:outputText value="#{WizardManager.stepDescription}" /></td>
|
||||||
|
</tr>
|
||||||
|
<tr><td class="paddingRow"></td></tr>
|
||||||
|
<tr>
|
||||||
|
<td width="100%" valign="top">
|
||||||
|
<f:subview id="wizard-body">
|
||||||
|
<jsp:include page="<%=Application.getWizardManager().getPage() %>" />
|
||||||
|
</f:subview>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr><td class="paddingRow"></td></tr>
|
||||||
|
<tr>
|
||||||
|
<td><h:outputText value="#{WizardManager.stepInstructions}" /></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "white"); %>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td valign="top">
|
||||||
|
<% PanelGenerator.generatePanelStart(out, request.getContextPath(), "greyround", "#F5F5F5"); %>
|
||||||
|
<table cellpadding="1" cellspacing="1" border="0">
|
||||||
|
<tr>
|
||||||
|
<td align="center">
|
||||||
|
<h:commandButton id="next-button" styleClass="wizardButton"
|
||||||
|
value="#{WizardManager.nextButtonLabel}"
|
||||||
|
action="#{WizardManager.next}"
|
||||||
|
disabled="#{WizardManager.nextButtonDisabled}" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center">
|
||||||
|
<h:commandButton id="back-button" styleClass="wizardButton"
|
||||||
|
value="#{WizardManager.backButtonLabel}"
|
||||||
|
action="#{WizardManager.back}"
|
||||||
|
disabled="#{WizardManager.backButtonDisabled}" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center">
|
||||||
|
<h:commandButton id="finish-button" styleClass="wizardButton"
|
||||||
|
value="#{WizardManager.finishButtonLabel}"
|
||||||
|
action="#{WizardManager.finish}"
|
||||||
|
disabled="#{WizardManager.finishButtonDisabled}" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr><td class="wizardButtonSpacing"></td></tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center">
|
||||||
|
<h:commandButton id="cancel-button" styleClass="wizardButton"
|
||||||
|
value="#{WizardManager.cancelButtonLabel}"
|
||||||
|
action="#{WizardManager.cancel}" immediate="true" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "greyround"); %>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</h:form>
|
||||||
|
|
||||||
|
</f:view>
|
||||||
|
|
||||||
|
</r:page>
|
@@ -15,8 +15,8 @@ var MyTasks = {
|
|||||||
var infos = $$('#taskPanel .taskInfo');
|
var infos = $$('#taskPanel .taskInfo');
|
||||||
var details = $$('#taskPanel .taskDetail');
|
var details = $$('#taskPanel .taskDetail');
|
||||||
var resources = $$('#taskPanel .taskResources');
|
var resources = $$('#taskPanel .taskResources');
|
||||||
var fxInfo = new Fx.Elements(infos, {wait: false, duration: 500, transition: Fx.Transitions.linear});
|
var fxInfo = new Fx.Elements(infos, {wait: false, duration: 300, transition: Fx.Transitions.linear});
|
||||||
var fxDetail = new Fx.Elements(details, {wait: false, duration: 500, transition: Fx.Transitions.linear,
|
var fxDetail = new Fx.Elements(details, {wait: false, duration: 300, transition: Fx.Transitions.linear,
|
||||||
onComplete: function()
|
onComplete: function()
|
||||||
{
|
{
|
||||||
// event handler to ensure
|
// event handler to ensure
|
||||||
|
Reference in New Issue
Block a user