Arthur Bogaart pushed to branch master at cms-community / hippo-cms

Commits:
10402b46 by Arthur Bogaart at 2017-03-17T16:19:38+01:00
CMS-9288 Use new Dialog in (de)publish all dialogs

Use auto-height dialog. Remove left-padding on table-data and add
a bit of vertical spacing between message and table-data

- - - - -
e52249e2 by Arthur Bogaart at 2017-03-23T15:11:06+01:00
CMS-9288 Reintegrate bugfix/CMS-9288

- - - - -


3 changed files:

- api/src/main/styling/styles/_modal.scss
- 
workflow/frontend/src/main/java/org/hippoecm/frontend/plugins/reviewedactions/ExtendedFolderWorkflowPlugin$ConfirmBulkWorkflowDialog.html
- 
workflow/frontend/src/main/java/org/hippoecm/frontend/plugins/reviewedactions/ExtendedFolderWorkflowPlugin.java


Changes:

=====================================
api/src/main/styling/styles/_modal.scss
=====================================
--- a/api/src/main/styling/styles/_modal.scss
+++ b/api/src/main/styling/styles/_modal.scss
@@ -517,6 +517,17 @@ table.hippo-window-form {
   padding: 5px;
 }
 
+.hippo-window-form.no-left-padding {
+  padding-left: 0;
+  td {
+    padding-left: 0;
+  }
+}
+
+.hippo-window-form.top-margin {
+  margin-top: 12px;
+}
+
 .hippo-window-form .hippo-form-select {
   width: 300px;
 }


=====================================
workflow/frontend/src/main/java/org/hippoecm/frontend/plugins/reviewedactions/ExtendedFolderWorkflowPlugin$ConfirmBulkWorkflowDialog.html
=====================================
--- 
a/workflow/frontend/src/main/java/org/hippoecm/frontend/plugins/reviewedactions/ExtendedFolderWorkflowPlugin$ConfirmBulkWorkflowDialog.html
+++ 
b/workflow/frontend/src/main/java/org/hippoecm/frontend/plugins/reviewedactions/ExtendedFolderWorkflowPlugin$ConfirmBulkWorkflowDialog.html
@@ -1,5 +1,5 @@
 <!--
-  * Copyright 2008-2013 Hippo B.V. (http://www.onehippo.com)
+  * Copyright 2008-2017 Hippo B.V. (http://www.onehippo.com)
   *
   * Licensed under the Apache License, Version 2.0 (the  "License");
   * you may not use this file except in compliance with the License.
@@ -15,20 +15,22 @@
 -->
 <html xmlns:wicket="http://wicket.apache.org/";>
   <wicket:extend>
-    <div wicket:id="text"/>
-    <table class="hippo-window-form">
-      <tr>
-        <td><wicket:message key="location-label" /></td>
-        <td><span wicket:id="location"/></td>
-      </tr>
-      <tr>
-        <td><span wicket:id="counttext"/></td>
-        <td><span wicket:id="count"/></td>
-      </tr>
-      <wicket:enclosure child="affected"><tr>
-        <td><wicket:message key="affected-label"/></td>
-        <td><span wicket:id="affected"/></td>
-      </tr></wicket:enclosure>
-    </table>
+    <div class="hippo-dialog-body">
+      <div class="label" wicket:id="text"/>
+      <table class="hippo-window-form no-left-padding top-margin">
+        <tr>
+          <td><wicket:message key="location-label" /></td>
+          <td><span wicket:id="location"/></td>
+        </tr>
+        <tr>
+          <td><span wicket:id="counttext"/></td>
+          <td><span wicket:id="count"/></td>
+        </tr>
+        <wicket:enclosure child="affected"><tr>
+          <td><wicket:message key="affected-label"/></td>
+          <td><span wicket:id="affected"/></td>
+        </tr></wicket:enclosure>
+      </table>
+    </div>
   </wicket:extend>
 </html>


=====================================
workflow/frontend/src/main/java/org/hippoecm/frontend/plugins/reviewedactions/ExtendedFolderWorkflowPlugin.java
=====================================
--- 
a/workflow/frontend/src/main/java/org/hippoecm/frontend/plugins/reviewedactions/ExtendedFolderWorkflowPlugin.java
+++ 
b/workflow/frontend/src/main/java/org/hippoecm/frontend/plugins/reviewedactions/ExtendedFolderWorkflowPlugin.java
@@ -1,5 +1,5 @@
 /*
- *  Copyright 2009-2016 Hippo B.V. (http://www.onehippo.com)
+ *  Copyright 2009-2017 Hippo B.V. (http://www.onehippo.com)
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -32,11 +32,10 @@ import org.apache.wicket.model.Model;
 import org.apache.wicket.model.PropertyModel;
 import org.apache.wicket.model.StringResourceModel;
 import org.apache.wicket.request.cycle.RequestCycle;
-import org.apache.wicket.util.value.IValueMap;
-import org.hippoecm.addon.workflow.AbstractWorkflowDialog;
 import org.hippoecm.addon.workflow.IWorkflowInvoker;
 import org.hippoecm.addon.workflow.StdWorkflow;
 import org.hippoecm.addon.workflow.WorkflowDescriptorModel;
+import org.hippoecm.addon.workflow.WorkflowDialog;
 import org.hippoecm.frontend.dialog.DialogConstants;
 import org.hippoecm.frontend.dialog.IDialogService.Dialog;
 import org.hippoecm.frontend.plugin.IPluginContext;
@@ -48,6 +47,7 @@ import org.hippoecm.frontend.skin.Icon;
 import org.hippoecm.repository.api.HippoNode;
 import org.hippoecm.repository.api.HippoWorkspace;
 import org.hippoecm.repository.api.Workflow;
+import org.hippoecm.repository.api.WorkflowDescriptor;
 import org.hippoecm.repository.api.WorkflowException;
 import org.hippoecm.repository.api.WorkflowManager;
 import org.hippoecm.repository.util.NodeIterable;
@@ -176,16 +176,18 @@ public class ExtendedFolderWorkflowPlugin extends 
RenderPlugin {
         return (WorkflowDescriptorModel) super.getModel();
     }
 
-    public class ConfirmBulkWorkflowDialog extends AbstractWorkflowDialog {
+    public class ConfirmBulkWorkflowDialog extends 
WorkflowDialog<WorkflowDescriptor> {
 
-        private IModel<String> title;
         private Label affectedComponent;
         private final String workflowAction;
 
-        public ConfirmBulkWorkflowDialog(IWorkflowInvoker action, 
IModel<String> dialogTitle, IModel dialogText,
+        public ConfirmBulkWorkflowDialog(IWorkflowInvoker invoker, 
IModel<String> dialogTitle, IModel dialogText,
                                          IModel dialogSubText, IModel 
folderName, Set<String> documents, String workflowAction) {
-            super(ExtendedFolderWorkflowPlugin.this.getModel(), action);
-            this.title = dialogTitle;
+            super(invoker, ExtendedFolderWorkflowPlugin.this.getModel());
+
+            setTitle(dialogTitle);
+            setSize(DialogConstants.MEDIUM_AUTO);
+
             this.workflowAction = workflowAction;
             try {
                 Node folder = getWorkflowDescriptorModel().getNode();
@@ -242,16 +244,6 @@ public class ExtendedFolderWorkflowPlugin extends 
RenderPlugin {
         }
 
         @Override
-        public IModel<String> getTitle() {
-            return title;
-        }
-
-        @Override
-        public IValueMap getProperties() {
-            return DialogConstants.MEDIUM;
-        }
-
-        @Override
         protected void handleSubmit() {
             setOkVisible(false);
             setCancelLabel(new StringResourceModel("done-label", 
ConfirmBulkWorkflowDialog.this, null));



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-cms/compare/f4fad6a81d09869395f14b360661e03bb4dc81b7...e52249e2e5ca61675571353188a8899116d81a0b
_______________________________________________
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn

Reply via email to