parent
2299ec4a87
commit
b974a2521a
@ -33,14 +33,14 @@ public class CustomerPanel extends CustomComponent implements IHSPanel, Selected
|
|||||||
tabsheet.setSizeFull();
|
tabsheet.setSizeFull();
|
||||||
tabsheet.addSelectedTabChangeListener(this);
|
tabsheet.addSelectedTabChangeListener(this);
|
||||||
tabsheet.addSelectedTabChangeListener(this);
|
tabsheet.addSelectedTabChangeListener(this);
|
||||||
tabsheet.addTab(new GenericForm("customer", session, itemId, "name"), I18N.getText("customer", getLocale()));
|
tabsheet.addTab(new GenericForm("customer", session, itemId, "name"), I18N.getText("customer"));
|
||||||
final HSTab usersTab = new HSTab("contact", session, "customer", itemId, "email");
|
final HSTab usersTab = new HSTab("contact", session, "customer", itemId, "email");
|
||||||
usersTab.fillTable();
|
usersTab.fillTable();
|
||||||
tabsheet.addTab(usersTab, I18N.getText("contact", getLocale()));
|
tabsheet.addTab(usersTab, I18N.getText("contact"));
|
||||||
HSTab aliasTab = new HSTab("mandat", session, "customer", itemId, "mandatRef");
|
HSTab aliasTab = new HSTab("mandat", session, "customer", itemId, "mandatRef");
|
||||||
tabsheet.addTab(aliasTab, I18N.getText("mandat", getLocale()));
|
tabsheet.addTab(aliasTab, I18N.getText("mandat"));
|
||||||
HSTab pacTab = new HSTab("pac", session, "customer", itemId, "name");
|
HSTab pacTab = new HSTab("pac", session, "customer", itemId, "name");
|
||||||
tabsheet.addTab(pacTab, I18N.getText("pac", getLocale()));
|
tabsheet.addTab(pacTab, I18N.getText("pac"));
|
||||||
return tabsheet;
|
return tabsheet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,14 +27,14 @@ public class DomainOptionsEditor extends CustomComponent implements IHSEditor {
|
|||||||
public DomainOptionsEditor(final PropertyInfo propertyInfo, final HSAdminSession session, final Map<String, String> whereContext) {
|
public DomainOptionsEditor(final PropertyInfo propertyInfo, final HSAdminSession session, final Map<String, String> whereContext) {
|
||||||
this.checkboxes = new HashMap<>();
|
this.checkboxes = new HashMap<>();
|
||||||
this.propertyInfo = propertyInfo;
|
this.propertyInfo = propertyInfo;
|
||||||
this.setCaption(I18N.getText(propertyInfo.getName(), getLocale()));
|
this.setCaption(I18N.getText(propertyInfo.getName()));
|
||||||
layout = new VerticalLayout();
|
layout = new VerticalLayout();
|
||||||
for (String opt : OPTIONS) {
|
for (String opt : OPTIONS) {
|
||||||
final CheckBox checkBox = new CheckBox(I18N.getText("domainoption." + opt, getLocale()));
|
final CheckBox checkBox = new CheckBox(I18N.getText("domainoption." + opt));
|
||||||
checkboxes.put(opt, checkBox);
|
checkboxes.put(opt, checkBox);
|
||||||
layout.addComponent(checkBox);
|
layout.addComponent(checkBox);
|
||||||
}
|
}
|
||||||
layout.setCaption(I18N.getText(propertyInfo.getName(), getLocale()));
|
layout.setCaption(I18N.getText(propertyInfo.getName()));
|
||||||
setCompositionRoot(layout);
|
setCompositionRoot(layout);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,10 +30,10 @@ public class DomainPanel extends CustomComponent implements IHSPanel, SelectedTa
|
|||||||
public TabSheet createTabs(Object itemId) throws RpcException
|
public TabSheet createTabs(Object itemId) throws RpcException
|
||||||
{
|
{
|
||||||
final TabSheet tabsheet = new TabSheet();
|
final TabSheet tabsheet = new TabSheet();
|
||||||
tabsheet.addTab(new GenericForm("domain", session, itemId, "name"), I18N.getText("domain", getLocale()));
|
tabsheet.addTab(new GenericForm("domain", session, itemId, "name"), I18N.getText("domain"));
|
||||||
HSTab emailTab = new HSTab("emailaddress", session, "domain", itemId, "id");
|
HSTab emailTab = new HSTab("emailaddress", session, "domain", itemId, "id");
|
||||||
emailTab.fillTable();
|
emailTab.fillTable();
|
||||||
tabsheet.addTab(emailTab, I18N.getText("emailaddress", getLocale()));
|
tabsheet.addTab(emailTab, I18N.getText("emailaddress"));
|
||||||
return tabsheet;
|
return tabsheet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,12 +44,12 @@ public class EMailTargetEditor extends CustomComponent implements IHSEditor, Val
|
|||||||
this.isEditAble = PanelToolbar.ACTION_EDIT.equals(action) || PanelToolbar.ACTION_NEW.equals(action);
|
this.isEditAble = PanelToolbar.ACTION_EDIT.equals(action) || PanelToolbar.ACTION_NEW.equals(action);
|
||||||
this.propertyInfo = propertyInfo;
|
this.propertyInfo = propertyInfo;
|
||||||
this.validators = new ArrayList<>();
|
this.validators = new ArrayList<>();
|
||||||
this.setCaption(I18N.getText(propertyInfo.getName(), getLocale()));
|
this.setCaption(I18N.getText(propertyInfo.getName()));
|
||||||
this.aliases = targetsSelect("emailalias", session, whereContext);
|
this.aliases = targetsSelect("emailalias", session, whereContext);
|
||||||
this.postboxes = targetsSelect("user", session, whereContext);
|
this.postboxes = targetsSelect("user", session, whereContext);
|
||||||
postboxes.removeAll(aliases);
|
postboxes.removeAll(aliases);
|
||||||
layout = new VerticalLayout();
|
layout = new VerticalLayout();
|
||||||
layout.setCaption(I18N.getText(propertyInfo.getName(), getLocale()));
|
layout.setCaption(I18N.getText(propertyInfo.getName()));
|
||||||
setCompositionRoot(layout);
|
setCompositionRoot(layout);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -175,7 +175,7 @@ public class EMailTargetEditor extends CustomComponent implements IHSEditor, Val
|
|||||||
targetTypeSelect.setMultiSelect(false);
|
targetTypeSelect.setMultiSelect(false);
|
||||||
targetTypeSelect.setNullSelectionAllowed(true);
|
targetTypeSelect.setNullSelectionAllowed(true);
|
||||||
targetTypeSelect.setNullSelectionItemId(" ");
|
targetTypeSelect.setNullSelectionItemId(" ");
|
||||||
targetTypeSelect.addItems(new Object[] { " ", I18N.getText("emailtarget.email", getLocale()), I18N.getText("emailtarget.postbox", getLocale()), I18N.getText("emailtarget.alias", getLocale()) });
|
targetTypeSelect.addItems(new Object[] { " ", I18N.getText("emailtarget.email"), I18N.getText("emailtarget.postbox"), I18N.getText("emailtarget.alias") });
|
||||||
targetTypeSelect.setValue(" ");
|
targetTypeSelect.setValue(" ");
|
||||||
targetTypeSelect.setWidth("6.0em");
|
targetTypeSelect.setWidth("6.0em");
|
||||||
addComponent(targetTypeSelect);
|
addComponent(targetTypeSelect);
|
||||||
@ -184,7 +184,7 @@ public class EMailTargetEditor extends CustomComponent implements IHSEditor, Val
|
|||||||
AbstractComponent targetField = null;
|
AbstractComponent targetField = null;
|
||||||
NativeSelect sel = null;
|
NativeSelect sel = null;
|
||||||
if (aliases.contains(target)) {
|
if (aliases.contains(target)) {
|
||||||
targetTypeSelect.setValue(I18N.getText("emailtarget.alias", getLocale()));
|
targetTypeSelect.setValue(I18N.getText("emailtarget.alias"));
|
||||||
sel = new NativeSelect();
|
sel = new NativeSelect();
|
||||||
sel.addItems(aliases);
|
sel.addItems(aliases);
|
||||||
sel.setValue(target);
|
sel.setValue(target);
|
||||||
@ -193,7 +193,7 @@ public class EMailTargetEditor extends CustomComponent implements IHSEditor, Val
|
|||||||
targetField = sel;
|
targetField = sel;
|
||||||
} else {
|
} else {
|
||||||
if (postboxes.contains(target)) {
|
if (postboxes.contains(target)) {
|
||||||
targetTypeSelect.setValue(I18N.getText("emailtarget.postbox", getLocale()));
|
targetTypeSelect.setValue(I18N.getText("emailtarget.postbox"));
|
||||||
sel = new NativeSelect();
|
sel = new NativeSelect();
|
||||||
sel.addItems(postboxes);
|
sel.addItems(postboxes);
|
||||||
sel.setValue(target);
|
sel.setValue(target);
|
||||||
@ -201,7 +201,7 @@ public class EMailTargetEditor extends CustomComponent implements IHSEditor, Val
|
|||||||
sel.setEnabled(isEditAble);
|
sel.setEnabled(isEditAble);
|
||||||
targetField = sel;
|
targetField = sel;
|
||||||
} else {
|
} else {
|
||||||
targetTypeSelect.setValue(I18N.getText("emailtarget.email", getLocale()));
|
targetTypeSelect.setValue(I18N.getText("emailtarget.email"));
|
||||||
targetField = new TextField();
|
targetField = new TextField();
|
||||||
targetField.setEnabled(isEditAble);
|
targetField.setEnabled(isEditAble);
|
||||||
((TextField) targetField).setValue(target);
|
((TextField) targetField).setValue(target);
|
||||||
@ -229,16 +229,16 @@ public class EMailTargetEditor extends CustomComponent implements IHSEditor, Val
|
|||||||
final String newValue = newValueObject.toString();
|
final String newValue = newValueObject.toString();
|
||||||
if (targetRow.getComponentCount() == 1) {
|
if (targetRow.getComponentCount() == 1) {
|
||||||
AbstractComponent comp = null;
|
AbstractComponent comp = null;
|
||||||
if (I18N.getText("emailtarget.email", getLocale()).equals(newValue)) {
|
if (I18N.getText("emailtarget.email").equals(newValue)) {
|
||||||
final TextField textField = new TextField();
|
final TextField textField = new TextField();
|
||||||
textField.addValueChangeListener(editor);
|
textField.addValueChangeListener(editor);
|
||||||
textField.setImmediate(true);
|
textField.setImmediate(true);
|
||||||
textField.setEnabled(isEditAble);
|
textField.setEnabled(isEditAble);
|
||||||
comp = textField;
|
comp = textField;
|
||||||
} else {
|
} else {
|
||||||
if (I18N.getText("emailtarget.alias", getLocale()).equals(newValue) || I18N.getText("emailtarget.postbox", getLocale()).equals(newValue)) {
|
if (I18N.getText("emailtarget.alias").equals(newValue) || I18N.getText("emailtarget.postbox").equals(newValue)) {
|
||||||
final NativeSelect select = new NativeSelect();
|
final NativeSelect select = new NativeSelect();
|
||||||
if (I18N.getText("emailtarget.alias", getLocale()).equals(newValue)) {
|
if (I18N.getText("emailtarget.alias").equals(newValue)) {
|
||||||
select.addItems(aliases);
|
select.addItems(aliases);
|
||||||
} else {
|
} else {
|
||||||
select.addItems(postboxes);
|
select.addItems(postboxes);
|
||||||
|
@ -45,7 +45,7 @@ public class EntryPointsSelector extends CustomComponent implements ItemClickLis
|
|||||||
final AbstractEntryPointsFactory entryPointsFactory = FactoryProducer.getEntryPointsFactory(mainWindow, "default");
|
final AbstractEntryPointsFactory entryPointsFactory = FactoryProducer.getEntryPointsFactory(mainWindow, "default");
|
||||||
int tabCount = 0;
|
int tabCount = 0;
|
||||||
for(String tabName : entryPointsFactory.getEntryPointNames(role)) {
|
for(String tabName : entryPointsFactory.getEntryPointNames(role)) {
|
||||||
accordion.addTab(new EntryPoint(this, tabName), I18N.getText(tabName, getLocale()));
|
accordion.addTab(new EntryPoint(this, tabName), I18N.getText(tabName));
|
||||||
tabCount++;
|
tabCount++;
|
||||||
}
|
}
|
||||||
if (tabCount > 0) {
|
if (tabCount > 0) {
|
||||||
|
@ -2,7 +2,6 @@ package de.hsadmin.web;
|
|||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.Locale;
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
@ -25,9 +24,7 @@ public class GenericFormWindow extends Window implements IHSWindow {
|
|||||||
|
|
||||||
public GenericFormWindow(final HSTab parent, final String module, final String action, final HSAdminSession session, final Map<String, String> whereContext)
|
public GenericFormWindow(final HSTab parent, final String module, final String action, final HSAdminSession session, final Map<String, String> whereContext)
|
||||||
{
|
{
|
||||||
super();
|
super(I18N.getText(action) + " " + I18N.getText(module));
|
||||||
final Locale locale = getLocale();
|
|
||||||
setCaption(I18N.getText(action, locale) + " " + I18N.getText(module, locale));
|
|
||||||
this.parent = parent;
|
this.parent = parent;
|
||||||
center();
|
center();
|
||||||
setModal(true);
|
setModal(true);
|
||||||
|
@ -85,7 +85,7 @@ public class HSConfirmBox extends HorizontalLayout {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
cancelButton = new Button(I18N.getText("cancel", getLocale()));
|
cancelButton = new Button(I18N.getText("cancel"));
|
||||||
cancelButton.setClickShortcut(KeyCode.ESCAPE);
|
cancelButton.setClickShortcut(KeyCode.ESCAPE);
|
||||||
cancelButton.addClickListener(new ClickListener()
|
cancelButton.addClickListener(new ClickListener()
|
||||||
{
|
{
|
||||||
|
@ -9,8 +9,7 @@ public class HSPasswordField extends PasswordField implements IHSEditor {
|
|||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
public HSPasswordField(final String name, final boolean passwordRequired) {
|
public HSPasswordField(final String name, final boolean passwordRequired) {
|
||||||
super();
|
super(I18N.getText(name));
|
||||||
setCaption(I18N.getText(name, getLocale()));
|
|
||||||
addValidator(new PasswordValidator(passwordRequired));
|
addValidator(new PasswordValidator(passwordRequired));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,8 +16,7 @@ public class HSSelect extends NativeSelect implements IHSEditor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public HSSelect(final String label, final int defaultIndex, final List<String> values) {
|
public HSSelect(final String label, final int defaultIndex, final List<String> values) {
|
||||||
super();
|
super(I18N.getText(label));
|
||||||
setCaption(I18N.getText(label, getLocale()));
|
|
||||||
this.propertyName = label;
|
this.propertyName = label;
|
||||||
super.addItems(values);
|
super.addItems(values);
|
||||||
if (values != null && values.size() > defaultIndex) {
|
if (values != null && values.size() > defaultIndex) {
|
||||||
|
@ -149,7 +149,7 @@ public class HSTab extends CustomComponent {
|
|||||||
while (properties.hasNext()) {
|
while (properties.hasNext()) {
|
||||||
final PropertyInfo propertyInfo = properties.next();
|
final PropertyInfo propertyInfo = properties.next();
|
||||||
if (showColumnInTable(propertyInfo)) {
|
if (showColumnInTable(propertyInfo)) {
|
||||||
grid.addContainerProperty(I18N.getText(propertyInfo.getModule() + "." + propertyInfo.getName(), getLocale()), String.class, "");
|
grid.addContainerProperty(I18N.getText(propertyInfo.getModule() + "." + propertyInfo.getName()), String.class, "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
grid.setSelectable(true);
|
grid.setSelectable(true);
|
||||||
|
@ -11,8 +11,7 @@ public class HSTextField extends TextField implements IHSEditor {
|
|||||||
private final String propertyName;
|
private final String propertyName;
|
||||||
|
|
||||||
public HSTextField(final String name) {
|
public HSTextField(final String name) {
|
||||||
super();
|
super(I18N.getText(name));
|
||||||
setCaption(I18N.getText(name, getLocale()));
|
|
||||||
this.propertyName = name;
|
this.propertyName = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ public class HelpWindow extends Window {
|
|||||||
final VerticalLayout subContent = new VerticalLayout();
|
final VerticalLayout subContent = new VerticalLayout();
|
||||||
subContent.setMargin(true);
|
subContent.setMargin(true);
|
||||||
subContent.setSizeFull();
|
subContent.setSizeFull();
|
||||||
final String helpBaseURL = I18N.getText("help.baseurl", getLocale());
|
final String helpBaseURL = I18N.getText("help.baseurl");
|
||||||
final Component helpContent = new BrowserFrame("Help Window", new ExternalResource(helpBaseURL + helpTopic));
|
final Component helpContent = new BrowserFrame("Help Window", new ExternalResource(helpBaseURL + helpTopic));
|
||||||
helpContent.setSizeFull();
|
helpContent.setSizeFull();
|
||||||
subContent.addComponent(helpContent);
|
subContent.addComponent(helpContent);
|
||||||
|
@ -1,21 +1,16 @@
|
|||||||
package de.hsadmin.web;
|
package de.hsadmin.web;
|
||||||
|
|
||||||
import java.util.Locale;
|
|
||||||
import java.util.MissingResourceException;
|
import java.util.MissingResourceException;
|
||||||
import java.util.ResourceBundle;
|
import java.util.ResourceBundle;
|
||||||
|
|
||||||
public class I18N {
|
public class I18N {
|
||||||
|
|
||||||
private static final ResourceBundle TEXTS_DE = ResourceBundle.getBundle("de.hsadmin.web.main", Locale.GERMAN);
|
private static final ResourceBundle TEXTS = ResourceBundle.getBundle("de.hsadmin.web.main");
|
||||||
private static final ResourceBundle TEXTS_EN = ResourceBundle.getBundle("de.hsadmin.web.main", Locale.ENGLISH);
|
|
||||||
|
|
||||||
public static String getText(final String textProperty, final Locale loc) {
|
public static String getText(final String textProperty) {
|
||||||
String textValue;
|
String textValue;
|
||||||
try{
|
try{
|
||||||
textValue = I18N.TEXTS_EN.getString(textProperty);
|
textValue = I18N.TEXTS.getString(textProperty);
|
||||||
if (loc.getLanguage().equals(Locale.GERMAN.getLanguage())) {
|
|
||||||
textValue = I18N.TEXTS_DE.getString(textProperty);
|
|
||||||
}
|
|
||||||
}catch(MissingResourceException e){
|
}catch(MissingResourceException e){
|
||||||
textValue = "./. " + textProperty;
|
textValue = "./. " + textProperty;
|
||||||
}
|
}
|
||||||
|
@ -27,8 +27,7 @@ public class LoginWindow extends Window {
|
|||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
public LoginWindow(final HSAdminUI parent, final TicketService ticketService) {
|
public LoginWindow(final HSAdminUI parent, final TicketService ticketService) {
|
||||||
super();
|
super(I18N.getText("login.title"));
|
||||||
setCaption(I18N.getText("login.title", getLocale()));
|
|
||||||
center();
|
center();
|
||||||
setModal(true);
|
setModal(true);
|
||||||
setWidth("480px");
|
setWidth("480px");
|
||||||
@ -36,11 +35,11 @@ public class LoginWindow extends Window {
|
|||||||
final FormLayout subContent = new FormLayout();
|
final FormLayout subContent = new FormLayout();
|
||||||
subContent.setMargin(true);
|
subContent.setMargin(true);
|
||||||
|
|
||||||
final TextField login = new TextField(I18N.getText("user.name", getLocale()));
|
final TextField login = new TextField(I18N.getText("user.name"));
|
||||||
login.setWidth("100%");
|
login.setWidth("100%");
|
||||||
subContent.addComponent(login);
|
subContent.addComponent(login);
|
||||||
login.focus();
|
login.focus();
|
||||||
final PasswordField password = new PasswordField(I18N.getText("password", getLocale()));
|
final PasswordField password = new PasswordField(I18N.getText("password"));
|
||||||
password.setWidth("100%");
|
password.setWidth("100%");
|
||||||
subContent.addComponent(password);
|
subContent.addComponent(password);
|
||||||
final Label feedback = new Label("");
|
final Label feedback = new Label("");
|
||||||
@ -49,7 +48,7 @@ public class LoginWindow extends Window {
|
|||||||
subContent.addComponent(feedback);
|
subContent.addComponent(feedback);
|
||||||
feedback.setStyleName(ValoTheme.LABEL_FAILURE);
|
feedback.setStyleName(ValoTheme.LABEL_FAILURE);
|
||||||
|
|
||||||
final Button okButton = new Button(I18N.getText("login.button", getLocale()));
|
final Button okButton = new Button(I18N.getText("login.button"));
|
||||||
okButton.setStyleName(ValoTheme.BUTTON_PRIMARY);
|
okButton.setStyleName(ValoTheme.BUTTON_PRIMARY);
|
||||||
okButton.setClickShortcut(KeyCode.ENTER);
|
okButton.setClickShortcut(KeyCode.ENTER);
|
||||||
okButton.addClickListener(new ClickListener()
|
okButton.addClickListener(new ClickListener()
|
||||||
@ -75,9 +74,9 @@ public class LoginWindow extends Window {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
final String user = credentials.get(I18N.getText("user.name", getLocale()));
|
final String user = credentials.get(I18N.getText("user.name"));
|
||||||
final String loginUser = user.length() == 3 ? "hsh00-" + user : user;
|
final String loginUser = user.length() == 3 ? "hsh00-" + user : user;
|
||||||
final String password = credentials.get(I18N.getText("password", getLocale()));
|
final String password = credentials.get(I18N.getText("password"));
|
||||||
final String grantingTicket = ticketService.getGrantingTicket(loginUser, password);
|
final String grantingTicket = ticketService.getGrantingTicket(loginUser, password);
|
||||||
if (grantingTicket != null && !grantingTicket.isEmpty()) {
|
if (grantingTicket != null && !grantingTicket.isEmpty()) {
|
||||||
feedback.setValue("successful login");
|
feedback.setValue("successful login");
|
||||||
@ -100,7 +99,7 @@ public class LoginWindow extends Window {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
subContent.addComponent(okButton);
|
subContent.addComponent(okButton);
|
||||||
final Link linkToOld = new Link(I18N.getText("main.panel.link_to_old", getLocale()), new ExternalResource("https://admin.hostsharing.net/hsarweb"));
|
final Link linkToOld = new Link(I18N.getText("main.panel.link_to_old"), new ExternalResource("https://admin.hostsharing.net/hsarweb"));
|
||||||
subContent.addComponent(linkToOld);
|
subContent.addComponent(linkToOld);
|
||||||
|
|
||||||
setContent(subContent);
|
setContent(subContent);
|
||||||
|
@ -10,8 +10,8 @@ public class MainPanel extends CustomComponent{
|
|||||||
private static final long serialVersionUID = -1085100738394404620L;
|
private static final long serialVersionUID = -1085100738394404620L;
|
||||||
|
|
||||||
public MainPanel() {
|
public MainPanel() {
|
||||||
final String helpBaseURL = I18N.getText("help.baseurl", getLocale());
|
final String helpBaseURL = I18N.getText("help.baseurl");
|
||||||
final Component helpContent = new BrowserFrame(I18N.getText("main.panel.title", getLocale()), new ExternalResource(helpBaseURL + "hsadmin"));
|
final Component helpContent = new BrowserFrame(I18N.getText("main.panel.title"), new ExternalResource(helpBaseURL + "hsadmin"));
|
||||||
helpContent.setSizeFull();
|
helpContent.setSizeFull();
|
||||||
setCompositionRoot(helpContent);
|
setCompositionRoot(helpContent);
|
||||||
setSizeFull();
|
setSizeFull();
|
||||||
|
@ -52,7 +52,7 @@ public class MainToolbar extends CustomComponent implements ClickListener {
|
|||||||
final Button btn = new Button();
|
final Button btn = new Button();
|
||||||
btn.setId(name + "-btn");
|
btn.setId(name + "-btn");
|
||||||
btn.setIcon(new ThemeResource("../icons/" + icon + "-icon.png"));
|
btn.setIcon(new ThemeResource("../icons/" + icon + "-icon.png"));
|
||||||
btn.setDescription(I18N.getText(name + ".tooltip", getLocale()));
|
btn.setDescription(I18N.getText(name + ".tooltip"));
|
||||||
btn.setStyleName("borderless");
|
btn.setStyleName("borderless");
|
||||||
btn.addClickListener(this);
|
btn.addClickListener(this);
|
||||||
return btn;
|
return btn;
|
||||||
|
@ -31,23 +31,23 @@ public class PackagePanel extends CustomComponent implements IHSPanel, SelectedT
|
|||||||
{
|
{
|
||||||
final TabSheet tabsheet = new TabSheet();
|
final TabSheet tabsheet = new TabSheet();
|
||||||
tabsheet.addSelectedTabChangeListener(this);
|
tabsheet.addSelectedTabChangeListener(this);
|
||||||
tabsheet.addTab(new GenericForm("pac", session, itemId, "name"), I18N.getText("pac", getLocale()));
|
tabsheet.addTab(new GenericForm("pac", session, itemId, "name"), I18N.getText("pac"));
|
||||||
final HSTab usersTab = new HSTab("user", session, "pac", itemId, "name");
|
final HSTab usersTab = new HSTab("user", session, "pac", itemId, "name");
|
||||||
usersTab.fillTable();
|
usersTab.fillTable();
|
||||||
tabsheet.addTab(usersTab, I18N.getText("user", getLocale()));
|
tabsheet.addTab(usersTab, I18N.getText("user"));
|
||||||
final HSTab aliasTab = new HSTab("emailalias", session, "pac", itemId, "name");
|
final HSTab aliasTab = new HSTab("emailalias", session, "pac", itemId, "name");
|
||||||
tabsheet.addTab(aliasTab, I18N.getText("emailalias", getLocale()));
|
tabsheet.addTab(aliasTab, I18N.getText("emailalias"));
|
||||||
final HSTab domainTab = new HSTab("domain", session, "pac", itemId, "name");
|
final HSTab domainTab = new HSTab("domain", session, "pac", itemId, "name");
|
||||||
tabsheet.addTab(domainTab, I18N.getText("domain", getLocale()));
|
tabsheet.addTab(domainTab, I18N.getText("domain"));
|
||||||
|
|
||||||
final HSTab mysqluserTab = new HSTab("mysqluser", session, "pac", itemId, "name");
|
final HSTab mysqluserTab = new HSTab("mysqluser", session, "pac", itemId, "name");
|
||||||
tabsheet.addTab(mysqluserTab, I18N.getText("mysqluser", getLocale()));
|
tabsheet.addTab(mysqluserTab, I18N.getText("mysqluser"));
|
||||||
final HSTab mysqldbTab = new HSTab("mysqldb", session, "pac", itemId, "name");
|
final HSTab mysqldbTab = new HSTab("mysqldb", session, "pac", itemId, "name");
|
||||||
tabsheet.addTab(mysqldbTab, I18N.getText("mysqldb", getLocale()));
|
tabsheet.addTab(mysqldbTab, I18N.getText("mysqldb"));
|
||||||
final HSTab postgresqluserTab = new HSTab("postgresqluser", session, "pac", itemId, "name");
|
final HSTab postgresqluserTab = new HSTab("postgresqluser", session, "pac", itemId, "name");
|
||||||
tabsheet.addTab(postgresqluserTab, I18N.getText("postgresqluser", getLocale()));
|
tabsheet.addTab(postgresqluserTab, I18N.getText("postgresqluser"));
|
||||||
final HSTab postgresqldbTab = new HSTab("postgresqldb", session, "pac", itemId, "name");
|
final HSTab postgresqldbTab = new HSTab("postgresqldb", session, "pac", itemId, "name");
|
||||||
tabsheet.addTab(postgresqldbTab, I18N.getText("postgresqldb", getLocale()));
|
tabsheet.addTab(postgresqldbTab, I18N.getText("postgresqldb"));
|
||||||
return tabsheet;
|
return tabsheet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ public class PanelToolbar extends HorizontalLayout implements ClickListener {
|
|||||||
if (image != null) {
|
if (image != null) {
|
||||||
btn.setIcon(new ThemeResource("../icons/" + image + "-icon.png"));
|
btn.setIcon(new ThemeResource("../icons/" + image + "-icon.png"));
|
||||||
}
|
}
|
||||||
btn.setDescription(I18N.getText(tooltip, getLocale()));
|
btn.setDescription(I18N.getText(tooltip));
|
||||||
btn.setStyleName("borderless");
|
btn.setStyleName("borderless");
|
||||||
btn.addClickListener(this);
|
btn.addClickListener(this);
|
||||||
return btn;
|
return btn;
|
||||||
@ -88,7 +88,7 @@ public class PanelToolbar extends HorizontalLayout implements ClickListener {
|
|||||||
final Object value = parent.getSelection();
|
final Object value = parent.getSelection();
|
||||||
if (value == null) {
|
if (value == null) {
|
||||||
if (ACTION_EDIT.equals(action) || ACTION_DELETE.equals(action)) {
|
if (ACTION_EDIT.equals(action) || ACTION_DELETE.equals(action)) {
|
||||||
UI.getCurrent().addWindow(new InfoWindow(I18N.getText("emptySelectionMessage", getLocale()) + " " + action));
|
UI.getCurrent().addWindow(new InfoWindow(I18N.getText("emptySelectionMessage") + " " + action));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,6 @@ import java.util.Collection;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Locale;
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
@ -29,9 +28,7 @@ public class UserProfileWindow extends Window implements IHSWindow {
|
|||||||
|
|
||||||
public UserProfileWindow(final HSAdminSession session, final Map<String, String> whereContext)
|
public UserProfileWindow(final HSAdminSession session, final Map<String, String> whereContext)
|
||||||
{
|
{
|
||||||
super();
|
super(I18N.getText("edit") + " " + I18N.getText("user"));
|
||||||
final Locale locale = getLocale();
|
|
||||||
setCaption(I18N.getText("edit", locale) + " " + I18N.getText("user", locale));
|
|
||||||
center();
|
center();
|
||||||
setModal(true);
|
setModal(true);
|
||||||
setWidth("640px");
|
setWidth("640px");
|
||||||
|
Loading…
Reference in New Issue
Block a user