From: rkv Date: Mon, 10 Dec 2012 13:07:30 +0000 (+0000) Subject: displayStudy.jsp is removed, markup is fixed. KnowledgeElement deleting is fixed. X-Git-Tag: Root_Delivery2_2013_04_22~208 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=615b422033eb4420ce0853e06b19709c3a07410f;p=tools%2Fsiman.git displayStudy.jsp is removed, markup is fixed. KnowledgeElement deleting is fixed. --- diff --git a/Workspace/Siman-Common/src/org/splat/service/ScenarioServiceImpl.java b/Workspace/Siman-Common/src/org/splat/service/ScenarioServiceImpl.java index 0c250e9..fa1f31e 100644 --- a/Workspace/Siman-Common/src/org/splat/service/ScenarioServiceImpl.java +++ b/Workspace/Siman-Common/src/org/splat/service/ScenarioServiceImpl.java @@ -749,7 +749,8 @@ public class ScenarioServiceImpl implements ScenarioService { aUser); if (res) { if (aScenario.isCheckedout() - && (!aScenario.getUser().getUsername().equals(aUser.getUsername()))) { + && (!aScenario.getUser().getUsername().equals( + aUser.getUsername()))) { throw new NotApplicableException(MessageKeyEnum.SCN_000008 .toString(), scenarioId, aScenario.getUser() .getUsername()); @@ -885,28 +886,27 @@ public class ScenarioServiceImpl implements ScenarioService { * the knowledge element to remove * @return true if removal succeeded */ + @Transactional public boolean removeKnowledgeElement(final Scenario scenario, final KnowledgeElement kelm) { KnowledgeElement torem = scenario.getKnowledgeElement(kelm.getIndex()); - if (torem == null) { - return false; - } - boolean done = scenario.getKnowledgeElements().remove(torem); - if (done) { - // Update of my transient data - // RKV: These transient data are not used indeed. - // RKV: List kelms = scenario.getKnowledgeByType().get( - // RKV: kelm.getType().getIndex()); - // RKV: kelms.remove(torem); - if (scenario.getKnowledgeElementsList() != null) { - scenario.getKnowledgeElementsList().remove(torem); + boolean isOk = (torem != null); + if (isOk) { + isOk = scenario.getKnowledgeElements().remove(torem); + if (isOk) { + getScenarioDAO().merge(scenario); + // Update of my transient data + // RKV: These transient data are not used indeed. + // RKV: List kelms = scenario.getKnowledgeByType().get( + // RKV: kelm.getType().getIndex()); + // RKV: kelms.remove(torem); + if (scenario.getKnowledgeElementsList() != null) { + scenario.getKnowledgeElementsList().remove(torem); + } + // TODO: If the owner study is not private, remove the knowledge from the Lucene index } - getScenarioDAO().update(scenario); - // TODO: If the owner study is not private, remove the knowledge from the Lucene index - return true; - } else { - return false; } + return isOk; } /** diff --git a/Workspace/Siman/WebContent/WEB-INF/tiles/tiles-defs.xml b/Workspace/Siman/WebContent/WEB-INF/tiles/tiles-defs.xml index 4d1b001..878eceb 100644 --- a/Workspace/Siman/WebContent/WEB-INF/tiles/tiles-defs.xml +++ b/Workspace/Siman/WebContent/WEB-INF/tiles/tiles-defs.xml @@ -63,8 +63,21 @@ - + + + + + + + + + + + + + + diff --git a/Workspace/Siman/WebContent/jap/splat-launcher.jar b/Workspace/Siman/WebContent/jap/splat-launcher.jar index 5877292..8bb900a 100644 Binary files a/Workspace/Siman/WebContent/jap/splat-launcher.jar and b/Workspace/Siman/WebContent/jap/splat-launcher.jar differ diff --git a/Workspace/Siman/WebContent/jap/splat-signedlauncher.jar b/Workspace/Siman/WebContent/jap/splat-signedlauncher.jar index cbec878..f2a64e4 100644 Binary files a/Workspace/Siman/WebContent/jap/splat-signedlauncher.jar and b/Workspace/Siman/WebContent/jap/splat-signedlauncher.jar differ diff --git a/Workspace/Siman/WebContent/js/popup.js b/Workspace/Siman/WebContent/js/popup.js index 7c3767d..5acc0ea 100644 --- a/Workspace/Siman/WebContent/js/popup.js +++ b/Workspace/Siman/WebContent/js/popup.js @@ -100,9 +100,3 @@ } return true; } - -//// For making easier on the eyes and fingers -// function $(id) { -//// -------------- -// return document.getElementById(id); -// } \ No newline at end of file diff --git a/Workspace/Siman/WebContent/jsp/editContext.jsp b/Workspace/Siman/WebContent/jsp/editContext.jsp index 983161d..273d7b8 100644 --- a/Workspace/Siman/WebContent/jsp/editContext.jsp +++ b/Workspace/Siman/WebContent/jsp/editContext.jsp @@ -3,13 +3,11 @@ %> <%@ taglib prefix="s" uri="/struts-tags" %> -<%=request.getParameter("action")%> -<%=request.getParameter("type")%> - + @@ -82,7 +80,7 @@
- + diff --git a/Workspace/Siman/WebContent/jsp/readKnowledge.jsp b/Workspace/Siman/WebContent/jsp/readKnowledge.jsp index 0a74809..a1d402d 100644 --- a/Workspace/Siman/WebContent/jsp/readKnowledge.jsp +++ b/Workspace/Siman/WebContent/jsp/readKnowledge.jsp @@ -113,7 +113,7 @@ <%=type.getIndex().toString()%> diff --git a/Workspace/Siman/WebContent/study/displayStudy.jsp b/Workspace/Siman/WebContent/study/displayStudy.jsp deleted file mode 100644 index 753263b..0000000 --- a/Workspace/Siman/WebContent/study/displayStudy.jsp +++ /dev/null @@ -1,235 +0,0 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1" -%> -<%@ - taglib prefix="s" uri="/struts-tags" -%> - - - -<% String action = request.getParameter("action"); - String type = request.getParameter("index"); - if (action == null) action = "display"; -%> -<%=action%> - - - - - <s:text name="name.module"/> - " rel="stylesheet" type="text/css"> - " rel="stylesheet" type="text/css"> - - - - - - - - - - - - - - - - - -
- -
- - -
- -
- - -
-
-      -
-
-      -
-
- - -
-
" border="none" title="" /> @@ -99,7 +97,7 @@ - +
" border="none" title="" /> @@ -121,7 +119,7 @@ @@ -132,7 +130,7 @@ - "> + ">
- + " onMouseOver=this.src="" onMouseOut=this.src="" border="none" title="" />
- - - - - - -
-
-
- - - -
-
-
-
- -
" method="post"> - - - - -
-
- - - -
-
- - - - -
-
-
- -
- - - - -
-
- - - - - -
-
-
- - - -
-
-
- -
- - - - -
-
- - - - - -
-
- - - -
-
-
- -
-
-
-
- - - - \ No newline at end of file diff --git a/Workspace/Siman/WebContent/study/displayStudyStep.jsp b/Workspace/Siman/WebContent/study/displayStudyStep.jsp index 37d5b79..8039f65 100644 --- a/Workspace/Siman/WebContent/study/displayStudyStep.jsp +++ b/Workspace/Siman/WebContent/study/displayStudyStep.jsp @@ -1,11 +1,6 @@ <%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1" -%> -<%@ - taglib prefix="s" uri="/struts-tags" -%> - - + pageEncoding="ISO-8859-1"%> +<%@ taglib prefix="s" uri="/struts-tags"%> @@ -14,9 +9,8 @@ if (action == null) action = "display"; %> <%=action%> - - rel="stylesheet" type="text/css"> + " rel="stylesheet" type="text/css"> @@ -92,10 +86,11 @@ edit.knowledgeValue.value = clean(edit.knowledgeValue.value); edit.submit(); } + $(document).ready(function (){ + initialize('<%=action%>'); + }); - - - /study/displayStudy.jsp?action=newContext - /study/displayStudy.jsp?action=selectContext + page.newcontext + page.selectcontext - /study/displayStudy.jsp?action=newContext - /study/displayStudy.jsp?action=setContext&index=%{contextType.index} + page.newcontext + page.setcontext page.displaystudy - /study/displayStudy.jsp?action=newContext + page.newcontext page.displaystudy page.displaystudy - /study/displayStudy.jsp?action=setContext&index=%{contextType.index} + page.setcontext page.displaystudy @@ -264,7 +264,8 @@ - /study/displayStudy.jsp?action=addKnowledge&index=%{knowledgeType} + + page.displaystudy page.displaystudy