templateMy.zml 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. <#def designatedPath="/allTemplate.htm"/>
  2. <script>
  3. Z.onload(function()
  4. {
  5. doTemplateSearch("1");
  6. })
  7. function doTemplateAdd()
  8. {
  9. var dialog = new Z.Dialog();
  10. dialog.title = "新建我的模板";
  11. dialog.url = "newMyTemplate.htm";
  12. dialog.width = 800;
  13. dialog.height = 480;
  14. dialog.fixed = true;
  15. dialog.execute();
  16. }
  17. function doTemplateSearch(page)
  18. {
  19. var ajax = new Z.Ajax();
  20. ajax.setClassName("TemplatePresenter");
  21. ajax.setMethodName("doTemplateSearch");
  22. ajax.addParam("page", page);
  23. ajax.addParam("urlParam", "MY");
  24. ajax.addParam("typeId", Z("#typeId").val());
  25. ajax.addParam("industryId", Z("#industryId").val());
  26. ajax.addParam("fileType", Z("#fileType").val());
  27. ajax.setCallback("resultWrap");
  28. ajax.setLoading("resultWrap");
  29. ajax.execute();
  30. }
  31. function externalDraftUpload(templateSrc,typeName){
  32. var ajax = new Z.Ajax();
  33. ajax.setClassName("WorksPresenter");
  34. ajax.setMethodName("doQueryOperatorTemplateDesc");
  35. ajax.setSuccess(function(){
  36. var templateId = Z.J.toObject(this.responseText);
  37. if(templateId !=0){
  38. var dialog = new Z.Dialog();
  39. dialog.shadow = true;
  40. dialog.title = "上传外部稿件";
  41. dialog.fixed = true;
  42. dialog.url = "externalDraftUpload.htm?mediaId="+templateId+"&templatePage=MY&templateSrc="+templateSrc+"&typeName="+typeName;;
  43. dialog.width = 800;
  44. dialog.height =300;
  45. dialog.execute();
  46. }
  47. doTemplateSearch("1");
  48. });
  49. ajax.execute();
  50. }
  51. </script>
  52. ${Styles.src("/zinc/css/design_2018102301.css")}
  53. ${Scripts.src("/zinc/js/design_2018102301.js")}
  54. ${zhiqim_manager_breadcrumb("我的模板")}
  55. ${zhiqim_manager_content()}
  56. <#-- 导航栏 -->
  57. <div class="z-tabnav-main z-blue z-mg-b20">
  58. <nav>
  59. <ul>
  60. <li onclick="Z.Location.href('templateDraftMy.htm');">我的订单草稿</li>
  61. <li onclick="Z.Location.href('templateOrderMy.htm');">我的订单模板</li>
  62. <li class="z-active">我的模板</li>
  63. <li onclick="Z.Location.href('templateCollect.htm');">我收藏的</li>
  64. <li onclick="Z.Location.href('templateShare.htm');">分享给我的</li>
  65. <li onclick="Z.Location.href('allTemplate.htm');">所有模板</li>
  66. <!-- <li onclick="Z.Location.href('bestTemplate.htm');">精品模板</li> -->
  67. <#if ZmrPathRule.check(request, "/templateAudit.htm")><li onclick="Z.Location.href('templateAudit.htm');">模板审核</li></#if>
  68. <!-- <#if ZmrPathRule.check(request, "/templateBestAudit.htm")><li onclick="Z.Location.href('templateBestAudit.htm');">精品审核</li></#if> -->
  69. <#if ZmrPathRule.check(request, "/desTemplateLogList.htm")><li onclick="Z.Location.href('desTemplateLogList.htm');">模版日志</li></#if>
  70. </ul>
  71. <div class="z-float-right z-mg-t10 z-mg-r5">
  72. <button class="z-button z-w130 z-mg-r20 ${zmr_color_class}" onclick="doTemplateAdd();"><i class="z-font z-add"></i>新建模板</button>
  73. </div>
  74. </nav>
  75. </div>
  76. <table class="z-table z-bordered z-pd6">
  77. <input type="hidden" id="typeId" name="typeId" value="">
  78. <input type="hidden" id="industryId" name="industryId" value="">
  79. <input type="hidden" id="fileType" name="fileType" value="">
  80. <tr class="z-h40" bgcolor="${oddColor}">
  81. <td width="5%">类型:${typeId}</td>
  82. <td width="*">
  83. <button type="button" data-options="group:typeId" class="z-button z-large z-bordered z-blue-bd z-hover <#if typeId == -1 || Validates.isEmpty(typeId)>z-active</#if>" onclick="{Z(this).toggleClass('z-active');Z('#typeId').val('');};doTemplateSearch('1');">全部</button>
  84. <#for item : DesignTypeDao.listTemmplate()>
  85. <button type="button" data-options="group:typeId" class="z-button z-large z-bordered z-blue-bd z-hover z-mg-t3 <#if item.getTypeId() == typeId>z-active</#if>" onclick="{Z(this).toggleClass('z-active');Z('#typeId').val(${item.getTypeId()});};doTemplateSearch('1');">${item.getTypeName()}</button>
  86. </#for>
  87. </td>
  88. </tr>
  89. <tr class="z-h40" bgcolor="#FFFFFF">
  90. <td>行业:</td>
  91. <td>
  92. <button type="button" data-options="group:industryId" class="z-button z-large z-bordered z-blue-bd z-hover <#if industryId == -1 || Validates.isEmpty(industryId)>z-active</#if>" onclick="{Z(this).toggleClass('z-active');Z('#industryId').val('');};doTemplateSearch('1');">全部</button>
  93. <#for item : Global.get(DesignIndustryCache.class).getIndustryList()>
  94. <button type="button" data-options="group:industryId" class="z-button z-large z-bordered z-blue-bd z-hover z-mg-t3 <#if item.getIndustryId() == industryId>z-active</#if>" onclick="{Z(this).toggleClass('z-active');Z('#industryId').val(${item.getIndustryId()});};doTemplateSearch('1');">${item.getIndustryName()}</button>
  95. </#for>
  96. </td>
  97. </tr>
  98. <tr class="z-h40" bgcolor="${oddColor}">
  99. <td width="5%">文件格式:</td>
  100. <td width="*">
  101. <button type="button" data-options="group:fileType" class="z-button z-large z-bordered z-blue-bd z-hover z-active" onclick="Z.EL.toggleClass(this,'z-active');Z('#fileType').val('');doTemplateSearch('1');">全部</button>
  102. <button type="button" data-options="group:fileType" class="z-button z-large z-bordered z-blue-bd z-hover" onclick="Z.EL.toggleClass(this,'z-active');Z('#fileType').val('CDR');doTemplateSearch('1');">CDR</button>
  103. <button type="button" data-options="group:fileType" class="z-button z-large z-bordered z-blue-bd z-hover" onclick="Z.EL.toggleClass(this,'z-active');Z('#fileType').val('PSD');doTemplateSearch('1');">PSD</button>
  104. <button type="button" data-options="group:fileType" class="z-button z-large z-bordered z-blue-bd z-hover" onclick="Z.EL.toggleClass(this,'z-active');Z('#fileType').val('AI');doTemplateSearch('1');">AI</button>
  105. <button type="button" data-options="group:fileType" class="z-button z-large z-bordered z-blue-bd z-hover" onclick="Z.EL.toggleClass(this,'z-active');Z('#fileType').val('RAR');doSearchAjax('1');">RAR</button>
  106. <button type="button" data-options="group:fileType" class="z-button z-large z-bordered z-blue-bd z-hover" onclick="Z.EL.toggleClass(this,'z-active');Z('#fileType').val('PDF');doTemplateSearch('1');">PDF</button>
  107. </td>
  108. </tr>
  109. </table>
  110. <div id="resultWrap"></div>
  111. <!-- 浮动选中框 end -->
  112. ${zhiqim_manager_content_end()}