appCtxt.getCurrentController();
diff --git a/zimlet/src/i18n/com_zextras_drive_open.properties b/zimlet/src/i18n/com_zextras_drive_open.properties
index 0895a2a..296c861 100644
--- a/zimlet/src/i18n/com_zextras_drive_open.properties
+++ b/zimlet/src/i18n/com_zextras_drive_open.properties
@@ -17,7 +17,7 @@
zimletLabel=Zimbra Drive
zimletDescription=Cloud integration for Zimbra
-tabName=Drive
+tabName=Open Drive
retry=Retry
searchZimbraDrive=File on ZDrive
zimbraDriveFolder=Drive Folder
@@ -42,4 +42,7 @@ errorUploadFileUploadNotPermitted=You have no permissions to upload some files({
errorUploadFileAlreadyExistsGeneric=Some files already exist.
errorRenameFile={0} already exists in destination Drive folder.
errorDeletingRootFolder=Root folder cannot be deleted.
-rootName=Drive
\ No newline at end of file
+rootName=Drive
+errorCreateNewFolder=Error during the creation of the new folder
+errorUpload=Error during the upload of the file
+errorDelete=Error during the delete of the file
\ No newline at end of file
diff --git a/zimlet/src/view/DetailListView.ts b/zimlet/src/view/DetailListView.ts
index 65cac28..fa61231 100644
--- a/zimlet/src/view/DetailListView.ts
+++ b/zimlet/src/view/DetailListView.ts
@@ -38,6 +38,7 @@ import {DwtDragEvent} from "../zimbra/ajax/dwt/dnd/DwtDragEvent";
import {DwtDropEvent} from "../zimbra/ajax/dwt/dnd/DwtDropEvent";
import {AjxMessageFormat} from "../zimbra/ajax/util/AjxText";
import {AjxEnv} from "../zimbra/ajax/boot/AjxEnv";
+import {AjxStringUtil} from "../zimbra/ajax/util/AjxStringUtil";
export class DetailListView extends ZimbraDriveBaseView {
@@ -183,7 +184,7 @@ export class DetailListView extends ZimbraDriveBaseView {
} else if (field === ZimbraDriveItem.F_DATE) {
htmlArr[idx++] = "";
} else if (field === ZimbraDriveItem.F_FROM) {
- htmlArr[idx++] = zimbraDriveItem.getAuthor();
+ htmlArr[idx++] = AjxStringUtil.htmlEncode(zimbraDriveItem.getAuthor());
} else if (field === ZimbraDriveItem.F_FOLDER) {
zimbraDriveItem.setParentNameElId(this._getFieldId(zimbraDriveItem, ZimbraDriveItem.F_FOLDER));
htmlArr[idx++] = "" + zimbraDriveItem.getParentName() + "
";
@@ -206,7 +207,7 @@ export class DetailListView extends ZimbraDriveBaseView {
} else if (field === ZimbraDriveItem.F_DATE) {
htmlArr[idx++] = AjxDateUtil.simpleComputeDateStr(new Date(zimbraDriveItem.getModifiedTimeMillis()));
} else if (field === ZimbraDriveItem.F_FROM) {
- htmlArr[idx++] = zimbraDriveItem.getAuthor();
+ htmlArr[idx++] = AjxStringUtil.htmlEncode(zimbraDriveItem.getAuthor());
} else if (field === ZimbraDriveItem.F_FOLDER) {
zimbraDriveItem.setParentNameElId(this._getFieldId(zimbraDriveItem, ZimbraDriveItem.F_FOLDER));
htmlArr[idx++] = "" + zimbraDriveItem.getParentName() + "
";
diff --git a/zimlet/src/view/PreviewView.ts b/zimlet/src/view/PreviewView.ts
index 180e280..194bbed 100644
--- a/zimlet/src/view/PreviewView.ts
+++ b/zimlet/src/view/PreviewView.ts
@@ -229,7 +229,7 @@ export class PreviewView extends DwtComposite {
this.getElement("modified").innerHTML = dateFormatter.format(new Date(item.getModifiedTimeMillis()));
}
if (this.getElement("creator"))
- this.getElement("creator").innerHTML = item.getAuthor();
+ this.getElement("creator").innerHTML = AjxStringUtil.htmlEncode(item.getAuthor());
if (this.getElement("lock"))
this.getElement("lock").innerHTML = AjxImg.getImageHtml(!item.getPermissions().writable ? "Padlock" : "Blank_16");
@@ -278,7 +278,7 @@ export class PreviewView extends DwtComposite {
this.getElement("name").innerHTML = AjxStringUtil.htmlEncode(item.getName());
this.getElement("image").className = "ImgBriefcase_48";
if (this.getElement("modifier"))
- this.getElement("modifier").innerHTML = item.getAuthor();
+ this.getElement("modifier").innerHTML = AjxStringUtil.htmlEncode(item.getAuthor());
this._setIframeContent(AjxTemplate.expand("briefcase.Briefcase#FolderPreview"));
}
diff --git a/zimlet/src/view/ZimbraDriveUploadDialog.ts b/zimlet/src/view/ZimbraDriveUploadDialog.ts
index 22ffd91..b2f5193 100644
--- a/zimlet/src/view/ZimbraDriveUploadDialog.ts
+++ b/zimlet/src/view/ZimbraDriveUploadDialog.ts
@@ -158,7 +158,7 @@ export class ZimbraDriveUploadDialog extends ZmUploadDialog {
alreadyExistsFiles.push(this._fileMapIdName[id]);
}
}
- else if (status === ZimbraDriveUploadDialog.FILE_ALREADY_EXISTS_STATUS_CODE) {
+ else if (status === ZimbraDriveUploadDialog.NOT_PERMITTED_EXCEPTION_STATUS_CODE) {
if (this._fileMapIdName.hasOwnProperty(id)) {
filesUploadNotPermitted.push(this._fileMapIdName[id]);
}
@@ -182,7 +182,7 @@ export class ZimbraDriveUploadDialog extends ZmUploadDialog {
level = ZmStatusView.LEVEL_WARNING;
}
else if (filesUploadNotPermitted.length > 0) {
- ZimbraDriveApp.getMessage("errorUploadFileUploadNotPermitted", [filesUploadNotPermitted.join(", ")]);
+ msg = ZimbraDriveApp.getMessage("errorUploadFileUploadNotPermitted", [filesUploadNotPermitted.join(", ")]);
level = ZmStatusView.LEVEL_WARNING;
}
break;