Skip to content

Commit

Permalink
Improved Resourcetype app
Browse files Browse the repository at this point in the history
  • Loading branch information
sHuewe committed Mar 28, 2019
1 parent 398f039 commit 5b2d5a7
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1338,6 +1338,7 @@ GUI_RESOURCETYPE_EDIT_DISPLAY_TITLE_HELP_0=Der Titel des Ressource-Typs in der S
GUI_RESOURCETYPE_EDIT_DISPLAY_DESCRIPTION_0=Beschreibung
GUI_RESOURCETYPE_EDIT_DISPLAY_DESCRIPTION_HELP_0=Die Beschreibung des Ressource-Typs in der Standardsprache.
GUI_RESOURCETYPE_EDIT_PARENT_SCHEMA_0=Elternordner für Schema
GUI_RESOURCETYPE_EDIT_PARENT_SCHEMA_DESCRIPTION_0=Die neue Schema Datei, wird in diesem Ordner angelegt
GUI_RESOURCETYPE_EDIT_PARENT_SCHEMA_HELP_0=Der Elternordner, in dem die Schema-Definition angelegt wird.
GUI_RESOURCETYPE_EDIT_PARENT_FORMATTER_0=Elternordner für Formatter
GUI_RESOURCETYPE_EDIT_PARENT_FORMATTER_HELP_0=Der Elternordner, in dem der Formatter angelegt wird.
Expand Down
3 changes: 3 additions & 0 deletions src/org/opencms/ui/apps/Messages.java
Original file line number Diff line number Diff line change
Expand Up @@ -2078,6 +2078,9 @@ public final class Messages extends A_CmsMessageBundle {
/** Message constant for key in the resource bundle. */
public static final String GUI_RESOURCETYPE_EDIT_PARENT_SCHEMA_0 = "GUI_RESOURCETYPE_EDIT_PARENT_SCHEMA_0";

/** Message constant for key in the resource bundle. */
public static final String GUI_RESOURCETYPE_EDIT_PARENT_SCHEMA_DESCRIPTION_0 = "GUI_RESOURCETYPE_EDIT_PARENT_SCHEMA_DESCRIPTION_0";

/** Message constant for key in the resource bundle. */
public static final String GUI_RESOURCETYPE_EDIT_PARENT_SCHEMA_HELP_0 = "GUI_RESOURCETYPE_EDIT_PARENT_SCHEMA_HELP_0";

Expand Down
3 changes: 2 additions & 1 deletion src/org/opencms/ui/apps/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1321,7 +1321,7 @@ GUI_RESOURCETYPE_DELETE_CONFIRM_LONG_0=Are you sure you want to delete the selec
GUI_RESOURCETYPE_DELETE_0=Delete resource type
GUI_RESOURCETYPE_EDIT_0=Edit resource type
GUI_RESOURCETYPE_EDIT_NOT_EMPTY_0=This field must not be empty.
GUI_RESOURCETYPE_EDIT_BUNDLE_0=Message Bundle
GUI_RESOURCETYPE_EDIT_BUNDLE_0=Message bundle
GUI_RESOURCETYPE_EDIT_BUNDLE_HELP_0=Message Bundle with keys for the name and description of the resource type.
GUI_RESOURCETYPE_EDIT_MODULE_CONFIG_0=Module config
GUI_RESOURCETYPE_EDIT_MODULE_CONFIG_HELP_0=The module configuration resource to add the created resource type to.
Expand Down Expand Up @@ -1352,6 +1352,7 @@ GUI_RESOURCETYPE_EDIT_DISPLAY_DESCRIPTION_KEY_HELP_0=The key for the localized d
GUI_RESOURCETYPE_EDIT_DISPLAY_DESCRIPTION_0=Description
GUI_RESOURCETYPE_EDIT_DISPLAY_DESCRIPTION_HELP_0=The description of the resource type in the default language.
GUI_RESOURCETYPE_EDIT_PARENT_SCHEMA_0=Parent folder of schema
GUI_RESOURCETYPE_EDIT_PARENT_SCHEMA_DESCRIPTION_0=The new schema will be created in this folder
GUI_RESOURCETYPE_EDIT_PARENT_SCHEMA_HELP_0=The parent of the schmema file to be created.
GUI_RESOURCETYPE_EDIT_PARENT_FORMATTER_0=Parent folder of formatter
GUI_RESOURCETYPE_EDIT_PARENT_FORMATTER_HELP_0=The parent folder of formatter to be created.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,12 @@ public CmsEditResourceTypeDialog(Window window, CmsResourceTypeApp app, I_CmsRes
m_typeID.setValue(String.valueOf(m_type.getTypeId()));
if (m_type instanceof CmsResourceTypeXmlContent) {
CmsResourceTypeXmlContent typeXML = (CmsResourceTypeXmlContent)m_type;
m_schema.setValue(typeXML.getSchema());
m_schema.addValidator(new ResourceValidator());
if (CmsStringUtil.isEmptyOrWhitespaceOnly(typeXML.getSchema())) {
m_schema.setVisible(false);
} else {
m_schema.setValue(typeXML.getSchema());
m_schema.addValidator(new ResourceValidator());
}
} else {
m_schema.setVisible(false);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -464,13 +464,13 @@ enum TableProperty {
Icon(null, Resource.class, null, false),

/**Icon column.*/
Name(Messages.GUI_RESOURCETYPE_NAME_0, String.class, "", false),
Name(Messages.GUI_RESOURCETYPE_EDIT_DISPLAY_NAME_0, String.class, "", false),

/**Icon column.*/
ShortName(Messages.GUI_RESOURCETYPE_SHORT_NAME_0, String.class, "", false),
ShortName(Messages.GUI_RESOURCETYPE_EDIT_SHORT_NAME_0, String.class, "", false),

/**Is Broadcast send but not displayed.*/
ID(Messages.GUI_RESOURCETYPE_ID_0, Integer.class, new Integer(0), false),
ID(Messages.GUI_RESOURCETYPE_ID_0, String.class, "", false),

/**Icon column.*/
Module(Messages.GUI_RESOURCETYPE_MODULE_0, String.class, "", false);
Expand Down Expand Up @@ -681,7 +681,7 @@ void init() {
CmsExplorerTypeSettings typeSetting = OpenCms.getWorkplaceManager().getExplorerTypeSetting(
type.getTypeName());
Item item = m_container.addItem(type.getTypeName());
item.getItemProperty(TableProperty.ID).setValue(type.getTypeId());
item.getItemProperty(TableProperty.ID).setValue(String.valueOf(type.getTypeId()));
item.getItemProperty(TableProperty.Icon).setValue(CmsResourceUtil.getBigIconResource(typeSetting, null));
item.getItemProperty(TableProperty.Name).setValue(CmsVaadinUtils.getMessageText(typeSetting.getKey()));
item.getItemProperty(TableProperty.ShortName).setValue(type.getTypeName());
Expand Down

0 comments on commit 5b2d5a7

Please sign in to comment.