From: rkv Date: Mon, 15 Apr 2013 08:47:06 +0000 (+0000) Subject: Integration of ISR fixes: X-Git-Tag: Root_Delivery2_2013_04_22~33 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=650db369bc893e81d7d532a390d6a3118dcc5bde;p=tools%2Fsiman.git Integration of ISR fixes: 1. External document versioning functionality; 2. Symer.admin consistent translation and openStudy clearing after logout fixes. --- diff --git a/Workspace/Siman-Common/src/org/splat/service/DocumentServiceImpl.java b/Workspace/Siman-Common/src/org/splat/service/DocumentServiceImpl.java index 98d952f..9206760 100644 --- a/Workspace/Siman-Common/src/org/splat/service/DocumentServiceImpl.java +++ b/Workspace/Siman-Common/src/org/splat/service/DocumentServiceImpl.java @@ -537,11 +537,6 @@ public class DocumentServiceImpl implements DocumentService { Document previous = null; // Set of version number - if (state == ProgressState.EXTERN) { - if (aDoc.getProgressState() != ProgressState.EXTERN) { - aDoc.setVersion(null); // Strange use-case... - } - } else { Revision myvers = new Revision(aDoc.getVersion()); if (!myvers.isNull()) { // Versionning context previous = aDoc.getPreviousVersion(); @@ -550,7 +545,7 @@ public class DocumentServiceImpl implements DocumentService { myvers.incrementAs(state); // Incrementation if the reversion number is not imposed } aDoc.setVersion(myvers.toString()); - } + // Update this document and the previous version, if exist if (previous != null) { previous.setHistory(previous.getHistory() + 1); diff --git a/Workspace/Siman-Common/src/org/splat/service/PublicationServiceImpl.java b/Workspace/Siman-Common/src/org/splat/service/PublicationServiceImpl.java index 119a4fc..a901160 100644 --- a/Workspace/Siman-Common/src/org/splat/service/PublicationServiceImpl.java +++ b/Workspace/Siman-Common/src/org/splat/service/PublicationServiceImpl.java @@ -271,7 +271,8 @@ public class PublicationServiceImpl implements PublicationService { // TODO: Remove current document details from the contents of open study // Creation of uses relations - updateRelations(current, next, docuses, docusedby); + Publication syncronizedCurrent = _publicationDAO.get(current.getIndex()); + updateRelations(syncronizedCurrent, next, docuses, docusedby); } /** diff --git a/Workspace/Siman-Common/src/org/splat/som/Revision.java b/Workspace/Siman-Common/src/org/splat/som/Revision.java index 6e79a58..7ba7ed2 100644 --- a/Workspace/Siman-Common/src/org/splat/som/Revision.java +++ b/Workspace/Siman-Common/src/org/splat/som/Revision.java @@ -182,7 +182,7 @@ public class Revision { // ------------------------------------------------- if (state == ProgressState.inWORK || state == ProgressState.inDRAFT) { _minor += 1; - } else if (state == ProgressState.inCHECK) { + } else if (state == ProgressState.inCHECK || state == ProgressState.EXTERN) { _major = _major + 1; _minor = 0; } diff --git a/Workspace/Siman/WebContent/jsp/menubar.jsp b/Workspace/Siman/WebContent/jsp/menubar.jsp index dce6d51..90b11cb 100644 --- a/Workspace/Siman/WebContent/jsp/menubar.jsp +++ b/Workspace/Siman/WebContent/jsp/menubar.jsp @@ -113,12 +113,7 @@
" border="none" /> - - - - - - + |   diff --git a/Workspace/Siman/WebContent/study/displayStudyProperties.jsp b/Workspace/Siman/WebContent/study/displayStudyProperties.jsp index b1a6708..ee2188c 100644 --- a/Workspace/Siman/WebContent/study/displayStudyProperties.jsp +++ b/Workspace/Siman/WebContent/study/displayStudyProperties.jsp @@ -40,14 +40,14 @@ - - , + + , - + @@ -69,8 +69,8 @@ - - , + + , diff --git a/Workspace/Siman/WebContent/study/editStudyProperties.jsp b/Workspace/Siman/WebContent/study/editStudyProperties.jsp index 7ade4c7..b51afeb 100644 --- a/Workspace/Siman/WebContent/study/editStudyProperties.jsp +++ b/Workspace/Siman/WebContent/study/editStudyProperties.jsp @@ -52,7 +52,7 @@
-
+ @@ -72,12 +72,12 @@ " border="none" title=""/> @@ -123,7 +123,7 @@ User user = members.next(); out.print(""); out.print(""); } else { out.print(""); @@ -132,7 +132,7 @@ if (staff.hasNext()) { User user = staff.next(); out.print(""); } else { out.print(""); @@ -145,7 +145,7 @@ out.print(""); out.print(""); out.print(""); out.print(""); }%> @@ -166,14 +166,14 @@ - + @@ -211,7 +211,7 @@ @@ -224,7 +224,7 @@ @@ -249,8 +249,8 @@ @@ -336,8 +336,8 @@ @@ -351,8 +351,8 @@ @@ -371,7 +371,7 @@
- "> + - + "); - out.print(user.toString()); + out.print(controler.getText(user.getDisplayName())); out.print(" "); - out.print(user.toString()); + out.print(controler.getText(user.getDisplayName())); out.print("
"); - out.print(user.toString()); + out.print(controler.getText(user.getDisplayName())); out.print("
- - , + + ,
  - +
  - +
- - , + + ,
- +
diff --git a/Workspace/Siman/src/org/splat/simer/ConnectionAction.java b/Workspace/Siman/src/org/splat/simer/ConnectionAction.java index 4f05316..2b4f6d3 100644 --- a/Workspace/Siman/src/org/splat/simer/ConnectionAction.java +++ b/Workspace/Siman/src/org/splat/simer/ConnectionAction.java @@ -184,6 +184,7 @@ public class ConnectionAction extends Action { LOG.error("Reason:", error); res = ERROR; } + closeStudy(); return res; } diff --git a/Workspace/Siman/src/org/splat/simer/DocumentFacade.java b/Workspace/Siman/src/org/splat/simer/DocumentFacade.java index 25926be..260b2a3 100644 --- a/Workspace/Siman/src/org/splat/simer/DocumentFacade.java +++ b/Workspace/Siman/src/org/splat/simer/DocumentFacade.java @@ -504,13 +504,10 @@ public class DocumentFacade implements HistoryFacade { _description = versions.getDescription(); } // File details - if (_state != ProgressState.EXTERN) { Revision.Format verstring = new Revision.Format( getProjectSettings().getRevisionPattern()); _version = verstring.format(_version); - } - _size = sizstring - .format(_mydoc.getSourceFile().asFile().length() / 1000); + _size = sizstring.format(_mydoc.getSourceFile().asFile().length() / 1000); _date = datstring.format(_mydoc.getLastModificationDate()); // Refresh of the history in case of promotion diff --git a/Workspace/Siman/src/org/splat/simer/VersionDocumentAction.java b/Workspace/Siman/src/org/splat/simer/VersionDocumentAction.java index 9bf9525..90fe6d9 100644 --- a/Workspace/Siman/src/org/splat/simer/VersionDocumentAction.java +++ b/Workspace/Siman/src/org/splat/simer/VersionDocumentAction.java @@ -93,6 +93,9 @@ public class VersionDocumentAction extends BaseUploadDocumentAction { _usedby.addAll(tag.getRelations(UsedByRelation.class)); // Initialize applicable states list + if(tag.value().getProgressState() == ProgressState.EXTERN) { + _documentStates.add(ProgressState.EXTERN); + } else { _documentStates.add(ProgressState.inWORK); if (_deftype != null) { // Check if the validation cycle of the document type can has a review state @@ -102,7 +105,7 @@ public class VersionDocumentAction extends BaseUploadDocumentAction { _documentStates.add(ProgressState.inDRAFT); } } - + } } else { if (!(Constants.NONE.equals(getToolProperty()))) { initializationFullScreenContext(Constants.STUDY_MENU,