From 4e6afd7ce08c92e2c1976a0f77c18900375b2a79 Mon Sep 17 00:00:00 2001 From: gasparez15 Date: Thu, 31 Oct 2024 12:50:29 +0100 Subject: [PATCH] Fixed copyToClipBoard and compilation issues --- .../java/com/logicaldoc/gui/common/client/util/Util.java | 5 ++--- .../gui/frontend/client/tenant/TenantQuotaPanel.java | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/logicaldoc-gui/src/main/java/com/logicaldoc/gui/common/client/util/Util.java b/logicaldoc-gui/src/main/java/com/logicaldoc/gui/common/client/util/Util.java index 8956a239b..4ef1027cf 100644 --- a/logicaldoc-gui/src/main/java/com/logicaldoc/gui/common/client/util/Util.java +++ b/logicaldoc-gui/src/main/java/com/logicaldoc/gui/common/client/util/Util.java @@ -518,9 +518,8 @@ public static void copyText(String text) { * @param text the content to put into the clipboards * @return The formated file size. */ - private static native void writeToClipboard(String text) /*-{ - // navigator.clipboard.writeText(text); - copy(text); + public static native void writeToClipboard(String text) /*-{ + $wnd.copy(text); }-*/; /** diff --git a/logicaldoc-gui/src/main/java/com/logicaldoc/gui/frontend/client/tenant/TenantQuotaPanel.java b/logicaldoc-gui/src/main/java/com/logicaldoc/gui/frontend/client/tenant/TenantQuotaPanel.java index e08dc58ac..2d419080f 100644 --- a/logicaldoc-gui/src/main/java/com/logicaldoc/gui/frontend/client/tenant/TenantQuotaPanel.java +++ b/logicaldoc-gui/src/main/java/com/logicaldoc/gui/frontend/client/tenant/TenantQuotaPanel.java @@ -84,7 +84,7 @@ public void refresh() { SpinnerItem usersQuota = ItemFactory.newSpinnerItem(USERSQUOTA, tenant.getMaxUsers()); usersQuota.setDisabled(readonly); usersQuota.setRequired(false); - usersQuota.setMin(tenant.getUsers()); + usersQuota.setMin((double) tenant.getUsers()); usersQuota.setStep(1); usersQuota.setWidth(80); if (!readonly) @@ -93,7 +93,7 @@ public void refresh() { SpinnerItem guestsQuota = ItemFactory.newSpinnerItem(GUESTSQUOTA, "readonlyusersquota", tenant.getMaxGuests()); guestsQuota.setDisabled(readonly); guestsQuota.setRequired(false); - guestsQuota.setMin(tenant.getGuests()); + guestsQuota.setMin((double) tenant.getGuests()); guestsQuota.setStep(1); guestsQuota.setWidth(80); if (!readonly)