From 4b15be4126c97dd0e12fe183e8082d98a138162c Mon Sep 17 00:00:00 2001 From: bridderb Date: Thu, 9 Jul 2015 15:16:58 +0200 Subject: [PATCH 01/64] migration von aperte nach Liferay 6.2 --- aperte-reports-ui/pom.xml | 49 +++++- .../AbstractReportingApplication.java | 21 ++- .../DashboardPortletApplication.java | 10 +- .../components/AperteInvokerComponent.java | 4 +- .../components/CyclicReportsComponent.java | 2 +- .../components/ReportManagerComponent.java | 7 +- .../components/ReportParamPanel.java | 12 +- .../components/ReportParametersComponent.java | 6 +- .../dashboard/AbstractDashboardComponent.java | 13 +- .../dashboard/EditDashboardComponentNew.java | 3 +- .../dashboard/ReportViewComponent.java | 7 + .../dashboard/ViewDashboardComponent.java | 28 ++-- .../dashboard/html/HtmlReportBuilder.java | 6 +- .../org/apertereports/util/DashboardUtil.java | 7 +- .../src/main/webapp/WEB-INF/liferay-hook.xml | 6 + .../main/webapp/WEB-INF/liferay-portlet.xml | 34 ++++- .../src/main/webapp/WEB-INF/portlet.xml | 5 + .../src/main/webapp/WEB-INF/web.xml | 17 ++- .../html/VAADIN/themes/liferay/styles.css | 27 ++++ .../html/VAADIN/themes/mytheme/addons.scss | 7 + .../html/VAADIN/themes/mytheme/mytheme.scss | 12 ++ .../html/VAADIN/themes/mytheme/styles.css | 27 ++++ .../html/VAADIN/themes/mytheme/styles.scss | 11 ++ common/pom.xml | 4 +- .../org/apertereports/common/users/User.java | 33 +++- dao/pom.xml | 13 ++ .../org/apertereports/dao/DictionaryDAO.java | 141 +++++++++++------- .../apertereports/dao/utils/GeneralDAO.java | 4 +- .../org/apertereports/dao/utils/SQLUtil.java | 16 +- .../java/org/apertereports/dao/utils/WHS.java | 9 +- engine/pom.xml | 12 ++ .../apertereports/engine/ReportMaster.java | 94 ++++++++++-- .../engine/ReportWebServiceHelper.java | 2 +- pom.xml | 14 +- 34 files changed, 529 insertions(+), 134 deletions(-) create mode 100644 aperte-reports-ui/src/main/webapp/WEB-INF/liferay-hook.xml create mode 100644 aperte-reports-ui/src/main/webapp/custom_jsps/html/VAADIN/themes/liferay/styles.css create mode 100644 aperte-reports-ui/src/main/webapp/custom_jsps/html/VAADIN/themes/mytheme/addons.scss create mode 100644 aperte-reports-ui/src/main/webapp/custom_jsps/html/VAADIN/themes/mytheme/mytheme.scss create mode 100644 aperte-reports-ui/src/main/webapp/custom_jsps/html/VAADIN/themes/mytheme/styles.css create mode 100644 aperte-reports-ui/src/main/webapp/custom_jsps/html/VAADIN/themes/mytheme/styles.scss diff --git a/aperte-reports-ui/pom.xml b/aperte-reports-ui/pom.xml index f4cbb60..3072f4f 100644 --- a/aperte-reports-ui/pom.xml +++ b/aperte-reports-ui/pom.xml @@ -8,11 +8,27 @@ aperte-reports-ui war Portlets for uploading and generating reports + + + + liferay-releases + https://repository.liferay.com/nexus/content/repositories/liferay-releases-ce/ + vaadin-addons http://maven.vaadin.com/vaadin-addons + + vaadin-snapshots + http://oss.sonatype.org/content/repositories/vaadin-snapshots/ + + false + + + true + + @@ -30,7 +46,7 @@ com.liferay.portal portal-service - 6.0.5 + 6.2.1 provided @@ -51,11 +67,20 @@ 2.5-SNAPSHOT - com.vaadin + com.vaadin vaadin - 6.7.0 - provided - + 6.8.12 + + org.springframework spring-beans @@ -82,7 +107,13 @@ com.liferay.portal portal-impl - 6.0.5 + 6.2.1 + provided + + + com.liferay.portal + util-java + 6.2.1 provided @@ -91,6 +122,7 @@ test + @@ -112,6 +144,7 @@ UTF-8 - + + - + \ No newline at end of file diff --git a/aperte-reports-ui/src/main/java/org/apertereports/AbstractReportingApplication.java b/aperte-reports-ui/src/main/java/org/apertereports/AbstractReportingApplication.java index 754afa0..b9cb7fe 100644 --- a/aperte-reports-ui/src/main/java/org/apertereports/AbstractReportingApplication.java +++ b/aperte-reports-ui/src/main/java/org/apertereports/AbstractReportingApplication.java @@ -1,6 +1,7 @@ package org.apertereports; import com.liferay.portal.model.Role; + import java.util.Locale; import javax.portlet.ActionRequest; @@ -16,6 +17,7 @@ import org.apertereports.util.NotificationUtil; import com.liferay.portal.util.PortalUtil; +import com.vaadin.Application; import com.vaadin.event.ListenerMethod; import com.vaadin.terminal.gwt.server.PortletApplicationContext2; import com.vaadin.ui.Panel; @@ -23,8 +25,10 @@ import eu.livotov.tpt.TPTApplication; import eu.livotov.tpt.i18n.TM; + import java.util.HashSet; import java.util.Set; + import org.apertereports.common.users.User; import org.apertereports.common.users.UserRole; import org.slf4j.Logger; @@ -36,9 +40,9 @@ * * @param Type of main panel */ + public abstract class AbstractReportingApplication extends TPTApplication implements PortletApplicationContext2.PortletListener { - private static final Logger logger = LoggerFactory.getLogger(AbstractReportingApplication.class); /** * Main window object @@ -60,8 +64,10 @@ public abstract class AbstractReportingApplication extends TPTA /** * Initializes the application context. */ + @Override public void applicationInit() { + if (getContext() instanceof PortletApplicationContext2) { ((PortletApplicationContext2) getContext()).removePortletListener(this, this); ((PortletApplicationContext2) getContext()).addPortletListener(this, this); @@ -70,7 +76,6 @@ public void applicationInit() { TM.getDictionary().setDefaultLanguage(getLocale().getLanguage()); reloadDictionary(); portletInit(); - setMainWindow(mainWindow); } @@ -158,9 +163,16 @@ public void handleRenderRequest(RenderRequest request, RenderResponse response, if (getContext() instanceof PortletApplicationContext2) { try { com.liferay.portal.model.User liferayUser = PortalUtil.getUser(request); - + com.liferay.portal.model.Company company = PortalUtil.getCompany(request); + com.liferay.portal.theme.ThemeDisplay dis = (com.liferay.portal.theme.ThemeDisplay) request.getAttribute(com.liferay.portal.kernel.util.WebKeys.THEME_DISPLAY); + + //liferay user can be null because he can be not logged in if (liferayUser != null && (user == null || user.getLogin().equals(liferayUser.getLogin()))) { + + long userid= liferayUser.getUserId(); + long portletGroupId= dis.getScopeGroupId(); + long companyid= company.getCompanyId(); String login = liferayUser.getLogin(); String email = liferayUser.getEmailAddress(); Set roles = new HashSet(); @@ -173,7 +185,7 @@ public void handleRenderRequest(RenderRequest request, RenderResponse response, admin |= adminRole; } - user = new User(login, roles, admin, email); + user = new User(login, roles, admin, email, userid, portletGroupId, companyid); reinitUserData(user); } @@ -244,3 +256,4 @@ public Locale getArLocale() { return locale; } } + diff --git a/aperte-reports-ui/src/main/java/org/apertereports/DashboardPortletApplication.java b/aperte-reports-ui/src/main/java/org/apertereports/DashboardPortletApplication.java index 1b78a49..3343eb0 100644 --- a/aperte-reports-ui/src/main/java/org/apertereports/DashboardPortletApplication.java +++ b/aperte-reports-ui/src/main/java/org/apertereports/DashboardPortletApplication.java @@ -57,12 +57,14 @@ public class DashboardPortletApplication extends AbstractReportingApplication { */ @Override public void portletInit() { + mainWindow = new Window(VaadinUtil.getValue("dashboard.window.title"), viewMode); - + + setTheme("mytheme"); if (getContext() instanceof PortletApplicationContext2) { PortletApplicationContext2 ctx = (PortletApplicationContext2) getContext(); ctx.addPortletListener(this, new ContextReloadListener(new AbstractContextReloadHandler() { - + @Override public void handleHelp(PortletContextHolder holder) { if (mainWindow.getContent() != helpMode) { @@ -86,6 +88,7 @@ public void handleResource(PortletContextHolder holder) { update(mainWindow, (AbstractDashboardComponent) mainWindow.getContent(), holder, false); } } + })); editMode.setCloseListener(new CloseListener() { @@ -101,6 +104,7 @@ public void close() { } }); } + } /** @@ -129,4 +133,4 @@ private void update(Window window, AbstractDashboardComponent component, Portlet protected void reinitUserData(User user) { //nothing to do } -} +} \ No newline at end of file diff --git a/aperte-reports-ui/src/main/java/org/apertereports/components/AperteInvokerComponent.java b/aperte-reports-ui/src/main/java/org/apertereports/components/AperteInvokerComponent.java index 70af98f..ea491b4 100644 --- a/aperte-reports-ui/src/main/java/org/apertereports/components/AperteInvokerComponent.java +++ b/aperte-reports-ui/src/main/java/org/apertereports/components/AperteInvokerComponent.java @@ -110,7 +110,9 @@ public void buttonClick(ClickEvent event) { if (!panel.validateForm()) { return; } - ReportMaster rm = new ReportMaster(reportTemplate.getContent(), reportTemplate.getId().toString(), new ReportTemplateProvider()); + + ReportMaster rm = new ReportMaster(reportTemplate.getContent(), reportTemplate.getId().toString(), new ReportTemplateProvider(), user); + byte[] reportData = rm.generateAndExportReport(panel.getOuptutFormat(), new HashMap(panel.collectParametersValues()), ConfigurationCache.getConfiguration()); diff --git a/aperte-reports-ui/src/main/java/org/apertereports/components/CyclicReportsComponent.java b/aperte-reports-ui/src/main/java/org/apertereports/components/CyclicReportsComponent.java index c533227..4d59b66 100644 --- a/aperte-reports-ui/src/main/java/org/apertereports/components/CyclicReportsComponent.java +++ b/aperte-reports-ui/src/main/java/org/apertereports/components/CyclicReportsComponent.java @@ -275,7 +275,7 @@ public void buttonClick(ClickEvent event) { return; } ReportMaster rm = new ReportMaster(config.getReport().getContent(), config.getReport().getId().toString(), - new ReportTemplateProvider()); + new ReportTemplateProvider(),user); byte[] reportData = rm.generateAndExportReport(config.getOutputFormat(), new HashMap(panel.collectParametersValues()), ConfigurationCache.getConfiguration()); diff --git a/aperte-reports-ui/src/main/java/org/apertereports/components/ReportManagerComponent.java b/aperte-reports-ui/src/main/java/org/apertereports/components/ReportManagerComponent.java index 0771c27..7e4bb6e 100644 --- a/aperte-reports-ui/src/main/java/org/apertereports/components/ReportManagerComponent.java +++ b/aperte-reports-ui/src/main/java/org/apertereports/components/ReportManagerComponent.java @@ -5,6 +5,9 @@ import com.vaadin.event.FieldEvents.TextChangeListener; import com.vaadin.ui.*; import com.vaadin.ui.Button.ClickEvent; + +import com.vaadin.ui.ComponentContainer; + import com.vaadin.ui.Button.ClickListener; import com.vaadin.ui.Upload.FailedEvent; import com.vaadin.ui.Upload.FailedListener; @@ -386,7 +389,7 @@ public void buttonClick(ClickEvent event) { return; } try { - ReportMaster rm = new ReportMaster(reportTemplate.getContent(), reportTemplate.getId().toString(), new ReportTemplateProvider()); + ReportMaster rm = new ReportMaster(reportTemplate.getContent(), reportTemplate.getId().toString(), new ReportTemplateProvider(),user); byte[] reportData = rm.generateAndExportReport(panel.getOuptutFormat(), new HashMap(panel.collectParametersValues()), ConfigurationCache.getConfiguration()); @@ -564,4 +567,4 @@ private static void deepCopy(ReportTemplate source, ReportTemplate target) { target.setReportname(source.getReportname()); target.setRolesWithAccess(new HashSet(source.getRolesWithAccess())); } -} +} \ No newline at end of file diff --git a/aperte-reports-ui/src/main/java/org/apertereports/components/ReportParamPanel.java b/aperte-reports-ui/src/main/java/org/apertereports/components/ReportParamPanel.java index 71e3d54..33384ce 100644 --- a/aperte-reports-ui/src/main/java/org/apertereports/components/ReportParamPanel.java +++ b/aperte-reports-ui/src/main/java/org/apertereports/components/ReportParamPanel.java @@ -2,6 +2,7 @@ import com.vaadin.ui.*; import com.vaadin.ui.Window.Notification; + import java.util.Map; import org.apertereports.backbone.util.ReportTemplateProvider; @@ -11,6 +12,8 @@ import org.apertereports.model.ReportTemplate; import java.util.List; + +import org.apertereports.common.users.User; import org.apertereports.common.xml.config.ReportConfigParameter; import org.apertereports.ui.UiFactory; import org.apertereports.util.VaadinUtil; @@ -20,15 +23,15 @@ public class ReportParamPanel extends Panel { private ReportParametersComponent reportParametersComponent; private HorizontalLayout buttons; - + public ReportParamPanel(ReportTemplate reportTemplate, boolean showFormat) { this(reportTemplate, showFormat, null); } public ReportParamPanel(ReportTemplate reportTemplate, boolean showFormat, List params) { try { - ReportMaster rm = new ReportMaster(reportTemplate.getContent(), reportTemplate.getId().toString(), - new ReportTemplateProvider()); + ReportMaster rm = new ReportMaster(reportTemplate.getContent(), reportTemplate.getId().toString(), new ReportTemplateProvider()); + this.reportParametersComponent = new ReportParametersComponent(rm, showFormat, params); VerticalLayout vl = UiFactory.createVLayout(this); vl.addComponent(reportParametersComponent); @@ -56,7 +59,8 @@ public void addButtons(HorizontalLayout buttons) { public Map collectParametersValues() { return reportParametersComponent.collectParametersValues(); } - + + public String getOuptutFormat() { return reportParametersComponent.getSelectedFormat(); } diff --git a/aperte-reports-ui/src/main/java/org/apertereports/components/ReportParametersComponent.java b/aperte-reports-ui/src/main/java/org/apertereports/components/ReportParametersComponent.java index e36e1ca..ba0117a 100644 --- a/aperte-reports-ui/src/main/java/org/apertereports/components/ReportParametersComponent.java +++ b/aperte-reports-ui/src/main/java/org/apertereports/components/ReportParametersComponent.java @@ -45,6 +45,7 @@ import org.apertereports.util.wrappers.FieldProperties; import org.apertereports.util.wrappers.FilterContainer; +import com.liferay.portal.util.PortalUtil; import com.vaadin.data.Buffered; import com.vaadin.data.Validator; import com.vaadin.data.validator.RegexpValidator; @@ -60,7 +61,9 @@ import com.vaadin.ui.Select; import com.vaadin.ui.TextArea; import com.vaadin.ui.TextField; + import java.util.Locale; + import org.apertereports.common.users.User; import org.apertereports.common.utils.LocaleUtils; import org.apertereports.ui.UiFactoryExt; @@ -96,7 +99,7 @@ public ReportParametersComponent(ReportMaster rm, boolean showFormat, List(); } this.params = params; - + init(); } @@ -804,3 +807,4 @@ public void attach() { initFieldsFromConfig(); } } + diff --git a/aperte-reports-ui/src/main/java/org/apertereports/dashboard/AbstractDashboardComponent.java b/aperte-reports-ui/src/main/java/org/apertereports/dashboard/AbstractDashboardComponent.java index 7ab914b..7ee9279 100644 --- a/aperte-reports-ui/src/main/java/org/apertereports/dashboard/AbstractDashboardComponent.java +++ b/aperte-reports-ui/src/main/java/org/apertereports/dashboard/AbstractDashboardComponent.java @@ -1,15 +1,17 @@ package org.apertereports.dashboard; + import com.vaadin.ui.CustomComponent; + import org.apache.commons.codec.binary.Base64; import org.apertereports.util.cache.MapCache; - import org.apertereports.common.exception.ARRuntimeException; import org.apertereports.common.xml.config.ReportConfig; import org.apertereports.common.xml.config.XmlReportConfigLoader; import javax.portlet.PortletPreferences; import javax.portlet.PortletSession; + import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; @@ -25,11 +27,16 @@ * or show an edit form. */ public abstract class AbstractDashboardComponent extends CustomComponent { - protected List reportConfigs; + + + + protected List reportConfigs; protected String template; protected PortletPreferences preferences; protected PortletSession session; protected String portletId; + + /** * An instance of a {@link MapCache} for general caching purposes. @@ -98,6 +105,8 @@ protected void saveData() { * Loads preferences and initializes the view. */ public void initData() { + + prepareData(); initComponentData(); } diff --git a/aperte-reports-ui/src/main/java/org/apertereports/dashboard/EditDashboardComponentNew.java b/aperte-reports-ui/src/main/java/org/apertereports/dashboard/EditDashboardComponentNew.java index 1cd5983..494413c 100644 --- a/aperte-reports-ui/src/main/java/org/apertereports/dashboard/EditDashboardComponentNew.java +++ b/aperte-reports-ui/src/main/java/org/apertereports/dashboard/EditDashboardComponentNew.java @@ -51,6 +51,7 @@ public class EditDashboardComponentNew extends AbstractDashboardComponent { @Override protected void initComponentData() { Panel mainPanel = UiFactory.createPanel(UiIds.LABEL_CONFIGURATION); + setCompositionRoot(mainPanel); app = (AbstractReportingApplication) getApplication(); @@ -248,4 +249,4 @@ private ReportConfig getCurrentConfig() { } return reportConfigs.get(0); } -} +} \ No newline at end of file diff --git a/aperte-reports-ui/src/main/java/org/apertereports/dashboard/ReportViewComponent.java b/aperte-reports-ui/src/main/java/org/apertereports/dashboard/ReportViewComponent.java index f8f6ca2..7e2d01c 100644 --- a/aperte-reports-ui/src/main/java/org/apertereports/dashboard/ReportViewComponent.java +++ b/aperte-reports-ui/src/main/java/org/apertereports/dashboard/ReportViewComponent.java @@ -1,6 +1,7 @@ package org.apertereports.dashboard; import com.vaadin.ui.Panel; + import java.io.File; import java.io.FileOutputStream; import java.io.IOException; @@ -13,9 +14,11 @@ import java.util.Map; import java.util.Map.Entry; import java.util.Set; + import net.sf.jasperreports.engine.JRExporterParameter; import net.sf.jasperreports.engine.JasperPrint; import net.sf.jasperreports.engine.export.JRHtmlExporterParameter; + import org.apertereports.AbstractLazyLoaderComponent; import org.apertereports.AbstractReportingApplication; import org.apertereports.backbone.util.ReportTemplateProvider; @@ -24,6 +27,7 @@ import org.apertereports.common.ARConstants.ReportType; import org.apertereports.common.exception.ARException; import org.apertereports.common.exception.ARRuntimeException; +import org.apertereports.common.users.User; import org.apertereports.common.utils.TextUtils; import org.apertereports.common.utils.TimeUtils; import org.apertereports.common.wrappers.Pair; @@ -86,6 +90,7 @@ public ReportViewComponent(AbstractReportingApplication application, MapCache ca initInternalData(configs); reportPanel.setSizeFull(); + // reportPanel.setScrollable(false); reportPanel.getContent().setSizeUndefined(); reportPanel.getContent().setStyleName(AR_DASHBOARD_REPORT_PANEL_STYLE_ID); @@ -110,7 +115,9 @@ public ReportViewComponent(AbstractReportingApplication application, MapCache ca */ private void init() { if (template != null && !template.isEmpty()) { + final HtmlReportBuilder builder = new HtmlReportBuilder(application, this); + final int[] index = {0}; DashboardUtil.executeTemplateMatcherWithList(template, DashboardUtil.REPORT_TAG_PATTERN, new DashboardUtil.MatchHandlerWithList() { diff --git a/aperte-reports-ui/src/main/java/org/apertereports/dashboard/ViewDashboardComponent.java b/aperte-reports-ui/src/main/java/org/apertereports/dashboard/ViewDashboardComponent.java index cf01ac5..9cd672d 100644 --- a/aperte-reports-ui/src/main/java/org/apertereports/dashboard/ViewDashboardComponent.java +++ b/aperte-reports-ui/src/main/java/org/apertereports/dashboard/ViewDashboardComponent.java @@ -1,8 +1,11 @@ package org.apertereports.dashboard; + import com.vaadin.ui.Panel; import com.vaadin.ui.VerticalLayout; + import eu.livotov.tpt.gui.widgets.TPTLazyLoadingLayout; + import org.apertereports.AbstractReportingApplication; import org.apertereports.ui.UiFactory; @@ -12,17 +15,21 @@ */ public class ViewDashboardComponent extends AbstractDashboardComponent { - private VerticalLayout mainPanel = UiFactory.createVLayout(null); + private VerticalLayout mainPanel =UiFactory.createVLayout(null); + private Panel contentPanel = new Panel(); - public ViewDashboardComponent() { - contentPanel.setScrollable(true); - contentPanel.setStyleName("borderless light"); - contentPanel.setSizeFull(); - mainPanel.addComponent(contentPanel); - initData(); - setCompositionRoot(mainPanel); - } + public ViewDashboardComponent() { + + + contentPanel.setSizeFull(); + contentPanel.setStyleName("borderless light"); + contentPanel.setScrollable(true); + + mainPanel.addComponent(contentPanel); + initData(); + setCompositionRoot(contentPanel); + } /** * Initiates a lazy loading component on top of a {@link ReportViewComponent} @@ -32,5 +39,6 @@ public ViewDashboardComponent() { protected void initComponentData() { contentPanel.removeAllComponents(); contentPanel.addComponent(new TPTLazyLoadingLayout(new ReportViewComponent((AbstractReportingApplication) getApplication(), cache, template, reportConfigs, true), true)); + } -} +} \ No newline at end of file diff --git a/aperte-reports-ui/src/main/java/org/apertereports/dashboard/html/HtmlReportBuilder.java b/aperte-reports-ui/src/main/java/org/apertereports/dashboard/html/HtmlReportBuilder.java index 40080dd..4d21b99 100644 --- a/aperte-reports-ui/src/main/java/org/apertereports/dashboard/html/HtmlReportBuilder.java +++ b/aperte-reports-ui/src/main/java/org/apertereports/dashboard/html/HtmlReportBuilder.java @@ -77,7 +77,7 @@ public class HtmlReportBuilder { */ private CustomLayout layout; private Application application; - + public HtmlReportBuilder(Application application, ReportDataProvider provider) { this.application = application; this.provider = provider; @@ -104,6 +104,7 @@ public CustomLayout createLayout() throws IOException { } } } + return layout; } @@ -319,6 +320,7 @@ private CustomLayout createReportComponent(ReportConfig config, boolean cached) reportLayout = new CustomLayout(new ByteArrayInputStream(reportHtml.getBytes())); reportLayout.setSizeUndefined(); reportLayout.setWidth(100, UNITS_PERCENTAGE); + } catch (IOException e) { logger.error(e.getMessage(), e); throw new RuntimeException(e); @@ -559,4 +561,4 @@ private String createDivAnchor(String componentId) { sb.append("
"); return sb.toString(); } -} +} \ No newline at end of file diff --git a/aperte-reports-ui/src/main/java/org/apertereports/util/DashboardUtil.java b/aperte-reports-ui/src/main/java/org/apertereports/util/DashboardUtil.java index a4369e8..4b0d8c7 100644 --- a/aperte-reports-ui/src/main/java/org/apertereports/util/DashboardUtil.java +++ b/aperte-reports-ui/src/main/java/org/apertereports/util/DashboardUtil.java @@ -32,11 +32,13 @@ import org.w3c.dom.Node; import org.w3c.dom.NodeList; + /** * Utility class with methods for report tags retrieval, regexp matching etc. */ -public final class DashboardUtil { +public final class DashboardUtil { private DashboardUtil() { + } /** @@ -258,4 +260,7 @@ public abstract static class MatchHandler { public abstract static class MatchHandlerWithList { public abstract void handleMatch(int start, int end, List match); } + + } + diff --git a/aperte-reports-ui/src/main/webapp/WEB-INF/liferay-hook.xml b/aperte-reports-ui/src/main/webapp/WEB-INF/liferay-hook.xml new file mode 100644 index 0000000..b83e312 --- /dev/null +++ b/aperte-reports-ui/src/main/webapp/WEB-INF/liferay-hook.xml @@ -0,0 +1,6 @@ + + + + + /custom_jsps + \ No newline at end of file diff --git a/aperte-reports-ui/src/main/webapp/WEB-INF/liferay-portlet.xml b/aperte-reports-ui/src/main/webapp/WEB-INF/liferay-portlet.xml index 7de8e05..9c27be0 100644 --- a/aperte-reports-ui/src/main/webapp/WEB-INF/liferay-portlet.xml +++ b/aperte-reports-ui/src/main/webapp/WEB-INF/liferay-portlet.xml @@ -1,17 +1,22 @@ - - Invoker portlet - true + + Dashboard portlet + false false + /css/main.css + Dashboard-portlet - Dashboard portlet + Invoker portlet + false true false Report Manager portlet + true + false false false portal @@ -19,12 +24,31 @@ Report Order Browser portlet + false true false Cyclic Reports portlet + false false false - + + + administrator + Administrator + + + guest + Guest + + + power-user + Power User + + + user + User + + \ No newline at end of file diff --git a/aperte-reports-ui/src/main/webapp/WEB-INF/portlet.xml b/aperte-reports-ui/src/main/webapp/WEB-INF/portlet.xml index 5fe0a07..093e56f 100644 --- a/aperte-reports-ui/src/main/webapp/WEB-INF/portlet.xml +++ b/aperte-reports-ui/src/main/webapp/WEB-INF/portlet.xml @@ -36,6 +36,11 @@ org.apertereports.ManagerApplication + + widgetset + com.vaadin.portal.gwt.PortalDefaultWidgetSet + + text/html diff --git a/aperte-reports-ui/src/main/webapp/WEB-INF/web.xml b/aperte-reports-ui/src/main/webapp/WEB-INF/web.xml index 38c67a7..63d0e05 100644 --- a/aperte-reports-ui/src/main/webapp/WEB-INF/web.xml +++ b/aperte-reports-ui/src/main/webapp/WEB-INF/web.xml @@ -1,8 +1,8 @@ - + id="AperteReports" > Aperte Reports @@ -35,7 +35,14 @@ javax.jms.Queue Container - + + VaadinServlet + com.vaadin.terminal.gwt.server.ApplicationServlet + + + VaadinServlet + /VAADIN/* + clearCacheServlet org.apertereports.util.servlet.ClearCacheServlet @@ -46,6 +53,8 @@ /*/cacheManager + + index.html index.htm @@ -54,4 +63,4 @@ default.htm default.jsp - + \ No newline at end of file diff --git a/aperte-reports-ui/src/main/webapp/custom_jsps/html/VAADIN/themes/liferay/styles.css b/aperte-reports-ui/src/main/webapp/custom_jsps/html/VAADIN/themes/liferay/styles.css new file mode 100644 index 0000000..2018a93 --- /dev/null +++ b/aperte-reports-ui/src/main/webapp/custom_jsps/html/VAADIN/themes/liferay/styles.css @@ -0,0 +1,27 @@ + +.v-scrollable { + overflow: hidden; +} + +.v-panel-caption, +.v-panel-nocaption { + text-shadow: 1px 1px #fff; + font-size: 12px; + color: #222; + margin-left: 0px; + background-color: #FAFAFA; + /*background: transparent url(panel/top-right.png) no-repeat right top;*/ + padding: 5px 5px 10px 2px; + height: 12px; +} + +.v-panel-caption .v-icon { + padding-right: 2px; +} + +.v-panel-content { + border: 0px solid #999; + -webkit-border-radius: 0 0 4px 4px; + -moz-border-radius: 0 0 4px 4px; + border-radius: 0 0 4px 4px; +} diff --git a/aperte-reports-ui/src/main/webapp/custom_jsps/html/VAADIN/themes/mytheme/addons.scss b/aperte-reports-ui/src/main/webapp/custom_jsps/html/VAADIN/themes/mytheme/addons.scss new file mode 100644 index 0000000..754ba4b --- /dev/null +++ b/aperte-reports-ui/src/main/webapp/custom_jsps/html/VAADIN/themes/mytheme/addons.scss @@ -0,0 +1,7 @@ +/* This file is automatically managed and will be overwritten from time to time. */ +/* Do not manually edit this file. */ + +/* Import and include this mixin into your project theme to include the addon themes */ +@mixin addons { +} + diff --git a/aperte-reports-ui/src/main/webapp/custom_jsps/html/VAADIN/themes/mytheme/mytheme.scss b/aperte-reports-ui/src/main/webapp/custom_jsps/html/VAADIN/themes/mytheme/mytheme.scss new file mode 100644 index 0000000..fd720cf --- /dev/null +++ b/aperte-reports-ui/src/main/webapp/custom_jsps/html/VAADIN/themes/mytheme/mytheme.scss @@ -0,0 +1,12 @@ +/* Import the liferay theme. */ +/* This only allows us to use the mixins defined in it and does not add any styles by itself. */ +@import "../liferay/liferay.scss"; + +/* This contains all of your theme. */ +/* If somebody wants to extend the theme she will include this mixin. */ +@mixin mytheme { + /* Include all the styles from the liferay theme */ + @include liferay; + + /* Insert your theme rules here */ +} diff --git a/aperte-reports-ui/src/main/webapp/custom_jsps/html/VAADIN/themes/mytheme/styles.css b/aperte-reports-ui/src/main/webapp/custom_jsps/html/VAADIN/themes/mytheme/styles.css new file mode 100644 index 0000000..af3d707 --- /dev/null +++ b/aperte-reports-ui/src/main/webapp/custom_jsps/html/VAADIN/themes/mytheme/styles.css @@ -0,0 +1,27 @@ + +.v-scrollable { + overflow: hidden; +} + +.v-panel-caption, +.v-panel-nocaption { + text-shadow: 1px 1px #fff; + font-size: 12px; + color: #222; + margin-left: 0px; + background-color: #FAFAFA; + background: transparent; + padding: 5px 5px 10px 2px; + height: 12px; +} + +.v-panel-caption .v-icon { + padding-right: 2px; +} + +.v-panel-content { + border: 1px solid #999; + -webkit-border-radius: 0 0 4px 4px; + -moz-border-radius: 0 0 4px 4px; + border-radius: 0 0 4px 4px; +} diff --git a/aperte-reports-ui/src/main/webapp/custom_jsps/html/VAADIN/themes/mytheme/styles.scss b/aperte-reports-ui/src/main/webapp/custom_jsps/html/VAADIN/themes/mytheme/styles.scss new file mode 100644 index 0000000..6e6005a --- /dev/null +++ b/aperte-reports-ui/src/main/webapp/custom_jsps/html/VAADIN/themes/mytheme/styles.scss @@ -0,0 +1,11 @@ +@import "addons.scss"; +@import "mytheme.scss"; + +/* This file prefixes all rules with the theme name to avoid causing conflicts with other themes. */ +/* The actual styles should be defined in mytheme.scss */ +.mytheme { + @include addons; + + // Include mytheme theme styles in your theme + @include mytheme; +} diff --git a/common/pom.xml b/common/pom.xml index b9491c2..2a28e7d 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -65,13 +65,13 @@ com.liferay.portal portal-impl - 6.0.5 + 6.2.1 provided com.liferay.portal portal-service - 6.0.5 + 6.2.1 provided diff --git a/common/src/main/java/org/apertereports/common/users/User.java b/common/src/main/java/org/apertereports/common/users/User.java index d7e8c2b..d3d8612 100644 --- a/common/src/main/java/org/apertereports/common/users/User.java +++ b/common/src/main/java/org/apertereports/common/users/User.java @@ -15,14 +15,43 @@ public class User { private Set roles = new HashSet(); private final boolean administrator; private final String email; + private long userid; + private long groupid; + private long companyid; - public User(String login, Set roles, boolean administrator, String email) { + public User(String login, Set roles, boolean administrator, String email, long userid, long groupid, long companyid) { + this.userid= userid; + this.groupid=groupid; + this.companyid=companyid; this.login = login; this.roles = roles; this.administrator = administrator; this.email = email; } - + /** + * Return id of the user + * + * @return userid + */ + public long getUserid() { + return userid; + } + /** + * Return id of the user + * + * @return groupid + */ + public long getGroupid() { + return groupid; + } + /** + * Return id of the user + * + * @return companyid + */ + public long getCompanyid() { + return companyid; + } /** * Return login of the user * diff --git a/dao/pom.xml b/dao/pom.xml index 5f0c895..828e062 100644 --- a/dao/pom.xml +++ b/dao/pom.xml @@ -24,5 +24,18 @@ common 2.5-SNAPSHOT + + + com.liferay.portal + portal-impl + 6.2.1 + provided + + + com.liferay.portal + portal-service + 6.2.1 + provided + diff --git a/dao/src/main/java/org/apertereports/dao/DictionaryDAO.java b/dao/src/main/java/org/apertereports/dao/DictionaryDAO.java index 75769fc..1bb59da 100644 --- a/dao/src/main/java/org/apertereports/dao/DictionaryDAO.java +++ b/dao/src/main/java/org/apertereports/dao/DictionaryDAO.java @@ -2,9 +2,13 @@ import org.apertereports.common.wrappers.DictionaryItem; +import com.liferay.portal.kernel.util.InfrastructureUtil; + import javax.naming.InitialContext; import javax.sql.DataSource; + import java.sql.Connection; +import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.util.*; @@ -29,65 +33,86 @@ private DictionaryDAO() { * SQL query. * @return A list of dictionary items */ - public static List fetchDictionary(String dictQuery) { - String[] dictQueryArray = dictQuery.split(";", 2); - String jndiName = dictQueryArray[0]; - String procedureName = dictQueryArray[1]; - try { - List res = new LinkedList(); + public static List fetchDictionary(String dictQuery) { + String[] dictQueryArray = dictQuery.split(";", 2); + String jndiName = dictQueryArray[0]; + String procedureName = dictQueryArray[1]; + Connection c; + try { + List res = new LinkedList(); - DataSource ds; - try { - ds = (DataSource) new InitialContext().lookup(jndiName); - } catch (Exception e1) { - String prefix = "java:comp/env/"; - if (jndiName.matches(prefix + ".*")) { - ds = (DataSource) new InitialContext().lookup(jndiName.substring(prefix.length())); - } else { - ds = (DataSource) new InitialContext().lookup(prefix + jndiName); - } - } - Connection c = ds.getConnection(); - try { - c.setAutoCommit(false); - PreparedStatement ps = c.prepareStatement("select * from ( " + procedureName + " ) as data"); - try { - final ResultSet rs = ps.executeQuery(); - try { - while (rs.next()) { - DictionaryItem e = new DictionaryItem(rs.getMetaData().getColumnCount()); - e.setCode(rs.getString(1)); - e.setDescription(rs.getString(2)); - res.add(e); - for (int i = 1; i <= rs.getMetaData().getColumnCount(); i++) { - e.setColumn(i - 1, rs.getString(i)); - } - } - } finally { - rs.close(); - } - } finally { - ps.close(); - } - } finally { - try { - c.rollback(); // żeby komuś nie przyszło coś głupiego do głowy - } finally { - c.close(); - } - } - Collections.sort(res, new Comparator() { + DataSource ds; + try { + ds = (DataSource) new InitialContext().lookup(jndiName); - @Override - public int compare(DictionaryItem o1, DictionaryItem o2) { - return (o1.getDescription() + "").compareToIgnoreCase(o2.getDescription() + ""); - } - }); - return res; - } catch (Exception e) { - throw new RuntimeException(e); - } - } + } catch (Exception e1) { + String prefix = "java:comp/env/"; + if (jndiName.matches(prefix + ".*")) { + ds = (DataSource) new InitialContext().lookup(jndiName + .substring(prefix.length())); + } + + else + + { + ds = (DataSource) new InitialContext().lookup(prefix + + jndiName); + } + + } +try{ + c = ds.getConnection(); +}catch(Exception e2) +{ + + ds=InfrastructureUtil.getDataSource(); + c=ds.getConnection(); +} + try { + c.setAutoCommit(false); + PreparedStatement ps = c.prepareStatement("select * from ( " + + procedureName + " ) as data"); + try { + final ResultSet rs = ps.executeQuery(); + try { + while (rs.next()) { + DictionaryItem e = new DictionaryItem(rs + .getMetaData().getColumnCount()); + e.setCode(rs.getString(1)); + e.setDescription(rs.getString(2)); + res.add(e); + for (int i = 1; i <= rs.getMetaData() + .getColumnCount(); i++) { + e.setColumn(i - 1, rs.getString(i)); + } + } + } finally { + rs.close(); + } + } finally { + ps.close(); + } + } finally { + try { + c.rollback(); // żeby komuś nie przyszło coś głupiego do + // głowy + } finally { + c.close(); + } + } + Collections.sort(res, new Comparator() { + + @Override + public int compare(DictionaryItem o1, DictionaryItem o2) { + return (o1.getDescription() + "").compareToIgnoreCase(o2 + .getDescription() + ""); + } + }); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + } /** * Separates an input string into dictionary items. This is used to parse a @@ -106,4 +131,4 @@ public static List readDictionaryFromString(String dictItemList) } return itemList; } -} +} \ No newline at end of file diff --git a/dao/src/main/java/org/apertereports/dao/utils/GeneralDAO.java b/dao/src/main/java/org/apertereports/dao/utils/GeneralDAO.java index 15098b3..b55e458 100644 --- a/dao/src/main/java/org/apertereports/dao/utils/GeneralDAO.java +++ b/dao/src/main/java/org/apertereports/dao/utils/GeneralDAO.java @@ -16,7 +16,7 @@ public final class GeneralDAO { private static final Logger logger = LoggerFactory.getLogger("ar.dao.general"); - public static final User ADMIN_USER = new User("A", new HashSet(), true, null); + public static final User ADMIN_USER = new User("A", new HashSet(), true, null,2,2,2); private GeneralDAO() { } @@ -67,4 +67,4 @@ public Void lambda() { } }.p(); } -} +} \ No newline at end of file diff --git a/dao/src/main/java/org/apertereports/dao/utils/SQLUtil.java b/dao/src/main/java/org/apertereports/dao/utils/SQLUtil.java index 780f400..14aff48 100644 --- a/dao/src/main/java/org/apertereports/dao/utils/SQLUtil.java +++ b/dao/src/main/java/org/apertereports/dao/utils/SQLUtil.java @@ -1,18 +1,27 @@ package org.apertereports.dao.utils; + + + + +import javax.naming.Context; +import javax.naming.InitialContext; +import javax.sql.DataSource; + import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.cfg.AnnotationConfiguration; import org.hibernate.cfg.Configuration; - import org.apertereports.common.exception.ARRuntimeException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; + /** * DAO utility class. Initializes Hibernate session factory with annotated * classes. Has methods for providing a new Hibernate session. */ + public class SQLUtil { private static final Logger logger = LoggerFactory.getLogger(SQLUtil.class); @@ -29,6 +38,7 @@ public class SQLUtil { configureSessions(); } + private static void configureSessions() { try { Configuration annotationConfiguration = new AnnotationConfiguration(); @@ -41,7 +51,7 @@ private static void configureSessions() { throw new ARRuntimeException(e); } } - + /** * Used to open a new Hibernate session. * @@ -71,4 +81,4 @@ public static SessionFactory getSessionFactory() { */ protected SQLUtil() { } -} +} \ No newline at end of file diff --git a/dao/src/main/java/org/apertereports/dao/utils/WHS.java b/dao/src/main/java/org/apertereports/dao/utils/WHS.java index 502f2f6..cd20e6c 100644 --- a/dao/src/main/java/org/apertereports/dao/utils/WHS.java +++ b/dao/src/main/java/org/apertereports/dao/utils/WHS.java @@ -1,9 +1,13 @@ package org.apertereports.dao.utils; +import javax.naming.InitialContext; + import org.apertereports.common.exception.ARRuntimeException; import org.hibernate.Session; +import org.hibernate.SessionFactory; import org.hibernate.Transaction; + /** * This generic class handles the opening and closing Hibernate session. It can * also wrap an invocation into transaction. Designed to be used as an inner @@ -17,6 +21,7 @@ public abstract class WHS { * A Hibernate session retrieved from {@link SQLUtil}. */ protected Session sess; + /** * Indicates whether to use a transaction or not. */ @@ -49,10 +54,10 @@ public WHS(boolean transaction) { * The main workhorse of this class. Retrieves the session from {@link SQLUtil} * and wraps the invocation of * {@link #lambda()} into transaction. - * * @return The object returned by {@link #lambda()} */ public ResultType p() { + sess = SQLUtil.getSession(); Transaction tx = null; try { @@ -76,4 +81,4 @@ public ResultType p() { } } -} +} \ No newline at end of file diff --git a/engine/pom.xml b/engine/pom.xml index 9b1f183..d11a41a 100644 --- a/engine/pom.xml +++ b/engine/pom.xml @@ -92,6 +92,18 @@ postgresql test + + com.liferay.portal + portal-impl + 6.2.1 + provided + + + com.liferay.portal + portal-service + 6.2.1 + provided + diff --git a/engine/src/main/java/org/apertereports/engine/ReportMaster.java b/engine/src/main/java/org/apertereports/engine/ReportMaster.java index 9368a88..05791c1 100644 --- a/engine/src/main/java/org/apertereports/engine/ReportMaster.java +++ b/engine/src/main/java/org/apertereports/engine/ReportMaster.java @@ -18,9 +18,11 @@ import java.util.Set; import java.util.regex.Matcher; import java.util.regex.Pattern; + import javax.naming.InitialContext; import javax.naming.NamingException; import javax.sql.DataSource; + import net.sf.jasperreports.engine.JRException; import net.sf.jasperreports.engine.JRExporter; import net.sf.jasperreports.engine.JRExporterParameter; @@ -41,16 +43,19 @@ import net.sf.jasperreports.engine.export.JRXlsExporterParameter; import net.sf.jasperreports.engine.query.JRXPathQueryExecuterFactory; import net.sf.jasperreports.engine.util.JRFontNotFoundException; + import org.apache.commons.lang.StringUtils; import org.apertereports.common.ARConstants; import org.apertereports.common.ConfigurationConstants; import org.apertereports.common.exception.ARException; import org.apertereports.common.exception.ARRuntimeException; +import org.apertereports.common.users.User; import org.apertereports.common.utils.LocaleUtils; import org.apertereports.common.utils.ReportGeneratorUtils; import org.apertereports.engine.SubreportProvider.Subreport; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import com.liferay.portal.kernel.util.InfrastructureUtil; import pl.net.bluesoft.util.lang.StringUtil; /** @@ -76,6 +81,7 @@ public class ReportMaster implements ARConstants, ConfigurationConstants { * Currently processed Jasper report. */ private AperteReport report; + private User user; /** * Constructs a new ReportMaster with a given {@link JasperReport}. @@ -112,10 +118,30 @@ public ReportMaster(String reportSource, SubreportProvider subreportProvider) th */ public ReportMaster(String reportSource, String cacheId, SubreportProvider subreportProvider) throws ARException { - super(); + super(); + report = compileReport(reportSource, cacheId, subreportProvider); + } + + /** + * Creates a new ReportMaster instance that checks the cache for a compiled + * version of this report. If the compiled report is not found, it creates + * it using a given JRXML report source. + * + * @param reportSource A JRXML report source + * @param cacheId A report cache id + * @param subreportProvider Subreport provider + * @param user User + * @throws JRException on Jasper error + * @throws SubreportNotFoundException + */ + public ReportMaster(String reportSource, String cacheId, SubreportProvider subreportProvider, User user) + throws ARException { + super(); + if (user != null) { + this.user = user; + } report = compileReport(reportSource, cacheId, subreportProvider); } - /** * Creates a new ReportMaster instance that checks the cache for a compiled * version of this report. If the compiled report is not found, it creates @@ -302,6 +328,22 @@ public static AperteReport compileReport(String reportSource, String cacheId, Su public byte[] generateAndExportReport(String format, Map reportParameters, Map exporterParameters, Map configuration) throws ARException { + if(user!=null) + { + long userid=user.getUserid(); + long groupid=user.getGroupid(); + long companyid=user.getCompanyid(); + + reportParameters.put("userid", userid); + reportParameters.put("groupud", groupid); + reportParameters.put("companyid", companyid); + + for(String key : reportParameters.keySet()) + { + System.out.print("Key: " + key + " - "); + System.out.print("Value: " + reportParameters.get(key) + "\n"); + } + } JasperPrint jasperPrint = generateReport(reportParameters, configuration); return exportReport(jasperPrint, format, exporterParameters, configuration); } @@ -319,7 +361,8 @@ public byte[] generateAndExportReport(String format, Map reportP * @return Bytes of a generated report */ public byte[] generateAndExportReport(String format, Map reportParameters, - Map configuration) throws ARException { + Map configuration) throws ARException { + return generateAndExportReport(format, reportParameters, null, configuration); } @@ -442,9 +485,10 @@ public AperteReport getAperteReport() { * @throws JRException on Jasper error * @throws NamingException on errors while accessing the initial context * @throws SQLException on errors while accessing a configured datasource + * @throws ClassNotFoundException */ private JasperPrint buildJasperPrint(Map reportParameters, Map configuration) - throws JRException, NamingException, SQLException { + throws JRException, NamingException, SQLException, ClassNotFoundException { //previously data source was passed as a method argument, but it was not used nowhere //xxx dataSource condition @@ -472,6 +516,7 @@ private JasperPrint buildJasperPrint(Map reportParameters, Map reportParameters, Map reportParameters, Map reportParameters) { private JasperReport getJasperReport() { return report.getJasperReport(); } -} +} \ No newline at end of file diff --git a/engine/src/main/java/org/apertereports/engine/ReportWebServiceHelper.java b/engine/src/main/java/org/apertereports/engine/ReportWebServiceHelper.java index a4a806f..d17c7d6 100644 --- a/engine/src/main/java/org/apertereports/engine/ReportWebServiceHelper.java +++ b/engine/src/main/java/org/apertereports/engine/ReportWebServiceHelper.java @@ -79,4 +79,4 @@ private Map getExporterParameters(ReportData report } return exporterParameters; } -} +} \ No newline at end of file diff --git a/pom.xml b/pom.xml index 1cacb37..68328c0 100644 --- a/pom.xml +++ b/pom.xml @@ -261,6 +261,13 @@ ${javax.mail.version} provided + + + mysql + mysql-connector-java + 5.1.9 + + @@ -297,6 +304,7 @@ 1.8.0 2.0.3.RELEASE 1.4.1 + 2.3.2 @@ -322,6 +330,7 @@ org.apache.maven.plugins maven-compiler-plugin + 2.3.2 1.6 1.6 @@ -347,6 +356,7 @@ forked-path + maven-resources-plugin @@ -407,6 +417,6 @@ + - From 3ec6a7974ba06d452cba6ddadb88cc1f3c4741a9 Mon Sep 17 00:00:00 2001 From: ntitsd Date: Fri, 10 Jul 2015 11:07:54 +0200 Subject: [PATCH 02/64] Update README.md --- README.md | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index bb560e1..70b3f63 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,6 @@ # Aperte Reports # -## News ## - -*May 13, 2013: Version 2.4 released. * - -Check [ReleaseNotes] for changelog or proceed directly to [http://code.google.com/p/aperte-reports/downloads/list download page]. +#### Aperte Reports now works with Liferay 6.2! #### @@ -13,6 +9,7 @@ Check [ReleaseNotes] for changelog or proceed directly to [http://code.google.co ### Reporting easier than ever! ### + Effective reporting is crucial in monitoring the operation of information systems and work of every company. Quick access to key information provided in a clear has significant impact on accuracy and speed of the decision-making. @@ -34,13 +31,7 @@ Application Portlet technology allows you to place graphical components on an or All GUI elements are created as a separate components using *Vaadin* framework, allowing easy and quick use of them in any applications based on this framework or even running inside of run Java servlet container. Applications written in other technologies can use a special mechanism to generate and return reports in desired format. Such mechanism can also be used to generate application-specific documents. -## How to start? ## - - # [Installation Install] the application - # [Tutorial Learn] how to use it - -... and use it! - ---- +Migration to Liferay 6.2 was supported by ITSD Consulting GmbH. -Work in this project is sponsored by !BlueSoft Sp. z o.o. - Polish software solution provider. Aperte Reports was known before as Vries Reporting Dashboard. +The Aperte Reports Project is sponsored by !BlueSoft Sp. z o.o. - Polish software solution provider. Aperte Reports was known before as Vries Reporting Dashboard. From 316a52eb7db00c54c0c73258eab5b92e953b5548 Mon Sep 17 00:00:00 2001 From: ntitsd Date: Fri, 10 Jul 2015 11:17:08 +0200 Subject: [PATCH 03/64] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 70b3f63..14ad73a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Aperte Reports # +# Aperte Reports for Liferay 6.2# #### Aperte Reports now works with Liferay 6.2! #### From efbe31bbd3a04e378261f6e91068b2cc6f2ad117 Mon Sep 17 00:00:00 2001 From: ntitsd Date: Fri, 10 Jul 2015 12:04:09 +0200 Subject: [PATCH 04/64] Update README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 14ad73a..d67241f 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,10 @@ Application Portlet technology allows you to place graphical components on an or All GUI elements are created as a separate components using *Vaadin* framework, allowing easy and quick use of them in any applications based on this framework or even running inside of run Java servlet container. Applications written in other technologies can use a special mechanism to generate and return reports in desired format. Such mechanism can also be used to generate application-specific documents. +### Aperte Reports Wiki ### +https://github.com/bluesoft-rnd/aperte-reports/wiki + + ---- Migration to Liferay 6.2 was supported by ITSD Consulting GmbH. From 063e52c10b9f170542c917da37efdace717babc0 Mon Sep 17 00:00:00 2001 From: bridderb Date: Fri, 10 Jul 2015 15:20:54 +0200 Subject: [PATCH 05/64] fix --- .../html/VAADIN/themes/liferay/styles.css | 27 ------------------- 1 file changed, 27 deletions(-) delete mode 100644 aperte-reports-ui/src/main/webapp/custom_jsps/html/VAADIN/themes/liferay/styles.css diff --git a/aperte-reports-ui/src/main/webapp/custom_jsps/html/VAADIN/themes/liferay/styles.css b/aperte-reports-ui/src/main/webapp/custom_jsps/html/VAADIN/themes/liferay/styles.css deleted file mode 100644 index 2018a93..0000000 --- a/aperte-reports-ui/src/main/webapp/custom_jsps/html/VAADIN/themes/liferay/styles.css +++ /dev/null @@ -1,27 +0,0 @@ - -.v-scrollable { - overflow: hidden; -} - -.v-panel-caption, -.v-panel-nocaption { - text-shadow: 1px 1px #fff; - font-size: 12px; - color: #222; - margin-left: 0px; - background-color: #FAFAFA; - /*background: transparent url(panel/top-right.png) no-repeat right top;*/ - padding: 5px 5px 10px 2px; - height: 12px; -} - -.v-panel-caption .v-icon { - padding-right: 2px; -} - -.v-panel-content { - border: 0px solid #999; - -webkit-border-radius: 0 0 4px 4px; - -moz-border-radius: 0 0 4px 4px; - border-radius: 0 0 4px 4px; -} From 85f5dbeb0898ba8892b46ab854be3ea2222ec33a Mon Sep 17 00:00:00 2001 From: bridderb Date: Fri, 31 Jul 2015 11:39:04 +0200 Subject: [PATCH 06/64] update themes --- .../AbstractReportingApplication.java | 2 +- .../org/apertereports/InvokerApplication.java | 1 + .../components/ReportManagerComponent.java | 2 +- .../VAADIN/themes/mymanagertheme/styles.css | 62 ++++++++++++++++++ .../html/VAADIN/themes/mytheme/styles.css | 65 +++++++++++++++++-- 5 files changed, 123 insertions(+), 9 deletions(-) create mode 100644 aperte-reports-ui/src/main/webapp/custom_jsps/html/VAADIN/themes/mymanagertheme/styles.css diff --git a/aperte-reports-ui/src/main/java/org/apertereports/AbstractReportingApplication.java b/aperte-reports-ui/src/main/java/org/apertereports/AbstractReportingApplication.java index b9cb7fe..56e1d78 100644 --- a/aperte-reports-ui/src/main/java/org/apertereports/AbstractReportingApplication.java +++ b/aperte-reports-ui/src/main/java/org/apertereports/AbstractReportingApplication.java @@ -67,7 +67,7 @@ public abstract class AbstractReportingApplication extends TPTA @Override public void applicationInit() { - + setTheme("mymanagertheme"); if (getContext() instanceof PortletApplicationContext2) { ((PortletApplicationContext2) getContext()).removePortletListener(this, this); ((PortletApplicationContext2) getContext()).addPortletListener(this, this); diff --git a/aperte-reports-ui/src/main/java/org/apertereports/InvokerApplication.java b/aperte-reports-ui/src/main/java/org/apertereports/InvokerApplication.java index 21be3c0..e7b36a2 100644 --- a/aperte-reports-ui/src/main/java/org/apertereports/InvokerApplication.java +++ b/aperte-reports-ui/src/main/java/org/apertereports/InvokerApplication.java @@ -20,6 +20,7 @@ public class InvokerApplication extends AbstractReportingApplication Date: Tue, 11 Aug 2015 17:17:17 +0200 Subject: [PATCH 07/64] =?UTF-8?q?Liferay-Version=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/webapp/WEB-INF/liferay-plugin-package.properties | 1 + 1 file changed, 1 insertion(+) diff --git a/aperte-reports-ui/src/main/webapp/WEB-INF/liferay-plugin-package.properties b/aperte-reports-ui/src/main/webapp/WEB-INF/liferay-plugin-package.properties index 8e443e2..79cd4c7 100644 --- a/aperte-reports-ui/src/main/webapp/WEB-INF/liferay-plugin-package.properties +++ b/aperte-reports-ui/src/main/webapp/WEB-INF/liferay-plugin-package.properties @@ -10,3 +10,4 @@ license=LGPL speed-filters-enabled=false portal-dependency-jars=\ vaadin.jar +liferay-versions=6.2.0+,6.2.10+ \ No newline at end of file From 84590a3b82fb429315e8fdcf336942321da0ae5e Mon Sep 17 00:00:00 2001 From: Fynn Hauptmeier Date: Thu, 3 Sep 2015 12:29:58 +0200 Subject: [PATCH 08/64] Update design to Liferay 6.2 --- aperte-reports-ui/pom.xml | 1 + .../AbstractReportingApplication.java | 2 +- .../components/AperteInvokerComponent.java | 55 +++--- .../components/CssPaginatedPanelList.java | 174 +++++++++++++++++ .../components/CyclicReportsComponent.java | 35 ++-- .../apertereports/components/HelpButton.java | 2 +- .../components/LiferayAccordion.java | 48 +++++ .../components/PaginatedPanelList.java | 11 +- .../org/apertereports/components/Popup.java | 12 +- .../components/RefreshButton.java | 1 + .../components/ReportManagerComponent.java | 164 ++++++++++------ .../ReportOrderBrowserComponent.java | 7 +- .../components/ReportParamPanel.java | 2 +- .../components/ReportParametersComponent.java | 1 - .../components/RolePermissionsPanel.java | 40 ++-- .../dashboard/EditDashboardComponentNew.java | 70 ++++--- .../dashboard/html/HtmlReportBuilder.java | 9 +- .../java/org/apertereports/ui/UiFactory.java | 28 ++- .../apertereports/util/NotificationUtil.java | 4 +- .../main/webapp/WEB-INF/liferay-portlet.xml | 4 + .../src/main/webapp/css/main.css | 182 ++++++++++++++++++ .../VAADIN/themes/mymanagertheme/styles.css | 62 ------ .../html/VAADIN/themes/mytheme/addons.scss | 7 - .../html/VAADIN/themes/mytheme/mytheme.scss | 12 -- .../html/VAADIN/themes/mytheme/styles.css | 78 -------- .../html/VAADIN/themes/mytheme/styles.scss | 11 -- 26 files changed, 700 insertions(+), 322 deletions(-) create mode 100644 aperte-reports-ui/src/main/java/org/apertereports/components/CssPaginatedPanelList.java create mode 100644 aperte-reports-ui/src/main/java/org/apertereports/components/LiferayAccordion.java create mode 100644 aperte-reports-ui/src/main/webapp/css/main.css delete mode 100644 aperte-reports-ui/src/main/webapp/custom_jsps/html/VAADIN/themes/mymanagertheme/styles.css delete mode 100644 aperte-reports-ui/src/main/webapp/custom_jsps/html/VAADIN/themes/mytheme/addons.scss delete mode 100644 aperte-reports-ui/src/main/webapp/custom_jsps/html/VAADIN/themes/mytheme/mytheme.scss delete mode 100644 aperte-reports-ui/src/main/webapp/custom_jsps/html/VAADIN/themes/mytheme/styles.scss diff --git a/aperte-reports-ui/pom.xml b/aperte-reports-ui/pom.xml index 3072f4f..a228cca 100644 --- a/aperte-reports-ui/pom.xml +++ b/aperte-reports-ui/pom.xml @@ -124,6 +124,7 @@ + src/main/resources diff --git a/aperte-reports-ui/src/main/java/org/apertereports/AbstractReportingApplication.java b/aperte-reports-ui/src/main/java/org/apertereports/AbstractReportingApplication.java index 56e1d78..c4f7e9d 100644 --- a/aperte-reports-ui/src/main/java/org/apertereports/AbstractReportingApplication.java +++ b/aperte-reports-ui/src/main/java/org/apertereports/AbstractReportingApplication.java @@ -67,7 +67,7 @@ public abstract class AbstractReportingApplication extends TPTA @Override public void applicationInit() { - setTheme("mymanagertheme"); + setTheme("mytheme"); if (getContext() instanceof PortletApplicationContext2) { ((PortletApplicationContext2) getContext()).removePortletListener(this, this); ((PortletApplicationContext2) getContext()).addPortletListener(this, this); diff --git a/aperte-reports-ui/src/main/java/org/apertereports/components/AperteInvokerComponent.java b/aperte-reports-ui/src/main/java/org/apertereports/components/AperteInvokerComponent.java index ea491b4..f4d6cc3 100644 --- a/aperte-reports-ui/src/main/java/org/apertereports/components/AperteInvokerComponent.java +++ b/aperte-reports-ui/src/main/java/org/apertereports/components/AperteInvokerComponent.java @@ -17,6 +17,8 @@ import org.apertereports.util.FileStreamer; import org.apertereports.util.VaadinUtil; +import com.google.gwt.dom.client.Element; +import com.google.gwt.user.client.DOM; import com.vaadin.event.FieldEvents.TextChangeEvent; import com.vaadin.event.FieldEvents.TextChangeListener; import com.vaadin.ui.*; @@ -37,10 +39,11 @@ public class AperteInvokerComponent extends Panel { private static final int PAGE_SIZE = 10; private static final String COMPONENT_STYLE_NAME = "borderless light"; - private PaginatedPanelList reportList; + private CssPaginatedPanelList reportList; private User user; public AperteInvokerComponent() { + super(new CssLayout()); init(); } @@ -63,16 +66,19 @@ private class ReportPanel extends Panel { private ReportParamPanel paramsPanel = null; private Button toggleParams; private ReportTemplate reportTemplate; + + private LiferayAccordion accordion; public ReportPanel(final ReportTemplate report) { + super(new CssLayout()); this.reportTemplate = report; - setStyleName(PANEL_STYLE_NAME); - ((AbstractLayout) getContent()).setMargin(false, false, false, false); - UiFactory.createSpacer(this, null, "6px"); - HorizontalLayout row = UiFactory.createHLayout(this, FAction.SET_FULL_WIDTH, FAction.SET_SPACING); - UiFactory.createLabel(report.getReportname(), row, REPORT_NAME_STYLE, FAction.ALIGN_LEFT); - UiFactory.createSpacer(row, FAction.SET_EXPAND_RATIO_1_0); - toggleParams = UiFactory.createButton(UiIds.LABEL_PARAMETERS, row, BaseTheme.BUTTON_LINK, new ClickListener() { + addStyleName(PANEL_STYLE_NAME); + addStyleName("invoker"); + //((AbstractLayout) getContent()).setMargin(false, false, false, false); + //UiFactory.createSpacer(this, null, "6px"); + CssLayout header = new CssLayout(); + UiFactory.createLabel(report.getReportname(), header); + toggleParams = UiFactory.createButton(UiIds.LABEL_PARAMETERS, header, BaseTheme.BUTTON_LINK, new ClickListener() { @Override public void buttonClick(ClickEvent event) { @@ -80,18 +86,17 @@ public void buttonClick(ClickEvent event) { } }); - UiFactory.createLabel(report.getDescription(), this, REPORT_DESCR_STYLE, FAction.SET_FULL_WIDTH); - - setWidth("100%"); + accordion = UiFactory.createAccordion(this, header); + this.setSizeUndefined(); } private void toggleParams() { if (paramsPanel == null) { paramsPanel = createParamsPanel(); - addComponent(paramsPanel); + accordion.addContent(paramsPanel); toggleParams.setCaption(VaadinUtil.getValue(UiIds.AR_MSG_HIDE_PARAMETERS)); } else { - removeComponent(paramsPanel); + accordion.removeContent(); paramsPanel = null; toggleParams.setCaption(VaadinUtil.getValue(UiIds.LABEL_PARAMETERS)); } @@ -99,10 +104,12 @@ private void toggleParams() { // xxx: could be better private ReportParamPanel createParamsPanel() { - final ReportParamPanel panel = new ReportParamPanel(reportTemplate, true); + final ReportParamPanel panel = new ReportParamPanel(reportTemplate, true); panel.setStyleName("borderless"); - HorizontalLayout hl = UiFactory.createHLayout(panel, FAction.SET_SPACING, FAction.SET_FULL_WIDTH); - UiFactory.createButton(UiIds.LABEL_GENERATE, hl, BaseTheme.BUTTON_LINK, new ClickListener() { + //HorizontalLayout hl = UiFactory.createHLayout(panel, FAction.SET_SPACING); + CssLayout hl = new CssLayout(); + panel.addComponent(hl); + Button reportParamBtn = UiFactory.createButton(UiIds.LABEL_GENERATE, hl, BaseTheme.BUTTON_LINK, new ClickListener() { @Override public void buttonClick(ClickEvent event) { @@ -125,9 +132,10 @@ public void buttonClick(ClickEvent event) { } }); - + reportParamBtn.addStyleName("btn"); Button backgroundGenerate = UiFactory.createButton(UiIds.AR_MSG_GENERATE_IN_BACKGROUND, hl, BaseTheme.BUTTON_LINK); + backgroundGenerate.addStyleName("btn"); final CheckBox sendEmailCheckbox = UiFactory.createCheckBox(UiIds.AR_MSG_SEND_EMAIL, hl); backgroundGenerate.addListener(new ClickListener() { @@ -155,15 +163,16 @@ public void buttonClick(ClickEvent event) { sendEmailCheckbox.setEnabled(false); } - UiFactory.createSpacer(hl, FAction.SET_EXPAND_RATIO_1_0); - UiFactory.createButton(UiIds.LABEL_CLOSE, hl, new ClickListener() { + //UiFactory.createSpacer(hl, FAction.SET_EXPAND_RATIO_1_0); + /*Button reportParamBtn2 =UiFactory.createButton(UiIds.LABEL_CLOSE, hl, new ClickListener() { @Override public void buttonClick(ClickEvent event) { toggleParams(); } }, FAction.ALIGN_RIGTH); - + reportParamBtn2.addStyleName("btn"); + */ return panel; } @@ -179,8 +188,8 @@ private boolean backgorundGenerationAvail() { */ private void init() { setScrollable(true); - setStyleName(COMPONENT_STYLE_NAME); - + addStyleName(COMPONENT_STYLE_NAME); + addStyleName("accordion"); TextField filterField = UiFactory.createSearchBox(UiIds.LABEL_FILTER, this, new TextChangeListener() { @Override @@ -191,7 +200,7 @@ public void textChange(TextChangeEvent event) { }); filterField.setWidth("150px"); - reportList = new PaginatedPanelList(PAGE_SIZE) { + reportList = new CssPaginatedPanelList(PAGE_SIZE) { @Override protected ReportPanel transform(ReportTemplate object) { diff --git a/aperte-reports-ui/src/main/java/org/apertereports/components/CssPaginatedPanelList.java b/aperte-reports-ui/src/main/java/org/apertereports/components/CssPaginatedPanelList.java new file mode 100644 index 0000000..53d028e --- /dev/null +++ b/aperte-reports-ui/src/main/java/org/apertereports/components/CssPaginatedPanelList.java @@ -0,0 +1,174 @@ +package org.apertereports.components; + +import java.util.Collection; + +import com.vaadin.ui.Button; +import com.vaadin.ui.Button.ClickEvent; +import com.vaadin.ui.Button.ClickListener; +import com.vaadin.ui.CssLayout; +import com.vaadin.ui.HorizontalLayout; +import com.vaadin.ui.Panel; +import com.vaadin.ui.VerticalLayout; +import com.vaadin.ui.themes.BaseTheme; +import org.apertereports.ui.UiFactory; +import org.apertereports.ui.UiFactory.FAction; +import org.apertereports.ui.UiIds; + +/** + * + * @author Zbigniew Malinowski + * + * Component paginating GUI lists. + * + * @param datamodel backing class + * @param class used to display properties of backing class objects in GUI + */ +@SuppressWarnings("serial") +public abstract class CssPaginatedPanelList extends CssLayout { + + private String filter; + private int pageSize; + private int listSize; + private int pageNumber; + + public CssPaginatedPanelList(int pageSize) { + this.pageSize = pageSize; + } + + /** + * Fetches filtered list's fragment. + * + * @return + */ + protected abstract Collection fetch(String filter, int firstResult, int maxResults); + + /** + * Creates GUI component displaying backing object's properties. + * + * @param object backing object + * @return GUI component + */ + protected abstract W transform(O object); + + /** + * Counts filtered list's size. + * + * @return + */ + protected abstract int getListSize(String filter); + + public void filter(String filter) { + this.filter = filter; + pageNumber = 0; + refresh(true); + } + + public void refresh() { + refresh(true); + } + + private void refresh(boolean getListSize) { + if (getListSize) { + listSize = getListSize(filter); + } + Collection list = fetch(filter, calculateFirstResult(), pageSize); + removeAllComponents(); + for (O o : list) { + addComponent(transform(o)); + } + if (listSize > pageSize) { + addFooter(); + } + } + + private int calculateFirstResult() { + return pageNumber * pageSize; + } + + private void addFooter() { + HorizontalLayout hl = UiFactory.createHLayout(this, FAction.SET_SPACING); + hl.setMargin(true, false, false, false); + if (hasPrevious()) { + Button tmpButton = UiFactory.createButton(UiIds.LABEL_PREVIOUS, hl, BaseTheme.BUTTON_LINK, new ClickListener() { + + @Override + public void buttonClick(ClickEvent event) { + previousPage(); + } + }); + tmpButton.addStyleName("btn"); + } else { + UiFactory.createLabel(UiIds.LABEL_PREVIOUS, hl); + } + for (int i = 0; i < countPages(); i++) { + final int pageIndex = i; + String caption = "" + (pageIndex + 1); + if (pageIndex == pageNumber) { + UiFactory.createLabel(caption, hl); + } else { + Button tmpButton2 = UiFactory.createButton(caption, hl, BaseTheme.BUTTON_LINK, new ClickListener() { + + @Override + public void buttonClick(ClickEvent event) { + showPage(pageIndex); + } + }); + tmpButton2.addStyleName("btn"); + } + } + if (hasNext()) { + Button tmpButton3 = UiFactory.createButton(UiIds.LABEL_NEXT, hl, BaseTheme.BUTTON_LINK, new ClickListener() { + + @Override + public void buttonClick(ClickEvent event) { + nextPage(); + } + }); + tmpButton3.addStyleName("btn"); + } else { + UiFactory.createLabel(UiIds.LABEL_NEXT, hl); + } + } + + private void showPage(int pageNumber) { + if (hasPage(pageNumber)) { + this.pageNumber = pageNumber; + refresh(false); + } + } + + private void nextPage() { + if (hasNext()) { + pageNumber++; + } + refresh(false); + } + + private void previousPage() { + if (hasPrevious()) { + pageNumber--; + } + refresh(false); + } + + private int countPages() { + + int count = listSize / pageSize + 1; + if (listSize % pageSize == 0) { + count--; + } + return count; + } + + private boolean hasPage(int pageNumber) { + return pageNumber >= 0 && pageNumber < countPages(); + } + + private boolean hasPrevious() { + return pageNumber > 0; + } + + private boolean hasNext() { + return pageNumber < countPages() - 1; + } +} diff --git a/aperte-reports-ui/src/main/java/org/apertereports/components/CyclicReportsComponent.java b/aperte-reports-ui/src/main/java/org/apertereports/components/CyclicReportsComponent.java index 4d59b66..beeb8c3 100644 --- a/aperte-reports-ui/src/main/java/org/apertereports/components/CyclicReportsComponent.java +++ b/aperte-reports-ui/src/main/java/org/apertereports/components/CyclicReportsComponent.java @@ -102,7 +102,7 @@ public void buttonClick(ClickEvent event) { addNew(); } }, FAction.SET_INVISIBLE); - + addButton.addStyleName("btn"); list = new PaginatedPanelList(PAGE_SIZE) { @Override @@ -193,6 +193,7 @@ private void toggleEnable() { scheduleOrUnschedule(CyclicReportPanel.this.config); } }, FAction.ALIGN_RIGTH); + enabledButton.addStyleName("btn"); HorizontalLayout hl = UiFactory.createHLayout(row2); VerticalLayout vl = UiFactory.createVLayout(hl); UiFactory.createLabel(item, ORDER_RECIPIENT_EMAIL, vl); @@ -207,21 +208,23 @@ public void buttonClick(ClickEvent event) { toggleParamsPanel(); } }); - UiFactory.createButton(UiIds.LABEL_EDIT, row3, BaseTheme.BUTTON_LINK, new ClickListener() { + toggleParamsButton.addStyleName("btn"); + Button tmpButton = UiFactory.createButton(UiIds.LABEL_EDIT, row3, BaseTheme.BUTTON_LINK, new ClickListener() { @Override public void buttonClick(ClickEvent event) { edit(); } }); - UiFactory.createButton(UiIds.LABEL_DELETE, row3, BaseTheme.BUTTON_LINK, new ClickListener() { + tmpButton.addStyleName("btn"); + Button tmpButton2 = UiFactory.createButton(UiIds.LABEL_DELETE, row3, BaseTheme.BUTTON_LINK, new ClickListener() { @Override public void buttonClick(ClickEvent event) { remove(); } }); - + tmpButton2.addStyleName("btn"); } private String getStateLabelCaption() { @@ -264,9 +267,11 @@ private ReportParamPanel createParamsPanel() { final ReportParamPanel panel = new ReportParamPanel(config.getReport(), false, params); panel.setStyleName("borderless"); - HorizontalLayout hl = UiFactory.createHLayout(panel, FAction.SET_SPACING, FAction.SET_FULL_WIDTH); - - UiFactory.createButton(UiIds.LABEL_GENERATE, hl, BaseTheme.BUTTON_LINK, new ClickListener() { + CssLayout hl = new CssLayout() ; + panel.addComponent(hl); + //HorizontalLayout hl = UiFactory.createHLayout(panel, FAction.SET_SPACING, FAction.SET_FULL_WIDTH); + + Button tmpButton3 = UiFactory.createButton(UiIds.LABEL_GENERATE, hl, BaseTheme.BUTTON_LINK, new ClickListener() { @Override public void buttonClick(ClickEvent event) { @@ -286,9 +291,9 @@ public void buttonClick(ClickEvent event) { } } }); - + tmpButton3.addStyleName("btn"); UiFactory.createSpacer(hl, FAction.SET_EXPAND_RATIO_1_0); - UiFactory.createButton(UiIds.LABEL_SAVE, hl, new ClickListener() { + Button tmpButton4 = UiFactory.createButton(UiIds.LABEL_SAVE, hl, new ClickListener() { @Override public void buttonClick(ClickEvent event) { @@ -301,15 +306,15 @@ public void buttonClick(ClickEvent event) { toggleParamsPanel(); } }, FAction.ALIGN_RIGTH); - - UiFactory.createButton(UiIds.LABEL_CANCEL, hl, new ClickListener() { + tmpButton4.addStyleName("btn"); + Button tmpButton5 = UiFactory.createButton(UiIds.LABEL_CANCEL, hl, new ClickListener() { @Override public void buttonClick(ClickEvent event) { toggleParamsPanel(); } }, FAction.ALIGN_RIGTH); - + tmpButton5.addStyleName("tmp"); return panel; } } @@ -344,19 +349,21 @@ public EditCyclicReportPanel(CyclicReportConfig config, boolean newItem) { UiFactory.createSpacer(this, null, "5px"); HorizontalLayout buttons = UiFactory.createHLayout(this, FAction.SET_SPACING, FAction.SET_FULL_WIDTH); UiFactory.createSpacer(buttons, FAction.SET_EXPAND_RATIO_1_0); - UiFactory.createButton(UiIds.LABEL_SAVE, buttons, new ClickListener() { + Button tmpButton5 = UiFactory.createButton(UiIds.LABEL_SAVE, buttons, new ClickListener() { @Override public void buttonClick(ClickEvent event) { save(); } }, FAction.ALIGN_RIGTH); - UiFactory.createButton(UiIds.LABEL_CANCEL, buttons, new ClickListener() { + tmpButton5.addStyleName("btn"); + Button tmpButton6 = UiFactory.createButton(UiIds.LABEL_CANCEL, buttons, new ClickListener() { @Override public void buttonClick(ClickEvent event) { cancel(); } }, FAction.ALIGN_RIGTH); + tmpButton6.addStyleName("btn"); } protected void cancel() { diff --git a/aperte-reports-ui/src/main/java/org/apertereports/components/HelpButton.java b/aperte-reports-ui/src/main/java/org/apertereports/components/HelpButton.java index e88ae13..286ad5f 100644 --- a/aperte-reports-ui/src/main/java/org/apertereports/components/HelpButton.java +++ b/aperte-reports-ui/src/main/java/org/apertereports/components/HelpButton.java @@ -20,8 +20,8 @@ public HelpButton(final Module module, final Tab tab) { setDescription(VaadinUtil.getValue(UiIds.LABEL_HELP)); addStyleName(BaseTheme.BUTTON_LINK); setWidth(DEFAULT_WIDTH_IN_UNITS, UNITS_PIXELS); + addStyleName("btn"); addListener(new Button.ClickListener() { - @Override public void buttonClick(Button.ClickEvent event) { HelpWindow subwindow = new HelpWindow(module, tab); diff --git a/aperte-reports-ui/src/main/java/org/apertereports/components/LiferayAccordion.java b/aperte-reports-ui/src/main/java/org/apertereports/components/LiferayAccordion.java new file mode 100644 index 0000000..e38f9d3 --- /dev/null +++ b/aperte-reports-ui/src/main/java/org/apertereports/components/LiferayAccordion.java @@ -0,0 +1,48 @@ +package org.apertereports.components; + +import com.vaadin.ui.Component; +import com.vaadin.ui.ComponentContainer; +import com.vaadin.ui.CssLayout; + +public class LiferayAccordion extends CssLayout { + + CssLayout contentWrapper; + + public LiferayAccordion(CssLayout header, Component content) { + super(); + CssLayout topRow = new CssLayout(); + this.addComponent(topRow); + this.addStyleName("accordion-group lfr-panel lfr-panel-extended"); + topRow.addStyleName("accordion-heading toggler-header toggler-header-expanded"); + CssLayout row = new CssLayout(); + topRow.addComponent(row); + row.addStyleName("accordion-toggle"); + row.addStyleName("clear"); + row.addComponent(header); + + addContent(content); + } + + public void addContent(Component content) { + if (content != null) { + contentWrapper = new CssLayout(); + contentWrapper.addStyleName("toggler-content-wrapper"); + + CssLayout contentWrapperB = new CssLayout(); + contentWrapperB.addStyleName("toggler-content toggler-content-expanded"); + contentWrapper.addComponent(contentWrapperB); + + content.addStyleName("accordion-inner"); + contentWrapperB.addComponent(content); + + this.addComponent(contentWrapper); + } + } + + public void removeContent() { + if (contentWrapper != null) { + this.removeComponent(contentWrapper); + } + } + +} diff --git a/aperte-reports-ui/src/main/java/org/apertereports/components/PaginatedPanelList.java b/aperte-reports-ui/src/main/java/org/apertereports/components/PaginatedPanelList.java index 7349864..753d25c 100644 --- a/aperte-reports-ui/src/main/java/org/apertereports/components/PaginatedPanelList.java +++ b/aperte-reports-ui/src/main/java/org/apertereports/components/PaginatedPanelList.java @@ -2,7 +2,7 @@ import java.util.Collection; - +import com.vaadin.ui.Button; import com.vaadin.ui.Button.ClickEvent; import com.vaadin.ui.Button.ClickListener; import com.vaadin.ui.HorizontalLayout; @@ -88,13 +88,14 @@ private void addFooter() { HorizontalLayout hl = UiFactory.createHLayout(this, FAction.SET_SPACING); hl.setMargin(true, false, false, false); if (hasPrevious()) { - UiFactory.createButton(UiIds.LABEL_PREVIOUS, hl, BaseTheme.BUTTON_LINK, new ClickListener() { + Button tmpButton = UiFactory.createButton(UiIds.LABEL_PREVIOUS, hl, BaseTheme.BUTTON_LINK, new ClickListener() { @Override public void buttonClick(ClickEvent event) { previousPage(); } }); + tmpButton.addStyleName("btn"); } else { UiFactory.createLabel(UiIds.LABEL_PREVIOUS, hl); } @@ -104,23 +105,25 @@ public void buttonClick(ClickEvent event) { if (pageIndex == pageNumber) { UiFactory.createLabel(caption, hl); } else { - UiFactory.createButton(caption, hl, BaseTheme.BUTTON_LINK, new ClickListener() { + Button tmpButton2 = UiFactory.createButton(caption, hl, BaseTheme.BUTTON_LINK, new ClickListener() { @Override public void buttonClick(ClickEvent event) { showPage(pageIndex); } }); + tmpButton2.addStyleName("btn"); } } if (hasNext()) { - UiFactory.createButton(UiIds.LABEL_NEXT, hl, BaseTheme.BUTTON_LINK, new ClickListener() { + Button tmpButton3 = UiFactory.createButton(UiIds.LABEL_NEXT, hl, BaseTheme.BUTTON_LINK, new ClickListener() { @Override public void buttonClick(ClickEvent event) { nextPage(); } }); + tmpButton3.addStyleName("btn"); } else { UiFactory.createLabel(UiIds.LABEL_NEXT, hl); } diff --git a/aperte-reports-ui/src/main/java/org/apertereports/components/Popup.java b/aperte-reports-ui/src/main/java/org/apertereports/components/Popup.java index 85168df..631f9f9 100644 --- a/aperte-reports-ui/src/main/java/org/apertereports/components/Popup.java +++ b/aperte-reports-ui/src/main/java/org/apertereports/components/Popup.java @@ -3,6 +3,7 @@ import com.vaadin.data.Validator.InvalidValueException; import com.vaadin.event.ShortcutAction.KeyCode; import com.vaadin.ui.Button; +import com.vaadin.ui.CssLayout; import com.vaadin.ui.Button.ClickEvent; import com.vaadin.ui.Form; import com.vaadin.ui.HorizontalLayout; @@ -30,16 +31,18 @@ public void init() { setWidth("300px"); // The cancel / apply buttons - HorizontalLayout buttons = UiFactory.createHLayout(this, FAction.SET_SPACING); - UiFactory.createButton(POPUP_DISCARD, buttons, null, new Button.ClickListener() { + //HorizontalLayout buttons = UiFactory.createHLayout(this, FAction.SET_SPACING); + CssLayout buttons = new CssLayout() ; + this.addComponent(buttons); + Button tmpButton1 = UiFactory.createButton(POPUP_DISCARD, buttons, null, new Button.ClickListener() { @Override public void buttonClick(ClickEvent event) { close(); } }, FAction.ALIGN_LEFT); - - UiFactory.createButton(POPUP_APPLY, buttons, new Button.ClickListener() { + tmpButton1.addStyleName("btn"); + Button tmpButton2 = UiFactory.createButton(POPUP_APPLY, buttons, new Button.ClickListener() { @Override public void buttonClick(ClickEvent event) { @@ -55,5 +58,6 @@ public void buttonClick(ClickEvent event) { } } }); + tmpButton2.addStyleName("btn"); } } diff --git a/aperte-reports-ui/src/main/java/org/apertereports/components/RefreshButton.java b/aperte-reports-ui/src/main/java/org/apertereports/components/RefreshButton.java index b22402b..57f45c5 100644 --- a/aperte-reports-ui/src/main/java/org/apertereports/components/RefreshButton.java +++ b/aperte-reports-ui/src/main/java/org/apertereports/components/RefreshButton.java @@ -14,6 +14,7 @@ public class RefreshButton extends Button { public RefreshButton(String caption, Button.ClickListener listener) { setDescription(caption); addStyleName(BaseTheme.BUTTON_LINK); + addStyleName("btn"); setWidth(DEFAULT_WIDTH_IN_UNITS, UNITS_PIXELS); addListener(listener); } diff --git a/aperte-reports-ui/src/main/java/org/apertereports/components/ReportManagerComponent.java b/aperte-reports-ui/src/main/java/org/apertereports/components/ReportManagerComponent.java index 2bde2e9..5506452 100644 --- a/aperte-reports-ui/src/main/java/org/apertereports/components/ReportManagerComponent.java +++ b/aperte-reports-ui/src/main/java/org/apertereports/components/ReportManagerComponent.java @@ -5,9 +5,6 @@ import com.vaadin.event.FieldEvents.TextChangeListener; import com.vaadin.ui.*; import com.vaadin.ui.Button.ClickEvent; - -import com.vaadin.ui.ComponentContainer; - import com.vaadin.ui.Button.ClickListener; import com.vaadin.ui.Upload.FailedEvent; import com.vaadin.ui.Upload.FailedListener; @@ -17,6 +14,9 @@ import java.io.ByteArrayOutputStream; import java.io.OutputStream; import java.util.*; + +import javax.naming.NamingException; + import org.apache.commons.codec.binary.Base64; import org.apache.commons.lang.StringUtils; import org.apertereports.backbone.jms.ARJmsFacade; @@ -72,17 +72,20 @@ public class ReportManagerComponent extends Panel { private static final String MSG_REMOVING_REPORT = "report.manager.removing.report"; private static final String MSG_REPORT_IS_USED = "report.manager.report.is.used"; private static final String MSG_DO_YOU_WANT_TO_CONTINUE = "q.do.you.want.to.continue"; - private PaginatedPanelList list; + private CssPaginatedPanelList list; private ReportReceiver newReportReceiver; private transient User user; + public ReportManagerComponent() { - + super(new CssLayout()); init(); } private void init() { - VerticalLayout mainLayout = UiFactory.createVLayout(this); + CssLayout mainLayout = new CssLayout(); + mainLayout.addStyleName("a-config"); + this.addComponent(mainLayout); newReportReceiver = new ReportReceiver(new ReportTemplate()); newReportReceiver.addListener(new ReportReceivedListener() { @@ -92,12 +95,14 @@ public void reportReceived(ReportTemplate reportTemplate) { } }); Upload newReportUpload = new Upload(null, newReportReceiver); + newReportUpload.addStyleName("btn"); newReportUpload.addListener((SucceededListener) newReportReceiver); newReportUpload.addListener((FailedListener) newReportReceiver); newReportUpload.setButtonCaption(VaadinUtil.getValue(UiIds.LABEL_ADD)); newReportUpload.setImmediate(true); + HorizontalLayout hl = UiFactory.createHLayout(mainLayout, FAction.SET_FULL_WIDTH); - list = new PaginatedPanelList(PAGE_SIZE) { + list = new CssPaginatedPanelList(PAGE_SIZE) { @Override protected ReportItemPanel transform(ReportTemplate object) { @@ -159,16 +164,26 @@ private class AddOrEditReportItemPanel extends Panel { private final boolean adding; public AddOrEditReportItemPanel(ReportItemPanel itemPanel, boolean adding) { + super(new CssLayout()); this.itemPanel = itemPanel; this.adding = adding; - setStyleName(EDIT_PANEL_STYLE); - setCaption(VaadinUtil.getValue(adding ? UiIds.LABEL_ADDING : UiIds.LABEL_EDITION) + " - " + itemPanel.reportTemplate.getReportname()); + addStyleName(EDIT_PANEL_STYLE); + + CssLayout header = new CssLayout(); + UiFactory.createLabel(VaadinUtil.getValue(adding ? UiIds.LABEL_ADDING : UiIds.LABEL_EDITION) + " - " + itemPanel.reportTemplate.getReportname(), header); + //setCaption(VaadinUtil.getValue(adding ? UiIds.LABEL_ADDING : UiIds.LABEL_EDITION) + " - " + itemPanel.reportTemplate.getReportname()); tmpReportTemplate = new ReportTemplate(); deepCopy(itemPanel.reportTemplate, tmpReportTemplate); beanItem = new BeanItem(tmpReportTemplate); - - HorizontalLayout headerRow = UiFactory.createHLayout(this, FAction.SET_FULL_WIDTH); - + + + + CssLayout subSubContent = new CssLayout(); + + UiFactory.createAccordion(this, header, subSubContent); + + HorizontalLayout headerRow = UiFactory.createHLayout(subSubContent,FAction.SET_FULL_WIDTH); + nameField = UiFactory.createTextField(beanItem, REPORTNAME_PROPERTY, headerRow, REPORT_MANAGER_ITEM_EDIT_NAME_PROMPT, FAction.ALIGN_LEFT); @@ -188,6 +203,7 @@ public void reportReceived(ReportTemplate reportTemplate) { }); Upload changeReportupload = new Upload(null, uploadReceiver); + changeReportupload.addStyleName("btn"); changeReportupload.setWidth(null); changeReportupload.addListener((Upload.SucceededListener) uploadReceiver); changeReportupload.addListener((Upload.FailedListener) uploadReceiver); @@ -195,38 +211,47 @@ public void reportReceived(ReportTemplate reportTemplate) { changeReportupload.setButtonCaption(VaadinUtil.getValue(REPORT_MANAGER_ITEM_UPLOAD_CHANGE)); uploadCell.addComponent(changeReportupload); - UiFactory.createTextField(beanItem, DESCRIPTION_PROPERTY, this, UiIds.AR_MANAGER_REPORT_DESCRIPTION, FAction.SET_FULL_WIDTH); + UiFactory.createTextField(beanItem, DESCRIPTION_PROPERTY, subSubContent, UiIds.AR_MANAGER_REPORT_DESCRIPTION, FAction.SET_FULL_WIDTH); - UiFactory.createSpacer(this, null, "5px"); - Label errorLabel = UiFactory.createLabel("", this); - UiFactory.createSpacer(this, null, "5px"); + //UiFactory.createSpacer(this, null, "5px"); + Label errorLabel = UiFactory.createLabel("", subSubContent); + //UiFactory.createSpacer(this, null, "5px"); errorHandler = new ErrorLabelHandler(errorLabel); - HorizontalLayout footerRow = UiFactory.createHLayout(this, FAction.SET_FULL_WIDTH); - - HorizontalLayout checkboxCell = UiFactory.createHLayout(footerRow, FAction.SET_SPACING); + //HorizontalLayout footerRow = UiFactory.createHLayout(this, FAction.SET_FULL_WIDTH); + CssLayout footerRow = new CssLayout() ; + subSubContent.addComponent(footerRow); + + //HorizontalLayout checkboxCell = UiFactory.createHLayout(footerRow, FAction.SET_SPACING); + CssLayout checkboxCell = new CssLayout() ; + footerRow.addComponent(checkboxCell); UiFactory.createCheckBox(UiIds.LABEL_ACTIVE, beanItem, ACTIVE_PROPERTY, checkboxCell); UiFactory.createCheckBox(REPORT_MANAGER_ITEM_EDIT_ONLINE, beanItem, ALLOW_ONLINE_DISPLAY_PROPERTY, checkboxCell); UiFactory.createCheckBox(REPORT_MANAGER_ITEM_EDIT_BACKGROUND, beanItem, ALLOW_BACKGROUND_PROCESSING_PROPERTY, checkboxCell); - HorizontalLayout buttonsCell = UiFactory.createHLayout(footerRow, FAction.SET_SPACING, FAction.ALIGN_RIGTH); - UiFactory.createButton(UiIds.LABEL_OK, buttonsCell, new ClickListener() { + //HorizontalLayout buttonsCell = UiFactory.createHLayout(footerRow, FAction.SET_SPACING, FAction.ALIGN_RIGTH); + CssLayout buttonsCell = new CssLayout() ; + footerRow.addComponent(buttonsCell); + Button tmpButton1 = UiFactory.createButton(UiIds.LABEL_OK, buttonsCell, new ClickListener() { @Override public void buttonClick(ClickEvent event) { saveChanges(); } }); - UiFactory.createButton(UiIds.LABEL_CANCEL, buttonsCell, new ClickListener() { + tmpButton1.addStyleName("btn"); + Button tmpButton2 = UiFactory.createButton(UiIds.LABEL_CANCEL, buttonsCell, new ClickListener() { @Override public void buttonClick(ClickEvent event) { discardChanges(); } }); + tmpButton2.addStyleName("btn"); + this.setSizeUndefined(); } protected void discardChanges() { @@ -279,28 +304,38 @@ private class ReportItemPanel extends Panel { private ReportTemplate reportTemplate; private BeanItem beanItem; - private ReportParamPanel paramsPanel = null; + private Panel paramsPanel = null; private RolePermissionsPanel permsPanel = null; private Button toggleParamsButton; private Button togglePermsButton; + private CssLayout content; public ReportItemPanel(ReportTemplate reportTemplate) { + super(new CssLayout()); this.reportTemplate = reportTemplate; beanItem = new BeanItem(this.reportTemplate); - setStyleName(PANEL_STYLE); - HorizontalLayout headerRow = UiFactory.createHLayout(this, FAction.SET_FULL_WIDTH); - - UiFactory.createLabel(beanItem, REPORTNAME_PROPERTY, headerRow, - REPORT_NAME_STYLE, FAction.ALIGN_LEFT); - - UiFactory.createSpacer(headerRow); - - UiFactoryExt.createDateLabel(beanItem, CREATED_PROPERTY, CHANGED_DATE_STYLE, - headerRow, FAction.ALIGN_RIGTH); - - UiFactory.createLabel(beanItem, DESCRIPTION_PROPERTY, this, DESC_STYLE, FAction.SET_FULL_WIDTH); - - HorizontalLayout footerRow = UiFactory.createHLayout(this, FAction.SET_SPACING); + addStyleName(PANEL_STYLE); + + CssLayout header = new CssLayout(); + + //HorizontalLayout headerRow = UiFactory.createHLayout(this, FAction.SET_FULL_WIDTH); + + UiFactory.createLabel(beanItem, REPORTNAME_PROPERTY, header); + UiFactoryExt.createDateLabel(beanItem, CREATED_PROPERTY, "float-right", + header); + //UiFactory.createSpacer(headerRow); + + content = new CssLayout(); + + UiFactory.createAccordion(this, header, content); + + UiFactory.createLabel(beanItem, DESCRIPTION_PROPERTY, content, DESC_STYLE, FAction.SET_FULL_WIDTH); + + CssLayout footerRow = new CssLayout() ; + footerRow.addStyleName("button-row"); + content.addComponent(footerRow); + + //HorizontalLayout footerRow = UiFactory.createHLayout(this, FAction.SET_SPACING); toggleParamsButton = UiFactory.createButton(UiIds.LABEL_PARAMETERS, footerRow, BaseTheme.BUTTON_LINK, new ClickListener() { @Override @@ -308,6 +343,7 @@ public void buttonClick(ClickEvent event) { toggleParamsPanel(); } }); + toggleParamsButton.addStyleName("btn"); togglePermsButton = UiFactory.createButton(UiIds.LABEL_PERMISSIONS, footerRow, BaseTheme.BUTTON_LINK, new ClickListener() { @Override @@ -315,29 +351,32 @@ public void buttonClick(ClickEvent event) { togglePermsPanel(); } }); - UiFactory.createButton(UiIds.LABEL_EDIT, footerRow, BaseTheme.BUTTON_LINK, new ClickListener() { + togglePermsButton.addStyleName("btn"); + Button tmpButton1 = UiFactory.createButton(UiIds.LABEL_EDIT, footerRow, BaseTheme.BUTTON_LINK, new ClickListener() { @Override public void buttonClick(ClickEvent event) { addOrEditReport(ReportItemPanel.this, false); } }); - - UiFactory.createButton(UiIds.LABEL_DOWNLOAD, footerRow, BaseTheme.BUTTON_LINK, new ClickListener() { + tmpButton1.addStyleName("btn"); + Button tmpButton2 = UiFactory.createButton(UiIds.LABEL_DOWNLOAD, footerRow, BaseTheme.BUTTON_LINK, new ClickListener() { @Override public void buttonClick(ClickEvent event) { download(); } }); - - UiFactory.createButton(UiIds.LABEL_REMOVE, footerRow, BaseTheme.BUTTON_LINK, new ClickListener() { + tmpButton2.addStyleName("btn"); + Button tmpButton3 =UiFactory.createButton(UiIds.LABEL_REMOVE, footerRow, BaseTheme.BUTTON_LINK, new ClickListener() { @Override public void buttonClick(ClickEvent event) { removeMe(); } }); + tmpButton3.addStyleName("btn"); + this.setSizeUndefined(); } protected void removeMe() { @@ -347,10 +386,10 @@ protected void removeMe() { private void toggleParamsPanel() { if (paramsPanel == null) { paramsPanel = createParamsPanel(); - addComponent(paramsPanel); + content.addComponent(paramsPanel); toggleParamsButton.setCaption(VaadinUtil.getValue(UiIds.AR_MSG_HIDE_PARAMETERS)); } else { - removeComponent(paramsPanel); + content.removeComponent(paramsPanel); paramsPanel = null; toggleParamsButton.setCaption(VaadinUtil.getValue(UiIds.LABEL_PARAMETERS)); } @@ -359,7 +398,7 @@ private void toggleParamsPanel() { private void togglePermsPanel() { if (permsPanel == null) { permsPanel = new RolePermissionsPanel(reportTemplate); - addComponent(permsPanel); + content.addComponent(permsPanel); togglePermsButton.setCaption(VaadinUtil.getValue(UiIds.AR_MSG_HIDE_PERMISSIONS)); permsPanel.setCloseListener(new CloseListener() { @@ -370,18 +409,25 @@ public void close() { } }); } else { - removeComponent(permsPanel); + content.removeComponent(permsPanel); permsPanel = null; togglePermsButton.setCaption(VaadinUtil.getValue(UiIds.LABEL_PERMISSIONS)); } } // xxx: could be better - private ReportParamPanel createParamsPanel() { + private Panel createParamsPanel() { + CssLayout mainLayout = new CssLayout(); + CssLayout paramContent = new CssLayout(); + UiFactory.createAccordion(mainLayout, VaadinUtil.getValue(UiIds.LABEL_PARAMETERS), paramContent); + + final ReportParamPanel panel = new ReportParamPanel(reportTemplate, true); - panel.setCaption(VaadinUtil.getValue(UiIds.LABEL_PARAMETERS)); - HorizontalLayout hl = UiFactory.createHLayout(panel, FAction.SET_SPACING, FAction.SET_FULL_WIDTH); - UiFactory.createButton(UiIds.LABEL_GENERATE, hl, BaseTheme.BUTTON_LINK, new ClickListener() { + //panel.setCaption(VaadinUtil.getValue(UiIds.LABEL_PARAMETERS)); + CssLayout hl = new CssLayout(); + panel.addComponent(hl); + //HorizontalLayout hl = UiFactory.createHLayout(panel, FAction.SET_SPACING, FAction.SET_FULL_WIDTH); + Button tmpButton =UiFactory.createButton(UiIds.LABEL_GENERATE, hl, BaseTheme.BUTTON_LINK, new ClickListener() { @Override public void buttonClick(ClickEvent event) { @@ -401,8 +447,9 @@ public void buttonClick(ClickEvent event) { } }); - + tmpButton.addStyleName("tmp"); Button backgroundGenerate = UiFactory.createButton(UiIds.AR_MSG_GENERATE_IN_BACKGROUND, hl, BaseTheme.BUTTON_LINK); + backgroundGenerate.addStyleName("btn"); final CheckBox sendEmailCheckbox = UiFactory.createCheckBox(UiIds.AR_MSG_SEND_EMAIL, hl); backgroundGenerate.addListener(new ClickListener() { @@ -427,21 +474,24 @@ public void buttonClick(ClickEvent event) { backgroundGenerate.setEnabled(false); sendEmailCheckbox.setEnabled(false); } - UiFactory.createSpacer(hl, FAction.SET_EXPAND_RATIO_1_0); - UiFactory.createButton(UiIds.LABEL_CLOSE, hl, new ClickListener() { + //UiFactory.createSpacer(hl, FAction.SET_EXPAND_RATIO_1_0); + /*Button tmpButton2 = UiFactory.createButton(UiIds.LABEL_CLOSE, hl, new ClickListener() { @Override public void buttonClick(ClickEvent event) { toggleParamsPanel(); } }, FAction.ALIGN_RIGTH); - - return panel; + tmpButton2.addStyleName("btn");*/ + paramContent.addComponent(panel); + Panel p = new Panel(); + p.setContent(mainLayout); + return p; } private boolean backgorundGenerationAvail() { - return ARJmsFacade.isJmsAvailable() && Boolean.TRUE.equals(reportTemplate.getAllowBackgroundOrder()) - && reportTemplate.getActive(); + return ARJmsFacade.isJmsAvailable() && Boolean.TRUE.equals(reportTemplate.getAllowBackgroundOrder()) + && reportTemplate.getActive(); } private void download() { diff --git a/aperte-reports-ui/src/main/java/org/apertereports/components/ReportOrderBrowserComponent.java b/aperte-reports-ui/src/main/java/org/apertereports/components/ReportOrderBrowserComponent.java index 472d7e5..332a844 100644 --- a/aperte-reports-ui/src/main/java/org/apertereports/components/ReportOrderBrowserComponent.java +++ b/aperte-reports-ui/src/main/java/org/apertereports/components/ReportOrderBrowserComponent.java @@ -73,14 +73,14 @@ public void textChange(TextChangeEvent event) { UiFactory.createSpacer(header, "10px", null); UiFactory.createSpacer(header, FAction.SET_FULL_WIDTH, FAction.SET_EXPAND_RATIO_1_0); - UiFactory.createButton(UiIds.LABEL_REFRESH, header, new ClickListener() { + Button tmpButton1 = UiFactory.createButton(UiIds.LABEL_REFRESH, header, new ClickListener() { @Override public void buttonClick(ClickEvent event) { list.refresh(); } }); - + tmpButton1.addStyleName("btn"); list = new PaginatedPanelList(PAGE_SIZE) { @Override @@ -142,6 +142,7 @@ public void buttonClick(ClickEvent event) { showReport(); } }); + previewButton.addStyleName("btn"); Button parametersButton = UiFactory.createButton(UiIds.LABEL_PARAMETERS, grid, BaseTheme.BUTTON_LINK, new ClickListener() { @Override @@ -149,7 +150,7 @@ public void buttonClick(ClickEvent event) { toggleParams(); } }); - + parametersButton.addStyleName("btn"); if (order.getReportStatus() != Status.SUCCEEDED) { previewButton.setEnabled(false); } diff --git a/aperte-reports-ui/src/main/java/org/apertereports/components/ReportParamPanel.java b/aperte-reports-ui/src/main/java/org/apertereports/components/ReportParamPanel.java index 33384ce..55ebc1b 100644 --- a/aperte-reports-ui/src/main/java/org/apertereports/components/ReportParamPanel.java +++ b/aperte-reports-ui/src/main/java/org/apertereports/components/ReportParamPanel.java @@ -32,7 +32,7 @@ public ReportParamPanel(ReportTemplate reportTemplate, boolean showFormat, List< try { ReportMaster rm = new ReportMaster(reportTemplate.getContent(), reportTemplate.getId().toString(), new ReportTemplateProvider()); - this.reportParametersComponent = new ReportParametersComponent(rm, showFormat, params); + this.reportParametersComponent = new ReportParametersComponent(rm, showFormat, params); VerticalLayout vl = UiFactory.createVLayout(this); vl.addComponent(reportParametersComponent); buttons = UiFactory.createHLayout(vl); diff --git a/aperte-reports-ui/src/main/java/org/apertereports/components/ReportParametersComponent.java b/aperte-reports-ui/src/main/java/org/apertereports/components/ReportParametersComponent.java index ba0117a..877f38e 100644 --- a/aperte-reports-ui/src/main/java/org/apertereports/components/ReportParametersComponent.java +++ b/aperte-reports-ui/src/main/java/org/apertereports/components/ReportParametersComponent.java @@ -99,7 +99,6 @@ public ReportParametersComponent(ReportMaster rm, boolean showFormat, List(); } this.params = params; - init(); } diff --git a/aperte-reports-ui/src/main/java/org/apertereports/components/RolePermissionsPanel.java b/aperte-reports-ui/src/main/java/org/apertereports/components/RolePermissionsPanel.java index b534333..91ce690 100644 --- a/aperte-reports-ui/src/main/java/org/apertereports/components/RolePermissionsPanel.java +++ b/aperte-reports-ui/src/main/java/org/apertereports/components/RolePermissionsPanel.java @@ -28,12 +28,15 @@ public class RolePermissionsPanel extends Panel { private CloseListener closeListener = null; public RolePermissionsPanel(final ReportTemplate rt) { - + rt.isAccessibleForAllRoles(); - - setCaption(VaadinUtil.getValue(UiIds.LABEL_PERMISSIONS)); - VerticalLayout mainLayout = UiFactory.createVLayout(null); - ((AbstractLayout) mainLayout).setMargin(true, true, true, true); + //setCaption(VaadinUtil.getValue(UiIds.LABEL_PERMISSIONS)); + CssLayout mainLayout = new CssLayout(); + CssLayout content = new CssLayout(); + + UiFactory.createAccordion(mainLayout, VaadinUtil.getValue(UiIds.LABEL_PERMISSIONS), content); + + //((AbstractLayout) mainLayout).setMargin(true, true, true, true); setContent(mainLayout); boolean all = rt.isAccessibleForAllRoles(); @@ -58,33 +61,38 @@ public RolePermissionsPanel(final ReportTemplate rt) { } //initializing roles panel (layout) - final VerticalLayout rolesLayout = UiFactory.createVLayout(mainLayout, FAction.SET_SPACING); - + //final VerticalLayout rolesLayout = UiFactory.createVLayout(mainLayout, FAction.SET_SPACING); + final CssLayout rolesLayout = new CssLayout(); + rolesLayout.addStyleName("roles"); + content.addComponent(rolesLayout); HorizontalLayout allNoneButtons = UiFactory.createHLayout(rolesLayout, FAction.SET_SPACING); - UiFactory.createButton(UiIds.LABEL_ALL, allNoneButtons, BaseTheme.BUTTON_LINK, new ClickListener() { + Button tmpButton1 = UiFactory.createButton(UiIds.LABEL_ALL, allNoneButtons, BaseTheme.BUTTON_LINK, new ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { setWrappersSelected(true); } }); - UiFactory.createButton(UiIds.LABEL_NONE, allNoneButtons, BaseTheme.BUTTON_LINK, new ClickListener() { + tmpButton1.addStyleName("btn"); + Button tmpButton2 = UiFactory.createButton(UiIds.LABEL_NONE, allNoneButtons, BaseTheme.BUTTON_LINK, new ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { setWrappersSelected(false); } }); - + tmpButton2.addStyleName("btn"); for (UserRoleWrapper w : wrappers) { rolesLayout.addComponent(w.checkBox); } - UiFactory.createSpacer(mainLayout, null, "5px"); + //UiFactory.createSpacer(mainLayout, null, "5px"); - HorizontalLayout buttonsLayout = UiFactory.createHLayout(mainLayout, FAction.SET_SPACING, FAction.SET_FULL_WIDTH); - UiFactory.createSpacer(buttonsLayout, FAction.SET_EXPAND_RATIO_1_0); - UiFactory.createButton(UiIds.LABEL_OK, buttonsLayout, new Button.ClickListener() { + //HorizontalLayout buttonsLayout = UiFactory.createHLayout(mainLayout, FAction.SET_SPACING, FAction.SET_FULL_WIDTH); + CssLayout buttonsLayout = new CssLayout() ; + content.addComponent(buttonsLayout); + //UiFactory.createSpacer(buttonsLayout, FAction.SET_EXPAND_RATIO_1_0); + Button tmpButton3 = UiFactory.createButton(UiIds.LABEL_OK, buttonsLayout, new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { @@ -106,13 +114,15 @@ public void buttonClick(Button.ClickEvent event) { fireCloseListener(); } }, FAction.ALIGN_RIGTH); - UiFactory.createButton(UiIds.LABEL_CANCEL, buttonsLayout, new Button.ClickListener() { + tmpButton3.addStyleName("btn"); + Button tmpButton4 = UiFactory.createButton(UiIds.LABEL_CANCEL, buttonsLayout, new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { fireCloseListener(); } }, FAction.ALIGN_RIGTH); + tmpButton4.addStyleName("btn"); } /** diff --git a/aperte-reports-ui/src/main/java/org/apertereports/dashboard/EditDashboardComponentNew.java b/aperte-reports-ui/src/main/java/org/apertereports/dashboard/EditDashboardComponentNew.java index 494413c..583cec3 100644 --- a/aperte-reports-ui/src/main/java/org/apertereports/dashboard/EditDashboardComponentNew.java +++ b/aperte-reports-ui/src/main/java/org/apertereports/dashboard/EditDashboardComponentNew.java @@ -1,6 +1,10 @@ package org.apertereports.dashboard; +import java.util.HashMap; import java.util.LinkedList; +import java.util.List; +import java.util.Map; +import java.util.Set; import org.apertereports.common.xml.config.ReportConfig; import org.apertereports.common.xml.config.XmlReportConfigLoader; @@ -40,7 +44,7 @@ public class EditDashboardComponentNew extends AbstractDashboardComponent { private static final String DASHBOARD_EDIT_INPUT_PROMPT_REPORT_ID = "dashboard.edit.input-prompt.reportId"; private static final String DASHBOARD_EDIT_REQUIRED_ERROR_REPORT_ID = "dashboard.edit.required-error.reportId"; private static final String DASHBOARD_EDIT_CAPTION_REPORT_ID = "dashboard.edit.caption.reportId"; - private VerticalLayout paramsParentComponent; + private CssLayout paramsParentComponent; private ReportParamPanel paramsPanel = new ReportParamPanel(); private Form form; private Item datasource; @@ -50,23 +54,33 @@ public class EditDashboardComponentNew extends AbstractDashboardComponent { @Override protected void initComponentData() { - Panel mainPanel = UiFactory.createPanel(UiIds.LABEL_CONFIGURATION); + Panel superPanel = new Panel(new CssLayout()); - setCompositionRoot(mainPanel); + setCompositionRoot(superPanel); + + CssLayout mainPanel = new CssLayout(); + UiFactory.createAccordion(superPanel, VaadinUtil.getValue(UiIds.LABEL_CONFIGURATION), mainPanel); app = (AbstractReportingApplication) getApplication(); - paramsParentComponent = UiFactory.createVLayout(mainPanel, FAction.SET_SPACING, FAction.SET_FULL_WIDTH); + //paramsParentComponent = UiFactory.createVLayout(mainPanel, FAction.SET_SPACING, FAction.SET_FULL_WIDTH); + paramsParentComponent = new CssLayout(); + mainPanel.addComponent(paramsParentComponent); HorizontalLayout reportRow = UiFactory.createHLayout(paramsParentComponent, FAction.SET_FULL_WIDTH); form = new EditDashboardForm(); reportRow.addComponent(form); - paramsParentComponent.addComponent(paramsPanel); - paramsPanel.setCaption(VaadinUtil.getValue(UiIds.LABEL_PARAMETERS)); + + CssLayout contentB = new CssLayout(); + contentB.addComponent(paramsPanel); + UiFactory.createAccordion(paramsParentComponent, VaadinUtil.getValue(UiIds.LABEL_PARAMETERS), contentB); + - HorizontalLayout hl = UiFactory.createHLayout(paramsParentComponent, FAction.SET_SPACING); - UiFactory.createButton(UiIds.LABEL_OK, hl, new ClickListener() { + //HorizontalLayout hl = UiFactory.createHLayout(paramsParentComponent, FAction.SET_SPACING); + CssLayout hl = new CssLayout() ; + paramsParentComponent.addComponent(hl); + Button tmpButton1 =UiFactory.createButton(UiIds.LABEL_OK, hl, new ClickListener() { @Override public void buttonClick(ClickEvent event) { @@ -80,7 +94,8 @@ public void buttonClick(ClickEvent event) { } } }); - UiFactory.createButton(UiIds.LABEL_CANCEL, hl, new ClickListener() { + tmpButton1.addStyleName("btn"); + Button tmpButton2 =UiFactory.createButton(UiIds.LABEL_CANCEL, hl, new ClickListener() { @Override public void buttonClick(ClickEvent event) { @@ -89,6 +104,7 @@ public void buttonClick(ClickEvent event) { } } }); + tmpButton2.addStyleName("btn"); } /** @@ -102,10 +118,10 @@ public void setCloseListener(CloseListener closeListener) { private class EditDashboardForm extends Form { - private GridLayout layout; + private CssLayout layout; + private Map subLayouts; public EditDashboardForm() { - reportConfig = getCurrentConfig(); ReportTemplate selectedReport = null; @@ -118,11 +134,13 @@ public EditDashboardForm() { } reloadParams(selectedReport); - layout = new GridLayout(3, 3); - layout.setSpacing(true); - layout.setWidth("100%"); + layout = new CssLayout(); + //layout.setSpacing(true); + //layout.setWidth("100%"); setLayout(layout); - + + subLayouts = new HashMap(); + setFormFieldFactory(new EditDashboardFieldFactory()); datasource = new PropertysetItem(); @@ -135,16 +153,24 @@ public EditDashboardForm() { @Override protected void attachField(Object propertyId, Field field) { - + CssLayout tmpLayout; + if(!subLayouts.containsKey(propertyId)){ + tmpLayout = new CssLayout(); + tmpLayout.addStyleName("conf-row"); + layout.addComponent(tmpLayout); + subLayouts.put(propertyId, tmpLayout); + }else{ + tmpLayout = subLayouts.get(propertyId); + } + if (propertyId.equals(REPORT)) { - layout.addComponent(field, 0, 0, 1, 0); + tmpLayout.addComponent(field); } else if (propertyId.equals(CACHE_TIMEOUT)) { - layout.addComponent(field, 2, 0); - layout.setComponentAlignment(field, Alignment.MIDDLE_RIGHT); + tmpLayout.addComponent(field); } else if (propertyId.equals(EXPORT_BUTTONS)) { - layout.addComponent(field, 0, 1, 2, 1); + tmpLayout.addComponent(field); } else if (propertyId.equals(REFRESH_BUTTON)) { - layout.addComponent(field, 0, 2, 2, 2); + tmpLayout.addComponent(field); } } @@ -201,7 +227,7 @@ private void reloadParams(ReportTemplate template) { newParamsPanel = new ReportParamPanel(template, false, reportConfig.getParameters()); } - newParamsPanel.setCaption(VaadinUtil.getValue(UiIds.LABEL_PARAMETERS)); + //newParamsPanel.setCaption(VaadinUtil.getValue(UiIds.LABEL_PARAMETERS)); paramsParentComponent.replaceComponent(paramsPanel, newParamsPanel); paramsPanel = newParamsPanel; } diff --git a/aperte-reports-ui/src/main/java/org/apertereports/dashboard/html/HtmlReportBuilder.java b/aperte-reports-ui/src/main/java/org/apertereports/dashboard/html/HtmlReportBuilder.java index 4d21b99..ef34de5 100644 --- a/aperte-reports-ui/src/main/java/org/apertereports/dashboard/html/HtmlReportBuilder.java +++ b/aperte-reports-ui/src/main/java/org/apertereports/dashboard/html/HtmlReportBuilder.java @@ -159,17 +159,18 @@ private HorizontalLayout createReportButtons(final ReportConfig config, final Re buttons.setSpacing(true); if (parentConfig != null && componentId != null) { - UiFactory.createButton("dashboard.view.drill.up", buttons, new Button.ClickListener() { + Button tmpButton = UiFactory.createButton("dashboard.view.drill.up", buttons, new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { returnFromDrill(config, parentConfig, componentId); } }); + tmpButton.addStyleName("btn"); } List allowedFormats = config.getAllowedFormatsAsList(); for (final String format : allowedFormats) { - UiFactory.createButton(format, buttons, new Button.ClickListener() { + Button tmpButton = UiFactory.createButton(format, buttons, new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { @@ -180,15 +181,17 @@ public void buttonClick(Button.ClickEvent event) { } } }); + tmpButton.addStyleName("btn"); } if (Boolean.TRUE.equals(config.getAllowRefresh())) { - UiFactory.createButton(UiIds.LABEL_REFRESH, buttons, new Button.ClickListener() { + Button tmpButton = UiFactory.createButton(UiIds.LABEL_REFRESH, buttons, new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { refreshReport(config); } }); + tmpButton.addStyleName("btn"); } boolean first = true; diff --git a/aperte-reports-ui/src/main/java/org/apertereports/ui/UiFactory.java b/aperte-reports-ui/src/main/java/org/apertereports/ui/UiFactory.java index bf5e2bf..6612696 100644 --- a/aperte-reports-ui/src/main/java/org/apertereports/ui/UiFactory.java +++ b/aperte-reports-ui/src/main/java/org/apertereports/ui/UiFactory.java @@ -4,6 +4,8 @@ import com.vaadin.event.FieldEvents.TextChangeListener; import com.vaadin.ui.*; import com.vaadin.ui.Button.ClickListener; + +import org.apertereports.components.LiferayAccordion; import org.apertereports.util.VaadinUtil; /** @@ -156,7 +158,7 @@ public static Label createLabel(String captionId, ComponentContainer parent) { * @return Label */ public static Label createLabel(String captionId, ComponentContainer parent, String style) { - return createLabel(captionId, parent, null, EMPTY_ACTION_TABLE); + return createLabel(captionId, parent, style, EMPTY_ACTION_TABLE); } /** @@ -273,6 +275,7 @@ public static Button createButton(String captionId, ComponentContainer parent, S if (listener != null) { button.addListener(listener); } + button.addStyleName("btn"); return button; } @@ -540,4 +543,27 @@ static void performActions(Component c, FAction[] actions) { } } } + + public static LiferayAccordion createAccordion(ComponentContainer parent, CssLayout header){ + return createAccordion(parent, header, null); + } + + public static LiferayAccordion createAccordion(ComponentContainer parent, String caption){ + CssLayout header = new CssLayout(); + UiFactory.createLabel(caption, header); + return createAccordion(parent, header); + } + + public static LiferayAccordion createAccordion(ComponentContainer parent, String caption, Component content){ + CssLayout header = new CssLayout(); + UiFactory.createLabel(caption, header); + return createAccordion(parent, header, content); + } + + public static LiferayAccordion createAccordion(ComponentContainer parent, CssLayout header, Component content){ + + LiferayAccordion acc = new LiferayAccordion(header, content); + parent.addComponent(acc); + return acc; + } } diff --git a/aperte-reports-ui/src/main/java/org/apertereports/util/NotificationUtil.java b/aperte-reports-ui/src/main/java/org/apertereports/util/NotificationUtil.java index a0fb3ee..8e074f1 100644 --- a/aperte-reports-ui/src/main/java/org/apertereports/util/NotificationUtil.java +++ b/aperte-reports-ui/src/main/java/org/apertereports/util/NotificationUtil.java @@ -115,7 +115,7 @@ public void buttonClick(ClickEvent event) { } }); confirmButton.setImmediate(true); - + confirmButton.addStyleName("btn"); Button cancelButton = UiFactory.createButton(UiIds.LABEL_NO, null, new ClickListener() { @Override @@ -125,7 +125,7 @@ public void buttonClick(ClickEvent event) { } }); cancelButton.setImmediate(true); - + cancelButton.addStyleName("btn"); VerticalLayout mainLayout = UiFactory.createVLayout(null, FAction.SET_SPACING); mainLayout.addComponent(new Label(message, Label.CONTENT_XHTML)); mainLayout.addComponent(new SimpleHorizontalLayout(confirmButton, cancelButton)); diff --git a/aperte-reports-ui/src/main/webapp/WEB-INF/liferay-portlet.xml b/aperte-reports-ui/src/main/webapp/WEB-INF/liferay-portlet.xml index 9c27be0..1c8b87f 100644 --- a/aperte-reports-ui/src/main/webapp/WEB-INF/liferay-portlet.xml +++ b/aperte-reports-ui/src/main/webapp/WEB-INF/liferay-portlet.xml @@ -12,6 +12,7 @@ false true false + /css/main.css Report Manager portlet @@ -21,18 +22,21 @@ false portal 1 + /css/main.css Report Order Browser portlet false true false + /css/main.css Cyclic Reports portlet false false false + /css/main.css diff --git a/aperte-reports-ui/src/main/webapp/css/main.css b/aperte-reports-ui/src/main/webapp/css/main.css new file mode 100644 index 0000000..805ea31 --- /dev/null +++ b/aperte-reports-ui/src/main/webapp/css/main.css @@ -0,0 +1,182 @@ +.gwt-FileUpload{ + display:none; +} + +.v-csslayout-container .v-button{ + margin-right:5px; +} +.aui .v-checkbox > *, .aui .v-checkbox input{ + /*float:left;*/ + margin-right:5px; + display:inline-block; +} + +.accordion-toggle .v-label, .accordion-toggle .v-button{ + display:inline-block; +} + +.aui .v-app .accordion-group .accordion-heading.toggler-header-expanded .accordion-toggle::before, .aui .v-app .lfr-add-panel .lfr-page-template .lfr-page-template-title.toggler-header-expanded::before{ + content:""; +} +.aui .v-app .accordion-toggle{ + cursor:default; +} + +.accordion-toggle .v-button, .accordion-toggle .v-label.float-right{ + float:right; +} + +.invoker .accordion-toggle .v-label{ + float:left; + margin-top:7px; +} +.accordion-toggle .v-label{ + float:none; + margin-top:0; +} +.aui .accordion-inner fieldset{ + border:none; +} +.aui .v-app legend{ + border:none; +} +.conf-row .v-caption, .conf-row .v-filterselect{ + display:inline-block; +} + +.v-captiontext, .v-required-field-indicator{ + display: inline; +} + +.aui .v-filterselect .v-filterselect-input{ + margin-bottom:0; +} + +.v-filterselect-button{ + display:none; +} + +.v-caption{ + width:150px; +} + +.aui .v-filterselect, .aui .v-caption{ + margin-bottom:5px; +} + +.v-tooltip{ + display:none; +} + +/* roles */ +.roles .v-checkbox{ + display:table-row; +} +.roles .v-csslayout-margin{ + display:table; +} +.aui .roles .v-checkbox input, .aui .roles .v-checkbox label{ + display:table-cell; +} +.aui .v-checkbox input{ + margin-bottom:7px; +} + +.button-row{ + margin-bottom:10px; +} + + +/* Select */ + + +.v-app select, +.v-window select { + padding: 1px; +} + +select { + background-color: #fff; +} + +.v-ie6 select { + font-size: 1em; +} + +.v-filterselect-button { + width: 24px; + height: 24px; + background: transparent url(../common/buttons_sprites.png) no-repeat 0 0; +} + +.v-filterselect-button:hover { + background-position: 0px -24px; +} + +.v-filterselect-suggestpopup { + border: 1px solid #98C0F4; + background-color: #fff; +} + +.v-filterselect-suggestmenu { + min-height: 2px; + +} + +.v-filterselect-prevpage, +.v-filterselect-prevpage-off, +.v-filterselect-nextpage, +.v-filterselect-nextpage-off { + background-color: #fff; +} + +.v-filterselect-prevpage span, +.v-filterselect-prevpage-off span, +.v-filterselect-nextpage span, +.v-filterselect-nextpage-off span { + display: block; + height: 8px; + width: 16px; + margin-left: auto; + margin-right: auto; + text-indent: -99999px; +} + +.v-filterselect-prevpage span, .v-filterselect-nextpage span { + background: transparent no-repeat 0 -4px; + background-image: url(/html/themes/classic/images/aui/icon_sprite.png); +} + +.v-filterselect-nextpage span { + background-position: -65px -4px; +} +.v-filterselect-suggestmenu .gwt-MenuItem span { + display: block; + width: 100%; + height: 18px; + border: 1px solid #fff; + border-style: solid none; + +} + +.v-filterselect-suggestmenu .gwt-MenuItem-selected span { + color: #000; + background: #dfe8f6; + border-color: #a3bae9; +} + +.v-filterselect-suggestmenu .gwt-MenuItem .v-icon { + float: left; +} + +.v-select-twincol-buttons .v-button-wrap { + padding-left: 11px; + padding-right: 11px; +} + +/* Notification */ + + +.v-Notification{ + background:#fff; +} diff --git a/aperte-reports-ui/src/main/webapp/custom_jsps/html/VAADIN/themes/mymanagertheme/styles.css b/aperte-reports-ui/src/main/webapp/custom_jsps/html/VAADIN/themes/mymanagertheme/styles.css deleted file mode 100644 index 70f033d..0000000 --- a/aperte-reports-ui/src/main/webapp/custom_jsps/html/VAADIN/themes/mymanagertheme/styles.css +++ /dev/null @@ -1,62 +0,0 @@ -.v-scrollable { - overflow: hidden; -} - - -.v-panel-caption .v-icon { - padding-right: 2px; -} - -.v-panel-content { - border: 1px solid #FAFAFA; - -webkit-border-radius: 0 0 4px 4px; - -moz-border-radius: 0 0 4px 4px; - border-radius: 4px 4px 4px 4px; - padding-right: 12px; -} - -.v-checkbox, -.v-checkbox label, -.v-checkbox input, -.v-checkbox .v-icon { - vertical-align: middle; - white-space: nowrap; - display: inline; - margin-left: 5px; - margin-bottom: -5px; -} - -.v-button-wrap, .v-button-caption { - vertical-align: middle; - white-space: nowrap; - font: inherit; - color: inherit; - line-height: normal; -} - - -.v-button-link .v-button-caption, -.v-nativebutton-link .v-nativebutton-caption { - text-decoration:inherit; - color: inherit; - text-align: left; - display: block; - font-size: 11px; - font-weight: bold; - border: 1px solid #c8c9ca; - border-right-color: #9e9e9e; - border-bottom-color: #9e9e9e; - background: #d4d4d4 url(/html/themes/classic/images/portlet/header_bg.png) repeat-x 0 0; - -webkit-background-origin: padding; - -moz-background-origin: padding; - padding: 4px 4px 0px 4px; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; - line-height: 16px; - min-height: 16px; - text-shadow: 1px 1px #fff; - color: #34404f; - text-overflow: ellipsis; - height: 20px; - } \ No newline at end of file diff --git a/aperte-reports-ui/src/main/webapp/custom_jsps/html/VAADIN/themes/mytheme/addons.scss b/aperte-reports-ui/src/main/webapp/custom_jsps/html/VAADIN/themes/mytheme/addons.scss deleted file mode 100644 index 754ba4b..0000000 --- a/aperte-reports-ui/src/main/webapp/custom_jsps/html/VAADIN/themes/mytheme/addons.scss +++ /dev/null @@ -1,7 +0,0 @@ -/* This file is automatically managed and will be overwritten from time to time. */ -/* Do not manually edit this file. */ - -/* Import and include this mixin into your project theme to include the addon themes */ -@mixin addons { -} - diff --git a/aperte-reports-ui/src/main/webapp/custom_jsps/html/VAADIN/themes/mytheme/mytheme.scss b/aperte-reports-ui/src/main/webapp/custom_jsps/html/VAADIN/themes/mytheme/mytheme.scss deleted file mode 100644 index fd720cf..0000000 --- a/aperte-reports-ui/src/main/webapp/custom_jsps/html/VAADIN/themes/mytheme/mytheme.scss +++ /dev/null @@ -1,12 +0,0 @@ -/* Import the liferay theme. */ -/* This only allows us to use the mixins defined in it and does not add any styles by itself. */ -@import "../liferay/liferay.scss"; - -/* This contains all of your theme. */ -/* If somebody wants to extend the theme she will include this mixin. */ -@mixin mytheme { - /* Include all the styles from the liferay theme */ - @include liferay; - - /* Insert your theme rules here */ -} diff --git a/aperte-reports-ui/src/main/webapp/custom_jsps/html/VAADIN/themes/mytheme/styles.css b/aperte-reports-ui/src/main/webapp/custom_jsps/html/VAADIN/themes/mytheme/styles.css index d060073..e69de29 100644 --- a/aperte-reports-ui/src/main/webapp/custom_jsps/html/VAADIN/themes/mytheme/styles.css +++ b/aperte-reports-ui/src/main/webapp/custom_jsps/html/VAADIN/themes/mytheme/styles.css @@ -1,78 +0,0 @@ -.v-scrollable { - overflow: hidden; -} - -.v-panel-caption, -.v-panel-nocaption { - text-shadow: 1px 1px #fff; - font-size: 12px; - color: #222; - margin-left: 0px; - background-color: #FAFAFA; - background: #FAFAFA; - padding: 5px 5px 10px 2px; - height: 6px; -} - -.v-panel-caption .v-icon { - padding-right: 2px; -} - -.v-panel-content { - border: 1px solid #FAFAFA; - -webkit-border-radius: 0 0 4px 4px; - -moz-border-radius: 0 0 4px 4px; - border-radius: 4px 4px 4px 4px; - padding-right: 12px; -} - -.v-checkbox, -.v-checkbox label, -.v-checkbox input, -.v-checkbox .v-icon { - vertical-align: middle; - white-space: nowrap; - display: inline; - margin-left: 5px; - margin-bottom: -5px; -} - -.v-button-wrap, .v-button-caption { - vertical-align: middle; - white-space: nowrap; - font: inherit; - color: inherit; - line-height: normal; -} - - -.v-button-link .v-button-caption, -.v-nativebutton-link .v-nativebutton-caption { - text-decoration:inherit; - color: inherit; - text-align: left; - display: block; - font-size: 11px; - font-weight: bold; - border: 1px solid #c8c9ca; - border-right-color: #9e9e9e; - border-bottom-color: #9e9e9e; - background: #d4d4d4 url(/html/themes/classic/images/portlet/header_bg.png) repeat-x 0 0; - -webkit-background-origin: padding; - -moz-background-origin: padding; - padding: 4px 4px 0px 4px; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; - line-height: 16px; - min-height: 16px; - text-shadow: 1px 1px #fff; - color: #34404f; - text-overflow: ellipsis; - height: 20px; - } - -label { - display: block; - margin-bottom: -5px; -} \ No newline at end of file diff --git a/aperte-reports-ui/src/main/webapp/custom_jsps/html/VAADIN/themes/mytheme/styles.scss b/aperte-reports-ui/src/main/webapp/custom_jsps/html/VAADIN/themes/mytheme/styles.scss deleted file mode 100644 index 6e6005a..0000000 --- a/aperte-reports-ui/src/main/webapp/custom_jsps/html/VAADIN/themes/mytheme/styles.scss +++ /dev/null @@ -1,11 +0,0 @@ -@import "addons.scss"; -@import "mytheme.scss"; - -/* This file prefixes all rules with the theme name to avoid causing conflicts with other themes. */ -/* The actual styles should be defined in mytheme.scss */ -.mytheme { - @include addons; - - // Include mytheme theme styles in your theme - @include mytheme; -} From 8c0456854ceaf3d4c4248d3bd44d181d91d9f219 Mon Sep 17 00:00:00 2001 From: Fynn Hauptmeier Date: Thu, 3 Sep 2015 13:06:00 +0200 Subject: [PATCH 09/64] Styled Notifications --- .../apertereports/util/NotificationUtil.java | 42 ++++++++++++++----- .../src/main/webapp/css/main.css | 8 +++- 2 files changed, 39 insertions(+), 11 deletions(-) diff --git a/aperte-reports-ui/src/main/java/org/apertereports/util/NotificationUtil.java b/aperte-reports-ui/src/main/java/org/apertereports/util/NotificationUtil.java index 8e074f1..5366bbd 100644 --- a/aperte-reports-ui/src/main/java/org/apertereports/util/NotificationUtil.java +++ b/aperte-reports-ui/src/main/java/org/apertereports/util/NotificationUtil.java @@ -24,33 +24,46 @@ private NotificationUtil() { } public static void notImplementedYet(Window window) { - window.showNotification(VaadinUtil.getValue("exception.not.implemented.title"), + Notification n = new Notification( + VaadinUtil.getValue("exception.not.implemented.title"), VaadinUtil.getValue("exception.not.implemented.description"), TYPE_WARNING_MESSAGE); + n.setStyleName("alert alert-warning"); + window.showNotification(n); } public static void showValidationErrors(Window window, String message) { - window.showNotification(VaadinUtil.getValue("notification.validation.errors.title"), "
" + message, + Notification n = new Notification(VaadinUtil.getValue("notification.validation.errors.title"), "
" + message, TYPE_ERROR_MESSAGE); + n.setStyleName("alert alert-danger"); + window.showNotification(n); } public static void showExceptionNotification(Window window, String prefix) { - window.showNotification(VaadinUtil.getValue(prefix + ".title"), + Notification n = new Notification(VaadinUtil.getValue(prefix + ".title"), "
" + VaadinUtil.getValue(prefix + ".description"), TYPE_ERROR_MESSAGE); + n.setStyleName("alert alert-danger"); + window.showNotification(n); } public static void showExceptionNotification(Window window, String prefix, Exception e) { - window.showNotification(VaadinUtil.getValue(prefix + ".title"), + Notification n = new Notification(VaadinUtil.getValue(prefix + ".title"), "
" + VaadinUtil.getValue(prefix + ".description") + ": " + e.getLocalizedMessage(), TYPE_ERROR_MESSAGE); + n.setStyleName("alert alert-danger"); + window.showNotification(n); } public static void showExceptionNotification(Window window, String prefix, Object... details) { - window.showNotification(VaadinUtil.getValue(prefix + ".title"), + Notification n = new Notification(VaadinUtil.getValue(prefix + ".title"), "
" + VaadinUtil.getValue(prefix + ".description", details), TYPE_ERROR_MESSAGE); + n.setStyleName("alert alert-danger"); + window.showNotification(n); } public static void showExceptionNotification(Window window, String title, String message) { - window.showNotification(title, "
" + message, TYPE_ERROR_MESSAGE); + Notification n = new Notification(title, "
" + message, TYPE_ERROR_MESSAGE); + n.setStyleName("alert alert-danger"); + window.showNotification(n); } public static void showExceptionNotification(Window window, ARRuntimeException exception) { @@ -61,21 +74,29 @@ public static void showExceptionNotification(Window window, ARRuntimeException e if (exception.getCause() != null && exception.getCause().getLocalizedMessage() != null) { description += "
" + exception.getCause().getLocalizedMessage(); } - window.showNotification(title, description, TYPE_ERROR_MESSAGE); + Notification n = new Notification(title, description, TYPE_ERROR_MESSAGE); + n.setStyleName("alert alert-danger"); + window.showNotification(n); } public static void showErrorNotification(Window window, String messageId) { - window.showNotification(VaadinUtil.getValue(messageId), TYPE_ERROR_MESSAGE); + Notification n = new Notification(VaadinUtil.getValue(messageId), TYPE_ERROR_MESSAGE); + n.setStyleName("alert alert-danger"); + window.showNotification(n); } public static void validationErrors(Window window) { - window.showNotification(VaadinUtil.getValue("exception.validation.errors.title"), + Notification n = new Notification(VaadinUtil.getValue("exception.validation.errors.title"), "
" + VaadinUtil.getValue("exception.validation.errors.description"), TYPE_WARNING_MESSAGE); + n.setStyleName("alert alert-warning"); + window.showNotification(n); } public static void validationErrors(Window window, String message) { - window.showNotification(VaadinUtil.getValue("exception.validation.errors.title"), + Notification n = new Notification(VaadinUtil.getValue("exception.validation.errors.title"), "
" + message + "", TYPE_ERROR_MESSAGE); + n.setStyleName("alert alert-danger"); + window.showNotification(n); } public static void showSavedNotification(Window window) { @@ -91,6 +112,7 @@ public static void showConfirmNotification(Window window, String prefix) { + VaadinUtil.getValue(prefix + ".desc") + "", TYPE_HUMANIZED_MESSAGE); notification.setPosition(POSITION_CENTERED); notification.setDelayMsec(2000); + notification.setStyleName("alert alert-danger"); window.showNotification(notification); } diff --git a/aperte-reports-ui/src/main/webapp/css/main.css b/aperte-reports-ui/src/main/webapp/css/main.css index 805ea31..3c1ca1c 100644 --- a/aperte-reports-ui/src/main/webapp/css/main.css +++ b/aperte-reports-ui/src/main/webapp/css/main.css @@ -178,5 +178,11 @@ select { .v-Notification{ - background:#fff; + background-color: #fee5e2; + border-color: #fcaca5; + color: #b50303; + border-radius: 2px; + margin-bottom: 20px; + padding: 8px 35px 8px 14px; + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); } From 023f1f6678d8a3b7ba2e7a50444b0a5e2ef7e0d3 Mon Sep 17 00:00:00 2001 From: Fynn Hauptmeier Date: Thu, 3 Sep 2015 15:30:58 +0200 Subject: [PATCH 10/64] Update styles --- .../org/apertereports/components/LiferayAccordion.java | 3 ++- .../org/apertereports/components/ReportParamPanel.java | 7 +++++-- aperte-reports-ui/src/main/webapp/css/main.css | 3 ++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/aperte-reports-ui/src/main/java/org/apertereports/components/LiferayAccordion.java b/aperte-reports-ui/src/main/java/org/apertereports/components/LiferayAccordion.java index e38f9d3..b0082ea 100644 --- a/aperte-reports-ui/src/main/java/org/apertereports/components/LiferayAccordion.java +++ b/aperte-reports-ui/src/main/java/org/apertereports/components/LiferayAccordion.java @@ -32,10 +32,11 @@ public void addContent(Component content) { contentWrapperB.addStyleName("toggler-content toggler-content-expanded"); contentWrapper.addComponent(contentWrapperB); - content.addStyleName("accordion-inner"); + content.addStyleName("accordion-inner"); contentWrapperB.addComponent(content); this.addComponent(contentWrapper); + content.setSizeUndefined(); } } diff --git a/aperte-reports-ui/src/main/java/org/apertereports/components/ReportParamPanel.java b/aperte-reports-ui/src/main/java/org/apertereports/components/ReportParamPanel.java index 55ebc1b..f75ca1d 100644 --- a/aperte-reports-ui/src/main/java/org/apertereports/components/ReportParamPanel.java +++ b/aperte-reports-ui/src/main/java/org/apertereports/components/ReportParamPanel.java @@ -29,11 +29,14 @@ public ReportParamPanel(ReportTemplate reportTemplate, boolean showFormat) { } public ReportParamPanel(ReportTemplate reportTemplate, boolean showFormat, List params) { - try { + super(new CssLayout()); + try { ReportMaster rm = new ReportMaster(reportTemplate.getContent(), reportTemplate.getId().toString(), new ReportTemplateProvider()); this.reportParametersComponent = new ReportParametersComponent(rm, showFormat, params); - VerticalLayout vl = UiFactory.createVLayout(this); + //VerticalLayout vl = UiFactory.createVLayout(this); + CssLayout vl = new CssLayout(); + this.addComponent(vl); vl.addComponent(reportParametersComponent); buttons = UiFactory.createHLayout(vl); } catch (ARException e) { diff --git a/aperte-reports-ui/src/main/webapp/css/main.css b/aperte-reports-ui/src/main/webapp/css/main.css index 3c1ca1c..3542ad0 100644 --- a/aperte-reports-ui/src/main/webapp/css/main.css +++ b/aperte-reports-ui/src/main/webapp/css/main.css @@ -39,6 +39,7 @@ } .aui .v-app legend{ border:none; + margin:none; } .conf-row .v-caption, .conf-row .v-filterselect{ display:inline-block; @@ -177,7 +178,7 @@ select { /* Notification */ -.v-Notification{ +.v-Notification, .v-form-errormessage{ background-color: #fee5e2; border-color: #fcaca5; color: #b50303; From 832e2c3b5c0c160403ff768aca96a1c1495c4388 Mon Sep 17 00:00:00 2001 From: Fynn Hauptmeier Date: Thu, 3 Sep 2015 15:47:04 +0200 Subject: [PATCH 11/64] Added border to errormessage and Notification --- aperte-reports-ui/src/main/webapp/css/main.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aperte-reports-ui/src/main/webapp/css/main.css b/aperte-reports-ui/src/main/webapp/css/main.css index 3542ad0..ad02fc2 100644 --- a/aperte-reports-ui/src/main/webapp/css/main.css +++ b/aperte-reports-ui/src/main/webapp/css/main.css @@ -180,7 +180,7 @@ select { .v-Notification, .v-form-errormessage{ background-color: #fee5e2; - border-color: #fcaca5; + border: 1px solid #fcaca5; color: #b50303; border-radius: 2px; margin-bottom: 20px; From 8963cc4d80ca8b06c16e037b460219421efcdd30 Mon Sep 17 00:00:00 2001 From: Fynn Hauptmeier Date: Thu, 3 Sep 2015 16:02:28 +0200 Subject: [PATCH 12/64] Adding german language-properties --- .../main/resources/ui-messages_de.properties | 381 ++++++++++++++++++ 1 file changed, 381 insertions(+) create mode 100644 aperte-reports-ui/src/main/resources/ui-messages_de.properties diff --git a/aperte-reports-ui/src/main/resources/ui-messages_de.properties b/aperte-reports-ui/src/main/resources/ui-messages_de.properties new file mode 100644 index 0000000..ecada68 --- /dev/null +++ b/aperte-reports-ui/src/main/resources/ui-messages_de.properties @@ -0,0 +1,381 @@ + +label.active=Aktiv +label.add=Hinzufügen +label.adding=Füge hinzu +label.add.3dots=Hinzufügen... +label.all=Alle +label.cancel=Abbrechen +label.close=Schließen +label.configuration=Konfiguration +label.delete=Löschen +label.description=Beschreibung +label.details=Details +label.disable=Deaktivieren +label.download=Herunterladen +label.edit=Bearbeiten +label.edition=Bearbeiten +label.email=E-Mail +label.enable=Aktivieren +label.enabled=Aktiviert +label.filter=Filter +label.format=Format +label.generate=Generieren +label.help=Hilfe +label.locale=Sprache +label.index=Index +label.new=Neu +label.next=Weiter +label.no=Nein +label.none=kein +label.ok=OK +label.parameters=Parameter +label.permissions=Berechtigungen +label.preview=Vorschau +label.previous=Zurück +label.refresh=Aktualisieren +label.remove=Entfernen +label.run=Starte +label.save=Speichern +label.type=Typ +label.update=Aktualisieren +label.upload=Upload +label.yes=Ja + +ar.msg.generate.in.background=Im Hintergrund generieren +ar.msg.hide.parameters=Parameter ausblenden +ar.msg.hide.permissions=Berechtigungen ausblenden +ar.msg.select.all=Alle auswählen +ar.msg.send.email=E-Mail senden + +ar.browser. + +ar.cyclic. + +ar.dashboard.show.export.buttons=Exportieren Buttons anzeigen +ar.dashboard.show.refresh.button=Aktualisieren Button anzeigen + +ar.invoker. + +ar.manager.err.enter.report.name=Bitte geben Sie den Namen des Report ein +ar.manager.err.name.alredy.exists=Ein Report mit diesem Namen existiert bereits +ar.manager.report.description=Beschreibung des Reports + +liferay.get.login.exception=User Login nicht gefunden + +notification.validation.errors.title=Validierungsfehler +notification.validation.duplicate.report.name=Attribut 'name' in der jrxml-Datei sollte eindeutig sein +notification.validation.no.report.name=Attribut 'name' wurde in der jrxml-Datei nicht gefunden + +common.timedate.format=dd.MM.yyyy HH:mm + +manager.table.column.active=Aktiv +manager.table.column.reportname=Report Name +manager.table.column.description=Beschreibung +manager.table.column.allow_online_display=Online Anzeigen erlauben +manager.table.column.allow_background_order=Generieren im Hintergrund erlauben + +error.not_logged_in=Sie müssen sich einloggen, um diese Aktion auszuführen + +manager.form.title=Report Attribute +manager.form.upload.prompt=Report-Datei hochladen + +manager.form.filename.label=Dateiname +manager.form.reportname.label=Report Name + +manager.form.allowOnlineDisplay.label=Online Anzeigen erlauben +manager.form.allowBackgroundOrder.label=Generieren im Hintergrund erlauben + +manager.filter.reportname=Filter Name +manager.filter.description=Filter Beschreibung + +invoker.window.title=Report Attribute +invoker.form.header=Keine Daten vorhanden +invoker.form.header.readonly=Die Report Eigenschaften in dieser Ansicht können nur gelesen werden +invoker.form.header.nofields=Der Report enthält keine Parameter zum Konfigurieren +invoker.form.generate_stream=Gerneriere Daten +invoker.form.generate_in_background=Generiere in Hintergrund +invoker.form.send_email=E-Mail senden +invoker.form.send_email.with_email=E-Mail zu %s senden +invoker.form.send_email.with_error.no_context=Sende eine E-Mail (portlet context benötigt) +invoker.form.send_email.with_error.no_email=Sende eine E-Mail (E-Mail-Adresse für den Benutzer nicht gefunden) +invoker.form.send_email.with_error.no_user=Sende eine E-Mail (Benutzer nicht gefunden) + +invoker.form.no_items_for_exception=Keine Daten für +invoker.form.special_validation_code.script_exception +invoker.form.special_validation_code.no_such_method_exception +invoker.form.special_control_code.script_exception +invoker.form.special_control_code.no_such_method_exception +invoker.form.special_data_query_code.script_exception +invoker.form.special_data_query_code.no_such_method_exception + +#generic_errors +#form.errors.required, caption +form.errors.required=Das Feld '%s' ist erforderlich +#form.errors.regexp, caption, regexp +form.errors.regexp=Das Feld '%s' muss dem Ausdruck '%s' entsprechen +#form.errors.unparsable_date, caption, value +form.errors.unparsable_date=Das Feld '%s' darf nicht den Wert '%s' haben + +#custom_errors +form.errors.must_be_upper_case=Das Feld '%s' muss mit einem Großbuchstaben beginnen +form.errors.must_be_number=Das Feld '%s' muss eine Zahl enthalten + +exception.report.build.title=Fehler beim Erzeugen des Reports +exception.report.build.description=Es ist ein Fehler beim Erzeugen des Reports aufgetreten.
Details:
%s + +exception.conversion.title=Fehler beim Konvertieren des Reports +exception.conversion.description=Es ist ein Fehler beim Konvertieren des Reports aufgetreten. + +exception.compilation_failed.title=Fehler beim Kompilieren +exception.compilation_failed.description=Der hochgeladene Report konnte nicht kompiliert werden. + +exception.subreport_not_found.title=Keine Unterreports gefunden +exception.subreport_not_found.description=Aperte Reports konnte keine Reports mit diesen Namen finden: + +exception.upload_failed.title=Fehler beim Hochladen +exception.upload_failed.description=Fehler beim Hochladen der jrxml-Datei + +exception.unsupported.operation.title=Nicht unterstützte Operation +exception.unsupported.operation.description=Diese Operation wird nicht unterstützt. Bitte kontaktieren Sie Ihren Administrator. + +exception.not.implemented.title=Nicht implementiert +exception.not.implemented.description=Diese Funktion ist noch nicht vorhanden. + +exception.validation.errors.title=Validierungsfehler +exception.validation.errors.description=Es ist ein Fehler beim Validieren aufgetreten. + +exception.validation.errors.report.template=Es sind Fehler in der Report Vorlage aufgetreten. + +exception.report.not.found.title=Report nicht gefunden +exception.report.not.found.description=Die Report ID %s wurde nicht in der Datenbank gefunden. +exception.drilldown.not.found.title=Drilldown Konfigurationsfehler +exception.drilldown.not.found.description=Der Report Name wurde nicht im Drilldown Link gefunden. +exception.drilldown.report.not.found.title=Drilldown Konfigurationsfehler +exception.drilldown.report.not.found.description=Der Drilldown Report wurde nicht in der Datenbank gefunden. + +loading.data=Lädt... bitte warten. + +notification.data.saved.title=Gespeichert +notification.data.saved.desc=Die Report Vorlage wurde erfolgreich gespeichert. +notification.data.cancelled.title=Abgebrochen +notification.data.cancelled.desc=Die Änderungen wurden nicht gespeichert. + +cyclic.report.table.idx=Index +cyclic.report.table.report=Report +cyclic.report.table.when=Wann +cyclic.report.table.status=Status +cyclic.report.table.desc=Beschreibung +cyclic.report.table.formats=Formate +cyclic.report.table.delete=Entfernen +cyclic.report.table.delete.areyousure=Sind Sie sicher, dass Sie einen periodischen Report entfernen wollen? +cyclic.report.table.delete.confirm=Bestätigen +cyclic.report.table.delete.notconfirm=Löschen +cyclic.report.add=Periodischen Report hinzufügen +cyclic.report.email.format=Formatiere die E-Mail +cyclic.report.name=Periodische Reports +cyclic.report.when.validationError=Der Wert ist nicht mit dem Modell 'Crontab' konsistent. + +cyclic.report.cron.validation.error=Es wurden Fehler im Wert des Cron Reports gefunden: + + +report.table.deleteReport.title=Report entfernen +report.table.deleteReport.content=Sind Sie sicher, dass Sie den Report '%s' entfernen wollen? +report.table.delete=Report entfernen +report.table.add=Report hinzufügen + +report.table.valuesChanged.title=Werte geändert +report.table.valuesChanged.content=Die Änderungen wurden nicht gespeichert. Änderungen verwerfen? + +dashboard.window.title=Tabellen +dashboard.help.content=Hilfe + +dashboard.view.drill.up=Zurück + +dashboard.edit.cyclicReports=Periodische Reports +dashboard.edit.source=Quelle bearbeiten +dashboard.edit.source.disable=Quelle ausblenden +dashboard.edit.add.report=Report hinzufügen +dashboard.edit.table.idx=Index +dashboard.edit.table.report=Report auswählen +dashboard.edit.table.details=Details +dashboard.edit.table.type=Typ +dashboard.edit.table.delete=Entfernen +dashboard.edit.table.type.cyclic=Periodisch +dashboard.edit.table.type.online=Online +dashboard.edit.report.details=Dashboard Report Details +dashboard.edit.report.parameters=Parameter des Reports +dashboard.edit.report.formats=Verfügbare Formate +dashboard.edit.report.cacheTimeout=Ablaufdauer des Zwischenspeichers +dashboard.edit.report.cacheTimeout.instructions=0 heißt keine Zwischenspeicherung, -1 Zwischenspeicherung, die nie abläuft +dashboard.edit.report.cacheTimeout.error=Bitt geben Sie eine Zahl ein +dashboard.edit.report.allowRefresh=Erlaube manuelles Aktualiseren +dashboard.report.creation.error=Es ist ein Fehler beim Erzeugen des Reports aufgetreten. + +exception.gui.error.title=Fehler im User Interface +exception.gui.error.description=Es ist ein Fehler im User Interface aufgetreten. Bitte wenden Sie sich an Ihren Administrator. + +exception.store.preferences.title=Fehler beim Speichern der Einstellungen +exception.store.preferences.description=Es ist ein Fehler beim Speichern der Einstellungen aufgetreten + +report_order.window.title=Benutzer Reports + +report_order.filter.report=Report Name +report_order.filter.created_after=Erstellt vor +report_order.filter.created_before=Erstellt nach + +report_order.table.refresh=Aktualisieren +report_order.table.parameters=Parameter +report_order.table.rerun=Erneut starten? +report_order.table.status.new=Neu +report_order.table.status.processing=Verarbeite +report_order.table.status.failed=Gescheitert +report_order.table.status.succeeded=Erfolgreich + +report_order.table.parameters.popup.title=Report Parameter +report_order.table.rerun.popup.title=Erneut starten? +report_order.table.rerun.popup.question=Sind Sie sicher, dass Sie eine Report Generation Order mit den selben Paramatern einfügen wollen? +report_order.table.status.failed.popup.title=Fehler beim Generieren + +report_order.table.column.report_name=Report Name +report_order.table.column.create_date=Erstelldatum +report_order.table.column.result=Status +report_order.table.column.details=Details +report_order.table.column.action=Aktionen + +global.clearfilters.button=Leere Filter +global.help.title=Hier klicken um Hilfe zu erhalten + +report.manager.item.created=Erstelt: %s +report.manager.item.upload.change=Ändern... +report.manager.date.format=dd.MM.yyyy HH:mm +report.manager.item.edit.name.prompt=Report Name +report.manager.item.edit.background=Generieren im Hintergrund erlauben +report.manager.item.edit.online=Online Anzeigen erlauben +report.manager.removing.report=Entferne Report '%s' +report.manager.report.is.used=Der Report wird in periodischen Reports verwendet. + +validation.email=Unzulässige E-Mail +validation.cronExpression=Unzulässiger Cron Ausdruck + +cycylic.edit.required-error.recipientEmail=Die E-Mail-Adresse ist erforderlich +cycylic.edit.required-error.cronSpec=Der Wann Ausdruck ist erforderlich +cyclic.edit.input-prompt.recipientEmail=E-Mail eingeben +cyclic.edit.input-prompt.cronSpec=Wann Ausdruck (Cron) +cyclic.edit.input-prompt.reportname=Report ausählen... +cycylic.edit.required-error.reportname=Der Report ist erforderlich +cyclic.edit.input-prompt.format=Report Format ist erforderlich... +cycylic.edit.required-error.format=Das Format ist erforderlich +cyclic.edit.caption.report=Report +cyclic.edit.caption.recipientEmail=E-Mail des Empfängers +cyclic.edit.caption.cronSpec=Wann + +dashboard.edit.caption.cacheTimeout=Ablaufdauer des Zwischenspeichers +dashboard.edit.required-error.cacheTimeout=Die Ablaufdauer des Zwischenspeichers ist erforderlich +dashboard.edit.input-prompt.reportId=Report ausählen... +dashboard.edit.required-error.reportId=Der Report ist erforderlich +dashboard.edit.caption.reportId=Report + +notification.fill.in.the.form.correctly=Füllen Sie das Formular richtig aus + +q.do.you.want.to.continue=Möchten Sie fortfahren? + + +exception.invalid_report_type.title=Nicht gültiger Report-Typ +exception.jasper_reports_exception.title=Jasper Fehler +exception.invalid_exporter_parameter.title=Nicht gültiger Export Parameter +exception.report_source_exception.title=Nicht gültige Report Vorlage +exception.serialization_exception.title=Fehler: Serialization Exception +exception.unknown.title=unbekannter Fehler +exception.invalid_datasource_type.title=Falscher Typ der Datenquelle +exception.unknown_property_name.title=Unbekannte Eigenschaft +exception.unsupported_encoding.title=Nicht unterstütze Zeichencodierung +exception.subreport_not_found.title=Unterreport nicht gefunden +exception.empty_report_source.title=Report Vorlage ist leer +exception.email_session_not_found.title=E-Mail Sitzung nicht gefunden +exception.drilldown_not_found.title=Drilldown nicht gefunden +exception.drilldown_report_not_found.title=Drilldown Report nicht gefunden +exception.jms_unavailable.title=Generieren von Reports im Hintergrund wird nicht unterstützt +exception.font_not_found.title=Die Schriftart, die im Report verwendet wird, wurde nicht gefunden. +exception.report_template_not_found.title=Report Vorlage nicht gefunden +exception.report_access_denied.title=Zugriff verweigert + +exception.invalid_report_type.desc=Bitte kontaktieren Sie Ihren Administrator. +exception.jasper_reports_exception.desc=Bitte prüfen Sie die Syntax des Reports. +exception.invalid_exporter_parameter.desc=Bitte kontaktieren Sie Ihren Administrator. +exception.report_source_exception.desc=Bitte prüfen Sie die Syntax des Reports. +exception.serialization_exception.desc=Bitte kontaktieren Sie Ihren Administrator. +exception.unknown.desc=Bitte kontaktieren Sie Ihren Administrator. +exception.invalid_datasource_type.desc=Bitte prüfen Sie die Syntax des Reports. +exception.unknown_property_name.desc=Bitte kontaktieren Sie Ihren Administrator. +exception.unsupported_encoding.desc=Bitte prüfen Sie die Syntax des Reports. +exception.subreport_not_found.desc=Bitte prüfen Sie die Syntax des Reports. +exception.empty_report_source.desc=Bitte prüfen Sie die Syntax des Reports. +exception.email_session_not_found.desc=Bitte prüfen Sie die JNDI-Konfiguration +exception.drilldown_not_found.desc=Bitte prüfen Sie die Syntax des Reports. +exception.drilldown_report_not_found.desc=Bitte prüfen Sie die Syntax des Reports. +exception.jms_unavailable.desc=Die aktuelle Umgebung unterstützt JMS nicht +exception.font_not_found.desc=Bitte kontaktieren Sie Ihren Administrator. +exception.report_template_not_found.desc= +exception.report_access_denied.desc= + + + + +help_window.tabs.report_details.title=Report details +help_window.tabs.report_details.intro=In this window you can select a report, which can be used to anchor tag report. +help_window.tabs.report_details.content=Each report can include configurable parameters. These parameters will be visible if they exist in a smaller window below the list of reports.
In the next part can be configuredcache expiration in seconds. Generated reports are stored in portal memory. If cache expires, another page refresh will re-generate the report.
Additional options include a possible report format selection and manual refresh configuration. Each option selected in the box brings up a button on the generated report (eg Refresh or PDF). +help_window.tabs.edit_report.title=Edit report +help_window.tabs.edit_report.intro=In this panel can be configured to display reports in the portlet. +help_window.tabs.edit_report.content=To do so, add a report to the table below using the button "Add report". Each report has its own identifier in the portlet context. Identifier is visible in the first column of table. Then use the reports IDs in HTML editor panel. To put report in HTML code displayed in the portlet you need to add report tag and index attribute whose value is the identifier of report from in the table. Tag can be added anywhere in your HTML code. A HTML editor is available next to the "View source", so you can view the contents of the HTML editor. +help_window.tabs.cyclic_reports.title=Cyclic reports +help_window.tabs.cyclic_reports.intro=In the reports editing panel you can add periodic reports regularly performed. +help_window.tabs.cyclic_reports.content=List of periodic reports is shown in the table below. Selecting from a table report updates the detailed view on the right. To update revised report after editing, press the "Update" button in the sidebar. Only then changes will be affixed to the table.
To add a new report press "Add cyclic report." The sidebar will appear blank controls, which should be filled and press the "Update" button. To save all changes made to the database, press the "Save" button. This operation initiate cyclic reports engine, so it is required for proper operation of functionality. + +manager.form.upload.help.title=Instructions to configure reports +manager.form.upload.help.content=

Parameters description

\\n
input_type
Parameter type. Allowed\\: \\n
  • text - text field
  • textarea - text field type textarea
  • date - field to choose the date and time
  • select - choosing box from the list
  • multiselect - multiple options from the list
  • checkbox - list of checkbox type fields
  • checkbox - list of checkbox type fields (multiple choice)
  • radiobuttons - list of checkbox type fields (single choice)
  • stepselect - selection list of one or multiple with filters or one from those filters
  • special_control - field generated in the scripting language (script is forwarded in the "special_control_code" property)
+help_window.dashboard.title=Help for portlets viewing reports +help_window.manager.title=Report Manager Help +help_window.tabs.params.title=Report parameters +help_window.tabs.template_options.title=Report template configuration +help_window.tabs.params.intro=To set up a form with data entered by the user to the report, you need to properly configure the the jrxml file parameters. \\n
Example of configuration mandatory parameter with a date\\:
 <parameter name\\="s_created_after" class\\="java.lang.String"> \\n \\t<property name\\="input_type" value\\="date"/>\\n \\t<property name\\="label" value\\="Created after"/>\\n \\t<property name\\="required" value\\="true"/>\\n \\t<property name\\="required_error" value\\="You must provide dat\u0119"/>\\n \\t<defaultValueExpression>\\n\\t\\t<\\![CDATA["2010-01-01"]]>\\n\\t</defaultValueExpression>\\n </parameter>\\n 

Described below are the possible ways to configure the parameters by properties\\: +help_window.tabs.params.param_name=Attribute key:%s +help_window.tabs.params.input_type.title=Type of control +help_window.tabs.params.input_type.content=Possible values\\n\\t
  • text - text field
  • textarea- text field type textarea
  • date - field to choose the date and time
  • select - choosing box from the list
  • multiselect - multiple options from the list
  • checkbox - list of checkbox type fields
  • checkbox - list of checkbox type fields (multiple choice)
  • radiobuttons - list of checkbox type fields (single choice)
  • stepselect - selection list of one or multiple with filters or one from those filters
  • special_control - field generated in the scripting language (script is forwarded in the "special_control_code" property)

Default\\: when the value is empty, the entire parameter is ignored by applications. +help_window.tabs.params.dict_query.title=Dictionary to the selection lists - SQL +help_window.tabs.params.dict_query.content=Content of the SQL query that fills the list box. It is assumed that the request meets the following conditions\\:\\n
  • Query returns two columns - the first is used as a value passed as a parameter to the report, second - as the description presented to user to user.
  • For stepselect type fields (to filtering by stages, eg country-> city-> street) with descriptions of the columns are returned in order from most specific to most general, such VALUE_TO_REPORT | STREET | CITY | COUNTRY

Format\\: {datasource};{SQL}
Example\\:
java\\:comp/env/jdbc/unirep;SELECT DISTINCT reportname, reportname FROM unirep_configuration
java\\:comp/env/jdbc/unirep;SELECT id, description, filename, reportname FROM unirep_configuration
+help_window.tabs.params.dict_item_list.title=Dictionary for selectionlists - directly +help_window.tabs.params.dict_item_list.content=Returned format should be analogous to dict_query, but in this case you don't need to enter SQL, but only values to be displayed

Format\\: {value passed to the report}\\:{content displayed in the form};{value2}\\:{displayed content2};{warto\u015b\u01073}\\:{displayed content3};...
Example\\: 1\\:reports summary;2\\:reports list +help_window.tabs.params.width.title=Field width +help_window.tabs.params.width.content=Field width including CSS

Example\\: 100px +help_window.tabs.params.maxchars.title=Character limit +help_window.tabs.params.maxchars.content=Maximum number of characters that can be typed into the field. +help_window.tabs.params.required.title=Field required +help_window.tabs.params.required.content=Field marked as required, will be marked with an asterisk and will not send the form. user receives a message defined in the properties required_error

Format\\: true|false
Default\\: false +help_window.tabs.params.required_error.title=Error message for required field +help_window.tabs.params.required_error.content=Error message shown in the case of blank field. It may contain %s, which will be substituted for the field name (taken from the label attribute).
\\
Format: {Message Key in .properties file}|{Default}\\
Example:
This is a required field
Field %s is required.\\
Default: defined in the message.properties with the key form.errors.required +help_window.tabs.params.regexp.title=Regular expression validation +help_window.tabs.params.regexp.content=The regular expression that will be compared with the value of the field (if it is not empty). +help_window.tabs.params.regexp_error.title=Error in regular expression validation +help_window.tabs.params.regexp_error.content=Error message shown in the case of a field value from a regular expression. It can include & \\ # 37; s The first of these will be swapped on a field name (taken from the attribute label ), and the other on the content of the regular expression (regexp Field ).
Format \\: {key in .properties file} | {error} directly
Example \\: Field & \\ # 37; s must match the pattern & \\ # 37 ; s
Default \\: message defined in .properties form.errors.regexp key help_window.tabs.params.order.title=Position in the form help_window.tabs.params.order.content=Property can affect the display order of fields on the form. Lower value causes that the field appears earlier.\\n In case of equal values, order is determined by the order of occurrence in the template report.
Default\\: 1000 +help_window.tabs.params.order.title=Position in form +help_window.tabs.params.order.content=Property allows to change the order of fields in the form. The higher value the sooner it is visible.\nIf there are two equal values, the order is defined by the position in the report's template.
Default\: 1000 +help_window.tabs.params.label.title=Label +help_window.tabs.params.label.content=Label displayed in the form +help_window.tabs.params.script_language.title=Script language +help_window.tabs.params.script_language.content +help_window.tabs.params.special_control_code.title=Script control +help_window.tabs.params.special_control_code.content +help_window.tabs.params.special_validation_code.title=Script validation +help_window.tabs.params.special_validation_code.content +help_window.tabs.params.special_validation_error.title=Script validation - error message +help_window.tabs.params.special_validation_error.content +help_window.tabs.params.special_data_query_code.title=Scripting dictionary for selection lists +help_window.tabs.params.special_data_query_code.content +help_window.tabs.params.level.title=Level (to stepselect fields) +help_window.tabs.params.level.content +help_window.tabs.params.filter_group.title=Group (to stepselect fields) +help_window.tabs.params.filter_group.content +help_window.tabs.params.multiple_choice.title=Multiple choice +help_window.tabs.params.multiple_choice.content +help_window.tabs.params.select_all.title=Select all +help_window.tabs.params.select_all.content From 49644199788e87e6fe5718d316dfbb2727751d89 Mon Sep 17 00:00:00 2001 From: Fynn Hauptmeier Date: Fri, 4 Sep 2015 10:40:57 +0200 Subject: [PATCH 13/64] Update Cyclic-Reports styles --- .../components/CyclicReportsComponent.java | 30 ++++++++++--------- .../main/resources/ui-messages_de.properties | 6 ++-- .../src/main/webapp/css/main.css | 7 +++-- 3 files changed, 24 insertions(+), 19 deletions(-) diff --git a/aperte-reports-ui/src/main/java/org/apertereports/components/CyclicReportsComponent.java b/aperte-reports-ui/src/main/java/org/apertereports/components/CyclicReportsComponent.java index beeb8c3..4c92581 100644 --- a/aperte-reports-ui/src/main/java/org/apertereports/components/CyclicReportsComponent.java +++ b/aperte-reports-ui/src/main/java/org/apertereports/components/CyclicReportsComponent.java @@ -338,16 +338,16 @@ private class EditCyclicReportPanel extends Panel { private boolean newItem; public EditCyclicReportPanel(CyclicReportConfig config, boolean newItem) { + super(new CssLayout()); this.newItem = newItem; this.config = config; - - setCaption(VaadinUtil.getValue(newItem ? UiIds.LABEL_ADDING : UiIds.LABEL_EDITION)); - + CssLayout layout = new CssLayout(); + UiFactory.createAccordion(this, VaadinUtil.getValue(newItem ? UiIds.LABEL_ADDING : UiIds.LABEL_EDITION),layout); setWidth("100%"); form = new EditCyclicReportForm(config); - addComponent(form); + layout.addComponent(form); UiFactory.createSpacer(this, null, "5px"); - HorizontalLayout buttons = UiFactory.createHLayout(this, FAction.SET_SPACING, FAction.SET_FULL_WIDTH); + HorizontalLayout buttons = UiFactory.createHLayout(layout, FAction.SET_SPACING, FAction.SET_FULL_WIDTH); UiFactory.createSpacer(buttons, FAction.SET_EXPAND_RATIO_1_0); Button tmpButton5 = UiFactory.createButton(UiIds.LABEL_SAVE, buttons, new ClickListener() { @Override @@ -397,12 +397,14 @@ private void finish() { private class EditCyclicReportForm extends Form { - private GridLayout layout; + private FormLayout layout; public EditCyclicReportForm(CyclicReportConfig config) { - layout = new GridLayout(1, 5); - layout.setWidth("100%"); - layout.setSpacing(true); + // layout = new GridLayout(1, 5); + //layout.setWidth("100%"); + //layout.setSpacing(true); + + layout = new FormLayout(); setLayout(layout); setFormFieldFactory(new EditCyclicFormFactory()); setItemDataSource(new BeanItem(config)); @@ -415,19 +417,19 @@ public EditCyclicReportForm(CyclicReportConfig config) { @Override protected void attachField(Object propertyId, Field field) { if (propertyId.equals(ORDER_REPORT)) { - layout.addComponent(field, 0, 0); + layout.addComponent(field); layout.setComponentAlignment(field, Alignment.MIDDLE_LEFT); } else if (propertyId.equals(ORDER_OUTPUT_FORMAT)) { - layout.addComponent(field, 0, 1); + layout.addComponent(field); layout.setComponentAlignment(field, Alignment.MIDDLE_LEFT); } else if (propertyId.equals(ORDER_RECIPIENT_EMAIL)) { - layout.addComponent(field, 0, 2); + layout.addComponent(field); layout.setComponentAlignment(field, Alignment.MIDDLE_LEFT); } else if (propertyId.equals(ORDER_CRON_SPEC)) { - layout.addComponent(field, 0, 3); + layout.addComponent(field); layout.setComponentAlignment(field, Alignment.MIDDLE_LEFT); } else if (propertyId.equals(ORDER_DESCRIPTION)) { - layout.addComponent(field, 0, 4); + layout.addComponent(field); } } } diff --git a/aperte-reports-ui/src/main/resources/ui-messages_de.properties b/aperte-reports-ui/src/main/resources/ui-messages_de.properties index ecada68..4fac395 100644 --- a/aperte-reports-ui/src/main/resources/ui-messages_de.properties +++ b/aperte-reports-ui/src/main/resources/ui-messages_de.properties @@ -1,7 +1,7 @@ label.active=Aktiv label.add=Hinzufügen -label.adding=Füge hinzu +label.adding=Hinzufügen label.add.3dots=Hinzufügen... label.all=Alle label.cancel=Abbrechen @@ -28,7 +28,7 @@ label.next=Weiter label.no=Nein label.none=kein label.ok=OK -label.parameters=Parameter +label.parameters=Report verwenden label.permissions=Berechtigungen label.preview=Vorschau label.previous=Zurück @@ -261,7 +261,7 @@ cycylic.edit.required-error.recipientEmail=Die E-Mail-Adresse ist erforderlich cycylic.edit.required-error.cronSpec=Der Wann Ausdruck ist erforderlich cyclic.edit.input-prompt.recipientEmail=E-Mail eingeben cyclic.edit.input-prompt.cronSpec=Wann Ausdruck (Cron) -cyclic.edit.input-prompt.reportname=Report ausählen... +cyclic.edit.input-prompt.reportname=Report auswählen... cycylic.edit.required-error.reportname=Der Report ist erforderlich cyclic.edit.input-prompt.format=Report Format ist erforderlich... cycylic.edit.required-error.format=Das Format ist erforderlich diff --git a/aperte-reports-ui/src/main/webapp/css/main.css b/aperte-reports-ui/src/main/webapp/css/main.css index ad02fc2..0be8e73 100644 --- a/aperte-reports-ui/src/main/webapp/css/main.css +++ b/aperte-reports-ui/src/main/webapp/css/main.css @@ -10,6 +10,9 @@ margin-right:5px; display:inline-block; } +.aui .v-checkbox{ + margin-left:5px; +} .accordion-toggle .v-label, .accordion-toggle .v-button{ display:inline-block; @@ -39,7 +42,7 @@ } .aui .v-app legend{ border:none; - margin:none; + margin:0; } .conf-row .v-caption, .conf-row .v-filterselect{ display:inline-block; @@ -79,7 +82,7 @@ .aui .roles .v-checkbox input, .aui .roles .v-checkbox label{ display:table-cell; } -.aui .v-checkbox input{ +.aui .v-checkbox input, .accordion-inner .btn{ margin-bottom:7px; } From d5064bc38ff337f99d70d6517cadfcbb9fbb391f Mon Sep 17 00:00:00 2001 From: Fynn Hauptmeier Date: Fri, 4 Sep 2015 11:42:24 +0200 Subject: [PATCH 14/64] small changes (css) --- aperte-reports-ui/src/main/webapp/css/main.css | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/aperte-reports-ui/src/main/webapp/css/main.css b/aperte-reports-ui/src/main/webapp/css/main.css index 0be8e73..35d7fb1 100644 --- a/aperte-reports-ui/src/main/webapp/css/main.css +++ b/aperte-reports-ui/src/main/webapp/css/main.css @@ -82,7 +82,7 @@ .aui .roles .v-checkbox input, .aui .roles .v-checkbox label{ display:table-cell; } -.aui .v-checkbox input, .accordion-inner .btn{ +.aui .v-checkbox input, .aui .accordion-inner .btn{ margin-bottom:7px; } @@ -180,13 +180,13 @@ select { /* Notification */ - .v-Notification, .v-form-errormessage{ background-color: #fee5e2; border: 1px solid #fcaca5; color: #b50303; border-radius: 2px; - margin-bottom: 20px; + margin-bottom: 10px; + margin-top: 10px; padding: 8px 35px 8px 14px; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); } From 085dbb781b010bdbe93478f11971348445be51a8 Mon Sep 17 00:00:00 2001 From: Chris Steinmeyer Date: Thu, 5 Nov 2015 09:24:49 +0100 Subject: [PATCH 15/64] Changed the artifactId of the portlet project to follow the default liferay portlet naming conventions. --- aperte-reports-ui/pom.xml | 300 +++++++++++++++++++------------------- 1 file changed, 150 insertions(+), 150 deletions(-) diff --git a/aperte-reports-ui/pom.xml b/aperte-reports-ui/pom.xml index a228cca..61f8b22 100644 --- a/aperte-reports-ui/pom.xml +++ b/aperte-reports-ui/pom.xml @@ -1,151 +1,151 @@ - - 4.0.0 - - apertereports - org.apertereports - 2.5-SNAPSHOT - - aperte-reports-ui - war - Portlets for uploading and generating reports - - - - - liferay-releases - https://repository.liferay.com/nexus/content/repositories/liferay-releases-ce/ - - - vaadin-addons - http://maven.vaadin.com/vaadin-addons - - - vaadin-snapshots - http://oss.sonatype.org/content/repositories/vaadin-snapshots/ - - false - - - true - - - - - - - org.vaadin.addons - activelink - 1.0 - - - org.vaadin.addons - toolkit-productivity-tools - 1.2.0 - - - - com.liferay.portal - portal-service - 6.2.1 - provided - - - javax.servlet - servlet-api - 2.5 - provided - - - javax.portlet - portlet-api - 2.0 - provided - - - org.apertereports - backbone - 2.5-SNAPSHOT - - - com.vaadin - vaadin - 6.8.12 - - - - org.springframework - spring-beans - - - commons-lang - commons-lang - - - org.jruby - jruby-complete - 1.5.3 - - - org.codehaus.groovy - groovy-all - - - com.google.gwt - gwt-user - 2.1.0 - provided - - - com.liferay.portal - portal-impl - 6.2.1 - provided - - - com.liferay.portal - util-java - 6.2.1 - provided - - - junit - junit - test - - - - - - - - src/main/resources - - - - - - org.apache.maven.plugins - maven-compiler-plugin - - 1.6 - 1.6 - UTF-8 - - - - - + + 4.0.0 + + apertereports + org.apertereports + 2.5-SNAPSHOT + + aperte-reports-portlet + war + Portlets for uploading and generating reports + + + + + liferay-releases + https://repository.liferay.com/nexus/content/repositories/liferay-releases-ce/ + + + vaadin-addons + http://maven.vaadin.com/vaadin-addons + + + vaadin-snapshots + http://oss.sonatype.org/content/repositories/vaadin-snapshots/ + + false + + + true + + + + + + + org.vaadin.addons + activelink + 1.0 + + + org.vaadin.addons + toolkit-productivity-tools + 1.2.0 + + + + com.liferay.portal + portal-service + 6.2.1 + provided + + + javax.servlet + servlet-api + 2.5 + provided + + + javax.portlet + portlet-api + 2.0 + provided + + + org.apertereports + backbone + 2.5-SNAPSHOT + + + com.vaadin + vaadin + 6.8.12 + + + + org.springframework + spring-beans + + + commons-lang + commons-lang + + + org.jruby + jruby-complete + 1.5.3 + + + org.codehaus.groovy + groovy-all + + + com.google.gwt + gwt-user + 2.1.0 + provided + + + com.liferay.portal + portal-impl + 6.2.1 + provided + + + com.liferay.portal + util-java + 6.2.1 + provided + + + junit + junit + test + + + + + + + + src/main/resources + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + 1.6 + 1.6 + UTF-8 + + + + + \ No newline at end of file From b14b2f1c1bc706fc6d19aa513f9aec4ea719176f Mon Sep 17 00:00:00 2001 From: Chris Steinmeyer Date: Wed, 31 Aug 2016 12:11:16 +0200 Subject: [PATCH 16/64] Update 31.08.2016 --- aperte-reports-ui/pom.xml | 2 +- .../src/main/webapp/css/main.css | 479 +++++++++++------- .../org/apertereports/dao/DictionaryDAO.java | 5 +- 3 files changed, 291 insertions(+), 195 deletions(-) diff --git a/aperte-reports-ui/pom.xml b/aperte-reports-ui/pom.xml index 61f8b22..b1d19e8 100644 --- a/aperte-reports-ui/pom.xml +++ b/aperte-reports-ui/pom.xml @@ -69,7 +69,7 @@ com.vaadin vaadin - 6.8.12 + 6.8.17 - - - jdbc/aperte-reports - javax.sql.DataSource - java:/jdbc/aperte-reports - + + + jdbc/aperte-reports + javax.sql.DataSource + java:/jdbc/aperte-reports + - - jms/ConnectionFactory - javax.jms.ConnectionFactory - java:/jms/ConnectionFactory - + + jms/ConnectionFactory + javax.jms.ConnectionFactory + java:/jms/ConnectionFactory + - - jms/ProcessReportQueue - javax.jms.Queue - java:/jms/ProcessReportQueue - + + jms/ProcessReportQueue + javax.jms.Queue + java:/jms/ProcessReportQueue + - - jms/GenerateReportQueue - javax.jms.Queue - java:/jms/GenerateReportQueue - + + jms/GenerateReportQueue + javax.jms.Queue + java:/jms/GenerateReportQueue + \ No newline at end of file diff --git a/aperte-reports-ui/src/main/webapp/WEB-INF/liferay-display.xml b/aperte-reports-ui/src/main/webapp/WEB-INF/liferay-display.xml index 3447ca8..5bb7f4b 100644 --- a/aperte-reports-ui/src/main/webapp/WEB-INF/liferay-display.xml +++ b/aperte-reports-ui/src/main/webapp/WEB-INF/liferay-display.xml @@ -1,12 +1,12 @@ - - - - - - - - - - - - + + + + + + + + + + + + diff --git a/aperte-reports-ui/src/main/webapp/WEB-INF/liferay-portlet.xml b/aperte-reports-ui/src/main/webapp/WEB-INF/liferay-portlet.xml index 1c8b87f..71a3741 100644 --- a/aperte-reports-ui/src/main/webapp/WEB-INF/liferay-portlet.xml +++ b/aperte-reports-ui/src/main/webapp/WEB-INF/liferay-portlet.xml @@ -1,45 +1,45 @@ - - Dashboard portlet + + Dashboard portlet false - false - /css/main.css - Dashboard-portlet - - - Invoker portlet + false + /css/main.css + Dashboard-portlet + + + Invoker portlet false - true - false - /css/main.css - - - Report Manager portlet - true + true + false + /css/main.css + + + Report Manager portlet + true false - false - false - portal - 1 - /css/main.css - - - Report Order Browser portlet + false + false + portal + 1 + /css/main.css + + + Report Order Browser portlet false - true - false - /css/main.css - - - Cyclic Reports portlet + true + false + /css/main.css + + + Cyclic Reports portlet false - false - false - /css/main.css - - - + false + false + /css/main.css + + + administrator Administrator diff --git a/aperte-reports-ui/src/main/webapp/WEB-INF/portlet.xml b/aperte-reports-ui/src/main/webapp/WEB-INF/portlet.xml index 093e56f..7c25699 100644 --- a/aperte-reports-ui/src/main/webapp/WEB-INF/portlet.xml +++ b/aperte-reports-ui/src/main/webapp/WEB-INF/portlet.xml @@ -1,152 +1,152 @@ - - - - - Invoker portlet - Aperte Reports Invoker - - com.vaadin.terminal.gwt.server.ApplicationPortlet2 - - application - org.apertereports.InvokerApplication - - - - - text/html - view - - - - - Aperte Reports Invoker - Invoker - invoker,report - - - - Report Manager portlet - Aperte Report Manager - - com.vaadin.terminal.gwt.server.ApplicationPortlet2 - - application - org.apertereports.ManagerApplication - - - - widgetset - com.vaadin.portal.gwt.PortalDefaultWidgetSet - - - - - text/html - view - - - - - Aperte Reports Manager - Manager - invoker,report - - - - Report Order Browser portlet - Report Order Browser - - com.vaadin.terminal.gwt.server.ApplicationPortlet2 - - application - org.apertereports.ReportOrderApplication - - - - - text/html - view - - - - - Aperte Reports Order Browser - Report Order Browser - invoker,report - - - - - Dashboard portlet - Aperte Reports Dashboard - - com.vaadin.terminal.gwt.server.ApplicationPortlet2 - - application - org.apertereports.DashboardPortletApplication - - - - text/html - view - edit - - - - Aperte Reports Dashboard - Dashboard - dashboard,chart - - - - - Cyclic Reports portlet - Cyclic Reports - - com.vaadin.terminal.gwt.server.ApplicationPortlet2 - - application - org.apertereports.CyclicReportsApplication - - - - text/html - view - - - - Aperte Cyclic Reports - Cyclic Reports - report,cyclic - - - - - I18nFilter - org.apertereports.util.I18nHelperFilter - RENDER_PHASE - ACTION_PHASE - RESOURCE_PHASE - EVENT_PHASE - - - - - I18nFilter - Cyclic Reports portlet - - - I18nFilter - Dashboard portlet - - - I18nFilter - Report Order Browser portlet - - - I18nFilter - Invoker portlet - - + + + + + Invoker portlet + Aperte Reports Invoker + + com.vaadin.terminal.gwt.server.ApplicationPortlet2 + + application + org.apertereports.InvokerApplication + + + + + text/html + view + + + + + Aperte Reports Invoker + Invoker + invoker,report + + + + Report Manager portlet + Aperte Report Manager + + com.vaadin.terminal.gwt.server.ApplicationPortlet2 + + application + org.apertereports.ManagerApplication + + + + widgetset + com.vaadin.portal.gwt.PortalDefaultWidgetSet + + + + + text/html + view + + + + + Aperte Reports Manager + Manager + invoker,report + + + + Report Order Browser portlet + Report Order Browser + + com.vaadin.terminal.gwt.server.ApplicationPortlet2 + + application + org.apertereports.ReportOrderApplication + + + + + text/html + view + + + + + Aperte Reports Order Browser + Report Order Browser + invoker,report + + + + + Dashboard portlet + Aperte Reports Dashboard + + com.vaadin.terminal.gwt.server.ApplicationPortlet2 + + application + org.apertereports.DashboardPortletApplication + + + + text/html + view + edit + + + + Aperte Reports Dashboard + Dashboard + dashboard,chart + + + + + Cyclic Reports portlet + Cyclic Reports + + com.vaadin.terminal.gwt.server.ApplicationPortlet2 + + application + org.apertereports.CyclicReportsApplication + + + + text/html + view + + + + Aperte Cyclic Reports + Cyclic Reports + report,cyclic + + + + + I18nFilter + org.apertereports.util.I18nHelperFilter + RENDER_PHASE + ACTION_PHASE + RESOURCE_PHASE + EVENT_PHASE + + + + + I18nFilter + Cyclic Reports portlet + + + I18nFilter + Dashboard portlet + + + I18nFilter + Report Order Browser portlet + + + I18nFilter + Invoker portlet + + diff --git a/aperte-reports-ui/src/main/webapp/WEB-INF/web.xml b/aperte-reports-ui/src/main/webapp/WEB-INF/web.xml index 63d0e05..1ed789e 100644 --- a/aperte-reports-ui/src/main/webapp/WEB-INF/web.xml +++ b/aperte-reports-ui/src/main/webapp/WEB-INF/web.xml @@ -1,66 +1,72 @@ - Aperte Reports - - + xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" + xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" + id="AperteReports"> + Aperte Reports + + Vaadin production mode - productionMode - false - + productionMode + false + - - jdbc/aperte-reports - javax.sql.DataSource - Container - - - - jms/ConnectionFactory - javax.jms.ConnectionFactory - Container - + + jdbc/aperte-reports + javax.sql.DataSource + Container + + + + aperterest + com.jaspersoft.jrs.data.webservice.WebServiceDataSourceDefinition + Container + + + + jms/ConnectionFactory + javax.jms.ConnectionFactory + Container + - - jms/ProcessReportQueue - javax.jms.Queue - Container - + + jms/ProcessReportQueue + javax.jms.Queue + Container + - - jms/GenerateReportQueue - javax.jms.Queue - Container - + + jms/GenerateReportQueue + javax.jms.Queue + Container + VaadinServlet com.vaadin.terminal.gwt.server.ApplicationServlet - + VaadinServlet /VAADIN/* - - clearCacheServlet - org.apertereports.util.servlet.ClearCacheServlet - 1 - - - clearCacheServlet - /*/cacheManager - + + clearCacheServlet + org.apertereports.util.servlet.ClearCacheServlet + 1 + + + clearCacheServlet + /*/cacheManager + - - - index.html - index.htm - index.jsp - default.html - default.htm - default.jsp - + + + index.html + index.htm + index.jsp + default.html + default.htm + default.jsp + \ No newline at end of file diff --git a/aperte-reports-ui/src/main/webapp/css/main.css b/aperte-reports-ui/src/main/webapp/css/main.css index b27e8f1..1ecccaa 100644 --- a/aperte-reports-ui/src/main/webapp/css/main.css +++ b/aperte-reports-ui/src/main/webapp/css/main.css @@ -1,109 +1,117 @@ -.gwt-FileUpload{ - display:none; +.gwt-FileUpload { + display: none; } -.v-csslayout-container .v-button{ - margin-right:5px; +.v-csslayout-container .v-button { + margin-right: 5px; } -.aui .v-checkbox > *, .aui .v-checkbox input{ + +.aui .v-checkbox>*, .aui .v-checkbox input { /*float:left;*/ - margin-right:5px; - display:inline-block; + margin-right: 5px; + display: inline-block; } -.aui .v-checkbox{ - margin-left:5px; + +.aui .v-checkbox { + margin-left: 5px; } -.accordion-toggle .v-label, .accordion-toggle .v-button{ - display:inline-block; +.accordion-toggle .v-label, .accordion-toggle .v-button { + display: inline-block; } -.aui .v-app .accordion-group .accordion-heading.toggler-header-expanded .accordion-toggle::before, .aui .v-app .lfr-add-panel .lfr-page-template .lfr-page-template-title.toggler-header-expanded::before{ - content:""; +.aui .v-app .accordion-group .accordion-heading.toggler-header-expanded .accordion-toggle::before, + .aui .v-app .lfr-add-panel .lfr-page-template .lfr-page-template-title.toggler-header-expanded::before + { + content: ""; } -.aui .v-app .accordion-toggle{ - cursor:default; + +.aui .v-app .accordion-toggle { + cursor: default; } -.accordion-toggle .v-button, .accordion-toggle .v-label.float-right{ - float:right; +.accordion-toggle .v-button, .accordion-toggle .v-label.float-right { + float: right; } -.invoker .accordion-toggle .v-label{ - float:left; - margin-top:7px; +.invoker .accordion-toggle .v-label { + float: left; + margin-top: 7px; } -.accordion-toggle .v-label{ - float:none; - margin-top:0; + +.accordion-toggle .v-label { + float: none; + margin-top: 0; } -.aui .accordion-inner fieldset{ - border:none; + +.aui .accordion-inner fieldset { + border: none; } -.aui .v-app legend{ - border:none; - margin:0; + +.aui .v-app legend { + border: none; + margin: 0; } -.conf-row .v-caption, .conf-row .v-filterselect{ - display:inline-block; + +.conf-row .v-caption, .conf-row .v-filterselect { + display: inline-block; } -.v-captiontext, .v-required-field-indicator{ +.v-captiontext, .v-required-field-indicator { display: inline; } -.aui .v-filterselect .v-filterselect-input{ - margin-bottom:0; +.aui .v-filterselect .v-filterselect-input { + margin-bottom: 0; } -.v-filterselect-button{ - display:none; +.v-filterselect-button { + display: none; } -.v-caption{ - width:150px; +.v-caption { + width: 150px; } -.aui .v-filterselect, .aui .v-caption{ - margin-bottom:5px; +.aui .v-filterselect, .aui .v-caption { + margin-bottom: 5px; } -.v-tooltip{ - display:none; +.v-tooltip { + display: none; } /* roles */ -.roles .v-checkbox{ - display:table-row; -} -.roles .v-csslayout-margin{ - display:table; +.roles .v-checkbox { + display: table-row; } -.aui .roles .v-checkbox input, .aui .roles .v-checkbox label{ - display:table-cell; + +.roles .v-csslayout-margin { + display: table; } -.aui .v-checkbox input, .aui .accordion-inner .btn{ - margin-bottom:7px; + +.aui .roles .v-checkbox input, .aui .roles .v-checkbox label { + display: table-cell; } -.button-row{ - margin-bottom:10px; +.aui .v-checkbox input, .aui .accordion-inner .btn { + margin-bottom: 7px; } +.button-row { + margin-bottom: 10px; +} /* Select */ - - -.v-app select, -.v-window select { - padding: 1px; +.v-app select, .v-window select { + padding: 1px; } select { - background-color: #fff; + background-color: #fff; } -.v-ie6 select { +.v-ie6 select { font-size: 1em; } @@ -119,25 +127,20 @@ select { .v-filterselect-suggestpopup { border: 1px solid #98C0F4; - background-color: #fff; + background-color: #fff; } .v-filterselect-suggestmenu { - min-height: 2px; - + min-height: 2px; } -.v-filterselect-prevpage, -.v-filterselect-prevpage-off, -.v-filterselect-nextpage, -.v-filterselect-nextpage-off { +.v-filterselect-prevpage, .v-filterselect-prevpage-off, + .v-filterselect-nextpage, .v-filterselect-nextpage-off { background-color: #fff; } -.v-filterselect-prevpage span, -.v-filterselect-prevpage-off span, -.v-filterselect-nextpage span, -.v-filterselect-nextpage-off span { +.v-filterselect-prevpage span, .v-filterselect-prevpage-off span, + .v-filterselect-nextpage span, .v-filterselect-nextpage-off span { display: block; height: 8px; width: 16px; @@ -148,19 +151,19 @@ select { .v-filterselect-prevpage span, .v-filterselect-nextpage span { background: transparent no-repeat 0 -4px; - background-image: url(/html/themes/classic/images/aui/icon_sprite.png); + background-image: url(/html/themes/classic/images/aui/icon_sprite.png); } .v-filterselect-nextpage span { background-position: -65px -4px; } + .v-filterselect-suggestmenu .gwt-MenuItem span { display: block; width: 100%; height: 18px; border: 1px solid #fff; border-style: solid none; - } .v-filterselect-suggestmenu .gwt-MenuItem-selected span { @@ -173,115 +176,116 @@ select { float: left; } -.v-select-twincol-buttons .v-button-wrap { +.v-select-twincol-buttons .v-button-wrap { padding-left: 11px; padding-right: 11px; } -.v-button-wrap{ - color: inherit!important; +.v-button-wrap { + color: inherit !important; } -.v-button-caption{ - text-decoration: inherit!important; +.v-button-caption { + text-decoration: inherit !important; } -.v-panel, .v-panel-caption, .v-panel-nocaption{ - background: none!important; - border: none!important; +.v-panel, .v-panel-caption, .v-panel-nocaption { + background: none !important; + border: none !important; } -.v-panel-content{ - border: none!important; +.v-panel-content { + border: none !important; } -.v-button, .v-datefield-button{ - border: 0!important; - text-shadow: none!important; - border-radius: 8px!important; - padding: 4px 12px!important; +.v-button, .v-datefield-button { + border: 0 !important; + text-shadow: none !important; + border-radius: 8px !important; + padding: 4px 12px !important; } -.v-datefield-button, .v-datefield-button:hover{ - background: inherit!important; - box-shadow: none!important; - outline: 0!important; - margin: 0!important; - font-size: 16px!important; - background-color: transparent!important; +.v-datefield-button, .v-datefield-button:hover { + background: inherit !important; + box-shadow: none !important; + outline: 0 !important; + margin: 0 !important; + font-size: 16px !important; + background-color: transparent !important; } -.v-datefield-time{ +.v-datefield-time { text-align: center; } -.v-datefield-calendarpanel .v-select{ +.v-datefield-calendarpanel .v-select { max-width: 96px; } -.v-button-prevyear, .v-button-prevmonth, .v-button-nextmonth, .v-button-nextyear{ - text-shadow: none!important; - border-radius: 8px!important; - padding: 4px 12px!important; - width: 30px!important; - box-shadow: none!important; - font-size: 14px!important; +.v-button-prevyear, .v-button-prevmonth, .v-button-nextmonth, + .v-button-nextyear { + text-shadow: none !important; + border-radius: 8px !important; + padding: 4px 12px !important; + width: 30px !important; + box-shadow: none !important; + font-size: 14px !important; } - -.v-button-prevyear:before, .v-button-prevmonth:before, .v-button-nextmonth:before, .v-button-nextyear:before, .v-datefield-button:before{ +.v-button-prevyear:before, .v-button-prevmonth:before, + .v-button-nextmonth:before, .v-button-nextyear:before, + .v-datefield-button:before { display: block; - font-family: FontAwesome; - font-size: inherit; - text-rendering: auto; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - min-width: 10px; - text-align: center; - line-height: 0px; + font-family: FontAwesome; + font-size: inherit; + text-rendering: auto; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + min-width: 10px; + text-align: center; + line-height: 0px; } -.v-button-prevyear:before{ +.v-button-prevyear:before { content: ""; } -.v-button-prevmonth:before{ +.v-button-prevmonth:before { content: ""; } -.v-button-nextmonth:before{ +.v-button-nextmonth:before { content: ""; } -.v-button-nextyear:before{ +.v-button-nextyear:before { content: ""; } -.v-datefield-button:before{ +.v-datefield-button:before { content: "\f073"; - color: #626262!important; + color: #626262 !important; } - -.v-datefield-calendarpanel-prevmonth, .v-datefield-calendarpanel-month, .v-datefield-calendarpanel-nextmonth{ - background: none!important; +.v-datefield-calendarpanel-prevmonth, .v-datefield-calendarpanel-month, + .v-datefield-calendarpanel-nextmonth { + background: none !important; } -.v-datefield-calendarpanel-day{ - background: none!important; - border-radius: 2px!important; - border-color: #d9d8d8!important; +.v-datefield-calendarpanel-day { + background: none !important; + border-radius: 2px !important; + border-color: #d9d8d8 !important; } /* Notification */ - -.v-Notification, .v-form-errormessage{ +.v-Notification, .v-form-errormessage { background-color: #fee5e2; - border: 1px solid #fcaca5; - color: #b50303; - border-radius: 2px; - margin-bottom: 10px; - margin-top: 10px; - padding: 8px 35px 8px 14px; - text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); -} + border: 1px solid #fcaca5; + color: #b50303; + border-radius: 2px; + margin-bottom: 10px; + margin-top: 10px; + padding: 8px 35px 8px 14px; + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); +} \ No newline at end of file diff --git a/aperte-reports-ws/ws-client/src/main/resources/pl/net/bluesoft/rnd/apertereports/ws/client/aperte-reports-ws-client.xml b/aperte-reports-ws/ws-client/src/main/resources/pl/net/bluesoft/rnd/apertereports/ws/client/aperte-reports-ws-client.xml index a718cc0..a4942aa 100644 --- a/aperte-reports-ws/ws-client/src/main/resources/pl/net/bluesoft/rnd/apertereports/ws/client/aperte-reports-ws-client.xml +++ b/aperte-reports-ws/ws-client/src/main/resources/pl/net/bluesoft/rnd/apertereports/ws/client/aperte-reports-ws-client.xml @@ -1,19 +1,22 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"> - - - - - - + + + + + + - + - - - - + + + + diff --git a/aperte-reports-ws/ws-endpoint/src/main/webapp/WEB-INF/endpoint-servlet.xml b/aperte-reports-ws/ws-endpoint/src/main/webapp/WEB-INF/endpoint-servlet.xml index 73afc88..b597324 100644 --- a/aperte-reports-ws/ws-endpoint/src/main/webapp/WEB-INF/endpoint-servlet.xml +++ b/aperte-reports-ws/ws-endpoint/src/main/webapp/WEB-INF/endpoint-servlet.xml @@ -1,61 +1,67 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/aperte-reports-ws/ws-endpoint/src/main/webapp/WEB-INF/web.xml b/aperte-reports-ws/ws-endpoint/src/main/webapp/WEB-INF/web.xml index 67a3004..832687b 100644 --- a/aperte-reports-ws/ws-endpoint/src/main/webapp/WEB-INF/web.xml +++ b/aperte-reports-ws/ws-endpoint/src/main/webapp/WEB-INF/web.xml @@ -1,21 +1,21 @@ + xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" + version="2.4"> - Aperte Reports WebService Endpoint + Aperte Reports WebService Endpoint - - endpoint - org.springframework.ws.transport.http.MessageDispatcherServlet - - transformWsdlLocations - true - - + + endpoint + org.springframework.ws.transport.http.MessageDispatcherServlet + + transformWsdlLocations + true + + - - endpoint - /* - + + endpoint + /* + diff --git a/aperte-reports-ws/ws-endpoint/src/test/resources/apertereports.xsd b/aperte-reports-ws/ws-endpoint/src/test/resources/apertereports.xsd index 80092cc..39713d4 100644 --- a/aperte-reports-ws/ws-endpoint/src/test/resources/apertereports.xsd +++ b/aperte-reports-ws/ws-endpoint/src/test/resources/apertereports.xsd @@ -1,53 +1,63 @@ + elementFormDefault="qualified" targetNamespace="http://bluesoft.net.pl/rnd/apertereports/schemas" + xmlns:xmime="http://www.w3.org/2005/05/xmlmime" xmlns:rg="http://bluesoft.net.pl/rnd/apertereports/schemas"> - - - - - - - + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - + + + + + + - - - - - - - + + + + + + + - - - - - - - - - + + + + + + + + + diff --git a/aperte-reports-ws/ws-endpoint/src/test/resources/test-context.xml b/aperte-reports-ws/ws-endpoint/src/test/resources/test-context.xml index 995766a..3bbd8ee 100644 --- a/aperte-reports-ws/ws-endpoint/src/test/resources/test-context.xml +++ b/aperte-reports-ws/ws-endpoint/src/test/resources/test-context.xml @@ -1,63 +1,70 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/aperte-reports-ws/ws-endpoint/src/test/resources/test.xml b/aperte-reports-ws/ws-endpoint/src/test/resources/test.xml index 1729974..c065365 100644 --- a/aperte-reports-ws/ws-endpoint/src/test/resources/test.xml +++ b/aperte-reports-ws/ws-endpoint/src/test/resources/test.xml @@ -4,12 +4,12 @@ "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd"> - - - - - - - - + + + + + + + + diff --git a/backbone/src/test/resources/hibernate.cfg.xml b/backbone/src/test/resources/hibernate.cfg.xml index 26c4a17..17ac616 100644 --- a/backbone/src/test/resources/hibernate.cfg.xml +++ b/backbone/src/test/resources/hibernate.cfg.xml @@ -3,22 +3,22 @@ "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> - - java:comp/env/jndids - - + + java:comp/env/jndids + + - org.postgresql.Driver - org.hibernate.dialect.PostgreSQLDialect - org.hibernate.transaction.JDBCTransactionFactory - thread - - false - - org.hibernate.cache.HashtableCacheProvider - - true - true + org.postgresql.Driver + org.hibernate.dialect.PostgreSQLDialect + org.hibernate.transaction.JDBCTransactionFactory + thread + + false + + org.hibernate.cache.HashtableCacheProvider + + true + true - + diff --git a/backbone/src/test/resources/stackedchart.jrxml b/backbone/src/test/resources/stackedchart.jrxml index 81a855e..a1e3992 100644 --- a/backbone/src/test/resources/stackedchart.jrxml +++ b/backbone/src/test/resources/stackedchart.jrxml @@ -1,393 +1,376 @@ - -