@@ -53,17 +53,17 @@ public class SoftwareModuleTableHeader extends AbstractTableHeader {
|
||||
|
||||
@Override
|
||||
protected String getHeaderCaption() {
|
||||
return softwareHeaderCaption;
|
||||
return i18n.get("upload.swModuleTable.header");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getSearchBoxId() {
|
||||
return softwareSerachBoxId;
|
||||
return SPUIComponentIdProvider.SW_MODULE_SEARCH_TEXT_FIELD;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getSearchRestIconId() {
|
||||
return softwareSearchResetIcon;
|
||||
return SPUIComponentIdProvider.SW_MODULE_SEARCH_RESET_ICON;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -19,7 +19,6 @@ import org.eclipse.hawkbit.ui.components.SPUIComponentProvider;
|
||||
import org.eclipse.hawkbit.ui.decorators.SPUIButtonStyleSmallNoBorder;
|
||||
import org.eclipse.hawkbit.ui.utils.HawkbitCommonUtil;
|
||||
import org.eclipse.hawkbit.ui.utils.I18N;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUIComponentIdProvider;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUIDefinitions;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUIStyleDefinitions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -69,13 +68,6 @@ public abstract class AbstractTableHeader extends VerticalLayout {
|
||||
|
||||
private Button bulkUploadIcon;
|
||||
|
||||
protected String distributionHeaderCaption;
|
||||
protected String softwareHeaderCaption;
|
||||
protected String distributionSearchBoxId;
|
||||
protected String softwareSerachBoxId;
|
||||
protected String distributionSearchResetIcon;
|
||||
protected String softwareSearchResetIcon;
|
||||
|
||||
/**
|
||||
* Initialze components.
|
||||
*/
|
||||
@@ -93,12 +85,6 @@ public abstract class AbstractTableHeader extends VerticalLayout {
|
||||
}
|
||||
|
||||
private void createComponents() {
|
||||
distributionHeaderCaption = i18n.get("header.dist.table");
|
||||
softwareHeaderCaption = i18n.get("upload.swModuleTable.header");
|
||||
distributionSearchBoxId = SPUIComponentIdProvider.DIST_SEARCH_TEXTFIELD;
|
||||
softwareSerachBoxId = SPUIComponentIdProvider.SW_MODULE_SEARCH_TEXT_FIELD;
|
||||
distributionSearchResetIcon = SPUIComponentIdProvider.DIST_SEARCH_ICON;
|
||||
softwareSearchResetIcon = SPUIComponentIdProvider.SW_MODULE_SEARCH_RESET_ICON;
|
||||
headerCaption = createHeaderCaption();
|
||||
searchField = new TextFieldBuilder(getSearchBoxId()).createSearchField(event -> searchBy(event.getText()));
|
||||
|
||||
|
||||
@@ -52,17 +52,17 @@ public class DistributionSetTableHeader extends AbstractTableHeader {
|
||||
|
||||
@Override
|
||||
protected String getHeaderCaption() {
|
||||
return distributionHeaderCaption;
|
||||
return i18n.get("header.dist.table");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getSearchBoxId() {
|
||||
return distributionSearchBoxId;
|
||||
return SPUIComponentIdProvider.DIST_SEARCH_TEXTFIELD;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getSearchRestIconId() {
|
||||
return distributionSearchResetIcon;
|
||||
return SPUIComponentIdProvider.DIST_SEARCH_ICON;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -52,17 +52,17 @@ public class SwModuleTableHeader extends AbstractTableHeader {
|
||||
|
||||
@Override
|
||||
protected String getHeaderCaption() {
|
||||
return softwareHeaderCaption;
|
||||
return i18n.get("upload.swModuleTable.header");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getSearchBoxId() {
|
||||
return softwareSerachBoxId;
|
||||
return SPUIComponentIdProvider.SW_MODULE_SEARCH_TEXT_FIELD;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getSearchRestIconId() {
|
||||
return softwareSearchResetIcon;
|
||||
return SPUIComponentIdProvider.SW_MODULE_SEARCH_RESET_ICON;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -21,12 +21,10 @@ import com.vaadin.data.Property.ValueChangeEvent;
|
||||
import com.vaadin.server.Page;
|
||||
import com.vaadin.shared.ui.colorpicker.Color;
|
||||
import com.vaadin.ui.Button;
|
||||
import com.vaadin.ui.OptionGroup;
|
||||
import com.vaadin.ui.TextArea;
|
||||
import com.vaadin.ui.TextField;
|
||||
import com.vaadin.ui.components.colorpicker.ColorChangeEvent;
|
||||
import com.vaadin.ui.components.colorpicker.ColorSelector;
|
||||
import com.vaadin.ui.themes.ValoTheme;
|
||||
|
||||
/**
|
||||
* Superclass defining common properties and methods for creating/updating
|
||||
@@ -187,27 +185,6 @@ public abstract class CreateUpdateTypeLayout<E extends NamedEntity> extends Abst
|
||||
typeKey.addStyleName(SPUIDefinitions.TYPE_KEY);
|
||||
}
|
||||
|
||||
/**
|
||||
* create option group with Create tag/Update tag based on permissions.
|
||||
*/
|
||||
@Override
|
||||
protected void createOptionGroup(final boolean hasCreatePermission, final boolean hasUpdatePermission) {
|
||||
|
||||
optiongroup = new OptionGroup("Select Action");
|
||||
optiongroup.setId(SPUIComponentIdProvider.OPTION_GROUP);
|
||||
optiongroup.addStyleName(ValoTheme.OPTIONGROUP_SMALL);
|
||||
optiongroup.addStyleName("custom-option-group");
|
||||
optiongroup.setNullSelectionAllowed(false);
|
||||
|
||||
if (hasCreatePermission) {
|
||||
optiongroup.addItem(createTagStr);
|
||||
}
|
||||
if (hasUpdatePermission) {
|
||||
optiongroup.addItem(updateTagStr);
|
||||
}
|
||||
setOptionGroupDefaultValue(hasCreatePermission, hasUpdatePermission);
|
||||
}
|
||||
|
||||
protected void setColorPickerComponentsColor(final String color) {
|
||||
|
||||
if (null == color) {
|
||||
|
||||
@@ -54,17 +54,17 @@ public class DistributionTableHeader extends AbstractTableHeader {
|
||||
|
||||
@Override
|
||||
protected String getHeaderCaption() {
|
||||
return distributionHeaderCaption;
|
||||
return i18n.get("header.dist.table");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getSearchBoxId() {
|
||||
return distributionSearchBoxId;
|
||||
return SPUIComponentIdProvider.DIST_SEARCH_TEXTFIELD;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getSearchRestIconId() {
|
||||
return distributionSearchResetIcon;
|
||||
return SPUIComponentIdProvider.DIST_SEARCH_ICON;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user