/*
 * DEXTUploadX5 - event functions for the ActiveX
 * http://www.dextsolution.com
 *
 * Copyright ⓒ DEXTSolution Inc.
 */
window.onDX5_AX_Error = function (vObjectID, vError) { var err = vError || ";"; var tokens = err.split(/;/); var code = tokens[0]; var message = (tokens.length == 2) ? tokens[1] : tokens[1] + "\n" + tokens.slice(2, tokens.length).join(";"); if (window.onDX5Error) { var dx = window.dx5.get(vObjectID); var strVer = ""; try { strVer = "c" + ((window.dextuploadx5Configuration && window.dextuploadx5Configuration.version) ? window.dextuploadx5Configuration.version : "unknown"); } catch (ex) { strVer = "c:unknown"; } try { strVer += "-m" + (dx ? dx.getVersion() : "unknown"); } catch (ex) { strVer += "-m:unknown"; }
strVer += "\n"; window.onDX5Error(vObjectID, code, strVer + message); } }; window.onDX5_AX_Created = function (vObjectID) { if (window.onDX5Created) window.onDX5Created(vObjectID); }; window.onDX5_AX_BeforeItemsAdd = function (vObjectID, vItemCnt) { if (window.onDX5BeforeItemsAdd) return window.onDX5BeforeItemsAdd(vObjectID, vItemCnt); }; window.onDX5_AX_ItemAdding = function (vObjectID, vItemObj) { if (window.onDX5ItemAdding) return window.onDX5ItemAdding(vObjectID, vItemObj); }; window.onDX5_AX_ItemsAdded = function (vObjectID, vAddedItemsCnt) { if (window.onDX5ItemsAdded) window.onDX5ItemsAdded(vObjectID, vAddedItemsCnt);
}; window.onDX5_AX_BeforeItemsDelete = function (vObjectID, vItemIds) { var arr = []; for (var i = 0, len = vItemIds.length; i < len; i++) arr.push(vItemIds.Item(i)); if (window.onDX5BeforeItemsDelete) return window.onDX5BeforeItemsDelete(vObjectID, arr); }; window.onDX5_AX_ItemDeleting = function (vObjectID, vItemId) { if (window.onDX5ItemDeleting) return window.onDX5ItemDeleting(vObjectID, vItemId); }; window.onDX5_AX_ItemsDeleted = function (vObjectID, vItemCnt) { if (window.onDX5ItemsDeleted) window.onDX5ItemsDeleted(vObjectID, vItemCnt); };
window.onDX5_AX_ItemSelected = function (vObjectID, vItemListIndex, vItemUniqID, vItemType) { if (window.onDX5ItemSelect) window.onDX5ItemSelect(vObjectID, vItemListIndex, vItemUniqID, vItemType); }; window.onDX5_AX_ItemChecked = function (vObjectID, vItemCnt) { if (window.onDX5ItemCheck) window.onDX5ItemCheck(vObjectID, vItemCnt); }; window.onDX5_AX_ItemClick = function (vObjectID, vItemListIndex, vItemUniqID, vItemType) { if (window.onDX5ItemClick) window.onDX5ItemClick(vObjectID, vItemListIndex, vItemUniqID, vItemType); };
window.onDX5_AX_ItemDbClick = function (vObjectID, vItemListIndex, vItemUniqID, vItemType) { if (window.onDX5ItemDoubleClick) window.onDX5ItemDoubleClick(vObjectID, vItemListIndex, vItemUniqID, vItemType); }; window.onDX5_AX_UploadBegin = function (vObjectID) { if (window.onDX5UploadBegin) window.onDX5UploadBegin(vObjectID); }; window.onDX5_AX_UploadItemStart = function (vObjectID, vItemID) { if (window.onDX5UploadItemStart) window.onDX5UploadItemStart(vObjectID, vItemID); }; window.onDX5_AX_UploadItemEnd = function (vObjectID, vItemID) { if (window.onDX5UploadItemEnd) window.onDX5UploadItemEnd(vObjectID, vItemID);
}; window.onDX5_AX_UploadComplete = function (vObjectID) { if (window.onDX5UploadCompleted) window.onDX5UploadCompleted(vObjectID); }; window.onDX5_AX_UploadStop = function (vObjectID) { if (window.onDX5UploadStopped) window.onDX5UploadStopped(vObjectID); }; window.onDX5_AX_DownloadBegin = function (vObjectID) { if (window.onDX5DownloadBegin) window.onDX5DownloadBegin(vObjectID); }; window.onDX5_AX_DownloadItemStart = function (vObjectID, vItemID) { if (window.onDX5DownloadItemStart) window.onDX5DownloadItemStart(vObjectID, vItemID); };
window.onDX5_AX_DownloadItemEnd = function (vObjectID, vItemID) { if (window.onDX5DownloadItemEnd) window.onDX5DownloadItemEnd(vObjectID, vItemID); }; window.onDX5_AX_DownloadComplete = function (vObjectID) { if (window.onDX5DownloadCompleted) window.onDX5DownloadCompleted(vObjectID); }; window.onDX5_AX_DownloadStop = function (vObjectID) { if (window.onDX5DownloadStopped) window.onDX5DownloadStopped(vObjectID); }; window.onDX5_AX_CompressComplete = function (vObjectID) { if (window.onDX5CompressCompleted) window.onDX5CompressCompleted(vObjectID); };
window.onDX5_AX_EncryptionComplete = function (vObjectID) { if (window.onDX5EncryptionCompleted) window.onDX5EncryptionCompleted(vObjectID); }; window.onDX5_AX_DecryptionComplete = function (vObjectID) { if (window.onDX5DecryptionCompleted) window.onDX5DecryptionCompleted(vObjectID); }; window.onDX5_AX_Preview = function (vObjectID, vItemListIndex, vItemUniqID, vItemLocalPath) { if (window.onDX5Preview) window.onDX5Preview(vObjectID, vItemListIndex, vItemUniqID, vItemLocalPath); }; 