r84 - in trunk/simexplorer-is-web: . src src/webcontent src/webcontent/META-INF src/webcontent/WEB-INF src/webcontent/css src/webcontent/images src/webcontent/images/tree src/webcontent/js src/xmi
Author: glandais Date: 2007-12-24 11:57:20 +0000 (Mon, 24 Dec 2007) New Revision: 84 Added: trunk/simexplorer-is-web/src/webcontent/ApplicationDetail.tml trunk/simexplorer-is-web/src/webcontent/ApplicationExport.tml trunk/simexplorer-is-web/src/webcontent/ApplicationImport.tml trunk/simexplorer-is-web/src/webcontent/ApplicationList.tml trunk/simexplorer-is-web/src/webcontent/GroupEdit.tml trunk/simexplorer-is-web/src/webcontent/GroupList.tml trunk/simexplorer-is-web/src/webcontent/Layout.tml trunk/simexplorer-is-web/src/webcontent/UserEdit.tml trunk/simexplorer-is-web/src/webcontent/UserList.tml trunk/simexplorer-is-web/src/webcontent/css/ trunk/simexplorer-is-web/src/webcontent/css/dftree.css trunk/simexplorer-is-web/src/webcontent/css/general.css trunk/simexplorer-is-web/src/webcontent/css/layout.css trunk/simexplorer-is-web/src/webcontent/images/ trunk/simexplorer-is-web/src/webcontent/images/lutin.gif trunk/simexplorer-is-web/src/webcontent/images/tree/ trunk/simexplorer-is-web/src/webcontent/images/tree/foldertree_base.gif trunk/simexplorer-is-web/src/webcontent/images/tree/foldertree_cd.gif trunk/simexplorer-is-web/src/webcontent/images/tree/foldertree_empty.gif trunk/simexplorer-is-web/src/webcontent/images/tree/foldertree_felamimail_sm.png trunk/simexplorer-is-web/src/webcontent/images/tree/foldertree_folder.gif trunk/simexplorer-is-web/src/webcontent/images/tree/foldertree_folderopen.gif trunk/simexplorer-is-web/src/webcontent/images/tree/foldertree_globe.gif trunk/simexplorer-is-web/src/webcontent/images/tree/foldertree_imgfolder.gif trunk/simexplorer-is-web/src/webcontent/images/tree/foldertree_join.gif trunk/simexplorer-is-web/src/webcontent/images/tree/foldertree_joinbottom.gif trunk/simexplorer-is-web/src/webcontent/images/tree/foldertree_line.gif trunk/simexplorer-is-web/src/webcontent/images/tree/foldertree_minus.gif trunk/simexplorer-is-web/src/webcontent/images/tree/foldertree_minusbottom.gif trunk/simexplorer-is-web/src/webcontent/images/tree/foldertree_musicfolder.gif trunk/simexplorer-is-web/src/webcontent/images/tree/foldertree_nolines_minus.gif trunk/simexplorer-is-web/src/webcontent/images/tree/foldertree_nolines_plus.gif trunk/simexplorer-is-web/src/webcontent/images/tree/foldertree_page.gif trunk/simexplorer-is-web/src/webcontent/images/tree/foldertree_plus.gif trunk/simexplorer-is-web/src/webcontent/images/tree/foldertree_plusbottom.gif trunk/simexplorer-is-web/src/webcontent/images/tree/foldertree_question.gif trunk/simexplorer-is-web/src/webcontent/images/tree/foldertree_trash.gif trunk/simexplorer-is-web/src/webcontent/js/ trunk/simexplorer-is-web/src/webcontent/js/dftree.js trunk/simexplorer-is-web/src/webcontent/js/treeLoader.js trunk/simexplorer-is-web/src/xmi/ trunk/simexplorer-is-web/src/xmi/simexplorer-is-web.zargo Modified: trunk/simexplorer-is-web/.classpath trunk/simexplorer-is-web/.project trunk/simexplorer-is-web/pom.xml trunk/simexplorer-is-web/src/webcontent/META-INF/MANIFEST.MF trunk/simexplorer-is-web/src/webcontent/WEB-INF/web.xml Log: Mise en place pages Modified: trunk/simexplorer-is-web/.classpath =================================================================== --- trunk/simexplorer-is-web/.classpath 2007-12-24 11:57:01 UTC (rev 83) +++ trunk/simexplorer-is-web/.classpath 2007-12-24 11:57:20 UTC (rev 84) @@ -1,11 +1,13 @@ <?xml version="1.0" encoding="UTF-8"?> <classpath> + <classpathentry kind="src" path="target/gen/java"/> <classpathentry kind="src" path="src/java"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> - <classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.generic.runtimeTarget/JBoss v4.2"/> - <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/> - <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/> - <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/> + <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/.project =================================================================== --- trunk/simexplorer-is-web/.project 2007-12-24 11:57:01 UTC (rev 83) +++ trunk/simexplorer-is-web/.project 2007-12-24 11:57:20 UTC (rev 84) @@ -25,12 +25,18 @@ <arguments> </arguments> </buildCommand> + <buildCommand> + <name>org.devzuz.q.maven.jdt.core.mavenIncrementalBuilder</name> + <arguments> + </arguments> + </buildCommand> </buildSpec> <natures> <nature>org.eclipse.jdt.core.javanature</nature> <nature>org.maven.ide.eclipse.maven2Nature</nature> - <nature>org.eclipse.wst.common.project.facet.core.nature</nature> + <nature>org.devzuz.q.maven.jdt.core.mavenNature</nature> <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature> <nature>org.eclipse.jem.workbench.JavaEMFNature</nature> + <nature>org.eclipse.wst.common.project.facet.core.nature</nature> </natures> </projectDescription> Modified: trunk/simexplorer-is-web/pom.xml =================================================================== --- trunk/simexplorer-is-web/pom.xml 2007-12-24 11:57:01 UTC (rev 83) +++ trunk/simexplorer-is-web/pom.xml 2007-12-24 11:57:20 UTC (rev 84) @@ -1,16 +1,156 @@ <?xml version="1.0" encoding="UTF-8"?> -<project> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <parent> + <artifactId>lutinproject</artifactId> + <groupId>lutinlib</groupId> + <version>2.2</version> + </parent> <modelVersion>4.0.0</modelVersion> <groupId>simexplorer-is-web</groupId> <artifactId>simexplorer-is-web</artifactId> <packaging>war</packaging> <version>0.0.1-SNAPSHOT</version> <description></description> + + <profiles> + <profile> + <id>project</id> + + <activation> + <activeByDefault>true</activeByDefault> + </activation> + + <properties> + <!--Source base dir--> + <maven.src.dir> + ${basedir}/target/src-build + </maven.src.dir> + + <!--Test--> + <maven.test.skip>true</maven.test.skip> + + <!--Compile with ?--> + <maven.compile.source>1.5</maven.compile.source> + <maven.compile.target>1.5</maven.compile.target> + + <!--Verbose--> + <maven.verbose>false</maven.verbose> + </properties> + </profile> + </profiles> + + <build> + <resources> + <resource> + <directory>${maven.src.dir}/resources</directory> + <includes> + <include>**/*</include> + </includes> + </resource> + </resources> + <plugins> + <plugin> + <groupId>lutinplugin</groupId> + <artifactId>maven-processor-plugin</artifactId> + <version>0.12</version> + <executions> + <execution> + <id>Processor</id> + <phase>generate-sources</phase> + <goals> + <goal>process</goal> + </goals> + </execution> + </executions> + <configuration> + <srcDir>${basedir}/src</srcDir> + <destDir>${maven.src.dir}</destDir> + <includes> + <include>**/*.java</include> + </includes> + <filters> + org.codelutin.processor.filters.GeneratorTemplatesFilter, + org.codelutin.processor.filters.ActiveLogsCodeFilter + </filters> + <verbose>${maven.verbose}</verbose> + </configuration> + </plugin> + <plugin> + <groupId>lutinplugin</groupId> + <artifactId>maven-generator-plugin</artifactId> + <version>0.51-SNAPSHOT</version> + <executions> + <execution> + <id>Generator</id> + <phase>generate-sources</phase> + <goals> + <goal>zargo2xmi</goal> + <goal>xmi2statemodel</goal> + <goal>generate</goal> + </goals> + <configuration> + <srcDirZuml>src/xmi</srcDirZuml> + <srcXmiDest>target/gen/xmi/</srcXmiDest> + <srcGenDest>target/gen/models/</srcGenDest> + <includes>**/*.*model</includes> + <templates> + org.codelutin.topia.generator.TapestryWebGenerator + </templates> + <destDirGen>target/gen/java</destDirGen> + </configuration> + </execution> + </executions> + <dependencies> + <dependency> + <groupId>lutinlib</groupId> + <artifactId>topia</artifactId> + <version>2.0.26-SNAPSHOT</version> + <scope>compile</scope> + </dependency> + </dependencies> + </plugin> + <plugin> + <artifactId>maven-antrun-plugin</artifactId> + <executions> + <execution> + <id>CopyGenJavaVersSrcBuild</id> + <phase>process-sources</phase> + <goals> + <goal>run</goal> + </goals> + <configuration> + <tasks> + <copy + todir="${basedir}/target/src-build/java" + verbose="${maven.verbose}" overwrite="false"> + <fileset + dir="${basedir}/target/gen/java" /> + </copy> + </tasks> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> <dependencies> <dependency> <groupId>org.apache.tapestry</groupId> <artifactId>tapestry-upload</artifactId> <version>5.0.6</version> </dependency> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>servlet-api</artifactId> + <version>2.3</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>com.healthmarketscience.rmiio</groupId> + <artifactId>rmiio</artifactId> + <version>2.0.0</version> + </dependency> </dependencies> </project> \ No newline at end of file Added: trunk/simexplorer-is-web/src/webcontent/ApplicationDetail.tml =================================================================== --- trunk/simexplorer-is-web/src/webcontent/ApplicationDetail.tml (rev 0) +++ trunk/simexplorer-is-web/src/webcontent/ApplicationDetail.tml 2007-12-24 11:57:20 UTC (rev 84) @@ -0,0 +1,4 @@ +<t:layout xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd" + title="message:windowtitle"> + +</t:layout> Added: trunk/simexplorer-is-web/src/webcontent/ApplicationExport.tml =================================================================== --- trunk/simexplorer-is-web/src/webcontent/ApplicationExport.tml (rev 0) +++ trunk/simexplorer-is-web/src/webcontent/ApplicationExport.tml 2007-12-24 11:57:20 UTC (rev 84) @@ -0,0 +1,4 @@ +<t:layout xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd" + title="message:windowtitle"> + +</t:layout> Added: trunk/simexplorer-is-web/src/webcontent/ApplicationImport.tml =================================================================== --- trunk/simexplorer-is-web/src/webcontent/ApplicationImport.tml (rev 0) +++ trunk/simexplorer-is-web/src/webcontent/ApplicationImport.tml 2007-12-24 11:57:20 UTC (rev 84) @@ -0,0 +1,11 @@ +<t:layout xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd" + title="message:windowtitle"> + + <t:form> + <t:errors/> + <input t:type="upload" t:id="file" validate="required"/> + <br/> + <input type="submit" value="${message:upload}"/> + </t:form> + +</t:layout> Added: trunk/simexplorer-is-web/src/webcontent/ApplicationList.tml =================================================================== --- trunk/simexplorer-is-web/src/webcontent/ApplicationList.tml (rev 0) +++ trunk/simexplorer-is-web/src/webcontent/ApplicationList.tml 2007-12-24 11:57:20 UTC (rev 84) @@ -0,0 +1,15 @@ +<t:layout xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd" + title="message:windowtitle"> + + <div id="dftree_tree"> + </div> + <a t:type="ActionLink" t:id="edit">Details</a> + <a t:type="ActionLink" t:id="create">Create</a> + <a t:type="ActionLink" t:id="delete">Delete</a> + + +<script> +initTree(); +</script> + +</t:layout> Added: trunk/simexplorer-is-web/src/webcontent/GroupEdit.tml =================================================================== --- trunk/simexplorer-is-web/src/webcontent/GroupEdit.tml (rev 0) +++ trunk/simexplorer-is-web/src/webcontent/GroupEdit.tml 2007-12-24 11:57:20 UTC (rev 84) @@ -0,0 +1,21 @@ +<t:layout xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd" + title="message:windowtitle"> + + <t:form> + <t:errors/> + + <!-- + + <p>${message:name} : + <input t:type="TextField" t:id="name" t:validate="required,minlength=3" + t:value="group.name" size="30"/></p> + + --> + + <input t:type="Submit" t:value="message:submit"/> + + <a t:type="actionlink" t:id="cancel">${message:cancel}</a> + + </t:form> + +</t:layout> Added: trunk/simexplorer-is-web/src/webcontent/GroupList.tml =================================================================== --- trunk/simexplorer-is-web/src/webcontent/GroupList.tml (rev 0) +++ trunk/simexplorer-is-web/src/webcontent/GroupList.tml 2007-12-24 11:57:20 UTC (rev 84) @@ -0,0 +1,24 @@ +<t:layout xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd" + title="message:windowtitle"> + + <t:form> + <t:errors /> + + <table class="Large"> + <tr class="First"> + <td>${message:name}</td> + <td>${message:modify}</td> + <td>${message:delete}</td> + </tr> + <!-- t:loop source="groups" value="group"> + <tr> + <td>${group.name}</td> + <td><a t:type="ActionLink" t:id="edit" t:context="group.id">${message:modify}</a></td> + <td><a t:type="ActionLink" t:id="delete" t:context="group.id">${message:delete}</a></td> + </tr> + </t:loop --> + </table> + + </t:form> + +</t:layout> Added: trunk/simexplorer-is-web/src/webcontent/Layout.tml =================================================================== --- trunk/simexplorer-is-web/src/webcontent/Layout.tml (rev 0) +++ trunk/simexplorer-is-web/src/webcontent/Layout.tml 2007-12-24 11:57:20 UTC (rev 84) @@ -0,0 +1,66 @@ +<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}" /> + <script type="text/javascript" src="${prop:javascriptTree}"></script> + <script type="text/javascript" src="${prop:javascriptFolder}treeLoader.js"></script> + <script type="text/javascript" src="${prop:javascriptFolder}dwr/engine.js"></script> + <script type="text/javascript" src="${prop:javascriptFolder}dwr/interface/TreeData.js"></script> + + </head> + + <body> + + <!-- titre --> + <h1 id="Title">${message:abstractpage-pagetitle}</h1> + + <!-- barre --> + <div id="Header"> + <div class="Left"> + [<a t:type="actionlink" t:id="switchLocaleEn">${message:abstractpage-localeen}</a>] + - + [<a t:type="actionlink" t:id="switchLocaleFr">${message:abstractpage-localefr}</a>] + </div> + <div class="Right"> + <!-- + <t:if test="administrator"> + <a t:type="actionlink" t:id="administration">${message:abstractpage-administration}</a> + </t:if> + --> + </div> + + </div> + + <div id="Menu" class=""> + <!-- menu --> + <h1 class="tab">${message:abstractpage-menutitle}</h1> + <div id="tabMenu"> + + <h2 class="Title">${message:abstractpage-menusubtitle1}</h2> + <menu class="menu"> + <li><t:pagelink page="ApplicationList">${message:abstractpage-menuitem1-1}</t:pagelink></li> + <li><t:pagelink page="ApplicationImport">${message:abstractpage-menuitem1-2}</t:pagelink></li> + </menu> + + <h2 class="Title">${message:abstractpage-menusubtitle2}</h2> + <menu class="menu"> + <li><t:pagelink page="UserList">${message:abstractpage-menuitem2-1}</t:pagelink></li> + <li><t:pagelink page="UserEdit" context="-1">${message:abstractpage-menuitem2-2}</t:pagelink></li> + <li><t:pagelink page="GroupList">${message:abstractpage-menuitem2-3}</t:pagelink></li> + <li><t:pagelink page="GroupEdit" context="-1">${message:abstractpage-menuitem2-4}</t:pagelink></li> + </menu> + + </div> + </div> + + <div id="Content"> + <!-- main template here --> + <t:body/> + </div> + + <div id="FooterAdd">${message:abstractpage-copyright} + </div> + </body> +</html> \ No newline at end of file Modified: trunk/simexplorer-is-web/src/webcontent/META-INF/MANIFEST.MF =================================================================== --- trunk/simexplorer-is-web/src/webcontent/META-INF/MANIFEST.MF 2007-12-24 11:57:01 UTC (rev 83) +++ trunk/simexplorer-is-web/src/webcontent/META-INF/MANIFEST.MF 2007-12-24 11:57:20 UTC (rev 84) @@ -1,3 +1,2 @@ Manifest-Version: 1.0 -Class-Path: Added: trunk/simexplorer-is-web/src/webcontent/UserEdit.tml =================================================================== --- trunk/simexplorer-is-web/src/webcontent/UserEdit.tml (rev 0) +++ trunk/simexplorer-is-web/src/webcontent/UserEdit.tml 2007-12-24 11:57:20 UTC (rev 84) @@ -0,0 +1,82 @@ +<t:layout xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd" + title="message:windowtitle"> + + <t:form> + <t:errors /> + + <!-- + + <p>${message:name} : <input t:type="TextField" t:id="name" + t:validate="required,minlength=3" t:value="user.name" size="30" /></p> + + <p>${message:firstname} : <input t:type="TextField" + t:id="firstName" t:validate="required,minlength=3" + t:value="user.firstName" size="30" /></p> + + <p>${message:mail} : <input t:type="TextField" t:id="mail" + t:validate="required,minlength=3" t:value="user.mail" size="30" /></p> + + <h1 class="Title">${message:groups}</h1> + + <table class="Large"> + <tr class="First"> + <td>${message:name}</td> + <td>${message:add}</td> + <td>${message:remove}</td> + </tr> + <tr> + <td class="Text">Member of :</td> + <td></td> + <td></td> + </tr> + <tr> + <td>XXXXX</td> + <td></td> + <td><a t:type="ActionLink" t:id="removeGroup0" + t:context="0">${message:remove}</a></td> + </tr> + <tr> + <td>YYYYYY</td> + <td></td> + <td><a t:type="ActionLink" t:id="removeGroup1" + t:context="0">${message:remove}</a></td> + </tr> + <tr> + <td>ZZZZZZZ</td> + <td></td> + <td><a t:type="ActionLink" t:id="removeGroup2" + t:context="0">${message:remove}</a></td> + </tr> + <tr> + <td class="Text">Available groups :</td> + <td></td> + <td></td> + </tr> + <tr> + <td>AAAAA</td> + <td><a t:type="ActionLink" t:id="removeGroup3" + t:context="0">${message:add}</a></td> + <td></td> + </tr> + <tr> + <td>BBBBB</td> + <td><a t:type="ActionLink" t:id="removeGroup4" + t:context="0">${message:add}</a></td> + <td></td> + </tr> + <tr> + <td>CCCCCCCC</td> + <td><a t:type="ActionLink" t:id="removeGroup5" + t:context="0">${message:add}</a></td> + <td></td> + </tr> + + </table> + --> + + <input t:type="Submit" t:value="message:submit" /> + + <a t:type="actionlink" t:id="cancel">${message:cancel}</a> + </t:form> + +</t:layout> Added: trunk/simexplorer-is-web/src/webcontent/UserList.tml =================================================================== --- trunk/simexplorer-is-web/src/webcontent/UserList.tml (rev 0) +++ trunk/simexplorer-is-web/src/webcontent/UserList.tml 2007-12-24 11:57:20 UTC (rev 84) @@ -0,0 +1,27 @@ +<t:layout xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd" + title="message:windowtitle"> + + <t:form> + <t:errors/> + + <table class="Large"> + <tr class="First"> + <td>${message:name}</td> + <td>${message:firstname}</td> + <td>${message:modify}</td> + <td>${message:delete}</td> + </tr> + + <!-- t:loop source="users" value="user"> + <tr> + <td>${user.name}</td> + <td>${user.firstName}</td> + <td><t:pagelink page="UserEdit" context="user.id">${message:modify}</t:pagelink></td> + <td><a t:type="ActionLink" t:id="delete" t:context="user.id">${message:delete}</a></td> + </tr> + </t:loop --> + </table> + + </t:form> + +</t:layout> Modified: trunk/simexplorer-is-web/src/webcontent/WEB-INF/web.xml =================================================================== --- trunk/simexplorer-is-web/src/webcontent/WEB-INF/web.xml 2007-12-24 11:57:01 UTC (rev 83) +++ trunk/simexplorer-is-web/src/webcontent/WEB-INF/web.xml 2007-12-24 11:57:20 UTC (rev 84) @@ -1,12 +1,33 @@ <?xml version="1.0" encoding="UTF-8"?> -<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5"> - <display-name>simexplorer-is-web</display-name> - <listener> - <listener-class> +<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns="http://java.sun.com/xml/ns/javaee" + xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" + xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" + id="WebApp_ID" version="2.5"> + + <display-name>simexplorer-is-web</display-name> + + <context-param> + <param-name>tapestry.app-package</param-name> + <param-value>fr.cemagref.simexplorer.is.ui.web</param-value> + </context-param> + + <filter> + <filter-name>tapestryfilter</filter-name> + <filter-class>org.apache.tapestry.TapestryFilter</filter-class> + </filter> + <filter-mapping> + <filter-name>tapestryfilter</filter-name> + <url-pattern>/*</url-pattern> + </filter-mapping> + + <listener> + <listener-class> fr.cemagref.simexplorer.is.ui.web.ContextListener </listener-class> - </listener> - <welcome-file-list> - <welcome-file>index.html</welcome-file> - </welcome-file-list> + </listener> + + <welcome-file-list> + <welcome-file>ApplicationList</welcome-file> + </welcome-file-list> </web-app> \ No newline at end of file Added: trunk/simexplorer-is-web/src/webcontent/css/dftree.css =================================================================== --- trunk/simexplorer-is-web/src/webcontent/css/dftree.css (rev 0) +++ trunk/simexplorer-is-web/src/webcontent/css/dftree.css 2007-12-24 11:57:20 UTC (rev 84) @@ -0,0 +1,64 @@ + +.son { + position: relative; + left: 10px; +} + + +.plus { + font-size: 15px; + font-weight: bold; + cursor: pointer; + cursor: hand; + color: #000000; + font-family: monospace; +} + +.plus:hover { + color: #FF0000; +} + +.opened { + display: block; +} + +.closed { + display: none; +} + +/* link */ +.l { + padding: 2px; + font-weight: bold; + font-size: 12px; + color: #666666; + text-decoration: none; + cursor: pointer; + cursor: hand; + white-space: nowrap; + font-family: sans-serif; +} + +.l:hover { + text-decoration: underline; +} + + +/* selected link */ +.sl { + padding: 2px; + font-weight: bold; + font-size: 12px; + color: #0000FF; + text-decoration: none; + cursor: pointer; + cursor: hand; + white-space: nowrap; + font-family: sans-serif; +} + +.sl:hover { + text-decoration: underline; +} + + Added: trunk/simexplorer-is-web/src/webcontent/css/general.css =================================================================== --- trunk/simexplorer-is-web/src/webcontent/css/general.css (rev 0) +++ trunk/simexplorer-is-web/src/webcontent/css/general.css 2007-12-24 11:57:20 UTC (rev 84) @@ -0,0 +1,383 @@ +/***************************** 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; +} + Added: trunk/simexplorer-is-web/src/webcontent/css/layout.css =================================================================== --- trunk/simexplorer-is-web/src/webcontent/css/layout.css (rev 0) +++ trunk/simexplorer-is-web/src/webcontent/css/layout.css 2007-12-24 11:57:20 UTC (rev 84) @@ -0,0 +1,155 @@ +/* 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; +} Added: trunk/simexplorer-is-web/src/webcontent/images/lutin.gif =================================================================== (Binary files differ) Property changes on: trunk/simexplorer-is-web/src/webcontent/images/lutin.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/simexplorer-is-web/src/webcontent/images/tree/foldertree_base.gif =================================================================== (Binary files differ) Property changes on: trunk/simexplorer-is-web/src/webcontent/images/tree/foldertree_base.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/simexplorer-is-web/src/webcontent/images/tree/foldertree_cd.gif =================================================================== (Binary files differ) Property changes on: trunk/simexplorer-is-web/src/webcontent/images/tree/foldertree_cd.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/simexplorer-is-web/src/webcontent/images/tree/foldertree_empty.gif =================================================================== (Binary files differ) Property changes on: trunk/simexplorer-is-web/src/webcontent/images/tree/foldertree_empty.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/simexplorer-is-web/src/webcontent/images/tree/foldertree_felamimail_sm.png =================================================================== (Binary files differ) Property changes on: trunk/simexplorer-is-web/src/webcontent/images/tree/foldertree_felamimail_sm.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/simexplorer-is-web/src/webcontent/images/tree/foldertree_folder.gif =================================================================== (Binary files differ) Property changes on: trunk/simexplorer-is-web/src/webcontent/images/tree/foldertree_folder.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/simexplorer-is-web/src/webcontent/images/tree/foldertree_folderopen.gif =================================================================== (Binary files differ) Property changes on: trunk/simexplorer-is-web/src/webcontent/images/tree/foldertree_folderopen.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/simexplorer-is-web/src/webcontent/images/tree/foldertree_globe.gif =================================================================== (Binary files differ) Property changes on: trunk/simexplorer-is-web/src/webcontent/images/tree/foldertree_globe.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/simexplorer-is-web/src/webcontent/images/tree/foldertree_imgfolder.gif =================================================================== (Binary files differ) Property changes on: trunk/simexplorer-is-web/src/webcontent/images/tree/foldertree_imgfolder.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/simexplorer-is-web/src/webcontent/images/tree/foldertree_join.gif =================================================================== (Binary files differ) Property changes on: trunk/simexplorer-is-web/src/webcontent/images/tree/foldertree_join.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/simexplorer-is-web/src/webcontent/images/tree/foldertree_joinbottom.gif =================================================================== (Binary files differ) Property changes on: trunk/simexplorer-is-web/src/webcontent/images/tree/foldertree_joinbottom.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/simexplorer-is-web/src/webcontent/images/tree/foldertree_line.gif =================================================================== (Binary files differ) Property changes on: trunk/simexplorer-is-web/src/webcontent/images/tree/foldertree_line.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/simexplorer-is-web/src/webcontent/images/tree/foldertree_minus.gif =================================================================== (Binary files differ) Property changes on: trunk/simexplorer-is-web/src/webcontent/images/tree/foldertree_minus.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/simexplorer-is-web/src/webcontent/images/tree/foldertree_minusbottom.gif =================================================================== (Binary files differ) Property changes on: trunk/simexplorer-is-web/src/webcontent/images/tree/foldertree_minusbottom.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/simexplorer-is-web/src/webcontent/images/tree/foldertree_musicfolder.gif =================================================================== (Binary files differ) Property changes on: trunk/simexplorer-is-web/src/webcontent/images/tree/foldertree_musicfolder.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/simexplorer-is-web/src/webcontent/images/tree/foldertree_nolines_minus.gif =================================================================== (Binary files differ) Property changes on: trunk/simexplorer-is-web/src/webcontent/images/tree/foldertree_nolines_minus.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/simexplorer-is-web/src/webcontent/images/tree/foldertree_nolines_plus.gif =================================================================== (Binary files differ) Property changes on: trunk/simexplorer-is-web/src/webcontent/images/tree/foldertree_nolines_plus.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/simexplorer-is-web/src/webcontent/images/tree/foldertree_page.gif =================================================================== (Binary files differ) Property changes on: trunk/simexplorer-is-web/src/webcontent/images/tree/foldertree_page.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/simexplorer-is-web/src/webcontent/images/tree/foldertree_plus.gif =================================================================== (Binary files differ) Property changes on: trunk/simexplorer-is-web/src/webcontent/images/tree/foldertree_plus.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/simexplorer-is-web/src/webcontent/images/tree/foldertree_plusbottom.gif =================================================================== (Binary files differ) Property changes on: trunk/simexplorer-is-web/src/webcontent/images/tree/foldertree_plusbottom.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/simexplorer-is-web/src/webcontent/images/tree/foldertree_question.gif =================================================================== (Binary files differ) Property changes on: trunk/simexplorer-is-web/src/webcontent/images/tree/foldertree_question.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/simexplorer-is-web/src/webcontent/images/tree/foldertree_trash.gif =================================================================== (Binary files differ) Property changes on: trunk/simexplorer-is-web/src/webcontent/images/tree/foldertree_trash.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/simexplorer-is-web/src/webcontent/js/dftree.js =================================================================== --- trunk/simexplorer-is-web/src/webcontent/js/dftree.js (rev 0) +++ trunk/simexplorer-is-web/src/webcontent/js/dftree.js 2007-12-24 11:57:20 UTC (rev 84) @@ -0,0 +1,530 @@ +/* Dynamic Folder Tree + * Generates DHTML tree dynamically (on the fly). + * License: BSD. + * See details at http://www.opensource.org/licenses/bsd-license.php + * + * Copyright (c) 2004, 2005, 2006 + * Vinicius Cubas Brand, Raphael Derosso Pereira, Frank Alcantara + * {viniciuscb,raphaelpereira,frankalcantara} at users.sourceforge.net + * All rights reserved. + */ + + +// NODE +//Usage: a = new dNode({id:2, caption:'tree root', url:'http://www.w3.org'}); +function dNode(arrayProps) { + //mandatory fields + this.id; //node id + this.caption; //node caption + + //optional fields + this.url; //url to open + this.target; //target to open url + this.onClick; //javascript to execute onclick + this.onOpen; //javascript to execute when a node of the tree opens + this.onClose; //javascript to execute when a node of the tree closes + this.onFirstOpen; //javascript to execute only on the first open + this.iconClosed; //img.src of closed icon + this.iconOpen; //img.src of open icon + this.runJS = true; //(bool) if true, runs the on* props defined above + this.plusSign = true; //(bool) if the plus sign will appear or not + this.captionClass = 'l'; //(string) the class for this node's caption + + + //The parameters below are private + this._opened = false; //already opened + this._io = false; //is opened + + this._children = []; //references to children + this._parent; //pointer to parent + this._myTree; //pointer to myTree + + for (i in arrayProps) + { + if (i.charAt(0) != '_') + { + eval('this.'+i+' = arrayProps[\''+i+'\'];'); + } + } +} + +//changes node state from open to closed, and vice-versa +dNode.prototype.changeState = function() +{ + if (this._io) + { + this.close(); + } + else + { + this.open(); + } + + //cons = COokie of Node Status + //setCookie("cons"+this.id,this._io); +} + +dNode.prototype.open = function () { + if (!this._io) + { + if (!this._opened && this.runJS && this.onFirstOpen != null) + { + eval(this.onFirstOpen); + } + else if (this.runJS && this.onOpen != null) + { + eval(this.onOpen); + } + + this._opened = true; + this._io = true; + this._refresh(); + } +} + + +dNode.prototype.close = function() { + if (this._io) + { + if (this.runJS && this.onClose != null) + { + eval(this.onClose); + } + this._io = false; + this._refresh(); + } +} + +//alter node label and other properties +dNode.prototype.alter = function(arrayProps) +{ + for (i in arrayProps) + { + if (i != 'id' && i.charAt(0) != '_') + { + eval('this.'+i+' = arrayProps[\''+i+'\'];'); + } + } +} + +//css and dhtml refresh part +dNode.prototype._refresh = function() { + var nodeDiv = getObjectById("n"+this.id); + var plusSpan = getObjectById("p"+this.id); + var captionSpan = getObjectById("l"+this.id); + var childrenDiv = getObjectById("ch"+this.id); + + if (nodeDiv != null) + { + //Handling open and close: checks this._io and changes class as needed + if (!this._io) //just closed + { + childrenDiv.className = "closed"; + } + else //just opened + { + //prevents IE undesired behaviour when displaying empty DIVs +/* if (this._children.length > 0) + {*/ + childrenDiv.className = "opened"; + // } + } + + plusSpan.innerHTML = this._properPlus(); + + captionSpan.innerHTML = this.caption; + } + +//alter onLoad, etc + +} + +//gets the proper plus for this moment +dNode.prototype._properPlus = function() +{ + if (!this._io) + { + if (this._myTree.useIcons) + { + return (this.plusSign)?imageHTML(this._myTree.icons.plus):""; + } + else + { + return (this.plusSign)?"+":""; + } + } + else + { + if (this._myTree.useIcons) + { + return (this.plusSign)?imageHTML(this._myTree.icons.minus):""; + } + else + { + return (this.plusSign)?"-":""; + } + } +} + +//changes node to selected style class. Perform further actions. +dNode.prototype._select = function() +{ + + var captionSpan; + + if (this._myTree._selected) + { + this._myTree._selected._unselect(); + } + this._myTree._selected = this; + + captionSpan = getObjectById("l"+this.id); + + //changes class to selected link + if (captionSpan) + { + captionSpan.className = 'sl'; + } + +} + +//changes node to unselected style class. Perform further actions. +dNode.prototype._unselect = function() +{ + var captionSpan = getObjectById("l"+this.id); + + this._myTree._lastSelected = this._myTree._selected; + this._myTree._selected = null; + + //changes class to selected link + if (captionSpan) + { + captionSpan.className = this.captionClass; + } +} + + +//state can be open or closed +//warning: if drawed node is not child or root, bugs will happen +dNode.prototype._draw = function() +{ + var str; + var div; + var myClass = (this._io)? "opened" : "closed"; + var myPlus = this._properPlus(); + var append = true; + var myPlusOnClick = this._myTree.name+'.getNodeById(\''+this.id+'\').changeState();'; + var captionOnClickEvent = ""; +// var cook; + + var plusEventHandler = function(){ + eval(myPlusOnClick); + } + + var captionEventHandler = function(){ + eval(captionOnClickEvent); + } + + +/* if (this.myTree.followCookies) + { + this._io = getCookie("cons"+this.id); + }*/ + + //FIXME put this in a separate function, as this will be necessary in + //various parts + + captionOnClickEvent = this._myTree.name+'.getNodeById(\''+this.id+'\')._select(); '; + if (this.onClick) //FIXME when onclick && url + { + captionOnClickEvent += this.onClick; + } + else if (this.url && this.target) + { + captionOnClickEvent += 'window.open(\''+this.url+'\',\''+this.target+'\')'; + } + else if (this.url) + { + captionOnClickEvent += 'window.location=\''+this.url+'\''; + } + + + //The div of this node + divN = document.createElement('div'); + divN.id = 'n'+this.id; + divN.className = 'son'; + + //The span that holds the plus/minus sign + spanP = document.createElement('span'); + spanP.id = 'p'+this.id; + spanP.className = 'plus'; +// spanP.addEventListener('click',plusEventHandler,false); + spanP.onclick = plusEventHandler; + spanP.innerHTML = myPlus; + + //The span that holds the label/caption + spanL = document.createElement('span'); + spanL.id = 'l'+this.id; + spanL.className = this.captionClass; +// spanL.addEventListener('click',captionEventHandler,false); + spanL.onclick = captionEventHandler; + spanL.innerHTML = this.caption; + + //The div that holds the children + divCH = document.createElement('div'); + divCH.id = 'ch'+this.id; + divCH.className = myClass; + + +// str = '<div id="n'+this.id+'" class="son">'; +// str = '<span id="p'+this.id+'" class="plus" onclick="'+myPlusOnClick+'">'+myPlus+'</span>'; +// str += '<span id="l'+this.id+'" class="l"'+captionOnClickEvent+'>'+this.caption+'</span>'; +// str += '<div id="ch'+this.id+'" class="'+myClass+'"></div>'; + +// div.innerHTML = str; + divN.appendChild(spanP); + divN.appendChild(spanL); + divN.appendChild(divCH); + + + if (this._parent != null) + { + parentChildrenDiv = getObjectById("ch"+this._parent.id); + } + else //is root + { + parentChildrenDiv = getObjectById("dftree_"+this._myTree.name); +// append = false; + } + + if (parentChildrenDiv) + { + + parentChildrenDiv.appendChild(divN); +/* if (append) + { + parentChildrenDiv.innerHTML += str; + } + else + { + parentChildrenDiv.innerHTML = str; + }*/ + } +} + +// TREE +//Usage: t = new dFTree({name:t, caption:'tree root', url:'http://www.w3.org'}); +function dFTree(arrayProps) { + //mandatory fields + this.name; //the value of this must be the name of the object + + //optional fields + this.is_dynamic = true; //tree is dynamic, i.e. updated on the fly + this.followCookies = true;//use previous state (o/c) of nodes + this.useIcons = false; //use icons or not + + + //arrayProps[icondir]: Icons Directory + iconPath = (arrayProps['icondir'] != null)? arrayProps['icondir'] : ''; + + this.icons = { + root : iconPath+'/foldertree_base.gif', + folder : iconPath+'/foldertree_folder.gif', + folderOpen : iconPath+'/foldertree_folderopen.gif', + node : iconPath+'/foldertree_folder.gif', + empty : iconPath+'/foldertree_empty.gif', + line : iconPath+'/foldertree_line.gif', + join : iconPath+'/foldertree_join.gif', + joinBottom : iconPath+'/foldertree_joinbottom.gif', + plus : iconPath+'/foldertree_plus.gif', + plusBottom : iconPath+'/foldertree_plusbottom.gif', + minus : iconPath+'/foldertree_minus.gif', + minusBottom : iconPath+'/foldertree_minusbottom.gif', + nlPlus : iconPath+'/foldertree_nolines_plus.gif', + nlMinus : iconPath+'/foldertree_nolines_minus.gif' + }; + + //private + this._root; //reference to root node + this._aNodes = []; + this._lastSelected; //The last selected node + this._selected; //The actual selected node + + for (i in arrayProps) + { + if (i.charAt(0) != '_') + { + eval('this.'+i+' = arrayProps[\''+i+'\'];'); + } + } + +} + +dFTree.prototype.draw = function() { + if (!getObjectById("dftree_"+this.name)) + { + document.write('<div id="dftree_'+this.name+'"></div>'); + } + + if (this._root != null) + { + this._root._draw(); + this._drawBranch(this._root._children); + } + +} + +//Transforms tree in HTML code. Do not use it. Use draw() instead. +/*dFTree.prototype.toString = function() { + var str = ''; + + if (!getObjectById("dftree_"+this.name)) + { + str = '<div id="dftree_'+this.name+'"></div>'; + } + return str; + +/ * if (this.root != false) + { + this.root._draw(); + this._drawBranch(this.root.children); + }* / +}*/ + +//Recursive function, draws children +dFTree.prototype._drawBranch = function(childrenArray) { + var a=0; + for (a;a<childrenArray.length;a++) + { + childrenArray[a]._draw(); + this._drawBranch(childrenArray[a]._children); + } +} + +//add into a position +dFTree.prototype.add = function(node,pid) { + var auxPos; + var addNode = false; + if (typeof (auxPos = this._searchNode(node.id)) != "number") + { + // if parent exists, add node as its child + if (typeof (auxPos = this._searchNode(pid)) == "number") + { + node._parent = this._aNodes[auxPos]; + this._aNodes[auxPos]._children[this._aNodes[auxPos]._children.length] = node; + addNode = true; + } + else //if parent cannot be found and there is a tree root, ignores node + { + if (this._root == null) + { + this._root = node; + addNode = true; + } + } + if (addNode) + { + this._aNodes[this._aNodes.length] = node; + node._myTree = this; + if (this.is_dynamic) + { + node._draw(); + } + } + } + +} + +//arrayProps: same properties of Node +dFTree.prototype.alter = function(arrayProps) { + if (arrayProps['id']) + { + this.getNodeById(arrayProps['id']).alter(arrayProps); + } +} + +dFTree.prototype.getNodeById = function(nodeid) { + return this._aNodes[this._searchNode(nodeid)]; +} + + +//Searches for a node in the node array, returning the position of the array 4it +dFTree.prototype._searchNode = function(id) { + var a=0; + for (a;a<this._aNodes.length;a++) + { + if (this._aNodes[a].id == id) + { + return a; + } + } + return false; +} + + +//Auxiliar functions + +//For multi-browser compatibility +function getObjectById(name) +{ + if (document.getElementById) + { + return document.getElementById(name); + } + else if (document.all) + { + return document.all[name]; + } + else if (document.layers) + { + return document.layers[name]; + } + return false; +} + +// [Cookie] Clears a cookie +function clearCookie(cookieName) { + var now = new Date(); + var yesterday = new Date(now.getTime() - 1000 * 60 * 60 * 24); + this.setCookie(cookieName, 'cookieValue', yesterday); + this.setCookie(cookieName, 'cookieValue', yesterday); +}; + +// [Cookie] Sets value in a cookie +function setCookie(cookieName, cookieValue, expires, path, domain, secure) { + document.cookie = + escape(cookieName) + '=' + escape(cookieValue) + + (expires ? '; expires=' + expires.toGMTString() : '') + + (path ? '; path=' + path : '') + + (domain ? '; domain=' + domain : '') + + (secure ? '; secure' : ''); +}; + +// [Cookie] Gets a value from a cookie +function getCookie(cookieName) { + var cookieValue = ''; + var posName = document.cookie.indexOf(escape(cookieName) + '='); + if (posName != -1) { + var posValue = posName + (escape(cookieName) + '=').length; + var endPos = document.cookie.indexOf(';', posValue); + if (endPos != -1) + { + cookieValue = unescape(document.cookie.substring(posValue, endPos)); + } + else + { + cookieValue = unescape(document.cookie.substring(posValue)); + } + } + return (cookieValue); +}; + + +function imageHTML(src,attributes) { + if (attributes != null) + { + attributes = ''; + } + return "<img "+attributes+" src=\""+src+"\">"; +} + Added: trunk/simexplorer-is-web/src/webcontent/js/treeLoader.js =================================================================== --- trunk/simexplorer-is-web/src/webcontent/js/treeLoader.js (rev 0) +++ trunk/simexplorer-is-web/src/webcontent/js/treeLoader.js 2007-12-24 11:57:20 UTC (rev 84) @@ -0,0 +1,69 @@ +var tree; +var nodes = []; +var inode = 0; + +function getNodeCallback(treeNode) { + for (var i = 0; i < treeNode.enfants.length; i++) { + createNode(treeNode.enfants[i].id, treeNode.enfants[i].libelle, treeNode.id); + } +} + +function createNode(idNode, nodeCaption, parentId) { + var node = new dNode({id: idNode,caption: nodeCaption}); + /* + if (parentId == -1) { + TreeData.getNode(idNode, getNodeCallback); + } else { + node.alter({onFirstOpen: 'TreeData.getNode('+idNode+', getNodeCallback)'}); + } + */ + tree.add(node, parentId); + nodes[inode++] = node; +} + +function initTree() { + tree = new dFTree({name: 'tree', icondir: '../images/tree'}); + tree.useIcons = true; + var i = 0; + var pid = []; + createNode(i++, 'Applications', -1); //root node + + pid[0] = i; + createNode(i++, 'My first application', 0); + + pid[1] = i; + createNode(i++, 'Components [1]', pid[0]); + createNode(i++, 'Initialization [1]', pid[1]); + pid[2] = i; + createNode(i++, 'Experimental design [1]', pid[1]); + createNode(i++, 'Experimental design [1.1]', pid[2]); + createNode(i++, 'Input generating [1]', pid[1]); + createNode(i++, 'Model launching [1]', pid[1]); + createNode(i++, 'Output processing [1]', pid[1]); + + pid[1] = i; + createNode(i++, 'Explorations', pid[0]); + pid[2] = i; + createNode(i++, 'First Exploration [1]', pid[1]); + pid[3] = i; + createNode(i++, 'Factors [1]', pid[2]); + createNode(i++, 'F1 = range(2,10,2)', pid[3]); + createNode(i++, 'F2 = (0.2,0.8)', pid[3]); + pid[3] = i; + createNode(i++, 'Constants [1]', pid[2]); + pid[4] = i; + createNode(i++, 'Input generating', pid[3]); + createNode(i++, 'ageMax = 12', pid[4]); + pid[4] = i; + createNode(i++, 'Output processing', pid[3]); + createNode(i++, 'diagramTitle = \'first application\'', pid[4]); + + pid[0] = i; + createNode(i++, 'My second application', 0); + createNode(i++, 'Components', pid[0]); + createNode(i++, 'Explorations', pid[0]); + + for (var j = 0; j < inode; j++) { + nodes[j].open(); + } +} Added: trunk/simexplorer-is-web/src/xmi/simexplorer-is-web.zargo =================================================================== (Binary files differ) Property changes on: trunk/simexplorer-is-web/src/xmi/simexplorer-is-web.zargo ___________________________________________________________________ Name: svn:mime-type + application/octet-stream
participants (1)
-
glandais@users.labs.libre-entreprise.org