You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by ta...@apache.org on 2009/09/01 06:58:50 UTC
svn commit: r809812 - in
/portals/jetspeed-2/applications/j2-admin/trunk/src/main:
java/org/apache/jetspeed/portlets/prm/portlet/
java/org/apache/jetspeed/portlets/spaces/ webapp/WEB-INF/
webapp/WEB-INF/view/spaces/
Author: taylor
Date: Tue Sep 1 04:58:50 2009
New Revision: 809812
URL: http://svn.apache.org/viewvc?rev=809812&view=rev
Log:
https://issues.apache.org/jira/browse/JS2-1057
Initial implementation of Spaces Manager portlet. Continuing development on prototypes for Navigator and Toolbox
Added support to reindex when cloning a portlet
Added:
portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/spaces/SpacesManager.java (with props)
portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/view/spaces/spaces-manager.jsp (with props)
portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/view/spaces/work-in-progress.jsp (with props)
Modified:
portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/portlet/DetailsPanel.java
portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/spaces/JetspeedNavigator.java
portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/portlet.xml
portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/view/spaces/navigator.jsp
Modified: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/portlet/DetailsPanel.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/portlet/DetailsPanel.java?rev=809812&r1=809811&r2=809812&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/portlet/DetailsPanel.java (original)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/portlet/DetailsPanel.java Tue Sep 1 04:58:50 2009
@@ -22,6 +22,7 @@
import java.util.Locale;
import org.apache.commons.lang.StringUtils;
+import org.apache.jetspeed.Jetspeed;
import org.apache.jetspeed.components.portletregistry.FailedToStorePortletDefinitionException;
import org.apache.jetspeed.components.portletregistry.PortletRegistry;
import org.apache.jetspeed.components.portletregistry.RegistryException;
@@ -33,6 +34,7 @@
import org.apache.jetspeed.portlets.prm.PortletApplicationNodeBean;
import org.apache.jetspeed.portlets.wicket.AbstractAdminWebApplication;
import org.apache.jetspeed.portlets.wicket.component.editor.LocalizedDisplayNameEditor;
+import org.apache.jetspeed.search.SearchEngine;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.form.Button;
import org.apache.wicket.markup.html.form.Form;
@@ -260,6 +262,8 @@
PortletApplication app = registry.getPortletApplication(paNodeBean.getApplicationName());
PortletDefinition def = app.getPortlet(paNodeBean.getName());
registry.clonePortletDefinition(def, cloneName);
+ updateSearchEngine(true, app); // TODO: move this into registry api?
+ updateSearchEngine(false, app); // TODO: move this into registry api?
StringResourceModel resModel = new StringResourceModel("pam.details.action.status.portlet.cloneOK", this, null, new Object [] { paNodeBean.getName() } );
feed.info(resModel.getString());
}
@@ -291,4 +295,23 @@
}
+ protected void updateSearchEngine(boolean remove, PortletApplication pa)
+ {
+ SearchEngine searchEngine = (SearchEngine) Jetspeed.getComponentManager().getComponent("org.apache.jetspeed.search.SearchEngine");
+ if (searchEngine != null)
+ {
+ if (remove)
+ {
+ searchEngine.remove(pa);
+ searchEngine.remove(pa.getPortlets());
+ }
+ else
+ {
+ searchEngine.add(pa);
+ searchEngine.add(pa.getPortlets());
+ }
+ }
+ }
+
+
}
Modified: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/spaces/JetspeedNavigator.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/spaces/JetspeedNavigator.java?rev=809812&r1=809811&r2=809812&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/spaces/JetspeedNavigator.java (original)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/spaces/JetspeedNavigator.java Tue Sep 1 04:58:50 2009
@@ -31,11 +31,15 @@
import org.apache.jetspeed.CommonPortletServices;
import org.apache.jetspeed.administration.PortalAdministration;
-import org.apache.jetspeed.cache.JetspeedCacheMonitor;
+import org.apache.jetspeed.om.folder.Folder;
+import org.apache.jetspeed.om.page.Fragment;
import org.apache.jetspeed.om.page.Page;
+import org.apache.jetspeed.page.PageManager;
+import org.apache.jetspeed.request.RequestContext;
import org.apache.jetspeed.spaces.Space;
import org.apache.jetspeed.spaces.Spaces;
import org.apache.portals.bridges.common.GenericServletPortlet;
+import org.apache.portals.messaging.PortletMessaging;
/**
* Jetspeed Navigator
@@ -47,6 +51,7 @@
{
private Spaces spacesService;
private PortalAdministration admin;
+ protected PageManager pageManager;
public void init(PortletConfig config) throws PortletException
{
@@ -59,13 +64,24 @@
admin = (PortalAdministration) getPortletContext().getAttribute(
CommonPortletServices.CPS_PORTAL_ADMINISTRATION);
if (null == admin) { throw new PortletException(
- "Failed to find the Portal Administration on portlet initialization"); }
+ "Failed to find the Portal Administration on portlet initialization"); }
+ pageManager = (PageManager)context.getAttribute(CommonPortletServices.CPS_PAGE_MANAGER_COMPONENT);
+ if (null == pageManager)
+ {
+ throw new PortletException("Failed to find the Page Manager on portlet initialization");
+ }
}
@SuppressWarnings("unchecked")
public void doView(RenderRequest request, RenderResponse response)
throws PortletException, IOException
{
+ String newSpace = (String)PortletMessaging.consume(request,"JetspeedNavigator", "spaceChange");
+ if (newSpace != null)
+ {
+ request.getPortletSession().removeAttribute("spaces", PortletSession.PORTLET_SCOPE);
+ request.getPortletSession().setAttribute("space", newSpace);
+ }
Space space = null;
String spaceName = (String)request.getPortletSession().getAttribute("space", PortletSession.PORTLET_SCOPE);
List<Space> spaces = (List<Space>)request.getPortletSession().getAttribute("spaces", PortletSession.PORTLET_SCOPE);
@@ -193,7 +209,62 @@
actionRequest.getPortletSession().setAttribute("tab", "pages", PortletSession.PORTLET_SCOPE);
actionResponse.sendRedirect(path);
}
-
+ String navAction = actionRequest.getParameter("navAction");
+ if (navAction != null)
+ {
+ // TODO: make this link configurable. We need JetspeedLinks like in Jetspeed-1
+ String path = admin.getPortalURL(actionRequest, actionResponse, "/Administrative/spaces.psml");
+ actionResponse.sendRedirect(path);
+ return;
+ }
+ String addPage = actionRequest.getParameter("addPage");
+ if (addPage != null)
+ {
+ String spaceName = (String)actionRequest.getPortletSession().getAttribute("space", PortletSession.PORTLET_SCOPE);
+ String spacePath = "/";
+ if (spaceName == null)
+ {
+ spaceName = "Home"; // TODO: this needs to be smarter
+ }
+ else
+ {
+ // TODO: api to lookup space by name
+ List<Space> spaces = (List<Space>)actionRequest.getPortletSession().getAttribute("spaces", PortletSession.PORTLET_SCOPE);
+ for (Space sp: spaces)
+ {
+ if (sp.getName().equals(spaceName))
+ {
+ spacePath = sp.getPath();
+ break;
+ }
+ }
+ }
+ try
+ {
+ String path = spacePath + "/" + addPage + ".psml";
+
+ Page source = pageManager.getPage("/_user/template/min.psml");
+ Page newPage = pageManager.copyPage(source, path);
+ newPage.setTitle(addPage);
+ pageManager.updatePage(newPage);
+
+// Folder parent = pageManager.getFolder(spacePath);
+// newPage.setDefaultDecorator(parent.getDefaultDecorator(Fragment.PORTLET), Fragment.PORTLET);
+// newPage.setParent(parent);
+// Fragment fragment = pageManager.newFragment();
+// fragment.setName("jetspeed-layouts::VelocityTwoColumns");
+// fragment.setType(Fragment.LAYOUT);
+// newPage.setRootFragment(fragment);
+ actionRequest.getPortletSession().removeAttribute("pages", PortletSession.PORTLET_SCOPE);
+ String redirect = admin.getPortalURL(actionRequest, actionResponse, path);
+ actionResponse.sendRedirect(redirect);
+ }
+ catch (Throwable t)
+ {
+ t.printStackTrace();
+ }
+ }
+
}
protected Space getSpaceFromName(String spaceName)
Added: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/spaces/SpacesManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/spaces/SpacesManager.java?rev=809812&view=auto
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/spaces/SpacesManager.java (added)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/spaces/SpacesManager.java Tue Sep 1 04:58:50 2009
@@ -0,0 +1,144 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.apache.jetspeed.portlets.spaces;
+
+import java.io.IOException;
+import java.util.Locale;
+import java.util.Random;
+
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.PortletConfig;
+import javax.portlet.PortletContext;
+import javax.portlet.PortletException;
+import javax.portlet.PortletSession;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+
+import org.apache.jetspeed.CommonPortletServices;
+import org.apache.jetspeed.administration.PortalAdministration;
+import org.apache.jetspeed.om.folder.Folder;
+import org.apache.jetspeed.om.page.Fragment;
+import org.apache.jetspeed.om.page.Page;
+import org.apache.jetspeed.om.portlet.GenericMetadata;
+import org.apache.jetspeed.page.PageManager;
+import org.apache.jetspeed.spaces.Spaces;
+import org.apache.portals.bridges.common.GenericServletPortlet;
+import org.apache.portals.messaging.PortletMessaging;
+
+/**
+ * Spaces Manager
+ *
+ * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
+ * @version $Id$
+ */
+public class SpacesManager extends GenericServletPortlet
+{
+ protected PageManager pageManager;
+ private PortalAdministration admin;
+
+ private Spaces spacesService;
+
+ public void init(PortletConfig config) throws PortletException
+ {
+ super.init(config);
+ PortletContext context = getPortletContext();
+ spacesService = (Spaces) context.getAttribute(CommonPortletServices.CPS_SPACES_SERVICE);
+ if (spacesService == null)
+ {
+ throw new PortletException(
+ "Could not get instance of portal spaces service component");
+ }
+ admin = (PortalAdministration) getPortletContext().getAttribute(
+ CommonPortletServices.CPS_PORTAL_ADMINISTRATION);
+ if (null == admin)
+ {
+ throw new PortletException(
+ "Failed to find the Portal Administration on portlet initialization");
+ }
+ pageManager = (PageManager)context.getAttribute(CommonPortletServices.CPS_PAGE_MANAGER_COMPONENT);
+ if (null == pageManager)
+ {
+ throw new PortletException("Failed to find the Page Manager on portlet initialization");
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ public void doView(RenderRequest request, RenderResponse response)
+ throws PortletException, IOException
+ {
+ String tab = (String)request.getPortletSession().getAttribute("tab", PortletSession.PORTLET_SCOPE);
+ if (tab == null)
+ {
+ tab = "portlets";
+ request.getPortletSession().setAttribute("tab", tab, PortletSession.PORTLET_SCOPE);
+ }
+ request.setAttribute("tab", tab);
+ super.doView(request, response);
+ }
+
+ public void processAction(ActionRequest actionRequest, ActionResponse actionResponse) throws PortletException,
+ IOException
+ {
+ String name = scrapeParameter(actionRequest, "spaceName");
+ String title = scrapeParameter(actionRequest, "spaceTitle");
+// String description = scrapeParameter(actionRequest, "spaceDescription");
+// String URL = scrapeParameter(actionRequest, "spaceURL");
+ String theme = scrapeParameter(actionRequest, "theme");
+// String share = scrapeParameter(actionRequest, "share");
+// String admin = scrapeParameter(actionRequest, "admin");
+// String dev = scrapeParameter(actionRequest, "dev");
+// String engineering = scrapeParameter(actionRequest, "engineering");
+
+ if (name.length() > 0)
+ {
+ try
+ {
+ String spacePath = "/" + name; // TODO: make this configurable
+ System.out.println("adding space named = " + spacePath);
+ Folder folder = pageManager.newFolder(spacePath);
+ folder.setDefaultDecorator(theme, Fragment.LAYOUT);
+ folder.setDefaultDecorator(theme, Fragment.PORTLET);
+ GenericMetadata metadata = folder.getMetadata();
+ metadata.addField(Locale.ENGLISH, "space-owner", actionRequest.getUserPrincipal().getName());
+ folder.setTitle(title);
+ pageManager.updateFolder(folder);
+ //add default page
+ Page source = pageManager.getPage("/_user/template/space-home.psml");
+ Page home = pageManager.copyPage(source, spacePath + "/default-page.psml");
+ pageManager.updatePage(home);
+ PortletMessaging.publish(actionRequest, "JetspeedNavigator", "spaceChange", name);
+ // redirect
+ String path = admin.getPortalURL(actionRequest, actionResponse, spacePath);
+ actionResponse.sendRedirect(path);
+ }
+ catch (Throwable t)
+ {
+ t.printStackTrace();
+ }
+ }
+ }
+
+ private String scrapeParameter(ActionRequest request, String paramName)
+ {
+ String param = request.getParameter(paramName);
+ if (param == null)
+ param = "";
+ param = param.trim();
+ return param;
+ }
+}
\ No newline at end of file
Propchange: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/spaces/SpacesManager.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/spaces/SpacesManager.java
------------------------------------------------------------------------------
svn:keywords = Id
Modified: portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/portlet.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/portlet.xml?rev=809812&r1=809811&r2=809812&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/portlet.xml (original)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/portlet.xml Tue Sep 1 04:58:50 2009
@@ -1714,37 +1714,6 @@
</portlet-preferences>
</portlet>
-<portlet id="OldJetspeedNavigator">
- <description>Jetspeed spaces navigation management controller.</description>
- <portlet-name>OldJetspeedNavigator</portlet-name>
- <display-name>Jetspeed Navigator</display-name>
- <portlet-class>org.apache.jetspeed.portlets.spaces.SpacesNavigator</portlet-class>
- <init-param>
- <name>dojo.requires.core</name>
- <value>dojo.lang.*;dojo.event.*;dojo.io.*;dojo.widget.*;dojo.widget.LayoutContainer;dojo.widget.ContentPane;dojo.widget.SplitContainer;dojo.widget.AccordionContainer;dojo.widget.TabContainer;dojo.widget.Checkbox;dojo.widget.Dialog;dojo.widget.Button;dojo.widget.Menu2;jetspeed.widget.EditorTable</value>
- </init-param>
- <init-param>
- <name>ViewPage</name>
- <value>/WEB-INF/view/spaces/spaces.vm</value>
- </init-param>
- <init-param>
- <name>portlet-icon</name>
- <value>lock.png</value>
- </init-param>
- <expiration-cache>0</expiration-cache>
- <supports>
- <mime-type>text/html</mime-type>
- <portlet-mode>VIEW</portlet-mode>
- <portlet-mode>EDIT</portlet-mode>
- </supports>
- <supported-locale>en</supported-locale>
- <portlet-info>
- <title>Old Jetspeed Navigator</title>
- <short-title>Old Navigator</short-title>
- <keywords>admin,spaces,space,navigator,pages,nav</keywords>
- </portlet-info>
-</portlet>
-
<portlet id="JetspeedNavigator">
<description>Jetspeed spaces navigation management controller.</description>
<portlet-name>JetspeedNavigator</portlet-name>
@@ -1848,6 +1817,33 @@
</preference>
</portlet-preferences>
</portlet>
+
+<portlet id="SpacesManager">
+ <description>Jetspeed Spaces Manager for maintaining spaces</description>
+ <portlet-name>SpacesManager</portlet-name>
+ <display-name>Spaces Manager</display-name>
+ <portlet-class>org.apache.jetspeed.portlets.spaces.SpacesManager</portlet-class>
+ <init-param>
+ <name>ViewPage</name>
+ <value>/WEB-INF/view/spaces/spaces-manager.jsp</value>
+ </init-param>
+ <init-param>
+ <name>portlet-icon</name>
+ <value>preferences-desktop-remote-desktop.png</value>
+ </init-param>
+ <expiration-cache>0</expiration-cache>
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ <portlet-mode>EDIT</portlet-mode>
+ </supports>
+ <supported-locale>en</supported-locale>
+ <portlet-info>
+ <title>Spaces Manager</title>
+ <short-title>Spaces</short-title>
+ <keywords>admin,spaces,space,manager</keywords>
+ </portlet-info>
+</portlet>
<custom-portlet-mode>
<description>a Custom Edit_defaults Mode</description>
Modified: portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/view/spaces/navigator.jsp
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/view/spaces/navigator.jsp?rev=809812&r1=809811&r2=809812&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/view/spaces/navigator.jsp (original)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/view/spaces/navigator.jsp Tue Sep 1 04:58:50 2009
@@ -31,6 +31,7 @@
String tab = (String)renderRequest.getAttribute("tab");
String title = (String)renderRequest.getAttribute("title");
%>
+<form id='jsPortletSearch' method="POST" action='<portlet:actionURL/>'>
<table style="border-collapse: collapse; width: 100%; margin-top: 8px; float: left;">
<tr>
<td class="portlet-section-subheader" colspan="3">
@@ -63,7 +64,14 @@
<tr>
<th class="portlet-section-header" colspan="3"></th>
</tr>
-<% } else if (tab.equals("pages")) { %>
+<%
+Object princ = renderRequest.getUserPrincipal();
+if (princ != null) {
+%>
+ <tr><td class="portlet-section-subheader" colspan="3"><a href="<portlet:actionURL><portlet:param name='navAction' value='addSpace'/></portlet:actionURL>">Add Space...</a></td></tr>
+<%
+}
+} else if (tab.equals("pages")) { %>
<tr>
<th class="portlet-section-header" colspan="1"><%= title %> Space</th>
</tr>
@@ -86,9 +94,17 @@
<th class="portlet-section-header" colspan="1"></th>
</tr>
<%
+Object princ2 = renderRequest.getUserPrincipal();
+if (princ2 != null) {
+%>
+ <tr><td class="portlet-section-subheader" colspan='10'><input type="text" name="addPage" size="15" value="" ><input type="submit" value="Add Page" /></td></tr>
+<%
+}
+%>
+<%
}
%>
</table>
-
+</form>
Added: portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/view/spaces/spaces-manager.jsp
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/view/spaces/spaces-manager.jsp?rev=809812&view=auto
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/view/spaces/spaces-manager.jsp (added)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/view/spaces/spaces-manager.jsp Tue Sep 1 04:58:50 2009
@@ -0,0 +1,141 @@
+<%--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+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.
+
+--%>
+<%@page import="org.apache.jetspeed.spaces.Space"%>
+<%@page import="org.apache.jetspeed.request.RequestContext"%>
+
+<%@ page contentType="text/html" %>
+<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
+<%@taglib uri="http://java.sun.com/jstl/core_rt" prefix="c_rt"%>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
+<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
+
+<portlet:defineObjects/>
+<c_rt:set var="requestContext" value="<%=request.getAttribute(RequestContext.REQUEST_PORTALENV)%>"/>
+<c:set var="portalContextPath" value="${requestContext.request.contextPath}"/>
+<c:if test="${empty portalContextPath}">
+ <c:set var="portalContextPath" value="/"/>
+</c:if>
+
+ <%
+ // List<PortletInfo> portlets = (List<PortletInfo>)renderRequest.getAttribute("portlets");
+ //String tab = (String)renderRequest.getAttribute("tab");
+ %>
+<form id='jsSpacesManagement' method="POST" action='<portlet:actionURL/>'>
+<table style="border-collapse: collapse; width: 600px; margin-top: 8px; float: left;">
+ <tr>
+ <th class="portlet-section-header" colspan="2">Add a Space...</th>
+ </tr>
+ <tr>
+ <td>
+ <table>
+ <tr>
+ <td class="portlet-section-subheader">Name:</td>
+ <td class="portlet-section-subheader"><input type="text" name="spaceName" size="30" value="" /></td>
+ </tr>
+ <tr>
+ <td class="portlet-section-subheader">Title:</td>
+ <td class="portlet-section-subheader"><input type="text" name="spaceTitle" size="30" value="" /></td>
+ </tr>
+ <tr>
+ <td class="portlet-section-subheader">Description:</td>
+ <td class="portlet-section-subheader"><input type="text" name="spaceDescription" size="30" value="" /></td>
+ </tr>
+ <tr>
+ <td class="portlet-section-subheader">URL Domain :</td>
+ <td class="portlet-section-subheader"><input type="text" name="spaceURL" size="30" value="" /></td>
+ </tr>
+ <tr>
+ <td class="portlet-section-subheader">Theme :</td>
+ <td class="portlet-section-subheader"></td>
+ </tr>
+ <tr>
+ <td colspan='2'>
+ <table>
+ <tr>
+ <td><img src='<c:url context="${portalContextPath}" value="/images/themes/style-icon-jetspeed-1.png"/>'></td>
+ <td style="vertical-align: middle"><input type="radio" checked name="theme" value="jetspeed" /> Jetspeed Professional</td>
+ </tr>
+ <tr>
+ <td><img src='<c:url context="${portalContextPath}" value="/images/themes/style-icon-fidelity.png"/>'/></td>
+ <td style="vertical-align: middle"><input type="radio" name="theme" value="fidelity" /> Fidelity Green</td>
+ </tr>
+ <tr>
+ <td><img src='<c:url context="${portalContextPath}" value="/images/themes/style-icon-jetspeed-2.png"/>'/></td>
+ <td style="vertical-align: middle"><input type="radio" name="theme" value="turbo" /> Jetspeed Turbo</td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td>
+ <table width="100%">
+ <tr>
+ <td class="portlet-section-subheader">Share this space with:</td>
+ <td class="portlet-section-subheader"></td>
+ </tr>
+
+ <tr>
+ <td colspan='2' style="vertical-align: middle"><input type="radio" checked name="share" value="everyone" /> Everyone</td>
+ </tr>
+ <tr>
+ <td colspan='2'></td>
+ <tr>
+ <tr>
+ <td style="vertical-align: middle"><input type="radio" name="share" value="groups" /> Selected Groups:</td>
+ <td>
+ <input type="checkbox" name="accounting" value="accounting" /> Accounting<br/>
+ <input type="checkbox" name="engineering" value="engineering" /> Engineering<br/>
+ <input type="checkbox" name="marketing" value="marketing" /> Marketing<br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan='2'></td>
+ <tr>
+ <tr>
+ <td style="vertical-align: middle"><input type="radio" name="share" value="roles" /> Selected Roles:</td>
+ <td>
+ <input type="checkbox" name="admin" value="admin" /> Administrator<br/>
+ <input type="checkbox" name="dev" value="dev" /> Developer<br/>
+ <input type="checkbox" name="editor" value="editor" /> Editor<br/>
+ <input type="checkbox" name="manager" value="manager" /> Manager<br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan='2'></td>
+ <tr>
+ <tr>
+ <td colspan='2'></td>
+ <tr>
+ <tr>
+ <td style="vertical-align: middle"><input type="radio" name="share" value="users" /> Selected Users:</td>
+ <td><input type="submit" value="Search..." /></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td colspan='2' style="text-align: center" class="portlet-section-subheader"><input type="submit" value="Add Space" /></td>
+ </tr>
+ <tr>
+ <th class="portlet-section-header" colspan="2"></th>
+ </tr>
+</table>
+</form>
+
Propchange: portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/view/spaces/spaces-manager.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/view/spaces/spaces-manager.jsp
------------------------------------------------------------------------------
svn:keywords = Id
Added: portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/view/spaces/work-in-progress.jsp
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/view/spaces/work-in-progress.jsp?rev=809812&view=auto
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/view/spaces/work-in-progress.jsp (added)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/view/spaces/work-in-progress.jsp Tue Sep 1 04:58:50 2009
@@ -0,0 +1,158 @@
+<%--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+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.
+
+--%>
+<%@page import="org.apache.jetspeed.spaces.Space"%>
+<%@page import="org.apache.jetspeed.request.RequestContext"%>
+
+<%@ page contentType="text/html" %>
+<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
+<%@taglib uri="http://java.sun.com/jstl/core_rt" prefix="c_rt"%>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
+<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
+
+
+<style type="text/css">
+/* styles adopted from Nidahas - Forms markup and CSS (http://nidahas.com/2006/12/06/forms-markup-and-css-revisited/) */
+/* General styles */
+body { margin: 0; padding: 0; font: 80%/1.5 Arial,Helvetica,sans-serif; color: #111; background-color: #FFF; }
+h2 { margin: 0px; padding: 10px; font-family: Georgia, "Times New Roman", Times, serif; font-size: 200%; font-weight: normal; color: #FFF; background-color: #CCC; border-bottom: #BBB 2px solid; }
+p#copyright { margin: 20px 10px; font-size: 90%; color: #999; }
+
+/* Form styles */
+div.form-container { margin: 10px; padding: 5px; background-color: #FFF; }
+
+p.legend { margin-bottom: 1em; }
+p.legend em { color: #C00; font-style: normal; }
+
+div.form-container div.controlset {display: block; float:left; width: 100%; padding: 0.25em 0;}
+
+div.form-container div.controlset label,
+div.form-container div.controlset input,
+div.form-container div.controlset div { display: inline; float: left; }
+
+div.form-container div.controlset label { width: 100px;}
+
+div.color_picker {
+ height: 16px;
+ width: 16px;
+ padding: 0 !important;
+ border: 1px solid #ccc;
+ background: url(arrow.gif) no-repeat top right;
+ cursor: pointer;
+ line-height: 16px;
+}
+
+div#color_selector {
+ width: 110px;
+ position: absolute;
+ border: 1px solid #598FEF;
+ background-color: #EFEFEF;
+ padding: 2px;
+}
+ div#color_custom {width: 100%; float:left }
+ div#color_custom label {font-size: 95%; color: #2F2F2F; margin: 5px 2px; width: 25%}
+ div#color_custom input {margin: 5px 2px; padding: 0; font-size: 95%; border: 1px solid #000; width: 65%; }
+
+div.color_swatch {
+ height: 12px;
+ width: 12px;
+ border: 1px solid #000;
+ margin: 2px;
+ float: left;
+ cursor: pointer;
+ line-height: 12px;
+}
+</style>
+
+<script language="javascript" type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script>
+<script language="javascript" type="text/javascript" src="/j2-admin/javascript/colorPicker.js"/></script>
+<script type="text/javascript">
+ //Run the code when document ready
+ $(function() {
+ //use this method to add new colors to pallete
+ //$.fn.colorPicker.addColors(['000', '000', 'fff', 'fff']);
+
+ $('#color1').colorPicker();
+ $('#color2').colorPicker();
+
+ //fires an event when the color is changed
+ //$('#color1').change(function(){
+ //alert("color changed");
+ //});
+ });
+</script>
+
+
+<portlet:defineObjects/>
+<c_rt:set var="requestContext" value="<%=request.getAttribute(RequestContext.REQUEST_PORTALENV)%>"/>
+<c:set var="portalContextPath" value="${requestContext.request.contextPath}"/>
+<c:if test="${empty portalContextPath}">
+ <c:set var="portalContextPath" value="/"/>
+</c:if>
+
+ <%
+ // List<PortletInfo> portlets = (List<PortletInfo>)renderRequest.getAttribute("portlets");
+ //String tab = (String)renderRequest.getAttribute("tab");
+ %>
+<form id='jsSpacesManagement' method="POST" action='<portlet:actionURL/>'>
+<table style="border-collapse: collapse; width: 300px; margin-top: 8px; float: left;">
+ <tr>
+ <th class="portlet-section-header" colspan="2">Add a Space...</th>
+ </tr>
+ <tr>
+ <td class="portlet-section-subheader">Name:</td>
+ <td class="portlet-section-subheader"><input type="text" name="spaceName" size="30" value="" /></td>
+ </tr>
+ <tr>
+ <td class="portlet-section-subheader">Title:</td>
+ <td class="portlet-section-subheader"><input type="text" name="spaceTitle" size="30" value="" /></td>
+ </tr>
+ <tr>
+ <td class="portlet-section-subheader">Description:</td>
+ <td class="portlet-section-subheader"><input type="text" name="spaceDescription" size="30" value="" /></td>
+ </tr>
+ <tr>
+ <td class="portlet-section-subheader">URL Domain :</td>
+ <td class="portlet-section-subheader"><input type="text" name="spaceURL" size="30" value="" /></td>
+ </tr>
+ <tr>
+ <td class="portlet-section-subheader">Theme Color :</td>
+ <td class="portlet-section-subheader">
+<div>
+<input id="color1" name="color1" type="text" value="#333399" /></div>
+ </td>
+ <tr>
+ <td class="portlet-section-subheader">Secondary Color :</td>
+ <td class="portlet-section-subheader">
+<div>
+<input id="color2" name="color2" type="text" value="#333399" /></div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="portlet-section-subheader"></td>
+ <td class="portlet-section-subheader"><input type="submit" value="Add Space" /></td>
+ </tr>
+ <tr>
+ <th class="portlet-section-header" colspan="2"></th>
+ </tr>
+</table>
+
+</form>
+
+
+
\ No newline at end of file
Propchange: portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/view/spaces/work-in-progress.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/view/spaces/work-in-progress.jsp
------------------------------------------------------------------------------
svn:keywords = Id
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org