. Multiple webapp folders now supported for a Web Project

- Creation of new root webapp folders via specific action or via Edit Web Project wizard
 - Modification of default webapp folder in Edit Web Project wizard
 - Switching of 'current' webapp for staging/sandbox views in the browse web project screen
 - Filtering of files in sandbox modified file list by current webapp
 - Submit All action correctly respects the current webapp
. A few minor UI tweaks to placement of menus and actions in web project/sandbox views

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4594 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2006-12-13 14:57:08 +00:00
parent c628234147
commit d9e7a9e5ad
20 changed files with 413 additions and 85 deletions

View File

@@ -931,6 +931,7 @@ create_form_content=Create Content
recent_snapshots=Recent Snapshots recent_snapshots=Recent Snapshots
snapshot_revert=Revert snapshot_revert=Revert
snapshot_preview=Preview snapshot_preview=Preview
webapp_current=Current Webapp Folder
# Website actions and dialog messages # Website actions and dialog messages
title_import_content=Import Content into Website title_import_content=Import Content into Website
@@ -974,6 +975,9 @@ submit_no_workflow_warning=No suitable workflows could be found for the modified
submit_submit_info=The following items will be submitted submit_submit_info=The following items will be submitted
submit_items_title=Submit Items submit_items_title=Submit Items
submit_items_desc=This page helps you to submit modified items for publishing on the website. submit_items_desc=This page helps you to submit modified items for publishing on the website.
create_webapp=Create Webapp Folder
create_webapp_title=Create Webapp Folder
create_webapp_desc=Create a new root Webapp folder for this web project
# New User Wizard messages # New User Wizard messages
new_user_title=New User Wizard new_user_title=New User Wizard

View File

@@ -181,6 +181,10 @@
<dialog name="submitSandboxItems" page="/jsp/wcm/submit-dialog.jsp" managed-bean="SubmitDialog" <dialog name="submitSandboxItems" page="/jsp/wcm/submit-dialog.jsp" managed-bean="SubmitDialog"
icon="/images/icons/submit_large.gif" title-id="submit_items_title" icon="/images/icons/submit_large.gif" title-id="submit_items_title"
description-id="submit_items_desc" /> description-id="submit_items_desc" />
<dialog name="createWebappFolder" page="/jsp/wcm/create-webapp.jsp" managed-bean="CreateWebappDialog"
icon="/images/icons/create_webapp_large.gif" title-id="create_webapp_title"
description-id="create_webapp_desc" />
</dialogs> </dialogs>
</config> </config>

View File

@@ -135,6 +135,16 @@
<action>dialog:createAvmFolder</action> <action>dialog:createAvmFolder</action>
</action> </action>
<!-- Create AVM webapp folder -->
<action id="create_webapp">
<permissions>
<permission allow="true">CreateChildren</permission>
</permissions>
<label-id>create_webapp</label-id>
<image>/images/icons/create_webapp.gif</image>
<action>dialog:createWebappFolder</action>
</action>
<!-- Upload Content --> <!-- Upload Content -->
<action id="add_content"> <action id="add_content">
<permissions> <permissions>
@@ -206,7 +216,7 @@
<!-- Edit Web Project wizard --> <!-- Edit Web Project wizard -->
<action id="edit_website"> <action id="edit_website">
<permissions> <permissions>
<permission allow="true">Write</permission> <permission allow="true">Write,CreateChildren</permission>
</permissions> </permissions>
<label-id>edit_website</label-id> <label-id>edit_website</label-id>
<image>/images/icons/edit_website.gif</image> <image>/images/icons/edit_website.gif</image>
@@ -308,6 +318,7 @@
<!-- Actions Menu for More Actions in Web Project screen --> <!-- Actions Menu for More Actions in Web Project screen -->
<action-group id="browse_website_menu"> <action-group id="browse_website_menu">
<action idref="details_space" /> <action idref="details_space" />
<action idref="create_webapp" />
<action idref="edit_website" /> <action idref="edit_website" />
<action idref="invite_website_users" /> <action idref="invite_website_users" />
<action idref="delete_space" /> <action idref="delete_space" />

View File

@@ -29,6 +29,7 @@ import java.util.ResourceBundle;
import javax.faces.application.FacesMessage; import javax.faces.application.FacesMessage;
import javax.faces.context.FacesContext; import javax.faces.context.FacesContext;
import javax.faces.event.ActionEvent; import javax.faces.event.ActionEvent;
import javax.faces.model.SelectItem;
import javax.transaction.UserTransaction; import javax.transaction.UserTransaction;
import org.alfresco.model.WCMAppModel; import org.alfresco.model.WCMAppModel;
@@ -110,11 +111,22 @@ public class AVMBrowseBean implements IContextListener
/** Snapshot date filter selection */ /** Snapshot date filter selection */
private String snapshotDateFilter = UISandboxSnapshots.FILTER_DATE_TODAY; private String snapshotDateFilter = UISandboxSnapshots.FILTER_DATE_TODAY;
/** Current sandbox store context for actions and sandbox view */
private String sandbox; private String sandbox;
/** Current username context for actions and sandbox view */
private String username; private String username;
/** Current webapp context for actions and sandbox view */
private String webapp;
/** Sandbox title message */
private String sandboxTitle = null; private String sandboxTitle = null;
/** Current AVM path and node representing the current path */
private String currentPath = null; private String currentPath = null;
private AVMNode currentPathNode = null; private AVMNode currentPathNode = null;
private boolean submitAll = false; private boolean submitAll = false;
/* component references */ /* component references */
@@ -419,6 +431,41 @@ public class AVMBrowseBean implements IContextListener
this.username = username; this.username = username;
} }
/**
* @return current webapp context
*/
public String getWebapp()
{
if (this.webapp == null)
{
this.webapp = (String)getWebsite().getProperties().get(WCMAppModel.PROP_DEFAULTWEBAPP);
}
return this.webapp;
}
/**
* @param webapp Webapp folder context
*/
public void setWebapp(String webapp)
{
this.webapp = webapp;
}
/**
* @return list of available root webapp folders for this Web project
*/
public List<SelectItem> getWebapps()
{
String path = AVMConstants.buildAVMStoreRootPath(getStagingStore());
Map<String, AVMNodeDescriptor> folders = this.avmService.getDirectoryListing(-1, path);
List<SelectItem> webapps = new ArrayList<SelectItem>(folders.size());
for (AVMNodeDescriptor node : folders.values())
{
webapps.add(new SelectItem(node.getName(), node.getName()));
}
return webapps;
}
/** /**
* @return Returns the sandboxTitle. * @return Returns the sandboxTitle.
*/ */
@@ -511,8 +558,7 @@ public class AVMBrowseBean implements IContextListener
{ {
if (this.currentPath == null) if (this.currentPath == null)
{ {
String webapp = (String)getWebsite().getProperties().get(WCMAppModel.PROP_DEFAULTWEBAPP); this.currentPath = AVMConstants.buildAVMStoreWebappPath(getSandbox(), getWebapp());
this.currentPath = AVMConstants.buildAVMStoreWebappPath(getSandbox(), webapp);
} }
return this.currentPath; return this.currentPath;
} }

View File

@@ -42,8 +42,8 @@ public class CreateFolderDialog extends BaseDialogBean
protected AVMService avmService; protected AVMService avmService;
protected AVMBrowseBean avmBrowseBean; protected AVMBrowseBean avmBrowseBean;
private String name; protected String name;
private String description; protected String description;
/** /**

View File

@@ -354,7 +354,7 @@ public class CreateWebContentWizard extends BaseContentWizard
List<AVMDifference> diffs = new ArrayList<AVMDifference>(8); List<AVMDifference> diffs = new ArrayList<AVMDifference>(8);
// construct diffs for selected items for submission // construct diffs for selected items for submission
String webapp = (String)website.getProperties().get(WCMAppModel.PROP_DEFAULTWEBAPP); String webapp = this.avmBrowseBean.getWebapp();
String sandboxPath = AVMConstants.buildAVMStoreRootPath(this.avmBrowseBean.getSandbox()); String sandboxPath = AVMConstants.buildAVMStoreRootPath(this.avmBrowseBean.getSandbox());
if (form) if (form)
{ {

View File

@@ -0,0 +1,55 @@
/*
* 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.bean.wcm;
import javax.faces.context.FacesContext;
import org.alfresco.model.ApplicationModel;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.avm.AVMNodeConverter;
import org.alfresco.service.cmr.repository.NodeRef;
/**
* Bean implementation for the AVM "Create Webapp Folder" dialog.
*
* @author Kevin Roast
*/
public class CreateWebappDialog extends CreateFolderDialog
{
// ------------------------------------------------------------------------------
// Dialog implementation
/**
* @see org.alfresco.web.bean.dialog.BaseDialogBean#finishImpl(javax.faces.context.FacesContext, java.lang.String)
*/
@Override
protected String finishImpl(FacesContext context, String outcome) throws Exception
{
String parent = AVMConstants.buildAVMStoreRootPath(this.avmBrowseBean.getStagingStore());
this.avmService.createDirectory(parent, this.name);
String path = parent + '/' + this.name;
NodeRef nodeRef = AVMNodeConverter.ToNodeRef(-1, path);
this.nodeService.addAspect(nodeRef, ApplicationModel.ASPECT_UIFACETS, null);
if (this.description != null && this.description.length() != 0)
{
this.nodeService.setProperty(nodeRef, ContentModel.PROP_DESCRIPTION, this.description);
}
return outcome;
}
}

View File

@@ -177,7 +177,19 @@ public class EditWebsiteWizard extends CreateWebsiteWizard
// can be used to apply the modified and previous settings from scratch // can be used to apply the modified and previous settings from scratch
clearWebProjectModel(nodeRef); clearWebProjectModel(nodeRef);
// TODO: add the ability to change/rename the root webapp and DNS name for the website // change/create the root webapp name for the website
if (this.webapp != null && this.webapp.length() != 0)
{
String stagingStore = AVMConstants.buildAVMStagingStoreName(this.dnsName);
String webappPath = AVMConstants.buildAVMStoreWebappPath(stagingStore, this.webapp);
if (this.avmService.lookup(-1, webappPath) == null)
{
this.avmService.createDirectory(AVMConstants.buildAVMStoreRootPath(stagingStore), this.webapp);
}
this.nodeService.setProperty(nodeRef, WCMAppModel.PROP_DEFAULTWEBAPP, this.webapp);
}
// TODO: allow change of dns name - via store rename functionality
// persist the forms, templates, workflows and workflow defaults to the model for this web project // persist the forms, templates, workflows and workflow defaults to the model for this web project
saveWebProjectModel(nodeRef); saveWebProjectModel(nodeRef);

View File

@@ -79,6 +79,7 @@ public class ImportWebsiteDialog
protected FileFolderService fileFolderService; protected FileFolderService fileFolderService;
protected ContentService contentService; protected ContentService contentService;
protected NavigationBean navigationBean; protected NavigationBean navigationBean;
protected AVMBrowseBean avmBrowseBean;
protected AVMService avmService; protected AVMService avmService;
protected NodeService nodeService; protected NodeService nodeService;
@@ -107,6 +108,14 @@ public class ImportWebsiteDialog
this.navigationBean = navigationBean; this.navigationBean = navigationBean;
} }
/**
* @param avmBrowseBean The AVMBrowseBean to set.
*/
public void setAvmBrowseBean(AVMBrowseBean avmBrowseBean)
{
this.avmBrowseBean = avmBrowseBean;
}
/** /**
* @param avmService The AVMService to set. * @param avmService The AVMService to set.
*/ */
@@ -203,7 +212,7 @@ public class ImportWebsiteDialog
// import the content into the appropriate store for the website // import the content into the appropriate store for the website
Node website = this.navigationBean.getCurrentNode(); Node website = this.navigationBean.getCurrentNode();
String storeRoot = (String)website.getProperties().get(WCMAppModel.PROP_AVMSTORE); String storeRoot = (String)website.getProperties().get(WCMAppModel.PROP_AVMSTORE);
String webapp = (String)website.getProperties().get(WCMAppModel.PROP_DEFAULTWEBAPP); String webapp = this.avmBrowseBean.getWebapp();
if (storeRoot != null && webapp != null) if (storeRoot != null && webapp != null)
{ {
String store = AVMConstants.buildAVMStagingStoreName(storeRoot); String store = AVMConstants.buildAVMStagingStoreName(storeRoot);

View File

@@ -427,9 +427,10 @@ public class SubmitDialog extends BaseDialogBean
List<AVMNodeDescriptor> selected; List<AVMNodeDescriptor> selected;
if (this.avmBrowseBean.getSubmitAll()) if (this.avmBrowseBean.getSubmitAll())
{ {
String userStore = this.avmBrowseBean.getSandbox() + ":/"; String webapp = this.avmBrowseBean.getWebapp();
String stagingStore = this.avmBrowseBean.getStagingStore() + ":/"; String userStore = AVMConstants.buildAVMStoreWebappPath(this.avmBrowseBean.getSandbox(), webapp);
List<AVMDifference> diffs = avmSyncService.compare(-1, userStore, -1, stagingStore, nameMatcher); String stagingStore = AVMConstants.buildAVMStoreWebappPath(this.avmBrowseBean.getStagingStore(), webapp);
List<AVMDifference> diffs = this.avmSyncService.compare(-1, userStore, -1, stagingStore, nameMatcher);
selected = new ArrayList<AVMNodeDescriptor>(diffs.size()); selected = new ArrayList<AVMNodeDescriptor>(diffs.size());
for (AVMDifference diff : diffs) for (AVMDifference diff : diffs)
{ {

View File

@@ -130,6 +130,9 @@ public class UIUserSandboxes extends SelfRenderingComponent
/** website to show sandboxes for */ /** website to show sandboxes for */
private NodeRef value; private NodeRef value;
/** webapp to filter list by */
private String webapp;
/** cached converter instance */ /** cached converter instance */
private ByteSizeConverter sizeConverter = null; private ByteSizeConverter sizeConverter = null;
@@ -472,28 +475,29 @@ public class UIUserSandboxes extends SelfRenderingComponent
DateFormat df = Utils.getDateTimeFormat(fc); DateFormat df = Utils.getDateTimeFormat(fc);
ResourceBundle bundle = Application.getBundle(fc); ResourceBundle bundle = Application.getBundle(fc);
// build the paths to the stores to compare // build the paths to the stores to compare - filter by current webapp
String userStorePrefix = AVMConstants.buildAVMUserMainStoreName(storeRoot, username); String userStore = AVMConstants.buildAVMUserMainStoreName(storeRoot, username);
String userStore = userStorePrefix + ":/"; String userStorePath = AVMConstants.buildAVMStoreWebappPath(userStore, getWebapp());
String stagingStore = AVMConstants.buildAVMStagingStoreName(storeRoot) + ":/"; String stagingStore = AVMConstants.buildAVMStagingStoreName(storeRoot);
String stagingStorePath = AVMConstants.buildAVMStoreWebappPath(stagingStore, getWebapp());
// info we need to calculate preview paths for assets // info we need to calculate preview paths for assets
String dns = AVMConstants.lookupStoreDNS(userStorePrefix); String dns = AVMConstants.lookupStoreDNS(userStore);
int rootPathIndex = AVMConstants.buildAVMStoreRootPath(userStorePrefix).length(); int rootPathIndex = AVMConstants.buildAVMStoreRootPath(userStore).length();
ClientConfigElement config = Application.getClientConfig(fc); ClientConfigElement config = Application.getClientConfig(fc);
// get the UIActions component responsible for rendering context related user actions // get the UIActions component responsible for rendering context related user actions
// TODO: we may need a component per user instance? (or use evaluators for roles...) // TODO: we may need a component per user instance? (or use evaluators for roles...)
UIActions uiFileActions = aquireUIActions(ACTIONS_FILE, userStorePrefix); UIActions uiFileActions = aquireUIActions(ACTIONS_FILE, userStore);
UIActions uiFolderActions = aquireUIActions(ACTIONS_FOLDER, userStorePrefix); UIActions uiFolderActions = aquireUIActions(ACTIONS_FOLDER, userStore);
UIActions uiDeletedActions = aquireUIActions(ACTIONS_DELETED, userStorePrefix); UIActions uiDeletedActions = aquireUIActions(ACTIONS_DELETED, userStore);
String id = getClientId(fc); String id = getClientId(fc);
// use the sync service to get the list of diffs between the stores // use the sync service to get the list of diffs between the stores
NameMatcher matcher = (NameMatcher)FacesContextUtils.getRequiredWebApplicationContext(fc).getBean( NameMatcher matcher = (NameMatcher)FacesContextUtils.getRequiredWebApplicationContext(fc).getBean(
"globalPathExcluder"); "globalPathExcluder");
List<AVMDifference> diffs = avmSyncService.compare(-1, userStore, -1, stagingStore, matcher); List<AVMDifference> diffs = avmSyncService.compare(-1, userStorePath, -1, stagingStorePath, matcher);
if (diffs.size() != 0) if (diffs.size() != 0)
{ {
// store lookup of username to list of modified nodes // store lookup of username to list of modified nodes
@@ -665,11 +669,11 @@ public class UIUserSandboxes extends SelfRenderingComponent
out.write(bundle.getString(MSG_SELECTED)); out.write(bundle.getString(MSG_SELECTED));
out.write(":&nbsp;"); out.write(":&nbsp;");
Utils.encodeRecursive(fc, aquireAction( Utils.encodeRecursive(fc, aquireAction(
fc, userStorePrefix, username, ACT_SANDBOX_SUBMITSELECTED, "/images/icons/submit_all.gif", fc, userStore, username, ACT_SANDBOX_SUBMITSELECTED, "/images/icons/submit_all.gif",
"#{AVMBrowseBean.setupSandboxAction}", "dialog:submitSandboxItems")); "#{AVMBrowseBean.setupSandboxAction}", "dialog:submitSandboxItems"));
out.write("&nbsp;"); out.write("&nbsp;");
Utils.encodeRecursive(fc, aquireAction( Utils.encodeRecursive(fc, aquireAction(
fc, userStorePrefix, username, ACT_SANDBOX_REVERTSELECTED, "/images/icons/revert_all.gif", fc, userStore, username, ACT_SANDBOX_REVERTSELECTED, "/images/icons/revert_all.gif",
"#{AVMBrowseBean.revertSelected}", null)); "#{AVMBrowseBean.revertSelected}", null));
out.write("</td></tr>"); out.write("</td></tr>");
@@ -1023,6 +1027,28 @@ public class UIUserSandboxes extends SelfRenderingComponent
this.value = value; this.value = value;
} }
/**
* @return Returns the webapp to filter file list by
*/
public String getWebapp()
{
ValueBinding vb = getValueBinding("webapp");
if (vb != null)
{
this.webapp = (String)vb.getValue(getFacesContext());
}
return this.webapp;
}
/**
* @param webapp The webapp to filter file list by
*/
public void setWebapp(String webapp)
{
this.webapp = webapp;
}
/** /**
* Get the selected nodes for a specified sandbox user * Get the selected nodes for a specified sandbox user
* *

View File

@@ -49,6 +49,7 @@ public class UserSandboxesTag extends BaseComponentTag
super.setProperties(component); super.setProperties(component);
setStringProperty(component, "value", this.value); setStringProperty(component, "value", this.value);
setStringProperty(component, "webapp", this.webapp);
} }
/** /**
@@ -58,6 +59,7 @@ public class UserSandboxesTag extends BaseComponentTag
{ {
super.release(); super.release();
this.value = null; this.value = null;
this.webapp = null;
} }
/** /**
@@ -70,6 +72,20 @@ public class UserSandboxesTag extends BaseComponentTag
this.value = value; this.value = value;
} }
/**
* Set the webapp
*
* @param webapp the webapp
*/
public void setWebapp(String webapp)
{
this.webapp = webapp;
}
/** the webapp */
private String webapp;
/** the value (root store name to display sandboxes for) */ /** the value (root store name to display sandboxes for) */
private String value; private String value;
} }

View File

@@ -2235,6 +2235,10 @@
<property-name>avmService</property-name> <property-name>avmService</property-name>
<value>#{AVMService}</value> <value>#{AVMService}</value>
</managed-property> </managed-property>
<managed-property>
<property-name>avmBrowseBean</property-name>
<value>#{AVMBrowseBean}</value>
</managed-property>
</managed-bean> </managed-bean>
<managed-bean> <managed-bean>
@@ -2471,6 +2475,27 @@
</managed-property> </managed-property>
</managed-bean> </managed-bean>
<managed-bean>
<description>
The bean that backs up the Create AVM Webapp Folder Dialog
</description>
<managed-bean-name>CreateWebappDialog</managed-bean-name>
<managed-bean-class>org.alfresco.web.bean.wcm.CreateWebappDialog</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
<managed-property>
<property-name>avmService</property-name>
<value>#{AVMService}</value>
</managed-property>
<managed-property>
<property-name>avmBrowseBean</property-name>
<value>#{AVMBrowseBean}</value>
</managed-property>
<managed-property>
<property-name>nodeService</property-name>
<value>#{NodeService}</value>
</managed-property>
</managed-bean>
<managed-bean> <managed-bean>
<description> <description>
The bean that backs up the AVM Add Content Dialog The bean that backs up the AVM Add Content Dialog

View File

@@ -42,6 +42,12 @@
<required>false</required> <required>false</required>
<rtexprvalue>true</rtexprvalue> <rtexprvalue>true</rtexprvalue>
</attribute> </attribute>
<attribute>
<name>webapp</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag> </tag>
<tag> <tag>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -77,20 +77,20 @@
<td align=right> <td align=right>
<a:actionLink value="#{msg.sandbox_preview}" image="/images/icons/preview_website.gif" href="#{AVMBrowseBean.sandboxPreviewUrl}" target="new" /> <a:actionLink value="#{msg.sandbox_preview}" image="/images/icons/preview_website.gif" href="#{AVMBrowseBean.sandboxPreviewUrl}" target="new" />
</td> </td>
<td style="padding-left:4px" width=52>
<%-- Create actions menu --%>
<r:permissionEvaluator value="#{AVMBrowseBean.currentPathNode}" allow="CreateChildren" id="eval1"> <r:permissionEvaluator value="#{AVMBrowseBean.currentPathNode}" allow="CreateChildren" id="eval1">
<td style="padding-left:4px" width=80>
<%-- Create actions menu --%>
<a:menu id="createMenu" itemSpacing="4" label="#{msg.create_options}" image="/images/icons/menu.gif" menuStyleClass="moreActionsMenu" style="white-space:nowrap"> <a:menu id="createMenu" itemSpacing="4" label="#{msg.create_options}" image="/images/icons/menu.gif" menuStyleClass="moreActionsMenu" style="white-space:nowrap">
<r:actions id="acts_create" value="avm_create_menu" context="#{AVMBrowseBean.currentPathNode}" /> <r:actions id="acts_create" value="avm_create_menu" context="#{AVMBrowseBean.currentPathNode}" />
</a:menu> </a:menu>
</r:permissionEvaluator>
</td> </td>
<td style="padding-left:4px" width=80> </r:permissionEvaluator>
<%-- More actions menu --%> <%-- More actions menu --%>
<%-- <td style="padding-left:4px" width=80>
<a:menu id="actionsMenu" itemSpacing="4" label="#{msg.more_actions}" image="/images/icons/menu.gif" menuStyleClass="moreActionsMenu" style="white-space:nowrap"> <a:menu id="actionsMenu" itemSpacing="4" label="#{msg.more_actions}" image="/images/icons/menu.gif" menuStyleClass="moreActionsMenu" style="white-space:nowrap">
<r:actions id="acts_more" value="avm_more_menu" context="#{AVMBrowseBean.currentPathNode}" /> <r:actions id="acts_more" value="avm_more_menu" context="#{AVMBrowseBean.currentPathNode}" />
</a:menu> </a:menu>
</td> </td>--%>
</tr> </tr>
</table> </table>

View File

@@ -31,7 +31,7 @@
<%-- load a bundle of properties with I18N strings --%> <%-- load a bundle of properties with I18N strings --%>
<f:loadBundle basename="alfresco.messages.webclient" var="msg"/> <f:loadBundle basename="alfresco.messages.webclient" var="msg"/>
<h:form acceptCharset="UTF-8" id="browse-website"> <h:form acceptCharset="UTF-8" id="website">
<%-- Main outer table --%> <%-- Main outer table --%>
<table cellspacing=0 cellpadding=2> <table cellspacing=0 cellpadding=2>
@@ -83,7 +83,7 @@
</nobr> </nobr>
</td> </td>
<a:panel id="import-panel" rendered="#{AVMBrowseBean.isManagerRole}"> <a:panel id="import-panel" rendered="#{AVMBrowseBean.isManagerRole}">
<td align=right width=170> <td align=right width=160>
<nobr> <nobr>
<%-- Import website content action --%> <%-- Import website content action --%>
<a:actionLink value="#{msg.import_website_content}" image="/images/icons/import_website.gif" padding="2" action="dialog:importContent" actionListener="#{ImportWebsiteDialog.start}" /> <a:actionLink value="#{msg.import_website_content}" image="/images/icons/import_website.gif" padding="2" action="dialog:importContent" actionListener="#{ImportWebsiteDialog.start}" />
@@ -108,6 +108,14 @@
<tr valign=top> <tr valign=top>
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_4.gif)" width=4></td> <td style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_4.gif)" width=4></td>
<td style="padding:4px"> <td style="padding:4px">
<%-- Current Webapp selection --%>
<h:outputText value="#{msg.webapp_current}" styleClass="mainSubTitle" />:&nbsp;
<h:selectOneMenu value="#{AVMBrowseBean.webapp}" onchange="document.forms['website'].submit(); return true;">
<f:selectItems value="#{AVMBrowseBean.webapps}" />
</h:selectOneMenu>
<div style="padding:4px"></div>
<a:panel id="staging-panel" border="white" bgcolor="white" titleBorder="blue" titleBgcolor="#D3E6FE" styleClass="mainSubTitle" label="#{msg.staging_sandbox}"> <a:panel id="staging-panel" border="white" bgcolor="white" titleBorder="blue" titleBgcolor="#D3E6FE" styleClass="mainSubTitle" label="#{msg.staging_sandbox}">
<%-- Staging Sandbox Info --%> <%-- Staging Sandbox Info --%>
@@ -175,7 +183,7 @@
<a:panel id="sandboxes-panel" border="white" bgcolor="white" titleBorder="blue" titleBgcolor="#D3E6FE" styleClass="mainSubTitle" label="#{msg.user_sandboxes}"> <a:panel id="sandboxes-panel" border="white" bgcolor="white" titleBorder="blue" titleBgcolor="#D3E6FE" styleClass="mainSubTitle" label="#{msg.user_sandboxes}">
<%-- User Sandboxes List --%> <%-- User Sandboxes List --%>
<w:userSandboxes id="sandboxes" binding="#{AVMBrowseBean.userSandboxes}" value="#{NavigationBean.currentNode.nodeRef}" /> <w:userSandboxes id="sandboxes" binding="#{AVMBrowseBean.userSandboxes}" value="#{NavigationBean.currentNode.nodeRef}" webapp="#{AVMBrowseBean.webapp}" />
</a:panel> </a:panel>

View File

@@ -0,0 +1,106 @@
<%--
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" %>
<f:verbatim>
<script type="text/javascript" src="<%=request.getContextPath()%>/scripts/validation.js"> </script>
<script type="text/javascript">
var finishButtonPressed = false;
window.onload = pageLoaded;
function pageLoaded()
{
document.getElementById("dialog:dialog-body:name").focus();
document.getElementById("dialog").onsubmit = validate;
document.getElementById("dialog:finish-button").onclick = function() {finishButtonPressed = true; clear_dialog();}
checkButtonState();
}
function checkButtonState()
{
if (document.getElementById("dialog:dialog-body:name").value.length == 0 )
{
document.getElementById("dialog:finish-button").disabled = true;
}
else
{
document.getElementById("dialog:finish-button").disabled = false;
}
}
function validate()
{
if (finishButtonPressed)
{
finishButtonPressed = false;
return validateName(document.getElementById("dialog:dialog-body:name"),
'</f:verbatim><a:outputText value="#{msg.validation_invalid_character}" /><f:verbatim>',
true);
}
else
{
return true;
}
}
</script>
<table cellpadding="2" cellspacing="2" border="0" width="100%">
<tr>
<td colspan="3" class="wizardSectionHeading">
</f:verbatim>
<h:outputText value="#{msg.properties}" />
<f:verbatim>
</td>
</tr>
<tr>
<td align="middle">
</f:verbatim>
<h:graphicImage value="/images/icons/required_field.gif" alt="Required Field" />
<f:verbatim>
</td>
<td>
</f:verbatim>
<h:outputText value="#{msg.name}:" />
<f:verbatim>
</td>
<td width="85%">
</f:verbatim>
<h:inputText id="name" value="#{DialogManager.bean.name}" size="35" maxlength="1024"
onkeyup="javascript:checkButtonState();" onchange="javascript:checkButtonState();" />
<f:verbatim>
</td>
</tr>
<tr>
<td></td>
<td>
</f:verbatim>
<h:outputText value="#{msg.description}:" />
<f:verbatim>
</td>
<td>
</f:verbatim>
<h:inputText id="description" value="#{DialogManager.bean.description}" size="35" maxlength="1024" />
<f:verbatim>
</td>
</tr>
</table>
</f:verbatim>

View File

@@ -126,8 +126,7 @@
</td> </td>
<td width="85%"> <td width="85%">
</f:verbatim> </f:verbatim>
<h:inputText id="webapp" value="#{WizardManager.bean.webapp}" size="35" maxlength="256" <h:inputText id="webapp" value="#{WizardManager.bean.webapp}" size="35" maxlength="256" />
disabled="true" /> <%-- disabled="#{WizardManager.bean.editMode}" --%>
<f:verbatim> <f:verbatim>
</td> </td>
</tr> </tr>