Skip to content

Commit

Permalink
Merge pull request #205 from LabKey/fb_merge_24.7_to_develop
Browse files Browse the repository at this point in the history
Merge discvr-24.7 to develop
  • Loading branch information
bbimber authored Aug 5, 2024
2 parents 9764c1c + 3d630e2 commit aa6b28a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions LDK/api-src/org/labkey/api/ldk/buttons/ShowEditUIButton.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,13 @@ public class ShowEditUIButton extends SimpleButtonConfigFactory

protected Class<? extends Permission>[] _perms;

@SafeVarargs
public ShowEditUIButton(Module owner, String schemaName, String queryName, Class<? extends Permission>... perms)
{
this(owner, schemaName, queryName, "Edit Records", perms);
}

@SafeVarargs
public ShowEditUIButton(Module owner, String schemaName, String queryName, String label, Class<? extends Permission>... perms)
{
super(owner, label, "");
Expand Down Expand Up @@ -87,20 +89,20 @@ protected String getJsHandler(TableInfo ti)
{
String schema = _schemaName == null || LDKService.ALL_SCHEMAS.equals(_schemaName) ? ti.getPublicSchemaName() : _schemaName;
String query = _queryName == null || LDKService.ALL_TABLES.equalsIgnoreCase(_queryName) ? ti.getPublicName() : _queryName;
String ret = getHandlerName() + "(" + PageFlowUtil.jsString(schema) + "," + PageFlowUtil.jsString(query) + ",dataRegionName, {";
StringBuilder ret = new StringBuilder(getHandlerName() + "(" + PageFlowUtil.jsString(schema) + "," + PageFlowUtil.jsString(query) + ",dataRegionName, {");

String delim = "";
if (_urlParamMap != null)
{
for (String key : _urlParamMap.keySet())
{
ret += delim + PageFlowUtil.jsString(key) + ":" + PageFlowUtil.jsString(_urlParamMap.get(key));
ret.append(delim).append(PageFlowUtil.jsString(key)).append(":").append(PageFlowUtil.jsString(_urlParamMap.get(key)));
delim = ",";
}
}

ret += "}, " + _copyFilters + ");";
ret.append("}, ").append(_copyFilters).append(");");

return ret;
return ret.toString();
}
}

0 comments on commit aa6b28a

Please sign in to comment.