syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilgro...@apache.org
Subject [1/3] syncope git commit: [SYNCOPE-156] Completing removal of old XMLEditorPopupPage
Date Wed, 20 Jan 2016 16:33:30 GMT
Repository: syncope
Updated Branches:
  refs/heads/master de21e7165 -> 6ca9d6ea0


[SYNCOPE-156] Completing removal of old XMLEditorPopupPage


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

Branch: refs/heads/master
Commit: 77fa0f61d405de50545c4e8f63309c8b1d47d09f
Parents: de21e71
Author: Francesco Chicchiriccò <ilgrosso@apache.org>
Authored: Wed Jan 20 16:36:23 2016 +0100
Committer: Francesco Chicchiriccò <ilgrosso@apache.org>
Committed: Wed Jan 20 16:36:23 2016 +0100

----------------------------------------------------------------------
 .../client/console/pages/BasePopupPage.java     | 25 ------
 .../syncope/client/console/pages/Workflow.java  | 45 +++++++++-
 .../console/pages/XMLEditorPopupPage.java       | 86 ------------------
 .../console/panels/AbstractModalPanel.java      |  4 -
 .../client/console/panels/RealmModalPanel.java  |  2 +-
 .../panels/XMLWorkflowEditorModalPanel.java     | 95 ++++++++++++++++++++
 .../console/rest/AnyTypeClassRestClient.java    |  2 -
 .../markup/html/bootstrap/dialog/BaseModal.java | 21 +----
 .../syncope/client/console/pages/BasePage.html  |  2 +-
 .../client/console/pages/BasePopupPage.html     | 34 -------
 .../syncope/client/console/pages/Workflow.html  |  1 +
 .../client/console/pages/Workflow.properties    |  1 +
 .../client/console/pages/Workflow_it.properties |  1 +
 .../console/pages/Workflow_pt_BR.properties     |  1 +
 .../console/pages/XMLEditorPopupPage.html       | 78 ----------------
 .../console/pages/XMLEditorPopupPage.properties | 19 ----
 .../pages/XMLEditorPopupPage_it.properties      | 19 ----
 .../pages/XMLEditorPopupPage_pt_BR.properties   | 19 ----
 .../panels/XMLWorkflowEditorModalPanel.html     | 52 +++++++++++
 .../console/panels/CamelRoutesDetailsPanel.java |  8 +-
 .../console/panels/CamelRoutesDetailsPanel.html |  3 +
 21 files changed, 205 insertions(+), 313 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/77fa0f61/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePopupPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePopupPage.java
b/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePopupPage.java
deleted file mode 100644
index 1df5fec..0000000
--- a/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePopupPage.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.client.console.pages;
-
-public class BasePopupPage extends BasePage {
-
-    private static final long serialVersionUID = -2633667311332659505L;
-
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/77fa0f61/client/console/src/main/java/org/apache/syncope/client/console/pages/Workflow.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/Workflow.java
b/client/console/src/main/java/org/apache/syncope/client/console/pages/Workflow.java
index 6d90a19..95fb238 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/pages/Workflow.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/Workflow.java
@@ -18,16 +18,24 @@
  */
 package org.apache.syncope.client.console.pages;
 
+import de.agilecoders.wicket.core.markup.html.bootstrap.dialog.Modal;
+import org.apache.syncope.client.console.panels.XMLWorkflowEditorModalPanel;
 import java.io.File;
 import org.apache.syncope.client.console.SyncopeConsoleApplication;
 import org.apache.syncope.client.console.rest.WorkflowRestClient;
+import org.apache.syncope.client.console.wicket.markup.html.bootstrap.buttons.PrimaryModalButton;
+import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
 import org.apache.syncope.client.console.wicket.markup.html.link.VeilPopupSettings;
 import org.apache.syncope.common.lib.types.StandardEntitlement;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.markup.html.AjaxLink;
 import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
 import org.apache.wicket.markup.html.WebMarkupContainer;
 import org.apache.wicket.markup.html.image.Image;
 import org.apache.wicket.markup.html.link.BookmarkablePageLink;
 import org.apache.wicket.model.Model;
+import org.apache.wicket.model.ResourceModel;
 import org.apache.wicket.request.mapper.parameter.PageParameters;
 import org.apache.wicket.request.resource.DynamicImageResource;
 import org.apache.wicket.request.resource.IResource;
@@ -45,7 +53,7 @@ public class Workflow extends BasePage {
         noActivitiEnabledForUsers.setOutputMarkupPlaceholderTag(true);
         add(noActivitiEnabledForUsers);
 
-        WebMarkupContainer workflowDef = new WebMarkupContainer("workflowDefContainer");
+        final WebMarkupContainer workflowDef = new WebMarkupContainer("workflowDefContainer");
         workflowDef.setOutputMarkupPlaceholderTag(true);
 
         if (wfRestClient.isActivitiEnabledForUsers()) {
@@ -69,12 +77,30 @@ public class Workflow extends BasePage {
         }
         activitiModeler.setEnabled(activitiModelerEnabled);
 
-        BookmarkablePageLink<Void> xmlEditor = new BookmarkablePageLink<>("xmlEditor",
XMLEditorPopupPage.class);
-        xmlEditor.setPopupSettings(new VeilPopupSettings().setHeight(480).setWidth(800));
+        final BaseModal<String> xmlEditorModal = new BaseModal<>("xmlEditorModal");
+        PrimaryModalButton xmlEditorSubmit = xmlEditorModal.addSumbitButton();
+        MetaDataRoleAuthorizationStrategy.authorize(xmlEditorSubmit, ENABLE, StandardEntitlement.WORKFLOW_DEF_UPDATE);
+        xmlEditorModal.size(Modal.Size.Large);
+        add(xmlEditorModal);
+
+        AjaxLink<Void> xmlEditor = new AjaxLink<Void>("xmlEditor") {
+
+            private static final long serialVersionUID = -1964967067512351526L;
+
+            @Override
+            public void onClick(final AjaxRequestTarget target) {
+                target.add(xmlEditorModal.setContent(new XMLWorkflowEditorModalPanel(
+                        xmlEditorModal, wfRestClient, Workflow.this.getPageReference())));
+
+                xmlEditorModal.header(new ResourceModel("xmlEditorTitle"));
+
+                xmlEditorModal.show(true);
+            }
+        };
         MetaDataRoleAuthorizationStrategy.authorize(xmlEditor, ENABLE, StandardEntitlement.WORKFLOW_DEF_READ);
         workflowDef.add(xmlEditor);
 
-        Image workflowDefDiagram = new Image("workflowDefDiagram", new Model<IResource>())
{
+        final Image workflowDefDiagram = new Image("workflowDefDiagram", new Model<IResource>())
{
 
             private static final long serialVersionUID = -8457850449086490660L;
 
@@ -93,8 +119,19 @@ public class Workflow extends BasePage {
                 };
             }
         };
+        workflowDefDiagram.setOutputMarkupId(true);
         workflowDef.add(workflowDefDiagram);
 
+        xmlEditorModal.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() {
+
+            private static final long serialVersionUID = 8804221891699487139L;
+
+            @Override
+            public void onClose(final AjaxRequestTarget target) {
+                target.add(workflowDefDiagram);
+            }
+        });
+
         MetaDataRoleAuthorizationStrategy.authorize(workflowDef, ENABLE, StandardEntitlement.WORKFLOW_DEF_READ);
         add(workflowDef);
     }

http://git-wip-us.apache.org/repos/asf/syncope/blob/77fa0f61/client/console/src/main/java/org/apache/syncope/client/console/pages/XMLEditorPopupPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/XMLEditorPopupPage.java
b/client/console/src/main/java/org/apache/syncope/client/console/pages/XMLEditorPopupPage.java
deleted file mode 100644
index b8b505c..0000000
--- a/client/console/src/main/java/org/apache/syncope/client/console/pages/XMLEditorPopupPage.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.client.console.pages;
-
-import java.io.IOException;
-import javax.ws.rs.core.MediaType;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.syncope.client.console.commons.Constants;
-import org.apache.syncope.client.console.rest.WorkflowRestClient;
-import org.apache.syncope.common.lib.SyncopeClientException;
-import org.apache.syncope.common.lib.types.StandardEntitlement;
-import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.ajax.markup.html.form.AjaxButton;
-import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
-import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxButton;
-import org.apache.wicket.markup.html.form.Button;
-import org.apache.wicket.markup.html.form.Form;
-import org.apache.wicket.markup.html.form.TextArea;
-import org.apache.wicket.model.Model;
-import org.apache.wicket.util.io.IOUtils;
-
-public class XMLEditorPopupPage extends BasePopupPage {
-
-    private static final long serialVersionUID = 5816041644635271734L;
-
-    private final WorkflowRestClient wfRestClient = new WorkflowRestClient();
-
-    public XMLEditorPopupPage() {
-        Form<?> wfForm = new Form<>("workflowDefForm");
-
-        String definition;
-        try {
-            definition = IOUtils.toString(wfRestClient.getDefinition(MediaType.APPLICATION_XML_TYPE));
-        } catch (IOException e) {
-            LOG.error("Could not get workflow definition", e);
-            definition = StringUtils.EMPTY;
-        }
-        final TextArea<String> workflowDefArea = new TextArea<>("workflowDefArea",
new Model<>(definition));
-        wfForm.add(workflowDefArea);
-
-        AjaxButton submit = new IndicatingAjaxButton(APPLY, new Model<>(getString(SUBMIT)))
{
-
-            private static final long serialVersionUID = -958724007591692537L;
-
-            @Override
-            protected void onSubmit(final AjaxRequestTarget target, final Form<?> form)
{
-                try {
-                    wfRestClient.updateDefinition(MediaType.APPLICATION_XML_TYPE, workflowDefArea.getModelObject());
-                    info(getString(Constants.OPERATION_SUCCEEDED));
-                } catch (SyncopeClientException scee) {
-                    error(getString(Constants.ERROR) + ": " + scee.getMessage());
-                }
-                notificationPanel.refresh(target);
-            }
-
-            @Override
-            protected void onError(final AjaxRequestTarget target, final Form<?> form)
{
-                notificationPanel.refresh(target);
-            }
-        };
-
-        final Button close = new Button("closePage", new Model<>(getString(CANCEL)));
-
-        MetaDataRoleAuthorizationStrategy.authorize(submit, ENABLE, StandardEntitlement.WORKFLOW_DEF_UPDATE);
-        wfForm.add(submit);
-        wfForm.add(close);
-        this.add(wfForm);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/77fa0f61/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractModalPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractModalPanel.java
b/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractModalPanel.java
index dae4216..dcb4553 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractModalPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractModalPanel.java
@@ -75,10 +75,6 @@ public class AbstractModalPanel<T extends Serializable> extends Panel
implements
         response.render(new PriorityHeaderItem(meta));
     }
 
-    protected void closeAction(final AjaxRequestTarget target, final Form<?> form)
{
-        this.modal.close(target);
-    }
-
     @Override
     public void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
         modal.getNotificationPanel().refresh(target);

http://git-wip-us.apache.org/repos/asf/syncope/blob/77fa0f61/client/console/src/main/java/org/apache/syncope/client/console/panels/RealmModalPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/RealmModalPanel.java
b/client/console/src/main/java/org/apache/syncope/client/console/panels/RealmModalPanel.java
index 4912dfd..ed6bf82 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/RealmModalPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/RealmModalPanel.java
@@ -81,7 +81,7 @@ public class RealmModalPanel extends AbstractModalPanel<RealmTO> {
             }
 
             info(getString(Constants.OPERATION_SUCCEEDED));
-            closeAction(target, form);
+            modal.close(target);
         } catch (Exception e) {
             LOG.error("While creating or updating realm", e);
             error(getString(Constants.ERROR) + ": " + e.getMessage());

http://git-wip-us.apache.org/repos/asf/syncope/blob/77fa0f61/client/console/src/main/java/org/apache/syncope/client/console/panels/XMLWorkflowEditorModalPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/XMLWorkflowEditorModalPanel.java
b/client/console/src/main/java/org/apache/syncope/client/console/panels/XMLWorkflowEditorModalPanel.java
new file mode 100644
index 0000000..8fdf2ae
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/XMLWorkflowEditorModalPanel.java
@@ -0,0 +1,95 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.client.console.panels;
+
+import java.io.IOException;
+import javax.ws.rs.core.MediaType;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.rest.WorkflowRestClient;
+import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
+import org.apache.syncope.common.lib.SyncopeClientException;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.markup.head.IHeaderResponse;
+import org.apache.wicket.markup.head.OnLoadHeaderItem;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.markup.html.form.TextArea;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.util.io.IOUtils;
+
+public class XMLWorkflowEditorModalPanel extends AbstractModalPanel<String> {
+
+    private static final long serialVersionUID = 1937773326401753564L;
+
+    private final WorkflowRestClient wfRestClient;
+
+    private final TextArea<String> workflowDefArea;
+
+    private String wfDefinition;
+
+    public XMLWorkflowEditorModalPanel(
+            final BaseModal<String> modal,
+            final WorkflowRestClient wfRestClient,
+            final PageReference pageRef) {
+
+        super(modal, pageRef);
+        this.wfRestClient = wfRestClient;
+
+        try {
+            wfDefinition = IOUtils.toString(wfRestClient.getDefinition(MediaType.APPLICATION_XML_TYPE));
+        } catch (IOException e) {
+            LOG.error("Could not get workflow definition", e);
+            wfDefinition = StringUtils.EMPTY;
+        }
+
+        workflowDefArea = new TextArea<>("workflowDefArea", new Model<>(wfDefinition));
+        add(workflowDefArea);
+    }
+
+    @Override
+    public String getItem() {
+        return this.wfDefinition;
+    }
+
+    @Override
+    public void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
+        try {
+            wfRestClient.updateDefinition(MediaType.APPLICATION_XML_TYPE, workflowDefArea.getModelObject());
+            info(getString(Constants.OPERATION_SUCCEEDED));
+
+            modal.show(false);
+            modal.close(target);
+        } catch (SyncopeClientException scee) {
+            error(getString(Constants.ERROR) + ": " + scee.getMessage());
+        }
+        modal.getNotificationPanel().refresh(target);
+    }
+
+    @Override
+    public void renderHead(final IHeaderResponse response) {
+        super.renderHead(response);
+        response.render(OnLoadHeaderItem.forScript(
+                "CodeMirror.fromTextArea(document.getElementById('workflowDefArea'), {"
+                + "  lineNumbers: true, "
+                + "  autoRefresh: true"
+                + "}).on('change', updateTextArea);"));
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/77fa0f61/client/console/src/main/java/org/apache/syncope/client/console/rest/AnyTypeClassRestClient.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/rest/AnyTypeClassRestClient.java
b/client/console/src/main/java/org/apache/syncope/client/console/rest/AnyTypeClassRestClient.java
index 10375ca..2f9d0f1 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/rest/AnyTypeClassRestClient.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/rest/AnyTypeClassRestClient.java
@@ -18,8 +18,6 @@
  */
 package org.apache.syncope.client.console.rest;
 
-import static org.apache.syncope.client.console.rest.BaseRestClient.getService;
-
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;

http://git-wip-us.apache.org/repos/asf/syncope/blob/77fa0f61/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/bootstrap/dialog/BaseModal.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/bootstrap/dialog/BaseModal.java
b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/bootstrap/dialog/BaseModal.java
index 4437adb..18e18f3 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/bootstrap/dialog/BaseModal.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/bootstrap/dialog/BaseModal.java
@@ -33,10 +33,8 @@ import org.apache.syncope.client.console.panels.NotificationPanel;
 import org.apache.syncope.client.console.wicket.markup.html.bootstrap.buttons.DefaultModalCloseButton;
 import org.apache.syncope.client.console.wicket.markup.html.bootstrap.buttons.PrimaryModalButton;
 import org.apache.wicket.Component;
-import org.apache.wicket.MarkupContainer;
 import org.apache.wicket.WicketRuntimeException;
 import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.behavior.Behavior;
 import org.apache.wicket.core.request.handler.IPartialPageRequestHandler;
 import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow.WindowClosedCallback;
 import org.apache.wicket.markup.html.WebMarkupContainer;
@@ -99,10 +97,10 @@ public class BaseModal<T extends Serializable> extends Modal<T>
implements Notif
         this.windowClosedCallback = null;
         components = new ArrayList<>();
 
-        // Note: it would imply the adding of WebjarsJavaScriptResourceReference about JQuery
resizable and mouse
+        // Note: not adding this would imply adding WebjarsJavaScriptResourceReference about
JQuery resizable and mouse
         add(new Resizable().withChildSelector(".modal-content"));
 
-        // Note: it would imply the adding of WebjarsJavaScriptResourceReference about JQuery
draggable
+        // Note: not adding this would imply adding of WebjarsJavaScriptResourceReference
about JQuery draggable
         add(new Draggable(new DraggableConfig().withHandle(".modal-header").withCursor("move")));
 
         addButton(new DefaultModalCloseButton());
@@ -111,21 +109,6 @@ public class BaseModal<T extends Serializable> extends Modal<T>
implements Notif
     }
 
     @Override
-    public final Component add(final Behavior... behaviors) {
-        return super.add(behaviors);
-    }
-
-    @Override
-    public final MarkupContainer add(final Component... childs) {
-        return super.add(childs);
-    }
-
-    @Override
-    public final MarkupContainer addOrReplace(final Component... childs) {
-        return super.addOrReplace(childs);
-    }
-
-    @Override
     public NotificationPanel getNotificationPanel() {
         return notificationPanel;
     }

http://git-wip-us.apache.org/repos/asf/syncope/blob/77fa0f61/client/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage.html
b/client/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage.html
index 7a18415..f219b8a 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage.html
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage.html
@@ -126,7 +126,7 @@ under the License.
       </div>
 
       <footer class="main-footer block-footer">
-        Apache Syncope <label wicket:id="version"/><br/>
+        Apache Syncope <label wicket:id="version"/> -
         <strong>Copyright &copy; 2010–<span id="spanYear"></span>

           <a href="http://www.apache.org/" target="_blank">The Apache Software Foundation</a>.</strong>
         All rights reserved.

http://git-wip-us.apache.org/repos/asf/syncope/blob/77fa0f61/client/console/src/main/resources/org/apache/syncope/client/console/pages/BasePopupPage.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/BasePopupPage.html
b/client/console/src/main/resources/org/apache/syncope/client/console/pages/BasePopupPage.html
deleted file mode 100644
index 2d9bca1..0000000
--- a/client/console/src/main/resources/org/apache/syncope/client/console/pages/BasePopupPage.html
+++ /dev/null
@@ -1,34 +0,0 @@
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
-  <head>
-    <title></title>
-
-    <style type="text/css">
-      table.palette td.header {
-        background:url("images/ui-bg_glass_75_e6e6e6_1x400.png")
-          repeat-x scroll 50% 50% #E6E6E6 !important;
-      }
-    </style>
-
-  </head>
-  <body onload="setTimeout('window.focus();', 0);">
-    <wicket:child />
-  </body>
-</html>

http://git-wip-us.apache.org/repos/asf/syncope/blob/77fa0f61/client/console/src/main/resources/org/apache/syncope/client/console/pages/Workflow.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Workflow.html
b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Workflow.html
index aa77a3f..56bb31d 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Workflow.html
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Workflow.html
@@ -53,5 +53,6 @@ under the License.
       </div>
     </section>
 
+    <div wicket:id="xmlEditorModal"/>
   </wicket:extend>
 </html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/syncope/blob/77fa0f61/client/console/src/main/resources/org/apache/syncope/client/console/pages/Workflow.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Workflow.properties
b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Workflow.properties
index 3772362..d22205c 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Workflow.properties
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Workflow.properties
@@ -15,3 +15,4 @@
 # specific language governing permissions and limitations
 # under the License.
 noActivitiEnabledForUsers=Activiti not enabled for users
+xmlEditorTitle=Workflow XML Editor

http://git-wip-us.apache.org/repos/asf/syncope/blob/77fa0f61/client/console/src/main/resources/org/apache/syncope/client/console/pages/Workflow_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Workflow_it.properties
b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Workflow_it.properties
index a4975e8..faf7d0d 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Workflow_it.properties
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Workflow_it.properties
@@ -15,3 +15,4 @@
 # specific language governing permissions and limitations
 # under the License.
 noActivitiEnabledForUsers=Activiti non configurato per gli utenti
+xmlEditorTitle=Workflow XML Editor

http://git-wip-us.apache.org/repos/asf/syncope/blob/77fa0f61/client/console/src/main/resources/org/apache/syncope/client/console/pages/Workflow_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Workflow_pt_BR.properties
b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Workflow_pt_BR.properties
index ea20be7..c814c56 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Workflow_pt_BR.properties
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Workflow_pt_BR.properties
@@ -15,3 +15,4 @@
 # specific language governing permissions and limitations
 # under the License.
 noActivitiEnabledForUsers=Activiti n\u00e3o habilitado para usu\u00e1rios
+xmlEditorTitle=Workflow XML Editor

http://git-wip-us.apache.org/repos/asf/syncope/blob/77fa0f61/client/console/src/main/resources/org/apache/syncope/client/console/pages/XMLEditorPopupPage.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/XMLEditorPopupPage.html
b/client/console/src/main/resources/org/apache/syncope/client/console/pages/XMLEditorPopupPage.html
deleted file mode 100644
index 22a00d5..0000000
--- a/client/console/src/main/resources/org/apache/syncope/client/console/pages/XMLEditorPopupPage.html
+++ /dev/null
@@ -1,78 +0,0 @@
-<!DOCTYPE html>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
-  <wicket:head>
-    <link rel="stylesheet" type="text/css" href="webjars/codemirror/${codemirror.version}/lib/codemirror.css"/>
-
-    <script type="text/javascript" src="webjars/codemirror/${codemirror.version}/lib/codemirror.js"></script>
-    <script type="text/javascript" src="webjars/codemirror/${codemirror.version}/mode/xml/xml.js"></script>
-    <script type="text/javascript">
-      function updateTextArea(editor) {
-        document.getElementById("workflowDefArea").value = editor.getValue();
-      }
-    </script>
-    <script>
-      window.onunload = refreshParent;
-      function refreshParent() {
-        window.opener.location.reload();
-      }
-    </script>
-    <style>
-      .w_content_3 {
-        padding: 0;
-        color: #333333;
-        font-family: Verdana,Tahoma,sans-serif;
-        font-size: 100%;
-        border: 1px solid #BBBBBB;
-        padding: 1%;
-      }
-    </style>
-  </wicket:head>
-  <wicket:extend>
-    <div style="padding: 1%;">
-      <div class="w_content_3">
-        <p class="ui-widget ui-corner-all ui-widget-header">
-          <wicket:message key="title"/>
-        </p>
-        <form wicket:id="workflowDefForm">
-          <div class="ui-tabs ui-widget ui-widget-content ui-corner-all">
-            <textarea wicket:id="workflowDefArea" id="workflowDefArea" style="width: 100%;
height: 350px;">
-            </textarea>
-          </div>
-          <div style="padding-top: 1%;">
-            <input type="submit"
-                   class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
-                   wicket:id="apply"/>
-            <input type="submit"
-                   wicket:id="closePage"
-                   class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
-                   onclick="window.close();"/>
-          </div>
-        </form>
-      </div>
-    </div>
-    <script>
-      window.onload = function () {
-        var editor = CodeMirror.fromTextArea(document.getElementById("workflowDefArea"),
{lineNumbers: true});
-        editor.on("change", updateTextArea);
-      };
-    </script>
-  </wicket:extend>
-</html>

http://git-wip-us.apache.org/repos/asf/syncope/blob/77fa0f61/client/console/src/main/resources/org/apache/syncope/client/console/pages/XMLEditorPopupPage.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/XMLEditorPopupPage.properties
b/client/console/src/main/resources/org/apache/syncope/client/console/pages/XMLEditorPopupPage.properties
deleted file mode 100644
index 2276791..0000000
--- a/client/console/src/main/resources/org/apache/syncope/client/console/pages/XMLEditorPopupPage.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-submit=Save
-cancel=Close
-title=Workflow XML Editor

http://git-wip-us.apache.org/repos/asf/syncope/blob/77fa0f61/client/console/src/main/resources/org/apache/syncope/client/console/pages/XMLEditorPopupPage_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/XMLEditorPopupPage_it.properties
b/client/console/src/main/resources/org/apache/syncope/client/console/pages/XMLEditorPopupPage_it.properties
deleted file mode 100644
index 818dfb4..0000000
--- a/client/console/src/main/resources/org/apache/syncope/client/console/pages/XMLEditorPopupPage_it.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-submit=Salva
-cancel=Chiudi
-title=Workflow XML Editor

http://git-wip-us.apache.org/repos/asf/syncope/blob/77fa0f61/client/console/src/main/resources/org/apache/syncope/client/console/pages/XMLEditorPopupPage_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/XMLEditorPopupPage_pt_BR.properties
b/client/console/src/main/resources/org/apache/syncope/client/console/pages/XMLEditorPopupPage_pt_BR.properties
deleted file mode 100644
index e9cd1ec..0000000
--- a/client/console/src/main/resources/org/apache/syncope/client/console/pages/XMLEditorPopupPage_pt_BR.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-submit=Salvar
-cancel=Fechar
-title=Workflow XML Editor

http://git-wip-us.apache.org/repos/asf/syncope/blob/77fa0f61/client/console/src/main/resources/org/apache/syncope/client/console/panels/XMLWorkflowEditorModalPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/XMLWorkflowEditorModalPanel.html
b/client/console/src/main/resources/org/apache/syncope/client/console/panels/XMLWorkflowEditorModalPanel.html
new file mode 100644
index 0000000..6e979ea
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/XMLWorkflowEditorModalPanel.html
@@ -0,0 +1,52 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+  <wicket:head>
+    <link rel="stylesheet" type="text/css" href="webjars/codemirror/${codemirror.version}/lib/codemirror.css"/>
+
+    <script type="text/javascript" src="webjars/codemirror/${codemirror.version}/lib/codemirror.js"></script>
+    <script type="text/javascript" src="webjars/codemirror/${codemirror.version}/mode/xml/xml.js"></script>
+    <script type="text/javascript" src="webjars/codemirror/${codemirror.version}/addon/display/autorefresh.js"></script>
+    <script type="text/javascript" src="webjars/codemirror/${codemirror.version}/addon/search/search.js"></script>
+    <script type="text/javascript" src="webjars/codemirror/${codemirror.version}/addon/search/searchcursor.js"></script>
+    <script type="text/javascript">
+      function updateTextArea(editor) {
+        document.getElementById("workflowDefArea").value = editor.getValue();
+      }
+    </script>
+    <style>
+      .w_content_3 {
+        padding: 0;
+        color: #333333;
+        font-family: Verdana,Tahoma,sans-serif;
+        font-size: 100%;
+        border: 1px solid #BBBBBB;
+        padding: 1%;
+      }
+    </style>
+  </wicket:head>
+  <wicket:panel>
+    <div style="padding: 1%;">
+      <div class="w_content_3">
+        <textarea wicket:id="workflowDefArea" id="workflowDefArea" name="workflowDefArea"
style="width: 100%; height: 350px;">
+        </textarea>
+      </div>
+    </div>
+  </wicket:panel>
+</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/syncope/blob/77fa0f61/ext/camel/client-console/src/main/java/org/apache/syncope/client/console/panels/CamelRoutesDetailsPanel.java
----------------------------------------------------------------------
diff --git a/ext/camel/client-console/src/main/java/org/apache/syncope/client/console/panels/CamelRoutesDetailsPanel.java
b/ext/camel/client-console/src/main/java/org/apache/syncope/client/console/panels/CamelRoutesDetailsPanel.java
index 2fe9c5b..cc73d4d 100644
--- a/ext/camel/client-console/src/main/java/org/apache/syncope/client/console/panels/CamelRoutesDetailsPanel.java
+++ b/ext/camel/client-console/src/main/java/org/apache/syncope/client/console/panels/CamelRoutesDetailsPanel.java
@@ -29,6 +29,8 @@ import org.apache.wicket.model.PropertyModel;
 
 public class CamelRoutesDetailsPanel extends Panel {
 
+    private static final long serialVersionUID = -768345003061796383L;
+
     public CamelRoutesDetailsPanel(final String id, final CamelRouteTO camelRoute) {
         super(id);
 
@@ -44,8 +46,10 @@ public class CamelRoutesDetailsPanel extends Panel {
     public void renderHead(final IHeaderResponse response) {
         super.renderHead(response);
         response.render(OnLoadHeaderItem.forScript(
-                "CodeMirror.fromTextArea(document.getElementById('route'), {lineNumbers:
true})."
-                + "on('change', updateTextArea)"));
+                "CodeMirror.fromTextArea(document.getElementById('route'), {"
+                + "  lineNumbers: true, "
+                + "  autoRefresh: true"
+                + "}).on('change', updateTextArea);"));
     }
 
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/77fa0f61/ext/camel/client-console/src/main/resources/org/apache/syncope/client/console/panels/CamelRoutesDetailsPanel.html
----------------------------------------------------------------------
diff --git a/ext/camel/client-console/src/main/resources/org/apache/syncope/client/console/panels/CamelRoutesDetailsPanel.html
b/ext/camel/client-console/src/main/resources/org/apache/syncope/client/console/panels/CamelRoutesDetailsPanel.html
index 8850975..882ac6f 100644
--- a/ext/camel/client-console/src/main/resources/org/apache/syncope/client/console/panels/CamelRoutesDetailsPanel.html
+++ b/ext/camel/client-console/src/main/resources/org/apache/syncope/client/console/panels/CamelRoutesDetailsPanel.html
@@ -22,6 +22,9 @@ under the License.
 
     <script type="text/javascript" src="webjars/codemirror/${codemirror.version}/lib/codemirror.js"></script>
     <script type="text/javascript" src="webjars/codemirror/${codemirror.version}/mode/xml/xml.js"></script>
+    <script type="text/javascript" src="webjars/codemirror/${codemirror.version}/addon/display/autorefresh.js"></script>
+    <script type="text/javascript" src="webjars/codemirror/${codemirror.version}/addon/search/search.js"></script>
+    <script type="text/javascript" src="webjars/codemirror/${codemirror.version}/addon/search/searchcursor.js"></script>
     <script type="text/javascript">
       function updateTextArea(editor) {
         document.getElementById("routeDefForm").elements["route"].value = editor.getValue();


Mime
View raw message