externalDraftDownload.zml 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. ${Scripts.src(zhiqim_uploadlarge.js)}
  2. <script>
  3. function doFileDownload(filetype,url){
  4. if(filetype=='pdf'){
  5. var fileName = ${mediaId} + ".pdf";
  6. var element1 = document.createElement("a");
  7. element1.href = url;
  8. element1.setAttribute("download", fileName);
  9. element1.click();
  10. }else{
  11. window.open(url);
  12. }
  13. }
  14. </script>
  15. <table class="z-table z-bordered z-pd10 z-bg-white">
  16. <tr height="80">
  17. <td width="15%">请选择:</td>
  18. <td width="85%">
  19. <#if Validates.isNotEmpty(urlMap.get("pdf"))>
  20. <button type="button" class="z-button z-large ${zmr_color_class} zi-mg-l5" onclick="doFileDownload('pdf','${urlMap.get("pdf")}');">
  21. PDF文件下载</button>
  22. </#if>
  23. <#if Validates.isNotEmpty(urlMap.get("cdr"))>
  24. <button type="button" class="z-button z-large ${zmr_color_class} zi-mg-l5" onclick="doFileDownload('cdr','${urlMap.get("cdr")}');">
  25. CDR文件下载</button>
  26. </#if>
  27. <#if Validates.isNotEmpty(urlMap.get("psd"))>
  28. <button type="button" class="z-button z-large ${zmr_color_class} zi-mg-l5" onclick="doFileDownload('psd','${urlMap.get("psd")}')">
  29. PSD文件下载</button>
  30. </#if>
  31. <#if Validates.isNotEmpty(urlMap.get("ai"))>
  32. <button type="button" class="z-button z-large ${zmr_color_class} zi-mg-l5" onclick="doFileDownload('ai','${urlMap.get("ai")}');">
  33. AI文件下载</button>
  34. </#if>
  35. </td>
  36. </tr>
  37. </table>