[SYNCOPE-156] very good work to fix every css and js dependencies
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/46907a30 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/46907a30 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/46907a30 Branch: refs/heads/master Commit: 46907a301b40fbbfa6b01e54079bb43a85592d1a Parents: 1dce538 Author: fmartelli <[email protected]> Authored: Thu Sep 10 13:10:49 2015 +0200 Committer: fmartelli <[email protected]> Committed: Thu Sep 10 13:10:49 2015 +0200 ---------------------------------------------------------------------- .../console/SyncopeConsoleApplication.java | 12 ++- .../syncope/client/console/pages/Realms.java | 17 +--- .../console/panels/GroupSearchResultPanel.java | 20 +--- .../syncope/client/console/themes/AdminLTE.java | 15 +++ .../markup/html/bootstrap/dialog/BaseModal.java | 15 ++- .../resources/META-INF/resources/css/bulk.css | 97 ++++++++++++++++++++ .../META-INF/resources/css/syncopeConsole.css | 4 + .../client/console/pages/BaseModalPage.html | 2 +- .../syncope/client/console/pages/BasePage.html | 7 +- .../syncope/client/console/pages/Realms.html | 3 +- .../client/console/topology/Topology.html | 2 +- pom.xml | 3 +- 12 files changed, 154 insertions(+), 43 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/syncope/blob/46907a30/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleApplication.java ---------------------------------------------------------------------- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleApplication.java b/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleApplication.java index 5c03587..e9f35ec 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleApplication.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleApplication.java @@ -69,14 +69,21 @@ public class SyncopeConsoleApplication extends AuthenticatedWebApplication { @Override protected void init() { super.init(); + + // Application settings IBootstrapSettings settings = new BootstrapSettings(); + + // set theme provider settings.setThemeProvider(new SingleThemeProvider(new AdminLTE())); + + // install application settings Bootstrap.install(this, settings); - // best place to do this is in Application#init() - //Bootstrap.install(this); + getResourceSettings().setUseMinifiedResources(true); + getComponentInstantiationListeners().add(new SpringComponentInjector(this)); getResourceSettings().setThrowExceptionOnMissingResource(true); + getJavaScriptLibrarySettings().setJQueryReference(new DynamicJQueryResourceReference()); getSecuritySettings().setAuthorizationStrategy(new MetaDataRoleAuthorizationStrategy(this)); @@ -150,5 +157,4 @@ public class SyncopeConsoleApplication extends AuthenticatedWebApplication { ? MustChangePassword.class : Dashboard.class; } - } http://git-wip-us.apache.org/repos/asf/syncope/blob/46907a30/client/console/src/main/java/org/apache/syncope/client/console/pages/Realms.java ---------------------------------------------------------------------- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/Realms.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/Realms.java index 914e5df..f58ca00 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/pages/Realms.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/Realms.java @@ -20,9 +20,6 @@ package org.apache.syncope.client.console.pages; import static org.apache.wicket.Component.ENABLE; -import de.agilecoders.wicket.extensions.markup.html.bootstrap.behavior.Draggable; -import de.agilecoders.wicket.extensions.markup.html.bootstrap.behavior.DraggableConfig; -import de.agilecoders.wicket.extensions.markup.html.bootstrap.behavior.Resizable; import java.io.Serializable; import java.util.ArrayList; import java.util.Collections; @@ -36,7 +33,6 @@ import org.apache.syncope.client.console.panels.Realm; import org.apache.syncope.client.console.panels.RealmModalPanel; import org.apache.syncope.client.console.rest.RealmRestClient; import org.apache.syncope.client.console.wicket.ajax.markup.html.ClearIndicatingAjaxLink; -import org.apache.syncope.client.console.wicket.markup.html.bootstrap.buttons.DefaultModalCloseButton; import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal; import org.apache.syncope.common.lib.to.RealmTO; import org.apache.syncope.common.lib.types.Entitlement; @@ -190,12 +186,7 @@ public class Realms extends BasePage { private void setupCreateModal() { final BaseModal<RealmTO> createModal = new BaseModal<>("createModal"); - createModal.add(new Resizable().withChildSelector(".modal-content")); - createModal.add(new Draggable(new DraggableConfig().withHandle(".modal-header").withCursor("move"))); - createModal.addButton(new DefaultModalCloseButton()); createModal.header(new ResourceModel("createRealm")); - createModal.setUseKeyboard(true); - createModal.setFadeIn(true); createModal.setWindowClosedCallback(new WindowClosedCallback() { @@ -239,12 +230,7 @@ public class Realms extends BasePage { private void setupEditModal() { final BaseModal<RealmTO> editModal = new BaseModal<>("editModal"); - editModal.add(new Resizable().withChildSelector(".modal-content")); - editModal.add(new Draggable(new DraggableConfig().withHandle(".modal-header").withCursor("move"))); - editModal.addButton(new DefaultModalCloseButton()); editModal.header(Model.of(getCurrentRealm().getName())); - editModal.setUseKeyboard(true); - editModal.setFadeIn(true); editModal.setWindowClosedCallback(new WindowClosedCallback() { @@ -261,7 +247,8 @@ public class Realms extends BasePage { content.addOrReplace(editModal); final RealmModalPanel ediRealmModalPanel = - new EditRealmModalPanel(BaseModal.getModalContentId(), + new EditRealmModalPanel( + BaseModal.getModalContentId(), Realms.this.getPageReference(), editModal, getCurrentRealm(), Realms.this.getCurrentRealm().getFullPath(), Entitlement.REALM_UPDATE); http://git-wip-us.apache.org/repos/asf/syncope/blob/46907a30/client/console/src/main/java/org/apache/syncope/client/console/panels/GroupSearchResultPanel.java ---------------------------------------------------------------------- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/GroupSearchResultPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/GroupSearchResultPanel.java index cfa05a1..322e555 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/panels/GroupSearchResultPanel.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/GroupSearchResultPanel.java @@ -18,9 +18,6 @@ */ package org.apache.syncope.client.console.panels; -import de.agilecoders.wicket.extensions.markup.html.bootstrap.behavior.Draggable; -import de.agilecoders.wicket.extensions.markup.html.bootstrap.behavior.DraggableConfig; -import de.agilecoders.wicket.extensions.markup.html.bootstrap.behavior.Resizable; import java.io.Serializable; import java.lang.reflect.Field; import java.util.ArrayList; @@ -50,16 +47,12 @@ import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn; import org.apache.wicket.extensions.markup.html.repeater.data.table.PropertyColumn; import org.apache.wicket.model.IModel; import org.apache.wicket.model.ResourceModel; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import org.springframework.util.ReflectionUtils; public class GroupSearchResultPanel extends AnySearchResultPanel { private static final long serialVersionUID = -1100228004207271270L; - protected static final Logger LOG = LoggerFactory.getLogger(GroupSearchResultPanel.class); - private final String entitlement = "GROUP_READ"; private final BaseModal<AbstractModalPanel> editModal; @@ -71,13 +64,10 @@ public class GroupSearchResultPanel extends AnySearchResultPanel { super(type, parentId, filtered, fiql, callerRef, restClient, anyTypeClassTOs, realm); editModal = new BaseModal<>("editModal"); - editModal.add(new Resizable().withChildSelector(".modal-content")); - editModal.add(new Draggable(new DraggableConfig().withHandle(".modal-header").withCursor("move"))); - editModal.setUseKeyboard(true).addCloseButton(); - editModal.setFadeIn(true); - editModal.setFooterVisible(true); - editModal.setHeaderVisible(true); - editModal.setOutputMarkupId(true); +// editModal.addCloseButton(); +// editModal.setFooterVisible(true); +// editModal.setHeaderVisible(true); +// editModal.setOutputMarkupId(true); } @Override @@ -169,7 +159,7 @@ public class GroupSearchResultPanel extends AnySearchResultPanel { } @Override - public ActionLinksPanel getHeader(final String componentId) { + public ActionLinksPanel<Serializable> getHeader(final String componentId) { final ActionLinksPanel.Builder<Serializable> panel = ActionLinksPanel.builder(page.getPageReference()); panel.add(new ActionLink<Serializable>() { http://git-wip-us.apache.org/repos/asf/syncope/blob/46907a30/client/console/src/main/java/org/apache/syncope/client/console/themes/AdminLTE.java ---------------------------------------------------------------------- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/themes/AdminLTE.java b/client/console/src/main/java/org/apache/syncope/client/console/themes/AdminLTE.java index 0d19213..e78efd5 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/themes/AdminLTE.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/themes/AdminLTE.java @@ -19,6 +19,12 @@ package org.apache.syncope.client.console.themes; import de.agilecoders.wicket.core.settings.Theme; +import de.agilecoders.wicket.extensions.markup.html.bootstrap.jqueryui.JQueryUIAllJavaScriptReference; +import de.agilecoders.wicket.extensions.markup.html.bootstrap.jqueryui.JQueryUICoreJavaScriptReference; +import de.agilecoders.wicket.extensions.markup.html.bootstrap.jqueryui.JQueryUIDraggableJavaScriptReference; +import de.agilecoders.wicket.extensions.markup.html.bootstrap.jqueryui.JQueryUIMouseJavaScriptReference; +import de.agilecoders.wicket.extensions.markup.html.bootstrap.jqueryui.JQueryUIResizableJavaScriptReference; +import de.agilecoders.wicket.extensions.markup.html.bootstrap.jqueryui.JQueryUIWidgetJavaScriptReference; import java.util.ArrayList; import java.util.List; import org.apache.wicket.markup.head.CssHeaderItem; @@ -37,6 +43,15 @@ public class AdminLTE extends Theme { final List<HeaderItem> references = new ArrayList<>(); references.add(JavaScriptHeaderItem.forReference( new JQueryPluginResourceReference(AdminLTE.class, "js/AdminLTE-app.min.js"))); + + // Adds WebjarsJavaScriptResourceReference about JQuery + references.add(JavaScriptHeaderItem.forReference(JQueryUIAllJavaScriptReference.instance())); + references.add(JavaScriptHeaderItem.forReference(JQueryUICoreJavaScriptReference.instance())); + references.add(JavaScriptHeaderItem.forReference(JQueryUIMouseJavaScriptReference.instance())); + references.add(JavaScriptHeaderItem.forReference(JQueryUIWidgetJavaScriptReference.instance())); + references.add(JavaScriptHeaderItem.forReference(JQueryUIResizableJavaScriptReference.instance())); + references.add(JavaScriptHeaderItem.forReference(JQueryUIDraggableJavaScriptReference.instance())); + references.add(CssHeaderItem.forReference(AdminLTECssResourceReference.INSTANCE)); references.addAll(super.getDependencies()); return references; http://git-wip-us.apache.org/repos/asf/syncope/blob/46907a30/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 8591ee2..1403f14 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 @@ -19,9 +19,13 @@ package org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog; import de.agilecoders.wicket.core.markup.html.bootstrap.dialog.Modal; +import de.agilecoders.wicket.extensions.markup.html.bootstrap.behavior.Draggable; +import de.agilecoders.wicket.extensions.markup.html.bootstrap.behavior.DraggableConfig; +import de.agilecoders.wicket.extensions.markup.html.bootstrap.behavior.Resizable; import java.util.ArrayList; import java.util.List; import org.apache.syncope.client.console.panels.NotificationPanel; +import org.apache.syncope.client.console.wicket.markup.html.bootstrap.buttons.DefaultModalCloseButton; import org.apache.wicket.Component; import org.apache.wicket.MarkupContainer; import org.apache.wicket.ajax.AjaxRequestTarget; @@ -41,7 +45,7 @@ public class BaseModal<T> extends Modal<T> { protected static final Logger LOG = LoggerFactory.getLogger(BaseModal.class); private static final String CONTENT = "modalContent"; - + private static final String INPUT = "input"; protected NotificationPanel feedbackPanel; @@ -61,6 +65,15 @@ public class BaseModal<T> extends Modal<T> { setUseCloseHandler(true); this.windowClosedCallback = null; components = new ArrayList<>(); + + // Note: it would imply the adding of WebjarsJavaScriptResourceReference about JQuery resizable and mouse + add(new Resizable().withChildSelector(".modal-content")); + // Note: it would imply the adding of WebjarsJavaScriptResourceReference about JQuery draggable + add(new Draggable(new DraggableConfig().withHandle(".modal-header").withCursor("move"))); + addButton(new DefaultModalCloseButton()); + setUseKeyboard(true); + setFadeIn(true); + } @Override http://git-wip-us.apache.org/repos/asf/syncope/blob/46907a30/client/console/src/main/resources/META-INF/resources/css/bulk.css ---------------------------------------------------------------------- diff --git a/client/console/src/main/resources/META-INF/resources/css/bulk.css b/client/console/src/main/resources/META-INF/resources/css/bulk.css new file mode 100644 index 0000000..1f0e621 --- /dev/null +++ b/client/console/src/main/resources/META-INF/resources/css/bulk.css @@ -0,0 +1,97 @@ +/* + * 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. + */ +th.checkGroupColumn{ + width: 20px; +} + +td.checkGroupColumn{ + text-align: center; +} + +div.bulkAction{ + display:inline-table; +} + +div.bulkActionCell{ + display: table-cell; + vertical-align: middle; + text-align: center; + width: 40px; + padding-left: 7px; +} + +.pageRowElement{ + display: inline-table; + width: 95%; +} + +div#selectedObjects{ + text-align: center; + margin-top: 10px; +} + +div#selectedObjects table { + margin: 1em 0; + border-collapse: collapse; +} + +div#selectedObjects table td, div#selectedObjects table th { + border: 1px solid #eee; + padding: .6em 10px; +} + +div#actionRow{ + height: 30px; + overflow: hidden; + text-align: left; + margin-top: 10px; +} + +div#actions{ + display: inline-table; + height: 30px; + overflow: hidden; +} + +div#actions div#actionPanel{ + display: table-cell; + height: 30px; + overflow: hidden; + cursor: auto; + background: none; + padding: 0px 10px; + vertical-align: middle; +} + +div#actions div#cancelBtmForm{ + display: table-cell; + height: 30px; + overflow: hidden; + vertical-align: middle; + padding-left: 3px; +} + +div#actions div#cancelBtmForm form{ + padding: 0px; + margin: 0px; +} + +div#actions div#cancelBtmForm form input#cancel{ + padding: 0.6em 1em; +} http://git-wip-us.apache.org/repos/asf/syncope/blob/46907a30/client/console/src/main/resources/META-INF/resources/css/syncopeConsole.css ---------------------------------------------------------------------- diff --git a/client/console/src/main/resources/META-INF/resources/css/syncopeConsole.css b/client/console/src/main/resources/META-INF/resources/css/syncopeConsole.css index d0b28ba..f11619a 100644 --- a/client/console/src/main/resources/META-INF/resources/css/syncopeConsole.css +++ b/client/console/src/main/resources/META-INF/resources/css/syncopeConsole.css @@ -191,3 +191,7 @@ a.help span a { div.basepage-content{ margin-top: 55px; } + +.modal-content { + overflow: hidden; +} http://git-wip-us.apache.org/repos/asf/syncope/blob/46907a30/client/console/src/main/resources/org/apache/syncope/client/console/pages/BaseModalPage.html ---------------------------------------------------------------------- diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/BaseModalPage.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/BaseModalPage.html index 995b1ef..242eb6a 100644 --- a/client/console/src/main/resources/org/apache/syncope/client/console/pages/BaseModalPage.html +++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/BaseModalPage.html @@ -20,7 +20,7 @@ under the License. <head> <title></title> - <link href="webjars/bootstrap-select/${bootstrap-select.version}/dist/css/bootstrap-select.min.css" rel="stylesheet" type="text/css" /> + <link href="webjars/bootstrap-select/${bootstrap-select.version}/css/bootstrap-select.min.css" rel="stylesheet" type="text/css" /> <link href="webjars/font-awesome/${font-awesome.version}/css/font-awesome.min.css" rel="stylesheet" type="text/css" /> <link href="webjars/ionicons/${ionicons.version}/css/ionicons.min.css" rel="stylesheet" type="text/css" /> http://git-wip-us.apache.org/repos/asf/syncope/blob/46907a30/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 233dae8..189b139 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 @@ -25,17 +25,16 @@ under the License. <title>Apache Syncope</title> <link rel="shortcut icon" href="img/favicon.png" type="image/png"/> - <link href="webjars/bootstrap-select/${bootstrap-select.version}/dist/css/bootstrap-select.min.css" rel="stylesheet" type="text/css" /> + <link href="webjars/bootstrap-select/${bootstrap-select.version}/css/bootstrap-select.min.css" rel="stylesheet" type="text/css" /> <link href="webjars/font-awesome/${font-awesome.version}/css/font-awesome.min.css" rel="stylesheet" type="text/css" /> <link href="webjars/ionicons/${ionicons.version}/css/ionicons.min.css" rel="stylesheet" type="text/css" /> - <link href="css/plugins/AdminLTE_plugins/dataTables.bootstrap.css" rel="stylesheet" type="text/css" /> + <link href="css/AdminLTE_plugins/dataTables/dataTables.bootstrap.css" rel="stylesheet" type="text/css" /> <link href="css/AdminLTE_skins/skin-green.css" rel="stylesheet" type="text/css" /> <link href="css/syncopeConsole.css" rel="stylesheet" type="text/css" /> <link href="css/fieldstyle.css" rel="stylesheet" type="text/css" /> - <script type="text/javascript" src="webjars/jquery-ui/${jquery-ui.version}/jquery-ui.min.js"></script> - <script type="text/javascript" src="webjars/bootstrap-select/${bootstrap-select.version}/dist/js/bootstrap-select.min.js"></script> + <script type="text/javascript" src="webjars/bootstrap-select/${bootstrap-select.version}/js/bootstrap-select.min.js"></script> <script type="text/javascript"> var notificationShownTimes = 0; http://git-wip-us.apache.org/repos/asf/syncope/blob/46907a30/client/console/src/main/resources/org/apache/syncope/client/console/pages/Realms.html ---------------------------------------------------------------------- diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Realms.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Realms.html index dc3fa89..72d19c6 100644 --- a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Realms.html +++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Realms.html @@ -17,8 +17,7 @@ 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://xmlns.jcp.org/jsf/composite"> +<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://xmlns.jcp.org/jsf/composite"> <wicket:extend> <div class="wrapper"> <div class="admin-content-page content-margin-layout" wicket:id="content"> http://git-wip-us.apache.org/repos/asf/syncope/blob/46907a30/client/console/src/main/resources/org/apache/syncope/client/console/topology/Topology.html ---------------------------------------------------------------------- diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/topology/Topology.html b/client/console/src/main/resources/org/apache/syncope/client/console/topology/Topology.html index fe7677e..4b6eff8 100644 --- a/client/console/src/main/resources/org/apache/syncope/client/console/topology/Topology.html +++ b/client/console/src/main/resources/org/apache/syncope/client/console/topology/Topology.html @@ -17,7 +17,7 @@ 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"> +<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://xmlns.jcp.org/jsf/composite"> <wicket:head> <script type="text/javascript" src="webjars/jsplumb/${jsplumb.version}/dom.jsPlumb-${jsplumb.version}-min.js"></script> <script type="text/javascript" src="webjars/jquery-cookie/${jquery-cookie.version}/jquery.cookie.js"></script> http://git-wip-us.apache.org/repos/asf/syncope/blob/46907a30/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index c2547a9..9a049f0 100644 --- a/pom.xml +++ b/pom.xml @@ -372,7 +372,8 @@ under the License. <activiti-modeler.directory>${project.build.directory}/activiti-modeler</activiti-modeler.directory> <jquery.version>2.1.4</jquery.version> - <jquery-ui.version>1.11.4</jquery-ui.version> + <!-- to be updated as soon as fix for https://github.com/l0rdn1kk0n/wicket-bootstrap/issues/549 is released --> + <jquery-ui.version>1.10.4-1</jquery-ui.version> <jquery-cookie.version>1.4.1-1</jquery-cookie.version> <bootstrap.version>3.3.5</bootstrap.version>
