Arthur Bogaart pushed to branch bugfix/CMS-9245 at cms-community / hippo-cms
Commits: 762b3105 by Arthur Bogaart at 2017-03-23T15:56:44+01:00 CMS-9245 Move question panel to the top - add factory method for question panel - - - - - 3 changed files: - api/src/main/java/org/hippoecm/addon/workflow/DestinationDialog.html - api/src/main/java/org/hippoecm/addon/workflow/DestinationDialog.java - api/src/main/styling/styles/_modal_destination.scss Changes: ===================================== api/src/main/java/org/hippoecm/addon/workflow/DestinationDialog.html ===================================== --- a/api/src/main/java/org/hippoecm/addon/workflow/DestinationDialog.html +++ b/api/src/main/java/org/hippoecm/addon/workflow/DestinationDialog.html @@ -15,6 +15,9 @@ --> <html xmlns:wicket="http://wicket.apache.org/"> <wicket:extend> - <div class="hippo-dialog-body no-padding" wicket:id="picker"></div> + <div class="hippo-dialog-body no-padding"> + <div wicket:id="question"></div> + <div wicket:id="picker"></div> + </div> </wicket:extend> </html> ===================================== api/src/main/java/org/hippoecm/addon/workflow/DestinationDialog.java ===================================== --- a/api/src/main/java/org/hippoecm/addon/workflow/DestinationDialog.java +++ b/api/src/main/java/org/hippoecm/addon/workflow/DestinationDialog.java @@ -21,6 +21,7 @@ import javax.jcr.Node; import javax.jcr.RepositoryException; import org.apache.wicket.markup.html.basic.Label; +import org.apache.wicket.markup.html.panel.EmptyPanel; import org.apache.wicket.markup.html.panel.Panel; import org.apache.wicket.model.IModel; import org.apache.wicket.model.StringResourceModel; @@ -69,9 +70,7 @@ public abstract class DestinationDialog extends Dialog<Void> implements IWorkflo this.destination = destination; this.intialPath = getDestinationPath(); - if (question != null && answer != null) { - addOrReplace(new QuestionPanel(Dialog.BOTTOM_LEFT_ID, question, answer)); - } + add(createQuestionPanel("question", question, answer)); IPluginConfigService pluginConfigService = context.getService(IPluginConfigService.class.getName(), IPluginConfigService.class); @@ -136,6 +135,14 @@ public abstract class DestinationDialog extends Dialog<Void> implements IWorkflo super.render(target); } + protected Panel createQuestionPanel(final String id, final IModel<String> question, final IModel<String> answer) { + if (question != null && answer != null) { + return new QuestionPanel(id, question, answer); + } else { + return new EmptyPanel(id); + } + } + @Override protected void onOk() { try { ===================================== api/src/main/styling/styles/_modal_destination.scss ===================================== --- a/api/src/main/styling/styles/_modal_destination.scss +++ b/api/src/main/styling/styles/_modal_destination.scss @@ -1,22 +1,25 @@ -.hippo-dialog-bottom-left .question-answer { - margin-left: 16px; - height: 100%; +.hippo-dialog-body .question-answer { display: flex; - justify-content: center; + height: 100%; + justify-content: flex-start; + margin-left: 16px; + padding-bottom: 8px; + padding-top: 8px; .question{ - line-height: 32px; - margin-right: 8px; align-self: center; + line-height: 30px; + margin-right: 8px; } .answer { - display: flex; align-items: center; + display: flex; input { + height: 28px; + line-height: 28px; padding-left: 4px; - line-height: 30px; width: 320px; } } View it on GitLab: https://code.onehippo.org/cms-community/hippo-cms/commit/762b310581ea3650ba7be112d10f3d0ec87161de
_______________________________________________ Hippocms-svn mailing list Hippocms-svn@lists.onehippo.org https://lists.onehippo.org/mailman/listinfo/hippocms-svn