]> SALOME platform Git repositories - tools/siman.git/commitdiff
Salome HOME
Pop-up menu for knowledge is changed in accordance with specification
authormka <mka@opencascade.com>
Mon, 1 Apr 2013 15:03:05 +0000 (15:03 +0000)
committermka <mka@opencascade.com>
Mon, 1 Apr 2013 15:03:05 +0000 (15:03 +0000)
Workspace/Siman/src/org/splat/simer/ApplicationSettings.java

index a30dd31f205cb74a73566486b633d84d1eee7cbd..8b092a5fb42534e2f732ca42163365375870379d 100644 (file)
@@ -21,7 +21,6 @@ import org.splat.dal.bo.kernel.User;
 import org.splat.dal.bo.som.Document;
 import org.splat.dal.bo.som.DocumentType;
 import org.splat.dal.bo.som.KnowledgeElement;
-import org.splat.dal.bo.som.ProgressState;
 import org.splat.dal.bo.som.SimulationContext;
 import org.splat.dal.bo.som.Visibility;
 import org.splat.manox.XDOM;
@@ -983,13 +982,6 @@ public class ApplicationSettings {
 
                private FeedbexPopup() {
                        super();
-                       addItem(MNU_PROMOTE, new PopupItem(MNU_NAME_PROMOTE).icon(
-                                       "image.review.png").action("promote-knowledge")
-                                       .confirmation("message.promote.knowledge"));
-                       addItem(MNU_DEMOTE, new PopupItem(MNU_NAME_DEMOTE).icon(
-                                       "image.invalidate.png").action("demote-knowledge")
-                                       .confirmation("message.demote.knowledge"));
-                       addSeparator();
                        addItem(MNU_RENAME, new PopupItem(MNU_NAME_RENAME)
                                        .action("edit-knowledge?action=renameKnowledge"));
                        addItem(MNU_EDIT, new PopupItem(MNU_NAME_EDIT)
@@ -1002,17 +994,7 @@ public class ApplicationSettings {
 
                @Override
                public boolean isEnabled(final String name) {
-                       Item item = Item.valueOf(name);
                        boolean res = true;
-
-                       if (item == Item.promote) {
-                               if (_owner.getProgressState() != ProgressState.inDRAFT) {
-                                       res = false;
-                               }
-                       } else if ((item == Item.demote)
-                                       && (_owner.getProgressState() != ProgressState.inCHECK)) {
-                               res = false;
-                       }
                        return res;
                }