]> SALOME platform Git repositories - tools/siman.git/commitdiff
Salome HOME
Screens style are improved
authormka <mka@opencascade.com>
Tue, 13 Nov 2012 13:54:40 +0000 (13:54 +0000)
committermka <mka@opencascade.com>
Tue, 13 Nov 2012 13:54:40 +0000 (13:54 +0000)
Workspace/Siman/WebContent/study/displayStudy.jsp [new file with mode: 0644]
Workspace/Siman/src/struts.xml

diff --git a/Workspace/Siman/WebContent/study/displayStudy.jsp b/Workspace/Siman/WebContent/study/displayStudy.jsp
new file mode 100644 (file)
index 0000000..b9b66fc
--- /dev/null
@@ -0,0 +1,235 @@
+<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
+    pageEncoding="ISO-8859-1"
+%>
+<%@
+    taglib prefix="s" uri="/struts-tags"
+%>
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+
+<!-- Initialization of the edit action, if any
+     =============================================================================================================================
+  -->
+<%  String              action = request.getParameter("action");   
+    String              type   = request.getParameter("index");
+    if (action == null) action = "display";
+%>
+<s:set var="todo"><%=action%></s:set>
+<html>
+
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+    <title><s:text name="name.module"/></title>
+    <link href=<s:url value="/skin/default.css"/> rel="stylesheet" type="text/css">
+    <link href="../rtef/rte.css" rel="stylesheet" type="text/css">
+    <script language="JavaScript" type="text/javascript" src="../rtef/lang/fr.js"></script>
+    <script language="JavaScript" type="text/javascript" src="../rtef/richtext.js"></script>
+    <script language="JavaScript" type="text/javascript" src="../rtef/xhtml.js"></script>
+    <script language="JavaScript" type="text/javascript" src="../js/popup.js"></script>
+    <script language="JavaScript" type="text/javascript" src="../js/action.js"></script>
+
+    <script language="JavaScript">
+    
+    initTextEditor();
+
+    var substitutions = new Array (
+      new RegExp("[\r\n]",'g'),   " ",                // For removing carriage returns & line feeds
+      new RegExp("<p>&nbsp;"),    "<p>",              // For removing &nbsp; of the 1st paragraph
+      new RegExp("&nbsp;</p>"),   "</p>",             // For removing &nbsp; of the 1st paragraph
+      
+      new RegExp("&eacute;",'g'), "é",
+      new RegExp("&egrave;",'g'), "è",
+      new RegExp("&ecirc;",'g'),  "ê",
+      new RegExp("&euml;",'g'),   "ë",
+      new RegExp("&agrave;",'g'), "à",
+      new RegExp("&acirc;",'g'),  "â",
+      new RegExp("&icirc;",'g'),  "î",
+      new RegExp("&iuml;",'g'),   "ï",
+      new RegExp("&ocirc;",'g'),  "ô",
+      new RegExp("&ugrave;",'g'), "ù",
+      new RegExp("&ucirc;",'g'),  "û",
+      new RegExp("&uuml;",'g'),   "ü",
+      
+      new RegExp("&ccedil;",'g'), "ç"
+    );
+    
+    function initialize (action) {
+//  ----------------------------
+      if (action == "setContext") {
+         edit.elements[2].focus();
+      } else
+      if (action == "renameDocument") {
+        edoc.documentTitle.focus();
+      } else
+      if (action == "renameKnowledge") {
+        edit.knowledgeTitle.focus();
+      } else
+      if (action == "addKnowledge") {
+        edit.elements[1].focus();
+      } else
+      if (action != "display") {
+         edit.elements[0].focus();
+      }
+    }
+    function setValue () {
+//  -------------------
+      var select = edit.elements[0].value;  // contextValue select input
+      if (select == "0") {                  // Creation of a new context type
+        tds = document.getElementById("select");
+        tde = document.getElementById("enter");
+        tds.style.display = "none";         // Hides the select input
+        tde.style.display = "block";        // Displays the text input
+      }
+      edit.elements[2].focus();
+    }
+    function clean (html) {
+//  ---------------------     
+      html = trim(html);
+      for (i=0; i<substitutions.length; i = i+2) {
+        html = html.replace(substitutions[i], substitutions[i+1]);
+      }
+      return html;
+    }
+    function submitEdit () {
+//  ----------------------     
+      updateRTEs();   // Sets the value of knowledgeValue input    
+      edit.knowledgeValue.value = clean(edit.knowledgeValue.value);
+      edit.submit();
+    }
+    </script>
+  </head>
+
+  <body onLoad="initialize('<%=action%>')">
+<!-- Menu-bar
+     =============================================================================================================================
+  -->
+    <jsp:include page="/jsp/menubar.jsp" />
+
+<!-- Title-bar
+     =============================================================================================================================
+  -->
+    <jsp:include page="/jsp/titlebar.jsp" />
+
+<!-- Left pane
+     =============================================================================================================================
+  -->
+    <div id=left-pane>
+      <jsp:include page="/jsp/toolbar.jsp" />          
+      <div id=top-spacer></div>
+      <jsp:include page="/jsp/menuitem.jsp" />
+      <jsp:include page="/jsp/studyProperties.jsp" />
+    </div>
+
+    <div id=main-pane>
+
+<!-- Description and simulation context sections
+     =============================================================================================================================
+
+     Display of tabs
+  -->
+      <div id="tab-bar">
+      <div id="tab-description">
+          <span id="tab-front">&nbsp;&nbsp;<s:text name="title.description"/>&nbsp;&nbsp;</span>
+      </div>
+      <div id="tab-context">
+          <span id="tab-front">&nbsp;&nbsp;<s:text name="title.context"/>&nbsp;&nbsp;</span>
+      </div>
+      </div>
+
+<!-- Display of contents
+  -->
+      <div id="article-box">
+        <table width=100% border=0 cellspacing=0 cellpadding=0>
+          <tr valign=top>
+          <td width=38%>     <!-- Must conform to the width of above tab-description -->
+            <div id="top-spacer"></div>
+            <div id=article-body class=text>
+              <jsp:include page="/jsp/readDescription.jsp">
+                <jsp:param name="entity" value="study" />
+              </jsp:include>
+            </div>
+          </td>
+          <td width=1></td>    <!-- Trick for aligning the vertical separator with the tab -->
+          <td width=1 bgcolor=#AAAAAA></td>
+          <td>
+            <div id="top-spacer"></div>
+            <div id="article-body">
+              <s:if test="%{#todo == 'newContext' || #todo == 'selectContext' || #todo == 'setContext'}">
+                <form name="edit" action="<%=action%>?selection=<s:property value="selection"/>" method="post">
+                  <jsp:include page="/jsp/editContext.jsp">
+                    <jsp:param name="action" value="<%=action%>" />
+                    <jsp:param name="type"   value="<%=type%>" />
+                  </jsp:include>
+                </form>
+              </s:if>
+              <s:else>
+                <jsp:include page="/jsp/readContext.jsp" />
+              </s:else>
+            </div>
+          </td>
+          </tr>
+        </table>
+      </div>
+
+<!-- Knowledge elements section
+     =============================================================================================================================
+  -->
+      <s:if test="knowledges != null">
+      <div id=article-box>
+        <div id=section><s:text name="title.knowledge"/></div>
+        <div id=article-body class=text>
+          <s:if test="%{#todo == 'addKnowledge' || #todo == 'renameKnowledge' || #todo == 'editKnowledge'}">
+            <form name="edit" action="setKnowledge" method="post">
+            <jsp:include page="/jsp/editKnowledge.jsp">
+              <jsp:param name="action" value="<%=action%>" />
+              <jsp:param name="index"  value="<%=type%>" />
+            </jsp:include>
+            </form>
+          </s:if>
+          <s:else>
+            <jsp:include page="/jsp/readKnowledge.jsp">
+              <jsp:param name="entity" value="study" />
+            </jsp:include>
+          </s:else>
+        </div>
+      </div>
+      </s:if>
+
+<!-- Documents section
+     =============================================================================================================================
+  -->
+      <s:if test="documents != null">
+      <div id=article-box>
+        <div id=section><s:text name="title.document"/></div>
+        <div id=article-body class=text>
+          <s:if test="%{writeAccess == 'true' && stepEnabled == 'true'}">
+            <form name="edoc" action="setDocument" method="post">
+            <jsp:include page="/jsp/editContents.jsp">
+              <jsp:param name="action" value="<%=action%>" />
+              <jsp:param name="index"  value="<%=type%>" />
+            </jsp:include>
+            </form>
+          </s:if>
+          <s:else>
+            <jsp:include page="/jsp/readContents.jsp">
+              <jsp:param name="entity" value="study" />
+            </jsp:include>
+          </s:else>
+        </div>
+      </div>
+
+<!-- Comment section
+     =============================================================================================================================
+  -->
+      <s:if test="%{writeAccess == 'true' && stepEnabled == 'true'}">
+      <div id=article-box>
+        <div id=section><s:text name="title.comment"/></div>
+        <div id=article-body class=text>
+          <jsp:include page="/jsp/readComment.jsp"/>
+        </div>
+      </div>
+      </s:if>
+      </s:if>
+
+    </div>
+  </body>
+</html>
\ No newline at end of file
index 50f5fd11d57669937cb4b4659cd2266a3ed5dfec..c086ca465bf2c0d2f4650c7c7aa4ea2e8278f840 100644 (file)
         <!-- Edition of simulation contexts
           -->        
         <action name="add-context" class="editSimulationContextAction" method="initialize">
-            <result name="create">/study/displayStudyStep.jsp?action=newContext</result>
-            <result name="select">/study/displayStudyStep.jsp?action=selectContext</result>
+            <result name="create">/study/displayStudy.jsp?action=newContext</result>
+            <result name="select">/study/displayStudy.jsp?action=selectContext</result>
         </action>
         <action name="selectContext" class="editSimulationContextAction" method="selectContext">
-            <result name="create">/study/displayStudyStep.jsp?action=newContext</result>
-            <result name="set">/study/displayStudyStep.jsp?action=setContext&amp;index=%{contextType.index}</result>
+            <result name="create">/study/displayStudy.jsp?action=newContext</result>
+            <result name="set">/study/displayStudy.jsp?action=setContext&amp;index=%{contextType.index}</result>
         </action>
         <action name="newContext" class="editSimulationContextAction" method="createContext">
             <result name="success" type="tiles">page.displaystudy</result>
-            <result name="input">/study/displayStudyStep.jsp?action=newContext</result>
+            <result name="input">/study/displayStudy.jsp?action=newContext</result>
             <result name="error" type="tiles">page.displaystudy</result>
         </action>
         <action name="setContext" class="editSimulationContextAction" method="setContext">
             <result name="success" type="tiles">page.displaystudy</result>
-            <result name="input">/study/displayStudyStep.jsp?action=setContext&amp;index=%{contextType.index}</result>
+            <result name="input">/study/displayStudy.jsp?action=setContext&amp;index=%{contextType.index}</result>
             <result name="error" type="tiles">page.displaystudy</result>
         </action>
         <action name="remove-context" class="editSimulationContextAction" method="deleteContext">
         <!-- Edition of knowledge elements
           -->        
         <action name="add-knowledge" class="editKnowledgeElementAction" method="initialize">
-            <result name="success">/study/displayStudyStep.jsp?action=addKnowledge&amp;index=%{knowledgeType}</result>
+                       <result name="success">/study/displayStudy.jsp?action=addKnowledge&amp;index=%{knowledgeType}</result>
         </action>
         <action name="edit-knowledge" class="editKnowledgeElementAction" method="initialize">
             <result name="success" type="tiles">page.displaystudy</result>