syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilgro...@apache.org
Subject [3/3] syncope git commit: Minor fixes to Approvals
Date Wed, 04 Apr 2018 07:18:05 GMT
Minor fixes to Approvals


Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/888fcc10
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/888fcc10
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/888fcc10

Branch: refs/heads/2_0_X
Commit: 888fcc107a9a1c127760c0fdb06806a658e31d53
Parents: 00ede3c
Author: Francesco Chicchiriccò <ilgrosso@apache.org>
Authored: Wed Apr 4 09:17:44 2018 +0200
Committer: Francesco Chicchiriccò <ilgrosso@apache.org>
Committed: Wed Apr 4 09:17:44 2018 +0200

----------------------------------------------------------------------
 .../syncope/client/console/approvals/Approval.java      |  4 ++--
 .../console/approvals/ApprovalDirectoryPanel.java       | 12 +++++-------
 .../syncope/client/console/approvals/ApprovalModal.java |  9 +++++----
 .../syncope/client/console/widgets/JobWidget.java       |  5 +----
 .../client/console/widgets/ApprovalsWidget.properties   |  2 +-
 .../console/widgets/ApprovalsWidget_it.properties       |  2 +-
 .../console/widgets/ApprovalsWidget_pt_BR.properties    |  2 +-
 7 files changed, 16 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/888fcc10/client/console/src/main/java/org/apache/syncope/client/console/approvals/Approval.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/approvals/Approval.java
b/client/console/src/main/java/org/apache/syncope/client/console/approvals/Approval.java
index d56dab8..860ed7a 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/approvals/Approval.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/approvals/Approval.java
@@ -190,7 +190,7 @@ public abstract class Approval extends Panel {
 
             @Override
             public void onClick(final AjaxRequestTarget target) {
-                viewDetails(formTO, target);
+                viewDetails(target);
             }
         };
         MetaDataRoleAuthorizationStrategy.authorize(userDetails, ENABLE, StandardEntitlement.USER_READ);
@@ -202,5 +202,5 @@ public abstract class Approval extends Panel {
         add(userDetails);
     }
 
-    protected abstract void viewDetails(final WorkflowFormTO formTO, final AjaxRequestTarget
target);
+    protected abstract void viewDetails(AjaxRequestTarget target);
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/888fcc10/client/console/src/main/java/org/apache/syncope/client/console/approvals/ApprovalDirectoryPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/approvals/ApprovalDirectoryPanel.java
b/client/console/src/main/java/org/apache/syncope/client/console/approvals/ApprovalDirectoryPanel.java
index 5009635..a324ea3 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/approvals/ApprovalDirectoryPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/approvals/ApprovalDirectoryPanel.java
@@ -115,7 +115,6 @@ public class ApprovalDirectoryPanel
 
     @Override
     protected List<IColumn<WorkflowFormTO, String>> getColumns() {
-
         List<IColumn<WorkflowFormTO, String>> columns = new ArrayList<>();
         columns.add(new PropertyColumn<WorkflowFormTO, String>(
                 new ResourceModel("taskId"), "taskId", "taskId"));
@@ -155,11 +154,10 @@ public class ApprovalDirectoryPanel
 
             @Override
             public void onClick(final AjaxRequestTarget target, final WorkflowFormTO ignore)
{
-                final IModel<WorkflowFormTO> formModel = new CompoundPropertyModel<>(model.getObject());
-                manageApprovalModal.setFormModel(formModel);
+                manageApprovalModal.setFormModel(new CompoundPropertyModel<>(model.getObject()));
 
-                target.add(manageApprovalModal.setContent(new ApprovalModal(manageApprovalModal,
pageRef, model.
-                        getObject()) {
+                target.add(manageApprovalModal.setContent(
+                        new ApprovalModal(manageApprovalModal, pageRef, model.getObject())
{
 
                     private static final long serialVersionUID = 5546519445061007248L;
 
@@ -281,14 +279,14 @@ public class ApprovalDirectoryPanel
         }
 
         @Override
-        public IModel<WorkflowFormTO> model(final WorkflowFormTO configuration) {
+        public IModel<WorkflowFormTO> model(final WorkflowFormTO form) {
             return new AbstractReadOnlyModel<WorkflowFormTO>() {
 
                 private static final long serialVersionUID = -2566070996511906708L;
 
                 @Override
                 public WorkflowFormTO getObject() {
-                    return configuration;
+                    return form;
                 }
             };
         }

http://git-wip-us.apache.org/repos/asf/syncope/blob/888fcc10/client/console/src/main/java/org/apache/syncope/client/console/approvals/ApprovalModal.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/approvals/ApprovalModal.java
b/client/console/src/main/java/org/apache/syncope/client/console/approvals/ApprovalModal.java
index 4a75c06..2408a29 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/approvals/ApprovalModal.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/approvals/ApprovalModal.java
@@ -36,6 +36,8 @@ public class ApprovalModal extends Panel implements SubmitableModalPanel,
Wizard
 
     private static final long serialVersionUID = -8847854414429745216L;
 
+    private final UserWorkflowRestClient restClient = new UserWorkflowRestClient();
+
     private final BaseModal<?> modal;
 
     private final WorkflowFormTO formTO;
@@ -49,22 +51,21 @@ public class ApprovalModal extends Panel implements SubmitableModalPanel,
Wizard
         this.pageRef = pageRef;
 
         final MultilevelPanel mlp = new MultilevelPanel("approval");
-        add(mlp);
-
         mlp.setFirstLevel(new Approval(pageRef, formTO) {
 
             private static final long serialVersionUID = -2195387360323687302L;
 
             @Override
-            protected void viewDetails(final WorkflowFormTO formTO, final AjaxRequestTarget
target) {
+            protected void viewDetails(final AjaxRequestTarget target) {
                 mlp.next(getString("approval.details"), new ApprovalDetails(pageRef, formTO),
target);
             }
         });
+        add(mlp);
     }
 
     @Override
     public void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
-        new UserWorkflowRestClient().submitForm(formTO);
+        this.restClient.submitForm(formTO);
         this.modal.show(false);
         this.modal.close(target);
         SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));

http://git-wip-us.apache.org/repos/asf/syncope/blob/888fcc10/client/console/src/main/java/org/apache/syncope/client/console/widgets/JobWidget.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/widgets/JobWidget.java
b/client/console/src/main/java/org/apache/syncope/client/console/widgets/JobWidget.java
index 98a53e4..5c120ec 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/widgets/JobWidget.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/widgets/JobWidget.java
@@ -643,10 +643,7 @@ public class JobWidget extends BaseWidget {
 
                 @Override
                 public void onClick(final AjaxRequestTarget target, final ExecTO ignore)
{
-
-                    StringResourceModel stringResourceModel = new StringResourceModel("execution.view",
JobWidget.this,
-                            model);
-                    detailModal.header(stringResourceModel);
+                    detailModal.header(new StringResourceModel("execution.view", JobWidget.this,
model));
                     detailModal.setContent(new ExecMessageModal(model.getObject().getMessage()));
                     detailModal.show(true);
                     target.add(detailModal);

http://git-wip-us.apache.org/repos/asf/syncope/blob/888fcc10/client/console/src/main/resources/org/apache/syncope/client/console/widgets/ApprovalsWidget.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/widgets/ApprovalsWidget.properties
b/client/console/src/main/resources/org/apache/syncope/client/console/widgets/ApprovalsWidget.properties
index bdf7ec7..dd5b98f 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/widgets/ApprovalsWidget.properties
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/widgets/ApprovalsWidget.properties
@@ -14,7 +14,7 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-alerts.view.all=View All approvals
+alerts.view.all=View all approvals
 duedate=Due date
 owner=Owner
 createApproval=Create Approval

http://git-wip-us.apache.org/repos/asf/syncope/blob/888fcc10/client/console/src/main/resources/org/apache/syncope/client/console/widgets/ApprovalsWidget_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/widgets/ApprovalsWidget_it.properties
b/client/console/src/main/resources/org/apache/syncope/client/console/widgets/ApprovalsWidget_it.properties
index ca41eeb..7b2287e 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/widgets/ApprovalsWidget_it.properties
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/widgets/ApprovalsWidget_it.properties
@@ -14,7 +14,7 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-alerts.view.all=Tutti le approvazioni
+alerts.view.all=Tutte le approvazioni
 duedate=Scadenza
 owner=Assegnato
 createApproval=Approvazione Creazione

http://git-wip-us.apache.org/repos/asf/syncope/blob/888fcc10/client/console/src/main/resources/org/apache/syncope/client/console/widgets/ApprovalsWidget_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/widgets/ApprovalsWidget_pt_BR.properties
b/client/console/src/main/resources/org/apache/syncope/client/console/widgets/ApprovalsWidget_pt_BR.properties
index 4ded669..c24f3d8 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/widgets/ApprovalsWidget_pt_BR.properties
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/widgets/ApprovalsWidget_pt_BR.properties
@@ -14,7 +14,7 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-alerts.view.all=View All Approvals
+alerts.view.all=View all Approvals
 duedate=Due date
 owner=Owner
 createApproval=Create Approval


Mime
View raw message