diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/Dict.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/Dict.java index c8748ef3baaf1438323256a5b0698c966109e72d..67a6d146aeb1bbf7e1ef84e1dad5b90c1da1fa38 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/Dict.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/Dict.java @@ -743,6 +743,16 @@ public abstract class Dict public static final String RESET_USER_SETTINGS_CONFIRMATION_MSG = "reset_user_settings_confirmation_msg"; + // + // Help Info + // + + public static final String INFO_BUTTON_TOOLTIP = "info_button_tooltip"; + + public static final String INFO_BOX_TITLE = "info_box_title"; + + public static final String INFO_BOX_MSG = "info_box_msg"; + // // Unclassified // diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/IGenericImageBundle.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/IGenericImageBundle.java index 3d7e211acd296be241d2c2c9ce4e22e2d83f8d7e..f08b1daf278ae295963e91fe6795f6d49e1e535d 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/IGenericImageBundle.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/IGenericImageBundle.java @@ -41,4 +41,10 @@ public interface IGenericImageBundle extends ClientBundle @Source("openBIS_logo_229x100.png") public ImageResource getOpenBISLogo(); + /** + * Returns info icon. + */ + @Source("info.png") + public ImageResource getInfoIcon(); + } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/help/HelpPageIdentifier.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/help/HelpPageIdentifier.java index d4f5ead11526ce90baaa65771b4f4c8fb00388f5..e059791cf6d6a3e65e01c96e33f2376996eda8ec 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/help/HelpPageIdentifier.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/help/HelpPageIdentifier.java @@ -64,7 +64,10 @@ public class HelpPageIdentifier USERS(AUTHORIZATION), ROLES(AUTHORIZATION), AUTHORIZATION_GROUPS(AUTHORIZATION), // other base domains - RELATED_DATA_SETS, ATTACHMENTS, CHANGE_USER_SETTINGS, CHANGE_COLUMN_SETTINGS; + RELATED_DATA_SETS, ATTACHMENTS, CHANGE_USER_SETTINGS, PERFORM_COMPUTATION, EXPORT_DATA, + + // table settings + TABLE_SETTINGS, CUSTOM_COLUMN(TABLE_SETTINGS), CUSTOM_FILTER(TABLE_SETTINGS); // could be used to create a hierarchy of help pages private HelpPageDomain superDomainOrNull; @@ -112,8 +115,7 @@ public class HelpPageIdentifier */ public static enum HelpPageAction { - BROWSE, VIEW, REGISTER, IMPORT, EDIT, BATCH_UPDATE, REPORT, SEARCH, ACTION, - CREATE_CUSTOM_FILTER, CREATE_CUSTOM_COLUMN, + BROWSE, VIEW, REGISTER, IMPORT, EDIT, DELETE, BATCH_UPDATE, REPORT, SEARCH, ACTION, } private HelpPageDomain domain; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/info.png b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/info.png new file mode 100644 index 0000000000000000000000000000000000000000..5650fa04d8a6af656f6ff7a42b50cba21de6744c Binary files /dev/null and b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/info.png differ diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/menu/InfoButton.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/menu/InfoButton.java new file mode 100644 index 0000000000000000000000000000000000000000..d6977a702c06403d3081ce459438956394727ca3 --- /dev/null +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/menu/InfoButton.java @@ -0,0 +1,31 @@ +package ch.systemsx.cisd.openbis.generic.client.web.client.application.menu; + +import com.extjs.gxt.ui.client.event.ButtonEvent; +import com.extjs.gxt.ui.client.event.SelectionListener; +import com.extjs.gxt.ui.client.widget.MessageBox; +import com.extjs.gxt.ui.client.widget.button.Button; +import com.google.gwt.user.client.ui.AbstractImagePrototype; + +import ch.systemsx.cisd.openbis.generic.client.web.client.application.CommonViewContext; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.Dict; + +/** {@link Button} displaying a {@link MessageBox} with a short help message. */ +public class InfoButton extends Button +{ + public InfoButton(final CommonViewContext viewContext) + { + setIcon(AbstractImagePrototype.create(viewContext.getImageBundle().getInfoIcon())); + setTitle(viewContext.getMessage(Dict.INFO_BUTTON_TOOLTIP)); + addSelectionListener(new SelectionListener<ButtonEvent>() + { + + @Override + public void componentSelected(ButtonEvent ce) + { + final String title = viewContext.getMessage(Dict.INFO_BOX_TITLE); + final String msg = viewContext.getMessage(Dict.INFO_BOX_MSG); + MessageBox.info(title, msg, null); + } + }); + } +} \ No newline at end of file diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/menu/TopMenu.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/menu/TopMenu.java index e40a3e026f3a379eb536357e473697021b8c7957..ea3e1c4e8771792e78b73ad5d42e199244fe9d8f 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/menu/TopMenu.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/menu/TopMenu.java @@ -122,6 +122,7 @@ public class TopMenu extends LayoutContainer toolBar.add(new FillToolItem()); toolBar.add(new SearchWidget(viewContext)); toolBar.add(new SeparatorToolItem()); + toolBar.add(new InfoButton(viewContext)); toolBar.add(new LoggedUserMenu(viewContext, componentProvider)); } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/amc/AddPersonDialog.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/amc/AddPersonDialog.java index 47f6f251392504347e35a84c174b36627e83a5ec..6a8ef1a04e60ebebaa15969d3c8c4e0b5cc6e447 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/amc/AddPersonDialog.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/amc/AddPersonDialog.java @@ -22,8 +22,10 @@ import com.google.gwt.user.client.rpc.AsyncCallback; import ch.systemsx.cisd.openbis.generic.client.web.client.ICommonClientServiceAsync; import ch.systemsx.cisd.openbis.generic.client.web.client.application.IViewContext; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.help.HelpPageIdentifier; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.field.CodeField.CodeFieldKind; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.widget.AbstractRegistrationDialog; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.DialogWithOnlineHelpUtils; import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.IDelegatedAction; /** @@ -44,6 +46,8 @@ public class AddPersonDialog extends AbstractRegistrationDialog this.viewContext = viewContext; this.codeField = createCodeField(viewContext, CodeFieldKind.CODE_OR_EMAIL); addField(codeField); + + DialogWithOnlineHelpUtils.addHelpButton(viewContext, this, createHelpPageIdentifier()); } @Override @@ -51,4 +55,10 @@ public class AddPersonDialog extends AbstractRegistrationDialog { viewContext.getService().registerPerson(codeField.getValue(), registrationCallback); } + + private HelpPageIdentifier createHelpPageIdentifier() + { + return new HelpPageIdentifier(HelpPageIdentifier.HelpPageDomain.USERS, + HelpPageIdentifier.HelpPageAction.REGISTER); + } } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/amc/AddRoleAssignmentDialog.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/amc/AddRoleAssignmentDialog.java index eaa19fe537401fb349c258bd1c8c86041191e6b0..cfe61add8699854049c47f637e7b909fe1b13ee4 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/amc/AddRoleAssignmentDialog.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/amc/AddRoleAssignmentDialog.java @@ -28,11 +28,13 @@ import com.google.gwt.user.client.rpc.AsyncCallback; import ch.systemsx.cisd.openbis.generic.client.web.client.ICommonClientServiceAsync; import ch.systemsx.cisd.openbis.generic.client.web.client.application.GenericConstants; import ch.systemsx.cisd.openbis.generic.client.web.client.application.IViewContext; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.help.HelpPageIdentifier; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.AuthorizationGroupSelectionWidget; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.GroupSelectionWidget; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.PersonSelectionWidget; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.widget.AbstractRegistrationDialog; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.widget.FieldUtil; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.DialogWithOnlineHelpUtils; import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.GWTUtils; import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.IDelegatedAction; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Grantee; @@ -116,6 +118,8 @@ public class AddRoleAssignmentDialog extends AbstractRegistrationDialog person, authGroup); } }); + + DialogWithOnlineHelpUtils.addHelpButton(viewContext, this, createHelpPageIdentifier()); } @Override @@ -138,4 +142,10 @@ public class AddRoleAssignmentDialog extends AbstractRegistrationDialog registrationCallback); } } + + private HelpPageIdentifier createHelpPageIdentifier() + { + return new HelpPageIdentifier(HelpPageIdentifier.HelpPageDomain.ROLES, + HelpPageIdentifier.HelpPageAction.REGISTER); + } } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/DataSetComputeMenu.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/DataSetComputeMenu.java index 984f142de5031d69257d233e4c0921be22ee2319..edaa751722cc354e17fd348dedcd1cf0b5e119f9 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/DataSetComputeMenu.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/DataSetComputeMenu.java @@ -42,11 +42,13 @@ import ch.systemsx.cisd.openbis.generic.client.web.client.ICommonClientServiceAs import ch.systemsx.cisd.openbis.generic.client.web.client.application.AbstractAsyncCallback; import ch.systemsx.cisd.openbis.generic.client.web.client.application.Dict; import ch.systemsx.cisd.openbis.generic.client.web.client.application.IViewContext; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.help.HelpPageIdentifier; import ch.systemsx.cisd.openbis.generic.client.web.client.application.menu.ActionMenu; import ch.systemsx.cisd.openbis.generic.client.web.client.application.menu.IActionMenuItem; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.ColumnConfigFactory; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.data.AbstractExternalDataGrid.SelectedAndDisplayedItems; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.widget.AbstractDataConfirmationDialog; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.DialogWithOnlineHelpUtils; import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.IDelegatedAction; import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.IDelegatedActionWithResult; import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.IMessageProvider; @@ -258,6 +260,8 @@ public class DataSetComputeMenu extends TextToolItem this.dataStoreOrNull = tryGetSingleDatastore(data); setWidth(DIALOG_WIDTH); + + DialogWithOnlineHelpUtils.addHelpButton(viewContext, this, createHelpPageIdentifier()); } @Override @@ -532,6 +536,12 @@ public class DataSetComputeMenu extends TextToolItem } return store; } + + private HelpPageIdentifier createHelpPageIdentifier() + { + return new HelpPageIdentifier(HelpPageIdentifier.HelpPageDomain.PERFORM_COMPUTATION, + HelpPageIdentifier.HelpPageAction.ACTION); + } } private static interface IComputationAction diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/DataSetTypeGrid.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/DataSetTypeGrid.java index 461614dd70635a537029c69a13ae7345adb2f848..a6e1c13fb08783d0710d67c4517b269fe2684c7a 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/DataSetTypeGrid.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/DataSetTypeGrid.java @@ -18,7 +18,6 @@ package ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.data; import com.extjs.gxt.ui.client.widget.Window; import com.extjs.gxt.ui.client.widget.form.TextField; -import com.google.gwt.user.client.Element; import com.google.gwt.user.client.rpc.AsyncCallback; import ch.systemsx.cisd.openbis.generic.client.web.client.ICommonClientServiceAsync; @@ -26,6 +25,7 @@ import ch.systemsx.cisd.openbis.generic.client.web.client.application.AbstractAs import ch.systemsx.cisd.openbis.generic.client.web.client.application.Dict; import ch.systemsx.cisd.openbis.generic.client.web.client.application.GenericConstants; import ch.systemsx.cisd.openbis.generic.client.web.client.application.IViewContext; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.help.HelpPageIdentifier; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.columns.framework.IColumnDefinitionKind; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.columns.specific.data.DataSetTypeColDefKind; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.entity_type.AbstractEntityTypeGrid; @@ -33,6 +33,7 @@ import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.entity_ import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.field.DescriptionField; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.grid.IDisposableComponent; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.widget.AbstractRegistrationDialog; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.DialogWithOnlineHelpUtils; import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.lang.StringEscapeUtils; import ch.systemsx.cisd.openbis.generic.client.web.client.dto.DefaultResultSetConfig; import ch.systemsx.cisd.openbis.generic.client.web.client.dto.ResultSet; @@ -133,6 +134,8 @@ public class DataSetTypeGrid extends AbstractEntityTypeGrid<DataSetType> .getMainDataSetPath())); addField(mainDataSetPathField); + DialogWithOnlineHelpUtils.addHelpButton(viewContext, this, + createHelpPageIdentifier()); } @Override @@ -144,6 +147,13 @@ public class DataSetTypeGrid extends AbstractEntityTypeGrid<DataSetType> viewContext.getService().updateEntityType(entityKind, dataSetType, registrationCallback); } + + private HelpPageIdentifier createHelpPageIdentifier() + { + return new HelpPageIdentifier(HelpPageIdentifier.HelpPageDomain.DATA_SET_TYPE, + HelpPageIdentifier.HelpPageAction.EDIT); + } + }; } @@ -158,8 +168,6 @@ public class DataSetTypeGrid extends AbstractEntityTypeGrid<DataSetType> private TextField<String> mainDataSetPathField; - @Override - protected void onRender(Element parent, int pos) { mainDataSetPatternField = createMainDataSettPatternField(); addField(mainDataSetPatternField); @@ -167,7 +175,8 @@ public class DataSetTypeGrid extends AbstractEntityTypeGrid<DataSetType> mainDataSetPathField = createMainDataSetPathField(); addField(mainDataSetPathField); - super.onRender(parent, pos); + DialogWithOnlineHelpUtils.addHelpButton(viewContext, this, + createHelpPageIdentifier()); } @Override @@ -178,6 +187,12 @@ public class DataSetTypeGrid extends AbstractEntityTypeGrid<DataSetType> dataSetType.setMainDataSetPattern(mainDataSetPatternField.getValue()); DataSetTypeGrid.this.register(dataSetType, registrationCallback); } + + private HelpPageIdentifier createHelpPageIdentifier() + { + return new HelpPageIdentifier(HelpPageIdentifier.HelpPageDomain.DATA_SET_TYPE, + HelpPageIdentifier.HelpPageAction.REGISTER); + } }; } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/DataSetUploadConfirmationDialog.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/DataSetUploadConfirmationDialog.java index 7f1a1588f540d0acfae0734db17a4ccec1969d48..74d1aab9f979b861808e4f76b2d33c43ae2e12f4 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/DataSetUploadConfirmationDialog.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/DataSetUploadConfirmationDialog.java @@ -27,9 +27,11 @@ import com.extjs.gxt.ui.client.widget.form.TextField; import ch.systemsx.cisd.openbis.generic.client.web.client.application.AbstractAsyncCallback; import ch.systemsx.cisd.openbis.generic.client.web.client.application.Dict; import ch.systemsx.cisd.openbis.generic.client.web.client.application.IViewContext; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.help.HelpPageIdentifier; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.data.AbstractExternalDataGrid.SelectedAndDisplayedItems; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.widget.AbstractDataConfirmationDialog; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.widget.FieldUtil; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.DialogWithOnlineHelpUtils; import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.IDelegatedActionWithResult; import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.WidgetUtils; import ch.systemsx.cisd.openbis.generic.client.web.client.dto.DataSetUploadParameters; @@ -126,6 +128,9 @@ final class DataSetUploadConfirmationDialog extends passwordField.addKeyListener(keyListener); passwordField.setAutoValidate(true); formPanel.add(passwordField); + + DialogWithOnlineHelpUtils.addHelpButton(viewContext.getCommonViewContext(), this, + createHelpPageIdentifier()); } private final RadioGroup createDataSetsRadio() @@ -184,4 +189,11 @@ final class DataSetUploadConfirmationDialog extends { return selectedAndDisplayedItems.createCriteria(uploadSelected); } + + private HelpPageIdentifier createHelpPageIdentifier() + { + return new HelpPageIdentifier(HelpPageIdentifier.HelpPageDomain.EXPORT_DATA, + HelpPageIdentifier.HelpPageAction.ACTION); + } + } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/ColumnSettingsDialog.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/ColumnSettingsDialog.java index b0861a32ff655f5662037fe6dca49ed0cd846b9f..d66b52f10dcc3d497de7efb4879d4fa629e527d4 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/ColumnSettingsDialog.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/ColumnSettingsDialog.java @@ -17,16 +17,16 @@ import ch.systemsx.cisd.openbis.generic.client.web.client.application.Dict; import ch.systemsx.cisd.openbis.generic.client.web.client.application.GenericConstants; import ch.systemsx.cisd.openbis.generic.client.web.client.application.IViewContext; import ch.systemsx.cisd.openbis.generic.client.web.client.application.help.HelpPageIdentifier; -import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.AbstractDialogWithOnlineHelp; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.grid.expressions.column.GridCustomColumnGrid; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.grid.expressions.filter.GridCustomFilterGrid; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.DialogWithOnlineHelpUtils; /** * {@link Dialog} displaying {@link ColumnSettingsChooser}. * * @author Izabela Adamczyk */ -public class ColumnSettingsDialog extends AbstractDialogWithOnlineHelp +public class ColumnSettingsDialog extends Dialog { public static final String TAB_PANEL_ID_PREFIX = GenericConstants.ID_PREFIX + "tab-panel"; @@ -54,7 +54,7 @@ public class ColumnSettingsDialog extends AbstractDialogWithOnlineHelp setButtons(OK); setHeading(viewContext.getMessage(Dict.GRID_SETTINGS_TITLE)); - addHelpButton(viewContext, getHelpPageIdentifier()); + DialogWithOnlineHelpUtils.addHelpButton(viewContext, this, createHelpPageIdentifier()); } /** @@ -121,9 +121,9 @@ public class ColumnSettingsDialog extends AbstractDialogWithOnlineHelp * The default implementation links all column settings dialogs to one help page. Subclasses may * override. */ - protected HelpPageIdentifier getHelpPageIdentifier() + protected HelpPageIdentifier createHelpPageIdentifier() { - return new HelpPageIdentifier(HelpPageIdentifier.HelpPageDomain.CHANGE_COLUMN_SETTINGS, + return new HelpPageIdentifier(HelpPageIdentifier.HelpPageDomain.TABLE_SETTINGS, HelpPageIdentifier.HelpPageAction.ACTION); } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/expressions/column/GridCustomColumnGrid.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/expressions/column/GridCustomColumnGrid.java index 6066335d73972a0ce46b07b38264b44447d956c0..6b82b77595a24a8d2563b4749e49643529086212 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/expressions/column/GridCustomColumnGrid.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/expressions/column/GridCustomColumnGrid.java @@ -32,6 +32,7 @@ import ch.systemsx.cisd.openbis.generic.client.web.client.application.Dict; import ch.systemsx.cisd.openbis.generic.client.web.client.application.GenericConstants; import ch.systemsx.cisd.openbis.generic.client.web.client.application.IViewContext; import ch.systemsx.cisd.openbis.generic.client.web.client.application.framework.DisplayTypeIDGenerator; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.help.HelpPageIdentifier; import ch.systemsx.cisd.openbis.generic.client.web.client.application.model.BaseEntityModel; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.columns.framework.IColumnDefinitionKind; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.columns.specific.CustomGridColumnColDefKind; @@ -168,6 +169,13 @@ public class GridCustomColumnGrid extends AbstractSimpleBrowserGrid<GridCustomCo NewColumnOrFilter newItem = getNewItemInfo(); viewContext.getService().registerColumn(newItem, registrationCallback); } + + @Override + protected HelpPageIdentifier createHelpPageIdentifier() + { + return new HelpPageIdentifier(HelpPageIdentifier.HelpPageDomain.CUSTOM_COLUMN, + HelpPageIdentifier.HelpPageAction.REGISTER); + } } private static class EditDialog extends AbstractGridCustomExpressionEditOrRegisterDialog @@ -195,6 +203,13 @@ public class GridCustomColumnGrid extends AbstractSimpleBrowserGrid<GridCustomCo update(itemToUpdate); viewContext.getService().updateColumn(itemToUpdate, registrationCallback); } + + @Override + protected HelpPageIdentifier createHelpPageIdentifier() + { + return new HelpPageIdentifier(HelpPageIdentifier.HelpPageDomain.CUSTOM_COLUMN, + HelpPageIdentifier.HelpPageAction.EDIT); + } } private static class DeletionConfirmationDialog extends diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/expressions/common/AbstractGridCustomExpressionEditOrRegisterDialog.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/expressions/common/AbstractGridCustomExpressionEditOrRegisterDialog.java index 1263a3454b771dc4360a1cd9f5cb01647b39324d..5d6b938ff006a3d68d4dda6c71be8af81d7d3f94 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/expressions/common/AbstractGridCustomExpressionEditOrRegisterDialog.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/expressions/common/AbstractGridCustomExpressionEditOrRegisterDialog.java @@ -30,12 +30,14 @@ import ch.systemsx.cisd.openbis.generic.client.web.client.ICommonClientServiceAs import ch.systemsx.cisd.openbis.generic.client.web.client.application.Dict; import ch.systemsx.cisd.openbis.generic.client.web.client.application.GenericConstants; import ch.systemsx.cisd.openbis.generic.client.web.client.application.IViewContext; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.help.HelpPageIdentifier; import ch.systemsx.cisd.openbis.generic.client.web.client.application.renderer.LinkRenderer; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.field.CheckBoxField; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.field.DescriptionField; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.field.MultilineVarcharField; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.grid.AbstractColumnSettingsDataModelProvider; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.widget.AbstractRegistrationDialog; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.DialogWithOnlineHelpUtils; import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.IDelegatedAction; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.AbstractGridExpression; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.NewColumnOrFilter; @@ -102,8 +104,12 @@ abstract public class AbstractGridCustomExpressionEditOrRegisterDialog extends form.setLabelWidth(LABEL_WIDTH); form.setFieldWidth(FIELD_WIDTH); setWidth(form.getLabelWidth() + form.getFieldWidth() + 50); + + DialogWithOnlineHelpUtils.addHelpButton(viewContext, this, createHelpPageIdentifier()); } + protected abstract HelpPageIdentifier createHelpPageIdentifier(); + protected void initializeValues(AbstractGridExpression gridExpression) { descriptionField.setValue(unescapeHtml(gridExpression.getDescription())); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/expressions/common/GridColumnChooserDialog.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/expressions/common/GridColumnChooserDialog.java index b891628ff6d0c3aa80396b9c2ab61223f994587c..2fde2747f2f9f3200abd6a690d1a4929481b8ebb 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/expressions/common/GridColumnChooserDialog.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/expressions/common/GridColumnChooserDialog.java @@ -14,8 +14,6 @@ import com.google.gwt.user.client.Event; import ch.systemsx.cisd.openbis.generic.client.web.client.ICommonClientServiceAsync; import ch.systemsx.cisd.openbis.generic.client.web.client.application.Dict; import ch.systemsx.cisd.openbis.generic.client.web.client.application.IViewContext; -import ch.systemsx.cisd.openbis.generic.client.web.client.application.help.HelpPageIdentifier; -import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.AbstractDialogWithOnlineHelp; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.grid.AbstractColumnSettingsDataModelProvider; /** @@ -24,7 +22,7 @@ import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.grid.Ab * * @author Izabela Adamczyk */ -class GridColumnChooserDialog extends AbstractDialogWithOnlineHelp +class GridColumnChooserDialog extends Dialog { private final IViewContext<ICommonClientServiceAsync> viewContext; @@ -45,8 +43,6 @@ class GridColumnChooserDialog extends AbstractDialogWithOnlineHelp setLayout(new FitLayout()); setHeading(viewContext.getMessage(Dict.COLUMNS) + " [" + gridId + "]"); setModal(true); // without it the dialog goes under filter edit/register dialog - - addHelpButton(viewContext, getHelpPageIdentifier()); } /** @@ -102,9 +98,4 @@ class GridColumnChooserDialog extends AbstractDialogWithOnlineHelp hide(); } - protected HelpPageIdentifier getHelpPageIdentifier() - { - return new HelpPageIdentifier(HelpPageIdentifier.HelpPageDomain.CHANGE_COLUMN_SETTINGS, - HelpPageIdentifier.HelpPageAction.CREATE_CUSTOM_COLUMN); - } } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/expressions/filter/GridCustomFilterGrid.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/expressions/filter/GridCustomFilterGrid.java index 70946ca3c65beec15b35cedd0f0080fcb8627df0..99a9a5ec69a106fc0fbd5b4eb67ffda5a806cf64 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/expressions/filter/GridCustomFilterGrid.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/expressions/filter/GridCustomFilterGrid.java @@ -31,6 +31,7 @@ import ch.systemsx.cisd.openbis.generic.client.web.client.application.Dict; import ch.systemsx.cisd.openbis.generic.client.web.client.application.GenericConstants; import ch.systemsx.cisd.openbis.generic.client.web.client.application.IViewContext; import ch.systemsx.cisd.openbis.generic.client.web.client.application.framework.DisplayTypeIDGenerator; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.help.HelpPageIdentifier; import ch.systemsx.cisd.openbis.generic.client.web.client.application.model.BaseEntityModel; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.columns.framework.IColumnDefinitionKind; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.columns.specific.CustomGridFilterColDefKind; @@ -164,6 +165,13 @@ public class GridCustomFilterGrid extends AbstractSimpleBrowserGrid<GridCustomFi NewColumnOrFilter newItem = getNewItemInfo(); viewContext.getService().registerFilter(newItem, registrationCallback); } + + @Override + protected HelpPageIdentifier createHelpPageIdentifier() + { + return new HelpPageIdentifier(HelpPageIdentifier.HelpPageDomain.CUSTOM_FILTER, + HelpPageIdentifier.HelpPageAction.REGISTER); + } } private static class EditDialog extends AbstractGridCustomExpressionEditOrRegisterDialog @@ -191,6 +199,13 @@ public class GridCustomFilterGrid extends AbstractSimpleBrowserGrid<GridCustomFi update(itemToUpdate); viewContext.getService().updateFilter(itemToUpdate, registrationCallback); } + + @Override + protected HelpPageIdentifier createHelpPageIdentifier() + { + return new HelpPageIdentifier(HelpPageIdentifier.HelpPageDomain.CUSTOM_FILTER, + HelpPageIdentifier.HelpPageAction.EDIT); + } } private static class DeletionConfirmationDialog extends diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/property_type/PropertyTypeAssignmentGrid.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/property_type/PropertyTypeAssignmentGrid.java index 929ff44160b961f4f50586194ba6e822e1e9ca20..88fb857634ae4fe9b144e403a9ba4e1d359a0a72 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/property_type/PropertyTypeAssignmentGrid.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/property_type/PropertyTypeAssignmentGrid.java @@ -39,6 +39,7 @@ import ch.systemsx.cisd.openbis.generic.client.web.client.application.Dict; import ch.systemsx.cisd.openbis.generic.client.web.client.application.GenericConstants; import ch.systemsx.cisd.openbis.generic.client.web.client.application.IViewContext; import ch.systemsx.cisd.openbis.generic.client.web.client.application.framework.DisplayTypeIDGenerator; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.help.HelpPageIdentifier; import ch.systemsx.cisd.openbis.generic.client.web.client.application.model.BaseEntityModel; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.columns.framework.IColumnDefinitionKind; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.columns.specific.PropertyTypeAssignmentColDefKind; @@ -49,6 +50,7 @@ import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.grid.IB import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.grid.IDisposableComponent; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.widget.AbstractRegistrationDialog; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.widget.FieldUtil; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.DialogWithOnlineHelpUtils; import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.IDelegatedAction; import ch.systemsx.cisd.openbis.generic.client.web.client.dto.DefaultResultSetConfig; import ch.systemsx.cisd.openbis.generic.client.web.client.dto.ResultSet; @@ -293,6 +295,9 @@ public class PropertyTypeAssignmentGrid extends etptSelectionWidget = createETPTSelectionWidget(etpts); addField(etptSelectionWidget); + + DialogWithOnlineHelpUtils.addHelpButton(viewContext, this, + createHelpPageIdentifier()); } private SectionSelectionWidget createSectionSelectionWidget( @@ -367,6 +372,12 @@ public class PropertyTypeAssignmentGrid extends getDefaultValue(), getSectionValue(), getPreviousETPTOrdinal(), registrationCallback); } + + private HelpPageIdentifier createHelpPageIdentifier() + { + return new HelpPageIdentifier(HelpPageIdentifier.HelpPageDomain.ASSIGNMENT, + HelpPageIdentifier.HelpPageAction.EDIT); + } }; } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample/SampleTypeGrid.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample/SampleTypeGrid.java index 69eb1c1f9c4024492bdba5dfc9bf14ad1776fe1c..36738e6ab6ec58ad353de3b98360067fdcf10b9d 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample/SampleTypeGrid.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample/SampleTypeGrid.java @@ -18,7 +18,6 @@ package ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.sample import com.extjs.gxt.ui.client.widget.Window; import com.extjs.gxt.ui.client.widget.form.TextField; -import com.google.gwt.user.client.Element; import com.google.gwt.user.client.rpc.AsyncCallback; import ch.systemsx.cisd.openbis.generic.client.web.client.ICommonClientServiceAsync; @@ -26,6 +25,7 @@ import ch.systemsx.cisd.openbis.generic.client.web.client.application.AbstractAs import ch.systemsx.cisd.openbis.generic.client.web.client.application.Dict; import ch.systemsx.cisd.openbis.generic.client.web.client.application.GenericConstants; import ch.systemsx.cisd.openbis.generic.client.web.client.application.IViewContext; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.help.HelpPageIdentifier; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.columns.framework.IColumnDefinitionKind; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.columns.specific.sample.SampleTypeColDefKind; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.entity_type.AbstractEntityTypeGrid; @@ -36,6 +36,7 @@ import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.field.D import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.field.IntegerField; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.grid.IDisposableComponent; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.widget.AbstractRegistrationDialog; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.DialogWithOnlineHelpUtils; import ch.systemsx.cisd.openbis.generic.client.web.client.dto.DefaultResultSetConfig; import ch.systemsx.cisd.openbis.generic.client.web.client.dto.ResultSet; import ch.systemsx.cisd.openbis.generic.client.web.client.dto.TableExportCriteria; @@ -165,6 +166,9 @@ public class SampleTypeGrid extends AbstractEntityTypeGrid<SampleType> SampleTypeDialogFieldHelper.createGeneratedCodePrefixField(viewContext, sampleType.getGeneratedCodePrefix()); addField(generatedCodePrefixField); + + DialogWithOnlineHelpUtils.addHelpButton(viewContext, this, + createHelpPageIdentifier()); } @Override @@ -180,6 +184,12 @@ public class SampleTypeGrid extends AbstractEntityTypeGrid<SampleType> viewContext.getService().updateEntityType(entityKind, sampleType, registrationCallback); } + + private HelpPageIdentifier createHelpPageIdentifier() + { + return new HelpPageIdentifier(HelpPageIdentifier.HelpPageDomain.SAMPLE_TYPE, + HelpPageIdentifier.HelpPageAction.EDIT); + } }; } @@ -200,8 +210,6 @@ public class SampleTypeGrid extends AbstractEntityTypeGrid<SampleType> private TextField<String> generatedCodePrefixField; - @Override - protected void onRender(Element parent, int pos) { listableField = SampleTypeDialogFieldHelper.createListableField(viewContext, @@ -228,7 +236,8 @@ public class SampleTypeGrid extends AbstractEntityTypeGrid<SampleType> DEFAULT_GENERATED_CODE_PREFIX_VALUE); addField(generatedCodePrefixField); - super.onRender(parent, pos); + DialogWithOnlineHelpUtils.addHelpButton(viewContext, this, + createHelpPageIdentifier()); } @Override @@ -243,6 +252,12 @@ public class SampleTypeGrid extends AbstractEntityTypeGrid<SampleType> sampleType.setGeneratedCodePrefix(generatedCodePrefixField.getValue()); SampleTypeGrid.this.register(sampleType, registrationCallback); } + + private HelpPageIdentifier createHelpPageIdentifier() + { + return new HelpPageIdentifier(HelpPageIdentifier.HelpPageDomain.SAMPLE_TYPE, + HelpPageIdentifier.HelpPageAction.REGISTER); + } }; } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/search/DetailedSearchWindow.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/search/DetailedSearchWindow.java index 34dca74cd94e7cdebf1a5e0c272e9367f6102f4c..18bd87938e297123ca48dbc50860f252588dd81c 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/search/DetailedSearchWindow.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/search/DetailedSearchWindow.java @@ -5,6 +5,7 @@ import java.util.List; import com.extjs.gxt.ui.client.Style.Scroll; import com.extjs.gxt.ui.client.event.ButtonEvent; import com.extjs.gxt.ui.client.event.SelectionListener; +import com.extjs.gxt.ui.client.widget.Dialog; import com.extjs.gxt.ui.client.widget.button.Button; import com.extjs.gxt.ui.client.widget.button.ButtonBar; import com.extjs.gxt.ui.client.widget.layout.FitData; @@ -14,8 +15,8 @@ import ch.systemsx.cisd.openbis.generic.client.web.client.ICommonClientServiceAs import ch.systemsx.cisd.openbis.generic.client.web.client.application.Dict; import ch.systemsx.cisd.openbis.generic.client.web.client.application.IViewContext; import ch.systemsx.cisd.openbis.generic.client.web.client.application.help.HelpPageIdentifier; -import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.AbstractDialogWithOnlineHelp; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.data.DataSetSearchHitGrid; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.DialogWithOnlineHelpUtils; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DetailedSearchCriteria; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DetailedSearchField; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.EntityKind; @@ -27,7 +28,7 @@ import ch.systemsx.cisd.openbis.generic.shared.basic.dto.PropertyType; * @author Izabela Adamczyk * @author Piotr Buczek */ -public class DetailedSearchWindow extends AbstractDialogWithOnlineHelp +public class DetailedSearchWindow extends Dialog { public static final String SEARCH_BUTTON_ID = DataSetSearchHitGrid.BROWSER_ID + "search_button"; @@ -93,7 +94,8 @@ public class DetailedSearchWindow extends AbstractDialogWithOnlineHelp searchButton.setId(SEARCH_BUTTON_ID); bar.add(searchButton); - addHelpButton(viewContext, getHelpPageIdentifier(entityKind)); + DialogWithOnlineHelpUtils.addHelpButton(viewContext, this, + createHelpPageIdentifier(entityKind)); } public DetailedSearchCriteria tryGetCriteria() @@ -116,7 +118,7 @@ public class DetailedSearchWindow extends AbstractDialogWithOnlineHelp * default implementation ignores the entity kind and returns an identifier referencing the * advanced search domain. Subclasses may override. */ - protected HelpPageIdentifier getHelpPageIdentifier(final EntityKind entityKind) + protected HelpPageIdentifier createHelpPageIdentifier(final EntityKind entityKind) { // Do not use the entity kind -- in general we want all advanced search dialogs to refer to // the same help page. diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/user/ChangeUserSettingsDialog.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/user/ChangeUserSettingsDialog.java index e7c19164bbdefb80421693dca8d2acb3a83becd1..b3e67a5f581a35bb15061eec3c1dbdd44296e42e 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/user/ChangeUserSettingsDialog.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/user/ChangeUserSettingsDialog.java @@ -30,10 +30,12 @@ import ch.systemsx.cisd.openbis.generic.client.web.client.application.AbstractAs import ch.systemsx.cisd.openbis.generic.client.web.client.application.Dict; import ch.systemsx.cisd.openbis.generic.client.web.client.application.GenericConstants; import ch.systemsx.cisd.openbis.generic.client.web.client.application.IViewContext; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.help.HelpPageIdentifier; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.GroupSelectionWidget; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.field.CheckBoxField; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.widget.AbstractSaveDialog; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.widget.FieldUtil; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.DialogWithOnlineHelpUtils; import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.IDelegatedAction; import ch.systemsx.cisd.openbis.generic.shared.basic.TechId; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DisplaySettings; @@ -72,6 +74,9 @@ public class ChangeUserSettingsDialog extends AbstractSaveDialog addField(homeGroupField = createHomeGroupField()); addField(useWildcardSearchModeCheckbox = createUseWildcardSearchModeField()); fbar.insert(createResetButton(), 1); // inserting Reset button in between Save and Cancel + + DialogWithOnlineHelpUtils.addHelpButton(viewContext.getCommonViewContext(), this, + createHelpPageIdentifier()); } // @@ -165,4 +170,10 @@ public class ChangeUserSettingsDialog extends AbstractSaveDialog hide(); } } + + private HelpPageIdentifier createHelpPageIdentifier() + { + return new HelpPageIdentifier(HelpPageIdentifier.HelpPageDomain.CHANGE_USER_SETTINGS, + HelpPageIdentifier.HelpPageAction.ACTION); + } } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/vocabulary/VocabularyTermGrid.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/vocabulary/VocabularyTermGrid.java index 77f450db38f7a177dce88d5dbf0d15845c925f7b..9974969047642d789cd81190b2000b174198d9b7 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/vocabulary/VocabularyTermGrid.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/vocabulary/VocabularyTermGrid.java @@ -49,6 +49,7 @@ import ch.systemsx.cisd.openbis.generic.client.web.client.application.FormPanelL import ch.systemsx.cisd.openbis.generic.client.web.client.application.GenericConstants; import ch.systemsx.cisd.openbis.generic.client.web.client.application.IViewContext; import ch.systemsx.cisd.openbis.generic.client.web.client.application.framework.DisplayTypeIDGenerator; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.help.HelpPageIdentifier; import ch.systemsx.cisd.openbis.generic.client.web.client.application.model.BaseEntityModel; import ch.systemsx.cisd.openbis.generic.client.web.client.application.model.VocabularyTermModel; import ch.systemsx.cisd.openbis.generic.client.web.client.application.renderer.LinkRenderer; @@ -65,6 +66,7 @@ import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.widget. import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.widget.ConfirmationDialog; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.widget.InfoBox; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.widget.SimpleDialog; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.DialogWithOnlineHelpUtils; import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.IDelegatedAction; import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.lang.StringEscapeUtils; import ch.systemsx.cisd.openbis.generic.client.web.client.dto.DefaultResultSetConfig; @@ -432,6 +434,9 @@ public class VocabularyTermGrid extends AbstractSimpleBrowserGrid<VocabularyTerm } } }); + + DialogWithOnlineHelpUtils.addHelpButton(viewContext, this, + createHelpPageIdentifier()); } private FileUploadField createImportFileField() @@ -463,6 +468,12 @@ public class VocabularyTermGrid extends AbstractSimpleBrowserGrid<VocabularyTerm } + private HelpPageIdentifier createHelpPageIdentifier() + { + return new HelpPageIdentifier(HelpPageIdentifier.HelpPageDomain.TERM, + HelpPageIdentifier.HelpPageAction.BATCH_UPDATE); + } + }; } @@ -477,6 +488,7 @@ public class VocabularyTermGrid extends AbstractSimpleBrowserGrid<VocabularyTerm private final TextArea newTermCodesArea; { + form.setLabelWidth(LABEL_WIDTH); form.setFieldWidth(FIELD_WIDTH); this.setWidth(LABEL_WIDTH + FIELD_WIDTH + 50); @@ -493,6 +505,9 @@ public class VocabularyTermGrid extends AbstractSimpleBrowserGrid<VocabularyTerm { termSelectionWidget = null; } + + DialogWithOnlineHelpUtils.addHelpButton(viewContext, this, + createHelpPageIdentifier()); } @Override @@ -551,6 +566,12 @@ public class VocabularyTermGrid extends AbstractSimpleBrowserGrid<VocabularyTerm return selectedItem != null ? selectedItem.getTerm().getOrdinal() : 0L; } } + + private HelpPageIdentifier createHelpPageIdentifier() + { + return new HelpPageIdentifier(HelpPageIdentifier.HelpPageDomain.TERM, + HelpPageIdentifier.HelpPageAction.REGISTER); + } }; } @@ -709,6 +730,8 @@ public class VocabularyTermGrid extends AbstractSimpleBrowserGrid<VocabularyTerm } }); + DialogWithOnlineHelpUtils.addHelpButton(viewContext, dialog, new HelpPageIdentifier( + HelpPageIdentifier.HelpPageDomain.TERM, HelpPageIdentifier.HelpPageAction.DELETE)); dialog.show(); } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/AbstractDialogWithOnlineHelp.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/util/DialogWithOnlineHelpUtils.java similarity index 73% rename from openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/AbstractDialogWithOnlineHelp.java rename to openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/util/DialogWithOnlineHelpUtils.java index 2accc178f3b9fc1a87751a61c99698e9134e676f..58897085f0f723ffcf168375959699077a680e0f 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/AbstractDialogWithOnlineHelp.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/util/DialogWithOnlineHelpUtils.java @@ -14,11 +14,12 @@ * limitations under the License. */ -package ch.systemsx.cisd.openbis.generic.client.web.client.application.ui; +package ch.systemsx.cisd.openbis.generic.client.web.client.application.util; import com.extjs.gxt.ui.client.event.IconButtonEvent; import com.extjs.gxt.ui.client.event.SelectionListener; import com.extjs.gxt.ui.client.widget.Dialog; +import com.extjs.gxt.ui.client.widget.Window; import com.extjs.gxt.ui.client.widget.button.ToolButton; import com.google.gwt.http.client.URL; @@ -26,22 +27,25 @@ import ch.systemsx.cisd.openbis.generic.client.web.client.ICommonClientServiceAs import ch.systemsx.cisd.openbis.generic.client.web.client.application.GenericConstants; import ch.systemsx.cisd.openbis.generic.client.web.client.application.IViewContext; import ch.systemsx.cisd.openbis.generic.client.web.client.application.help.HelpPageIdentifier; -import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.WindowUtils; import ch.systemsx.cisd.openbis.generic.shared.basic.URLMethodWithParameters; /** - * An abstract superclass for dialogs that support online help. Subclasses may override protected - * methods to configure how help is invoked. + * An utility class used for enhancing {@link Window} with online help functionality. + * <p> + * NOTE: Adding abstract superclass to our dialog hierarchy doesn't work well in our case as we + * already have complex dialog hierarchy subclassing either {@link Window} and {@link Dialog} and we + * don't want all our dialogs to have help. * * @author Chandrasekhar Ramakrishnan + * @author Piotr Buczek */ -public abstract class AbstractDialogWithOnlineHelp extends Dialog +public class DialogWithOnlineHelpUtils { /** - * By default, adds a help button to the header. Subclasses may alter this behavior. + * Adds a help button to the header. */ - protected void addHelpButton(final IViewContext<ICommonClientServiceAsync> viewContext, - final HelpPageIdentifier helpPageIdentifier) + public static void addHelpButton(final IViewContext<ICommonClientServiceAsync> viewContext, + final Window window, final HelpPageIdentifier helpPageIdentifier) { ToolButton toolButton = new ToolButton("x-tool-help", new SelectionListener<IconButtonEvent>() @@ -53,13 +57,13 @@ public abstract class AbstractDialogWithOnlineHelp extends Dialog } }); - getHeader().addTool(toolButton); + window.getHeader().addTool(toolButton); } /** * Called when the user presses the help button. */ - protected void onInvokeHelp(final IViewContext<ICommonClientServiceAsync> viewContext, + private static void onInvokeHelp(final IViewContext<ICommonClientServiceAsync> viewContext, final HelpPageIdentifier helpPageIdentifier) { URLMethodWithParameters url = diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/util/GWTUtils.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/util/GWTUtils.java index 5f65c49342058799ef46875336b5faa1f5fbe907..92e0e7b147ce8f66ef0b3e19c4e02c846e904c76 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/util/GWTUtils.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/util/GWTUtils.java @@ -128,7 +128,9 @@ public final class GWTUtils public final static void setSelectedItem(final TreeGrid<ModelData> tree, final String property, final String value) { + System.err.println("set selected " + property + "=" + value); ModelData model = tryFindModel(tree.getTreeStore().getAllItems(), property, value); + System.err.println(model); if (model != null) { tree.getSelectionModel().select(model, false); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/common-dictionary.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/common-dictionary.js index 1482ac5d09498a43e25dbb25a9968c49bd76c4c1..2f6294f9dcce7e2ff170aeedf0d85002aeaa3644 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/public/common-dictionary.js +++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/common-dictionary.js @@ -45,7 +45,6 @@ var common = { auto_resolve_label: "Smart View", data_report_label: "Report:", explore_label: "Explore:", - // // Field @@ -66,7 +65,7 @@ var common = { messagebox_warning: "Warning", messagebox_info: "Info", - // + // // Buttons // @@ -122,6 +121,14 @@ var common = { header_userWithoutHomegroup: "{0}", header_userWithHomegroup: "{0} ({1})", + // + // Help Info + // + + info_button_tooltip: "Displays short help information about the application.", + info_box_title: "OpenBIS Help", + info_box_msg: "There is an online help under construction for tabs and dialog windows opened in openBIS.<br/><br/>To get help information about specific:<li><b>tab</b> - right click on an opened tab's header and select <i>Help</i> from its context menu,<li><b>dialog window</b> - click on <i>?</i> icon visible in window's header in the right corner.", + // // Search // @@ -354,6 +361,8 @@ var common = { HELP__SAMPLE__IMPORT: "Sample Import", HELP__SAMPLE__BATCH_UPDATE: "Sample Batch Update", HELP__SAMPLE__SAMPLE_TYPE__BROWSE: "Sample Type Browser", + HELP__SAMPLE__SAMPLE_TYPE__REGISTER: "Add/Edit Sample Type", + HELP__SAMPLE__SAMPLE_TYPE__EDIT: "Add/Edit Sample Type", HELP__MATERIAL__BROWSE: "Material Browser", HELP__MATERIAL__VIEW: "Material Viewer", HELP__MATERIAL__EDIT: "Material Editor", @@ -365,12 +374,17 @@ var common = { HELP__DATA_SET__REGISTER: "Data Set Upload", HELP__DATA_SET__REPORT: "Data Set Report", HELP__DATA_SET__DATA_SET_TYPE__BROWSE: "Data Set Type Browser", + HELP__DATA_SET__DATA_SET_TYPE__REGISTER: "Add/Edit Data Set Type", + HELP__DATA_SET__DATA_SET_TYPE__EDIT: "Add/Edit Data Set Type", HELP__RELATED_DATA_SETS__BROWSE: "Related Data Sets Browser", HELP__ADMINISTRATION__FILE_TYPE__BROWSE: "File Type Browser", HELP__ADMINISTRATION__GROUP__BROWSE: "Group Browser", HELP__ADMINISTRATION__VOCABULARY__BROWSE: "Vocabulary Browser", HELP__ADMINISTRATION__VOCABULARY__REGISTER: "Vocabulary Registration", - HELP__ADMINISTRATION__VOCABULARY__TERM__Browser: "Vocabulary Terms Browser", + HELP__ADMINISTRATION__VOCABULARY__TERM__BROWSE: "Vocabulary Terms Browser", + HELP__ADMINISTRATION__VOCABULARY__TERM__REGISTER: "Adding Vocabulary Terms", + HELP__ADMINISTRATION__VOCABULARY__TERM__DELETE: "Deletion of Vocabulary Terms with Replacements", + HELP__ADMINISTRATION__VOCABULARY__TERM__BATCH_UPDATE: "Vocabulary Terms Batch Update", HELP__ADMINISTRATION__PROJECT__VIEW: "Project Viewer", HELP__ADMINISTRATION__PROJECT__EDIT: "Project Editor", HELP__ADMINISTRATION__PROJECT__BROWSE: "Project Browser", @@ -382,11 +396,19 @@ var common = { HELP__ADMINISTRATION__AUTHORIZATION__AUTHORIZATION_GROUPS__BROWSE: "Authorization Group Browser", HELP__ADMINISTRATION__AUTHORIZATION__AUTHORIZATION_GROUPS__VIEW: "Users From Authorization Group", HELP__ADMINISTRATION__AUTHORIZATION__ROLES__BROWSE: "Role Assignment Browser", + HELP__ADMINISTRATION__AUTHORIZATION__ROLES__REGISTER: "Role Assignment", HELP__ADMINISTRATION__AUTHORIZATION__USERS__BROWSE: "Person Browser", + HELP__ADMINISTRATION__AUTHORIZATION__USERS__REGISTER: "Person Registration", HELP__SEARCH__ACTION: "Global Search", HELP__ATTACHMENTS__VIEW: "Attachment Versions", - HELP__CHANGE_COLUMN_SETTINGS__ACTION: "Table Settings", - HELP__CHANGE_COLUMN_SETTINGS__CREATE_CUSTOM_COLUMN: "Custom Column", + HELP__CHANGE_USER_SETTINGS__ACTION: "Change User Settings", + HELP__TABLE_SETTINGS__ACTION: "Table Settings", + HELP__TABLE_SETTINGS__CUSTOM_COLUMN__REGISTER: "Add/Edit Custom Column", + HELP__TABLE_SETTINGS__CUSTOM_COLUMN__EDIT: "Add/Edit Custom Column", + HELP__TABLE_SETTINGS__CUSTOM_FILTER__REGISTER: "Add/Edit Custom Filter", + HELP__TABLE_SETTINGS__CUSTOM_FILTER__EDIT: "Add/Edit Custom Filter", + HELP__EXPORT_DATA__ACTION: "Data Exporting", + HELP__PERFORM_COMPUTATION__ACTION: "Performing Computations on Data Sets", // // User Settings Dialog