/** * Yona, 21st Century Project Hosting SW *

* Copyright Yona & Yobi Authors & NAVER Corp. & NAVER LABS Corp. * https://yona.io **/ yobi.Attachments = function(htOptions) { var htVar = {}; var htElements = {}; /** * initialize fileUploader * * @param {Hash Table} htOptions * @param {Variant} htOptions.elContainer * @param {Variant} htOptions.elTextarea * @param {String} htOptions.sTplFileList * @param {String} htOptions.sTplFileItem * @param {String} htOptions.sResourceId * @param {String} htOptions.sResourceType * @param {String} htOptions.sUploaderID */ function _init(htOptions){ htOptions = htOptions || {}; _initVar(htOptions); _initElement(htOptions); // Request attachments only if the container is specified. if (htVar.attachments) { _updateAttachments(htVar.attachments); } else if ((htVar.sResourceType && htVar.sResourceId) || htVar.attachments) { _requestList(); } if(htOptions.sUploaderId){ _attachUploaderEvent(htOptions.sUploaderId); } } /** * @param {Hash Table} htOptions */ function _initVar(htOptions){ var sFileLink = '${fileName}(${fileSizeReadable})'; var sFileDownloadLink = ''; htVar.sTplFileList = htOptions.sTplFileList || '