diff --git a/hsarweb/WebContent/VAADIN/themes/hs/layout/footer.html b/hsarweb/WebContent/VAADIN/themes/hs/layout/footer.html new file mode 100644 index 0000000..31dc7b7 --- /dev/null +++ b/hsarweb/WebContent/VAADIN/themes/hs/layout/footer.html @@ -0,0 +1,4 @@ +
+
(c) Hostsharing eG, Impressum
+
hsarweb (Vers. 2.0a, 23.05.2011)
+
\ No newline at end of file diff --git a/hsarweb/src/de/hsadmin/web/DatabaseModule.java b/hsarweb/src/de/hsadmin/web/DatabaseModule.java index 3d69f04..3ccea15 100644 --- a/hsarweb/src/de/hsadmin/web/DatabaseModule.java +++ b/hsarweb/src/de/hsadmin/web/DatabaseModule.java @@ -124,7 +124,9 @@ public abstract class DatabaseModule extends GenericModule { return map; } }); - ownerProp.setWriteOnce(true); + idProp.setShowInForm(false); + pacProp.setShowInForm(false); + encodingProp.setShowInForm(false); moduleConfig.addProperty(idProp); moduleConfig.addProperty(pacProp); moduleConfig.addProperty(nameProp); diff --git a/hsarweb/src/de/hsadmin/web/DatabaseUserModule.java b/hsarweb/src/de/hsadmin/web/DatabaseUserModule.java index 8038a85..c42d5a5 100644 --- a/hsarweb/src/de/hsadmin/web/DatabaseUserModule.java +++ b/hsarweb/src/de/hsadmin/web/DatabaseUserModule.java @@ -67,6 +67,8 @@ public abstract class DatabaseUserModule extends GenericModule { }); pacProp.setWriteOnce(true); PropertyConfig passwordProp = new PropertyConfig(moduleConfig, "password", String.class, PropertyTableColumn.NONE, new PasswordPropertyFieldFactory(this)); + idProp.setShowInForm(false); + pacProp.setShowInForm(false); moduleConfig.addProperty(idProp); moduleConfig.addProperty(pacProp); moduleConfig.addProperty(nameProp); diff --git a/hsarweb/src/de/hsadmin/web/DomainModule.java b/hsarweb/src/de/hsadmin/web/DomainModule.java index 02cc348..ef39e5f 100644 --- a/hsarweb/src/de/hsadmin/web/DomainModule.java +++ b/hsarweb/src/de/hsadmin/web/DomainModule.java @@ -68,6 +68,9 @@ public class DomainModule extends GenericModule { hiveProp.setReadOnly(true); PropertyConfig sinceProp = new PropertyConfig(moduleConfig, "since", Date.class, new DatePropertyFieldFactory()); sinceProp.setReadOnly(true); + idProp.setShowInForm(false); + pacProp.setShowInForm(false); + hiveProp.setShowInForm(false); moduleConfig.addProperty(idProp); moduleConfig.addProperty(nameProp); moduleConfig.addProperty(userProp); diff --git a/hsarweb/src/de/hsadmin/web/EMailAddressModule.java b/hsarweb/src/de/hsadmin/web/EMailAddressModule.java index 75fecc4..dc3d4e3 100644 --- a/hsarweb/src/de/hsadmin/web/EMailAddressModule.java +++ b/hsarweb/src/de/hsadmin/web/EMailAddressModule.java @@ -66,13 +66,19 @@ public class EMailAddressModule extends GenericModule { pacProp.setReadOnly(true); PropertyConfig fulldomainProp = new PropertyConfig(moduleConfig, "fulldomain", String.class, PropertyTableColumn.HIDDEN); fulldomainProp.setReadOnly(true); + idProp.setShowInForm(false); + localpartProp.setShowInForm(false); + subdomainProp.setShowInForm(false); + domainProp.setShowInForm(false); + pacProp.setShowInForm(false); + fulldomainProp.setShowInForm(false); moduleConfig.addProperty(idProp); + moduleConfig.addProperty(domAdminProp); moduleConfig.addProperty(fullAddressProp); moduleConfig.addProperty(localpartProp); moduleConfig.addProperty(subdomainProp); moduleConfig.addProperty(domainProp); moduleConfig.addProperty(targetProp); - moduleConfig.addProperty(domAdminProp); moduleConfig.addProperty(pacProp); moduleConfig.addProperty(fulldomainProp); } diff --git a/hsarweb/src/de/hsadmin/web/EMailAliasModule.java b/hsarweb/src/de/hsadmin/web/EMailAliasModule.java index ab9b162..ff6f04e 100644 --- a/hsarweb/src/de/hsadmin/web/EMailAliasModule.java +++ b/hsarweb/src/de/hsadmin/web/EMailAliasModule.java @@ -74,6 +74,8 @@ public class EMailAliasModule extends GenericModule { } }); pacProp.setWriteOnce(true); + idProp.setShowInForm(false); + pacProp.setShowInForm(false); moduleConfig.addProperty(idProp); moduleConfig.addProperty(pacProp); moduleConfig.addProperty(nameProp); diff --git a/hsarweb/src/de/hsadmin/web/HomeModule.java b/hsarweb/src/de/hsadmin/web/HomeModule.java index 5b4ae2c..d71e536 100644 --- a/hsarweb/src/de/hsadmin/web/HomeModule.java +++ b/hsarweb/src/de/hsadmin/web/HomeModule.java @@ -76,6 +76,9 @@ public class HomeModule extends AbstractModule implements ComponentFactory, Upda PropertyConfig passwordProp = new PropertyConfig(moduleConfig, "password", String.class, PropertyTableColumn.NONE, new PasswordPropertyFieldFactory(this)); PropertyConfig commentProp = new PropertyConfig(moduleConfig, "comment", String.class); commentProp.setReadOnly(true); + idProp.setShowInForm(false); + pacProp.setShowInForm(false); + useridProp.setShowInForm(false); moduleConfig.addProperty(idProp); moduleConfig.addProperty(pacProp); moduleConfig.addProperty(useridProp); diff --git a/hsarweb/src/de/hsadmin/web/MainApplication.java b/hsarweb/src/de/hsadmin/web/MainApplication.java index 4b84e9e..f2a2527 100644 --- a/hsarweb/src/de/hsadmin/web/MainApplication.java +++ b/hsarweb/src/de/hsadmin/web/MainApplication.java @@ -18,20 +18,15 @@ import com.vaadin.terminal.ExternalResource; import com.vaadin.terminal.Terminal; import com.vaadin.terminal.ThemeResource; import com.vaadin.terminal.gwt.server.HttpServletRequestListener; -import com.vaadin.ui.Button; import com.vaadin.ui.Component; import com.vaadin.ui.CustomLayout; -import com.vaadin.ui.Embedded; -import com.vaadin.ui.HorizontalLayout; import com.vaadin.ui.Link; import com.vaadin.ui.TabSheet; import com.vaadin.ui.VerticalLayout; import com.vaadin.ui.Window; -import com.vaadin.ui.Button.ClickEvent; import com.vaadin.ui.TabSheet.SelectedTabChangeEvent; import com.vaadin.ui.TabSheet.Tab; import com.vaadin.ui.Window.Notification; -import com.vaadin.ui.themes.BaseTheme; import de.hsadmin.web.config.LocaleConfig; import de.hsadmin.web.config.ModuleConfig; @@ -48,8 +43,6 @@ public class MainApplication extends Application implements HttpServletRequestLi private Map modules; private Locale requestLocale; - private CustomLayout header; - @Override public void init() { @@ -74,17 +67,6 @@ public class MainApplication extends Application implements HttpServletRequestLi Window mainWindow = new Window(localeConfig.getText("applicationtitle")); VerticalLayout verticalLayout = new VerticalLayout(); verticalLayout.setSizeFull(); -// HorizontalLayout banner = new HorizontalLayout(); -// Embedded image = new Embedded(null, new ThemeResource("../hs/icons/logo.png")); -// image.setMimeType("image/png"); -// Embedded bgImage = new Embedded(null, new ThemeResource("../hs/icons/bg.png")); -// bgImage.setMimeType("image/png"); -// Link logout = new Link("logout", new ExternalResource(localeConfig.getText("logout.link"))); -// banner.addComponent(image); -// banner.addComponent(bgImage); -// banner.addComponent(logout); -// banner.setExpandRatio(bgImage, 1.0f); -// verticalLayout.addComponent(banner); CustomLayout banner = new CustomLayout("../../hs/layout/header"); verticalLayout.addComponent(banner); TabSheet tabs = new TabSheet(); @@ -110,7 +92,8 @@ public class MainApplication extends Application implements HttpServletRequestLi tabs.addListener(this); verticalLayout.addComponent(tabs); verticalLayout.setExpandRatio(tabs, 1.0f); - verticalLayout.addComponent(new Link(localeConfig.getText("impressum.label"), new ExternalResource(localeConfig.getText("impressum.link")))); + CustomLayout footer = new CustomLayout("../../hs/layout/footer"); + verticalLayout.addComponent(footer); mainWindow.setContent(verticalLayout); setMainWindow(mainWindow); setErrorHandler(new Terminal.ErrorListener() { diff --git a/hsarweb/src/de/hsadmin/web/UnixUserModule.java b/hsarweb/src/de/hsadmin/web/UnixUserModule.java index 3549cd8..4198990 100644 --- a/hsarweb/src/de/hsadmin/web/UnixUserModule.java +++ b/hsarweb/src/de/hsadmin/web/UnixUserModule.java @@ -114,6 +114,9 @@ public class UnixUserModule extends GenericModule { return "0"; } }); + pacProp.setShowInForm(false); + idProp.setShowInForm(false); + useridProp.setShowInForm(false); moduleConfig.addProperty(pacProp); moduleConfig.addProperty(idProp); moduleConfig.addProperty(useridProp); diff --git a/hsarweb/src/de/hsadmin/web/config/PropertyConfig.java b/hsarweb/src/de/hsadmin/web/config/PropertyConfig.java index ca04fd9..cfbead6 100644 --- a/hsarweb/src/de/hsadmin/web/config/PropertyConfig.java +++ b/hsarweb/src/de/hsadmin/web/config/PropertyConfig.java @@ -6,7 +6,7 @@ import java.util.Map; import de.hsadmin.web.vaadin.DefaultPropertyFieldFactory; -public class PropertyConfig implements Serializable, PropertyDefaultValue, PropertySelectValues { +public class PropertyConfig implements Serializable, PropertyDefaultValue, PropertySelectValues, PropertyFormVisible { private static final long serialVersionUID = 1L; @@ -17,6 +17,7 @@ public class PropertyConfig implements Serializable, PropertyDefaultValue, Prope private PropertyFieldFactory propFieldFactory; private PropertyDefaultValue defaultValue; private PropertySelectValues selectValues; + private boolean showInForm = true; public PropertyConfig(ModuleConfig moduleConfig, String id, Class clasz) { this.moduleConfig = moduleConfig; @@ -126,5 +127,15 @@ public class PropertyConfig implements Serializable, PropertyDefaultValue, Prope public void setWriteOnce(boolean writeOnce) { propFieldFactory.setWriteOnce(writeOnce); } + + @Override + public boolean isShowInForm() { + return showInForm; + } + + @Override + public void setShowInForm(boolean show) { + showInForm = show; + } } diff --git a/hsarweb/src/de/hsadmin/web/config/PropertyFormVisible.java b/hsarweb/src/de/hsadmin/web/config/PropertyFormVisible.java new file mode 100644 index 0000000..c50f401 --- /dev/null +++ b/hsarweb/src/de/hsadmin/web/config/PropertyFormVisible.java @@ -0,0 +1,9 @@ +package de.hsadmin.web.config; + +public interface PropertyFormVisible { + + public abstract void setShowInForm(boolean dontShow); + + public abstract boolean isShowInForm(); + +} diff --git a/hsarweb/src/de/hsadmin/web/vaadin/DatePropertyFieldFactory.java b/hsarweb/src/de/hsadmin/web/vaadin/DatePropertyFieldFactory.java index c1dc066..626f1d8 100644 --- a/hsarweb/src/de/hsadmin/web/vaadin/DatePropertyFieldFactory.java +++ b/hsarweb/src/de/hsadmin/web/vaadin/DatePropertyFieldFactory.java @@ -18,7 +18,7 @@ public class DatePropertyFieldFactory implements PropertyFieldFactory { public static final DateFormat serverDf = DateFormat.getDateInstance(DateFormat.SHORT); private boolean readOnly = false; - private boolean writeOnce; + private boolean writeOnce = false; @Override public Object createFieldComponent(PropertyConfig prop, Object value) { diff --git a/hsarweb/src/de/hsadmin/web/vaadin/DefaultPropertyFieldFactory.java b/hsarweb/src/de/hsadmin/web/vaadin/DefaultPropertyFieldFactory.java index 80ea527..02d1c45 100644 --- a/hsarweb/src/de/hsadmin/web/vaadin/DefaultPropertyFieldFactory.java +++ b/hsarweb/src/de/hsadmin/web/vaadin/DefaultPropertyFieldFactory.java @@ -9,7 +9,7 @@ import de.hsadmin.web.config.PropertyFieldFactory; public class DefaultPropertyFieldFactory implements PropertyFieldFactory { private boolean readOnly = false; - private boolean writeOnce; + private boolean writeOnce = false; @Override public Object createFieldComponent(PropertyConfig prop, Object value) { diff --git a/hsarweb/src/de/hsadmin/web/vaadin/EMailTargetPropertyFieldFactory.java b/hsarweb/src/de/hsadmin/web/vaadin/EMailTargetPropertyFieldFactory.java index 106d30a..8e47771 100644 --- a/hsarweb/src/de/hsadmin/web/vaadin/EMailTargetPropertyFieldFactory.java +++ b/hsarweb/src/de/hsadmin/web/vaadin/EMailTargetPropertyFieldFactory.java @@ -24,8 +24,8 @@ import de.hsadmin.web.config.PropertyFieldFactory; public class EMailTargetPropertyFieldFactory implements PropertyFieldFactory { private Module module; - private boolean readOnly; - private boolean writeOnce; + private boolean readOnly = false; + private boolean writeOnce = false; private List users; private List mailAliases; private Map targets; @@ -245,4 +245,5 @@ public class EMailTargetPropertyFieldFactory implements PropertyFieldFactory { return value; } } + } diff --git a/hsarweb/src/de/hsadmin/web/vaadin/GenericForm.java b/hsarweb/src/de/hsadmin/web/vaadin/GenericForm.java index c04cee5..a854c29 100644 --- a/hsarweb/src/de/hsadmin/web/vaadin/GenericForm.java +++ b/hsarweb/src/de/hsadmin/web/vaadin/GenericForm.java @@ -56,7 +56,7 @@ public class GenericForm { f.setData(entityId); Layout layout = f.getLayout(); for (PropertyConfig prop : config.getPropertyList()) { - if (!prop.getPropTableColumn().equals(PropertyTableColumn.INTERNAL_KEY)) { + if (!prop.getPropTableColumn().equals(PropertyTableColumn.INTERNAL_KEY) && prop.isShowInForm()) { PropertyFieldFactory propFieldFactory = prop.getPropFieldFactory(); Object value = row.get(prop.getId()); Component component = (Component) propFieldFactory.createFieldComponent(prop, value); diff --git a/hsarweb/src/de/hsadmin/web/vaadin/PasswordPropertyFieldFactory.java b/hsarweb/src/de/hsadmin/web/vaadin/PasswordPropertyFieldFactory.java index 7264273..e5ccbf3 100644 --- a/hsarweb/src/de/hsadmin/web/vaadin/PasswordPropertyFieldFactory.java +++ b/hsarweb/src/de/hsadmin/web/vaadin/PasswordPropertyFieldFactory.java @@ -13,8 +13,8 @@ import de.hsadmin.web.config.PropertyFieldFactory; public class PasswordPropertyFieldFactory implements PropertyFieldFactory { private Module module; - private boolean readOnly; - private boolean writeOnce; + private boolean readOnly = false; + private boolean writeOnce = false; public PasswordPropertyFieldFactory(Module module) { this.module = module; diff --git a/hsarweb/src/de/hsadmin/web/vaadin/SelectPropertyFieldFactory.java b/hsarweb/src/de/hsadmin/web/vaadin/SelectPropertyFieldFactory.java index a901388..446b61f 100644 --- a/hsarweb/src/de/hsadmin/web/vaadin/SelectPropertyFieldFactory.java +++ b/hsarweb/src/de/hsadmin/web/vaadin/SelectPropertyFieldFactory.java @@ -11,8 +11,8 @@ import de.hsadmin.web.config.PropertyFieldFactory; public class SelectPropertyFieldFactory implements PropertyFieldFactory { - private boolean readOnly; - private boolean writeOnce; + private boolean readOnly = false; + private boolean writeOnce = false; @Override public Object createFieldComponent(PropertyConfig prop, Object value) { diff --git a/hsarweb/src/de/hsadmin/web/vaadin/TableComponentFactory.java b/hsarweb/src/de/hsadmin/web/vaadin/TableComponentFactory.java index ae16bde..9b46fe0 100644 --- a/hsarweb/src/de/hsadmin/web/vaadin/TableComponentFactory.java +++ b/hsarweb/src/de/hsadmin/web/vaadin/TableComponentFactory.java @@ -173,6 +173,7 @@ public class TableComponentFactory implements ComponentFactory, Serializable { final Button button = new Button(); final Module thisModule = module; button.setIcon(icon); + button.setDescription(module.getApplication().getLocaleConfig().getText("update")); button.setData(id); button.setStyleName(BaseTheme.BUTTON_LINK); button.addListener(new Button.ClickListener() { @@ -230,6 +231,7 @@ public class TableComponentFactory implements ComponentFactory, Serializable { ThemeResource icon = new ThemeResource("../runo/icons/16/document-delete.png"); final Button button = new Button(); button.setIcon(icon); + button.setDescription(module.getApplication().getLocaleConfig().getText("delete")); button.setData(id); button.setStyleName(BaseTheme.BUTTON_LINK); button.addListener(new Button.ClickListener() { diff --git a/hsarweb/src/texts/main.properties b/hsarweb/src/texts/main.properties index 8b43bfa..8d1c4cf 100644 --- a/hsarweb/src/texts/main.properties +++ b/hsarweb/src/texts/main.properties @@ -5,9 +5,6 @@ confirmdelete=confirm delete save=save abort=abort new=new -impressum.label=Published by -impressum.link=https://www.hostsharing.net/impressum -logo.link=https://www.hostsharing.net/logo.png modules.NONE=de.hsadmin.web.HomeModule modules.USER=de.hsadmin.web.HomeModule modules.DOM_ADMIN=de.hsadmin.web.DomainReadonlyModule,de.hsadmin.web.EMailAddressModule,de.hsadmin.web.HomeModule diff --git a/hsarweb/src/texts/main_de.properties b/hsarweb/src/texts/main_de.properties index 7e2fa73..25e3e77 100644 --- a/hsarweb/src/texts/main_de.properties +++ b/hsarweb/src/texts/main_de.properties @@ -5,6 +5,3 @@ confirmdelete=Diesen Eintrag l save=speichern abort=abbrechen new=Eintrag anlegen -impressum.label=Impressum -impressum.link=https://www.hostsharing.net/impressum -logo.link=https://www.hostsharing.net/logo.png