templatePreviewInfo.zml 1.6 KB

1234567891011121314151617181920212223242526272829303132333435
  1. <#if svgMap.isEmpty()>
  2. <div class="z-w100p z-h50 z-text-center z-px18">请选择模板</div>
  3. <#else>
  4. <script>
  5. function templateSelectedEdit(mediaId)
  6. {
  7. var newUrl = "/zhiqimMediaEditor/mediaDesign.htm?";
  8. newUrl += "mediaId=" + mediaId + "&"
  9. newUrl += "designWidth="+${type.getSizeMWidth()}+"&"
  10. newUrl += "designHeight="+${type.getSizeMHeight()}+"&"
  11. newUrl += "printWidth="+${designOrder.getPrintWidth()}+"&"
  12. newUrl += "printHeight="+${designOrder.getPrintHeight()}+"&";
  13. newUrl += "bleedSize="+${sizeItem.getSizeBleed()}+"&"
  14. newUrl += "orderIsCardType="+${orderIsCardType}+"&"
  15. window.open(newUrl);
  16. }
  17. </script>
  18. <div class="svgTemplateList">
  19. <#for key : svgMap.keySet()>
  20. <#var item = svgMap.get(key)/>
  21. <div id="sel_${item.getMediaId()}" class="svgTemplateItem" onmouseenter='Z(this).children(".itemCtrBar").show();' onmouseleave='Z(this).children(".itemCtrBar").hide();'>
  22. <#if item != null>
  23. <#for bg : item.getBgList()>
  24. <div class="showSvg">${bg.getSvgCode()}</div>
  25. </#for>
  26. </#if>
  27. <span class="itemCtrBar z-absolute z-w100p z-pd10 z-hide">
  28. <button type="button" class="z-button modelCheckBtn z-blue z-float-left" onclick="templateSelectedEdit('${key}');"><i class="z-font z-px12 z-success"></i>编辑</button>
  29. <button type="button" class="z-button modelCheckBtn z-red z-float-right" onclick="doTemplateDelete('${key}')"><i class="z-font z-px12 z-error"></i>删除</button>
  30. </span>
  31. <div class="z-lh30 z-px16 z-color-gray">${item.getMediaId()}</div>
  32. </div>
  33. </#for>
  34. </div>
  35. </#if>