diff --git a/README.md b/README.md
index 3871114..a428fe2 100644
--- a/README.md
+++ b/README.md
@@ -198,6 +198,7 @@ This Zimlet offers support for Seafile. Read more https://github.com/Zimbra-Comm
3. Running a WebDAV server behind and NGINX reverse proxy (from CentOS or Debian) won't work, it will work when proper options are enabled (as for example with zimbra-proxy, also based on NGINX).
4. Delay of 30 seconds in response from Nextcloud, the brute force login protection has kicked in. Configure X-Forwarded-For see above! Or and this is not recommended: set in your Nextcloud the preference `'auth.bruteforce.protection.enabled' => false,` and issue `truncate table bruteforce_attempts;`
5. Download menu option does not work on Safari on iPad, solution: disable pop-up blocker
+6. Public link sharing does not work. Install the `File sharing` app on Nextcloud and disable Password Policy (if needed). Also you must have (re)sharing rights in Nextcloud for public link share to work.
See:
https://github.com/Zimbra-Community/owncloud-zimlet/wiki/Troubleshooting
diff --git a/zimlet/OwnCloudListView.js b/zimlet/OwnCloudListView.js
index b760fe1..1f281f5 100644
--- a/zimlet/OwnCloudListView.js
+++ b/zimlet/OwnCloudListView.js
@@ -430,37 +430,33 @@ OwnCloudListView.prototype._sendFileListener = function(ev) {
if(owncloud_zimlet_disable_ocs_public_link_shares != 'true')
{
html += '
'
- +(zimletInstance.getMessage('publicLinkFileFolder') != '' ?
- zimletInstance.getMessage('publicLinkFileFolder')
- : ZmMsg.shareWithPublic)
+ +(zimletInstance.getMessage('publicLinkFileFolder').indexOf('???') == 0 ?
+ ZmMsg.shareWithPublic :zimletInstance.getMessage('publicLinkFileFolder')
+ )
+' ';
var passwordPlaceholder = '';
if (tk_barrydegraaff_owncloud_zimlet_HandlerObject.settings['owncloud_zimlet_link_enforce_password'] == 'true')
{
- passwordPlaceholder = zimletInstance.getMessage('requiredPassword') != '' ?
- zimletInstance.getMessage('requiredPassword')
- : (ZmMsg.requiredLabel).toLowerCase() + ' ' + (ZmMsg.password).toLowerCase();
+ passwordPlaceholder = zimletInstance.getMessage('requiredPassword').indexOf('???') == 0 ?
+ (ZmMsg.requiredLabel).toLowerCase() + ' ' + (ZmMsg.password).toLowerCase() : zimletInstance.getMessage('requiredPassword');
}
else
{
- passwordPlaceholder = zimletInstance.getMessage('optionalPassword') != '' ?
- zimletInstance.getMessage('optionalPassword')
- : (ZmMsg.optionalInvitees).toLowerCase() + ' ' + (ZmMsg.password).toLowerCase();
+ passwordPlaceholder = zimletInstance.getMessage('optionalPassword').indexOf('???') == 0 ?
+ (ZmMsg.optionalInvitees).toLowerCase() + ' ' + (ZmMsg.password).toLowerCase() : zimletInstance.getMessage('optionalPassword');
}
html += ' ';
var expiryDateLabel = '';
if (tk_barrydegraaff_owncloud_zimlet_HandlerObject.settings['owncloud_zimlet_link_enforce_date'] == 'true')
{
- expiryDateLabel = zimletInstance.getMessage('requiredExpiryDate') != '' ?
- zimletInstance.getMessage('requiredExpiryDate')
- : zimletInstance.getMessage('expiryDate') + " ("+ZmMsg.requiredLabel.toLowerCase().replace(":","")+")";
+ expiryDateLabel = zimletInstance.getMessage('requiredExpiryDate').indexOf('???') == 0 ?
+ zimletInstance.getMessage('expiryDate') + " ("+ZmMsg.requiredLabel.toLowerCase().replace(":","")+")" : zimletInstance.getMessage('requiredExpiryDate');
}
else
{
- expiryDateLabel = zimletInstance.getMessage('optionalExpiryDate') != '' ?
- zimletInstance.getMessage('optionalExpiryDate')
- : zimletInstance.getMessage('expiryDate') + " ("+ZmMsg.optionalLabel.toLowerCase().replace(":","")+")";
+ expiryDateLabel = zimletInstance.getMessage('optionalExpiryDate').indexOf('???') == 0 ?
+ zimletInstance.getMessage('expiryDate') + " ("+ZmMsg.optionalLabel.toLowerCase().replace(":","")+")" : zimletInstance.getMessage('optionalExpiryDate');
}
//prevent selection of day in the past
diff --git a/zimlet/OwnCloudTabView.js b/zimlet/OwnCloudTabView.js
index bb576e5..ac174a1 100644
--- a/zimlet/OwnCloudTabView.js
+++ b/zimlet/OwnCloudTabView.js
@@ -33,9 +33,8 @@ function OwnCloudTabView(parent, zimletCtxt, davConnector, ownCloudConnector, oc
checked: true,
name: 'ownCloudZimletShareTypeSelector'
});
- this._checkboxf.setText(zimletInstance.getMessage('attachFileFolder') != '' ?
- zimletInstance.getMessage('attachFileFolder')
- : ZmMsg.attach.charAt(0).toUpperCase() + ZmMsg.attach.slice(1) + " " + (ZmMsg.file).toLowerCase() + "/" + (ZmMsg.folder).toLowerCase());
+ this._checkboxf.setText(zimletInstance.getMessage('attachFileFolder').indexOf('???') == 0 ?
+ ZmMsg.attach.charAt(0).toUpperCase() + ZmMsg.attach.slice(1) + " " + (ZmMsg.file).toLowerCase() + "/" + (ZmMsg.folder).toLowerCase() : zimletInstance.getMessage('attachFileFolder'));
this._tree = new DwtTree({
parent: this,
@@ -53,9 +52,9 @@ function OwnCloudTabView(parent, zimletCtxt, davConnector, ownCloudConnector, oc
style: DwtCheckbox.TEXT_RIGHT,
name: 'ownCloudZimletShareTypeSelector'
});
- this._checkbox.setText(zimletInstance.getMessage('publicLinkFileFolder') != '' ?
- zimletInstance.getMessage('publicLinkFileFolder') :
- ZmMsg.shareWithPublic + " " + (ZmMsg.linkTo).toLowerCase() + " " + (ZmMsg.file).toLowerCase() + "/" + (ZmMsg.folder).toLowerCase());
+ this._checkbox.setText(zimletInstance.getMessage('publicLinkFileFolder').indexOf('???') == 0 ?
+ ZmMsg.shareWithPublic + " " + (ZmMsg.linkTo).toLowerCase() + " " + (ZmMsg.file).toLowerCase() + "/" + (ZmMsg.folder).toLowerCase() : zimletInstance.getMessage('publicLinkFileFolder'));
+
this._sharePasswordTxt = new DwtText({
parent: this,
@@ -73,23 +72,20 @@ function OwnCloudTabView(parent, zimletCtxt, davConnector, ownCloudConnector, oc
}
else
{
- this._sharePassword._inputField.placeholder = zimletInstance.getMessage('optionalPassword') != '' ?
- zimletInstance.getMessage('optionalPassword')
- : (ZmMsg.optionalInvitees).toLowerCase() + " " + (ZmMsg.password).toLowerCase();
+ this._sharePassword._inputField.placeholder = zimletInstance.getMessage('optionalPassword').indexOf('???') == 0 ?
+ (ZmMsg.optionalInvitees).toLowerCase() + " " + (ZmMsg.password).toLowerCase() : zimletInstance.getMessage('optionalPassword');
}
var expiryDateLabel = '';
if (tk_barrydegraaff_owncloud_zimlet_HandlerObject.settings['owncloud_zimlet_link_enforce_date'] == 'true')
{
- expiryDateLabel = zimletInstance.getMessage('requiredExpiryDate') != '' ?
- zimletInstance.getMessage('requiredExpiryDate')
- : zimletInstance.getMessage('expiryDate') + " ("+ZmMsg.requiredLabel.toLowerCase().replace(":","")+")";
+ expiryDateLabel = zimletInstance.getMessage('requiredExpiryDate').indexOf('???') == 0 ?
+ zimletInstance.getMessage('expiryDate') + " ("+ZmMsg.requiredLabel.toLowerCase().replace(":","")+")" : zimletInstance.getMessage('requiredExpiryDate');
}
else
{
- expiryDateLabel = zimletInstance.getMessage('optionalExpiryDate') != '' ?
- zimletInstance.getMessage('optionalExpiryDate')
- : zimletInstance.getMessage('expiryDate') + " ("+ZmMsg.optionalLabel.toLowerCase().replace(":","")+")";
+ expiryDateLabel = zimletInstance.getMessage('optionalExpiryDate').indexOf('???') == 0 ?
+ zimletInstance.getMessage('expiryDate') + " ("+ZmMsg.optionalLabel.toLowerCase().replace(":","")+")" : zimletInstance.getMessage('optionalExpiryDate');
}
this._shareExpiryDate = new DwtInputField({
@@ -100,7 +96,7 @@ function OwnCloudTabView(parent, zimletCtxt, davConnector, ownCloudConnector, oc
//Internet Explorer 11 does not like `.type = 'date'`, if
//we drop support for IE11, we can enable a date picker here
//this._shareExpiryDate._inputField.type = 'date';
- this._shareExpiryDate._inputField.placeholder = zimletInstance.getMessage('datePlaceholder');
+ this._shareExpiryDate._inputField.placeholder = zimletInstance.getMessage('datePlaceholder').indexOf('???') == 0 ? "YYYY-MM-DD" : zimletInstance.getMessage('datePlaceholder');
var expiryDays = '';
if (tk_barrydegraaff_owncloud_zimlet_HandlerObject.settings['owncloud_zimlet_link_expiry_days'] != '')
diff --git a/zimlet/tk_barrydegraaff_owncloud_zimlet.js b/zimlet/tk_barrydegraaff_owncloud_zimlet.js
index 718fcee..f91629c 100644
--- a/zimlet/tk_barrydegraaff_owncloud_zimlet.js
+++ b/zimlet/tk_barrydegraaff_owncloud_zimlet.js
@@ -1,6 +1,6 @@
/*
This file is part of the Zimbra ownCloud Zimlet project.
- Copyright (C) 2015-2021 Barry de Graaff
+ Copyright (C) 2015-2019 Barry de Graaff
Bugs and feedback: https://github.com/barrydegraaff/owncloud-zimlet/issues
@@ -761,10 +761,7 @@ ownCloudZimlet.prototype.showAttachmentDialog =
function() {
var attachDialog = this._attachDialog = appCtxt.getAttachDialog();
var zimletInstance = appCtxt._zimletMgr.getZimletByName('tk_barrydegraaff_owncloud_zimlet').handlerObject;
- attachDialog.setTitle(zimletInstance.getMessage('attachFrom') != '' ?
- AjxMessageFormat.format(zimletInstance.getMessage('attachFrom'),
- [zimletInstance._zimletContext.getConfig("owncloud_zimlet_app_title")])
- : ZmMsg.attach + ' ' + (ZmMsg.from).toLowerCase() + ' ' + zimletInstance._zimletContext.getConfig("owncloud_zimlet_app_title"));
+ attachDialog.setTitle(zimletInstance._zimletContext.getConfig("owncloud_zimlet_app_title"));
this.removePrevAttDialogContent(attachDialog._getContentDiv().firstChild);
if (!this.AttachContactsView || !this.AttachContactsView.attachDialog){