Author: glandais Date: 2008-01-03 11:12:58 +0000 (Thu, 03 Jan 2008) New Revision: 93 Added: trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/components/TreeGrid.java trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/components/beans/ trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/components/beans/RenderableNode.java trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/components/beans/TreeNode.java trunk/simexplorer-is-web/src/ressources/fr/cemagref/simexplorer/is/ui/web/components/css/ trunk/simexplorer-is-web/src/ressources/fr/cemagref/simexplorer/is/ui/web/components/css/Layout.css trunk/simexplorer-is-web/src/ressources/fr/cemagref/simexplorer/is/ui/web/components/css/TreeGrid.css trunk/simexplorer-is-web/src/ressources/fr/cemagref/simexplorer/is/ui/web/components/images/ trunk/simexplorer-is-web/src/ressources/fr/cemagref/simexplorer/is/ui/web/components/images/file.gif trunk/simexplorer-is-web/src/ressources/fr/cemagref/simexplorer/is/ui/web/components/images/folder-closed.gif trunk/simexplorer-is-web/src/ressources/fr/cemagref/simexplorer/is/ui/web/components/images/folder-open.gif trunk/simexplorer-is-web/src/ressources/fr/cemagref/simexplorer/is/ui/web/components/js/ trunk/simexplorer-is-web/src/ressources/fr/cemagref/simexplorer/is/ui/web/components/js/TreeGrid.js trunk/simexplorer-is-web/src/webcontent/WEB-INF/lib/jbossall-client.jar Removed: trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/beans/TreeNode.java trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/dwr/ trunk/simexplorer-is-web/src/webcontent/css/ trunk/simexplorer-is-web/src/webcontent/images/lutin.gif trunk/simexplorer-is-web/src/webcontent/images/tree/ Modified: trunk/simexplorer-is-web/.classpath trunk/simexplorer-is-web/.settings/org.eclipse.wst.common.component trunk/simexplorer-is-web/pom.xml trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/components/Layout.java trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/grid/ApplicationDataSource.java trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ApplicationDetail.java trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ApplicationList.java trunk/simexplorer-is-web/src/ressources/fr/cemagref/simexplorer/is/ui/web/components/Layout.tml trunk/simexplorer-is-web/src/webcontent/ApplicationDetail.tml Log: TreeGrid component Date sort Layout as component Modified: trunk/simexplorer-is-web/.classpath =================================================================== --- trunk/simexplorer-is-web/.classpath 2008-01-03 11:10:57 UTC (rev 92) +++ trunk/simexplorer-is-web/.classpath 2008-01-03 11:12:58 UTC (rev 93) @@ -1,14 +1,14 @@ <?xml version="1.0" encoding="UTF-8"?> <classpath> + <classpathentry kind="src" path="src/java"/> <classpathentry kind="src" path="target/gen/java"/> <classpathentry kind="src" path="src/ressources"/> - <classpathentry kind="src" path="src/java"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> - <classpathentry combineaccessrules="false" kind="src" path="/simexplorer-is-storage"/> <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"> <attributes> <attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/> </attributes> </classpathentry> + <classpathentry combineaccessrules="false" kind="src" path="/simexplorer-is-storage"/> <classpathentry kind="output" path="target/classes"/> </classpath> Modified: trunk/simexplorer-is-web/.settings/org.eclipse.wst.common.component =================================================================== --- trunk/simexplorer-is-web/.settings/org.eclipse.wst.common.component 2008-01-03 11:10:57 UTC (rev 92) +++ trunk/simexplorer-is-web/.settings/org.eclipse.wst.common.component 2008-01-03 11:12:58 UTC (rev 93) @@ -2,9 +2,9 @@ <project-modules id="moduleCoreId" project-version="1.5.0"> <wb-module deploy-name="simexplorer-is-web"> <wb-resource deploy-path="/" source-path="/src/webcontent"/> - <wb-resource deploy-path="/WEB-INF/classes" source-path="/target/gen/java"/> <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/java"/> <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/ressources"/> + <wb-resource deploy-path="/WEB-INF/classes" source-path="/target/gen/java"/> <dependent-module deploy-path="/WEB-INF/lib" handle="module:/resource/simexplorer-is-storage/simexplorer-is-storage"> <dependency-type>uses</dependency-type> </dependent-module> Modified: trunk/simexplorer-is-web/pom.xml =================================================================== --- trunk/simexplorer-is-web/pom.xml 2008-01-03 11:10:57 UTC (rev 92) +++ trunk/simexplorer-is-web/pom.xml 2008-01-03 11:12:58 UTC (rev 93) @@ -139,7 +139,7 @@ <dependency> <groupId>org.apache.tapestry</groupId> <artifactId>tapestry-upload</artifactId> - <version>5.0.6</version> + <version>5.0.7</version> </dependency> <dependency> <groupId>javax.servlet</groupId> Deleted: trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/beans/TreeNode.java =================================================================== --- trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/beans/TreeNode.java 2008-01-03 11:10:57 UTC (rev 92) +++ trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/beans/TreeNode.java 2008-01-03 11:12:58 UTC (rev 93) @@ -1,33 +0,0 @@ -package fr.cemagref.simexplorer.is.ui.web.beans; - -public class TreeNode { - - private long id; - private String libelle; - private TreeNode[] enfants; - - public long getId() { - return id; - } - - public void setId(long id) { - this.id = id; - } - - public String getLibelle() { - return libelle; - } - - public void setLibelle(String libelle) { - this.libelle = libelle; - } - - public TreeNode[] getEnfants() { - return enfants; - } - - public void setEnfants(TreeNode[] enfants) { - this.enfants = enfants; - } - -} Modified: trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/components/Layout.java =================================================================== --- trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/components/Layout.java 2008-01-03 11:10:57 UTC (rev 92) +++ trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/components/Layout.java 2008-01-03 11:12:58 UTC (rev 93) @@ -21,6 +21,7 @@ import java.util.Locale; import org.apache.tapestry.Asset; +import org.apache.tapestry.annotations.IncludeStylesheet; import org.apache.tapestry.annotations.InjectPage; import org.apache.tapestry.annotations.Parameter; import org.apache.tapestry.annotations.Path; @@ -38,6 +39,7 @@ * * Last update : $Date: 2007/05/14 07:56:43 $ By : $Author: E023931M $ */ + at IncludeStylesheet("css/Layout.css") public class Layout { /* linked state "UserList" */ @@ -50,22 +52,10 @@ @Parameter("defaulttitle") private String title; - @Inject - @Path("context:css/general.css") - private Asset _stylesheetGeneral; - - @Inject - @Path("context:css/layout.css") - private Asset _stylesheetLayout; - - @Inject - @Path("context:css/dftree.css") - private Asset stylesheetTree; - public Layout() { super(); } - + /** * @return the title */ @@ -80,20 +70,6 @@ title = ""; } - /** - * @return the _stylesheetGeneral - */ - public Asset getStylesheetGeneral() { - return _stylesheetGeneral; - } - - /** - * @return the _stylesheetLayout - */ - public Asset getStylesheetLayout() { - return _stylesheetLayout; - } - @Inject @Service("PersistentLocale") private PersistentLocale persistentLocale; @@ -115,9 +91,5 @@ public boolean getAdministrator() { return true; } - - public Asset getStylesheetTree() { - return stylesheetTree; - } - + } Added: trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/components/TreeGrid.java =================================================================== --- trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/components/TreeGrid.java (rev 0) +++ trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/components/TreeGrid.java 2008-01-03 11:12:58 UTC (rev 93) @@ -0,0 +1,147 @@ +package fr.cemagref.simexplorer.is.ui.web.components; + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + +import org.apache.tapestry.MarkupWriter; +import org.apache.tapestry.annotations.Environmental; +import org.apache.tapestry.annotations.IncludeJavaScriptLibrary; +import org.apache.tapestry.annotations.IncludeStylesheet; +import org.apache.tapestry.annotations.Parameter; +import org.apache.tapestry.annotations.SupportsInformalParameters; +import org.apache.tapestry.services.Heartbeat; + +import fr.cemagref.simexplorer.is.ui.web.components.beans.RenderableNode; +import fr.cemagref.simexplorer.is.ui.web.components.beans.TreeNode; + + at SupportsInformalParameters + at IncludeStylesheet("css/TreeGrid.css") + at IncludeJavaScriptLibrary("js/TreeGrid.js") +public class TreeGrid { + + private List<RenderableNode> list; + + /** + * Iterator to iterate over all tree elements + */ + private Iterator<RenderableNode> iterator; + + /** + * Defines the source Tree to walk over. + */ + @Parameter(required = true) + private List<TreeNode> source; + + @Parameter(required = true) + private List<String> columnHeaders; + + /** + * Current node of the tree + */ + private RenderableNode currentNode; + + @Environmental + private Heartbeat heartbeat; + + private void buildSourceList(TreeNode treeNode, int depth, String dotId) { + list.add(new RenderableNode(treeNode, depth, dotId)); + TreeNode[] children = (TreeNode[]) treeNode.getChildren(); + for (int i = 0; i < children.length; i++) { + if (!list.contains(children[i])) { + buildSourceList(children[i], depth + 1, dotId + "-" + i); + } + } + } + + boolean setupRender(MarkupWriter writer) { + if (source == null) + return false; + + list = new ArrayList<RenderableNode>(); + int i = 0; + for (TreeNode node : source) { + buildSourceList(node, 0, Integer.toString(i)); + i++; + } + iterator = list.iterator(); + + // begin table + writer.element("table", "width", "100%"); + + // header row + writer.element("tr"); + if (columnHeaders != null) { + int col = 0; + for (String column : columnHeaders) { + /* + if (col == 0) { + writer.element("th", "width", "20%"); + } else { + writer.element("th"); + } + */ + writer.element("th"); + writer.writeRaw(column); + writer.end(); + col++; + } + } + writer.end(); + + return (iterator.hasNext()); + } + + /** Begins a new heartbeat. */ + void beginRender() { + currentNode = iterator.next(); + heartbeat.begin(); + } + + void beforeRenderBody(MarkupWriter writer) { + String[] columns = currentNode.getInnerNode().getColumns(); + + writer.element("tr", "id", currentNode.getDotId(), "class", "a"); + + writer.element("td"); + writer.element("div", "class", "tier" + currentNode.getDepth()); + if (currentNode.getInnerNode().getType() == TreeNode.TYPE_FOLDER) { + writer.element("a", "href", "#", "class", "folderopen", "onclick", + "toggleRows(this)"); + } else { + writer.element("a", "href", "#", "class", "doc"); + } + // a + writer.end(); + + if (columns.length > 0) { + writer.writeRaw(columns[0]); + } + // div + writer.end(); + // td + writer.end(); + + for (int i = 1; i < columns.length; i++) { + writer.element("td"); + writer.writeRaw(columns[i]); + // td + writer.end(); + } + + // tr + writer.end(); + } + + /** Ends the current heartbeat. */ + boolean afterRender() { + heartbeat.end(); + return (!iterator.hasNext()); + } + + void cleanupRender(MarkupWriter writer) { + // end table + writer.end(); + } + +} Added: trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/components/beans/RenderableNode.java =================================================================== --- trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/components/beans/RenderableNode.java (rev 0) +++ trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/components/beans/RenderableNode.java 2008-01-03 11:12:58 UTC (rev 93) @@ -0,0 +1,28 @@ +package fr.cemagref.simexplorer.is.ui.web.components.beans; + +public class RenderableNode { + + private TreeNode innerNode; + private String dotId; + private int depth; + + public RenderableNode(TreeNode innerNode, int depth, String dotId) { + super(); + this.innerNode = innerNode; + this.dotId = dotId; + this.depth = depth; + } + + public TreeNode getInnerNode() { + return innerNode; + } + + public String getDotId() { + return dotId; + } + + public int getDepth() { + return depth; + } + +} Added: trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/components/beans/TreeNode.java =================================================================== --- trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/components/beans/TreeNode.java (rev 0) +++ trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/components/beans/TreeNode.java 2008-01-03 11:12:58 UTC (rev 93) @@ -0,0 +1,45 @@ +package fr.cemagref.simexplorer.is.ui.web.components.beans; + +public class TreeNode { + + public static final int TYPE_DOCUMENT = 0; + public static final int TYPE_FOLDER = 1; + + private TreeNode[] children; + private String[] columns; + private long identifier; + private int type; + + public TreeNode[] getChildren() { + return children; + } + + public void setChildren(TreeNode[] children) { + this.children = children; + } + + public String[] getColumns() { + return columns; + } + + public void setColumns(String[] columns) { + this.columns = columns; + } + + public long getIdentifier() { + return identifier; + } + + public void setIdentifier(long identifier) { + this.identifier = identifier; + } + + public int getType() { + return type; + } + + public void setType(int type) { + this.type = type; + } + +} Modified: trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/grid/ApplicationDataSource.java =================================================================== --- trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/grid/ApplicationDataSource.java 2008-01-03 11:10:57 UTC (rev 92) +++ trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/grid/ApplicationDataSource.java 2008-01-03 11:12:58 UTC (rev 93) @@ -1,10 +1,7 @@ package fr.cemagref.simexplorer.is.ui.web.grid; -import java.util.List; - import javax.naming.NamingException; -import org.apache.tapestry.beaneditor.BeanModel; import org.apache.tapestry.beaneditor.PropertyModel; import org.apache.tapestry.grid.GridDataSource; @@ -62,12 +59,25 @@ boolean ascending) { try { this.indexStart = startIndex; + + int dateOrder = 0; + if (sortModel != null + && "creationDate".equals(sortModel.getPropertyName())) { + if (ascending) { + dateOrder = 1; + } else { + dateOrder = -1; + } + } + if (query.isEmpty()) { - entities = StorageServiceFactory.getService().findApplications( - false, startIndex, 1 + endIndex - startIndex); + entities = StorageServiceFactory.getService() + .findApplications(false, startIndex, + 1 + endIndex - startIndex, dateOrder); } else { entities = StorageServiceFactory.getService().findFullText( - query, false, startIndex, 1 + endIndex - startIndex); + query, false, startIndex, 1 + endIndex - startIndex, + dateOrder); } } catch (Exception e) { // TODO Auto-generated catch block Modified: trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ApplicationDetail.java =================================================================== --- trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ApplicationDetail.java 2008-01-03 11:10:57 UTC (rev 92) +++ trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ApplicationDetail.java 2008-01-03 11:12:58 UTC (rev 93) @@ -1,10 +1,13 @@ package fr.cemagref.simexplorer.is.ui.web.pages; -import org.apache.tapestry.annotations.Component; +import java.util.ArrayList; +import java.util.List; +import java.util.Random; + import org.apache.tapestry.annotations.Persist; import fr.cemagref.simexplorer.is.storage.entities.metadata.MetaDataEntity; -import fr.cemagref.simexplorer.is.ui.web.components.Layout; +import fr.cemagref.simexplorer.is.ui.web.components.beans.TreeNode; import fr.cemagref.simexplorer.is.ui.web.services.StorageServiceFactory; public class ApplicationDetail extends AbstractApplicationDetail { @@ -29,4 +32,51 @@ return explorationApplication.getDescription(); } + private Random r = new Random(); + + private TreeNode generateNode(TreeNode parent, int level) { + TreeNode node = new TreeNode(); + node.setIdentifier(r.nextLong()); + + if (level > 1 && (r.nextBoolean() || level == 4)) { + node.setType(TreeNode.TYPE_DOCUMENT); + node.setChildren(new TreeNode[0]); + } else { + int c = 3 + r.nextInt(5); + TreeNode[] children = new TreeNode[c]; + for (int i = 0; i < children.length; i++) { + children[i] = generateNode(node, level + 1); + } + node.setType(TreeNode.TYPE_FOLDER); + node.setChildren(children); + } + + String[] columns = new String[3]; + for (int i = 0; i < columns.length; i++) { + columns[i] = Long.toHexString(r.nextLong()); + if (r.nextBoolean()) { + columns[i] = "<b>" + columns[i] + "</b>"; + } + } + node.setColumns(columns); + + return node; + } + + public List<TreeNode> getNodes() { + List<TreeNode> nodes = new ArrayList<TreeNode>(); + nodes.add(generateNode(null, 0)); + nodes.add(generateNode(null, 0)); + nodes.add(generateNode(null, 0)); + return nodes; + } + + public List<String> getHeaders() { + List<String> result = new ArrayList<String>(); + result.add(""); + result.add(""); + result.add(""); + return result; + } + } Modified: trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ApplicationList.java =================================================================== --- trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ApplicationList.java 2008-01-03 11:10:57 UTC (rev 92) +++ trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ApplicationList.java 2008-01-03 11:12:58 UTC (rev 93) @@ -33,7 +33,9 @@ model = beanModelSource.create(MetaData.class, true, resources); List<String> properties = model.getPropertyNames(); for (String property : properties) { - model.get(property).sortable(false); + if (!"creationDate".equals(property)) { + model.get(property).sortable(false); + } } } Modified: trunk/simexplorer-is-web/src/ressources/fr/cemagref/simexplorer/is/ui/web/components/Layout.tml =================================================================== --- trunk/simexplorer-is-web/src/ressources/fr/cemagref/simexplorer/is/ui/web/components/Layout.tml 2008-01-03 11:10:57 UTC (rev 92) +++ trunk/simexplorer-is-web/src/ressources/fr/cemagref/simexplorer/is/ui/web/components/Layout.tml 2008-01-03 11:12:58 UTC (rev 93) @@ -1,10 +1,6 @@ <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd"> <head> <title>${title}</title> - <link rel="stylesheet" type="text/css" href="${prop:stylesheetGeneral}" /> - <link rel="stylesheet" type="text/css" href="${prop:stylesheetLayout}" /> - <link rel="stylesheet" type="text/css" href="${prop:stylesheetTree}" /> - </head> <body> @@ -52,11 +48,11 @@ </div> <div id="Content"> - <!-- main template here --> + <!-- main template here --> <t:body/> </div> <div id="FooterAdd">${message:abstractpage-copyright} - </div> + </div> </body> </html> \ No newline at end of file Added: trunk/simexplorer-is-web/src/ressources/fr/cemagref/simexplorer/is/ui/web/components/css/Layout.css =================================================================== --- trunk/simexplorer-is-web/src/ressources/fr/cemagref/simexplorer/is/ui/web/components/css/Layout.css (rev 0) +++ trunk/simexplorer-is-web/src/ressources/fr/cemagref/simexplorer/is/ui/web/components/css/Layout.css 2008-01-03 11:12:58 UTC (rev 93) @@ -0,0 +1,542 @@ +/***************************** Mise en forme g?n?rale ************************/ +h1.Title { + margin: 0px 0px 0px 0px; + padding: 0px; + font-size: 28px; + line-height: 28px; + font-weight: bold; + font-family: verdana, arial, helvetica, sans-serif; + color: #09c; +} + +h1.tab { + margin: 0px 0px 10px 0px; + padding: 5px; + font-size: 20px; + line-height: 28px; + font-weight: bold; + font-family: verdana, arial, helvetica, sans-serif; + color: #09c; + text-align: center; + border: 1px solid black; + -moz-border-radius: 10px; +} + +h2.Title { + margin: 0px 0px 10px 0px; + padding: 0px; + font-weight: bold; + color: #09c; + font-size: 18px; + font-family: verdana, arial, helvetica, sans-serif; +} + +hr.Ligne { + margin-bottom: 10px; +} + +.Container { + width: 100%; +} + +.Clear { + clear: both; +} + +.NoWrap { + font-size: 14px; + font-family: verdana, arial, helvetica, sans-serif; + white-space: nowrap; +} + +.MonoSpace { + font-size: 14px; + font-family: monospace; +} + +acronym.Acronym { + border: none; +} + +acronym.Acronym:hover { + cursor: help; +} + +/******************************** Les liens *****************************/ +a.Link { + color: black; + text-decoration: none; + font-size: 14px; + font-family: verdana, arial, helvetica, sans-serif; + vertical-align: middle; +} + +a.Link:link { + color: black; +} + +a.Link:visited { + color: black; +} + +a.Link:hover { + background-color: transparent; + text-decoration: underline; +} + +/******************************* Infos bulles ********************************/ +a.InfoBulle { + position: relative; + z-index: 24; + text-decoration: none; + cursor: help; + font-size: 14px; + font-family: verdana, arial, helvetica, sans-serif; +} + +a.InfoBulle:hover { + z-index: 25; +} + +a.InfoBulle:hover span.Info { + text-decoration: underline; +} + +a.InfoBulle span.Bulle { + display: none; + border: 1px solid black; +} + +a.InfoBulle:hover span.Bulle { + text-decoration: none; + display: block; + position: absolute; + top: 2em; + left: 2em; + width: 15em; + background-color: #deecf1; + text-align: center; +} + +/******************************* Block ****************************************/ +.Block { + position: relative; + z-index: 24; + text-decoration: none; + font-size: small; + font-family: verdana, arial, helvetica, sans-serif; +} + +.BlockHide { + display: none; +} + +.BlockShow { + border: 1px solid black; + display: block; + position: absolute; + z-index: 25; + top: 2em; + left: 2em; + padding: 5px; + background-color: #deecf1; +} + +/******************************* Menu ****************************************/ +h1.tab:hover { + background-color: #deecf1; + cursor: pointer; +} + +menu.Menu { + +} + +menu.Menu>li { + margin: 0px; + padding: 0px; + list-style-type: disc; + color: black; + font-size: 12px; + font-family: verdana, arial, helvetica, sans-serif; +} + +menu.Menu>li>a.Link { + font-size: 12px; + font-family: verdana, arial, helvetica, sans-serif; +} + +.Hide { + display: none; +} + +.Show { + +} + +/******************************* Pr?sentation des donn?es ******************/ +fieldset.Fieldset { + margin: -10px 0px 20px 0px; + padding: 10px; + font-weight: bold; + border-color: #09c; + -moz-border-radius: 10px; +} + +fieldset.Fieldset>legend,fieldset.Fieldset>legend>a { + font-size: 18px; + font-weight: normal; + font-family: verdana, arial, helvetica, sans-serif; + color: #09c; + text-decoration: none; +} + +fieldset.Fieldset>legend>a:link { + +} + +fieldset.Fieldset>legend>a:hover { + text-decoration: underline; +} + +fieldset.Fieldset>legend>a.Actif { + text-decoration: underline; +} + +.FloatLeft,.FloatRight { + float: left; + width: 50%; + margin: 0; + padding: 0; +} + +.FloatRightRight { + float: left; + width: 50%; + margin: 0; + padding: 0; + text-align: right; +} + +.Group { + margin-bottom: 10px; + font-size: 14px; + font-family: verdana, arial, helvetica, sans-serif; +} + +.SmallText { + color: black; + font-size: 10px; + font-family: verdana, arial, helvetica, sans-serif; +} + +.MediumText { + color: black; + font-size: 12px; + font-family: verdana, arial, helvetica, sans-serif; +} + +.Normal { + color: black; + font-weight: normal; + font-size: 14px; + font-family: verdana, arial, helvetica, sans-serif; +} + +.Text { + color: black; + font-weight: bold; + font-size: 14px; + font-family: verdana, arial, helvetica, sans-serif; +} + +.Center { + text-align: center; +} + +.Large { + border-collapse: collapse; + font-size: 14px; + width: 100%; +} + +.Medium { + border-collapse: collapse; + font-size: 14px; + width: 90%; +} + +.Small { + border-collapse: collapse; + font-size: 14px; + width: 60%; +} + +.Green { + color: green; +} + +.Red { + color: red; +} + +/**************************** Tableau *************************************/ +table.Small td,table.Large td,table.Medium td { + border: 1px solid; + border-color: #09c; + padding: 5px; +} + +tr.Click:hover,td.Click:hover { + background-color: #deecf1; + cursor: pointer; +} + +table.Small td.Angle,table.Medium td.Angle,table.Large td.Angle { + border-left: none; + border-top: none; +} + +td.Colomun { + background-color: #eee; + font-weight: bold; + text-align: left; +} + +tr.First { /* Ent?te du tableau */ + font-weight: bold; + background-color: #eee; + text-align: center; +} + +td.Actions { + text-align: center; +} + +td.Number { + text-align: right; +} + +td.LargeCase { + height: 75px; + vertical-align: top; +} + +td.LargeCaseSelect { + height: 75px; + vertical-align: top; + background-color: #deecf1; +} + +/******************************** Formulaires ********************************/ +.FormActions { + display: block; + text-align: right; + margin-bottom: 10px; +} + +.Form { + display: inline; + text-align: left; +} + +.FormActions input[type="password"],.FormActions input[type="radio"],.FormActions input[type="button"],.FormActions input[type="text"],.FormActions input[type="submit"],.FormActions textarea,.FormActions select,.Form input[type="password"],.Form input[type="radio"],.Form input[type="button"],.Form input[type="text"],.Form input[type="submit"],.Form textarea,.Form select,.Form button,.FormActions button,button + { + border: 1px solid black; + padding: 2px; + margin: 0px; + font: 12px verdana, arial, helvetica, sans-serif; + display: inline; +} + +.FormActions textarea.MonoSpace,.Form textarea.MonoSpace { + font-family: monospace; +} + +.FormLeft { + float: left; + width: 40%; + margin: 0; + padding: 0; + text-align: right; +} + +.FormRight { + float: left; + width: 60%; + margin: 0; + padding: 0; +} + +.FormLeft div.Normal,.FormRight div.Normal { + margin-bottom: 10px; +} + +.FormLeft div.Text,.FormRight div.Text { + margin: 0px; + margin-bottom: 8px; + margin-right: 5px; + padding: 3px; +} + +.Float { + float: left; + margin: 0; + margin-right: 5px; + padding: 0; +} + +/* Layout */ +body { /* background-image: url("../images/lutin.gif"); */ + background-repeat: no-repeat; + background-position: right top; + margin: 0px; + padding: 0px; + font-family: verdana, arial, helvetica, sans-serif; + color: #333; + background-color: white; +} + +#beforeheader { + display: table-row; + background-color: red; + margin: 0px 0px 15px 0px; + width: 100%; +} + +#Title { + display: table-cell; + font-size: 28px; + line-height: 28px; + font-weight: bold; + font-family: verdana, arial, helvetica, sans-serif; + color: #09c; + margin: 0px 0px 15px 0px; + padding: 5px 0px 0px 5px; +} + +#Google-AdSense { + display: table-cell; + width: 100%; + height: 60px; + text-align: right; + vertical-align: middle; +} + +#Header { + font-size: 12px; + margin: 10px 0px 10px 0px; + padding: 3px 5px 3px 5px; + border-style: solid; + border-color: black; + border-width: 1px 0px; + line-height: 11px; + background-color: #eee; + height: 14px; +} + +.Left { + float: left; + width: 40%; + margin: 0; + padding: 0; + text-align: left; +} + +.Right { + float: left; + width: 60%; + margin: 0; + padding: 0; + text-align: right; +} + +#Content { + margin: 0px 50px 50px 300px; + padding: 0px; + min-height: 455px; +} + +#Menu { + position: absolute; + top: 80px; + left: 10px; + padding: 10px 10px 0px 10px; + background-color: #eee; + border: 1px solid black; + -moz-border-radius: 10px; + line-height: 17px; + width: 250px; + z-index: 1; +} + +#Footer { + font-size: 12px; + position: relative; + text-align: right; + width: 100%; + margin: 10px 0px 0px 0px; + padding: 3px 0px 3px 0px; + border-style: solid; + border-color: black; + border-width: 1px 0px; + line-height: 11px; + background-color: #eee; + height: 14px; +} + +#FooterAdd { + font-size: 12px; + text-align: center; +} + +#AddressBar { + font-size: x-small; + margin-bottom: 7px; +} + +#AddressBar a.Link { + font-size: small; +} + +.Message { + font-size: 14px; + font-weight: bold; + font-family: verdana, arial, helvetica, sans-serif; + border: 1px solid black; + background-color: #deecf1; + padding: 5px; + margin-bottom: 5px; +} + +.Error { + font-size: 14px; + font-weight: bold; + font-family: verdana, arial, helvetica, sans-serif; + border: 1px solid black; + background-color: #ffecf1; + padding: 5px; + margin-bottom: 5px; +} + +.FieldError { + font-size: 14px; + font-weight: bold; + font-family: verdana, arial, helvetica, sans-serif; + border: 1px solid black; + background-color: #ffecf1; + padding: 5px; + margin-bottom: 5px; +} + +#FieldErrorExplication { + font-weight: normal; +} + +img.Img { + border-width: 0px; + border-style: none; + vertical-align: middle; + padding: 0px; + margin: 0px; +} \ No newline at end of file Added: trunk/simexplorer-is-web/src/ressources/fr/cemagref/simexplorer/is/ui/web/components/css/TreeGrid.css =================================================================== --- trunk/simexplorer-is-web/src/ressources/fr/cemagref/simexplorer/is/ui/web/components/css/TreeGrid.css (rev 0) +++ trunk/simexplorer-is-web/src/ressources/fr/cemagref/simexplorer/is/ui/web/components/css/TreeGrid.css 2008-01-03 11:12:58 UTC (rev 93) @@ -0,0 +1,67 @@ +.folderclose { + background: transparent url(../images/folder-closed.gif) + no-repeat scroll 0%; + float: left; + height: 14px; + padding-right: 3px; + width: 26px; +} + +.folderopen { + background: transparent url(../images/folder-open.gif) + no-repeat scroll 0%; + float: left; + height: 14px; + padding-right: 3px; + width: 26px; +} + +.doc { + background: transparent url(../images/file.gif) no-repeat + scroll 0%; + float: left; + height: 14px; + margin-left: 20px; + padding-right: 3px; + width: 12px; +} + +.tier0 { + margin-left: 0pt; +} + +.tier1 { + margin-left: 1.5em; +} + +.tier2 { + margin-left: 3em; +} + +.tier3 { + margin-left: 4.5em; +} + +.tier4 { + margin-left: 6em; +} + +.tier5 { + margin-left: 7.5em; +} + +.tier6 { + margin-left: 9em; +} + +.tier7 { + margin-left: 10.5em; +} + +.tier8 { + margin-left: 12em; +} + +.tier9 { + margin-left: 13.5em; +} \ No newline at end of file Added: trunk/simexplorer-is-web/src/ressources/fr/cemagref/simexplorer/is/ui/web/components/images/file.gif =================================================================== (Binary files differ) Property changes on: trunk/simexplorer-is-web/src/ressources/fr/cemagref/simexplorer/is/ui/web/components/images/file.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/simexplorer-is-web/src/ressources/fr/cemagref/simexplorer/is/ui/web/components/images/folder-closed.gif =================================================================== (Binary files differ) Property changes on: trunk/simexplorer-is-web/src/ressources/fr/cemagref/simexplorer/is/ui/web/components/images/folder-closed.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/simexplorer-is-web/src/ressources/fr/cemagref/simexplorer/is/ui/web/components/images/folder-open.gif =================================================================== (Binary files differ) Property changes on: trunk/simexplorer-is-web/src/ressources/fr/cemagref/simexplorer/is/ui/web/components/images/folder-open.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/simexplorer-is-web/src/ressources/fr/cemagref/simexplorer/is/ui/web/components/js/TreeGrid.js =================================================================== --- trunk/simexplorer-is-web/src/ressources/fr/cemagref/simexplorer/is/ui/web/components/js/TreeGrid.js (rev 0) +++ trunk/simexplorer-is-web/src/ressources/fr/cemagref/simexplorer/is/ui/web/components/js/TreeGrid.js 2008-01-03 11:12:58 UTC (rev 93) @@ -0,0 +1,52 @@ +function toggleRows(elm) { + var rows = document.getElementsByTagName("TR"); + elm.className = "folderclose"; + var newDisplay = "none"; + var thisID = elm.parentNode.parentNode.parentNode.id + "-"; + // Are we expanding or contracting? If the first child is hidden, we expand + for (var i = 0; i < rows.length; i++) { + var r = rows[i]; + if (matchStart(r.id, thisID, true)) { + if (r.style.display == "none") { + if (document.all) newDisplay = "block"; //IE4+ specific code + else newDisplay = "table-row"; //Netscape and Mozilla + elm.className = "folderopen"; + } + break; + } + } + + // When expanding, only expand one level. Collapse all desendants. + var matchDirectChildrenOnly = (newDisplay != "none"); + + for (var j = 0; j < rows.length; j++) { + var s = rows[j]; + if (matchStart(s.id, thisID, matchDirectChildrenOnly)) { + s.style.display = newDisplay; + var cell = s.getElementsByTagName("TD")[0]; + var tier = cell.getElementsByTagName("DIV")[0]; + var folder = tier.getElementsByTagName("A")[0]; + if (folder.getAttribute("onclick") != null) { + folder.className = "folderclose"; + } + } + } +} + +function matchStart(target, pattern, matchDirectChildrenOnly) { + var pos = target.indexOf(pattern); + if (pos != 0) return false; + if (!matchDirectChildrenOnly) return true; + if (target.slice(pos + pattern.length, target.length).indexOf("-") >= 0) return false; + return true; +} + +function collapseAllRows() { + var rows = document.getElementsByTagName("TR"); + for (var j = 0; j < rows.length; j++) { + var r = rows[j]; + if (r.id.indexOf("-") >= 0) { + r.style.display = "none"; + } + } +} Modified: trunk/simexplorer-is-web/src/webcontent/ApplicationDetail.tml =================================================================== --- trunk/simexplorer-is-web/src/webcontent/ApplicationDetail.tml 2008-01-03 11:10:57 UTC (rev 92) +++ trunk/simexplorer-is-web/src/webcontent/ApplicationDetail.tml 2008-01-03 11:12:58 UTC (rev 93) @@ -1,6 +1,7 @@ <t:layout xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd" title="message:windowtitle"> - <strong>${message}</strong> + <t:TreeGrid source="nodes" columnHeaders="headers"> + </t:TreeGrid> </t:layout> Added: trunk/simexplorer-is-web/src/webcontent/WEB-INF/lib/jbossall-client.jar =================================================================== (Binary files differ) Property changes on: trunk/simexplorer-is-web/src/webcontent/WEB-INF/lib/jbossall-client.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Deleted: trunk/simexplorer-is-web/src/webcontent/images/lutin.gif =================================================================== (Binary files differ)