mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-17 20:50:44 +00:00
Add TOOLTIP type adornment; also, update url-encoding in FileDownload adornment to .replace("+", "%20")
This commit is contained in:
@ -46,6 +46,7 @@ public enum AdornmentType
|
||||
REVEAL,
|
||||
FILE_DOWNLOAD,
|
||||
FILE_UPLOAD,
|
||||
TOOLTIP,
|
||||
ERROR;
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// keep these values in sync with AdornmentType.ts in qqq-frontend-core //
|
||||
@ -92,9 +93,9 @@ public enum AdornmentType
|
||||
static String makeFieldDownloadUrl(String tableName, Serializable primaryKey, String fieldName, String fileName)
|
||||
{
|
||||
return ("/data/" + tableName + "/"
|
||||
+ URLEncoder.encode(Objects.requireNonNullElse(ValueUtils.getValueAsString(primaryKey), ""), StandardCharsets.UTF_8) + "/"
|
||||
+ URLEncoder.encode(Objects.requireNonNullElse(ValueUtils.getValueAsString(primaryKey), ""), StandardCharsets.UTF_8).replace("+", "%20") + "/"
|
||||
+ fieldName + "/"
|
||||
+ URLEncoder.encode(Objects.requireNonNullElse(fileName, ""), StandardCharsets.UTF_8));
|
||||
+ URLEncoder.encode(Objects.requireNonNullElse(fileName, ""), StandardCharsets.UTF_8).replace("+", "%20"));
|
||||
}
|
||||
}
|
||||
|
||||
@ -246,4 +247,15 @@ public enum AdornmentType
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
*******************************************************************************/
|
||||
public interface TooltipValues
|
||||
{
|
||||
String STATIC_TEXT = "staticText";
|
||||
String TOOLTIP_DYNAMIC = "tooltipDynamic";
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user