Author: christian.bauer(a)jboss.com
Date: 2008-02-27 03:35:11 -0500 (Wed, 27 Feb 2008)
New Revision: 7489
Added:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DirectoryBrowser.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DirectoryBrowserSettings.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/icon/
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/icon/IconHandler.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/icon/WikiDirectoryIconHandler.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/icon/WikiDocumentIconHandler.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/icon/WikiUploadIconHandler.java
trunk/examples/wiki/view/includes/directoryBrowserControl.xhtml
trunk/examples/wiki/view/includes/directoryBrowserIconMenu.xhtml
trunk/examples/wiki/view/includes/directoryBrowserPath.xhtml
trunk/examples/wiki/view/includes/directoryBrowserTree.xhtml
trunk/examples/wiki/view/includes/pager.xhtml
trunk/examples/wiki/view/includes/sortableHeader.xhtml
trunk/examples/wiki/view/themes/default/js/jqMenu.js
Removed:
trunk/examples/wiki/view/themes/default/js/jqContextMenu.js
Modified:
trunk/examples/wiki/src/etc/META-INF/components-dev.xml
trunk/examples/wiki/src/etc/META-INF/components-prod.xml
trunk/examples/wiki/src/etc/META-INF/components-test.xml
trunk/examples/wiki/src/etc/WEB-INF/components.xml
trunk/examples/wiki/src/etc/WEB-INF/pages.xml
trunk/examples/wiki/src/etc/WEB-INF/web.xml
trunk/examples/wiki/src/etc/i18n/messages_en.properties
trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/RomeFeedConnector.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/jira/JiraConnector.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/CommentQuery.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DefaultWikiLinkResolver.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DirectoryHome.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/NodeHome.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/Pager.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/WikiRequestResolver.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/dao/WikiNodeDAO.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/engine/WikiLinkResolver.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/feeds/FeedEntryManager.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/WikiDirectory.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/WikiDocument.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/WikiNode.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/nestedset/query/NestedSetNodeWrapper.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/nestedset/query/NestedSetResultTransformer.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/blogdirectory/BlogDAO.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/blogdirectory/BlogDirectory.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/faqBrowser/FaqBrowser.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/faqBrowser/FaqBrowserDAO.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/faqBrowser/FaqQuestionHome.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ForumDAO.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ForumHome.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ForumQuery.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ForumTopicReadManager.java
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/browse/DisplayDirectories.java
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/editing/ClipboardTests.java
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/editing/TrashTests.java
trunk/examples/wiki/view/dirDisplay_d.xhtml
trunk/examples/wiki/view/dirDisplay_m.xhtml
trunk/examples/wiki/view/dirEdit_d.xhtml
trunk/examples/wiki/view/dirEdit_m.xhtml
trunk/examples/wiki/view/docEdit_d.xhtml
trunk/examples/wiki/view/docEdit_m.xhtml
trunk/examples/wiki/view/themes/default/css/template.css
trunk/examples/wiki/view/themes/default/template.xhtml
trunk/examples/wiki/view/themes/inrelationto/css/inrelationto.css
trunk/examples/wiki/view/themes/inrelationto/js/jqueryPlugins.js
trunk/examples/wiki/view/themes/inrelationto/template.xhtml
trunk/examples/wiki/view/themes/sfwkorg/css/sfwk.css
trunk/examples/wiki/view/themes/sfwkorg/js/jqueryPlugins.js
trunk/examples/wiki/view/themes/sfwkorg/template.xhtml
trunk/examples/wiki/view/uploadCreate_d.xhtml
trunk/examples/wiki/view/uploadCreate_m.xhtml
trunk/examples/wiki/view/uploadEdit_d.xhtml
trunk/examples/wiki/view/uploadEdit_m.xhtml
trunk/examples/wiki/view/userList_d.xhtml
Log:
JBSEAM-2582, UI consistency work and new directory browser
Modified: trunk/examples/wiki/src/etc/META-INF/components-dev.xml
===================================================================
--- trunk/examples/wiki/src/etc/META-INF/components-dev.xml 2008-02-26 19:18:37 UTC (rev
7488)
+++ trunk/examples/wiki/src/etc/META-INF/components-dev.xml 2008-02-27 08:35:11 UTC (rev
7489)
@@ -32,6 +32,9 @@
<mail:mail-session host="localhost" port="25"/>
<!-- Maximum size of file uploads -->
+ <!-- If you are using MySQL, don't forget their magic stuff:
+
http://dev.mysql.com/doc/refman/5.0/en/packet-too-large.html
+ -->
<web:multipart-filter create-temp-files="true"
max-request-size="10000000" url-pattern="*.seam"/>
<!-- ############## END OF WIKI USER CONFIGURATION ############## -->
Modified: trunk/examples/wiki/src/etc/META-INF/components-prod.xml
===================================================================
--- trunk/examples/wiki/src/etc/META-INF/components-prod.xml 2008-02-26 19:18:37 UTC (rev
7488)
+++ trunk/examples/wiki/src/etc/META-INF/components-prod.xml 2008-02-27 08:35:11 UTC (rev
7489)
@@ -32,6 +32,9 @@
<mail:mail-session host="localhost" port="25"/>
<!-- Maximum size of file uploads -->
+ <!-- If you are using MySQL, don't forget their magic stuff:
+
http://dev.mysql.com/doc/refman/5.0/en/packet-too-large.html
+ -->
<web:multipart-filter create-temp-files="true"
max-request-size="10000000" url-pattern="*.seam"/>
<!-- ############## END OF WIKI USER CONFIGURATION ############## -->
Modified: trunk/examples/wiki/src/etc/META-INF/components-test.xml
===================================================================
--- trunk/examples/wiki/src/etc/META-INF/components-test.xml 2008-02-26 19:18:37 UTC (rev
7488)
+++ trunk/examples/wiki/src/etc/META-INF/components-test.xml 2008-02-27 08:35:11 UTC (rev
7489)
@@ -32,6 +32,9 @@
<mail:mail-session host="localhost" port="25"/>
<!-- Maximum size of file uploads -->
+ <!-- If you are using MySQL, don't forget their magic stuff:
+
http://dev.mysql.com/doc/refman/5.0/en/packet-too-large.html
+ -->
<web:multipart-filter create-temp-files="true"
max-request-size="10000000" url-pattern="*.seam"/>
<!-- ############## END OF WIKI USER CONFIGURATION ############## -->
Modified: trunk/examples/wiki/src/etc/WEB-INF/components.xml
===================================================================
--- trunk/examples/wiki/src/etc/WEB-INF/components.xml 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/src/etc/WEB-INF/components.xml 2008-02-27 08:35:11 UTC (rev 7489)
@@ -98,6 +98,9 @@
<value>i18n.messages_feedAggregator</value>
<value>i18n.messages_feedConnector</value>
<value>i18n.messages_forumTopPosters</value>
+ <!--
+ <value>i18n.messages_dirToc</value>
+ -->
</core:bundle-names>
</core:resource-loader>
Modified: trunk/examples/wiki/src/etc/WEB-INF/pages.xml
===================================================================
--- trunk/examples/wiki/src/etc/WEB-INF/pages.xml 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/src/etc/WEB-INF/pages.xml 2008-02-27 08:35:11 UTC (rev 7489)
@@ -44,9 +44,7 @@
<navigation>
<rule if-outcome="exit">
<end-conversation before-redirect="true"/>
- <redirect view-id="/docDisplay_#{skin}.xhtml">
- <param name="documentId"
value="#{documentHistory.currentFile.id}"/>
- </redirect>
+ <redirect
url="#{wikiURLRenderer.renderURL(documentHistory.currentFile)}"/>
</rule>
<rule if-outcome="purgedHistory">
<end-conversation before-redirect="true"/>
@@ -92,11 +90,11 @@
</page>
<page view-id="/dirDisplay*">
- <param name="directoryId"
value="#{directoryHome.nodeId}"/>
+ <param name="directoryId"
value="#{directoryBrowser.directoryId}"/>
<navigation>
<rule if-outcome="removed">
<redirect view-id="/dirDisplay_#{skin}.xhtml">
- <param name="directoryId"
value="#{directoryHome.nodeId}"/>
+ <param name="directoryId"
value="#{directoryBrowser.directoryId}"/>
</redirect>
</rule>
</navigation>
@@ -111,7 +109,9 @@
<navigation>
<rule if-outcome="exitManaged">
<end-conversation before-redirect="true"/>
- <redirect view-id="/dirDisplay_#{skin}.xhtml"/>
+ <redirect view-id="/dirDisplay_#{skin}.xhtml">
+ <param name="directoryId"
value="#{directoryHome.nodeId}"/>
+ </redirect>
</rule>
<rule if-outcome="exitUnmanaged">
<end-conversation before-redirect="true"/>
@@ -342,10 +342,9 @@
<exception class="javax.faces.application.ViewExpiredException">
- <!-- TODO: This is never thrown by JSF, Richfaces is the problem!-->
<end-conversation/>
<redirect view-id="/wiki.xhtml">
- <message>Your session has timed out, please try again</message>
+ <message
severity="WARN">#{messages['lacewiki.msg.SessionTimeoutOccured']}</message>
</redirect>
</exception>
Modified: trunk/examples/wiki/src/etc/WEB-INF/web.xml
===================================================================
--- trunk/examples/wiki/src/etc/WEB-INF/web.xml 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/src/etc/WEB-INF/web.xml 2008-02-27 08:35:11 UTC (rev 7489)
@@ -4,6 +4,19 @@
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
version="2.5">
+ <!--
+ (This resolves the not-thrown ViewExpiredException on session timeout and JSF
POSTback.)
+ I have got a lot of times to understand JSF 1.2 implementation code. As I guess
from code,
+ JSF 1.2 detect ViewHandler/StateManager version from faces-config.xml DTD/XML
schema name.
+ We can't switch RichFaces 3.1.x configuration files to a JSF 1.2 format, as
far as it will
+ completely break JSF 1.1 compatibility. Fortunately, there is workaround for a
SUN RI framework.
+ Just put into application web.xml. It will switch framework to a JSF 1.2
behavior.
+ -->
+ <context-param>
+ <param-name>com.sun.faces.disableVersionTracking</param-name>
+ <param-value>true</param-value>
+ </context-param>
+
<!-- Seam -->
<listener>
Modified: trunk/examples/wiki/src/etc/i18n/messages_en.properties
===================================================================
--- trunk/examples/wiki/src/etc/i18n/messages_en.properties 2008-02-26 19:18:37 UTC (rev
7488)
+++ trunk/examples/wiki/src/etc/i18n/messages_en.properties 2008-02-27 08:35:11 UTC (rev
7489)
@@ -151,8 +151,6 @@
lacewiki.button.Close=Clos<u>e</u> Workspace
lacewiki.button.Close.accesskey=E
-lacewiki.button.ExitEditor=<u>E</u>xit Workspace
-lacewiki.button.ExitEditor.accesskey=E
lacewiki.button.SiteFeed=Subscribe to site
lacewiki.button.DirectoryFeed=Subscribe to directory
@@ -250,12 +248,8 @@
# Directory Display
-lacewiki.label.dirDisplay.Name=Name
-lacewiki.label.dirDisplay.RightClickForActions=(right-click for menu)
-lacewiki.label.dirDisplay.Owner=Owner
lacewiki.label.dirDisplay.ReadAccess=Read Access
lacewiki.label.dirDisplay.WriteAccess=Write Access
-lacewiki.label.dirDisplay.LastModifiedOn=Last Modified On
lacewiki.label.dirDisplay.DirectoryIsEmpty=This directory is empty.
lacewiki.label.dirDisplay.PagerShowing=
lacewiki.label.dirDisplay.PagerTo=to
@@ -441,7 +435,8 @@
lacewiki.label.userList.JoinedOn=Joined
lacewiki.label.userList.LastLoginOn=Last Login
lacewiki.label.userList.NotActivated=Not Activated
-lacewiki.button.userList.Edit=Edit
+lacewiki.label.userList.View=View
+lacewiki.label.userList.Edit=Edit
lacewiki.label.userList.NotAvailableForSkin=User search is not available with this skin.
# User Info
@@ -639,9 +634,20 @@
lacewiki.entity.UsernameMustStartWithALetterAndOnlyContainLetters=Username must start
with a letter, and only contain letters and numbers.
lacewiki.entity.LinkProtokol.PrefixMustOnlyContainLetters=Prefix must only contain
letters.
+# Model properties
+
+lacewiki.entity.WikiNode.property.name=Name
+lacewiki.entity.WikiNode.property.createdOn=Created On
+lacewiki.entity.WikiNode.property.createdBy=Created By
+lacewiki.entity.WikiNode.property.lastModifiedOn=Last Modified On
+lacewiki.entity.WikiNode.property.lastModifiedBy=Last Modified By
+lacewiki.entity.WikiNode.property.rating=Rating
+
+
# Misc messages
lacewiki.msg.SessionTimeout=Your session has timed out, you will be redirected to the
start page.
+lacewiki.msg.SessionTimeoutOccured=Your session has timed out, you have been redirected
to the start page.
lacewiki.msg.UsernameExists=A user with that username already exists, please pick a
different name.
lacewiki.msg.PasswordControlNoMatch=The passwords don't match, please enter again.
lacewiki.msg.PasswordDoesntMatchPattern=Your password is trivial and easy to guess,
please enter a different password.
Modified:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/RomeFeedConnector.java
===================================================================
---
trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/RomeFeedConnector.java 2008-02-26
19:18:37 UTC (rev 7488)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/RomeFeedConnector.java 2008-02-27
08:35:11 UTC (rev 7489)
@@ -89,15 +89,15 @@
return feedEntryDTOs;
} catch (SocketTimeoutException timeoutEx) {
- log.warn("timeout connecting to feed: " + feedURL, timeoutEx);
+ log.warn("timeout connecting to feed: " + feedURL + ", "
+ timeoutEx.getMessage());
} catch (IllegalArgumentException iaEx) {
- log.warn("could not connect to feed: " + feedURL, iaEx);
+ log.warn("could not connect to feed: " + feedURL + ", " +
iaEx.getMessage());
} catch (MalformedURLException urlEx) {
- log.warn("URL is not valid: " + feedURL, urlEx);
+ log.warn("URL is not valid: " + feedURL + ", " +
urlEx.getMessage());
} catch (IOException ioEx) {
- log.warn("could not connect to feed: " + feedURL, ioEx);
+ log.warn("could not connect to feed: " + feedURL + ", " +
ioEx.getMessage());
} catch (FeedException fex) {
- log.warn("could not marshall feed data: " + feedURL, fex);
+ log.warn("could not marshall feed data: " + feedURL + ",
" + fex.getMessage());
}
return Collections.EMPTY_LIST;
}
Modified:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/jira/JiraConnector.java
===================================================================
---
trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/jira/JiraConnector.java 2008-02-26
19:18:37 UTC (rev 7488)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/jira/JiraConnector.java 2008-02-27
08:35:11 UTC (rev 7489)
@@ -70,7 +70,7 @@
log.warn("URL is not valid: " + url);
return null;
} catch (Exception ex) {
- log.error("couldn't connect to remote JIRA webservice: " + url
+ RPC_PATH, ex);
+ log.warn("couldn't connect to remote JIRA webservice: " + url +
RPC_PATH + ", " + ex.getMessage());
return null;
}
}
@@ -79,7 +79,7 @@
try {
return (Boolean) client.execute("jira1.logout",
wrapLoginToken(loginToken));
} catch (XmlRpcException rpcEx) {
- log.error("could not logout from JIRA webservice", rpcEx);
+ log.warn("couldn't disconnect from remote JIRA webservice, " +
rpcEx.getMessage());
}
return false;
}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/CommentQuery.java
===================================================================
---
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/CommentQuery.java 2008-02-26
19:18:37 UTC (rev 7488)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/CommentQuery.java 2008-02-27
08:35:11 UTC (rev 7489)
@@ -1,3 +1,9 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at
gnu.org.
+ */
package org.jboss.seam.wiki.core.action;
import org.jboss.seam.ScopeType;
@@ -7,13 +13,15 @@
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.wiki.core.dao.WikiNodeDAO;
import org.jboss.seam.wiki.core.model.WikiComment;
-import org.jboss.seam.wiki.core.model.WikiDocument;
import org.jboss.seam.wiki.core.action.prefs.CommentsPreferences;
import java.io.Serializable;
import java.util.List;
import java.util.ArrayList;
+/**
+ * @author Christian Bauer
+ */
@Name("commentQuery")
@Scope(ScopeType.CONVERSATION)
public class CommentQuery implements Serializable {
Modified:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DefaultWikiLinkResolver.java
===================================================================
---
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DefaultWikiLinkResolver.java 2008-02-26
19:18:37 UTC (rev 7488)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DefaultWikiLinkResolver.java 2008-02-27
08:35:11 UTC (rev 7489)
@@ -13,6 +13,7 @@
import java.util.Map;
import java.util.Set;
+import java.util.HashMap;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -229,6 +230,28 @@
links.put(linkText, wikiLink);
}
+ public Long resolveWikiDirectoryId(Long currentAreaNumber, String linkText) {
+ WikiFile f = resolveWikiFile(currentAreaNumber, linkText);
+ return f != null ? f.getParent().getId() : null;
+ }
+
+ public Long resolveWikiDocumentId(Long currentAreaNumber, String linkText) {
+ WikiFile f = resolveWikiFile(currentAreaNumber, linkText);
+ return f != null ? f.getId() : null;
+ }
+
+ private WikiFile resolveWikiFile(Long currentAreaNumber, String linkText) {
+ if (linkText == null || linkText.length() == 0) return null;
+ Map<String, WikiLink> resolvedLinks = new HashMap<String,
WikiLink>();
+ resolveLinkText(currentAreaNumber, resolvedLinks, linkText);
+ WikiLink resolvedLink = resolvedLinks.get(linkText);
+ if (resolvedLink.isBroken() || resolvedLink.getFile().getId() == null) {
+ return null;
+ } else {
+ return resolvedLink.getFile();
+ }
+ }
+
private Matcher getCrossAreaMatcher(String linkText) {
Matcher matcher = Pattern.compile(REGEX_WIKILINK_CROSSAREA).matcher(linkText);
return matcher.find() ? matcher : null;
Added: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DirectoryBrowser.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DirectoryBrowser.java
(rev 0)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DirectoryBrowser.java 2008-02-27
08:35:11 UTC (rev 7489)
@@ -0,0 +1,453 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at
gnu.org.
+ */
+package org.jboss.seam.wiki.core.action;
+
+import org.jboss.seam.Component;
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.framework.EntityNotFoundException;
+import org.jboss.seam.annotations.*;
+import org.jboss.seam.annotations.Observer;
+import org.jboss.seam.annotations.security.Restrict;
+import org.jboss.seam.faces.FacesMessages;
+import org.jboss.seam.international.Messages;
+import org.jboss.seam.log.Log;
+import org.jboss.seam.security.Identity;
+import org.jboss.seam.wiki.core.model.*;
+import org.jboss.seam.wiki.core.nestedset.query.NestedSetNodeWrapper;
+import org.jboss.seam.wiki.core.dao.WikiNodeDAO;
+import org.jboss.seam.wiki.core.dao.UserDAO;
+import org.jboss.seam.wiki.core.exception.InvalidWikiRequestException;
+import org.jboss.seam.wiki.util.WikiUtil;
+import org.richfaces.component.UITree;
+import org.richfaces.component.html.HtmlTree;
+import org.richfaces.event.NodeExpandedEvent;
+import org.richfaces.event.NodeSelectedEvent;
+
+import static javax.faces.application.FacesMessage.SEVERITY_INFO;
+import static javax.faces.application.FacesMessage.SEVERITY_WARN;
+import javax.persistence.EntityManager;
+import java.io.Serializable;
+import java.util.*;
+
+/**
+ * AJAX-oriented backend for browsing directories and copy/pasting files.
+ *
+ * @author Christian Bauer
+ */
+@Name("directoryBrowser")
+(a)Scope(ScopeType.CONVERSATION)
+public class DirectoryBrowser implements Serializable {
+
+ @Logger
+ Log log;
+
+ @In
+ Clipboard clipboard;
+
+ @In
+ FacesMessages facesMessages;
+
+ @In
+ EntityManager restrictedEntityManager;
+
+ @In
+ WikiNodeDAO wikiNodeDAO;
+
+ @In
+ WikiDirectory wikiRoot;
+
+ @In(value = "directoryBrowserSettings")
+ DirectoryBrowserSettings settings;
+
+ @Create
+ @Begin // This conversation ends through timeout only
+ public void create() {
+ log.debug("instantiating directory browser conversation");
+ resetPager();
+ }
+
+ private Long directoryId;
+ private WikiDirectory instance;
+ private NestedSetNodeWrapper<WikiDirectory> treeRoot;
+ private List<WikiNode> childNodes;
+ private Map<WikiNode, Boolean> selectedNodes = new
HashMap<WikiNode,Boolean>();
+ private Pager pager;
+
+ public Long getDirectoryId() { return directoryId; }
+ public void setDirectoryId(Long directoryId) { this.directoryId = directoryId; }
+
+ public List<WikiNode> getChildNodes() { return childNodes; }
+ public Map<WikiNode, Boolean> getSelectedNodes() { return selectedNodes; }
+
+ public EntityManager getEntityManager() { return restrictedEntityManager; }
+
+ public WikiNodeDAO getWikiNodeDAO() { return wikiNodeDAO; }
+
+ public WikiDirectory getInstance() {
+ if (instance == null) findInstance();
+ return instance;
+ }
+
+ public void setInstance(WikiDirectory instance) {
+ this.instance = instance;
+ }
+
+ public Pager getPager() {
+ return pager;
+ }
+
+ public void setPager(Pager pager) {
+ this.pager = pager;
+ }
+
+ private void resetPager() {
+ pager = new Pager(settings.getPageSize());
+ }
+
+ public NestedSetNodeWrapper<WikiDirectory> getTreeRoot() {
+ if (treeRoot == null) loadTree();
+ return treeRoot;
+ }
+
+ public void showTree() {
+ settings.setTreeVisible(true);
+ }
+
+ public void hideTree() {
+ settings.setTreeVisible(false);
+ }
+
+ // Open a node in the visible UI tree if its identifier is in the current path
+ public boolean adviseTreeNodeOpened(UITree tree) {
+
+ // We need to call the undocumented getRowData() and not getTreeNode() because
we
+ // use the rich:recursiveTreeNodeAdapter...
+ if (tree.getRowData() == null) return false; // Safety against RichFaces
behavior
+ Long currentTreeNodeId = ((NestedSetNodeWrapper<WikiDirectory>)
tree.getRowData()).getWrappedNode().getId();
+
+ if (settings.getExpandedTreeNodes().contains(currentTreeNodeId)) {
+ log.debug("node is stored as expanded in session: " +
currentTreeNodeId);
+ return true;
+ }
+
+ if (getInstance().getPathIdentifiers().contains(currentTreeNodeId)) {
+ log.debug("node is in parent path of current directory, hence expanded:
" + currentTreeNodeId);
+ return true;
+ }
+ log.debug("node is not expanded: " + currentTreeNodeId);
+ return false;
+ }
+
+ // Select the node in the visible UI tree if its identifier is the same as the
current directory
+ public boolean adviseTreeNodeSelected(UITree tree) {
+ if (tree.getRowData() == null) return false; // Safety against RichFaces
behavior
+ Long currentTreeNodeId = ((NestedSetNodeWrapper<WikiDirectory>)
tree.getRowData()).getWrappedNode().getId();
+ return getInstance().getId().equals(currentTreeNodeId);
+ }
+
+ public void listenTreeNodeExpand(NodeExpandedEvent event) {
+ Long currentTreeNodeId =
+ ((NestedSetNodeWrapper<WikiDirectory>)
((HtmlTree)event.getSource()).getRowData()).getWrappedNode().getId();
+
+ boolean isExpanded = ((HtmlTree)event.getSource()).isExpanded();
+ if (isExpanded) {
+ log.debug("expanding tree node: " + currentTreeNodeId);
+ settings.getExpandedTreeNodes().add(currentTreeNodeId);
+ } else {
+ log.debug("collapsing tree node: " + currentTreeNodeId);
+ settings.getExpandedTreeNodes().remove(currentTreeNodeId);
+ }
+ }
+
+ public void listenTreeNodeSelected(NodeSelectedEvent event) {
+ Long currentTreeNodeId =
+ ((NestedSetNodeWrapper<WikiDirectory>)
((HtmlTree)event.getSource()).getRowData()).getWrappedNode().getId();
+ log.debug("selecting tree node: " + currentTreeNodeId);
+ selectDirectory(currentTreeNodeId);
+ }
+
+ public void findInstance() {
+ if (getDirectoryId() == null)
+ throw new InvalidWikiRequestException("Missing directoryId
parameter");
+
+ instance = wikiNodeDAO.findWikiDirectory(getDirectoryId());
+ if (instance == null)
+ throw new EntityNotFoundException(getDirectoryId(), WikiDirectory.class);
+
+ afterNodeFound();
+ }
+
+ public void afterNodeFound() {
+ refreshChildNodes();
+ }
+
+ public void selectDirectory(Long nodeId) {
+ resetPager();
+ setDirectoryId(nodeId);
+ instance = null;
+ findInstance();
+ settings.getExpandedTreeNodes().add(nodeId);
+ }
+
+ public void sortBy(String propertyName) {
+ resetPager();
+ settings.setOrderByProperty(WikiNode.SortableProperty.valueOf(propertyName));
+ settings.setOrderDescending(!settings.isOrderDescending());
+ refreshChildNodes();
+ }
+
+ public void changePageSize() {
+ pager.setPage(0);
+ refreshChildNodes();
+ }
+
+ @Observer(value = {"PersistenceContext.filterReset",
"Node.refreshList"}, create = false)
+ public void loadTree() {
+ WikiDirectory wikiRoot = (WikiDirectory)
Component.getInstance("wikiRoot");
+ treeRoot = wikiNodeDAO.findWikiDirectoryTree(wikiRoot);
+ }
+
+ @Observer(value = {"PersistenceContext.filterReset",
"Node.refreshList", "Pager.pageChanged"}, create = false)
+ public void refreshChildNodes() {
+
+ log.debug("refreshing child nodes of current directory: " +
getInstance());
+ getPager().setNumOfRecords(wikiNodeDAO.findChildrenCount(getInstance()));
+ getPager().setPageSize(settings.getPageSize());
+
+ log.debug("number of children: " + getPager().getNumOfRecords());
+ if (getPager().getNumOfRecords() > 0) {
+ log.debug("loading children page from: " +
getPager().getNextRecord() + " size: " + getPager().getPageSize());
+ childNodes =
+ wikiNodeDAO.findChildren(
+ getInstance(),
+ settings.getOrderByProperty(),
+ !settings.isOrderDescending(),
+ getPager().getQueryFirstResult(),
+ getPager().getQueryMaxResults()
+ );
+ } else {
+ childNodes = Collections.emptyList();
+ }
+ }
+
+ // TODO: Most of this clipboard stuff is based on the hope that nobody modifies
anything while we have it in the clipboard...
+
+ public void clearClipboard() {
+ clipboard.clear();
+ }
+
+ public void copy() {
+ for (Map.Entry<WikiNode, Boolean> entry : selectedNodes.entrySet()) {
+ if (entry.getValue()) { // Has to be true for a selected node
+ log.debug("copying to clipboard: " + entry.getKey());
+ clipboard.add(entry.getKey().getId(), false);
+ }
+ }
+ selectedNodes.clear();
+ }
+
+ @Restrict("#{s:hasPermission('Node', 'edit',
directoryBrowser.instance)}")
+ public void cut() {
+ for (Map.Entry<WikiNode, Boolean> entry : selectedNodes.entrySet()) {
+ if (entry.getValue()) { // Has to be true for a selected node
+ log.debug("cutting to clipboard: " + entry.getKey());
+ clipboard.add(entry.getKey().getId(), true);
+ }
+ }
+ selectedNodes.clear();
+ refreshChildNodes();
+ }
+
+ @Restrict("#{s:hasPermission('Node', 'create',
directoryBrowser.instance)}")
+ public void paste() {
+
+ if (getInstance().getId().equals(wikiRoot.getId())) return; // Can't paste in
wiki root
+
+ // Batch the work
+ int batchSize = 2;
+ int i = 0;
+ List<Long> batchIds = new ArrayList<Long>();
+ for (Long clipboardNodeId : clipboard.getItems()) {
+ i++;
+ batchIds.add(clipboardNodeId);
+ if (i % batchSize == 0) {
+ List<WikiNode> nodesForPasteBatch =
wikiNodeDAO.findWikiNodes(batchIds);
+ pasteNodes(nodesForPasteBatch);
+ batchIds.clear();
+ }
+ }
+ // Last batch
+ if (batchIds.size() != 0) {
+ List<WikiNode> nodesForPasteBatch =
wikiNodeDAO.findWikiNodes(batchIds);
+ pasteNodes(nodesForPasteBatch);
+ }
+
+ log.debug("completed executing paste, refreshing...");
+
+ selectedNodes.clear();
+ clipboard.clear();
+ refreshChildNodes();
+ }
+
+ private void pasteNodes(List<WikiNode> nodes) {
+ log.debug("executing paste batch");
+ for (WikiNode n: nodes) {
+ log.debug("pasting clipboard item: " + n);
+ String pastedName = n.getName();
+
+ // Check unique name if we are not cutting and pasting into the same area
+ if (!(clipboard.isCut(n.getId()) &&
n.getParent().getAreaNumber().equals(getInstance().getAreaNumber()))) {
+ log.debug("pasting node into different area, checking
wikiname");
+
+ if (!wikiNodeDAO.isUniqueWikiname(getInstance().getAreaNumber(),
WikiUtil.convertToWikiName(pastedName))) {
+ log.debug("wikiname is not unique, renaming");
+ if (pastedName.length() > 245) {
+ facesMessages.addToControlFromResourceBundleOrDefault(
+ "name",
+ SEVERITY_WARN,
+
"lacewiki.msg.Clipboard.DuplicatePasteNameFailure",
+ "The name '{0}' was already in use in this area
and is too long to be renamed, skipping paste.",
+ pastedName
+ );
+ continue; // Jump to next loop iteration when we can't append
a number to the name
+ }
+
+ // Now try to add "Copy 1", "Copy 2" etc. to the
name until it is unique
+ int i = 1;
+ String attemptedName = pastedName + " " +
Messages.instance().get("lacewiki.label.Clipboard.CopySuffix") + i;
+ while (!wikiNodeDAO.isUniqueWikiname(getInstance().getAreaNumber(),
WikiUtil.convertToWikiName(attemptedName))) {
+ attemptedName = pastedName + " " +
Messages.instance().get("lacewiki.label.Clipboard.CopySuffix") + (++i);
+ }
+ pastedName = attemptedName;
+
+ facesMessages.addToControlFromResourceBundleOrDefault(
+ "name",
+ SEVERITY_INFO,
+ "lacewiki.msg.Clipboard.DuplicatePasteName",
+ "The name '{0}' was already in use in this area,
renamed item to '{1}'.",
+ n.getName(), pastedName
+ );
+ }
+ }
+
+ if (clipboard.isCut(n.getId())) {
+ log.debug("cut pasting: " + n);
+
+ // Check if the cut item was a default file for its parent
+ if ( ((WikiDirectory)n.getParent()).getDefaultFile() != null &&
+
((WikiDirectory)n.getParent()).getDefaultFile().getId().equals(n.getId())) {
+ log.debug("cutting default file of directory: " +
n.getParent());
+ ((WikiDirectory)n.getParent()).setDefaultFile(null);
+ }
+
+ n.setName(pastedName);
+ n.setWikiname(WikiUtil.convertToWikiName(pastedName));
+ n.setParent(getInstance());
+
+ // If we cut and paste into a new area, all children must be updated as
well
+ if (!getInstance().getAreaNumber().equals(n.getAreaNumber())) {
+ n.setAreaNumber(getInstance().getAreaNumber());
+
+ // TODO: Ugly and memory intensive, better use a database query but
HQL updates are limited with joins
+ if (n.isInstance(WikiDocument.class)) {
+ List<WikiComment> comments =
wikiNodeDAO.findWikiCommentsFlat((WikiDocument)n, true);
+ for (WikiComment comment : comments) {
+ comment.setAreaNumber(n.getAreaNumber());
+ }
+ }
+ }
+
+ } else {
+ log.debug("copy pasting: " + n);
+ WikiNode newNode = n.duplicate(true);
+ newNode.setName(pastedName);
+ newNode.setWikiname(WikiUtil.convertToWikiName(pastedName));
+ newNode.setParent(getInstance());
+ newNode.setAreaNumber(getInstance().getAreaNumber());
+ UserDAO userDAO = (UserDAO)Component.getInstance(UserDAO.class);
+ newNode.setCreatedBy(userDAO.findUser(n.getCreatedBy().getId()));
+ if (n.getLastModifiedBy() != null) {
+
newNode.setLastModifiedBy(userDAO.findUser(n.getLastModifiedBy().getId()));
+ }
+ restrictedEntityManager.persist(newNode);
+ }
+ }
+ log.debug("completed executing of paste batch");
+ }
+
+ @Restrict("#{s:hasPermission('Trash', 'empty',
trashArea)}")
+ public void emptyTrash() {
+ WikiDirectory trashArea = (WikiDirectory)
Component.getInstance("trashArea");
+ if (getInstance() == null || !trashArea.getId().equals(getInstance().getId()))
return;
+
+ log.debug("emptying trash");
+ List<WikiNode> children = wikiNodeDAO.findChildren(getInstance(),
WikiNode.SortableProperty.name, false, 0, Integer.MAX_VALUE);
+
+ // TODO: This should be batched with a database cursor!
+ for (WikiNode child : children) {
+ log.debug("trashing item: " + child);
+ if (child.isInstance(WikiDocument.class)) {
+ NodeRemover documentRemover =
(NodeRemover)Component.getInstance(DocumentNodeRemover.class);
+ documentRemover.removeDependencies(child);
+ } else if (child.isInstance(WikiUpload.class)) {
+ NodeRemover uploadRemover =
(NodeRemover)Component.getInstance(UploadNodeRemover.class);
+ uploadRemover.removeDependencies(child);
+ }
+ restrictedEntityManager.remove(child);
+ }
+ restrictedEntityManager.flush();
+
+ facesMessages.addFromResourceBundleOrDefault(
+ SEVERITY_INFO,
+ "lacewiki.msg.Trash.Emptied",
+ "All items in the trash have been permanently deleted."
+ );
+
+ selectedNodes.clear();
+ refreshChildNodes();
+ }
+
+
+ // TODO: I'm not too happy with this, maybe we should call the NodeRemovers
directly from the XHTML
+
+ // Cache removablity information, speeds up large lists
+ Map<Long, Boolean> childNodesRemovability = new HashMap<Long,
Boolean>();
+
+ public boolean isRemovable(WikiNode node) {
+
+ if (childNodesRemovability.containsKey(node.getId())) {
+ // Return cached result
+ return childNodesRemovability.get(node.getId());
+ }
+
+ log.debug("checking removablity of node: " + node);
+
+ // Check if the current directory is the trash area, delete doesn't make
sense here
+ WikiDirectory trashArea =
(WikiDirectory)Component.getInstance("trashArea");
+ if (trashArea.getId().equals(getInstance().getId()))
+ return false;
+
+ // Check permissions TODO: This duplicates the check
+ if (!Identity.instance().hasPermission("Node", "edit",
node))
+ return false;
+
+ NodeRemover remover;
+ if (node.isInstance(WikiDocument.class)) {
+ remover = (NodeRemover) Component.getInstance(DocumentNodeRemover.class);
+ } else if (node.isInstance(WikiUpload.class)) {
+ remover = (NodeRemover) Component.getInstance(UploadNodeRemover.class);
+ } else {
+ return false;
+ }
+ boolean removable = remover.isRemovable(node);
+
+ childNodesRemovability.put(node.getId(), removable);
+
+ return removable;
+ }
+
+}
Added:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DirectoryBrowserSettings.java
===================================================================
---
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DirectoryBrowserSettings.java
(rev 0)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DirectoryBrowserSettings.java 2008-02-27
08:35:11 UTC (rev 7489)
@@ -0,0 +1,73 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at
gnu.org.
+ */
+package org.jboss.seam.wiki.core.action;
+
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.annotations.AutoCreate;
+import org.jboss.seam.annotations.Create;
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.wiki.core.model.WikiNode;
+
+import java.util.Set;
+import java.util.HashSet;
+import java.io.Serializable;
+
+/**
+ * @author Christian Bauer
+ */
+@Name("directoryBrowserSettings")
+(a)Scope(ScopeType.SESSION)
+@AutoCreate
+public class DirectoryBrowserSettings implements Serializable {
+
+ private long pageSize = 15l;
+ private boolean treeVisible = false;
+ private Set<Long> expandedTreeNodes = new HashSet<Long>();
+ private WikiNode.SortableProperty orderByProperty = WikiNode.SortableProperty.name;
+ private boolean orderDescending;
+
+ public long getPageSize() {
+ return pageSize;
+ }
+
+ public void setPageSize(long pageSize) {
+ this.pageSize = pageSize;
+ }
+
+ public boolean isTreeVisible() {
+ return treeVisible;
+ }
+
+ public void setTreeVisible(boolean treeVisible) {
+ this.treeVisible = treeVisible;
+ }
+
+ public Set<Long> getExpandedTreeNodes() {
+ return expandedTreeNodes;
+ }
+
+ public void setExpandedTreeNodes(Set<Long> expandedTreeNodes) {
+ this.expandedTreeNodes = expandedTreeNodes;
+ }
+
+ public WikiNode.SortableProperty getOrderByProperty() {
+ return orderByProperty;
+ }
+
+ public void setOrderByProperty(WikiNode.SortableProperty orderByProperty) {
+ this.orderByProperty = orderByProperty;
+ }
+
+ public boolean isOrderDescending() {
+ return orderDescending;
+ }
+
+ public void setOrderDescending(boolean orderDescending) {
+ this.orderDescending = orderDescending;
+ }
+}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DirectoryHome.java
===================================================================
---
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DirectoryHome.java 2008-02-26
19:18:37 UTC (rev 7488)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DirectoryHome.java 2008-02-27
08:35:11 UTC (rev 7489)
@@ -8,24 +8,25 @@
import org.jboss.seam.Component;
import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.*;
-import org.jboss.seam.annotations.Observer;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
import org.jboss.seam.annotations.security.Restrict;
-import org.jboss.seam.annotations.web.RequestParameter;
import org.jboss.seam.international.Messages;
import org.jboss.seam.security.Identity;
import org.jboss.seam.wiki.core.feeds.FeedDAO;
-import org.jboss.seam.wiki.core.model.*;
+import org.jboss.seam.wiki.core.model.WikiDirectory;
+import org.jboss.seam.wiki.core.model.WikiDocument;
+import org.jboss.seam.wiki.core.model.WikiMenuItem;
+import org.jboss.seam.wiki.core.model.WikiNode;
import org.jboss.seam.wiki.util.WikiUtil;
import javax.faces.application.FacesMessage;
import static javax.faces.application.FacesMessage.SEVERITY_INFO;
-import static javax.faces.application.FacesMessage.SEVERITY_WARN;
import java.util.*;
/**
- * TODO: This class is turning into a maintenance nightmare, split
- * directory browser and editor functionality.
+ * Directory editor functionality.
*
* @author Christian Bauer
*/
@@ -33,27 +34,15 @@
@Scope(ScopeType.CONVERSATION)
public class DirectoryHome extends NodeHome<WikiDirectory, WikiDirectory> {
-
/* -------------------------- Context Wiring ------------------------------ */
@In
protected FeedDAO feedDAO;
- @In
- protected Clipboard clipboard;
-
- @In
- @Out(scope = ScopeType.CONVERSATION) // Helps us use this home with page and
conversation contexts
- protected Pager pager;
-
/* -------------------------- Internal State ------------------------------ */
private boolean hasFeed;
- private List<WikiNode> childNodes;
-
- private Map<WikiNode, Boolean> selectedNodes = new
HashMap<WikiNode,Boolean>();
-
private List<WikiDocument> childDocuments = new
ArrayList<WikiDocument>();
private List<WikiMenuItem> menuItems = new ArrayList<WikiMenuItem>();
private SortedSet<WikiDirectory> alreadyUsedMenuItems = new
TreeSet<WikiDirectory>();
@@ -78,16 +67,6 @@
}
@Override
- public WikiDirectory afterNodeFound(WikiDirectory dir) {
- super.afterNodeFound(dir);
-
- getLog().debug("refreshing child nodes after node found");
- refreshChildNodes(dir);
-
- return dir;
- }
-
- @Override
public WikiDirectory beforeNodeEditFound(WikiDirectory dir) {
dir = super.beforeNodeEditFound(dir);
@@ -204,23 +183,6 @@
/* -------------------------- Internal Methods ------------------------------ */
- private void refreshChildNodes(WikiDirectory dir) {
- getLog().debug("refreshing child nodes of directory: " + dir);
- pager.setNumOfRecords(getWikiNodeDAO().findChildrenCount(dir));
- getLog().debug("number of children: " + pager.getNumOfRecords());
- if (pager.getNumOfRecords() > 0) {
- getLog().debug("loading children page from: " +
pager.getNextRecord() + " size: " + pager.getPageSize());
- childNodes =
- getWikiNodeDAO().findChildren(
- dir, WikiNode.SortableProperty.name, false,
- new Long(pager.getNextRecord()).intValue(),
- new Long(pager.getPageSize()).intValue()
- );
- } else {
- childNodes = Collections.emptyList();
- }
- }
-
private void refreshAvailableMenuItems(WikiDirectory dir) {
availableMenuItems = new TreeSet();
availableMenuItems.addAll(getWikiNodeDAO().findChildWikiDirectories(dir));
@@ -271,33 +233,10 @@
/* -------------------------- Public Features ------------------------------ */
- @Observer(value = {"PersistenceContext.filterReset",
"Node.refreshList"}, create = false)
- public void refreshChildNodes() {
- if (isManaged()) {
- getLog().debug("refreshing child nodes of the current instance");
- refreshChildNodes(getInstance());
- } else {
- getLog().debug("not refreshing child nodes, instance is not managed:
" + getInstance());
- }
- }
-
- @RequestParameter
- public void setPage(Integer page) {
- pager.setPage(page);
- }
-
- public Pager getPager() {
- return pager;
- }
-
- public List<WikiNode> getChildNodes() { return childNodes; }
-
public List<WikiDocument> getChildDocuments() { return childDocuments; }
public List<WikiMenuItem> getMenuItems() { return menuItems; }
- public Map<WikiNode, Boolean> getSelectedNodes() { return selectedNodes; }
-
public WikiDirectory getSelectedChildDirectory() { return selectedChildDirectory; }
public void setSelectedChildDirectory(WikiDirectory selectedChildDirectory) {
this.selectedChildDirectory = selectedChildDirectory; }
@@ -352,202 +291,4 @@
}
}
- // TODO: Most of this clipboard stuff is based on the hope that nobody modifies
anything while we have it in the clipboard...
-
- public void clearClipboard() {
- clipboard.clear();
- }
-
- public void copy() {
- for (Map.Entry<WikiNode, Boolean> entry : getSelectedNodes().entrySet()) {
- if (entry.getValue()) {
- getLog().debug("copying to clipboard: " + entry.getKey());
- clipboard.add(entry.getKey().getId(), false);
- }
- }
- selectedNodes.clear();
- }
-
- @Restrict("#{s:hasPermission('Node', 'edit',
directoryHome.instance)}")
- public void cut() {
- for (Map.Entry<WikiNode, Boolean> entry : getSelectedNodes().entrySet()) {
- if (entry.getValue()) {
- getLog().debug("cutting to clipboard: " + entry.getKey());
- clipboard.add(entry.getKey().getId(), true);
- }
- }
- selectedNodes.clear();
- refreshChildNodes();
- }
-
- @Restrict("#{s:hasPermission('Node', 'create',
directoryHome.instance)}")
- public void paste() {
-
- if (getInstance().getId().equals(getWikiRoot().getId())) return; // Can't
paste in wiki root
-
- // Batch the work
- int batchSize = 2;
- int i = 0;
- List<Long> batchIds = new ArrayList<Long>();
- for (Long clipboardNodeId : clipboard.getItems()) {
- i++;
- batchIds.add(clipboardNodeId);
- if (i % batchSize == 0) {
- List<WikiNode> nodesForPasteBatch =
getWikiNodeDAO().findWikiNodes(batchIds);
- pasteNodes(nodesForPasteBatch);
- batchIds.clear();
- }
- }
- // Last batch
- if (batchIds.size() != 0) {
- List<WikiNode> nodesForPasteBatch =
getWikiNodeDAO().findWikiNodes(batchIds);
- pasteNodes(nodesForPasteBatch);
- }
-
- getLog().debug("completed executing paste, refreshing...");
-
- selectedNodes.clear();
- clipboard.clear();
- refreshChildNodes();
- }
-
- private void pasteNodes(List<WikiNode> nodes) {
- getLog().debug("executing paste batch");
- for (WikiNode n: nodes) {
- getLog().debug("pasting clipboard item: " + n);
- String pastedName = n.getName();
-
- // Check unique name if we are not cutting and pasting into the same area
- if (!(clipboard.isCut(n.getId()) &&
n.getParent().getAreaNumber().equals(getInstance().getAreaNumber()))) {
- getLog().debug("pasting node into different area, checking
wikiname");
-
- if (!getWikiNodeDAO().isUniqueWikiname(getInstance().getAreaNumber(),
WikiUtil.convertToWikiName(pastedName))) {
- getLog().debug("wikiname is not unique, renaming");
- if (pastedName.length() > 245) {
- getFacesMessages().addToControlFromResourceBundleOrDefault(
- "name",
- SEVERITY_WARN,
-
"lacewiki.msg.Clipboard.DuplicatePasteNameFailure",
- "The name '{0}' was already in use in this area
and is too long to be renamed, skipping paste.",
- pastedName
- );
- continue; // Jump to next loop iteration when we can't append
a number to the name
- }
-
- // Now try to add "Copy 1", "Copy 2" etc. to the
name until it is unique
- int i = 1;
- String attemptedName = pastedName + " " +
Messages.instance().get("lacewiki.label.Clipboard.CopySuffix") + i;
- while
(!getWikiNodeDAO().isUniqueWikiname(getInstance().getAreaNumber(),
WikiUtil.convertToWikiName(attemptedName))) {
- attemptedName = pastedName + " " +
Messages.instance().get("lacewiki.label.Clipboard.CopySuffix") + (++i);
- }
- pastedName = attemptedName;
-
- getFacesMessages().addToControlFromResourceBundleOrDefault(
- "name",
- SEVERITY_INFO,
- "lacewiki.msg.Clipboard.DuplicatePasteName",
- "The name '{0}' was already in use in this area,
renamed item to '{1}'.",
- n.getName(), pastedName
- );
- }
- }
-
- if (clipboard.isCut(n.getId())) {
- getLog().debug("cut pasting: " + n);
-
- // Check if the cut item was a default file for its parent
- if ( ((WikiDirectory)n.getParent()).getDefaultFile() != null &&
-
((WikiDirectory)n.getParent()).getDefaultFile().getId().equals(n.getId())) {
- getLog().debug("cutting default file of directory: " +
n.getParent());
- ((WikiDirectory)n.getParent()).setDefaultFile(null);
- }
-
- n.setName(pastedName);
- n.setWikiname(WikiUtil.convertToWikiName(pastedName));
- n.setParent(getInstance());
-
- // If we cut and paste into a new area, all children must be updated as
well
- if (!getInstance().getAreaNumber().equals(n.getAreaNumber())) {
- n.setAreaNumber(getInstance().getAreaNumber());
-
- // TODO: Ugly and memory intensive, better use a database query but
HQL updates are limited with joins
- if (n.isInstance(WikiDocument.class)) {
- List<WikiComment> comments =
getWikiNodeDAO().findWikiCommentsFlat((WikiDocument)n, true);
- for (WikiComment comment : comments) {
- comment.setAreaNumber(n.getAreaNumber());
- }
- }
- }
-
- } else {
- getLog().debug("copy pasting: " + n);
- WikiNode newNode = n.duplicate(true);
- newNode.setName(pastedName);
- newNode.setWikiname(WikiUtil.convertToWikiName(pastedName));
- newNode.setParent(getInstance());
- newNode.setAreaNumber(getInstance().getAreaNumber());
- newNode.setCreatedBy(getUserDAO().findUser(n.getCreatedBy().getId()));
- if (n.getLastModifiedBy() != null) {
-
newNode.setLastModifiedBy(getUserDAO().findUser(n.getLastModifiedBy().getId()));
- }
- getEntityManager().persist(newNode);
- }
- }
- getLog().debug("completed executing of paste batch");
- }
-
- @Restrict("#{s:hasPermission('Trash', 'empty',
trashArea)}")
- public void emptyTrash() {
- WikiDirectory trashArea = (WikiDirectory)
Component.getInstance("trashArea");
- if (!isManaged() || !trashArea.getId().equals(getInstance().getId())) return;
-
- getLog().debug("emptying trash");
- List<WikiNode> children = getWikiNodeDAO().findChildren(getInstance(),
WikiNode.SortableProperty.name, false, 0, Integer.MAX_VALUE);
-
- // TODO: This should be batched with a database cursor!
- for (WikiNode child : children) {
- getLog().debug("trashing item: " + child);
- if (child.isInstance(WikiDocument.class)) {
- NodeRemover documentRemover =
(NodeRemover)Component.getInstance(DocumentNodeRemover.class);
- documentRemover.removeDependencies(child);
- } else if (child.isInstance(WikiUpload.class)) {
- NodeRemover uploadRemover =
(NodeRemover)Component.getInstance(UploadNodeRemover.class);
- uploadRemover.removeDependencies(child);
- }
- getEntityManager().remove(child);
- }
- getEntityManager().flush();
-
- getFacesMessages().addFromResourceBundleOrDefault(
- SEVERITY_INFO,
- "lacewiki.msg.Trash.Emptied",
- "All items in the trash have been permanently deleted."
- );
-
- selectedNodes.clear();
- refreshChildNodes();
- }
-
- public boolean isRemovable(WikiNode node) {
-
- // Check if the current directory is the trash area, delete doesn't make
sense here
- WikiDirectory trashArea =
(WikiDirectory)Component.getInstance("trashArea");
- if (trashArea.getId().equals(getInstance().getId()))
- return false;
-
- // Check permissions TODO: This duplicates the check
- if (!Identity.instance().hasPermission("Node", "edit",
node))
- return false;
-
- NodeRemover remover;
- if (node.isInstance(WikiDocument.class)) {
- remover = (NodeRemover) Component.getInstance(DocumentNodeRemover.class);
- } else if (node.isInstance(WikiUpload.class)) {
- remover = (NodeRemover) Component.getInstance(UploadNodeRemover.class);
- } else {
- return false;
- }
- return remover.isRemovable(node);
- }
-
}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/NodeHome.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/NodeHome.java 2008-02-26
19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/NodeHome.java 2008-02-27
08:35:11 UTC (rev 7489)
@@ -261,6 +261,7 @@
}
public boolean isRemovable() {
+ getLog().debug("checking removability of current instance");
return isManaged() &&
getNodeRemover() != null &&
getNodeRemover().isRemovable(getInstance());
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/Pager.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/Pager.java 2008-02-26
19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/Pager.java 2008-02-27
08:35:11 UTC (rev 7489)
@@ -5,6 +5,7 @@
import org.jboss.seam.annotations.AutoCreate;
import org.jboss.seam.annotations.web.RequestParameter;
import org.jboss.seam.ScopeType;
+import org.jboss.seam.core.Events;
import java.io.Serializable;
@@ -45,8 +46,7 @@
@RequestParameter
public void setPageSize(Long pageSize) {
- if (pageSize != null)
- this.pageSize = pageSize;
+ if (pageSize != null) this.pageSize = pageSize;
}
public int getNextPage() {
@@ -97,6 +97,30 @@
return new Long(getPageSize()).intValue();
}
+ public boolean isSeveralPages() {
+ return getNumOfRecords() != 0 && getNumOfRecords() > getPageSize();
+ }
+
+ public void setFirstPage() {
+ setPage(getFirstPage());
+ Events.instance().raiseEvent("Pager.pageChanged");
+ }
+
+ public void setPreviousPage() {
+ setPage(getPreviousPage());
+ Events.instance().raiseEvent("Pager.pageChanged");
+ }
+
+ public void setNextPage() {
+ setPage(getNextPage());
+ Events.instance().raiseEvent("Pager.pageChanged");
+ }
+
+ public void setLastPage() {
+ setPage(new Long(getLastPage()).intValue());
+ Events.instance().raiseEvent("Pager.pageChanged");
+ }
+
public String toString() {
return "Pager - Records: " + getNumOfRecords() + " Page size:
" + getPageSize();
}
Modified:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/WikiRequestResolver.java
===================================================================
---
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/WikiRequestResolver.java 2008-02-26
19:18:37 UTC (rev 7488)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/WikiRequestResolver.java 2008-02-27
08:35:11 UTC (rev 7489)
@@ -8,18 +8,17 @@
import org.jboss.seam.Component;
import org.jboss.seam.ScopeType;
-import org.jboss.seam.web.Parameters;
-import org.jboss.seam.contexts.Contexts;
import org.jboss.seam.annotations.*;
-import org.jboss.seam.annotations.web.RequestParameter;
+import org.jboss.seam.contexts.Contexts;
import org.jboss.seam.faces.FacesMessages;
import org.jboss.seam.log.Log;
+import org.jboss.seam.web.Parameters;
import org.jboss.seam.wiki.core.dao.WikiNodeDAO;
-import org.jboss.seam.wiki.core.model.*;
+import org.jboss.seam.wiki.core.model.WikiDirectory;
+import org.jboss.seam.wiki.core.model.WikiDocument;
import org.jboss.seam.wiki.core.search.WikiSearch;
import javax.faces.application.FacesMessage;
-import java.util.Map;
/**
* Returns <tt>docDisplay</tt>, <tt>dirDisplay</tt>, or
<tt>search</tt> for the resolved <tt>nodeId</tt>.
@@ -197,10 +196,10 @@
log.debug("displaying document: " + currentDocument);
return "docDisplay";
} else {
- DirectoryHome directoryHome =
(DirectoryHome)Component.getInstance(DirectoryHome.class);
- directoryHome.setNodeId(currentDirectory.getId());
- directoryHome.setInstance(currentDirectory);
- directoryHome.afterNodeFound(currentDirectory);
+ DirectoryBrowser directoryBrowser =
(DirectoryBrowser)Component.getInstance(DirectoryBrowser.class);
+ directoryBrowser.setDirectoryId(currentDirectory.getId());
+ directoryBrowser.setInstance(currentDirectory);
+ directoryBrowser.afterNodeFound();
log.debug("displaying directory: " + currentDirectory);
return "dirDisplay";
}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/dao/WikiNodeDAO.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/dao/WikiNodeDAO.java 2008-02-26
19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/dao/WikiNodeDAO.java 2008-02-27
08:35:11 UTC (rev 7489)
@@ -582,6 +582,10 @@
}
+ public NestedSetNodeWrapper<WikiDirectory> findWikiDirectoryTree(WikiDirectory
startDir) {
+ return findWikiDirectoryTree(startDir, null, 0l, false);
+ }
+
public NestedSetNodeWrapper<WikiDirectory> findWikiDirectoryTree(WikiDirectory
startDir, Long maxDepth, Long flattenToLevel, boolean showAdminOnly) {
NestedSetNodeWrapper<WikiDirectory> startNodeWrapper = new
NestedSetNodeWrapper<WikiDirectory>(startDir, getComparatorWikiDirectoryName());
Modified:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/engine/WikiLinkResolver.java
===================================================================
---
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/engine/WikiLinkResolver.java 2008-02-26
19:18:37 UTC (rev 7488)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/engine/WikiLinkResolver.java 2008-02-27
08:35:11 UTC (rev 7489)
@@ -166,4 +166,8 @@
*/
public void resolveLinkText(Long currentAreaNumber, Map<String, WikiLink>
links, String linkText);
+ public Long resolveWikiDirectoryId(Long currentAreaNumber, String linkText);
+
+ public Long resolveWikiDocumentId(Long currentAreaNumber, String linktext);
+
}
Modified:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/feeds/FeedEntryManager.java
===================================================================
---
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/feeds/FeedEntryManager.java 2008-02-26
19:18:37 UTC (rev 7488)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/feeds/FeedEntryManager.java 2008-02-27
08:35:11 UTC (rev 7489)
@@ -1,3 +1,9 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at
gnu.org.
+ */
package org.jboss.seam.wiki.core.feeds;
import org.jboss.seam.wiki.core.model.FeedEntry;
@@ -14,6 +20,9 @@
import antlr.ANTLRException;
import antlr.RecognitionException;
+/**
+ * @author Christian Bauer
+ */
@Scope(ScopeType.APPLICATION)
public abstract class FeedEntryManager<M, FE extends FeedEntry> {
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/WikiDirectory.java
===================================================================
---
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/WikiDirectory.java 2008-02-26
19:18:37 UTC (rev 7488)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/WikiDirectory.java 2008-02-27
08:35:11 UTC (rev 7489)
@@ -106,6 +106,18 @@
}
}
+ public List<Long> getPathIdentifiers() {
+ List<Long> pathIds = new ArrayList<Long>();
+ WikiDirectory current = this;
+ pathIds.add(current.getId());
+ while (current.getParent() != null &&
getParent().isInstance(WikiDirectory.class)){
+ current = (WikiDirectory)current.getParent();
+ pathIds.add(current.getId());
+ }
+ Collections.reverse(pathIds);
+ return pathIds;
+ }
+
public List<WikiDirectory> getPath() {
List<WikiDirectory> path = new ArrayList<WikiDirectory>();
WikiDirectory current = this;
@@ -119,6 +131,6 @@
}
public String toString() {
- return "Directory (" + getId() + "): " + getName();
+ return "WikiDirectory (" + getId() + "): " + getName();
}
}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/WikiDocument.java
===================================================================
---
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/WikiDocument.java 2008-02-26
19:18:37 UTC (rev 7488)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/WikiDocument.java 2008-02-27
08:35:11 UTC (rev 7489)
@@ -154,7 +154,7 @@
/*
Macro handling routines, based on the following concept:
- - Persistent HEADER/CONTENT/FOOTER fields: This is the editable text, show to the
user.
+ - Persistent HEADER/CONTENT/FOOTER fields: This is the editable text, shown to
the user.
- Persistent HEADER_MACROS/CONTENT_MACROS/FOOTER_MACROS fields: These are strings
that represent
a space-separated list of all macros (names only) the user has entered. We need
this separate
@@ -316,7 +316,18 @@
}
}
+ // TODO: Again, the ugly Hibernate group by bug
+ public static String[] getPropertiesForGroupingInQueries() {
+ return new String[]{
+ "id", "version", "parent", "rating",
+ "areaNumber", "name", "wikiname",
"createdBy", "createdOn",
+ "lastModifiedBy", "lastModifiedOn",
"readAccessLevel", "writeAccessLevel", "writeProtected",
+ "nameAsTitle", "enableComments",
"enableCommentForm", "enableCommentsOnFeeds",
+ "header", "headerMacrosString",
"contentMacrosString", "footer", "footerMacrosString"
+ };
+ }
+
public String toString() {
- return "Document (" + getId() + "): " + getName();
+ return "WikiDocument (" + getId() + "): " + getName();
}
}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/WikiNode.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/WikiNode.java 2008-02-26
19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/WikiNode.java 2008-02-27
08:35:11 UTC (rev 7489)
@@ -27,7 +27,7 @@
public abstract class WikiNode<N extends WikiNode> implements Comparable {
public static enum SortableProperty {
- name, createdOn, lastModifiedOn, rating
+ name, createdOn, createdBy, lastModifiedOn, lastModifiedBy, rating
}
@Id
Modified:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/nestedset/query/NestedSetNodeWrapper.java
===================================================================
---
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/nestedset/query/NestedSetNodeWrapper.java 2008-02-26
19:18:37 UTC (rev 7488)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/nestedset/query/NestedSetNodeWrapper.java 2008-02-27
08:35:11 UTC (rev 7489)
@@ -51,7 +51,8 @@
Comparator<NestedSetNodeWrapper<N>> comparator;
Long level;
Map<String, Object> additionalProjections = new HashMap<String,
Object>();
- public boolean childrenLoaded = false;
+ Map<Long, NestedSetNodeWrapper<N>> flatTree = new LinkedHashMap<Long,
NestedSetNodeWrapper<N>>();
+ Object payload;
public NestedSetNodeWrapper(N wrappedNode) {
this(
@@ -97,7 +98,6 @@
void setWrappedParent(NestedSetNodeWrapper<N> wrappedParent) {
this.wrappedParent = wrappedParent;
- childrenLoaded = true;
}
public List<NestedSetNodeWrapper<N>> getWrappedChildren() {
@@ -110,7 +110,6 @@
void addWrappedChild(NestedSetNodeWrapper<N> wrappedChild) {
getWrappedChildren().add(wrappedChild);
- childrenLoaded = true;
}
public Comparator<NestedSetNodeWrapper<N>> getComparator() {
@@ -131,6 +130,18 @@
return wrappedChildrenSorted;
}
+ public Map<Long, NestedSetNodeWrapper<N>> getFlatTree() {
+ return flatTree;
+ }
+
+ public Object getPayload() {
+ return payload;
+ }
+
+ public void setPayload(Object payload) {
+ this.payload = payload;
+ }
+
// This is needed because JSF converters for selectitems need to return an equal()
instance to
// the selected item of the selectitems collection. This sucks.
public boolean equals(Object o) {
@@ -139,9 +150,8 @@
NestedSetNodeWrapper that = (NestedSetNodeWrapper) o;
- if (!wrappedNode.getId().equals(that.wrappedNode.getId())) return false;
+ return wrappedNode.getId().equals(that.wrappedNode.getId());
- return true;
}
public int hashCode() {
Modified:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/nestedset/query/NestedSetResultTransformer.java
===================================================================
---
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/nestedset/query/NestedSetResultTransformer.java 2008-02-26
19:18:37 UTC (rev 7488)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/nestedset/query/NestedSetResultTransformer.java 2008-02-27
08:35:11 UTC (rev 7489)
@@ -157,7 +157,9 @@
}
nodeWrapper.setWrappedParent(currentParent);
currentParent.addWrappedChild(nodeWrapper);
- log.trace("adding nested set node to tree: " + nodeWrapper);
+ log.trace("added nested set node to tree: " + nodeWrapper);
+ rootWrapper.getFlatTree().put(nodeWrapper.getWrappedNode().getId(),
nodeWrapper);
+
currentParent = nodeWrapper;
return rootWrapper; // Return just something so that transformList() will be
called when we are done
Added: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/icon/IconHandler.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/icon/IconHandler.java
(rev 0)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/icon/IconHandler.java 2008-02-27
08:35:11 UTC (rev 7489)
@@ -0,0 +1,21 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at
gnu.org.
+ */
+package org.jboss.seam.wiki.core.ui.icon;
+
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.wiki.core.model.WikiNode;
+
+/**
+ * @author Christian Bauer
+ */
+(a)Scope(ScopeType.CONVERSATION)
+public abstract class IconHandler<N extends WikiNode> {
+
+ public abstract String getIconName(N wikiNode);
+
+}
Added:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/icon/WikiDirectoryIconHandler.java
===================================================================
---
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/icon/WikiDirectoryIconHandler.java
(rev 0)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/icon/WikiDirectoryIconHandler.java 2008-02-27
08:35:11 UTC (rev 7489)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at
gnu.org.
+ */
+package org.jboss.seam.wiki.core.ui.icon;
+
+import org.jboss.seam.wiki.core.model.WikiDirectory;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.In;
+
+import java.io.Serializable;
+
+/**
+ * @author Christian Bauer
+ */
+@Name("wikiDirectoryIconHandler")
+public class WikiDirectoryIconHandler extends IconHandler<WikiDirectory> implements
Serializable {
+
+ @In
+ WikiDirectory trashArea;
+
+ @In
+ WikiDirectory memberArea;
+
+ @In
+ WikiDirectory helpArea;
+
+ public String getIconName(WikiDirectory dir) {
+ if (dir.getId().equals(trashArea.getId())) return "icon.trash.gif";
+ if (dir.getId().equals(helpArea.getId())) return "icon.help.gif";
+ if (dir.getId().equals(memberArea.getId())) return "icon.user.gif";
+ return "icon.dir.gif";
+ }
+}
Added:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/icon/WikiDocumentIconHandler.java
===================================================================
---
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/icon/WikiDocumentIconHandler.java
(rev 0)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/icon/WikiDocumentIconHandler.java 2008-02-27
08:35:11 UTC (rev 7489)
@@ -0,0 +1,31 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at
gnu.org.
+ */
+package org.jboss.seam.wiki.core.ui.icon;
+
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.wiki.core.model.WikiDocument;
+import org.jboss.seam.wiki.core.action.DirectoryBrowser;
+
+import java.io.Serializable;
+
+/**
+ * @author Christian Bauer
+ */
+@Name("wikiDocumentIconHandler")
+public class WikiDocumentIconHandler extends IconHandler<WikiDocument> implements
Serializable {
+
+ @In
+ DirectoryBrowser directoryBrowser;
+
+ public String getIconName(WikiDocument doc) {
+ if (directoryBrowser.getInstance().getDefaultFile() != null &&
+ directoryBrowser.getInstance().getDefaultFile().getId().equals(doc.getId()))
return "icon.doc.default.gif";
+ return "icon.doc.gif";
+ }
+
+}
\ No newline at end of file
Added:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/icon/WikiUploadIconHandler.java
===================================================================
---
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/icon/WikiUploadIconHandler.java
(rev 0)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/icon/WikiUploadIconHandler.java 2008-02-27
08:35:11 UTC (rev 7489)
@@ -0,0 +1,32 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at
gnu.org.
+ */
+package org.jboss.seam.wiki.core.ui.icon;
+
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.wiki.core.model.WikiUpload;
+import org.jboss.seam.wiki.core.upload.UploadType;
+import org.jboss.seam.wiki.core.upload.UploadTypes;
+
+import java.io.Serializable;
+import java.util.Map;
+
+/**
+ * @author Christian Bauer
+ */
+@Name("wikiUploadIconHandler")
+public class WikiUploadIconHandler extends IconHandler<WikiUpload> implements
Serializable {
+
+ @In
+ Map<String, UploadType> uploadTypes;
+
+ public String getIconName(WikiUpload upload) {
+ if (uploadTypes.containsKey(upload.getContentType()))
+ return uploadTypes.get(upload.getContentType()).getDisplayIcon();
+ return uploadTypes.get(UploadTypes.GENERIC_UPLOAD_TYPE).getDisplayIcon();
+ }
+}
\ No newline at end of file
Modified:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/blogdirectory/BlogDAO.java
===================================================================
---
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/blogdirectory/BlogDAO.java 2008-02-26
19:18:37 UTC (rev 7488)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/blogdirectory/BlogDAO.java 2008-02-27
08:35:11 UTC (rev 7489)
@@ -11,22 +11,24 @@
import org.hibernate.SQLQuery;
import org.hibernate.Session;
import org.hibernate.transform.ResultTransformer;
-import org.jboss.seam.annotations.AutoCreate;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
import org.jboss.seam.wiki.core.model.WikiDirectory;
import org.jboss.seam.wiki.core.model.WikiDocument;
import org.jboss.seam.wiki.core.action.Pager;
+import org.jboss.seam.ScopeType;
import javax.persistence.EntityManager;
import java.util.List;
+import java.io.Serializable;
/**
* @author Christian Bauer
*/
@Name("blogDAO")
-@AutoCreate
-public class BlogDAO {
+(a)Scope(ScopeType.CONVERSATION)
+public class BlogDAO implements Serializable {
@In
EntityManager restrictedEntityManager;
Modified:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/blogdirectory/BlogDirectory.java
===================================================================
---
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/blogdirectory/BlogDirectory.java 2008-02-26
19:18:37 UTC (rev 7488)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/blogdirectory/BlogDirectory.java 2008-02-27
08:35:11 UTC (rev 7489)
@@ -30,7 +30,7 @@
@In
WikiNodeDAO wikiNodeDAO;
- @In
+ @In(create = true)
BlogDAO blogDAO;
@In
Modified:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/faqBrowser/FaqBrowser.java
===================================================================
---
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/faqBrowser/FaqBrowser.java 2008-02-26
19:18:37 UTC (rev 7488)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/faqBrowser/FaqBrowser.java 2008-02-27
08:35:11 UTC (rev 7489)
@@ -23,13 +23,12 @@
*/
@Name("faqBrowser")
@Scope(ScopeType.PAGE)
-@AutoCreate
public class FaqBrowser implements Serializable {
@Logger
Log log;
- @In
+ @In(create = true)
FaqBrowserDAO faqBrowserDAO;
@In
Modified:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/faqBrowser/FaqBrowserDAO.java
===================================================================
---
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/faqBrowser/FaqBrowserDAO.java 2008-02-26
19:18:37 UTC (rev 7488)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/faqBrowser/FaqBrowserDAO.java 2008-02-27
08:35:11 UTC (rev 7489)
@@ -24,7 +24,6 @@
*/
@Name("faqBrowserDAO")
@Scope(ScopeType.CONVERSATION)
-@AutoCreate
public class FaqBrowserDAO implements Serializable {
@In
Modified:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/faqBrowser/FaqQuestionHome.java
===================================================================
---
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/faqBrowser/FaqQuestionHome.java 2008-02-26
19:18:37 UTC (rev 7488)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/faqBrowser/FaqQuestionHome.java 2008-02-27
08:35:11 UTC (rev 7489)
@@ -15,7 +15,7 @@
@Scope(ScopeType.CONVERSATION)
public class FaqQuestionHome extends DocumentHome {
- @In
+ @In(create = true)
FaqBrowser faqBrowser;
private boolean showForm = false;
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ForumDAO.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ForumDAO.java 2008-02-26
19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ForumDAO.java 2008-02-27
08:35:11 UTC (rev 7489)
@@ -3,18 +3,19 @@
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.AutoCreate;
+import org.jboss.seam.annotations.Scope;
import org.jboss.seam.wiki.core.model.*;
-import org.jboss.seam.Component;
+import org.jboss.seam.ScopeType;
import org.hibernate.Session;
-import org.hibernate.ScrollableResults;
import org.hibernate.transform.ResultTransformer;
import javax.persistence.EntityManager;
import java.util.*;
+import java.io.Serializable;
@Name("forumDAO")
-@AutoCreate
-public class ForumDAO {
+(a)Scope(ScopeType.CONVERSATION)
+public class ForumDAO implements Serializable {
@In
EntityManager entityManager;
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ForumHome.java
===================================================================
---
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ForumHome.java 2008-02-26
19:18:37 UTC (rev 7488)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ForumHome.java 2008-02-27
08:35:11 UTC (rev 7489)
@@ -17,7 +17,7 @@
@Scope(ScopeType.CONVERSATION)
public class ForumHome extends DirectoryHome {
- @In
+ @In(create = true)
ForumDAO forumDAO;
@In
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ForumQuery.java
===================================================================
---
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ForumQuery.java 2008-02-26
19:18:37 UTC (rev 7488)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ForumQuery.java 2008-02-27
08:35:11 UTC (rev 7489)
@@ -53,7 +53,7 @@
@In
int currentAccessLevel;
- @In
+ @In(create = true)
ForumDAO forumDAO;
/* ####################### FORUMS ########################## */
Modified:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ForumTopicReadManager.java
===================================================================
---
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ForumTopicReadManager.java 2008-02-26
19:18:37 UTC (rev 7488)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ForumTopicReadManager.java 2008-02-27
08:35:11 UTC (rev 7489)
@@ -26,7 +26,6 @@
*/
@Name("forumTopicReadManager")
@Scope(ScopeType.SESSION)
-@AutoCreate
public class ForumTopicReadManager implements Serializable {
Map<Long, Set<Long>> readTopics = new HashMap<Long,
Set<Long>>();
Modified:
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/browse/DisplayDirectories.java
===================================================================
---
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/browse/DisplayDirectories.java 2008-02-26
19:18:37 UTC (rev 7488)
+++
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/browse/DisplayDirectories.java 2008-02-27
08:35:11 UTC (rev 7489)
@@ -8,6 +8,7 @@
import org.dbunit.operation.DatabaseOperation;
import org.jboss.seam.wiki.core.action.DirectoryHome;
+import org.jboss.seam.wiki.core.action.DirectoryBrowser;
import org.jboss.seam.wiki.core.model.*;
import org.jboss.seam.wiki.test.util.DBUnitSeamTest;
import org.testng.annotations.Test;
@@ -34,15 +35,15 @@
WikiDocument doc =
(WikiDocument)getValue("#{currentDocument}");
assert doc == null;
- DirectoryHome dirHome = (DirectoryHome)getInstance(DirectoryHome.class);
- WikiDirectory dir = dirHome.getInstance();
+ DirectoryBrowser browser =
(DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ WikiDirectory dir = browser.getInstance();
assert dir != null;
assert dir.getId().equals(2l);
assert dir.getArea().getId().equals(2l);
- assert dirHome.getChildNodes().size() == 1;
+ assert browser.getChildNodes().size() == 1;
- assert dirHome.isRemovable(dirHome.getChildNodes().get(0));
+ assert browser.isRemovable(browser.getChildNodes().get(0));
assert getRenderedViewId().equals("/dirDisplay_d.xhtml");
}
@@ -63,14 +64,14 @@
WikiDocument doc =
(WikiDocument)getValue("#{currentDocument}");
assert doc == null;
- DirectoryHome dirHome = (DirectoryHome)getInstance(DirectoryHome.class);
- WikiDirectory dir = dirHome.getInstance();
+ DirectoryBrowser browser =
(DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ WikiDirectory dir = browser.getInstance();
assert dir != null;
assert dir.getId().equals(4l);
- assert dirHome.getChildNodes().size() == 1;
+ assert browser.getChildNodes().size() == 1;
- assert dirHome.isRemovable(dirHome.getChildNodes().get(0));
+ assert browser.isRemovable(browser.getChildNodes().get(0));
assert getRenderedViewId().equals("/dirDisplay_d.xhtml");
}
Modified:
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/editing/ClipboardTests.java
===================================================================
---
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/editing/ClipboardTests.java 2008-02-26
19:18:37 UTC (rev 7488)
+++
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/editing/ClipboardTests.java 2008-02-27
08:35:11 UTC (rev 7489)
@@ -7,8 +7,8 @@
package org.jboss.seam.wiki.test.editing;
import org.dbunit.operation.DatabaseOperation;
-import org.jboss.seam.wiki.core.action.DirectoryHome;
import org.jboss.seam.wiki.core.action.Clipboard;
+import org.jboss.seam.wiki.core.action.DirectoryBrowser;
import org.jboss.seam.wiki.core.model.*;
import org.jboss.seam.wiki.test.util.DBUnitSeamTest;
import org.testng.annotations.Test;
@@ -36,13 +36,14 @@
}
protected void invokeApplication() throws Exception {
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(2l); // Init!
+ DirectoryBrowser browser =
(DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(2l); // Init!
- WikiDocument doc = home.getWikiNodeDAO().findWikiDocument(9l);
- home.getSelectedNodes().put(doc, true);
+ WikiDocument doc = browser.getWikiNodeDAO().findWikiDocument(9l);
- home.copy();
+ browser.getSelectedNodes().put(doc, true);
+
+ browser.copy();
}
}.run();
@@ -54,9 +55,6 @@
}
protected void renderResponse() throws Exception {
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(2l); // Init!
-
Clipboard clipboard = (Clipboard)getInstance(Clipboard.class);
assert clipboard.getItems().size() == 1;
@@ -72,12 +70,12 @@
}
protected void renderResponse() throws Exception {
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(4l); // Init!
+ DirectoryBrowser browser =
(DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(4l); // Init!
- home.paste();
+ browser.paste();
- home.getEntityManager().flush(); // TODO: ?! I think the test phase
listener is wrong here not doing that...
+ browser.getEntityManager().flush(); // TODO: ?! I think the test phase
listener is wrong here not doing that...
}
}.run();
@@ -91,18 +89,18 @@
Clipboard clipboard = (Clipboard)getInstance(Clipboard.class);
assert clipboard.getItems().size() == 0;
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(4l); // Init!
+ DirectoryBrowser browser =
(DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(4l); // Init!
- assert home.getChildNodes().size() == 2;
+ assert browser.getChildNodes().size() == 2;
WikiDocument doc =
-
home.getWikiNodeDAO().findWikiDocumentInArea(home.getInstance().getAreaNumber(),
"Four");
+
browser.getWikiNodeDAO().findWikiDocumentInArea(browser.getInstance().getAreaNumber(),
"Four");
- assert doc.getAreaNumber().equals(home.getInstance().getAreaNumber());
+ assert
doc.getAreaNumber().equals(browser.getInstance().getAreaNumber());
WikiDocument docOriginal =
- home.getWikiNodeDAO().findWikiDocumentInArea(2l,
"Four");
+ browser.getWikiNodeDAO().findWikiDocumentInArea(2l,
"Four");
assert docOriginal.getParent().getId().equals(2l);
}
@@ -120,13 +118,14 @@
}
protected void invokeApplication() throws Exception {
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(2l); // Init!
+ DirectoryBrowser browser =
(DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(2l); // Init!
- WikiUpload upload = home.getWikiNodeDAO().findWikiUpload(30l);
- home.getSelectedNodes().put(upload, true);
+ WikiUpload upload = browser.getWikiNodeDAO().findWikiUpload(30l);
- home.copy();
+ browser.getSelectedNodes().put(upload, true);
+
+ browser.copy();
}
}.run();
@@ -138,9 +137,6 @@
}
protected void renderResponse() throws Exception {
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(2l); // Init!
-
Clipboard clipboard = (Clipboard)getInstance(Clipboard.class);
assert clipboard.getItems().size() == 1;
@@ -156,12 +152,12 @@
}
protected void renderResponse() throws Exception {
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(4l); // Init!
+ DirectoryBrowser browser =
(DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(4l); // Init!
- home.paste();
+ browser.paste();
- home.getEntityManager().flush(); // TODO: ?! I think the test phase
listener is wrong here not doing that...
+ browser.getEntityManager().flush(); // TODO: ?! I think the test phase
listener is wrong here not doing that...
}
}.run();
@@ -175,19 +171,19 @@
Clipboard clipboard = (Clipboard)getInstance(Clipboard.class);
assert clipboard.getItems().size() == 0;
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(4l); // Init!
+ DirectoryBrowser browser =
(DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(4l); // Init!
- assert home.getChildNodes().size() == 2;
+ assert browser.getChildNodes().size() == 2;
- List<WikiUpload> uploads =
home.getWikiNodeDAO().findWikiUploads(home.getInstance(),
WikiNode.SortableProperty.createdOn, true);
+ List<WikiUpload> uploads =
browser.getWikiNodeDAO().findWikiUploads(browser.getInstance(),
WikiNode.SortableProperty.createdOn, true);
assert uploads.size() == 1;
assert uploads.get(0).getName().equals("Test Image");
- assert
uploads.get(0).getAreaNumber().equals(home.getInstance().getAreaNumber());
+ assert
uploads.get(0).getAreaNumber().equals(browser.getInstance().getAreaNumber());
- WikiDirectory originalDir = home.getWikiNodeDAO().findWikiDirectory(2l);
- List<WikiUpload> originalUploads =
home.getWikiNodeDAO().findWikiUploads(originalDir, WikiNode.SortableProperty.createdOn,
true);
+ WikiDirectory originalDir =
browser.getWikiNodeDAO().findWikiDirectory(2l);
+ List<WikiUpload> originalUploads =
browser.getWikiNodeDAO().findWikiUploads(originalDir, WikiNode.SortableProperty.createdOn,
true);
assert originalUploads.size() == 2;
}
}.run();
@@ -204,15 +200,16 @@
}
protected void invokeApplication() throws Exception {
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(2l); // Init!
+ DirectoryBrowser browser =
(DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(2l); // Init!
- WikiDocument doc = home.getWikiNodeDAO().findWikiDocument(9l);
- WikiUpload upload = home.getWikiNodeDAO().findWikiUpload(30l);
- home.getSelectedNodes().put(doc, true);
- home.getSelectedNodes().put(upload, true);
+ WikiDocument doc = browser.getWikiNodeDAO().findWikiDocument(9l);
+ WikiUpload upload = browser.getWikiNodeDAO().findWikiUpload(30l);
- home.copy();
+ browser.getSelectedNodes().put(doc, true);
+ browser.getSelectedNodes().put(upload, true);
+
+ browser.copy();
}
}.run();
@@ -224,9 +221,6 @@
}
protected void renderResponse() throws Exception {
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(2l); // Init!
-
Clipboard clipboard = (Clipboard)getInstance(Clipboard.class);
assert clipboard.getItems().size() == 2;
@@ -242,12 +236,12 @@
}
protected void renderResponse() throws Exception {
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(4l); // Init!
+ DirectoryBrowser browser =
(DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(4l); // Init!
- home.paste();
+ browser.paste();
- home.getEntityManager().flush(); // TODO: ?! I think the test phase
listener is wrong here not doing that...
+ browser.getEntityManager().flush(); // TODO: ?! I think the test phase
listener is wrong here not doing that...
}
}.run();
@@ -261,24 +255,24 @@
Clipboard clipboard = (Clipboard)getInstance(Clipboard.class);
assert clipboard.getItems().size() == 0;
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(4l); // Init!
+ DirectoryBrowser browser =
(DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(4l); // Init!
- assert home.getChildNodes().size() == 3;
+ assert browser.getChildNodes().size() == 3;
WikiDocument doc =
-
home.getWikiNodeDAO().findWikiDocumentInArea(home.getInstance().getAreaNumber(),
"Four");
+
browser.getWikiNodeDAO().findWikiDocumentInArea(browser.getInstance().getAreaNumber(),
"Four");
- assert doc.getAreaNumber().equals(home.getInstance().getAreaNumber());
+ assert
doc.getAreaNumber().equals(browser.getInstance().getAreaNumber());
- List<WikiUpload> uploads =
home.getWikiNodeDAO().findWikiUploads(home.getInstance(),
WikiNode.SortableProperty.createdOn, true);
+ List<WikiUpload> uploads =
browser.getWikiNodeDAO().findWikiUploads(browser.getInstance(),
WikiNode.SortableProperty.createdOn, true);
assert uploads.size() == 1;
assert uploads.get(0).getName().equals("Test Image");
- assert
uploads.get(0).getAreaNumber().equals(home.getInstance().getAreaNumber());
+ assert
uploads.get(0).getAreaNumber().equals(browser.getInstance().getAreaNumber());
- WikiDirectory originalDir = home.getWikiNodeDAO().findWikiDirectory(2l);
- List<WikiUpload> originalUploads =
home.getWikiNodeDAO().findWikiUploads(originalDir, WikiNode.SortableProperty.createdOn,
true);
+ WikiDirectory originalDir =
browser.getWikiNodeDAO().findWikiDirectory(2l);
+ List<WikiUpload> originalUploads =
browser.getWikiNodeDAO().findWikiUploads(originalDir, WikiNode.SortableProperty.createdOn,
true);
assert originalUploads.size() == 2;
}
}.run();
@@ -295,13 +289,14 @@
}
protected void invokeApplication() throws Exception {
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(2l); // Init!
+ DirectoryBrowser browser =
(DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(2l); // Init!
- WikiDocument doc = home.getWikiNodeDAO().findWikiDocument(9l);
- home.getSelectedNodes().put(doc, true);
+ WikiDocument doc = browser.getWikiNodeDAO().findWikiDocument(9l);
- home.cut();
+ browser.getSelectedNodes().put(doc, true);
+
+ browser.cut();
}
}.run();
@@ -313,9 +308,6 @@
}
protected void renderResponse() throws Exception {
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(2l); // Init!
-
Clipboard clipboard = (Clipboard)getInstance(Clipboard.class);
assert clipboard.getItems().size() == 1;
@@ -331,12 +323,12 @@
}
protected void renderResponse() throws Exception {
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(4l); // Init!
+ DirectoryBrowser browser =
(DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(4l); // Init!
- home.paste();
+ browser.paste();
- home.getEntityManager().flush(); // TODO: ?! I think the test phase
listener is wrong here not doing that...
+ browser.getEntityManager().flush(); // TODO: ?! I think the test phase
listener is wrong here not doing that...
}
}.run();
@@ -350,15 +342,15 @@
Clipboard clipboard = (Clipboard)getInstance(Clipboard.class);
assert clipboard.getItems().size() == 0;
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(4l); // Init!
+ DirectoryBrowser browser =
(DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(4l); // Init!
- assert home.getChildNodes().size() == 2;
+ assert browser.getChildNodes().size() == 2;
- WikiDocument doc =
home.getWikiNodeDAO().findWikiDocumentInArea(home.getInstance().getAreaNumber(),
"Four");
- assert doc.getAreaNumber().equals(home.getInstance().getAreaNumber());
+ WikiDocument doc =
browser.getWikiNodeDAO().findWikiDocumentInArea(browser.getInstance().getAreaNumber(),
"Four");
+ assert
doc.getAreaNumber().equals(browser.getInstance().getAreaNumber());
- WikiDocument docOriginal =
home.getWikiNodeDAO().findWikiDocumentInArea(2l, "Four");
+ WikiDocument docOriginal =
browser.getWikiNodeDAO().findWikiDocumentInArea(2l, "Four");
assert docOriginal == null;
}
}.run();
@@ -375,13 +367,14 @@
}
protected void invokeApplication() throws Exception {
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(2l); // Init!
+ DirectoryBrowser browser =
(DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(2l); // Init!
- WikiUpload upload = home.getWikiNodeDAO().findWikiUpload(30l);
- home.getSelectedNodes().put(upload, true);
+ WikiUpload upload = browser.getWikiNodeDAO().findWikiUpload(30l);
- home.cut();
+ browser.getSelectedNodes().put(upload, true);
+
+ browser.cut();
}
}.run();
@@ -393,9 +386,6 @@
}
protected void renderResponse() throws Exception {
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(2l); // Init!
-
Clipboard clipboard = (Clipboard)getInstance(Clipboard.class);
assert clipboard.getItems().size() == 1;
@@ -411,12 +401,12 @@
}
protected void renderResponse() throws Exception {
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(4l); // Init!
+ DirectoryBrowser browser =
(DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(4l); // Init!
- home.paste();
+ browser.paste();
- home.getEntityManager().flush(); // TODO: ?! I think the test phase
listener is wrong here not doing that...
+ browser.getEntityManager().flush(); // TODO: ?! I think the test phase
listener is wrong here not doing that...
}
}.run();
@@ -430,19 +420,19 @@
Clipboard clipboard = (Clipboard)getInstance(Clipboard.class);
assert clipboard.getItems().size() == 0;
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(4l); // Init!
+ DirectoryBrowser browser =
(DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(4l); // Init!
- assert home.getChildNodes().size() == 2;
+ assert browser.getChildNodes().size() == 2;
- List<WikiUpload> uploads =
home.getWikiNodeDAO().findWikiUploads(home.getInstance(),
WikiNode.SortableProperty.createdOn, true);
+ List<WikiUpload> uploads =
browser.getWikiNodeDAO().findWikiUploads(browser.getInstance(),
WikiNode.SortableProperty.createdOn, true);
assert uploads.size() == 1;
assert uploads.get(0).getName().equals("Test Image");
- assert
uploads.get(0).getAreaNumber().equals(home.getInstance().getAreaNumber());
+ assert
uploads.get(0).getAreaNumber().equals(browser.getInstance().getAreaNumber());
- WikiDirectory originalDir = home.getWikiNodeDAO().findWikiDirectory(2l);
- List<WikiUpload> originalUploads =
home.getWikiNodeDAO().findWikiUploads(originalDir, WikiNode.SortableProperty.createdOn,
true);
+ WikiDirectory originalDir =
browser.getWikiNodeDAO().findWikiDirectory(2l);
+ List<WikiUpload> originalUploads =
browser.getWikiNodeDAO().findWikiUploads(originalDir, WikiNode.SortableProperty.createdOn,
true);
assert originalUploads.size() == 1;
}
}.run();
@@ -459,15 +449,16 @@
}
protected void invokeApplication() throws Exception {
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(2l); // Init!
+ DirectoryBrowser browser =
(DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(2l); // Init!
- WikiDocument doc = home.getWikiNodeDAO().findWikiDocument(9l);
- WikiUpload upload = home.getWikiNodeDAO().findWikiUpload(30l);
- home.getSelectedNodes().put(doc, true);
- home.getSelectedNodes().put(upload, true);
+ WikiDocument doc = browser.getWikiNodeDAO().findWikiDocument(9l);
+ WikiUpload upload = browser.getWikiNodeDAO().findWikiUpload(30l);
- home.cut();
+ browser.getSelectedNodes().put(doc, true);
+ browser.getSelectedNodes().put(upload, true);
+
+ browser.cut();
}
}.run();
@@ -479,9 +470,6 @@
}
protected void renderResponse() throws Exception {
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(2l); // Init!
-
Clipboard clipboard = (Clipboard)getInstance(Clipboard.class);
assert clipboard.getItems().size() == 2;
@@ -498,12 +486,12 @@
}
protected void renderResponse() throws Exception {
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(4l); // Init!
+ DirectoryBrowser browser =
(DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(4l); // Init!
- home.paste();
+ browser.paste();
- home.getEntityManager().flush(); // TODO: ?! I think the test phase
listener is wrong here not doing that...
+ browser.getEntityManager().flush(); // TODO: ?! I think the test phase
listener is wrong here not doing that...
}
}.run();
@@ -517,27 +505,27 @@
Clipboard clipboard = (Clipboard)getInstance(Clipboard.class);
assert clipboard.getItems().size() == 0;
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(4l); // Init!
+ DirectoryBrowser browser =
(DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(4l); // Init!
- assert home.getChildNodes().size() == 3;
+ assert browser.getChildNodes().size() == 3;
WikiDocument doc =
-
home.getWikiNodeDAO().findWikiDocumentInArea(home.getInstance().getAreaNumber(),
"Four");
+
browser.getWikiNodeDAO().findWikiDocumentInArea(browser.getInstance().getAreaNumber(),
"Four");
- assert doc.getAreaNumber().equals(home.getInstance().getAreaNumber());
+ assert
doc.getAreaNumber().equals(browser.getInstance().getAreaNumber());
- List<WikiUpload> uploads =
home.getWikiNodeDAO().findWikiUploads(home.getInstance(),
WikiNode.SortableProperty.createdOn, true);
+ List<WikiUpload> uploads =
browser.getWikiNodeDAO().findWikiUploads(browser.getInstance(),
WikiNode.SortableProperty.createdOn, true);
assert uploads.size() == 1;
assert uploads.get(0).getName().equals("Test Image");
- assert
uploads.get(0).getAreaNumber().equals(home.getInstance().getAreaNumber());
+ assert
uploads.get(0).getAreaNumber().equals(browser.getInstance().getAreaNumber());
- WikiDocument docOriginal =
home.getWikiNodeDAO().findWikiDocumentInArea(2l, "Four");
+ WikiDocument docOriginal =
browser.getWikiNodeDAO().findWikiDocumentInArea(2l, "Four");
assert docOriginal == null;
- WikiDirectory originalDir = home.getWikiNodeDAO().findWikiDirectory(2l);
- List<WikiUpload> originalUploads =
home.getWikiNodeDAO().findWikiUploads(originalDir, WikiNode.SortableProperty.createdOn,
true);
+ WikiDirectory originalDir =
browser.getWikiNodeDAO().findWikiDirectory(2l);
+ List<WikiUpload> originalUploads =
browser.getWikiNodeDAO().findWikiUploads(originalDir, WikiNode.SortableProperty.createdOn,
true);
assert originalUploads.size() == 1;
}
}.run();
@@ -554,13 +542,14 @@
}
protected void invokeApplication() throws Exception {
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(2l); // Init!
+ DirectoryBrowser browser =
(DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(2l); // Init!
- WikiDocument doc = home.getWikiNodeDAO().findWikiDocument(9l);
- home.getSelectedNodes().put(doc, true);
+ WikiDocument doc = browser.getWikiNodeDAO().findWikiDocument(9l);
- home.cut();
+ browser.getSelectedNodes().put(doc, true);
+
+ browser.cut();
}
}.run();
@@ -572,9 +561,6 @@
}
protected void renderResponse() throws Exception {
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(2l); // Init!
-
Clipboard clipboard = (Clipboard)getInstance(Clipboard.class);
assert clipboard.getItems().size() == 1;
@@ -590,12 +576,12 @@
}
protected void renderResponse() throws Exception {
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(2l); // Init!
+ DirectoryBrowser browser =
(DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(2l); // Init!
- home.paste();
+ browser.paste();
- home.getEntityManager().flush(); // TODO: ?! I think the test phase
listener is wrong here not doing that...
+ browser.getEntityManager().flush(); // TODO: ?! I think the test phase
listener is wrong here not doing that...
}
}.run();
@@ -609,13 +595,13 @@
Clipboard clipboard = (Clipboard)getInstance(Clipboard.class);
assert clipboard.getItems().size() == 0;
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(2l); // Init!
+ DirectoryBrowser browser =
(DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(2l); // Init!
- assert home.getChildNodes().size() == 3;
+ assert browser.getChildNodes().size() == 3;
- WikiDocument doc =
home.getWikiNodeDAO().findWikiDocumentInArea(home.getInstance().getAreaNumber(),
"Four");
- assert doc.getAreaNumber().equals(home.getInstance().getAreaNumber());
+ WikiDocument doc =
browser.getWikiNodeDAO().findWikiDocumentInArea(browser.getInstance().getAreaNumber(),
"Four");
+ assert
doc.getAreaNumber().equals(browser.getInstance().getAreaNumber());
assert doc.getId().equals(9l);
}
}.run();
@@ -632,13 +618,14 @@
}
protected void invokeApplication() throws Exception {
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(2l); // Init!
+ DirectoryBrowser browser =
(DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(2l); // Init!
- WikiDocument doc = home.getWikiNodeDAO().findWikiDocument(9l);
- home.getSelectedNodes().put(doc, true);
+ WikiDocument doc = browser.getWikiNodeDAO().findWikiDocument(9l);
- home.copy();
+ browser.getSelectedNodes().put(doc, true);
+
+ browser.copy();
}
}.run();
@@ -650,8 +637,8 @@
}
protected void renderResponse() throws Exception {
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(2l); // Init!
+ DirectoryBrowser browser =
(DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(2l); // Init!
Clipboard clipboard = (Clipboard)getInstance(Clipboard.class);
@@ -668,12 +655,12 @@
}
protected void renderResponse() throws Exception {
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(2l); // Init!
+ DirectoryBrowser browser =
(DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(2l); // Init!
- home.paste();
+ browser.paste();
- home.getEntityManager().flush(); // TODO: ?! I think the test phase
listener is wrong here not doing that...
+ browser.getEntityManager().flush(); // TODO: ?! I think the test phase
listener is wrong here not doing that...
}
}.run();
@@ -687,10 +674,10 @@
Clipboard clipboard = (Clipboard)getInstance(Clipboard.class);
assert clipboard.getItems().size() == 0;
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(2l); // Init!
+ DirectoryBrowser browser =
(DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(2l); // Init!
- assert home.getChildNodes().size() == 4;
+ assert browser.getChildNodes().size() == 4;
}
}.run();
@@ -706,13 +693,14 @@
}
protected void invokeApplication() throws Exception {
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(3l); // Init!
+ DirectoryBrowser browser =
(DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(3l); // Init!
- WikiDocument doc = home.getWikiNodeDAO().findWikiDocument(6l);
- home.getSelectedNodes().put(doc, true);
+ WikiDocument doc = browser.getWikiNodeDAO().findWikiDocument(6l);
- home.cut();
+ browser.getSelectedNodes().put(doc, true);
+
+ browser.cut();
}
}.run();
@@ -724,9 +712,6 @@
}
protected void renderResponse() throws Exception {
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(3l); // Init!
-
Clipboard clipboard = (Clipboard)getInstance(Clipboard.class);
assert clipboard.getItems().size() == 1;
@@ -742,12 +727,12 @@
}
protected void renderResponse() throws Exception {
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(2l); // Init!
+ DirectoryBrowser browser =
(DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(2l); // Init!
- home.paste();
+ browser.paste();
- home.getEntityManager().flush(); // TODO: ?! I think the test phase
listener is wrong here not doing that...
+ browser.getEntityManager().flush(); // TODO: ?! I think the test phase
listener is wrong here not doing that...
}
}.run();
@@ -761,22 +746,22 @@
Clipboard clipboard = (Clipboard)getInstance(Clipboard.class);
assert clipboard.getItems().size() == 0;
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(2l); // Init!
+ DirectoryBrowser browser =
(DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(2l); // Init!
- assert home.getChildNodes().size() == 4;
+ assert browser.getChildNodes().size() == 4;
- WikiDocument docOriginal =
home.getWikiNodeDAO().findWikiDocumentInArea(3l, "One");
+ WikiDocument docOriginal =
browser.getWikiNodeDAO().findWikiDocumentInArea(3l, "One");
assert docOriginal == null;
- WikiDirectory dirOriginal = home.getWikiNodeDAO().findWikiDirectory(3l);
+ WikiDirectory dirOriginal =
browser.getWikiNodeDAO().findWikiDirectory(3l);
assert dirOriginal.getDefaultFile() == null;
- WikiDocument doc = home.getWikiNodeDAO().findWikiDocument(6l);
+ WikiDocument doc = browser.getWikiNodeDAO().findWikiDocument(6l);
assert doc.getAreaNumber().equals(2l);
assert doc.getParent().getId().equals(2l);
- List<WikiComment> comments =
home.getWikiNodeDAO().findWikiCommentsFlat(doc, false);
+ List<WikiComment> comments =
browser.getWikiNodeDAO().findWikiCommentsFlat(doc, false);
for (WikiComment comment : comments) {
assert comment.getAreaNumber().equals(2l);
}
Modified: trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/editing/TrashTests.java
===================================================================
---
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/editing/TrashTests.java 2008-02-26
19:18:37 UTC (rev 7488)
+++
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/editing/TrashTests.java 2008-02-27
08:35:11 UTC (rev 7489)
@@ -8,13 +8,13 @@
import org.dbunit.operation.DatabaseOperation;
import org.jboss.seam.wiki.test.util.DBUnitSeamTest;
-import org.jboss.seam.wiki.core.action.DocumentHome;
-import org.jboss.seam.wiki.core.action.DirectoryHome;
-import org.jboss.seam.wiki.core.action.UploadHome;
-import org.jboss.seam.wiki.core.action.PreferenceEditor;
import org.jboss.seam.wiki.core.model.*;
import org.jboss.seam.wiki.core.dao.WikiNodeDAO;
import org.jboss.seam.wiki.core.feeds.FeedDAO;
+import org.jboss.seam.wiki.core.action.PreferenceEditor;
+import org.jboss.seam.wiki.core.action.DocumentHome;
+import org.jboss.seam.wiki.core.action.DirectoryBrowser;
+import org.jboss.seam.wiki.core.action.UploadHome;
import org.jboss.seam.wiki.preferences.PreferenceValue;
import org.jboss.seam.wiki.preferences.metamodel.PreferenceRegistry;
import org.jboss.seam.wiki.preferences.metamodel.PreferenceEntity;
@@ -113,11 +113,11 @@
}
protected void renderResponse() throws Exception {
- DirectoryHome dirHome = (DirectoryHome)getInstance(DirectoryHome.class);
- assert dirHome.getInstance().getId().equals(17l); // Init!
+ DirectoryBrowser browser =
(DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(17l); // Init!
- assert dirHome.getChildNodes().size() == 1;
- assert dirHome.getChildNodes().get(0).getId().equals(6l);
+ assert browser.getChildNodes().size() == 1;
+ assert browser.getChildNodes().get(0).getId().equals(6l);
assert getRenderedViewId().equals("/dirDisplay_d.xhtml");
}
@@ -130,9 +130,10 @@
}
protected void invokeApplication() throws Exception {
- DirectoryHome dirHome = (DirectoryHome)getInstance(DirectoryHome.class);
- assert dirHome.getInstance().getId().equals(17l); // Init!
- dirHome.emptyTrash();
+ DirectoryBrowser browser =
(DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(17l); // Init!
+
+ browser.emptyTrash();
}
}.run();
@@ -143,10 +144,10 @@
}
protected void renderResponse() throws Exception {
- DirectoryHome dirHome = (DirectoryHome)getInstance(DirectoryHome.class);
- assert dirHome.getInstance().getId().equals(17l); // Init!
+ DirectoryBrowser browser =
(DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(17l); // Init!
- assert dirHome.getChildNodes().size() == 0;
+ assert browser.getChildNodes().size() == 0;
WikiNodeDAO dao = (WikiNodeDAO)getInstance(WikiNodeDAO.class);
assert dao.findWikiNode(6l) == null;
@@ -208,11 +209,11 @@
}
protected void renderResponse() throws Exception {
- DirectoryHome dirHome = (DirectoryHome)getInstance(DirectoryHome.class);
- assert dirHome.getInstance().getId().equals(17l); // Init!
+ DirectoryBrowser browser =
(DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(17l); // Init!
- assert dirHome.getChildNodes().size() == 1;
- assert dirHome.getChildNodes().get(0).getId().equals(9l);
+ assert browser.getChildNodes().size() == 1;
+ assert browser.getChildNodes().get(0).getId().equals(9l);
assert getRenderedViewId().equals("/dirDisplay_d.xhtml");
}
@@ -225,9 +226,10 @@
}
protected void invokeApplication() throws Exception {
- DirectoryHome dirHome = (DirectoryHome)getInstance(DirectoryHome.class);
- assert dirHome.getInstance().getId().equals(17l); // Init!
- dirHome.emptyTrash();
+ DirectoryBrowser browser =
(DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(17l); // Init!
+
+ browser.emptyTrash();
}
}.run();
@@ -238,10 +240,10 @@
}
protected void renderResponse() throws Exception {
- DirectoryHome dirHome = (DirectoryHome)getInstance(DirectoryHome.class);
- assert dirHome.getInstance().getId().equals(17l); // Init!
+ DirectoryBrowser browser =
(DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(17l); // Init!
- assert dirHome.getChildNodes().size() == 0;
+ assert browser.getChildNodes().size() == 0;
WikiNodeDAO dao = (WikiNodeDAO)getInstance(WikiNodeDAO.class);
assert dao.findWikiNode(9l) == null;
@@ -285,11 +287,11 @@
}
protected void renderResponse() throws Exception {
- DirectoryHome dirHome = (DirectoryHome)getInstance(DirectoryHome.class);
- assert dirHome.getInstance().getId().equals(17l); // Init!
+ DirectoryBrowser browser =
(DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(17l); // Init!
- assert dirHome.getChildNodes().size() == 1;
- assert dirHome.getChildNodes().get(0).getId().equals(30l);
+ assert browser.getChildNodes().size() == 1;
+ assert browser.getChildNodes().get(0).getId().equals(30l);
assert getRenderedViewId().equals("/dirDisplay_d.xhtml");
}
@@ -302,9 +304,10 @@
}
protected void invokeApplication() throws Exception {
- DirectoryHome dirHome = (DirectoryHome)getInstance(DirectoryHome.class);
- assert dirHome.getInstance().getId().equals(17l); // Init!
- dirHome.emptyTrash();
+ DirectoryBrowser browser =
(DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(17l); // Init!
+
+ browser.emptyTrash();
}
}.run();
@@ -315,9 +318,10 @@
}
protected void renderResponse() throws Exception {
- DirectoryHome dirHome = (DirectoryHome)getInstance(DirectoryHome.class);
+ DirectoryBrowser browser =
(DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(17l); // Init!
- assert dirHome.getChildNodes().size() == 0;
+ assert browser.getChildNodes().size() == 0;
WikiNodeDAO dao = (WikiNodeDAO)getInstance(WikiNodeDAO.class);
assert dao.findWikiNode(30l) == null;
@@ -337,12 +341,13 @@
}
protected void invokeApplication() throws Exception {
- DirectoryHome dirHome = (DirectoryHome)getInstance(DirectoryHome.class);
- assert dirHome.getInstance().getId().equals(2l); // Init!
- assert dirHome.getChildNodes().size() == 3;
+ DirectoryBrowser browser =
(DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(2l); // Init!
+ assert browser.getChildNodes().size() == 3;
+
boolean found = false;
- for (WikiNode node : dirHome.getChildNodes()) found =
node.getId().equals(9l);
+ for (WikiNode node : browser.getChildNodes()) found =
node.getId().equals(9l);
assert found;
DocumentHome docHome = (DocumentHome)getInstance(DocumentHome.class);
@@ -370,11 +375,11 @@
}
protected void renderResponse() throws Exception {
- DirectoryHome dirHome = (DirectoryHome)getInstance(DirectoryHome.class);
- assert dirHome.getInstance().getId().equals(17l); // Init!
+ DirectoryBrowser browser =
(DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(17l); // Init!
- assert dirHome.getChildNodes().size() == 1;
- assert dirHome.getChildNodes().get(0).getId().equals(9l);
+ assert browser.getChildNodes().size() == 1;
+ assert browser.getChildNodes().get(0).getId().equals(9l);
assert getRenderedViewId().equals("/dirDisplay_d.xhtml");
}
@@ -387,9 +392,10 @@
}
protected void invokeApplication() throws Exception {
- DirectoryHome dirHome = (DirectoryHome)getInstance(DirectoryHome.class);
- assert dirHome.getInstance().getId().equals(17l); // Init!
- dirHome.emptyTrash();
+ DirectoryBrowser browser =
(DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(17l); // Init!
+
+ browser.emptyTrash();
}
}.run();
@@ -400,10 +406,10 @@
}
protected void renderResponse() throws Exception {
- DirectoryHome dirHome = (DirectoryHome)getInstance(DirectoryHome.class);
- assert dirHome.getInstance().getId().equals(17l); // Init!
+ DirectoryBrowser browser =
(DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(17l); // Init!
- assert dirHome.getChildNodes().size() == 0;
+ assert browser.getChildNodes().size() == 0;
WikiNodeDAO dao = (WikiNodeDAO)getInstance(WikiNodeDAO.class);
assert dao.findWikiNode(9l) == null;
Modified: trunk/examples/wiki/view/dirDisplay_d.xhtml
===================================================================
--- trunk/examples/wiki/view/dirDisplay_d.xhtml 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/view/dirDisplay_d.xhtml 2008-02-27 08:35:11 UTC (rev 7489)
@@ -8,69 +8,71 @@
xmlns:a="https://ajax4jsf.dev.java.net/ajax"
template="themes/#{preferences.get('Wiki').themeName}/template.xhtml">
-<ui:define
name="screenname">#{directoryHome.instance.name}</ui:define>
+<ui:define
name="screenname">#{directoryBrowser.instance.name}</ui:define>
<ui:define name="controlTwo">
- <s:fragment rendered="#{!empty directoryHome.parentNode}">
+ <s:fragment rendered="#{!empty directoryBrowser.instance.parent}">
<s:link id="createDir" styleClass="linkNavigation"
accesskey="#{messages['lacewiki.button.CreateSubdirectory.accesskey']}"
view="/dirEdit_#{skin}.xhtml" propagation="none"
- rendered="#{s:hasPermission('Node', 'create',
directoryHome.instance)}">
+ rendered="#{s:hasPermission('Node', 'create',
directoryBrowser.instance)}">
<h:outputText escape="false"
value="#{messages['lacewiki.button.CreateSubdirectory']}"/>
<f:param name="directoryId"/>
- <f:param name="parentDirectoryId"
value="#{directoryHome.instance.id}"/>
+ <f:param name="parentDirectoryId"
value="#{directoryBrowser.instance.id}"/>
</s:link>
<s:link id="editDir" styleClass="linkNavigation"
accesskey="#{messages['lacewiki.button.EditDirectory.accesskey']}"
view="/dirEdit_#{skin}.xhtml" propagation="none"
- rendered="#{s:hasPermission('Node', 'edit',
directoryHome.instance)}">
+ rendered="#{s:hasPermission('Node', 'edit',
directoryBrowser.instance)}">
+ <f:param name="directoryId"
value="#{directoryBrowser.instance.id}"/>
<h:outputText escape="false"
value="#{messages['lacewiki.button.EditDirectory']}"/>
</s:link>
<s:link id="createDoc" styleClass="linkNavigation"
accesskey="#{messages['lacewiki.button.NewDocument.accesskey']}"
view="/docEdit_#{skin}.xhtml" propagation="none"
- rendered="#{s:hasPermission('Node', 'create',
directoryHome.instance)}">
+ rendered="#{s:hasPermission('Node', 'create',
directoryBrowser.instance)}">
<h:outputText escape="false"
value="#{messages['lacewiki.button.NewDocument']}"/>
<f:param name="documentId"/>
- <f:param name="parentDirectoryId"
value="#{directoryHome.instance.id}"/>
+ <f:param name="parentDirectoryId"
value="#{directoryBrowser.instance.id}"/>
</s:link>
<s:link id="uploadFile" styleClass="linkNavigation"
accesskey="#{messages['lacewiki.button.UploadFile.accesskey']}"
view="/uploadCreate_#{skin}.xhtml"
propagation="none"
- rendered="#{s:hasPermission('Node', 'create',
directoryHome.instance)}">
+ rendered="#{s:hasPermission('Node', 'create',
directoryBrowser.instance)}">
<h:outputText escape="false"
value="#{messages['lacewiki.button.UploadFile']}"/>
- <f:param name="parentDirectoryId"
value="#{directoryHome.instance.id}"/>
+ <f:param name="parentDirectoryId"
value="#{directoryBrowser.instance.id}"/>
</s:link>
</s:fragment>
- <s:fragment rendered="#{empty directoryHome.parentNode}">
+ <s:fragment rendered="#{empty directoryBrowser.instance.parent}">
<s:link id="createArea" styleClass="linkNavigation"
accesskey="#{messages['lacewiki.button.NewArea.accesskey']}"
view="/dirEdit_#{skin}.xhtml" propagation="none"
- rendered="#{s:hasPermission('Node', 'create',
directoryHome.instance)}">
+ rendered="#{s:hasPermission('Node', 'create',
directoryBrowser.instance)}">
<h:outputText escape="false"
value="#{messages['lacewiki.button.NewArea']}"/>
<f:param name="directoryId"/>
- <f:param name="parentDirectoryId"
value="#{directoryHome.instance.id}"/>
+ <f:param name="parentDirectoryId"
value="#{directoryBrowser.instance.id}"/>
</s:link>
<s:link id="editRoot" styleClass="linkNavigation"
accesskey="#{messages['lacewiki.button.EditWikiRoot.accesskey']}"
view="/dirEdit_#{skin}.xhtml" propagation="none"
- rendered="#{s:hasPermission('Node', 'edit',
directoryHome.instance)}">
+ rendered="#{s:hasPermission('Node', 'edit',
directoryBrowser.instance)}">
+ <f:param name="directoryId"
value="#{directoryBrowser.instance.id}"/>
<h:outputText escape="false"
value="#{messages['lacewiki.button.EditWikiRoot']}"/>
<f:param name="parentDirectoryId"/>
</s:link>
</s:fragment>
- <h:outputLink
value="#{wikiURLRenderer.renderFeedURL(directoryHome.instance.feed, null,
null)}"
- styleClass="linkNavigation" rendered="#{not empty
directoryHome.instance.feed}">
+ <h:outputLink
value="#{wikiURLRenderer.renderFeedURL(directoryBrowser.instance.feed, null,
null)}"
+ styleClass="linkNavigation" rendered="#{not empty
directoryBrowser.instance.feed}">
<h:graphicImage styleClass="feedIcon"
value="#{themePath}/img/icon.atom.gif" width="18"
height="18"/>
<h:outputText
value="#{messages['lacewiki.button.DirectoryFeed']}"/>
</h:outputLink>
@@ -79,540 +81,306 @@
<ui:define name="content">
-<h:form id="dirSelectionForm">
+<s:div styleClass="box directoryBrowser"
id="directoryBrowser">
-<div class="box">
+ <ui:include src="includes/directoryBrowserPath.xhtml">
+ <ui:param name="renderOnSelect" value="control,
directoryBrowser, messageBoxContainer"/>
+ </ui:include>
- <script type="text/javascript">
- function switchClipboardControl() {
- var clipboardControlsEnabled = false
- jQuery(".wikiFileSelect").each(
- function checkSelected() {
- if (jQuery(this).attr("checked")) {
- clipboardControlsEnabled = true;
- }
- }
- );
- if (clipboardControlsEnabled) {
- jQuery(".clipboardControl").show();
- } else {
- jQuery(".clipboardControl").hide();
- }
- }
- </script>
+ <h:panelGrid id="directoryBrowserMainPanel"
styleClass="directoryBrowserMainPanel"
+ columnClasses="directoryBrowserTreePanel
#{directoryBrowserSettings.treeVisible ? 'open':'closed'},
directoryBrowserContentPanel"
+ columns="2" cellpadding="0"
cellspacing="0" border="0">
- <h:panelGrid columns="3"
- styleClass="directoryControl smallFont"
- columnClasses="directorySelectControl, directoryTrash,
directoryClipboard"
- cellpadding="0" cellspacing="0"
border="0">
-
<s:fragment>
- <h:panelGroup styleClass="undecoratedLink"
- rendered="#{directoryHome.childNodes.size() > 0 and
directoryHome.instance.id != wikiRoot.id}">
- <h:outputText
value="#{messages['lacewiki.label.Clipboard.Select']}: "/>
- <h:outputLink
value="javascript:selectCheckBoxes('wikiFileSelect');
switchClipboardControl();" tabindex="1">
- <h:outputText
value="#{messages['lacewiki.label.Clipboard.All']}"/>
- </h:outputLink>
- <h:outputText value=" | "/>
- <h:outputLink
value="javascript:deselectCheckBoxes('wikiFileSelect');
switchClipboardControl();" tabindex="1">
- <h:outputText
value="#{messages['lacewiki.label.Clipboard.None']}"/>
- </h:outputLink>
- <h:outputText value=" | "/>
- <h:outputLink
value="javascript:deselectCheckBoxes('wikiFileSelect');
selectCheckBoxes('wikiDocumentSelect'); switchClipboardControl();"
- tabindex="1">
- <h:outputText
value="#{messages['lacewiki.label.Clipboard.Documents']}"/>
- </h:outputLink>
- <h:outputText value=" | "/>
- <h:outputLink
value="javascript:deselectCheckBoxes('wikiFileSelect');
selectCheckBoxes('wikiUploadSelect'); switchClipboardControl();"
- tabindex="1">
- <h:outputText
value="#{messages['lacewiki.label.Clipboard.UploadedFiles']}"/>
- </h:outputLink>
- </h:panelGroup>
+ <ui:include src="includes/directoryBrowserTree.xhtml">
+ <ui:param name="renderOnSelect" value="control,
directoryBrowser, messageBoxContainer"/>
+ </ui:include>
</s:fragment>
- <s:fragment>
- <h:panelGroup rendered="#{directoryHome.instance.id == trashArea.id
and s:hasPermission('Trash', 'empty', directoryHome.instance)}">
- <h:graphicImage value="#{themePath}/img/icon.trash.gif"
- width="18" height="20"
style="vertical-align:middle;"/>
- <h:commandLink action="#{directoryHome.emptyTrash()}"
- tabindex="1" styleClass="button">
- <h:outputText styleClass="buttonLabel"
value="#{messages['lacewiki.button.EmptyTrash']}"/>
- </h:commandLink>
- </h:panelGroup>
- </s:fragment>
+ <s:div id="directoryBrowserContentPanel">
+ <h:form>
- <s:fragment>
- <h:panelGroup>
- <s:span>
- <h:outputText
value="#{messages['lacewiki.label.Clipboard']} "/>
- <h:outputText value="(#{clipboard.items.size()}
#{messages['lacewiki.label.Clipboard.Items']})"
rendered="#{clipboard.items.size() > 1}"/>
- <h:outputText value="(#{clipboard.items.size()}
#{messages['lacewiki.label.Clipboard.Item']})"
rendered="#{clipboard.items.size() == 1}"/>
- <h:outputText
value="(#{messages['lacewiki.label.Clipboard.Empty']})"
rendered="#{empty clipboard.items}"/>
- <h:outputText value=": "
styleClass="#{empty clipboard.items ? 'clipboardControl': ''}"
- style="display:#{empty clipboard.items ?
'none':'inherit'}"/>
- </s:span>
+ <ui:include src="includes/directoryBrowserControl.xhtml">
+ <ui:param name="renderOnSelect"
value="directoryBrowserPathPanel, directoryBrowserContentPanel,
messageBoxContainer"/>
+ </ui:include>
- <h:commandLink action="#{directoryHome.copy()}"
style="display:none;"
- tabindex="1"
styleClass="buttonNonpersistent clipboardControl"
-
accesskey="#{messages['lacewiki.button.Clipboard.Copy.accesskey']}">
- <h:outputText styleClass="buttonLabel"
escape="false"
value="#{messages['lacewiki.button.Clipboard.Copy']}"/>
- </h:commandLink>
- <h:commandLink action="#{directoryHome.cut()}"
style="display:none;"
- rendered="#{s:hasPermission('Node',
'edit', directoryHome.instance)}"
- tabindex="1"
styleClass="buttonNonpersistent clipboardControl"
-
accesskey="#{messages['lacewiki.button.Clipboard.Cut.accesskey']}">
- <h:outputText styleClass="buttonLabel"
escape="false"
value="#{messages['lacewiki.button.Clipboard.Cut']}"/>
- </h:commandLink>
- <h:commandLink action="#{directoryHome.clearClipboard()}"
- rendered="#{not empty clipboard.items}"
- tabindex="1"
-
accesskey="#{messages['lacewiki.button.Clipboard.Clear.accesskey']}"
- styleClass="buttonNonpersistent">
- <h:outputText styleClass="buttonLabel"
escape="false"
value="#{messages['lacewiki.button.Clipboard.Clear']}"/>
- </h:commandLink>
- <h:commandLink action="#{directoryHome.paste()}"
- rendered="#{not empty clipboard.items and
directoryHome.instance.id != wikiRoot.id
- and s:hasPermission('Node',
'create', directoryHome.instance)}"
- tabindex="1"
-
accesskey="#{messages['lacewiki.button.Clipboard.Paste.accesskey']}"
- styleClass="button">
- <h:outputText styleClass="buttonLabel"
escape="false"
value="#{messages['lacewiki.button.Clipboard.Paste']}"/>
- </h:commandLink>
- </h:panelGroup>
- </s:fragment>
+ <ui:include src="includes/pager.xhtml">
+ <ui:param name="pager"
value="#{directoryBrowser.pager}"/>
+ <ui:param name="pagerStyleClass"
value="pagerTop"/>
+ <ui:param name="useAjax" value="true"/>
+ <ui:param name="renderOnSelect"
value="directoryBrowserContentPanel, messageBoxContainer"/>
+ </ui:include>
- </h:panelGrid>
+ <s:div styleClass="directoryEmpty"
rendered="#{directoryBrowser.childNodes.size() == 0}">
+ <a:commandLink
action="#{directoryBrowser.selectDirectory(directoryBrowser.instance.parent.id)}"
+ tabindex="1" accesskey="."
+ status="globalStatus"
+ reRender="control, directoryBrowser,
messageBoxContainer"
+ rendered="#{!empty directoryBrowser.instance.parent
and
s:hasPermission('Node','read',directoryBrowser.instance.parent)}">
+ <h:graphicImage styleClass="icon"
value="#{themePath}/img/icon.dirup.gif" width="18"
height="20"/>
+ <h:outputText styleClass="text"
value=".."/>
+ </a:commandLink>
+ </s:div>
- <h:panelGrid columns="2" styleClass="directoryPathTable"
columnClasses="directoryPath, directoryPagerControl"
- cellpadding="0" cellspacing="0"
border="0">
+ <script type="text/javascript">jQuery(function() {
+ jQuery(".contextMenu").show();
+ })</script>
- <h:panelGroup>
- <h:outputText value="/"
styleClass="directorySeparator"/>
- <ui:repeat var="directory"
value="#{directoryHome.instance.path}">
+ <h:dataTable id="dirTable" var="node"
+ value="#{directoryBrowser.childNodes}"
+ rendered="#{directoryBrowser.childNodes.size() >
0}"
+ styleClass="datatable smallFont undecoratedLink"
+ headerClass="sortableHeader alignCenter"
+ columnClasses="onePercentColumn alignCenter,
+ onePercentColumn alignCenter,
+ defaultColumn alignLeft wrapWhitespace,
+ fifteenPercentColumn alignLeft wrapWhitespace,
+ tenPercentColumn alignLeft wrapWhitespace,
+ tenPercentColumn alignLeft wrapWhitespace,
+ twentyPercentColumn alignCenter
wrapWhitespace"
+ rowClasses="rowOdd,rowEven"
+ cellpadding="0" cellspacing="0"
border="0">
- <s:link view="/dirDisplay_#{skin}.xhtml"
value="#{directory.name}" propagation="none"
- styleClass="directoryButton"
tabindex="1">
- <f:param name="directoryId"
value="#{directory.id}"/>
- </s:link>
+ <h:column>
+ <s:fragment rendered="#{not
clipboard.isCut(node.id)}">
+ <h:selectBooleanCheckbox
value="#{directoryBrowser.selectedNodes[node]}"
+
onchange="switchClipboardControl()"
+ styleClass="wikiFileSelect
wikiDocumentSelect"
+
rendered="#{node.isInstance('WikiDocument')}"/>
+ <h:selectBooleanCheckbox
value="#{directoryBrowser.selectedNodes[node]}"
+
onchange="switchClipboardControl()"
+ styleClass="wikiFileSelect
wikiUploadSelect"
+
rendered="#{node.isInstance('WikiUpload')}"/>
+ </s:fragment>
+ <s:fragment rendered="#{clipboard.isCut(node.id)}">
+ <h:graphicImage
value="#{themePath}/img/icon.cut.gif" width="18"
height="20"/>
+ </s:fragment>
+ </h:column>
- <h:outputText value="/"
styleClass="directorySeparator" rendered="#{directory !=
directoryHome.instance}"/>
+ <h:column>
+ <f:facet name="header">
+ <a:commandLink
action="#{directoryBrowser.selectDirectory(directoryBrowser.instance.parent.id)}"
+ tabindex="1" accesskey="."
+ status="globalStatus"
+ reRender="control, directoryBrowser,
messageBoxContainer"
+ rendered="#{!empty
directoryBrowser.instance.parent and
s:hasPermission('Node','read',directoryBrowser.instance.parent)}">
+ <h:graphicImage
value="#{themePath}/img/icon.dirup.gif" width="18"
height="20"/>
+ </a:commandLink>
+ </f:facet>
- </ui:repeat>
- </h:panelGroup>
+ <s:fragment
rendered="#{node.isInstance('WikiDirectory')}">
+ <ui:decorate
template="includes/directoryBrowserIconMenu.xhtml">
+ <ui:param name="icon"
value="#{themePath}/img/#{wikiDirectoryIconHandler.getIconName(node)}"/>
+ <ui:define name="menu">
+ <ul class="contextMenuItems">
+ <li>
+ <a:commandLink
action="#{directoryBrowser.selectDirectory(node.id)}"
+ tabindex="1"
+ status="globalStatus"
+ reRender="control,
directoryBrowser, messageBoxContainer"
+
oncomplete="jQuery('.menu-div').hide()">
+ <h:outputText
value="#{messages['lacewiki.button.dirDisplay.View']}"/>
+ </a:commandLink>
+ </li>
+ <li>
+ <s:link
value="#{messages['lacewiki.button.dirDisplay.ViewNewWindow']}"
propagation="none"
+ target="_blank"
+
view="/dirDisplay_#{skin}.xhtml" tabindex="1">
+ <f:param name="directoryId"
value="#{node.id}"/>
+ </s:link>
+ </li>
+ <s:fragment
rendered="#{s:hasPermission('Node', 'edit', node)}">
+ <li>
+ <s:link
view="/dirEdit_#{skin}.xhtml" propagation="none">
+ <f:param name="directoryId"
value="#{node.id}"/>
+ <h:outputText
value="#{messages['lacewiki.button.dirDisplay.Edit']}"/>
+ </s:link>
+ </li>
+ </s:fragment>
+ </ul>
+ </ui:define>
+ </ui:decorate>
+ </s:fragment>
- <h:panelGroup rendered="#{directoryHome.childNodes.size() > 0}"
styleClass="smallFont">
- <h:outputText
value="#{messages['lacewiki.label.dirDisplay.ShowItems']}: "/>
- <h:selectOneMenu value="#{directoryHome.pager.pageSize}"
tabindex="1">
- <f:selectItem itemLabel="5" itemValue="5"/>
- <f:selectItem itemLabel="15" itemValue="15"/>
- <f:selectItem itemLabel="50" itemValue="50"/>
- <f:selectItem
itemLabel="#{messages['lacewiki.label.dirDisplay.All']}"
itemValue="999999"/>
- </h:selectOneMenu>
- <h:commandLink action="#{directoryHome.refreshChildNodes()}"
- tabindex="1"
accesskey="#{messages['lacewiki.button.dirDisplay.Refresh.accesskey']}"
- styleClass="buttonNonpersistent">
- <h:outputText styleClass="buttonLabel"
escape="false"
value="#{messages['lacewiki.button.dirDisplay.Refresh']}"/>
- </h:commandLink>
- </h:panelGroup>
+ <s:fragment
rendered="#{node.isInstance('WikiDocument')}">
+ <ui:decorate
template="includes/directoryBrowserIconMenu.xhtml">
+ <ui:param name="icon"
value="#{themePath}/img/#{wikiDocumentIconHandler.getIconName(node)}"/>
+ <ui:define name="menu">
+ <ul class="contextMenuItems">
+ <li>
+ <h:outputLink
value="#{wikiURLRenderer.renderURL(node)}">
+ <h:outputText
value="#{messages['lacewiki.button.dirDisplay.View']}"/>
+ </h:outputLink>
+ </li>
+ <li>
+ <h:outputLink
value="#{wikiURLRenderer.renderURL(node)}" target="_blank">
+ <h:outputText
value="#{messages['lacewiki.button.dirDisplay.ViewNewWindow']}"/>
+ </h:outputLink>
+ </li>
+ <s:fragment
rendered="#{directoryBrowser.isRemovable(node)}">
+ <a:jsFunction
name="deleteDocumentId#{node.id}"
+ status="globalStatus"
+
action="#{documentHome.remove(node.id)}"/>
+ <li>
+ <h:outputLink
value="javascript:deleteConfirmation('\\'#{node.name}\\'','deleteDocumentId#{node.id}')">
+ <h:outputText
value="#{messages['lacewiki.button.dirDisplay.Delete']}"/>
+ </h:outputLink>
+ </li>
+ </s:fragment>
+ <s:fragment
rendered="#{s:hasPermission('Node', 'edit', node)}">
+ <li>
+ <s:link
view="/docEdit_#{skin}.xhtml" propagation="none">
+ <f:param name="documentId"
value="#{node.id}"/>
+ <h:outputText
value="#{messages['lacewiki.button.dirDisplay.Edit']}"/>
+ </s:link>
+ </li>
+ </s:fragment>
+ </ul>
+ </ui:define>
+ </ui:decorate>
+ </s:fragment>
- </h:panelGrid>
+ <s:fragment
rendered="#{node.isInstance('WikiUpload')}">
+ <ui:decorate
template="includes/directoryBrowserIconMenu.xhtml">
+ <ui:param name="icon"
value="#{themePath}/img/#{wikiUploadIconHandler.getIconName(node)}"/>
+ <ui:define name="menu">
+ <ul class="contextMenuItems">
+ <li>
+ <h:outputLink
value="#{wikiURLRenderer.renderURL(node)}">
+ <h:outputText
value="#{messages['lacewiki.button.dirDisplay.View']}"/>
+ </h:outputLink>
+ </li>
+ <li>
+ <h:outputLink
value="#{wikiURLRenderer.renderURL(node)}" target="_blank">
+ <h:outputText
value="#{messages['lacewiki.button.dirDisplay.ViewNewWindow']}"/>
+ </h:outputLink>
+ </li>
+ <s:fragment
rendered="#{directoryBrowser.isRemovable(node)}">
+ <a:jsFunction
name="deleteUploadId#{node.id}"
+ status="globalStatus"
+
action="#{uploadHome.remove(node.id)}"/>
+ <li>
+ <h:outputLink
value="javascript:deleteConfirmation('\\'#{node.name}\\'','deleteUploadId#{node.id}')">
+ <h:outputText
value="#{messages['lacewiki.button.dirDisplay.Delete']}"/>
+ </h:outputLink>
+ </li>
+ </s:fragment>
+ <s:fragment
rendered="#{s:hasPermission('Node', 'edit', node)}">
+ <li>
+ <s:link
view="/uploadEdit_#{skin}.xhtml" propagation="none">
+ <f:param name="uploadId"
value="#{node.id}"/>
+ <h:outputText
value="#{messages['lacewiki.button.dirDisplay.Edit']}"/>
+ </s:link>
+ </li>
+ </s:fragment>
+ </ul>
+ </ui:define>
+ </ui:decorate>
+ </s:fragment>
- <s:div styleClass="directoryEmpty"
rendered="#{directoryHome.childNodes.size() == 0}">
- <s:link view="/dirDisplay_#{skin}.xhtml" tabindex="1"
accesskey="." propagation="none"
- rendered="#{!empty directoryHome.parentNode and
s:hasPermission('Node','read',directoryHome.parentNode)}">
- <f:param name="directoryId"
value="#{directoryHome.parentNode.id}"/>
- <h:panelGrid columns="2">
- <h:graphicImage value="#{themePath}/img/icon.dirup.gif"
width="18" height="20"/>
- <h:outputText value=".."/>
- </h:panelGrid>
- </s:link>
- <h:outputText rendered="#{empty directoryHome.parentNode or
!s:hasPermission('Node','read',directoryHome.parentNode)}"
-
value="#{messages['lacewiki.label.dirDisplay.DirectoryIsEmpty']}"/>
+ </h:column>
- </s:div>
+ <h:column>
+ <ui:include src="includes/sortableHeader.xhtml">
+ <ui:param name="sortProperty"
value="name"/>
+ <ui:param name="sortAction"
value="#{directoryBrowser}"/>
+ <ui:param name="sortStatus"
value="#{directoryBrowserSettings}"/>
+ <ui:param name="label"
value="#{messages['lacewiki.entity.WikiNode.property.name']}"/>
+ <ui:param name="renderOnSelect"
value="directoryBrowserContentPanel, messageBoxContainer"/>
+ </ui:include>
- <h:panelGrid columns="5"
rendered="#{directoryHome.childNodes.size() > 0 and
directoryHome.pager.numOfRecords > directoryHome.pager.pageSize}"
- styleClass="pager pagerTop"
-
columnClasses="pagerIconColumn,pagerIconColumn,pagerTextColumn,pagerIconColumn,pagerIconColumn"
- cellpadding="0" cellspacing="0"
border="0">
+ <a:commandLink
action="#{directoryBrowser.selectDirectory(node.id)}"
+ tabindex="1"
+ status="globalStatus"
+ reRender="control, directoryBrowser,
messageBoxContainer"
+
oncomplete="jQuery('.menu-div').hide()"
+
rendered="#{node.isInstance('WikiDirectory') and
s:hasPermission('Node','read',node)}">
+ <h:outputText value="#{wiki:truncateString(node.name, 40,
'...')}"/>
+ </a:commandLink>
-
- <s:link view="/dirDisplay_#{skin}.xhtml" tabindex="1"
propagation="none"
- rendered="#{directoryHome.pager.previousPageAvailable}">
- <f:param name="page" value="0"/>
- <f:param name="pageSize"
value="#{directoryHome.pager.pageSize}"/>
- <h:graphicImage value="#{themePath}/img/page.first.gif"
width="13" height="11"/>
- </s:link>
- <h:graphicImage value="#{themePath}/img/blank.gif"
width="13" height="11"
-
rendered="#{!directoryHome.pager.previousPageAvailable}"/>
-
- <s:link view="/dirDisplay_#{skin}.xhtml" tabindex="1"
propagation="none"
- rendered="#{directoryHome.pager.previousPageAvailable}">
- <f:param name="page"
value="#{directoryHome.pager.previousPage}"/>
- <f:param name="pageSize"
value="#{directoryHome.pager.pageSize}"/>
- <h:graphicImage value="#{themePath}/img/page.previous.gif"
width="13" height="11"/>
- </s:link>
- <h:graphicImage value="#{themePath}/img/blank.gif"
width="13" height="11"
-
rendered="#{!directoryHome.pager.previousPageAvailable}"/>
-
- <s:span>
- <h:outputText
value="#{messages['lacewiki.label.dirDisplay.PagerShowing']}
- #{directoryHome.pager.firstRecord}
#{messages['lacewiki.label.dirDisplay.PagerTo']}
- #{directoryHome.pager.lastRecord}
#{messages['lacewiki.label.dirDisplay.PagerOf']}
- #{directoryHome.pager.numOfRecords}
#{messages['lacewiki.label.dirDisplay.PagerElements']}"/>
- </s:span>
-
- <s:link view="/dirDisplay_#{skin}.xhtml" tabindex="1"
propagation="none"
- rendered="#{directoryHome.pager.nextPageAvailable}">
- <f:param name="page"
value="#{directoryHome.pager.nextPage}"/>
- <f:param name="pageSize"
value="#{directoryHome.pager.pageSize}"/>
- <h:graphicImage value="#{themePath}/img/page.next.gif"
width="13" height="11"/>
- </s:link>
- <h:graphicImage value="#{themePath}/img/blank.gif"
width="13" height="11"
-
rendered="#{!directoryHome.pager.nextPageAvailable}"/>
-
- <s:link view="/dirDisplay_#{skin}.xhtml" tabindex="1"
propagation="none"
- rendered="#{directoryHome.pager.nextPageAvailable}">
- <f:param name="page"
value="#{directoryHome.pager.lastPage}"/>
- <f:param name="pageSize"
value="#{directoryHome.pager.pageSize}"/>
- <h:graphicImage value="#{themePath}/img/page.last.gif"
width="13" height="11"/>
- </s:link>
- <h:graphicImage value="#{themePath}/img/blank.gif"
width="13" height="11"
-
rendered="#{!directoryHome.pager.nextPageAvailable}"/>
-
- </h:panelGrid>
-
- <h:dataTable id="dirTable" var="node"
- value="#{directoryHome.childNodes}"
- rendered="#{directoryHome.childNodes.size() > 0}"
- styleClass="datatable topLeftBottomBorder smallFont"
- headerClass="regularHeader rightBorder alignCenter"
- columnClasses="onePercentColumn rightBorder alignCenter,
onePercentColumn rightBorder alignCenter,
- defaultColumn rightBorder alignLeft wrapWhitespace,
- fifteenPercentColumn rightBorder alignLeft
wrapWhitespace,
- tenPercentColumn rightBorder alignLeft wrapWhitespace,
- tenPercentColumn rightBorder alignLeft wrapWhitespace,
- twentyPercentColumn rightBorder alignCenter
wrapWhitespace"
- rowClasses="rowOdd,rowEven"
- cellpadding="0" cellspacing="0"
border="0">
- <h:column>
- <s:fragment rendered="#{not clipboard.isCut(node.id)}">
- <h:selectBooleanCheckbox
value="#{directoryHome.selectedNodes[node]}"
- onchange="switchClipboardControl()"
- styleClass="wikiFileSelect
wikiDocumentSelect"
-
rendered="#{node.isInstance('WikiDocument')}"/>
- <h:selectBooleanCheckbox
value="#{directoryHome.selectedNodes[node]}"
- onchange="switchClipboardControl()"
- styleClass="wikiFileSelect
wikiUploadSelect"
-
rendered="#{node.isInstance('WikiUpload')}"/>
- <h:outputText value="-"
rendered="#{node.isInstance('WikiDirectory')}"/>
- </s:fragment>
- <s:fragment rendered="#{clipboard.isCut(node.id)}">
- <h:graphicImage value="#{themePath}/img/icon.cut.gif"
width="18" height="20"/>
- </s:fragment>
- </h:column>
- <h:column>
- <f:facet name="header">
- <s:link view="/dirDisplay_#{skin}.xhtml"
tabindex="1" accesskey="." propagation="none"
- rendered="#{!empty directoryHome.parentNode and
s:hasPermission('Node','read',directoryHome.parentNode)}">
- <f:param name="directoryId"
value="#{directoryHome.parentNode.id}"/>
- <h:graphicImage value="#{themePath}/img/icon.dirup.gif"
width="18" height="20"/>
- </s:link>
- </f:facet>
- <h:graphicImage value="#{themePath}/img/icon.dir.gif"
- width="18" height="20"
- rendered="#{node.isInstance('WikiDirectory')
- and node.id != trashArea.id and node.id !=
memberArea.id and node.id != helpArea.id}"/>
- <h:graphicImage value="#{themePath}/img/icon.trash.gif"
- width="18" height="20"
- rendered="#{node.isInstance('WikiDirectory') and
node.id == trashArea.id}"/>
- <h:graphicImage value="#{themePath}/img/icon.user.gif"
- width="18" height="20"
- rendered="#{node.isInstance('WikiDirectory') and
node.id == memberArea.id}"/>
- <h:graphicImage value="#{themePath}/img/icon.help.gif"
- width="18" height="20"
- rendered="#{node.isInstance('WikiDirectory') and
node.id == helpArea.id}"/>
-
- <h:graphicImage value="#{themePath}/img/icon.doc.gif"
- width="18" height="20"
- rendered="#{node.isInstance('WikiDocument') and
node.id != directoryHome.instance.defaultFile.id}"/>
- <h:graphicImage value="#{themePath}/img/icon.doc.default.gif"
- width="18" height="20"
- rendered="#{node.isInstance('WikiDocument') and
node.id == directoryHome.instance.defaultFile.id}"/>
-
- <h:graphicImage
value="#{themePath}/img/#{uploadTypes[node.contentType].displayIcon}"
- width="18" height="20"
- rendered="#{node.isInstance('WikiUpload') and
!empty uploadTypes[node.contentType]}"/>
- <h:graphicImage
value="#{themePath}/img/#{uploadTypes['generic'].displayIcon}"
- width="18" height="20"
- rendered="#{node.isInstance('WikiUpload') and
empty uploadTypes[node.contentType]}"/>
- </h:column>
-
- <h:column>
- <f:facet name="header">
- <h:outputText
value="#{messages['lacewiki.label.dirDisplay.Name']} #{messages['lacewiki.label.dirDisplay.RightClickForActions']}"/>
- </f:facet>
-
- <s:fragment
rendered="#{node.isInstance('WikiDirectory')}">
- <s:fragment
rendered="#{s:hasPermission('Node','read',node)}">
-
- <s:link id="directoryLink"
value="#{wiki:truncateString(node.name, 40, '...')}"
propagation="none"
- view="/dirDisplay_#{skin}.xhtml"
tabindex="1">
- <f:param name="directoryId"
value="#{node.id}"/>
- </s:link>
-
- <s:div id="directoryMenu"
styleClass="contextMenu">
- <ul>
- <li class="undecoratedLink
noWrapWhitespace">
- <h:outputLink
value="#{wikiURLRenderer.renderURL(node)}">
- <h:outputText
value="#{messages['lacewiki.button.dirDisplay.View']}"/>
- </h:outputLink>
- </li>
-
- <li class="undecoratedLink
noWrapWhitespace">
- <h:outputLink
value="#{wikiURLRenderer.renderURL(node)}" target="_blank">
- <h:outputText
value="#{messages['lacewiki.button.dirDisplay.ViewNewWindow']}"/>
- </h:outputLink>
- </li>
-
- <s:fragment
rendered="#{s:hasPermission('Node', 'edit', node)}">
- <li class="undecoratedLink">
- <s:link view="/dirEdit_#{skin}.xhtml"
propagation="none">
- <f:param name="directoryId"
value="#{node.id}"/>
- <h:outputText
value="#{messages['lacewiki.button.dirDisplay.Edit']}"/>
- </s:link>
- </li>
- </s:fragment>
-
- </ul>
- </s:div>
-
- <script type="text/javascript">jQuery(function() {
-
jQuery("#dirSelectionForm\\:dirTable\\:#{uiComponent['dirSelectionForm:dirTable'].rowIndex}\\:directoryLink")
-
.contextMenu("dirSelectionForm\\:dirTable\\:#{uiComponent['dirSelectionForm:dirTable'].rowIndex}\\:directoryMenu",
{})
- });</script>
-
- </s:fragment>
-
- <h:outputText value="#{wiki:truncateString(node.name, 40,
'...')}"
rendered="#{!s:hasPermission('Node','read',node)}"/>
-
- </s:fragment>
-
- <s:fragment
rendered="#{node.isInstance('WikiDocument')}">
-
- <s:fragment
rendered="#{s:hasPermission('Node','read',node)}">
-
- <h:outputLink id="documentLink"
value="#{wikiURLRenderer.renderURL(node)}" tabindex="1">
+ <h:outputLink value="#{wikiURLRenderer.renderURL(node)}"
tabindex="1"
+ rendered="#{not
node.isInstance('WikiDirectory') and
s:hasPermission('Node','read',node)}">
<h:outputText value="#{wiki:truncateString(node.name, 40,
'...')}"/>
</h:outputLink>
- <s:div id="documentMenu"
styleClass="contextMenu">
- <ul>
- <li class="undecoratedLink
noWrapWhitespace">
- <h:outputLink
value="#{wikiURLRenderer.renderURL(node)}">
- <h:outputText
value="#{messages['lacewiki.button.dirDisplay.View']}"/>
- </h:outputLink>
- </li>
+ <s:fragment rendered="#{not
s:hasPermission('Node','read',node)}">
+ <h:outputText value="#{wiki:truncateString(node.name, 40,
'...')}"/>
+ </s:fragment>
- <li class="undecoratedLink
noWrapWhitespace">
- <h:outputLink
value="#{wikiURLRenderer.renderURL(node)}" target="_blank">
- <h:outputText
value="#{messages['lacewiki.button.dirDisplay.ViewNewWindow']}"/>
- </h:outputLink>
- </li>
+ </h:column>
- <s:fragment
rendered="#{directoryHome.isRemovable(node)}">
- <a:jsFunction
name="deleteDocumentId#{node.id}"
- status="globalStatus"
-
action="#{documentHome.remove(node.id)}"/>
- <li class="undecoratedLink
noWrapWhitespace">
- <h:outputLink
value="javascript:deleteConfirmation('\\'#{node.name}\\'','deleteDocumentId#{node.id}')">
- <h:outputText
value="#{messages['lacewiki.button.dirDisplay.Delete']}"/>
- </h:outputLink>
- </li>
- </s:fragment>
+ <h:column>
+ <ui:include src="includes/sortableHeader.xhtml">
+ <ui:param name="sortProperty"
value="createdBy"/>
+ <ui:param name="sortAction"
value="#{directoryBrowser}"/>
+ <ui:param name="sortStatus"
value="#{directoryBrowserSettings}"/>
+ <ui:param name="label"
value="#{messages['lacewiki.entity.WikiNode.property.createdBy']}"/>
+ <ui:param name="renderOnSelect"
value="directoryBrowserContentPanel, messageBoxContainer"/>
+ </ui:include>
- <s:fragment
rendered="#{s:hasPermission('Node', 'edit', node)}">
- <li class="undecoratedLink
noWrapWhitespace">
- <s:link view="/docEdit_#{skin}.xhtml"
propagation="none">
- <f:param name="documentId"
value="#{node.id}"/>
- <h:outputText
value="#{messages['lacewiki.button.dirDisplay.Edit']}"/>
- </s:link>
- </li>
- </s:fragment>
+ <s:span styleClass="undecoratedLink"
rendered="#{node.ownedByRegularUser}">
+ <h:outputLink
value="#{wikiURLRenderer.renderUserInfoURL(node.createdBy)}">
+ <h:outputText
value="#{node.createdBy.fullname}"/>
+ </h:outputLink>
+ </s:span>
+ <h:outputText rendered="#{not node.ownedByRegularUser}"
value="#{node.createdBy.fullname}"/>
+ </h:column>
- </ul>
- </s:div>
+ <h:column>
+ <f:facet name="header">
+ <h:outputText
value="#{messages['lacewiki.label.dirDisplay.ReadAccess']}"/>
+ </f:facet>
+ <h:outputText
value="#{wiki:truncateString(wiki:resolveAccessLevel(node.readAccessLevel).roleNames,
15, '...')}"/>
+ </h:column>
- <script type="text/javascript">jQuery(function() {
-
jQuery("#dirSelectionForm\\:dirTable\\:#{uiComponent['dirSelectionForm:dirTable'].rowIndex}\\:documentLink")
-
.contextMenu("dirSelectionForm\\:dirTable\\:#{uiComponent['dirSelectionForm:dirTable'].rowIndex}\\:documentMenu",
{})
- });</script>
- </s:fragment>
+ <h:column>
+ <f:facet name="header">
+ <h:outputText
value="#{messages['lacewiki.label.dirDisplay.WriteAccess']}"/>
+ </f:facet>
+ <h:outputText
value="#{wiki:truncateString(wiki:resolveAccessLevel(node.writeAccessLevel).roleNames,
15, '...')}"/>
+ </h:column>
- <h:outputText value="#{wiki:truncateString(node.name, 40,
'...')}"
rendered="#{!s:hasPermission('Node','read',node)}"/>
+ <h:column>
+ <ui:include src="includes/sortableHeader.xhtml">
+ <ui:param name="sortProperty"
value="lastModifiedOn"/>
+ <ui:param name="sortAction"
value="#{directoryBrowser}"/>
+ <ui:param name="sortStatus"
value="#{directoryBrowserSettings}"/>
+ <ui:param name="label"
value="#{messages['lacewiki.entity.WikiNode.property.lastModifiedOn']}"/>
+ <ui:param name="renderOnSelect"
value="directoryBrowserContentPanel, messageBoxContainer"/>
+ </ui:include>
- </s:fragment>
+ <s:fragment rendered="#{not empty
node.lastModifiedOn}">
+ <h:outputText value="#{node.lastModifiedOn}">
+ <f:convertDateTime pattern="dd. MMM yyyy, HH:mm"
timeZone="#{preferences.get('Wiki').timeZone}"/>
+ </h:outputText>
+ (<s:span styleClass="undecoratedLink">
+ <h:outputLink
value="#{wikiURLRenderer.renderUserInfoURL(node.lastModifiedBy)}">
+ <h:outputText
value="#{node.lastModifiedBy.username}"/>
+ </h:outputLink>
+ </s:span>)
+ </s:fragment>
+ <s:fragment rendered="#{empty node.lastModifiedOn}">
+ <h:outputText value="-"/>
+ </s:fragment>
- <s:fragment
rendered="#{node.isInstance('WikiUpload')}">
- <s:fragment
rendered="#{s:hasPermission('Node','read',node)}">
+ </h:column>
- <h:outputLink id="uploadLink"
value="#{wikiURLRenderer.renderURL(node)}" tabindex="1">
- <h:outputText value="#{wiki:truncateString(node.name, 30,
'...')} (#{wiki:displayFilesize(node.filesize)}, #{node.contentType})"/>
- </h:outputLink>
+ </h:dataTable>
- <s:div id="uploadMenu"
styleClass="contextMenu">
- <ul>
- <li class="undecoratedLink
noWrapWhitespace">
- <h:outputLink
value="#{wikiURLRenderer.renderURL(node)}">
- <h:outputText
value="#{messages['lacewiki.button.dirDisplay.View']}"/>
- </h:outputLink>
- </li>
+ <ui:include src="includes/pager.xhtml">
+ <ui:param name="pager"
value="#{directoryBrowser.pager}"/>
+ <ui:param name="pagerStyleClass"
value="pagerBottom"/>
+ <ui:param name="useAjax" value="true"/>
+ <ui:param name="renderOnSelect"
value="directoryBrowserContentPanel, messageBoxContainer"/>
+ </ui:include>
- <li class="undecoratedLink
noWrapWhitespace">
- <h:outputLink
value="#{wikiURLRenderer.renderURL(node)}" target="_blank">
- <h:outputText
value="#{messages['lacewiki.button.dirDisplay.ViewNewWindow']}"/>
- </h:outputLink>
- </li>
+ </h:form>
+ </s:div>
- <s:fragment
rendered="#{directoryHome.isRemovable(node)}">
- <a:jsFunction
name="deleteUploadId#{node.id}"
- status="globalStatus"
-
action="#{uploadHome.remove(node.id)}"/>
- <li class="undecoratedLink
noWrapWhitespace">
- <h:outputLink
value="javascript:deleteConfirmation('\\'#{node.name}\\'','deleteUploadId#{node.id}')">
- <h:outputText
value="#{messages['lacewiki.button.dirDisplay.Delete']}"/>
- </h:outputLink>
- </li>
- </s:fragment>
-
- <s:fragment
rendered="#{s:hasPermission('Node', 'edit', node)}">
- <li class="undecoratedLink
noWrapWhitespace">
- <s:link view="/uploadEdit_#{skin}.xhtml"
propagation="none">
- <f:param name="uploadId"
value="#{node.id}"/>
- <h:outputText
value="#{messages['lacewiki.button.dirDisplay.Edit']}"/>
- </s:link>
- </li>
- </s:fragment>
-
- </ul>
- </s:div>
-
- <script type="text/javascript">jQuery(function() {
-
jQuery("#dirSelectionForm\\:dirTable\\:#{uiComponent['dirSelectionForm:dirTable'].rowIndex}\\:uploadLink")
-
.contextMenu("dirSelectionForm\\:dirTable\\:#{uiComponent['dirSelectionForm:dirTable'].rowIndex}\\:uploadMenu",
{})
- });</script>
- </s:fragment>
-
- <h:outputText value="#{wiki:truncateString(node.name, 40,
'...')}"
rendered="#{!s:hasPermission('Node','read',node)}"/>
-
- </s:fragment>
-
- </h:column>
-
- <h:column>
- <f:facet name="header">
- <h:outputText
value="#{messages['lacewiki.label.dirDisplay.Owner']}"/>
- </f:facet>
- <s:span styleClass="undecoratedLink"
rendered="#{node.ownedByRegularUser}">
- <h:outputLink
value="#{wikiURLRenderer.renderUserInfoURL(node.createdBy)}">
- <h:outputText value="#{node.createdBy.fullname}"/>
- </h:outputLink>
- </s:span>
- <h:outputText rendered="#{not node.ownedByRegularUser}"
value="#{node.createdBy.fullname}"/>
- </h:column>
-
- <h:column>
- <f:facet name="header">
- <h:outputText
value="#{messages['lacewiki.label.dirDisplay.ReadAccess']}"/>
- </f:facet>
- <h:outputText
value="#{wiki:truncateString(wiki:resolveAccessLevel(node.readAccessLevel).roleNames,
15, '...')}"/>
- </h:column>
-
- <h:column>
- <f:facet name="header">
- <h:outputText
value="#{messages['lacewiki.label.dirDisplay.WriteAccess']}"/>
- </f:facet>
- <h:outputText
value="#{wiki:truncateString(wiki:resolveAccessLevel(node.writeAccessLevel).roleNames,
15, '...')}"/>
- </h:column>
-
- <h:column rendered="#{!empty node.lastModifiedOn and !empty
node.lastModifiedBy}">
- <f:facet name="header">
- #{messages['lacewiki.label.dirDisplay.LastModifiedOn']}
- </f:facet>
- <h:outputText value="#{node.lastModifiedOn}">
- <f:convertDateTime pattern="dd. MMM yyyy, HH:mm"
timeZone="#{preferences.get('Wiki').timeZone}"/>
- </h:outputText>
- (<s:span styleClass="undecoratedLink">
- <h:outputLink
value="#{wikiURLRenderer.renderUserInfoURL(node.lastModifiedBy)}">
- <h:outputText
value="#{node.lastModifiedBy.username}"/>
- </h:outputLink>
- </s:span>)
- </h:column>
-
- <h:column rendered="#{empty node.lastModifiedOn or empty
node.lastModifiedBy}">
- <f:facet name="header">
- #{messages['lacewiki.label.dirDisplay.LastModifiedOn']}
- </f:facet>
- -
- </h:column>
-
- </h:dataTable>
-
- <h:panelGrid columns="5"
rendered="#{directoryHome.childNodes.size() > 0 and
directoryHome.pager.numOfRecords > directoryHome.pager.pageSize}"
- styleClass="pager pagerBottom"
-
columnClasses="pagerIconColumn,pagerIconColumn,pagerTextColumn,pagerIconColumn,pagerIconColumn"
- cellpadding="0" cellspacing="0"
border="0">
-
-
- <s:link view="/dirDisplay_#{skin}.xhtml" tabindex="1"
propagation="none"
- rendered="#{directoryHome.pager.previousPageAvailable}">
- <f:param name="page" value="0"/>
- <f:param name="pageSize"
value="#{directoryHome.pager.pageSize}"/>
- <h:graphicImage value="#{themePath}/img/page.first.gif"
width="13" height="11"/>
- </s:link>
- <h:graphicImage value="#{themePath}/img/blank.gif"
width="13" height="11"
-
rendered="#{!directoryHome.pager.previousPageAvailable}"/>
-
- <s:link view="/dirDisplay_#{skin}.xhtml" tabindex="1"
propagation="none"
- rendered="#{directoryHome.pager.previousPageAvailable}">
- <f:param name="page"
value="#{directoryHome.pager.previousPage}"/>
- <f:param name="pageSize"
value="#{directoryHome.pager.pageSize}"/>
- <h:graphicImage value="#{themePath}/img/page.previous.gif"
width="13" height="11"/>
- </s:link>
- <h:graphicImage value="#{themePath}/img/blank.gif"
width="13" height="11"
-
rendered="#{!directoryHome.pager.previousPageAvailable}"/>
-
- <s:span>
- <h:outputText
value="#{messages['lacewiki.label.dirDisplay.PagerShowing']}
- #{directoryHome.pager.firstRecord}
#{messages['lacewiki.label.dirDisplay.PagerTo']}
- #{directoryHome.pager.lastRecord}
#{messages['lacewiki.label.dirDisplay.PagerOf']}
- #{directoryHome.pager.numOfRecords}
#{messages['lacewiki.label.dirDisplay.PagerElements']}"/>
- </s:span>
-
- <s:link view="/dirDisplay_#{skin}.xhtml" tabindex="1"
propagation="none"
- rendered="#{directoryHome.pager.nextPageAvailable}">
- <f:param name="page"
value="#{directoryHome.pager.nextPage}"/>
- <f:param name="pageSize"
value="#{directoryHome.pager.pageSize}"/>
- <h:graphicImage value="#{themePath}/img/page.next.gif"
width="13" height="11"/>
- </s:link>
- <h:graphicImage value="#{themePath}/img/blank.gif"
width="13" height="11"
-
rendered="#{!directoryHome.pager.nextPageAvailable}"/>
-
- <s:link view="/dirDisplay_#{skin}.xhtml" tabindex="1"
propagation="none"
- rendered="#{directoryHome.pager.nextPageAvailable}">
- <f:param name="page"
value="#{directoryHome.pager.lastPage}"/>
- <f:param name="pageSize"
value="#{directoryHome.pager.pageSize}"/>
- <h:graphicImage value="#{themePath}/img/page.last.gif"
width="13" height="11"/>
- </s:link>
- <h:graphicImage value="#{themePath}/img/blank.gif"
width="13" height="11"
-
rendered="#{!directoryHome.pager.nextPageAvailable}"/>
-
</h:panelGrid>
-</div>
+</s:div>
-</h:form>
-
</ui:define>
<ui:define name="footer"> </ui:define>
Modified: trunk/examples/wiki/view/dirDisplay_m.xhtml
===================================================================
--- trunk/examples/wiki/view/dirDisplay_m.xhtml 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/view/dirDisplay_m.xhtml 2008-02-27 08:35:11 UTC (rev 7489)
@@ -8,70 +8,71 @@
xmlns:wiki="http://jboss.com/products/seam/wiki"
template="themes/#{preferences.get('Wiki').themeName}/#{skin}/template.xhtml">
-<ui:define
name="screenname">#{directoryHome.instance.name}</ui:define>
+<ui:define
name="screenname">#{directoryBrowser.instance.name}</ui:define>
<ui:define name="control">
- <s:fragment rendered="#{!empty directoryHome.parentNode}">
+ <s:fragment rendered="#{!empty directoryBrowser.instance.parent}">
<s:link id="createDir" styleClass="linkNavigation"
accesskey="#{messages['lacewiki.button.CreateSubdirectory.accesskey']}"
view="/dirEdit_#{skin}.xhtml" propagation="none"
- rendered="#{s:hasPermission('Node', 'create',
directoryHome.instance)}">
+ rendered="#{s:hasPermission('Node', 'create',
directoryBrowser.instance)}">
<h:outputText escape="false"
value="#{messages['lacewiki.button.CreateSubdirectory']}"/>
<f:param name="directoryId"/>
- <f:param name="parentDirectoryId"
value="#{directoryHome.instance.id}"/>
+ <f:param name="parentDirectoryId"
value="#{directoryBrowser.instance.id}"/>
</s:link>
 
<s:link id="editDir" styleClass="linkNavigation"
accesskey="#{messages['lacewiki.button.EditDirectory.accesskey']}"
view="/dirEdit_#{skin}.xhtml" propagation="none"
- rendered="#{s:hasPermission('Node', 'edit',
directoryHome.instance)}">
+ rendered="#{s:hasPermission('Node', 'edit',
directoryBrowser.instance)}">
+ <f:param name="directoryId"
value="#{directoryBrowser.instance.id}"/>
<h:outputText escape="false"
value="#{messages['lacewiki.button.EditDirectory']}"/>
</s:link>
 
<s:link id="createDoc" styleClass="linkNavigation"
accesskey="#{messages['lacewiki.button.NewDocument.accesskey']}"
view="/docEdit_#{skin}.xhtml" propagation="none"
- rendered="#{s:hasPermission('Node', 'create',
directoryHome.instance)}">
+ rendered="#{s:hasPermission('Node', 'create',
directoryBrowser.instance)}">
<h:outputText escape="false"
value="#{messages['lacewiki.button.NewDocument']}"/>
<f:param name="documentId"/>
- <f:param name="parentDirectoryId"
value="#{directoryHome.instance.id}"/>
+ <f:param name="parentDirectoryId"
value="#{directoryBrowser.instance.id}"/>
</s:link>
 
<s:link id="uploadFile" styleClass="linkNavigation"
accesskey="#{messages['lacewiki.button.UploadFile.accesskey']}"
view="/uploadCreate_#{skin}.xhtml"
propagation="none"
- rendered="#{s:hasPermission('Node', 'create',
directoryHome.instance)}">
+ rendered="#{s:hasPermission('Node', 'create',
directoryBrowser.instance)}">
<h:outputText escape="false"
value="#{messages['lacewiki.button.UploadFile']}"/>
- <f:param name="parentDirectoryId"
value="#{directoryHome.instance.id}"/>
+ <f:param name="parentDirectoryId"
value="#{directoryBrowser.instance.id}"/>
</s:link>
 
</s:fragment>
- <s:fragment rendered="#{empty directoryHome.parentNode}">
+ <s:fragment rendered="#{empty directoryBrowser.instance.parent}">
<s:link id="createArea" styleClass="linkNavigation"
accesskey="#{messages['lacewiki.button.NewArea.accesskey']}"
view="/dirEdit_#{skin}.xhtml" propagation="none"
- rendered="#{s:hasPermission('Node', 'create',
directoryHome.instance)}">
+ rendered="#{s:hasPermission('Node', 'create',
directoryBrowser.instance)}">
<h:outputText escape="false"
value="#{messages['lacewiki.button.NewArea']}"/>
<f:param name="directoryId"/>
- <f:param name="parentDirectoryId"
value="#{directoryHome.instance.id}"/>
+ <f:param name="parentDirectoryId"
value="#{directoryBrowser.instance.id}"/>
</s:link>
<s:link id="editRoot" styleClass="linkNavigation"
accesskey="#{messages['lacewiki.button.EditWikiRoot.accesskey']}"
view="/dirEdit_#{skin}.xhtml" propagation="none"
- rendered="#{s:hasPermission('Node', 'edit',
directoryHome.instance)}">
+ rendered="#{s:hasPermission('Node', 'edit',
directoryBrowser.instance)}">
<h:outputText escape="false"
value="#{messages['lacewiki.button.EditWikiRoot']}"/>
<f:param name="parentDirectoryId"/>
</s:link>
</s:fragment>
- <h:outputLink
value="#{wikiURLRenderer.renderFeedURL(directoryHome.instance.feed, null,
null)}"
- styleClass="linkNavigation" rendered="#{not empty
directoryHome.instance.feed}">
+ <h:outputLink
value="#{wikiURLRenderer.renderFeedURL(directoryBrowser.instance.feed, null,
null)}"
+ styleClass="linkNavigation" rendered="#{not empty
directoryBrowser.instance.feed}">
<h:outputText
value="#{messages['lacewiki.button.DirectoryFeed']}"/>
</h:outputLink>
@@ -80,34 +81,27 @@
<ui:define name="content">
<div class="directoryPathPanel">
-
- <s:link view="/dirDisplay_#{skin}.xhtml"
value="#{wikiRoot.name}" propagation="none"
- styleClass="directoryButton" tabindex="1">
- <f:param name="directoryId" value="#{wikiRoot.id}"/>
- </s:link>
- <h:outputText value="/" styleClass="directorySeparator"/>
-
<h:panelGroup>
- <ui:repeat var="directory" value="#{breadcrumb}">
+ <ui:repeat var="directory"
value="#{directoryBrowser.instance.path}">
<s:link view="/dirDisplay_#{skin}.xhtml"
value="#{directory.name}" propagation="none"
styleClass="directoryButton" tabindex="1">
<f:param name="directoryId"
value="#{directory.id}"/>
</s:link>
- <h:outputText value="/"
styleClass="directorySeparator" rendered="#{directory !=
directoryHome.instance}"/>
+ <h:outputText value=" / "
styleClass="directorySeparator" rendered="#{directory !=
directoryBrowser.instance}"/>
</ui:repeat>
</h:panelGroup>
</div>
-<s:div styleClass="directoryEmpty" rendered="#{empty
directoryHome.childNodes}">
+<s:div styleClass="directoryEmpty" rendered="#{empty
directoryBrowser.childNodes}">
<s:link view="/dirDisplay_#{skin}.xhtml" tabindex="1"
accesskey="." propagation="none"
- rendered="#{!empty directoryHome.parentNode and
s:hasPermission('Node','read',directoryHome.parentNode)}">
- <f:param name="directoryId"
value="#{directoryHome.parentNode.id}"/>
+ rendered="#{!empty directoryBrowser.instance.parent and
s:hasPermission('Node','read',
directoryBrowser.instance.parent)}">
+ <f:param name="directoryId"
value="#{directoryBrowser.instance.parent.id}"/>
<h:panelGrid columns="2">
<h:graphicImage value="#{themePath}/img/icon.dirup.gif"
width="18" height="20"/>
<h:outputText value=".."/>
</h:panelGrid>
</s:link>
- <h:outputText rendered="#{empty directoryHome.parentNode or
!s:hasPermission('Node','read',directoryHome.parentNode)}"
+ <h:outputText rendered="#{empty directoryBrowser.instance.parent or
!s:hasPermission('Node','read', directoryBrowser.instance.parent)}"
value="#{messages['lacewiki.label.dirDisplay.DirectoryIsEmpty']}"/>
</s:div>
@@ -115,8 +109,8 @@
<!-- TODO: Add pager -->
<h:dataTable id="directoryTable" var="node"
- value="#{directoryHome.childNodes}"
- rendered="#{!empty directoryHome.childNodes}"
+ value="#{directoryBrowser.childNodes}"
+ rendered="#{!empty directoryBrowser.childNodes}"
styleClass="datatable topLeftBottomBorder"
headerClass="regularHeader rightBorder"
columnClasses="onePercentColumn rightBorder alignCenter, defaultColumn
rightBorder alignLeft"
@@ -126,27 +120,23 @@
<h:column>
<f:facet name="header">
<s:link view="/dirDisplay_#{skin}.xhtml" tabindex="1"
accesskey="." propagation="none"
- rendered="#{!empty directoryHome.parentNode and
s:hasPermission('Node','read',directoryHome.parentNode)}">
- <f:param name="directoryId"
value="#{directoryHome.parentNode.id}"/>
+ rendered="#{!empty directoryBrowser.instance.parent and
s:hasPermission('Node','read',directoryBrowser.instance.parent)}">
+ <f:param name="directoryId"
value="#{directoryBrowser.instance.parent.id}"/>
<h:graphicImage value="#{themePath}/img/icon.dirup.gif"
width="18" height="20"/>
</s:link>
</f:facet>
- <h:graphicImage value="#{themePath}/img/icon.dir.gif"
+
+ <h:graphicImage
value="#{themePath}/img/#{wikiDirectoryIconHandler.getIconName(node)}"
width="18" height="20"
rendered="#{node.isInstance('WikiDirectory')}"/>
- <h:graphicImage value="#{themePath}/img/icon.doc.gif"
+
+ <h:graphicImage
value="#{themePath}/img/#{wikiDocumentIconHandler.getIconName(node)}"
width="18" height="20"
- rendered="#{node.isInstance('WikiDocument') and node
!= directoryHome.instance.defaultFile}"/>
- <h:graphicImage value="#{themePath}/img/icon.doc.default.gif"
- width="18" height="20"
- rendered="#{node.isInstance('WikiDocument') and node
== directoryHome.instance.defaultFile}"/>
+
rendered="#{node.isInstance('WikiDocument')}"/>
- <h:graphicImage
value="#{themePath}/img/#{uploadTypes[node.contentType].displayIcon}"
+ <h:graphicImage
value="#{themePath}/img/#{wikiUploadIconHandler.getIconName(node)}"
width="18" height="20"
- rendered="#{node.isInstance('WikiUpload') and !empty
uploadTypes[node.contentType]}"/>
- <h:graphicImage
value="#{themePath}/img/#{uploadTypes['generic'].displayIcon}"
- width="18" height="20"
- rendered="#{node.isInstance('WikiUpload') and empty
uploadTypes[node.contentType]}"/>
+
rendered="#{node.isInstance('WikiUpload')}"/>
</h:column>
<h:column>
@@ -171,7 +161,7 @@
<s:link id="editFile"
value="#{wiki:truncateString(node.name, 30, '...')}"
tabindex="2" view="/uploadEdit_#{skin}.xhtml"
propagation="none">
<f:param name="uploadId" value="#{node.id}"/>
- <f:param name="parentDirectoryId"
value="#{directoryHome.instance.id}"/>
+ <f:param name="parentDirectoryId"
value="#{directoryBrowser.instance.id}"/>
</s:link>
<h:outputText value=" (#{wiki:displayFilesize(node.filesize)},
#{node.contentType})"/>
</s:span>
Modified: trunk/examples/wiki/view/dirEdit_d.xhtml
===================================================================
--- trunk/examples/wiki/view/dirEdit_d.xhtml 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/view/dirEdit_d.xhtml 2008-02-27 08:35:11 UTC (rev 7489)
@@ -18,13 +18,13 @@
<ui:define name="controlTwo">
<s:link id="exitManaged" styleClass="linkNavigation
sessionEventTrigger" rendered="#{directoryHome.managed}"
action="exitManaged"
-
accesskey="#{messages['lacewiki.button.ExitEditor.accesskey']}">
- <h:outputText escape="false"
value="#{messages['lacewiki.button.ExitEditor']}"/>
+
accesskey="#{messages['lacewiki.button.Close.accesskey']}">
+ <h:outputText escape="false"
value="#{messages['lacewiki.button.Close']}"/>
</s:link>
<s:link id="exitUnmanaged" styleClass="linkNavigation
sessionEventTrigger" rendered="#{!directoryHome.managed}"
action="exitUnmanaged"
-
accesskey="#{messages['lacewiki.button.ExitEditor.accesskey']}">
- <h:outputText escape="false"
value="#{messages['lacewiki.button.ExitEditor']}"/>
+
accesskey="#{messages['lacewiki.button.Close.accesskey']}">
+ <h:outputText escape="false"
value="#{messages['lacewiki.button.Close']}"/>
</s:link>
</ui:define>
Modified: trunk/examples/wiki/view/dirEdit_m.xhtml
===================================================================
--- trunk/examples/wiki/view/dirEdit_m.xhtml 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/view/dirEdit_m.xhtml 2008-02-27 08:35:11 UTC (rev 7489)
@@ -16,13 +16,13 @@
<ui:define name="control">
<s:link id="exitManaged" styleClass="linkNavigation"
rendered="#{directoryHome.managed}" action="exitManaged"
-
accesskey="#{messages['lacewiki.button.ExitEditor.accesskey']}">
- <h:outputText escape="false"
value="#{messages['lacewiki.button.ExitEditor']}"/>
+
accesskey="#{messages['lacewiki.button.Close.accesskey']}">
+ <h:outputText escape="false"
value="#{messages['lacewiki.button.Close']}"/>
</s:link>
<s:link id="exitUnmanaged" styleClass="linkNavigation"
rendered="#{!directoryHome.managed}" action="exitUnmanaged"
-
accesskey="#{messages['lacewiki.button.ExitEditor.accesskey']}">
- <h:outputText escape="false"
value="#{messages['lacewiki.button.ExitEditor']}"/>
+
accesskey="#{messages['lacewiki.button.Close.accesskey']}">
+ <h:outputText escape="false"
value="#{messages['lacewiki.button.Close']}"/>
</s:link>
</ui:define>
Modified: trunk/examples/wiki/view/docEdit_d.xhtml
===================================================================
--- trunk/examples/wiki/view/docEdit_d.xhtml 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/view/docEdit_d.xhtml 2008-02-27 08:35:11 UTC (rev 7489)
@@ -19,13 +19,13 @@
<ui:define name="controlTwo">
<s:link id="exitManaged" styleClass="linkNavigation
sessionEventTrigger" rendered="#{documentHome.managed}"
action="exitManaged"
-
accesskey="#{messages['lacewiki.button.ExitEditor.accesskey']}">
- <h:outputText escape="false"
value="#{messages['lacewiki.button.ExitEditor']}"/>
+
accesskey="#{messages['lacewiki.button.Close.accesskey']}">
+ <h:outputText escape="false"
value="#{messages['lacewiki.button.Close']}"/>
</s:link>
<s:link id="exitUnmanaged" styleClass="linkNavigation
sessionEventTrigger" rendered="#{!documentHome.managed}"
action="exitUnmanaged"
-
accesskey="#{messages['lacewiki.button.ExitEditor.accesskey']}">
- <h:outputText escape="false"
value="#{messages['lacewiki.button.ExitEditor']}"/>
+
accesskey="#{messages['lacewiki.button.Close.accesskey']}">
+ <h:outputText escape="false"
value="#{messages['lacewiki.button.Close']}"/>
</s:link>
</ui:define>
Modified: trunk/examples/wiki/view/docEdit_m.xhtml
===================================================================
--- trunk/examples/wiki/view/docEdit_m.xhtml 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/view/docEdit_m.xhtml 2008-02-27 08:35:11 UTC (rev 7489)
@@ -16,13 +16,13 @@
<ui:define name="control">
<s:link id="exitManaged" styleClass="linkNavigation"
rendered="#{documentHome.managed}" action="exitManaged"
-
accesskey="#{messages['lacewiki.button.ExitEditor.accesskey']}">
- <h:outputText escape="false"
value="#{messages['lacewiki.button.ExitEditor']}"/>
+
accesskey="#{messages['lacewiki.button.Close.accesskey']}">
+ <h:outputText escape="false"
value="#{messages['lacewiki.button.Close']}"/>
</s:link>
<s:link id="exitUnmanaged" styleClass="linkNavigation"
rendered="#{!documentHome.managed}" action="exitUnmanaged"
-
accesskey="#{messages['lacewiki.button.ExitEditor.accesskey']}">
- <h:outputText escape="false"
value="#{messages['lacewiki.button.ExitEditor']}"/>
+
accesskey="#{messages['lacewiki.button.Close.accesskey']}">
+ <h:outputText escape="false"
value="#{messages['lacewiki.button.Close']}"/>
</s:link>
</ui:define>
Added: trunk/examples/wiki/view/includes/directoryBrowserControl.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/directoryBrowserControl.xhtml
(rev 0)
+++ trunk/examples/wiki/view/includes/directoryBrowserControl.xhtml 2008-02-27 08:35:11
UTC (rev 7489)
@@ -0,0 +1,148 @@
+<s:div id="directoryBrowserControl"
+ styleClass="directoryBrowserControl smallFont"
+
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:a="https://ajax4jsf.dev.java.net/ajax"
+
xmlns:wiki="http://jboss.com/products/seam/wiki"
+
xmlns:s="http://jboss.com/products/seam/taglib">
+
+<script type="text/javascript">
+ function switchClipboardControl() {
+ var clipboardControlsEnabled = false
+ jQuery(".wikiFileSelect").each(
+ function checkSelected() {
+ if (jQuery(this).attr("checked")) {
+ clipboardControlsEnabled = true;
+ }
+ }
+ );
+ if (clipboardControlsEnabled) {
+ jQuery(".clipboardControl").show();
+ } else {
+ jQuery(".clipboardControl").hide();
+ }
+ }
+</script>
+
+<h:panelGrid columns="4"
+ styleClass="directoryBrowserControlPanel"
+ columnClasses="itemSelector, clipboard, tools, pagerSelector"
+ cellpadding="0" cellspacing="0"
border="0">
+
+ <s:fragment>
+ <h:panelGroup styleClass="undecoratedLink"
+ rendered="#{directoryBrowser.childNodes.size() > 0 and
directoryBrowser.instance.id != wikiRoot.id}">
+ <h:outputText
value="#{messages['lacewiki.label.Clipboard.Select']}: "/>
+ <h:outputLink
value="javascript:selectCheckBoxes('wikiFileSelect');
switchClipboardControl();" tabindex="1">
+ <h:outputText
value="#{messages['lacewiki.label.Clipboard.All']}"/>
+ </h:outputLink>
+ <h:outputText value=" | "/>
+ <h:outputLink
value="javascript:deselectCheckBoxes('wikiFileSelect');
switchClipboardControl();"
+ tabindex="1">
+ <h:outputText
value="#{messages['lacewiki.label.Clipboard.None']}"/>
+ </h:outputLink>
+ <h:outputText value=" | "/>
+ <h:outputLink
+ value="javascript:deselectCheckBoxes('wikiFileSelect');
selectCheckBoxes('wikiDocumentSelect'); switchClipboardControl();"
+ tabindex="1">
+ <h:outputText
value="#{messages['lacewiki.label.Clipboard.Documents']}"/>
+ </h:outputLink>
+ <h:outputText value=" | "/>
+ <h:outputLink
+ value="javascript:deselectCheckBoxes('wikiFileSelect');
selectCheckBoxes('wikiUploadSelect'); switchClipboardControl();"
+ tabindex="1">
+ <h:outputText
value="#{messages['lacewiki.label.Clipboard.UploadedFiles']}"/>
+ </h:outputLink>
+ </h:panelGroup>
+ </s:fragment>
+
+ <s:fragment>
+ <h:panelGroup>
+ <s:span>
+ <h:outputText
value="#{messages['lacewiki.label.Clipboard']} "/>
+ <h:outputText value="(#{clipboard.items.size()}
#{messages['lacewiki.label.Clipboard.Items']})"
+ rendered="#{clipboard.items.size() > 1}"/>
+ <h:outputText value="(#{clipboard.items.size()}
#{messages['lacewiki.label.Clipboard.Item']})"
+ rendered="#{clipboard.items.size() == 1}"/>
+ <h:outputText
value="(#{messages['lacewiki.label.Clipboard.Empty']})"
+ rendered="#{empty clipboard.items}"/>
+ <h:outputText value=": " styleClass="#{empty
clipboard.items ? 'clipboardControl': ''}"
+ style="display:#{empty clipboard.items ?
'none':'inherit'}"/>
+ </s:span>
+
+ <a:commandLink action="#{directoryBrowser.copy()}"
style="display:none;"
+ tabindex="1" styleClass="buttonNonpersistent
clipboardControl"
+ status="globalStatus"
+ reRender="#{renderOnSelect}"
+
accesskey="#{messages['lacewiki.button.Clipboard.Copy.accesskey']}">
+ <h:outputText styleClass="buttonLabel"
escape="false"
+
value="#{messages['lacewiki.button.Clipboard.Copy']}"/>
+ </a:commandLink>
+ <a:commandLink action="#{directoryBrowser.cut()}"
style="display:none;"
+ rendered="#{s:hasPermission('Node',
'edit', directoryBrowser.instance)}"
+ tabindex="1" styleClass="buttonNonpersistent
clipboardControl"
+ status="globalStatus"
+ reRender="#{renderOnSelect}"
+
accesskey="#{messages['lacewiki.button.Clipboard.Cut.accesskey']}">
+ <h:outputText styleClass="buttonLabel"
escape="false"
+
value="#{messages['lacewiki.button.Clipboard.Cut']}"/>
+ </a:commandLink>
+ <a:commandLink action="#{directoryBrowser.clearClipboard()}"
+ rendered="#{not empty clipboard.items}"
+ tabindex="1"
+ status="globalStatus"
+ reRender="#{renderOnSelect}"
+
accesskey="#{messages['lacewiki.button.Clipboard.Clear.accesskey']}"
+ styleClass="buttonNonpersistent">
+ <h:outputText styleClass="buttonLabel"
escape="false"
+
value="#{messages['lacewiki.button.Clipboard.Clear']}"/>
+ </a:commandLink>
+ <a:commandLink action="#{directoryBrowser.paste()}"
+ rendered="#{not empty clipboard.items and
directoryBrowser.instance.id != wikiRoot.id
+ and s:hasPermission('Node',
'create', directoryBrowser.instance)}"
+ tabindex="1"
+ status="globalStatus"
+ reRender="#{renderOnSelect}"
+
accesskey="#{messages['lacewiki.button.Clipboard.Paste.accesskey']}"
+ styleClass="button">
+ <h:outputText styleClass="buttonLabel"
escape="false"
+
value="#{messages['lacewiki.button.Clipboard.Paste']}"/>
+ </a:commandLink>
+ </h:panelGroup>
+ </s:fragment>
+
+ <s:fragment>
+ <h:panelGroup
+ rendered="#{directoryBrowser.instance.id == trashArea.id and
s:hasPermission('Trash', 'empty', directoryBrowser.instance)}">
+ <h:graphicImage value="#{themePath}/img/icon.trash.gif"
+ width="18" height="20"
style="vertical-align:middle;"/>
+ <a:commandLink action="#{directoryBrowser.emptyTrash()}"
+ status="globalStatus"
+ reRender="#{renderOnSelect}"
+ tabindex="1" styleClass="button">
+ <h:outputText styleClass="buttonLabel"
value="#{messages['lacewiki.button.EmptyTrash']}"/>
+ </a:commandLink>
+ </h:panelGroup>
+ </s:fragment>
+
+ <s:fragment>
+ <h:panelGroup rendered="#{directoryBrowser.childNodes.size() >
0}">
+ <h:outputText
value="#{messages['lacewiki.label.dirDisplay.ShowItems']}: "/>
+ <h:selectOneMenu value="#{directoryBrowserSettings.pageSize}"
tabindex="1">
+ <f:selectItem itemLabel="5" itemValue="5"/>
+ <f:selectItem itemLabel="15" itemValue="15"/>
+ <f:selectItem itemLabel="50" itemValue="50"/>
+ <f:selectItem
itemLabel="#{messages['lacewiki.label.dirDisplay.All']}"
itemValue="999999"/>
+ <a:support event="onchange"
+ action="#{directoryBrowser.changePageSize()}"
+ status="globalStatus"
+ reRender="#{renderOnSelect}"/>
+ </h:selectOneMenu>
+ </h:panelGroup>
+ </s:fragment>
+
+</h:panelGrid>
+
+</s:div>
\ No newline at end of file
Added: trunk/examples/wiki/view/includes/directoryBrowserIconMenu.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/directoryBrowserIconMenu.xhtml
(rev 0)
+++ trunk/examples/wiki/view/includes/directoryBrowserIconMenu.xhtml 2008-02-27 08:35:11
UTC (rev 7489)
@@ -0,0 +1,16 @@
+<s:div styleClass="contextMenu"
+
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:s="http://jboss.com/products/seam/taglib">
+
+ <h:outputLink value="#" tabindex="1"
+
onmouseover="jQuery(this).children('.dirItemIcon').attr('src','#{themePath}/img/menu_down.gif').toggleClass('mouseOver');
+ jQuery(this).parent('.contextMenu').menu();
jQuery(this).children('.contextMenuItems').show();"
+
onmouseout="jQuery(this).children('.dirItemIcon').attr('src','#{icon}').toggleClass('mouseOver')">
+ <h:graphicImage value="#{icon}"
styleClass="dirItemIcon"/>
+ </h:outputLink>
+
+ <ui:insert name="menu"/>
+
+</s:div>
Added: trunk/examples/wiki/view/includes/directoryBrowserPath.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/directoryBrowserPath.xhtml
(rev 0)
+++ trunk/examples/wiki/view/includes/directoryBrowserPath.xhtml 2008-02-27 08:35:11 UTC
(rev 7489)
@@ -0,0 +1,55 @@
+<s:div id="directoryBrowserPathPanel"
+
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:a="https://ajax4jsf.dev.java.net/ajax"
+
xmlns:wiki="http://jboss.com/products/seam/wiki"
+
xmlns:s="http://jboss.com/products/seam/taglib">
+
+ <h:form id="directoryBrowserPathForm">
+ <h:panelGrid columns="2"
+ styleClass="directoryBrowserPathPanel"
+ columnClasses="#{directoryBrowserSettings.treeVisible ?
'treeSwitchOpen':'treeSwitchClosed'}, path"
+ cellpadding="0" cellspacing="0"
border="0">
+
+ <s:fragment>
+
+ <a:commandLink action="#{directoryBrowser.showTree}"
tabindex="1"
+ reRender="#{renderOnSelect},
directoryBrowserPath"
+ rendered="#{not
directoryBrowserSettings.treeVisible}"
+ status="globalStatus">
+ <h:graphicImage
value="#{themePath}/img/menu_right.gif" width="18"
height="18"/>
+ </a:commandLink>
+ <a:commandLink action="#{directoryBrowser.hideTree}"
tabindex="1"
+ reRender="#{renderOnSelect}"
+
rendered="#{directoryBrowserSettings.treeVisible}"
+ status="globalStatus">
+ <h:graphicImage
value="#{themePath}/img/menu_left.gif" width="18"
height="18"/>
+ </a:commandLink>
+
+ </s:fragment>
+
+ <s:fragment>
+ <h:panelGroup>
+ <h:outputText value="/"
styleClass="separator"/>
+ <ui:repeat var="directory"
value="#{directoryBrowser.instance.path}">
+
+ <a:commandLink
action="#{directoryBrowser.selectDirectory(directory.id)}"
+ styleClass="button"
+ status="globalStatus"
+ tabindex="1"
+ reRender="#{renderOnSelect}">
+ <h:outputText styleClass="label"
value="#{directory.name}"/>
+ </a:commandLink>
+ <h:outputText value="/"
styleClass="separator"
+ rendered="#{directory !=
directoryBrowser.instance}"/>
+
+ </ui:repeat>
+ </h:panelGroup>
+ </s:fragment>
+
+ </h:panelGrid>
+ </h:form>
+
+</s:div>
\ No newline at end of file
Added: trunk/examples/wiki/view/includes/directoryBrowserTree.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/directoryBrowserTree.xhtml
(rev 0)
+++ trunk/examples/wiki/view/includes/directoryBrowserTree.xhtml 2008-02-27 08:35:11 UTC
(rev 7489)
@@ -0,0 +1,46 @@
+<s:div id="directoryBrowserTree"
+ styleClass="directoryBrowserTree smallFont"
+
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:a="https://ajax4jsf.dev.java.net/ajax"
+
xmlns:wiki="http://jboss.com/products/seam/wiki"
+
xmlns:rich="http://richfaces.ajax4jsf.org/rich"
+
xmlns:s="http://jboss.com/products/seam/taglib">
+
+ <h:form id="directoryTreeForm"
rendered="#{directoryBrowserSettings.treeVisible}">
+ <rich:tree switchType="ajax"
+ ajaxSubmitSelection="true"
+ adviseNodeOpened="#{directoryBrowser.adviseTreeNodeOpened}"
+
adviseNodeSelected="#{directoryBrowser.adviseTreeNodeSelected}"
+
changeExpandListener="#{directoryBrowser.listenTreeNodeExpand}"
+
nodeSelectListener="#{directoryBrowser.listenTreeNodeSelected}"
+ status="globalStatus"
+ reRender="#{renderOnSelect}"
+ onselected="jQuery('.menu-div').hide()">
+
+ <rich:recursiveTreeNodesAdaptor
+ var="dir"
+ roots="#{directoryBrowser.treeRoot.wrappedChildrenSorted}"
+ nodes="#{dir.wrappedChildrenSorted}">
+
+ <rich:treeNode>
+ <f:facet name="icon">
+ <h:graphicImage
value="#{themePath}/img/icon.dir.gif" width="18"
height="20"/>
+ </f:facet>
+ <f:facet name="iconLeaf">
+ <h:graphicImage
value="#{themePath}/img/icon.dir.gif" width="18"
height="20"/>
+ </f:facet>
+
+ <s:div styleClass="directoryTreeLabel">
+ <h:outputText
value="#{wiki:truncateString(dir.wrappedNode.name, 40, '...')}"/>
+ </s:div>
+
+ </rich:treeNode>
+
+ </rich:recursiveTreeNodesAdaptor>
+ </rich:tree>
+ </h:form>
+
+</s:div>
\ No newline at end of file
Added: trunk/examples/wiki/view/includes/pager.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/pager.xhtml (rev 0)
+++ trunk/examples/wiki/view/includes/pager.xhtml 2008-02-27 08:35:11 UTC (rev 7489)
@@ -0,0 +1,94 @@
+<s:fragment
+ rendered="#{pager.severalPages}"
+
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:a="https://ajax4jsf.dev.java.net/ajax"
+
xmlns:wiki="http://jboss.com/products/seam/wiki"
+
xmlns:s="http://jboss.com/products/seam/taglib">
+
+ <h:panelGrid columns="5"
+ styleClass="pager #{pagerStyleClass}"
+
columnClasses="pagerIconColumn,pagerIconColumn,pagerTextColumn,pagerIconColumn,pagerIconColumn"
+ cellpadding="0" cellspacing="0"
border="0">
+
+ <s:fragment>
+ <s:link view="/dirDisplay_#{skin}.xhtml" tabindex="1"
propagation="none"
+ rendered="#{pager.previousPageAvailable and not
useAjax}">
+ <f:param name="page" value="0"/>
+ <f:param name="pageSize"
value="#{pager.pageSize}"/>
+ <h:graphicImage value="#{themePath}/img/page.first.gif"
width="13" height="11"/>
+ </s:link>
+ <a:commandLink action="#{pager.setFirstPage}"
tabindex="1"
+ rendered="#{pager.previousPageAvailable and
useAjax}"
+ status="globalStatus"
+ reRender="#{renderOnSelect}">
+ <h:graphicImage value="#{themePath}/img/page.first.gif"
width="13" height="11"/>
+ </a:commandLink>
+ <h:graphicImage value="#{themePath}/img/blank.gif"
width="13" height="11"
+ rendered="#{!pager.previousPageAvailable}"/>
+ </s:fragment>
+
+ <s:fragment>
+ <s:link view="/dirDisplay_#{skin}.xhtml" tabindex="1"
propagation="none"
+ rendered="#{pager.previousPageAvailable and not
useAjax}">
+ <f:param name="page"
value="#{pager.previousPage}"/>
+ <f:param name="pageSize"
value="#{pager.pageSize}"/>
+ <h:graphicImage value="#{themePath}/img/page.previous.gif"
width="13" height="11"/>
+ </s:link>
+ <a:commandLink action="#{pager.setPreviousPage}"
tabindex="1"
+ rendered="#{pager.previousPageAvailable and
useAjax}"
+ status="globalStatus"
+ reRender="#{renderOnSelect}">
+ <h:graphicImage value="#{themePath}/img/page.previous.gif"
width="13" height="11"/>
+ </a:commandLink>
+ <h:graphicImage value="#{themePath}/img/blank.gif"
width="13" height="11"
+ rendered="#{!pager.previousPageAvailable}"/>
+ </s:fragment>
+
+ <s:fragment>
+ <h:outputText
value="#{messages['lacewiki.label.dirDisplay.PagerShowing']}
+ #{pager.firstRecord}
#{messages['lacewiki.label.dirDisplay.PagerTo']}
+ #{pager.lastRecord}
#{messages['lacewiki.label.dirDisplay.PagerOf']}
+ #{pager.numOfRecords}
#{messages['lacewiki.label.dirDisplay.PagerElements']}"/>
+ </s:fragment>
+
+ <s:fragment>
+ <s:link view="/dirDisplay_#{skin}.xhtml" tabindex="1"
propagation="none"
+ rendered="#{pager.nextPageAvailable and not useAjax}">
+ <f:param name="page"
value="#{pager.nextPage}"/>
+ <f:param name="pageSize"
value="#{pager.pageSize}"/>
+ <h:graphicImage value="#{themePath}/img/page.next.gif"
width="13" height="11"/>
+ </s:link>
+ <a:commandLink action="#{pager.setNextPage}"
tabindex="1"
+ rendered="#{pager.nextPageAvailable and useAjax}"
+ status="globalStatus"
+ reRender="#{renderOnSelect}">
+ <h:graphicImage value="#{themePath}/img/page.next.gif"
width="13" height="11"/>
+ </a:commandLink>
+ <h:graphicImage value="#{themePath}/img/blank.gif"
width="13" height="11"
+ rendered="#{!pager.nextPageAvailable}"/>
+ </s:fragment>
+
+ <s:fragment>
+ <s:link view="/dirDisplay_#{skin}.xhtml" tabindex="1"
propagation="none"
+ rendered="#{pager.nextPageAvailable and not useAjax}">
+ <f:param name="page"
value="#{pager.lastPage}"/>
+ <f:param name="pageSize"
value="#{pager.pageSize}"/>
+ <h:graphicImage value="#{themePath}/img/page.last.gif"
width="13" height="11"/>
+ </s:link>
+ <a:commandLink action="#{pager.setLastPage}"
tabindex="1"
+ rendered="#{pager.nextPageAvailable and useAjax}"
+ status="globalStatus"
+ reRender="#{renderOnSelect}">
+ <h:graphicImage value="#{themePath}/img/page.last.gif"
width="13" height="11"/>
+ </a:commandLink>
+ <h:graphicImage value="#{themePath}/img/blank.gif"
width="13" height="11"
+ rendered="#{!pager.nextPageAvailable}"/>
+ </s:fragment>
+
+
+ </h:panelGrid>
+
+</s:fragment>
\ No newline at end of file
Added: trunk/examples/wiki/view/includes/sortableHeader.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/sortableHeader.xhtml (rev
0)
+++ trunk/examples/wiki/view/includes/sortableHeader.xhtml 2008-02-27 08:35:11 UTC (rev
7489)
@@ -0,0 +1,20 @@
+<f:facet name="header"
+
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:a="https://ajax4jsf.dev.java.net/ajax"
+
xmlns:wiki="http://jboss.com/products/seam/wiki"
+
xmlns:s="http://jboss.com/products/seam/taglib">
+
+ <a:commandLink action="#{sortAction.sortBy(sortProperty)}"
tabindex="1"
+ status="globalStatus"
+ reRender="#{renderOnSelect}">
+ <h:graphicImage value="#{themePath}/img/sortindicator.up.gif"
styleClass="sortIndicator"
+ rendered="#{!sortStatus.orderDescending and
sortStatus.orderByProperty.toString() == sortProperty}"/>
+ <h:graphicImage value="#{themePath}/img/sortindicator.down.gif"
styleClass="sortIndicator"
+ rendered="#{sortStatus.orderDescending and
sortStatus.orderByProperty.toString() == sortProperty}"/>
+ <h:outputText value="#{label}"/>
+ </a:commandLink>
+
+</f:facet>
\ No newline at end of file
Modified: trunk/examples/wiki/view/themes/default/css/template.css
===================================================================
--- trunk/examples/wiki/view/themes/default/css/template.css 2008-02-26 19:18:37 UTC (rev
7488)
+++ trunk/examples/wiki/view/themes/default/css/template.css 2008-02-27 08:35:11 UTC (rev
7489)
@@ -684,37 +684,36 @@
/* Directory Browser
----------------------------------------------- */
-.directoryControl {
- width: 100%;
- white-space: nowrap;
- padding: 7px;
+.directoryBrowser {
}
-.directorySelectControl {
- text-align: left;
- white-space: nowrap;
+.directoryBrowserPathPanel {
+ width: 100%;
+ background: #fff url(../img/th.bg.gif) 0 0 repeat-x;
+ border: 1px solid #C3BBB6;
}
-.directoryClipboard {
+.directoryBrowserPathPanel .treeSwitchOpen {
+ width: 20%;
+ padding-left: 5px;
+ padding-right: 5px;
+ border-right: 1px solid #C3BBB6;
text-align: right;
- white-space: nowrap;
}
-.directoryTrash {
- text-align: right;
- white-space: nowrap;
- width: 125px;
+.directoryBrowserPathPanel .treeSwitchClosed {
+ width: 20px;
+ padding-left: 5px;
+ padding-right: 5px;
+ border-right: 1px solid #C3BBB6;
}
-.directoryPathTable {
- width: 100%;
- background: #fff url(../img/th.bg.gif) 0 0 repeat-x;
- border-top: 1px solid #C3BBB6;
- border-left: 1px solid #C3BBB6;
- border-right: 1px solid #C3BBB6;
+.directoryBrowserPathPanel .path {
+ width: auto;
+ padding: 5px;
}
-.directoryPathTable .directoryButton {
+.directoryBrowserPathPanel .button {
color: #fff;
padding: 2px;
border-style: none;
@@ -723,32 +722,90 @@
font-weight: bold;
}
-.directoryPathTable .directorySeparator {
- font-weight: bold;
- color: #888;
- padding: 2px;
- border-style: none;
+.directoryBrowserPathPanel .separator {
+ font-weight: bold;
+ color: #888;
+ padding: 2px;
+ border-style: none;
}
-.directoryPath {
- text-align: left;
+.directoryBrowserMainPanel {
+ border-left: 1px solid #C3BBB6;
+ border-right: 1px solid #C3BBB6;
+ border-bottom: 1px solid #C3BBB6;
+ width: 100%;
+}
+
+.directoryBrowserTreePanel {
+ vertical-align: top;
+}
+
+.directoryBrowserTreePanel.closed {
+ display: none;
+}
+
+.directoryBrowserTreePanel.open {
+ width: 20%;
padding-left: 5px;
+ padding-right: 5px;
+ border-right: 1px solid #C3BBB6;
}
-.directoryPagerControl {
- text-align: right;
- white-space: nowrap;
- padding: 5px;
+.directoryBrowserTree {
+ overflow-x: auto;
}
-.directoryEmpty {
+.directoryBrowserControlPanel {
+ width: 100%;
padding: 5px;
border-bottom: 1px solid #C3BBB6;
- border-left: 1px solid #C3BBB6;
- border-right: 1px solid #C3BBB6;
}
+.directoryBrowserControlPanel .pagerSelector {
+ text-align: right;
+}
+.directoryBrowserControlPanel .clipboard {
+ text-align: left;
+}
+
+.directoryBrowserContentPanel {
+ vertical-align: top;
+}
+
+.directoryBrowserContentPanel .pagerTop,
+.directoryBrowserContentPanel .pagerBottom {
+ border: none;
+}
+
+.directoryBrowserContentPanel .onePercentColumn,
+.directoryBrowserContentPanel .tenPercentColumn,
+.directoryBrowserContentPanel .fifteenPercentColumn,
+.directoryBrowserContentPanel .twentyPercentColumn {
+ padding-left: 5px;
+ padding-right: 5px;
+}
+
+.directoryBrowserContentPanel .directoryEmpty {
+ padding: 5px;
+}
+.directoryBrowserContentPanel .directoryEmpty .icon {
+ vertical-align: middle;
+}
+
+.dirItemIcon {
+ width: 18px;
+ height: 20px;
+}
+
+.dirItemIcon.mouseOver {
+ width: 18px;
+ height: 18px;
+ margin-top: 1px;
+ margin-bottom: 1px;
+}
+
+
/* Generic Lists
----------------------------------------------- */
@@ -815,13 +872,20 @@
.datatable .sortableHeader {
white-space: nowrap;
background: #fff url(../img/th.bg.gif) 0 0 repeat-x;
- text-align: center;
padding: 2px;
padding-left: 5px;
padding-right: 5px;
font-weight: bold;
}
+.datatable .sortableHeader .sortIndicator {
+ width: 8px;
+ height: 8px;
+ margin-left: 5px;
+ margin-right: 5px;
+ vertical-align: middle;
+}
+
.datatable .regularHeader {
white-space: nowrap;
background: #fff url(../img/th.bg.gif) 0 0 repeat-x;
@@ -1418,3 +1482,105 @@
.userInfoEntryLink:hover {color: #666}
+
+/* Click Menu/Context Menu
+----------------------------------------------- */
+
+#root-menu-div ul {
+ border: 1px solid #C3BBB6;
+ background-color: #fff;
+}
+
+#root-menu-div li{
+ white-space:nowrap;
+ font-size: 85%;
+ margin: 0;
+ padding: 0;
+}
+
+* html #root-menu-div li{
+ height: 1.5em; /* fixing ie6 problem */
+}
+
+ul.menu, #root-menu-div ul {
+ list-style: none;
+ margin: 0;
+ padding: 0;
+}
+
+li.menu-separator.active{
+ background-color: transparent;
+}
+
+li.active {
+ background-color: #eae8e5;
+}
+
+.activetarget {
+ font-weight: bold;
+ cursor: pointer;
+}
+
+* html div.menu-item {
+ display: inline; /* fixes problem in ie6 */
+}
+
+li.menumain {
+ float: left;
+ padding: 0;
+ margin: 0;
+
+}
+
+div.menu-item {
+ margin-left: 5px;
+ margin-right: 5px;
+}
+
+div.menu-item a {
+ color: #962325;
+ text-decoration: none;
+}
+
+img.menu-item-arrow{
+ position: absolute;
+ right: 4px;
+ top: 8px;
+}
+
+li.menu-separator {
+ border-bottom: 1px solid #000;
+ font-size: 0; /* for ie */
+ height: 0;
+ line-height: 0; /* for ie */
+ margin: 2px 0;
+}
+
+.contextMenuItems {
+ display: none;
+}
+
+
+/* Trees
+----------------------------------------------- */
+
+.rich-tree-node {
+ cursor: pointer;
+}
+
+.rich-tree-node-highlighted {
+ color: #962325;
+ text-decoration: none;
+}
+
+.rich-tree-node-selected {
+ background: #fff url(../img/menu.bg.gif) 0 0 repeat-x;
+ color: white;
+ font-weight: bold;
+ border: none;
+}
+
+.directoryTreeLabel {
+ padding-top: 2px;
+ cursor: pointer;
+}
Deleted: trunk/examples/wiki/view/themes/default/js/jqContextMenu.js
===================================================================
--- trunk/examples/wiki/view/themes/default/js/jqContextMenu.js 2008-02-26 19:18:37 UTC
(rev 7488)
+++ trunk/examples/wiki/view/themes/default/js/jqContextMenu.js 2008-02-27 08:35:11 UTC
(rev 7489)
@@ -1 +0,0 @@
-(function($){var menu,shadow,trigger,content,hash,currentTarget;var
defaults={menuStyle:{listStyle:'none',padding:'1px',margin:'0px',backgroundColor:'#fff',border:'1px
solid
#999',width:'100px'},itemStyle:{margin:'0px',color:'#000',display:'block',cursor:'default',padding:'3px',border:'1px
solid #fff',backgroundColor:'transparent'},itemHoverStyle:{border:'1px
solid
#0a246a',backgroundColor:'#b6bdd2'},eventPosX:'pageX',eventPosY:'pageY',shadow:true,onContextMenu:null,onShowMenu:null};$.fn.contextMenu=function(id,options){if(!menu){menu=$('<div
id="jqContextMenu"></div>').hide().css({position:'absolute',zIndex:'500'}).appendTo('body').bind('click',function(e){e.stopPropagation()})}if(!shadow){shadow=$('<div></div>').css({backgroundColor:'#000',position:'absolute',opacity:0.2,zIndex:499}).appendTo('body').hide()}hash=hash||[];hash.push({id:id,menuStyle:$.extend({},defaults.menuStyle,options.menuStyle||{}),itemStyle:$.extend({},defaults.itemStyle,options.itemStyle||{}),itemHove!
rStyle:$.extend({},defaults.itemHoverStyle,options.itemHoverStyle||{}),bindings:options.bindings||{},shadow:options.shadow||options.shadow===false?options.shadow:defaults.shadow,onContextMenu:options.onContextMenu||defaults.onContextMenu,onShowMenu:options.onShowMenu||defaults.onShowMenu,eventPosX:options.eventPosX||defaults.eventPosX,eventPosY:options.eventPosY||defaults.eventPosY});var
index=hash.length-1;$(this).bind('contextmenu',function(e){var
bShowContext=(!!hash[index].onContextMenu)?hash[index].onContextMenu(e):true;if(bShowContext)display(index,this,e,options);return
false});return this};function display(index,trigger,e,options){var
cur=hash[index];content=$('#'+cur.id).find('ul:first').clone(true);content.css(cur.menuStyle).find('li').css(cur.itemStyle).hover(function(){$(this).css(cur.itemHoverStyle)},function(){$(this).css(cur.itemStyle)}).find('img').css({verticalAlign:'middle',paddingRight:'2px'});menu.html(content);if(!!cur.onShowMenu)menu=cur.onShowMenu(e,m!
enu);$.each(cur.bindings,function(id,func){$('#'+id,menu).bind('click'
,function(e){hide();func(trigger,currentTarget)})});menu.css({'left':e[cur.eventPosX],'top':e[cur.eventPosY]}).show();if(cur.shadow)shadow.css({width:menu.width(),height:menu.height(),left:e.pageX+2,top:e.pageY+2}).show();$(document).one('click',hide)}function
hide(){menu.hide();shadow.hide()}$.contextMenu={defaults:function(userDefaults){$.each(userDefaults,function(i,val){if(typeof
val=='object'&&defaults[i]){$.extend(defaults[i],val)}else
defaults[i]=val})}}})(jQuery);$(function(){$('div.contextMenu').hide()});
\ No newline at end of file
Copied: trunk/examples/wiki/view/themes/default/js/jqMenu.js (from rev 7445,
trunk/examples/wiki/view/themes/default/js/jqContextMenu.js)
===================================================================
--- trunk/examples/wiki/view/themes/default/js/jqMenu.js (rev 0)
+++ trunk/examples/wiki/view/themes/default/js/jqMenu.js 2008-02-27 08:35:11 UTC (rev
7489)
@@ -0,0 +1,17 @@
+/*
+ * jQuery Menu plugin
+ * Version: 0.0.9
+ *
+ * Copyright (c) 2007 Roman Weich
+ *
http://p.sohei.org
+ *
+ * Dual licensed under the MIT and GPL licenses
+ * (This means that you can choose the license that best suits your project, and use it
accordingly):
+ *
http://www.opensource.org/licenses/mit-license.php
+ *
http://www.gnu.org/licenses/gpl.html
+ *
+ * Changelog:
+ * v 0.0.9 - 2008-01-19
+ */
+eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return
r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new
RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(5($){8
g=[],B=[],G=12=k,3c=$(\'<E Y="1g-E 3x"
24="1Z:3h;1i:0;1w:0;2r:2X;"><E Y="3G"></E><E
Y="3E"></E><E
Y="3C"></E></E>\')[0],2L=$(\'<29 Y="1g-29
3q"></29>\')[0],2H=$(\'<X 24="1Z:3j;"><E
Y="1g-1k"></E></X>\')[0],3g=$(\'<3Q
Y="1g-1k-3P" />\')[0],$1V=$(\'<E 3N="3M-1g-E"
24="1Z:3h;1i:0;1w:0;"></E>\'),1P={34:31,2Y:31,2p:0,2V:0,2U:0,1J:0,2B:k,2i:k,1r:k,2d:k,2M:Q,2J:Q};$(5(){$1V.3s(\'3p\')});$.R({25:5(a){2.11=[];2.1s(a)}});$.R($.25,{1X:{1s:5(a){4(a&&a.9){J(8
i=0;i<a.9;i++){2.2y(a[i]);a[i].V=2}}},2y:5(a){4(a 2x $.C)2.11.16(a);a.V=2;8
b=2;$(a.q).1T(5(){4(a.M)s;J(8
i=0;i<b.11.9;i++){4(b.11[i].M){b.11[i].W();a.14();s}}},5(){})}}});$.R({C:5(a,b,c){2.l=[];2.1c=[];!
2.M=Q;2.O=Q;2.N=k;2.u=$.R({},1P,c);2.q=a;2.$w=k;2.$1q=k;2.17=k;2.V=k;2.1L=k;2.1s();4(b&&b.2T==2S)2.2Q(b)}});$.R($.C,{2m:5(e){8
t=e.q;4(B.9&&t==B[0].q)s;1y(t.2t&&t.2t!=$1V[0])t=t.2t;4(!$(B).3B(5(){s
2.$w[0]==t}).9){$.C.1n()}},2f:5(e){3A(e.2c){1m 13:4(12)12.1a(e,12.$p[0]);1h;1m
27:$.C.1n();1h;1m 37:4(!G)G=B[0];8 a=G;4(a&&a.N){8
b=a.N;b.$p.K(\'1F\').K(\'1E\');a.W();b.15(P);2l(5(){b.23()})}v
4(a&&a.V){8
c,F=a.V.11;4((c=$.18(a,F))>-1){4(--c<0)c=F.9-1;$.C.1n();F[c].14();F[c].Z();4(F[c].l.9)F[c].l[0].15(P)}}1h;1m
38:4(G)G.1Y(-1);1h;1m 39:4(!G)G=B[0];8
m,a=G,1t=12?12.x:k;4(a){4(1t&&1t.l.9){1t.14();1t.l[0].15()}v 4((a=a.2C())){8
c,F=a.V.11;4((c=$.18(a,F))>-1){4(++c>=F.9)c=0;$.C.1n();F[c].14();F[c].Z();4(F[c].l.9)F[c].l[0].15(P)}}}1h;1m
3i:4(!G){4(B.9&&B[0].l.9)B[0].l[0].15()}v
G.1Y();1h}4(e.2c>36&&e.2c<3S)s
Q},1n:5(){1y(B.9)B[0].W()},3R:5(d){$.R(1P,d)},1X:{1s:5(){8 a=2;4(!2.q)s;v 4(2.q 2x
$.1j){2.N=2.q;2.q.3f(2);2.q=2.q.$p}g.16(2);2.$w=$(3c.1A(1));2.$1q=$(2L.1A(1));2.$w[0].1z(2.$1q[!
0]);$1V[0].1z(2.$w[0]);4(!2.N){$(2.q).1a(5(e){a.1r(e)}).1T(5(e){a.Z();
4(a.u.2p){a.1L=2l(5(){4(!a.M)a.1r(e)},a.u.2p)}},5(){4(!a.M)$(2).1W(\'2w\');4(a.1L)3e(a.1L)})}v{2.$w.1T(5(){a.Z()},5(){})}},Z:5(){4(!2.N)$(2.q).10(\'2w\');v
2.O=P},2v:5(a){4(a 2x
$.1j){4($.18(a,2.l)==-1){2.$1q.3O(a.$p);2.l.16(a);a.A=2;4(a.x)2.1c.16(a.x)}}v{2.2v(19
$.1j(a,2.u))}},2Q:5(a){J(8 i=0;i<a.9;i++){2.2v(a[i])}},3d:5(a){8
b=$.18(a,2.l);4(b>-1)2.l.1U(b,1);a.A=k},W:5(){4(!2.M)s;8
i,I=$.18(2,B);2.$w.W();4(I>=0)B.1U(I,1);2.M=2.O=Q;$(2.q).1W(\'2w\');J(i=0;i<2.1c.9;i++){2.1c[i].W()}J(i=0;i<2.l.9;i++){4(2.l[i].O)2.l[i].1S()}4(!B.9)$(2u).K(\'3b\',$.C.2m).K(\'3a\',$.C.2f);4(G==2)G=k;4(2.u.2i)2.u.2i.1R(2)},14:5(e){4(2.M)s;8
a,D=2.N;4(2.l.9){4(D){a=35(D.A.$w.1e(\'z-33\'));2.$w.1e(\'z-33\',(3L(a)?1:a+1))}2.$w.1e({32:\'3K\',2r:\'3J\'});4(2.u.1J){4(2.$w.L()<2.u.1J)2.$w.1e(\'L\',2.u.1J)}2.30();2.$w.1e({2r:\'2X\',32:\'\'}).14();4($.2Z.3I)2.$1q.1e(\'L\',35($.2Z.3H)==6?2.$w.L()-7:2.$1q.L());4(2.u.2B)2.u.2B.1R(2)}4(B.9==0)$(2u).2W(\'3b\',$.C.2m).2W(\'3a\',$.C.2f);2.M=P;B.16(2)},30:5(){8
a!
,o,S,H,1N,1b,1o,2o=$(1K).L(),1p=$(1K).T(),D=2.N,T=2.$w[0].2R,L=2.$w[0].3F,1M;4(D){o=D.$p.2q();S=o.1w+D.$p.L();H=o.1i}v{a=$(2.q);o=a.2q();S=o.1w+2.u.2U;H=o.1i+a.T()+2.u.2V}4($.2s.2P){1b=$(1K).2P();4(1p<T){H=1b}v
4(1p+1b<H+T){4(D){1N=D.A.$w.2q();1M=D.A.$w[0].2R;4(T<=1M){H=1N.1i+1M-T}v{H=1N.1i}4(1p+1b<H+T){H-=H+T-(1p+1b)}}v{H-=H+T-(1p+1b)}}}4($.2s.2O){1o=$(1K).2O();4(2o+1o<S+L){4(D){S-=D.$p.L()+L;4(S<1o)S=1o}v{S-=S+L-(2o+1o)}}}2.$w.1e({1w:S,1i:H})},1r:5(e){4(2.M){2.W();2.Z()}v{$.C.1n();2.14(e)}},2k:5(a,b){8
c=2;2.17=2l(5(){a.1R(c);c.17=k},b)},1d:5(){4(2.17){3e(2.17);2.17=k}},1Y:5(a){8
i,I=0,1O=2.l.9,o=a||1;J(i=0;i<1O;i++){4(2.l[i].O){I=i;1h}}2.l[I].2j();3D{I+=o;4(I>=1O)I=0;v
4(I<0)I=1O-1}1y(2.l[I].1Q);2.l[I].15(P)},2C:5(){8 m=2;1y(m.N)m=m.N.A;s
m.V?m:k},1I:5(){8
a,1k;2.W();4(!2.N)$(2.q).K(\'1a\').K(\'1E\').K(\'1F\');v
2.$w.K(\'1E\').K(\'1F\');1y(2.l.9){1k=2.l[0];1k.1I();2N
1k}4((a=$.18(2,g))>-1)g.1U(a,1);4(2.V){4((a=$.18(2,2.V.11))>-1)2.V.11.1U(a,1)}2.$w.2h()}}});$.R({1j:5(a,b!
){4(2g a==\'2e\')a={y:a};2.y=a.y||\'\';2.1D=a.1D||k;2.20=a.q||k;2.10=a
.10||k;2.1B=a.1B||k;2.$p=k;2.A=k;2.x=k;2.u=$.R({},1P,b);2.O=Q;2.1l=P;2.1Q=Q;2.1s();4(a.x)19
$.C(2,a.x,b)}});$.R($.1j,{1X:{1s:5(){8
i,1C,y=2.y,2b=2;2.$p=$(2H.1A(1));4(2.10)2.$p[0].2K(\'Y\',2.10);4(2.u.2M&&2.1B)2.$p[0].3z=2.1B;4(y==\'\'){2.$p.10(\'1g-1Q\');2.1Q=P}v{1C=2g
y==\'2e\';4(1C&&2.1D)y=$(\'<a
3y="\'+2.1D+\'"\'+(2.20?\'q="\'+2.20+\'"\':\'\')+\'>\'+y+\'</a>\');v
4(1C||!y.9)y=[y];J(i=0;i<y.9;i++){4(2g
y[i]==\'2e\'){2a=2u.3w(\'3v\');2a.3t=y[i];2.$p[0].1u.1z(2a)}v
2.$p[0].1u.1z(y[i].1A(1))}}2.$p.1a(5(e){2b.1a(e,2)});2.23()},1a:5(e,a){4(2.1l&&2.u.1r)2.u.1r.1R(a,e,2)},23:5(){8
a=2;2.$p.1T(5(){a.15()},5(){a.2j()})},15:5(a){2.1d();8
i,1f=2.A.1c,D=2.A.l,2b=2;4(2.A.17)2.A.1d();4(!2.1l)s;J(i=0;i<D.9;i++){4(D[i].O)D[i].1S()}2.Z();G=2.A;J(i=0;i<1f.9;i++){4(1f[i].M&&1f[i]!=2.x&&!1f[i].17)1f[i].2k(5(){2.W()},1f[i].u.2Y)}4(2.x&&!a){2.x.2k(5(){2.14()},2.x.u.34)}},2j:5(){2.1d();4(!2.1l)s;4(!2.x||!2.x.M)2.1S()},1d:5(){4(2.x){2.x.1d()}},Z:5(){2.O=P;2.$p.10(\'O\');8
a=2.A.N;4(a&&!a.O)a.Z();!
12=2},1S:5(){2.O=Q;2.$p.1W(\'O\');4(2==12)12=k},3r:5(){2.$p.1W(\'2I\');2.1l=P},3u:5(){2.$p.10(\'2I\');2.1l=Q},1I:5(){2.1d();2.$p.2h();2.$p.K(\'1E\').K(\'1F\').K(\'1a\');4(2.x){2.x.1I();2N
2.x}2.A.3d(2)},3f:5(b){4(2.x)s;2.x=b;4(2.A&&$.18(b,2.A.1c)==-1)2.A.1c.16(b);4(2.u.2d){8
a=3g.1A(0);a.2K(\'y\',2.u.2d);2.$p[0].1u.1z(a)}}}});$.R($.2s,{28:5(c,d,e){8
f=5(a){8
b=[],1v,1G,U,$X,i,1H,3o,q,26=k;U=j(a,\'2G\');J(i=0;i<U.9;i++){1v=[];4(!U[i].1x.9){b.16(19
$.1j(\'\',c));3n}4((1H=h(U[i],\'2n\'))){1v=f(1H);$(1H).2h()}$X=$(U[i]);4($X[0].1x.9==1&&$X[0].1x[0].22==3)q=$X[0].1x[0].3m;v
q=$X[0].1x;4(c&&c.2J)26=$X.3l(\'Y\');1G=19
$.1j({y:q,10:26},c);b.16(1G);4(1v.9)19 $.C(1G,1v,c)}s b};s 2.2z(5(){8
a,m;4(d||(a=h(2,\'2n\'))){a=d?$(d).3k(P)[0]:a;l=f(a);4(l.9){m=19
$.C(2,l,c);4(e)e.2y(m)}$(a).W()}})},2F:5(a){s 2.2z(5(){8
i,U=j(2,\'2G\');4(U.9){2E=19
$.25();J(i=0;i<U.9;i++)$(U[i]).28(a,k,2E)}})},1g:5(a,b){s
2.2z(5(){4(b&&b.2T==2S)19 $.C(2,b,a);v{4(2.21.2A()==\'2n\')$(2).2F(a);v
$(2).28(a,b)}})}})!
;8 h=5(a,b){4(!a)s k;8 n=a.1u;J(;n;n=n.2D){4(n.22==1&&n.21.2A()==b)s n
}s k};8 j=5(a,b){4(!a)s[];8
r=[],n=a.1u;J(;n;n=n.2D){4(n.22==1&&n.21.2A()==b)r[r.9]=n}s
r}})(3T);',62,242,'||this||if|function|||var|length|||||||||||null|menuItems||||eLI|target||return||settings|else|eDIV|subMenu|src||parentMenu|visibleMenus|Menu|pmi|div|mcm|activeMenu|posY|pos|for|unbind|width|visible|parentMenuItem|active|true|false|extend|posX|height|lis|menuCollection|hide|li|class|setActive|addClass|menus|activeItem||show|hoverIn|push|timer|inArray|new|click|wst|subMenus|removeTimer|css|pms|menu|break|top|MenuItem|item|enabled|case|closeAll|wsl|wh|eUL|onClick|init|asm|firstChild|subItems|left|childNodes|while|appendChild|cloneNode|data|isStr|url|mouseover|mouseout|menuItem|subUL|destroy|minWidth|window|openTimer|pheight|pmo|mil|defaults|separator|call|setInactive|hover|splice|rootDiv|removeClass|prototype|selectNextItem|position|urlTarget|nodeName|nodeType|bindHover|style|MenuCollection|classNames||menuFromElement|ul|elem|self|keyCode|arrowSrc|string|checkKey|typeof|r!
emove|onClose|hoverOut|addTimer|setTimeout|checkMouse|UL|ww|hoverOpenDelay|offset|display|fn|parentNode|document|addItem|activetarget|instanceof|addMenu|each|toUpperCase|onOpen|inMenuCollection|nextSibling|bar|menuBarFromUL|LI|menuItemElement|disabled|copyClassAttr|setAttribute|menuULElement|addExpando|delete|scrollLeft|scrollTop|addItems|clientHeight|Array|constructor|offsetLeft|offsetTop|bind|none|hideDelay|browser|setPosition|200|visibility|index|showDelay|parseInt|||||keydown|mousedown|menuDIVElement|removeItem|clearTimeout|addSubMenu|arrowElement|absolute|40|relative|clone|attr|nodeValue|continue|submenu|body|innerbox|enable|appendTo|innerHTML|disable|span|createElement|outerbox|href|menuData|switch|filter|shadowbox3|do|shadowbox2|clientWidth|shadowbox1|version|msie|block|hidden|isNaN|root|id|append|arrow|img|setDefaults|41|jQuery'.split('|'),0,{}));
+
Property changes on: trunk/examples/wiki/view/themes/default/js/jqMenu.js
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Modified: trunk/examples/wiki/view/themes/default/template.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/default/template.xhtml 2008-02-26 19:18:37 UTC (rev
7488)
+++ trunk/examples/wiki/view/themes/default/template.xhtml 2008-02-27 08:35:11 UTC (rev
7489)
@@ -29,7 +29,7 @@
<script type="text/javascript"
src="#{themePath}/js/jqHistoryRemote.js"></script>
<script type="text/javascript"
src="#{themePath}/js/jqProgressBar.js"></script>
<script type="text/javascript"
src="#{themePath}/js/jqDimensions.js"></script>
- <script type="text/javascript"
src="#{themePath}/js/jqContextMenu.js"></script>
+ <script type="text/javascript"
src="#{themePath}/js/jqMenu.js"></script>
<script type="text/javascript"
src="#{themePath}/js/lacewiki.js"></script>
<script type="text/javascript">
@@ -204,23 +204,6 @@
}
function initPage() {
- $.contextMenu.defaults({
- shadow: false,
- menuStyle: {
- padding: '0',
- width: '200px'
- },
- itemStyle: {
- border: 'none',
- padding: '4px'
- },
- itemHoverStyle: {
- backgroundColor: '#EAE8E5',
- border: 'none',
- padding: '4px'
- }
- });
-
wrapBoxes();
}
Modified: trunk/examples/wiki/view/themes/inrelationto/css/inrelationto.css
===================================================================
--- trunk/examples/wiki/view/themes/inrelationto/css/inrelationto.css 2008-02-26 19:18:37
UTC (rev 7488)
+++ trunk/examples/wiki/view/themes/inrelationto/css/inrelationto.css 2008-02-27 08:35:11
UTC (rev 7489)
@@ -697,64 +697,125 @@
/* Directory Browser
----------------------------------------------- */
-.directoryControl {
- width: 100%;
- white-space: nowrap;
- padding: 7px;
+.directoryBrowser {
}
-.directorySelectControl {
- text-align: left;
- white-space: nowrap;
+.directoryBrowserPathPanel {
+ width: 100%;
+ background: #fff url(../img/th.bg.gif) 0 0 repeat-x;
+ border-top: 1px solid #C3BBB6;
}
-.directoryClipboard {
+.directoryBrowserPathPanel .treeSwitchOpen {
+ width: 20%;
+ padding-left: 5px;
+ padding-right: 5px;
+ border-right: 1px solid #C3BBB6;
text-align: right;
- white-space: nowrap;
}
-.directoryTrash {
- text-align: right;
- white-space: nowrap;
- width: 125px;
+.directoryBrowserPathPanel .treeSwitchClosed {
+ width: 20px;
+ padding-left: 5px;
+ padding-right: 5px;
+ border-right: 1px solid #C3BBB6;
}
-.directoryPathTable {
- width: 100%;
- background: #d3d2c4 url(../img/th.bg.gif) 0 0 repeat-x;
+.directoryBrowserPathPanel .path {
+ width: auto;
+ padding: 5px;
}
-.directoryPathTable .directoryButton {
+.directoryBrowserPathPanel .button {
color: #d75525;
- padding: 2px;
+ background: none;
+ padding: 2px;
border-style: none;
+ font-size: 85%;
font-weight: bold;
- font-size: 85%;
}
-.directoryPathTable .directorySeparator {
- font-weight: bold;
- color: #888;
- padding: 2px;
- border-style: none;
+.directoryBrowserPathPanel .separator {
+ font-weight: bold;
+ color: #888;
+ padding: 2px;
+ border-style: none;
}
-.directoryPath {
- text-align: left;
+.directoryBrowserMainPanel {
+ width: 100%;
+}
+
+.directoryBrowserTreePanel {
+ vertical-align: top;
+}
+
+.directoryBrowserTreePanel.closed {
+ display: none;
+}
+
+.directoryBrowserTreePanel.open {
+ width: 20%;
padding-left: 5px;
+ padding-right: 5px;
+ border-right: 1px solid #C3BBB6;
}
-.directoryPagerControl {
- text-align: right;
- white-space: nowrap;
+.directoryBrowserTree {
+ overflow-x: auto;
+}
+
+.directoryBrowserControlPanel {
+ width: 100%;
padding: 5px;
+ border-bottom: 1px solid #C3BBB6;
}
-.directoryEmpty {
+.directoryBrowserControlPanel .pagerSelector {
+ text-align: right;
+}
+
+.directoryBrowserControlPanel .clipboard {
+ text-align: left;
+}
+
+.directoryBrowserContentPanel {
+ vertical-align: top;
+}
+
+.directoryBrowserContentPanel .pagerTop,
+.directoryBrowserContentPanel .pagerBottom {
+ border: none;
+}
+
+.directoryBrowserContentPanel .onePercentColumn,
+.directoryBrowserContentPanel .tenPercentColumn,
+.directoryBrowserContentPanel .fifteenPercentColumn,
+.directoryBrowserContentPanel .twentyPercentColumn {
+ padding-left: 5px;
+ padding-right: 5px;
+}
+
+.directoryBrowserContentPanel .directoryEmpty {
padding: 5px;
}
+.directoryBrowserContentPanel .directoryEmpty .icon {
+ vertical-align: middle;
+}
+.dirItemIcon {
+ width: 18px;
+ height: 20px;
+}
+.dirItemIcon.mouseOver {
+ width: 18px;
+ height: 18px;
+ margin-top: 1px;
+ margin-bottom: 1px;
+}
+
+
/* Generic Lists
----------------------------------------------- */
@@ -831,13 +892,20 @@
.datatable .sortableHeader {
white-space: nowrap;
background: #d3d2c4 url(../img/th.bg.gif) 0 0 repeat-x;
- text-align: center;
padding: 2px;
padding-left: 5px;
padding-right: 5px;
font-weight: bold;
}
+.datatable .sortableHeader .sortIndicator {
+ width: 8px;
+ height: 8px;
+ margin-left: 5px;
+ margin-right: 5px;
+ vertical-align: middle;
+}
+
.datatable .regularHeader {
white-space: nowrap;
background: #d3d2c4 url(../img/th.bg.gif) 0 0 repeat-x;
@@ -1433,6 +1501,107 @@
.userInfoEntryLink:hover {color: #666}
+/* Click Menu/Context Menu
+----------------------------------------------- */
+
+#root-menu-div ul {
+ border: 1px solid #C3BBB6;
+ background-color: #fff;
+}
+
+#root-menu-div li{
+ white-space:nowrap;
+ font-size: 85%;
+ margin: 0;
+ padding: 0;
+}
+
+* html #root-menu-div li{
+ height: 1.5em; /* fixing ie6 problem */
+}
+
+ul.menu, #root-menu-div ul {
+ list-style: none;
+ margin: 0;
+ padding: 0;
+}
+
+li.menu-separator.active{
+ background-color: transparent;
+}
+
+li.active {
+ background-color: #eae8e5;
+}
+
+.activetarget {
+ font-weight: bold;
+ cursor: pointer;
+}
+
+* html div.menu-item {
+ display: inline; /* fixes problem in ie6 */
+}
+
+li.menumain {
+ float: left;
+ padding: 0;
+ margin: 0;
+
+}
+
+div.menu-item {
+ margin-left: 5px;
+ margin-right: 5px;
+}
+
+div.menu-item a {
+ color: #d75525;
+ text-decoration: none;
+}
+
+img.menu-item-arrow{
+ position: absolute;
+ right: 4px;
+ top: 8px;
+}
+
+li.menu-separator {
+ border-bottom: 1px solid #000;
+ font-size: 0; /* for ie */
+ height: 0;
+ line-height: 0; /* for ie */
+ margin: 2px 0;
+}
+
+.contextMenuItems {
+ display: none;
+}
+
+
+/* Trees
+----------------------------------------------- */
+
+.rich-tree-node {
+ cursor: pointer;
+}
+
+.rich-tree-node-highlighted {
+ color: #d75525;
+ text-decoration: none;
+}
+
+.rich-tree-node-selected {
+ font-weight: bold;
+ border: none;
+}
+
+.directoryTreeLabel {
+ padding-top: 2px;
+ cursor: pointer;
+}
+
+
/* User Control
----------------------------------------------- */
@@ -1539,10 +1708,6 @@
}
-
-/* Main Menu
------------------------------------------------ */
-
/* Main menu
----------------------------------------------- */
Modified: trunk/examples/wiki/view/themes/inrelationto/js/jqueryPlugins.js
===================================================================
--- trunk/examples/wiki/view/themes/inrelationto/js/jqueryPlugins.js 2008-02-26 19:18:37
UTC (rev 7488)
+++ trunk/examples/wiki/view/themes/inrelationto/js/jqueryPlugins.js 2008-02-27 08:35:11
UTC (rev 7489)
@@ -94,10 +94,22 @@
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return
r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new
RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(8($){p
g=$.19.D,w=$.19.w;$.19.z({D:8(){4(1[0]==h)5 Z.1a||$.I&&7.10.1z||7.q.1z;4(1[0]==7)5
1t.1s(7.q.1H,7.q.13);5 g.1k(1,1h)},w:8(){4(1[0]==h)5
Z.1d||$.I&&7.10.1c||7.q.1c;4(1[0]==7)5 1t.1s(7.q.1B,7.q.11);5 w.1k(1,1h)},1a:8(){5
1[0]==h||1[0]==7?1.D():1.P(\':J\')?1[0].13-f(1,\'k\')-f(1,\'1A\'):1.D()+f(1,\'18\')+f(1,\'1y\')},1d:8(){5
1[0]==h||1[0]==7?1.w():1.P(\':J\')?1[0].11-f(1,\'j\')-f(1,\'1x\'):1.w()+f(1,\'15\')+f(1,\'1u\')},1K:8(){5
1[0]==h||1[0]==7?1.D():1.P(\':J\')?1[0].13:1.D()+f(1,\'k\')+f(1,\'1A\')+f(1,\'18\')+f(1,\'1y\')},1J:8(){5
1[0]==h||1[0]==7?1.w():1.P(\':J\')?1[0].11:1.w()+f(1,\'j\')+f(1,\'1x\')+f(1,\'15\')+f(1,\'1u\')},l:8(a){4(a!=1q)5
1.1!
o(8(){4(1==h||1==7)h.1m(a,$(h).n());o 1.l=a});4(1[0]==h||1[0]==7)5
Z.1G||$.I&&7.10.l||7.q.l;5 1[0].l},n:8(a){4(a!=1q)5
1.1o(8(){4(1==h||1==7)h.1m($(h).l(),a);o 1.n=a});4(1[0]==h||1[0]==7)5
Z.1F||$.I&&7.10.n||7.q.n;5 1[0].n},C:8(c,d){p
a=1[0],3=a.S,6=a.R,c=$.z({Q:m,K:m,O:m,t:m},c||{}),x=a.N,y=a.M,v=a.l,u=a.n;4($.i.17||$.i.16){x+=f(a,\'j\');y+=f(a,\'k\')}4(($.i.Y||$.i.X)&&$.r(6,\'C\')!=\'W\'){x-=f(6,\'j\');y-=f(6,\'k\')}4($.i.17){B{4(3!=a&&$.r(3,\'1w\')!=\'J\'){x+=f(3,\'j\');y+=f(3,\'k\')}4(3==6)1v}H((3=3.S)&&3.s!=\'G\')}4($.i.16&&(6.s!=\'G\'&&$.r(6,\'C\')==\'W\')){B{x+=6.N;y+=6.M;x+=f(6,\'j\');y+=f(6,\'k\')}H((6=6.R)&&(6.s!=\'G\'&&$.r(6,\'C\')==\'W\'))}p
b=e(a,c,x,y,v,u);4(d){$.z(d,b);5 1}o{5 b}},1I:8(b,c){p
x=0,y=0,v=0,u=0,9=1[0],3=1[0],6,U,L=$.r(9,\'C\'),A=$.i.17,E=$.i.16,1p=$.i.Y,1n=$.i.X,12=m,14=m,b=$.z({Q:F,K:m,O:m,t:F,1j:m},b||{});4(b.1j)5
1.1i(b,c);4(9.s==\'G\'){x=9.N;y=9.M;4(A){x+=f(9,\'V\')+(f(9,\'j\')*2);y+=f(9,\'T\')+(f(9,\'k\')*2)}o
4(1n){x+=f(9,\'V\');y+=f(9,\'T!
\')}o
4(E&&1l.I){x+=f(9,\'j\');y+=f(9,\'k\')}}o{B{U=$.r(3,\'C\');x+=3.
N;y+=3.M;4(A||E){x+=f(3,\'j\');y+=f(3,\'k\');4(A&&U==\'1g\')12=F;4(E&&U==\'1E\')14=F}6=3.R;4(b.t||A){B{4(b.t){v+=3.l;u+=3.n}4(A&&3!=9&&$.r(3,\'1w\')!=\'J\'){x+=f(3,\'j\');y+=f(3,\'k\')}3=3.S}H(3!=6)}3=6;4(3.s==\'G\'||3.s==\'1e\'){4((1p||(E&&$.I))&&L!=\'1g\'&&L!=\'1f\'){x+=f(3,\'V\');y+=f(3,\'T\')}4((A&&!12&&L!=\'1f\')||(E&&L==\'W\'&&!14)){x+=f(3,\'j\');y+=f(3,\'k\')}1v}}H(3)}p
a=e(9,b,x,y,v,u);4(c){$.z(c,a);5 1}o{5 a}},1i:8(b,c){p
x=0,y=0,v=0,u=0,3=1[0],6,b=$.z({Q:F,K:m,O:m,t:F},b||{});B{x+=3.N;y+=3.M;6=3.R;4(b.t){B{v+=3.l;u+=3.n;3=3.S}H(3!=6)}3=6}H(3&&3.s!=\'G\'&&3.s!=\'1e\');p
a=e(1[0],b,x,y,v,u);4(c){$.z(c,a);5 1}o{5 a}}});p f=8(b,a){5 1D($.r(b.1C?b[0]:b,a))||0};p
e=8(b,c,x,y,a,d){4(!c.Q){x-=f(b,\'V\');y-=f(b,\'T\')}4(c.K&&($.i.Y||$.i.X)){x+=f(b,\'j\');y+=f(b,\'k\')}o
4(!c.K&&!($.i.Y||$.i.X)){x-=f(b,\'j\');y-=f(b,\'k\')}4(c.O){x+=f(b,\'15\');y+=f(b,\'18\')}4(c.t){a-=b.l;d-=b.n}5
c.t?{1b:y-d,1r:x-a,n:d,l:a}:{1b:y,1r:x}}})(1l);',62,109,'|this||parent|if|return|op|document|f!
unction|elem||||||||window|browser|borderLeftWidth|borderTopWidth|scrollLeft|false|scrollTop|else|var|body|css|tagName|scroll|st|sl|width|||extend|mo|do|position|height|ie|true|BODY|while|boxModel|visible|border|elemPos|offsetTop|offsetLeft|padding|is|margin|offsetParent|parentNode|marginTop|parPos|marginLeft|static|opera|safari|self|documentElement|offsetWidth|absparent|offsetHeight|relparent|paddingLeft|msie|mozilla|paddingTop|fn|innerHeight|top|clientWidth|innerWidth|HTML|fixed|absolute|arguments|offsetLite|lite|apply|jQuery|scrollTo|oa|each|sf|undefined|left|max|Math|paddingRight|break|overflow|borderRightWidth|paddingBottom|clientHeight|borderBottomWidth|scrollWidth|jquery|parseInt|relative|pageYOffset|pageXOffset|scrollHeight|offset|outerWidth|outerHeight'.split('|'),0,{}));
-/**
- * jQuery context menu
+/*
+ * jQuery Menu plugin
+ * Version: 0.0.9
+ *
+ * Copyright (c) 2007 Roman Weich
+ *
http://p.sohei.org
+ *
+ * Dual licensed under the MIT and GPL licenses
+ * (This means that you can choose the license that best suits your project, and use it
accordingly):
+ *
http://www.opensource.org/licenses/mit-license.php
+ *
http://www.gnu.org/licenses/gpl.html
+ *
+ * Changelog:
+ * v 0.0.9 - 2008-01-19
*/
-(function($){var menu,shadow,trigger,content,hash,currentTarget;var
defaults={menuStyle:{listStyle:'none',padding:'1px',margin:'0px',backgroundColor:'#fff',border:'1px
solid
#999',width:'100px'},itemStyle:{margin:'0px',color:'#000',display:'block',cursor:'default',padding:'3px',border:'1px
solid #fff',backgroundColor:'transparent'},itemHoverStyle:{border:'1px
solid
#0a246a',backgroundColor:'#b6bdd2'},eventPosX:'pageX',eventPosY:'pageY',shadow:true,onContextMenu:null,onShowMenu:null};$.fn.contextMenu=function(id,options){if(!menu){menu=$('<div
id="jqContextMenu"></div>').hide().css({position:'absolute',zIndex:'500'}).appendTo('body').bind('click',function(e){e.stopPropagation()})}if(!shadow){shadow=$('<div></div>').css({backgroundColor:'#000',position:'absolute',opacity:0.2,zIndex:499}).appendTo('body').hide()}hash=hash||[];hash.push({id:id,menuStyle:$.extend({},defaults.menuStyle,options.menuStyle||{}),itemStyle:$.extend({},defaults.itemStyle,options.itemStyle||{}),itemHove!
rStyle:$.extend({},defaults.itemHoverStyle,options.itemHoverStyle||{}),bindings:options.bindings||{},shadow:options.shadow||options.shadow===false?options.shadow:defaults.shadow,onContextMenu:options.onContextMenu||defaults.onContextMenu,onShowMenu:options.onShowMenu||defaults.onShowMenu,eventPosX:options.eventPosX||defaults.eventPosX,eventPosY:options.eventPosY||defaults.eventPosY});var
index=hash.length-1;$(this).bind('contextmenu',function(e){var
bShowContext=(!!hash[index].onContextMenu)?hash[index].onContextMenu(e):true;if(bShowContext)display(index,this,e,options);return
false});return this};function display(index,trigger,e,options){var
cur=hash[index];content=$('#'+cur.id).find('ul:first').clone(true);content.css(cur.menuStyle).find('li').css(cur.itemStyle).hover(function(){$(this).css(cur.itemHoverStyle)},function(){$(this).css(cur.itemStyle)}).find('img').css({verticalAlign:'middle',paddingRight:'2px'});menu.html(content);if(!!cur.onShowMenu)menu=cur.onShowMenu(e,m!
enu);$.each(cur.bindings,function(id,func){$('#'+id,menu).bind('click'
,function(e){hide();func(trigger,currentTarget)})});menu.css({'left':e[cur.eventPosX],'top':e[cur.eventPosY]}).show();if(cur.shadow)shadow.css({width:menu.width(),height:menu.height(),left:e.pageX+2,top:e.pageY+2}).show();$(document).one('click',hide)}function
hide(){menu.hide();shadow.hide()}$.contextMenu={defaults:function(userDefaults){$.each(userDefaults,function(i,val){if(typeof
val=='object'&&defaults[i]){$.extend(defaults[i],val)}else
defaults[i]=val})}}})(jQuery);$(function(){$('div.contextMenu').hide()});
+eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return
r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new
RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(5($){8
g=[],B=[],G=12=k,3c=$(\'<E Y="1g-E 3x"
24="1Z:3h;1i:0;1w:0;2r:2X;"><E Y="3G"></E><E
Y="3E"></E><E
Y="3C"></E></E>\')[0],2L=$(\'<29 Y="1g-29
3q"></29>\')[0],2H=$(\'<X 24="1Z:3j;"><E
Y="1g-1k"></E></X>\')[0],3g=$(\'<3Q
Y="1g-1k-3P" />\')[0],$1V=$(\'<E 3N="3M-1g-E"
24="1Z:3h;1i:0;1w:0;"></E>\'),1P={34:31,2Y:31,2p:0,2V:0,2U:0,1J:0,2B:k,2i:k,1r:k,2d:k,2M:Q,2J:Q};$(5(){$1V.3s(\'3p\')});$.R({25:5(a){2.11=[];2.1s(a)}});$.R($.25,{1X:{1s:5(a){4(a&&a.9){J(8
i=0;i<a.9;i++){2.2y(a[i]);a[i].V=2}}},2y:5(a){4(a 2x $.C)2.11.16(a);a.V=2;8
b=2;$(a.q).1T(5(){4(a.M)s;J(8
i=0;i<b.11.9;i++){4(b.11[i].M){b.11[i].W();a.14();s}}},5(){})}}});$.R({C:5(a,b,c){2.l=[];2.1c=[];!
2.M=Q;2.O=Q;2.N=k;2.u=$.R({},1P,c);2.q=a;2.$w=k;2.$1q=k;2.17=k;2.V=k;2.1L=k;2.1s();4(b&&b.2T==2S)2.2Q(b)}});$.R($.C,{2m:5(e){8
t=e.q;4(B.9&&t==B[0].q)s;1y(t.2t&&t.2t!=$1V[0])t=t.2t;4(!$(B).3B(5(){s
2.$w[0]==t}).9){$.C.1n()}},2f:5(e){3A(e.2c){1m 13:4(12)12.1a(e,12.$p[0]);1h;1m
27:$.C.1n();1h;1m 37:4(!G)G=B[0];8 a=G;4(a&&a.N){8
b=a.N;b.$p.K(\'1F\').K(\'1E\');a.W();b.15(P);2l(5(){b.23()})}v
4(a&&a.V){8
c,F=a.V.11;4((c=$.18(a,F))>-1){4(--c<0)c=F.9-1;$.C.1n();F[c].14();F[c].Z();4(F[c].l.9)F[c].l[0].15(P)}}1h;1m
38:4(G)G.1Y(-1);1h;1m 39:4(!G)G=B[0];8
m,a=G,1t=12?12.x:k;4(a){4(1t&&1t.l.9){1t.14();1t.l[0].15()}v 4((a=a.2C())){8
c,F=a.V.11;4((c=$.18(a,F))>-1){4(++c>=F.9)c=0;$.C.1n();F[c].14();F[c].Z();4(F[c].l.9)F[c].l[0].15(P)}}}1h;1m
3i:4(!G){4(B.9&&B[0].l.9)B[0].l[0].15()}v
G.1Y();1h}4(e.2c>36&&e.2c<3S)s
Q},1n:5(){1y(B.9)B[0].W()},3R:5(d){$.R(1P,d)},1X:{1s:5(){8 a=2;4(!2.q)s;v 4(2.q 2x
$.1j){2.N=2.q;2.q.3f(2);2.q=2.q.$p}g.16(2);2.$w=$(3c.1A(1));2.$1q=$(2L.1A(1));2.$w[0].1z(2.$1q[!
0]);$1V[0].1z(2.$w[0]);4(!2.N){$(2.q).1a(5(e){a.1r(e)}).1T(5(e){a.Z();
4(a.u.2p){a.1L=2l(5(){4(!a.M)a.1r(e)},a.u.2p)}},5(){4(!a.M)$(2).1W(\'2w\');4(a.1L)3e(a.1L)})}v{2.$w.1T(5(){a.Z()},5(){})}},Z:5(){4(!2.N)$(2.q).10(\'2w\');v
2.O=P},2v:5(a){4(a 2x
$.1j){4($.18(a,2.l)==-1){2.$1q.3O(a.$p);2.l.16(a);a.A=2;4(a.x)2.1c.16(a.x)}}v{2.2v(19
$.1j(a,2.u))}},2Q:5(a){J(8 i=0;i<a.9;i++){2.2v(a[i])}},3d:5(a){8
b=$.18(a,2.l);4(b>-1)2.l.1U(b,1);a.A=k},W:5(){4(!2.M)s;8
i,I=$.18(2,B);2.$w.W();4(I>=0)B.1U(I,1);2.M=2.O=Q;$(2.q).1W(\'2w\');J(i=0;i<2.1c.9;i++){2.1c[i].W()}J(i=0;i<2.l.9;i++){4(2.l[i].O)2.l[i].1S()}4(!B.9)$(2u).K(\'3b\',$.C.2m).K(\'3a\',$.C.2f);4(G==2)G=k;4(2.u.2i)2.u.2i.1R(2)},14:5(e){4(2.M)s;8
a,D=2.N;4(2.l.9){4(D){a=35(D.A.$w.1e(\'z-33\'));2.$w.1e(\'z-33\',(3L(a)?1:a+1))}2.$w.1e({32:\'3K\',2r:\'3J\'});4(2.u.1J){4(2.$w.L()<2.u.1J)2.$w.1e(\'L\',2.u.1J)}2.30();2.$w.1e({2r:\'2X\',32:\'\'}).14();4($.2Z.3I)2.$1q.1e(\'L\',35($.2Z.3H)==6?2.$w.L()-7:2.$1q.L());4(2.u.2B)2.u.2B.1R(2)}4(B.9==0)$(2u).2W(\'3b\',$.C.2m).2W(\'3a\',$.C.2f);2.M=P;B.16(2)},30:5(){8
a!
,o,S,H,1N,1b,1o,2o=$(1K).L(),1p=$(1K).T(),D=2.N,T=2.$w[0].2R,L=2.$w[0].3F,1M;4(D){o=D.$p.2q();S=o.1w+D.$p.L();H=o.1i}v{a=$(2.q);o=a.2q();S=o.1w+2.u.2U;H=o.1i+a.T()+2.u.2V}4($.2s.2P){1b=$(1K).2P();4(1p<T){H=1b}v
4(1p+1b<H+T){4(D){1N=D.A.$w.2q();1M=D.A.$w[0].2R;4(T<=1M){H=1N.1i+1M-T}v{H=1N.1i}4(1p+1b<H+T){H-=H+T-(1p+1b)}}v{H-=H+T-(1p+1b)}}}4($.2s.2O){1o=$(1K).2O();4(2o+1o<S+L){4(D){S-=D.$p.L()+L;4(S<1o)S=1o}v{S-=S+L-(2o+1o)}}}2.$w.1e({1w:S,1i:H})},1r:5(e){4(2.M){2.W();2.Z()}v{$.C.1n();2.14(e)}},2k:5(a,b){8
c=2;2.17=2l(5(){a.1R(c);c.17=k},b)},1d:5(){4(2.17){3e(2.17);2.17=k}},1Y:5(a){8
i,I=0,1O=2.l.9,o=a||1;J(i=0;i<1O;i++){4(2.l[i].O){I=i;1h}}2.l[I].2j();3D{I+=o;4(I>=1O)I=0;v
4(I<0)I=1O-1}1y(2.l[I].1Q);2.l[I].15(P)},2C:5(){8 m=2;1y(m.N)m=m.N.A;s
m.V?m:k},1I:5(){8
a,1k;2.W();4(!2.N)$(2.q).K(\'1a\').K(\'1E\').K(\'1F\');v
2.$w.K(\'1E\').K(\'1F\');1y(2.l.9){1k=2.l[0];1k.1I();2N
1k}4((a=$.18(2,g))>-1)g.1U(a,1);4(2.V){4((a=$.18(2,2.V.11))>-1)2.V.11.1U(a,1)}2.$w.2h()}}});$.R({1j:5(a,b!
){4(2g a==\'2e\')a={y:a};2.y=a.y||\'\';2.1D=a.1D||k;2.20=a.q||k;2.10=a
.10||k;2.1B=a.1B||k;2.$p=k;2.A=k;2.x=k;2.u=$.R({},1P,b);2.O=Q;2.1l=P;2.1Q=Q;2.1s();4(a.x)19
$.C(2,a.x,b)}});$.R($.1j,{1X:{1s:5(){8
i,1C,y=2.y,2b=2;2.$p=$(2H.1A(1));4(2.10)2.$p[0].2K(\'Y\',2.10);4(2.u.2M&&2.1B)2.$p[0].3z=2.1B;4(y==\'\'){2.$p.10(\'1g-1Q\');2.1Q=P}v{1C=2g
y==\'2e\';4(1C&&2.1D)y=$(\'<a
3y="\'+2.1D+\'"\'+(2.20?\'q="\'+2.20+\'"\':\'\')+\'>\'+y+\'</a>\');v
4(1C||!y.9)y=[y];J(i=0;i<y.9;i++){4(2g
y[i]==\'2e\'){2a=2u.3w(\'3v\');2a.3t=y[i];2.$p[0].1u.1z(2a)}v
2.$p[0].1u.1z(y[i].1A(1))}}2.$p.1a(5(e){2b.1a(e,2)});2.23()},1a:5(e,a){4(2.1l&&2.u.1r)2.u.1r.1R(a,e,2)},23:5(){8
a=2;2.$p.1T(5(){a.15()},5(){a.2j()})},15:5(a){2.1d();8
i,1f=2.A.1c,D=2.A.l,2b=2;4(2.A.17)2.A.1d();4(!2.1l)s;J(i=0;i<D.9;i++){4(D[i].O)D[i].1S()}2.Z();G=2.A;J(i=0;i<1f.9;i++){4(1f[i].M&&1f[i]!=2.x&&!1f[i].17)1f[i].2k(5(){2.W()},1f[i].u.2Y)}4(2.x&&!a){2.x.2k(5(){2.14()},2.x.u.34)}},2j:5(){2.1d();4(!2.1l)s;4(!2.x||!2.x.M)2.1S()},1d:5(){4(2.x){2.x.1d()}},Z:5(){2.O=P;2.$p.10(\'O\');8
a=2.A.N;4(a&&!a.O)a.Z();!
12=2},1S:5(){2.O=Q;2.$p.1W(\'O\');4(2==12)12=k},3r:5(){2.$p.1W(\'2I\');2.1l=P},3u:5(){2.$p.10(\'2I\');2.1l=Q},1I:5(){2.1d();2.$p.2h();2.$p.K(\'1E\').K(\'1F\').K(\'1a\');4(2.x){2.x.1I();2N
2.x}2.A.3d(2)},3f:5(b){4(2.x)s;2.x=b;4(2.A&&$.18(b,2.A.1c)==-1)2.A.1c.16(b);4(2.u.2d){8
a=3g.1A(0);a.2K(\'y\',2.u.2d);2.$p[0].1u.1z(a)}}}});$.R($.2s,{28:5(c,d,e){8
f=5(a){8
b=[],1v,1G,U,$X,i,1H,3o,q,26=k;U=j(a,\'2G\');J(i=0;i<U.9;i++){1v=[];4(!U[i].1x.9){b.16(19
$.1j(\'\',c));3n}4((1H=h(U[i],\'2n\'))){1v=f(1H);$(1H).2h()}$X=$(U[i]);4($X[0].1x.9==1&&$X[0].1x[0].22==3)q=$X[0].1x[0].3m;v
q=$X[0].1x;4(c&&c.2J)26=$X.3l(\'Y\');1G=19
$.1j({y:q,10:26},c);b.16(1G);4(1v.9)19 $.C(1G,1v,c)}s b};s 2.2z(5(){8
a,m;4(d||(a=h(2,\'2n\'))){a=d?$(d).3k(P)[0]:a;l=f(a);4(l.9){m=19
$.C(2,l,c);4(e)e.2y(m)}$(a).W()}})},2F:5(a){s 2.2z(5(){8
i,U=j(2,\'2G\');4(U.9){2E=19
$.25();J(i=0;i<U.9;i++)$(U[i]).28(a,k,2E)}})},1g:5(a,b){s
2.2z(5(){4(b&&b.2T==2S)19 $.C(2,b,a);v{4(2.21.2A()==\'2n\')$(2).2F(a);v
$(2).28(a,b)}})}})!
;8 h=5(a,b){4(!a)s k;8 n=a.1u;J(;n;n=n.2D){4(n.22==1&&n.21.2A()==b)s n
}s k};8 j=5(a,b){4(!a)s[];8
r=[],n=a.1u;J(;n;n=n.2D){4(n.22==1&&n.21.2A()==b)r[r.9]=n}s
r}})(3T);',62,242,'||this||if|function|||var|length|||||||||||null|menuItems||||eLI|target||return||settings|else|eDIV|subMenu|src||parentMenu|visibleMenus|Menu|pmi|div|mcm|activeMenu|posY|pos|for|unbind|width|visible|parentMenuItem|active|true|false|extend|posX|height|lis|menuCollection|hide|li|class|setActive|addClass|menus|activeItem||show|hoverIn|push|timer|inArray|new|click|wst|subMenus|removeTimer|css|pms|menu|break|top|MenuItem|item|enabled|case|closeAll|wsl|wh|eUL|onClick|init|asm|firstChild|subItems|left|childNodes|while|appendChild|cloneNode|data|isStr|url|mouseover|mouseout|menuItem|subUL|destroy|minWidth|window|openTimer|pheight|pmo|mil|defaults|separator|call|setInactive|hover|splice|rootDiv|removeClass|prototype|selectNextItem|position|urlTarget|nodeName|nodeType|bindHover|style|MenuCollection|classNames||menuFromElement|ul|elem|self|keyCode|arrowSrc|string|checkKey|typeof|r!
emove|onClose|hoverOut|addTimer|setTimeout|checkMouse|UL|ww|hoverOpenDelay|offset|display|fn|parentNode|document|addItem|activetarget|instanceof|addMenu|each|toUpperCase|onOpen|inMenuCollection|nextSibling|bar|menuBarFromUL|LI|menuItemElement|disabled|copyClassAttr|setAttribute|menuULElement|addExpando|delete|scrollLeft|scrollTop|addItems|clientHeight|Array|constructor|offsetLeft|offsetTop|bind|none|hideDelay|browser|setPosition|200|visibility|index|showDelay|parseInt|||||keydown|mousedown|menuDIVElement|removeItem|clearTimeout|addSubMenu|arrowElement|absolute|40|relative|clone|attr|nodeValue|continue|submenu|body|innerbox|enable|appendTo|innerHTML|disable|span|createElement|outerbox|href|menuData|switch|filter|shadowbox3|do|shadowbox2|clientWidth|shadowbox1|version|msie|block|hidden|isNaN|root|id|append|arrow|img|setDefaults|41|jQuery'.split('|'),0,{}));
/*
Modified: trunk/examples/wiki/view/themes/inrelationto/template.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/inrelationto/template.xhtml 2008-02-26 19:18:37 UTC
(rev 7488)
+++ trunk/examples/wiki/view/themes/inrelationto/template.xhtml 2008-02-27 08:35:11 UTC
(rev 7489)
@@ -211,23 +211,6 @@
}
function initPage() {
- $.contextMenu.defaults({
- shadow: false,
- menuStyle: {
- padding: '0',
- width: '200px'
- },
- itemStyle: {
- border: 'none',
- padding: '4px'
- },
- itemHoverStyle: {
- backgroundColor: '#EAE8E5',
- border: 'none',
- padding: '4px'
- }
- });
-
wrapBoxes();
}
Modified: trunk/examples/wiki/view/themes/sfwkorg/css/sfwk.css
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/css/sfwk.css 2008-02-26 19:18:37 UTC (rev
7488)
+++ trunk/examples/wiki/view/themes/sfwkorg/css/sfwk.css 2008-02-27 08:35:11 UTC (rev
7489)
@@ -624,6 +624,14 @@
font-weight: bold;
}
+.datatable .sortableHeader .sortIndicator {
+ width: 8px;
+ height: 8px;
+ margin-left: 5px;
+ margin-right: 5px;
+ vertical-align: middle;
+}
+
.datatable .regularHeader {
white-space: nowrap;
background: #ede8db url(../img/th.bg.gif) 0 0 repeat-x;
@@ -1079,72 +1087,129 @@
/* Directory Browser
----------------------------------------------- */
-.directoryControl {
- width: 100%;
- background: #fff url(../img/th.bg.inverse.gif) 0 0 repeat-x;
- border-top: 1px solid #d3d2d1;
- border-left: 1px solid #d3d2d1;
- border-right: 1px solid #d3d2d1;
+.directoryBrowser {
margin-top: 10px;
- padding: 7px;
- white-space: nowrap;
}
-.directorySelectControl {
- text-align: left;
- white-space: nowrap;
+.directoryBrowserPathPanel {
+ width: 100%;
+ background: #fff url(../img/th.bg.gif) 0 0 repeat-x;
+ border: 1px solid #d3d2d1;
}
-.directoryClipboard {
+.directoryBrowserPathPanel .treeSwitchOpen {
+ width: 25%;
+ padding-left: 5px;
+ padding-right: 5px;
+ border-right: 1px solid #C3BBB6;
text-align: right;
- white-space: nowrap;
}
-.directoryTrash {
- text-align: right;
- white-space: nowrap;
- width: 125px;
+.directoryBrowserPathPanel .treeSwitchClosed {
+ width: 20px;
+ padding-left: 5px;
+ padding-right: 5px;
+ border-right: 1px solid #C3BBB6;
}
-.directoryPathTable {
+.directoryBrowserPathPanel .path {
+ width: auto;
+ padding: 5px;
+}
+
+.directoryBrowserPathPanel .button {
+ color: #576c74;
+ background: none;
+ padding: 2px;
+ border-style: none;
+ font-size: 85%;
+ font-weight: bold;
+}
+
+.directoryBrowserPathPanel .separator {
+ font-weight: bold;
+ color: #888;
+ padding: 2px;
+ border-style: none;
+}
+
+.directoryBrowserMainPanel {
width: 100%;
- background: #ede8db url(../img/th.bg.gif) 0 0 repeat-x;
- border-top: 1px solid #d3d2d1;
border-left: 1px solid #d3d2d1;
border-right: 1px solid #d3d2d1;
+ border-bottom: 1px solid #d3d2d1;
}
-.directoryPath {
- text-align: left;
+.directoryBrowserTreePanel {
+ vertical-align: top;
+}
+
+.directoryBrowserTreePanel.closed {
+ display: none;
+}
+
+.directoryBrowserTreePanel.open {
+ width: 25%;
padding-left: 5px;
+ padding-right: 5px;
+ border-right: 1px solid #C3BBB6;
}
-.directoryPagerControl {
- text-align: right;
- white-space: nowrap;
+.directoryBrowserTree {
+ overflow-x: auto;
+}
+
+.directoryBrowserControlPanel {
+ width: 100%;
padding: 5px;
+ border-bottom: 1px solid #C3BBB6;
}
-.directoryPath .directoryButton {
- font-weight: bold;
- padding: 2px;
- border-style: none;
+.directoryBrowserControlPanel .pagerSelector {
+ text-align: right;
}
-.directoryPath .directorySeparator {
- font-weight: bold;
- color: #888;
- padding: 2px;
- border-style: none;
+.directoryBrowserControlPanel .clipboard {
+ text-align: left;
}
-.directoryEmpty {
+.directoryBrowserContentPanel {
+ vertical-align: top;
+}
+
+.directoryBrowserContentPanel .pagerTop,
+.directoryBrowserContentPanel .pagerBottom {
+ border: none;
+}
+
+.directoryBrowserContentPanel .onePercentColumn,
+.directoryBrowserContentPanel .tenPercentColumn,
+.directoryBrowserContentPanel .fifteenPercentColumn,
+.directoryBrowserContentPanel .twentyPercentColumn {
+ padding-left: 5px;
+ padding-right: 5px;
+}
+
+.directoryBrowserContentPanel .directoryEmpty {
padding: 5px;
- border-bottom: 1px solid #d3d2d1;
- border-left: 1px solid #d3d2d1;
- border-right: 1px solid #d3d2d1;
}
+.directoryBrowserContentPanel .directoryEmpty .icon {
+ vertical-align: middle;
+}
+.dirItemIcon {
+ width: 18px;
+ height: 20px;
+}
+
+.dirItemIcon.mouseOver {
+ width: 18px;
+ height: 18px;
+ margin-top: 1px;
+ margin-bottom: 1px;
+}
+
+
/* Form tabs
----------------------------------------------- */
@@ -1383,6 +1448,107 @@
.userInfoEntryLink:hover {color: #666}
+/* Click Menu/Context Menu
+----------------------------------------------- */
+
+#root-menu-div ul {
+ border: 1px solid #C3BBB6;
+ background-color: #fff;
+}
+
+#root-menu-div li{
+ white-space:nowrap;
+ font-size: 85%;
+ margin: 0;
+ padding: 0;
+}
+
+* html #root-menu-div li{
+ height: 1.5em; /* fixing ie6 problem */
+}
+
+ul.menu, #root-menu-div ul {
+ list-style: none;
+ margin: 0;
+ padding: 0;
+}
+
+li.menu-separator.active{
+ background-color: transparent;
+}
+
+li.active {
+ background-color: #eae8e5;
+}
+
+.activetarget {
+ font-weight: bold;
+ cursor: pointer;
+}
+
+* html div.menu-item {
+ display: inline; /* fixes problem in ie6 */
+}
+
+li.menumain {
+ float: left;
+ padding: 0;
+ margin: 0;
+
+}
+
+div.menu-item {
+ margin-left: 5px;
+ margin-right: 5px;
+}
+
+div.menu-item a {
+ color: #576c74;
+ text-decoration: none;
+}
+
+img.menu-item-arrow{
+ position: absolute;
+ right: 4px;
+ top: 8px;
+}
+
+li.menu-separator {
+ border-bottom: 1px solid #000;
+ font-size: 0; /* for ie */
+ height: 0;
+ line-height: 0; /* for ie */
+ margin: 2px 0;
+}
+
+.contextMenuItems {
+ display: none;
+}
+
+
+/* Trees
+----------------------------------------------- */
+
+.rich-tree-node {
+ cursor: pointer;
+}
+
+.rich-tree-node-highlighted {
+ color: #576c74;
+ text-decoration: none;
+}
+
+.rich-tree-node-selected {
+ font-weight: bold;
+ border: none;
+}
+
+.directoryTreeLabel {
+ padding-top: 2px;
+ cursor: pointer;
+}
+
+
/* User Control
----------------------------------------------- */
Modified: trunk/examples/wiki/view/themes/sfwkorg/js/jqueryPlugins.js
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/js/jqueryPlugins.js 2008-02-26 19:18:37 UTC
(rev 7488)
+++ trunk/examples/wiki/view/themes/sfwkorg/js/jqueryPlugins.js 2008-02-27 08:35:11 UTC
(rev 7489)
@@ -94,10 +94,22 @@
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return
r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new
RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(8($){p
g=$.19.D,w=$.19.w;$.19.z({D:8(){4(1[0]==h)5 Z.1a||$.I&&7.10.1z||7.q.1z;4(1[0]==7)5
1t.1s(7.q.1H,7.q.13);5 g.1k(1,1h)},w:8(){4(1[0]==h)5
Z.1d||$.I&&7.10.1c||7.q.1c;4(1[0]==7)5 1t.1s(7.q.1B,7.q.11);5 w.1k(1,1h)},1a:8(){5
1[0]==h||1[0]==7?1.D():1.P(\':J\')?1[0].13-f(1,\'k\')-f(1,\'1A\'):1.D()+f(1,\'18\')+f(1,\'1y\')},1d:8(){5
1[0]==h||1[0]==7?1.w():1.P(\':J\')?1[0].11-f(1,\'j\')-f(1,\'1x\'):1.w()+f(1,\'15\')+f(1,\'1u\')},1K:8(){5
1[0]==h||1[0]==7?1.D():1.P(\':J\')?1[0].13:1.D()+f(1,\'k\')+f(1,\'1A\')+f(1,\'18\')+f(1,\'1y\')},1J:8(){5
1[0]==h||1[0]==7?1.w():1.P(\':J\')?1[0].11:1.w()+f(1,\'j\')+f(1,\'1x\')+f(1,\'15\')+f(1,\'1u\')},l:8(a){4(a!=1q)5
1.1!
o(8(){4(1==h||1==7)h.1m(a,$(h).n());o 1.l=a});4(1[0]==h||1[0]==7)5
Z.1G||$.I&&7.10.l||7.q.l;5 1[0].l},n:8(a){4(a!=1q)5
1.1o(8(){4(1==h||1==7)h.1m($(h).l(),a);o 1.n=a});4(1[0]==h||1[0]==7)5
Z.1F||$.I&&7.10.n||7.q.n;5 1[0].n},C:8(c,d){p
a=1[0],3=a.S,6=a.R,c=$.z({Q:m,K:m,O:m,t:m},c||{}),x=a.N,y=a.M,v=a.l,u=a.n;4($.i.17||$.i.16){x+=f(a,\'j\');y+=f(a,\'k\')}4(($.i.Y||$.i.X)&&$.r(6,\'C\')!=\'W\'){x-=f(6,\'j\');y-=f(6,\'k\')}4($.i.17){B{4(3!=a&&$.r(3,\'1w\')!=\'J\'){x+=f(3,\'j\');y+=f(3,\'k\')}4(3==6)1v}H((3=3.S)&&3.s!=\'G\')}4($.i.16&&(6.s!=\'G\'&&$.r(6,\'C\')==\'W\')){B{x+=6.N;y+=6.M;x+=f(6,\'j\');y+=f(6,\'k\')}H((6=6.R)&&(6.s!=\'G\'&&$.r(6,\'C\')==\'W\'))}p
b=e(a,c,x,y,v,u);4(d){$.z(d,b);5 1}o{5 b}},1I:8(b,c){p
x=0,y=0,v=0,u=0,9=1[0],3=1[0],6,U,L=$.r(9,\'C\'),A=$.i.17,E=$.i.16,1p=$.i.Y,1n=$.i.X,12=m,14=m,b=$.z({Q:F,K:m,O:m,t:F,1j:m},b||{});4(b.1j)5
1.1i(b,c);4(9.s==\'G\'){x=9.N;y=9.M;4(A){x+=f(9,\'V\')+(f(9,\'j\')*2);y+=f(9,\'T\')+(f(9,\'k\')*2)}o
4(1n){x+=f(9,\'V\');y+=f(9,\'T!
\')}o
4(E&&1l.I){x+=f(9,\'j\');y+=f(9,\'k\')}}o{B{U=$.r(3,\'C\');x+=3.
N;y+=3.M;4(A||E){x+=f(3,\'j\');y+=f(3,\'k\');4(A&&U==\'1g\')12=F;4(E&&U==\'1E\')14=F}6=3.R;4(b.t||A){B{4(b.t){v+=3.l;u+=3.n}4(A&&3!=9&&$.r(3,\'1w\')!=\'J\'){x+=f(3,\'j\');y+=f(3,\'k\')}3=3.S}H(3!=6)}3=6;4(3.s==\'G\'||3.s==\'1e\'){4((1p||(E&&$.I))&&L!=\'1g\'&&L!=\'1f\'){x+=f(3,\'V\');y+=f(3,\'T\')}4((A&&!12&&L!=\'1f\')||(E&&L==\'W\'&&!14)){x+=f(3,\'j\');y+=f(3,\'k\')}1v}}H(3)}p
a=e(9,b,x,y,v,u);4(c){$.z(c,a);5 1}o{5 a}},1i:8(b,c){p
x=0,y=0,v=0,u=0,3=1[0],6,b=$.z({Q:F,K:m,O:m,t:F},b||{});B{x+=3.N;y+=3.M;6=3.R;4(b.t){B{v+=3.l;u+=3.n;3=3.S}H(3!=6)}3=6}H(3&&3.s!=\'G\'&&3.s!=\'1e\');p
a=e(1[0],b,x,y,v,u);4(c){$.z(c,a);5 1}o{5 a}}});p f=8(b,a){5 1D($.r(b.1C?b[0]:b,a))||0};p
e=8(b,c,x,y,a,d){4(!c.Q){x-=f(b,\'V\');y-=f(b,\'T\')}4(c.K&&($.i.Y||$.i.X)){x+=f(b,\'j\');y+=f(b,\'k\')}o
4(!c.K&&!($.i.Y||$.i.X)){x-=f(b,\'j\');y-=f(b,\'k\')}4(c.O){x+=f(b,\'15\');y+=f(b,\'18\')}4(c.t){a-=b.l;d-=b.n}5
c.t?{1b:y-d,1r:x-a,n:d,l:a}:{1b:y,1r:x}}})(1l);',62,109,'|this||parent|if|return|op|document|f!
unction|elem||||||||window|browser|borderLeftWidth|borderTopWidth|scrollLeft|false|scrollTop|else|var|body|css|tagName|scroll|st|sl|width|||extend|mo|do|position|height|ie|true|BODY|while|boxModel|visible|border|elemPos|offsetTop|offsetLeft|padding|is|margin|offsetParent|parentNode|marginTop|parPos|marginLeft|static|opera|safari|self|documentElement|offsetWidth|absparent|offsetHeight|relparent|paddingLeft|msie|mozilla|paddingTop|fn|innerHeight|top|clientWidth|innerWidth|HTML|fixed|absolute|arguments|offsetLite|lite|apply|jQuery|scrollTo|oa|each|sf|undefined|left|max|Math|paddingRight|break|overflow|borderRightWidth|paddingBottom|clientHeight|borderBottomWidth|scrollWidth|jquery|parseInt|relative|pageYOffset|pageXOffset|scrollHeight|offset|outerWidth|outerHeight'.split('|'),0,{}));
-/**
- * jQuery context menu
+/*
+ * jQuery Menu plugin
+ * Version: 0.0.9
+ *
+ * Copyright (c) 2007 Roman Weich
+ *
http://p.sohei.org
+ *
+ * Dual licensed under the MIT and GPL licenses
+ * (This means that you can choose the license that best suits your project, and use it
accordingly):
+ *
http://www.opensource.org/licenses/mit-license.php
+ *
http://www.gnu.org/licenses/gpl.html
+ *
+ * Changelog:
+ * v 0.0.9 - 2008-01-19
*/
-(function($){var menu,shadow,trigger,content,hash,currentTarget;var
defaults={menuStyle:{listStyle:'none',padding:'1px',margin:'0px',backgroundColor:'#fff',border:'1px
solid
#999',width:'100px'},itemStyle:{margin:'0px',color:'#000',display:'block',cursor:'default',padding:'3px',border:'1px
solid #fff',backgroundColor:'transparent'},itemHoverStyle:{border:'1px
solid
#0a246a',backgroundColor:'#b6bdd2'},eventPosX:'pageX',eventPosY:'pageY',shadow:true,onContextMenu:null,onShowMenu:null};$.fn.contextMenu=function(id,options){if(!menu){menu=$('<div
id="jqContextMenu"></div>').hide().css({position:'absolute',zIndex:'500'}).appendTo('body').bind('click',function(e){e.stopPropagation()})}if(!shadow){shadow=$('<div></div>').css({backgroundColor:'#000',position:'absolute',opacity:0.2,zIndex:499}).appendTo('body').hide()}hash=hash||[];hash.push({id:id,menuStyle:$.extend({},defaults.menuStyle,options.menuStyle||{}),itemStyle:$.extend({},defaults.itemStyle,options.itemStyle||{}),itemHove!
rStyle:$.extend({},defaults.itemHoverStyle,options.itemHoverStyle||{}),bindings:options.bindings||{},shadow:options.shadow||options.shadow===false?options.shadow:defaults.shadow,onContextMenu:options.onContextMenu||defaults.onContextMenu,onShowMenu:options.onShowMenu||defaults.onShowMenu,eventPosX:options.eventPosX||defaults.eventPosX,eventPosY:options.eventPosY||defaults.eventPosY});var
index=hash.length-1;$(this).bind('contextmenu',function(e){var
bShowContext=(!!hash[index].onContextMenu)?hash[index].onContextMenu(e):true;if(bShowContext)display(index,this,e,options);return
false});return this};function display(index,trigger,e,options){var
cur=hash[index];content=$('#'+cur.id).find('ul:first').clone(true);content.css(cur.menuStyle).find('li').css(cur.itemStyle).hover(function(){$(this).css(cur.itemHoverStyle)},function(){$(this).css(cur.itemStyle)}).find('img').css({verticalAlign:'middle',paddingRight:'2px'});menu.html(content);if(!!cur.onShowMenu)menu=cur.onShowMenu(e,m!
enu);$.each(cur.bindings,function(id,func){$('#'+id,menu).bind('click'
,function(e){hide();func(trigger,currentTarget)})});menu.css({'left':e[cur.eventPosX],'top':e[cur.eventPosY]}).show();if(cur.shadow)shadow.css({width:menu.width(),height:menu.height(),left:e.pageX+2,top:e.pageY+2}).show();$(document).one('click',hide)}function
hide(){menu.hide();shadow.hide()}$.contextMenu={defaults:function(userDefaults){$.each(userDefaults,function(i,val){if(typeof
val=='object'&&defaults[i]){$.extend(defaults[i],val)}else
defaults[i]=val})}}})(jQuery);$(function(){$('div.contextMenu').hide()});
+eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return
r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new
RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(5($){8
g=[],B=[],G=12=k,3c=$(\'<E Y="1g-E 3x"
24="1Z:3h;1i:0;1w:0;2r:2X;"><E Y="3G"></E><E
Y="3E"></E><E
Y="3C"></E></E>\')[0],2L=$(\'<29 Y="1g-29
3q"></29>\')[0],2H=$(\'<X 24="1Z:3j;"><E
Y="1g-1k"></E></X>\')[0],3g=$(\'<3Q
Y="1g-1k-3P" />\')[0],$1V=$(\'<E 3N="3M-1g-E"
24="1Z:3h;1i:0;1w:0;"></E>\'),1P={34:31,2Y:31,2p:0,2V:0,2U:0,1J:0,2B:k,2i:k,1r:k,2d:k,2M:Q,2J:Q};$(5(){$1V.3s(\'3p\')});$.R({25:5(a){2.11=[];2.1s(a)}});$.R($.25,{1X:{1s:5(a){4(a&&a.9){J(8
i=0;i<a.9;i++){2.2y(a[i]);a[i].V=2}}},2y:5(a){4(a 2x $.C)2.11.16(a);a.V=2;8
b=2;$(a.q).1T(5(){4(a.M)s;J(8
i=0;i<b.11.9;i++){4(b.11[i].M){b.11[i].W();a.14();s}}},5(){})}}});$.R({C:5(a,b,c){2.l=[];2.1c=[];!
2.M=Q;2.O=Q;2.N=k;2.u=$.R({},1P,c);2.q=a;2.$w=k;2.$1q=k;2.17=k;2.V=k;2.1L=k;2.1s();4(b&&b.2T==2S)2.2Q(b)}});$.R($.C,{2m:5(e){8
t=e.q;4(B.9&&t==B[0].q)s;1y(t.2t&&t.2t!=$1V[0])t=t.2t;4(!$(B).3B(5(){s
2.$w[0]==t}).9){$.C.1n()}},2f:5(e){3A(e.2c){1m 13:4(12)12.1a(e,12.$p[0]);1h;1m
27:$.C.1n();1h;1m 37:4(!G)G=B[0];8 a=G;4(a&&a.N){8
b=a.N;b.$p.K(\'1F\').K(\'1E\');a.W();b.15(P);2l(5(){b.23()})}v
4(a&&a.V){8
c,F=a.V.11;4((c=$.18(a,F))>-1){4(--c<0)c=F.9-1;$.C.1n();F[c].14();F[c].Z();4(F[c].l.9)F[c].l[0].15(P)}}1h;1m
38:4(G)G.1Y(-1);1h;1m 39:4(!G)G=B[0];8
m,a=G,1t=12?12.x:k;4(a){4(1t&&1t.l.9){1t.14();1t.l[0].15()}v 4((a=a.2C())){8
c,F=a.V.11;4((c=$.18(a,F))>-1){4(++c>=F.9)c=0;$.C.1n();F[c].14();F[c].Z();4(F[c].l.9)F[c].l[0].15(P)}}}1h;1m
3i:4(!G){4(B.9&&B[0].l.9)B[0].l[0].15()}v
G.1Y();1h}4(e.2c>36&&e.2c<3S)s
Q},1n:5(){1y(B.9)B[0].W()},3R:5(d){$.R(1P,d)},1X:{1s:5(){8 a=2;4(!2.q)s;v 4(2.q 2x
$.1j){2.N=2.q;2.q.3f(2);2.q=2.q.$p}g.16(2);2.$w=$(3c.1A(1));2.$1q=$(2L.1A(1));2.$w[0].1z(2.$1q[!
0]);$1V[0].1z(2.$w[0]);4(!2.N){$(2.q).1a(5(e){a.1r(e)}).1T(5(e){a.Z();
4(a.u.2p){a.1L=2l(5(){4(!a.M)a.1r(e)},a.u.2p)}},5(){4(!a.M)$(2).1W(\'2w\');4(a.1L)3e(a.1L)})}v{2.$w.1T(5(){a.Z()},5(){})}},Z:5(){4(!2.N)$(2.q).10(\'2w\');v
2.O=P},2v:5(a){4(a 2x
$.1j){4($.18(a,2.l)==-1){2.$1q.3O(a.$p);2.l.16(a);a.A=2;4(a.x)2.1c.16(a.x)}}v{2.2v(19
$.1j(a,2.u))}},2Q:5(a){J(8 i=0;i<a.9;i++){2.2v(a[i])}},3d:5(a){8
b=$.18(a,2.l);4(b>-1)2.l.1U(b,1);a.A=k},W:5(){4(!2.M)s;8
i,I=$.18(2,B);2.$w.W();4(I>=0)B.1U(I,1);2.M=2.O=Q;$(2.q).1W(\'2w\');J(i=0;i<2.1c.9;i++){2.1c[i].W()}J(i=0;i<2.l.9;i++){4(2.l[i].O)2.l[i].1S()}4(!B.9)$(2u).K(\'3b\',$.C.2m).K(\'3a\',$.C.2f);4(G==2)G=k;4(2.u.2i)2.u.2i.1R(2)},14:5(e){4(2.M)s;8
a,D=2.N;4(2.l.9){4(D){a=35(D.A.$w.1e(\'z-33\'));2.$w.1e(\'z-33\',(3L(a)?1:a+1))}2.$w.1e({32:\'3K\',2r:\'3J\'});4(2.u.1J){4(2.$w.L()<2.u.1J)2.$w.1e(\'L\',2.u.1J)}2.30();2.$w.1e({2r:\'2X\',32:\'\'}).14();4($.2Z.3I)2.$1q.1e(\'L\',35($.2Z.3H)==6?2.$w.L()-7:2.$1q.L());4(2.u.2B)2.u.2B.1R(2)}4(B.9==0)$(2u).2W(\'3b\',$.C.2m).2W(\'3a\',$.C.2f);2.M=P;B.16(2)},30:5(){8
a!
,o,S,H,1N,1b,1o,2o=$(1K).L(),1p=$(1K).T(),D=2.N,T=2.$w[0].2R,L=2.$w[0].3F,1M;4(D){o=D.$p.2q();S=o.1w+D.$p.L();H=o.1i}v{a=$(2.q);o=a.2q();S=o.1w+2.u.2U;H=o.1i+a.T()+2.u.2V}4($.2s.2P){1b=$(1K).2P();4(1p<T){H=1b}v
4(1p+1b<H+T){4(D){1N=D.A.$w.2q();1M=D.A.$w[0].2R;4(T<=1M){H=1N.1i+1M-T}v{H=1N.1i}4(1p+1b<H+T){H-=H+T-(1p+1b)}}v{H-=H+T-(1p+1b)}}}4($.2s.2O){1o=$(1K).2O();4(2o+1o<S+L){4(D){S-=D.$p.L()+L;4(S<1o)S=1o}v{S-=S+L-(2o+1o)}}}2.$w.1e({1w:S,1i:H})},1r:5(e){4(2.M){2.W();2.Z()}v{$.C.1n();2.14(e)}},2k:5(a,b){8
c=2;2.17=2l(5(){a.1R(c);c.17=k},b)},1d:5(){4(2.17){3e(2.17);2.17=k}},1Y:5(a){8
i,I=0,1O=2.l.9,o=a||1;J(i=0;i<1O;i++){4(2.l[i].O){I=i;1h}}2.l[I].2j();3D{I+=o;4(I>=1O)I=0;v
4(I<0)I=1O-1}1y(2.l[I].1Q);2.l[I].15(P)},2C:5(){8 m=2;1y(m.N)m=m.N.A;s
m.V?m:k},1I:5(){8
a,1k;2.W();4(!2.N)$(2.q).K(\'1a\').K(\'1E\').K(\'1F\');v
2.$w.K(\'1E\').K(\'1F\');1y(2.l.9){1k=2.l[0];1k.1I();2N
1k}4((a=$.18(2,g))>-1)g.1U(a,1);4(2.V){4((a=$.18(2,2.V.11))>-1)2.V.11.1U(a,1)}2.$w.2h()}}});$.R({1j:5(a,b!
){4(2g a==\'2e\')a={y:a};2.y=a.y||\'\';2.1D=a.1D||k;2.20=a.q||k;2.10=a
.10||k;2.1B=a.1B||k;2.$p=k;2.A=k;2.x=k;2.u=$.R({},1P,b);2.O=Q;2.1l=P;2.1Q=Q;2.1s();4(a.x)19
$.C(2,a.x,b)}});$.R($.1j,{1X:{1s:5(){8
i,1C,y=2.y,2b=2;2.$p=$(2H.1A(1));4(2.10)2.$p[0].2K(\'Y\',2.10);4(2.u.2M&&2.1B)2.$p[0].3z=2.1B;4(y==\'\'){2.$p.10(\'1g-1Q\');2.1Q=P}v{1C=2g
y==\'2e\';4(1C&&2.1D)y=$(\'<a
3y="\'+2.1D+\'"\'+(2.20?\'q="\'+2.20+\'"\':\'\')+\'>\'+y+\'</a>\');v
4(1C||!y.9)y=[y];J(i=0;i<y.9;i++){4(2g
y[i]==\'2e\'){2a=2u.3w(\'3v\');2a.3t=y[i];2.$p[0].1u.1z(2a)}v
2.$p[0].1u.1z(y[i].1A(1))}}2.$p.1a(5(e){2b.1a(e,2)});2.23()},1a:5(e,a){4(2.1l&&2.u.1r)2.u.1r.1R(a,e,2)},23:5(){8
a=2;2.$p.1T(5(){a.15()},5(){a.2j()})},15:5(a){2.1d();8
i,1f=2.A.1c,D=2.A.l,2b=2;4(2.A.17)2.A.1d();4(!2.1l)s;J(i=0;i<D.9;i++){4(D[i].O)D[i].1S()}2.Z();G=2.A;J(i=0;i<1f.9;i++){4(1f[i].M&&1f[i]!=2.x&&!1f[i].17)1f[i].2k(5(){2.W()},1f[i].u.2Y)}4(2.x&&!a){2.x.2k(5(){2.14()},2.x.u.34)}},2j:5(){2.1d();4(!2.1l)s;4(!2.x||!2.x.M)2.1S()},1d:5(){4(2.x){2.x.1d()}},Z:5(){2.O=P;2.$p.10(\'O\');8
a=2.A.N;4(a&&!a.O)a.Z();!
12=2},1S:5(){2.O=Q;2.$p.1W(\'O\');4(2==12)12=k},3r:5(){2.$p.1W(\'2I\');2.1l=P},3u:5(){2.$p.10(\'2I\');2.1l=Q},1I:5(){2.1d();2.$p.2h();2.$p.K(\'1E\').K(\'1F\').K(\'1a\');4(2.x){2.x.1I();2N
2.x}2.A.3d(2)},3f:5(b){4(2.x)s;2.x=b;4(2.A&&$.18(b,2.A.1c)==-1)2.A.1c.16(b);4(2.u.2d){8
a=3g.1A(0);a.2K(\'y\',2.u.2d);2.$p[0].1u.1z(a)}}}});$.R($.2s,{28:5(c,d,e){8
f=5(a){8
b=[],1v,1G,U,$X,i,1H,3o,q,26=k;U=j(a,\'2G\');J(i=0;i<U.9;i++){1v=[];4(!U[i].1x.9){b.16(19
$.1j(\'\',c));3n}4((1H=h(U[i],\'2n\'))){1v=f(1H);$(1H).2h()}$X=$(U[i]);4($X[0].1x.9==1&&$X[0].1x[0].22==3)q=$X[0].1x[0].3m;v
q=$X[0].1x;4(c&&c.2J)26=$X.3l(\'Y\');1G=19
$.1j({y:q,10:26},c);b.16(1G);4(1v.9)19 $.C(1G,1v,c)}s b};s 2.2z(5(){8
a,m;4(d||(a=h(2,\'2n\'))){a=d?$(d).3k(P)[0]:a;l=f(a);4(l.9){m=19
$.C(2,l,c);4(e)e.2y(m)}$(a).W()}})},2F:5(a){s 2.2z(5(){8
i,U=j(2,\'2G\');4(U.9){2E=19
$.25();J(i=0;i<U.9;i++)$(U[i]).28(a,k,2E)}})},1g:5(a,b){s
2.2z(5(){4(b&&b.2T==2S)19 $.C(2,b,a);v{4(2.21.2A()==\'2n\')$(2).2F(a);v
$(2).28(a,b)}})}})!
;8 h=5(a,b){4(!a)s k;8 n=a.1u;J(;n;n=n.2D){4(n.22==1&&n.21.2A()==b)s n
}s k};8 j=5(a,b){4(!a)s[];8
r=[],n=a.1u;J(;n;n=n.2D){4(n.22==1&&n.21.2A()==b)r[r.9]=n}s
r}})(3T);',62,242,'||this||if|function|||var|length|||||||||||null|menuItems||||eLI|target||return||settings|else|eDIV|subMenu|src||parentMenu|visibleMenus|Menu|pmi|div|mcm|activeMenu|posY|pos|for|unbind|width|visible|parentMenuItem|active|true|false|extend|posX|height|lis|menuCollection|hide|li|class|setActive|addClass|menus|activeItem||show|hoverIn|push|timer|inArray|new|click|wst|subMenus|removeTimer|css|pms|menu|break|top|MenuItem|item|enabled|case|closeAll|wsl|wh|eUL|onClick|init|asm|firstChild|subItems|left|childNodes|while|appendChild|cloneNode|data|isStr|url|mouseover|mouseout|menuItem|subUL|destroy|minWidth|window|openTimer|pheight|pmo|mil|defaults|separator|call|setInactive|hover|splice|rootDiv|removeClass|prototype|selectNextItem|position|urlTarget|nodeName|nodeType|bindHover|style|MenuCollection|classNames||menuFromElement|ul|elem|self|keyCode|arrowSrc|string|checkKey|typeof|r!
emove|onClose|hoverOut|addTimer|setTimeout|checkMouse|UL|ww|hoverOpenDelay|offset|display|fn|parentNode|document|addItem|activetarget|instanceof|addMenu|each|toUpperCase|onOpen|inMenuCollection|nextSibling|bar|menuBarFromUL|LI|menuItemElement|disabled|copyClassAttr|setAttribute|menuULElement|addExpando|delete|scrollLeft|scrollTop|addItems|clientHeight|Array|constructor|offsetLeft|offsetTop|bind|none|hideDelay|browser|setPosition|200|visibility|index|showDelay|parseInt|||||keydown|mousedown|menuDIVElement|removeItem|clearTimeout|addSubMenu|arrowElement|absolute|40|relative|clone|attr|nodeValue|continue|submenu|body|innerbox|enable|appendTo|innerHTML|disable|span|createElement|outerbox|href|menuData|switch|filter|shadowbox3|do|shadowbox2|clientWidth|shadowbox1|version|msie|block|hidden|isNaN|root|id|append|arrow|img|setDefaults|41|jQuery'.split('|'),0,{}));
/*
Modified: trunk/examples/wiki/view/themes/sfwkorg/template.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/template.xhtml 2008-02-26 19:18:37 UTC (rev
7488)
+++ trunk/examples/wiki/view/themes/sfwkorg/template.xhtml 2008-02-27 08:35:11 UTC (rev
7489)
@@ -205,22 +205,6 @@
}
function initPage() {
- $.contextMenu.defaults({
- shadow: false,
- menuStyle: {
- padding: '0',
- width: '200px'
- },
- itemStyle: {
- border: 'none',
- padding: '4px'
- },
- itemHoverStyle: {
- backgroundColor: '#f5f5f5',
- border: 'none',
- padding: '4px'
- }
- });
wrapBoxes();
}
@@ -288,7 +272,7 @@
<h3>Controls</h3>
<s:fragment rendered="#{not empty currentDocument and not empty
currentDocument.id}">
-
+
<h:outputLink styleClass="linkNavigation"
value="#{wikiURLRenderer.renderPermURL(currentDocument)}"
target="_top">
<h:outputText
value="#{messages['lacewiki.label.PermLink']}"/>
</h:outputLink>
@@ -299,7 +283,9 @@
</s:fragment>
- <ui:insert name="controlTwo"/>
+ <s:div id="control">
+ <ui:insert name="controlTwo"/>
+ </s:div>
</div>
<b class="rbottom"><b
class="r4"></b><b class="r3"></b><b
class="r2"></b><b class="r1"></b></b>
@@ -321,6 +307,7 @@
<b class="rbottom"><b
class="r4"></b><b class="r3"></b><b
class="r2"></b><b class="r1"></b></b>
</s:div>
+ <!--
<div style="margin-top: 25px; margin-left: 15px; margin-right: 15px;
">
<h2>See Seam in action...</h2>
<p>
@@ -331,6 +318,7 @@
<a
href="http://www.seamframework.org/Download">Seam
download package</a>.
</p>
</div>
+ -->
<div style="margin-top: 25px; margin-left: 15px; margin-right: 15px;
">
<h2>Built with Seam</h2>
Modified: trunk/examples/wiki/view/uploadCreate_d.xhtml
===================================================================
--- trunk/examples/wiki/view/uploadCreate_d.xhtml 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/view/uploadCreate_d.xhtml 2008-02-27 08:35:11 UTC (rev 7489)
@@ -16,8 +16,8 @@
<ui:define name="controlTwo">
<s:link id="exit" styleClass="linkNavigation"
action="exit"
-
accesskey="#{messages['lacewiki.button.ExitEditor.accesskey']}">
- <h:outputText escape="false"
value="#{messages['lacewiki.button.ExitEditor']}"/>
+
accesskey="#{messages['lacewiki.button.Close.accesskey']}">
+ <h:outputText escape="false"
value="#{messages['lacewiki.button.Close']}"/>
</s:link>
</ui:define>
Modified: trunk/examples/wiki/view/uploadCreate_m.xhtml
===================================================================
--- trunk/examples/wiki/view/uploadCreate_m.xhtml 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/view/uploadCreate_m.xhtml 2008-02-27 08:35:11 UTC (rev 7489)
@@ -15,8 +15,8 @@
<ui:define name="control">
<s:link id="exit" styleClass="linkNavigation"
action="exit"
-
accesskey="#{messages['lacewiki.button.ExitEditor.accesskey']}">
- <h:outputText escape="false"
value="#{messages['lacewiki.button.ExitEditor']}"/>
+
accesskey="#{messages['lacewiki.button.Close.accesskey']}">
+ <h:outputText escape="false"
value="#{messages['lacewiki.button.Close']}"/>
</s:link>
</ui:define>
Modified: trunk/examples/wiki/view/uploadEdit_d.xhtml
===================================================================
--- trunk/examples/wiki/view/uploadEdit_d.xhtml 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/view/uploadEdit_d.xhtml 2008-02-27 08:35:11 UTC (rev 7489)
@@ -18,8 +18,8 @@
<ui:define name="controlTwo">
<s:link id="exit" styleClass="linkNavigation
sessionEventTrigger" action="exit"
-
accesskey="#{messages['lacewiki.button.ExitEditor.accesskey']}">
- <h:outputText escape="false"
value="#{messages['lacewiki.button.ExitEditor']}"/>
+
accesskey="#{messages['lacewiki.button.Close.accesskey']}">
+ <h:outputText escape="false"
value="#{messages['lacewiki.button.Close']}"/>
</s:link>
</ui:define>
Modified: trunk/examples/wiki/view/uploadEdit_m.xhtml
===================================================================
--- trunk/examples/wiki/view/uploadEdit_m.xhtml 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/view/uploadEdit_m.xhtml 2008-02-27 08:35:11 UTC (rev 7489)
@@ -16,8 +16,8 @@
<ui:define name="control">
<s:link id="exit" styleClass="linkNavigation"
action="exit"
-
accesskey="#{messages['lacewiki.button.ExitEditor.accesskey']}">
- <h:outputText escape="false"
value="#{messages['lacewiki.button.ExitEditor']}"/>
+
accesskey="#{messages['lacewiki.button.Close.accesskey']}">
+ <h:outputText escape="false"
value="#{messages['lacewiki.button.Close']}"/>
</s:link>
</ui:define>
Modified: trunk/examples/wiki/view/userList_d.xhtml
===================================================================
--- trunk/examples/wiki/view/userList_d.xhtml 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/view/userList_d.xhtml 2008-02-27 08:35:11 UTC (rev 7489)
@@ -30,6 +30,10 @@
<ui:define name="content">
+ <script type="text/javascript">jQuery(function() {
+ jQuery(".contextMenu").show().menu({offsetLeft: 20});
+ })</script>
+
<h:form id="userSearchForm" styleClass="box">
<div class="form" id="userSearchControl">
@@ -129,13 +133,12 @@
rendered="#{usersList.rowCount >0}"
styleClass="datatable topLeftBottomBorder smallFont"
headerClass="sortableHeader rightBorder alignCenter"
- columnClasses="tenPercentColumn rightBorder alignLeft,
- twentyPercentColumn rightBorder alignLeft,
- twentyPercentColumn rightBorder alignLeft,
- twentyPercentColumn rightBorder alignLeft,
- twentyPercentColumn rightBorder alignLeft,
- defaultColumn rightBorder alignLeft,
- tenPercentColumn rightBorder alignCenter"
+ columnClasses="defaultColumn rightBorder alignLeft,
+ fifteenPercentColumn rightBorder alignLeft,
+ fifteenPercentColumn rightBorder alignLeft,
+ fifteenPercentColumn rightBorder alignLeft,
+ fifteenPercentColumn rightBorder alignLeft,
+ fifteenPercentColumn rightBorder alignLeft"
rowClasses="rowOdd,rowEven"
cellpadding="0" cellspacing="0"
border="0">
@@ -149,15 +152,30 @@
<h:outputText
value="#{messages['lacewiki.label.userList.Username']}"/>
</h:commandLink>
</f:facet>
- <s:fragment rendered="#{u.admin or u.guest}">
- <h:outputText value="#{u.username}"/>
- </s:fragment>
- <s:fragment rendered="#{not u.admin and not u.guest}">
- <h:outputLink
value="#{wikiURLRenderer.renderUserInfoURL(u)}">
+
+ <div class="contextMenu">
+ <h:outputLink value="javascript://no-op">
<h:outputText value="#{u.username}"/>
</h:outputLink>
<h:outputText rendered="#{!u.activated}"
value=" (#{messages['lacewiki.label.userList.NotActivated']})"/>
- </s:fragment>
+ <ul>
+ <li>
+ <h:outputLink
value="#{wikiURLRenderer.renderUserInfoURL(u)}">
+ <h:outputText
value="#{messages['lacewiki.label.userList.View']}"/>
+ </h:outputLink>
+ </li>
+
+ <s:fragment rendered="#{s:hasPermission('User',
'isAdmin', currentUser)}">
+ <li>
+ <s:link view="/userHome_#{skin}.xhtml"
propagation="none">
+ <f:param name="userId"
value="#{u.id}"/>
+ <h:outputText
value="#{messages['lacewiki.label.userList.Edit']}"/>
+ </s:link>
+ </li>
+ </s:fragment>
+ </ul>
+ </div>
+
</h:column>
<h:column>
@@ -230,13 +248,6 @@
<h:outputText value="-" rendered="#{empty
u.lastLoginOn}"/>
</h:column>
- <h:column rendered="#{s:hasPermission('User',
'isAdmin', currentUser)}">
- <s:link styleClass="buttonNonpersistent"
view="/userHome_#{skin}.xhtml" propagation="none">
- <f:param name="userId" value="#{u.id}"/>
- <h:outputText styleClass="buttonLabel"
value="#{messages['lacewiki.button.userList.Edit']}"/>
- </s:link>
- </h:column>
-
</h:dataTable>
</h:form>