| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127 |
- <#def designatedPath="/works/materialCatList.htm"/>
- <script language="javascript">
- <!--
- ${Scripts.doSelectBox()}
- ${Scripts.doClearForm()}
- function doUpdateKeywords(mid, keywords)
- {//打标签
- var ajax = new Z.Ajax();
- ajax.setClassName("WorksPresenter");
- ajax.setMethodName("doUpdateMaterialKeywords");
- ajax.addParam("mid", mid);
- ajax.addParam("keywords", keywords);
- ajax.execute();
- }
- function doUpdateStatus(mid, resStatus)
- {//修改状态
- var ajax = new Z.Ajax();
- ajax.setClassName("WorksPresenter");
- ajax.setMethodName("doUpdateMaterialStatus");
- ajax.addParam("mid", mid);
- ajax.addParam("resStatus", resStatus);
- ajax.execute();
- }
- function doUpdateSeq(mid, resSeq)
- {//修改序号
- var ajax = new Z.Ajax();
- ajax.setClassName("WorksPresenter");
- ajax.setMethodName("doUpdateMaterialSeq");
- ajax.addParam("mid", mid);
- ajax.addParam("resSeq", resSeq);
- ajax.execute();
- }
- function doDeleteWorksMaterial(mid)
- {//删除作品
- var ajax = new Z.Ajax();
- ajax.setClassName("WorksPresenter");
- ajax.setMethodName("doDeleteWorksMaterial");
- ajax.addParam("mid", mid);
- ajax.setFailureAlert();
- ajax.setSuccess(function(){
- Z.tips("删除成功");
- Z.L.reload();
- });
- ajax.execute();
- }
- function doDialogWorksMaterial()
- {//上传作品素材
- var dialog = new Z.Dialog();
- dialog.shadow = true;
- dialog.title = "上传作品素材";
- dialog.fixed = true;
-
- dialog.url = "/works/materialContAdd.htm";
- dialog.width = Z.D.clientWidth()-600;
- dialog.height =Z.D.clientHeight()-400;
- dialog.execute();
- }
- //-->
- </script>
- ${zhiqim_manager_breadcrumb("素材列表")}
- <div class="content">
- <#-- 导航栏 -->
- <div data-role="z-tabnav" class="z-tabnav-main z-mg-b20 z-blue">
- <nav>
- <ul>
- <#if ZmrPathRule.check(request, "/works/materialCatList.htm")><li onclick="Z.Location.href('/works/materialCatList.htm');">分类管理</li></#if>
- <#if ZmrPathRule.check(request, "/works/materialContList.htm")><li class="z-active">素材管理</li></#if>
- </ul>
- <div class="z-float-left z-mg10">
- <form name="theForm" method="post" action="/works/materialContList.htm">
- <select id="catId" name="catId" class="z-float-left z-select z-w100" data-role="z-select" data-class="${zmr_color_class}" >
- <option value="">全部</option>
- <#for cat : Global.get(DesMaterialCatCache.class).list()>
- <option value="${cat.getCatId()}" <#if cat.getCatId() == catId>selected</#if>>${cat.getCatName()}</option>
- </#for>
- </select>
- <input name="keywords" class="z-float-left ${zmr_color_class} z-input z-w150 z-mg-l4" value="${keywords}" maxlength="16" placeholder="关键字">
- <button class="z-float-left z-button z-w80 zi-bd-rd0 z-blue"><i class="z-font z-query"></i>查询</button>
- </form>
- </div>
- <div class="z-text-right z-mg-t10 z-mg-r5">
- <button class="z-button z-h30 ${zmr_color_class}" onclick="doDialogWorksMaterial();"><i class="z-font z-add"></i> 添加素材</button>
- </div>
- </nav>
- </div>
- <table class="z-table z-bordered z-bg-white z-pd6">
- <tr class="z-text-center z-h40 z-bg-gray">
- <td width=80>选择</td>
- <td width="100">分类</td>
- <td width="100">状态</td>
- <td width="100">序号</td>
- <td width="15%">关键字</td>
- <td width="80">文件格式</td>
- <td width="*">预览图</td>
- <td width="80">操作</td>
- </tr>
- <#if pageResult.size() == 0>
- ${zhiqim_manager_no_record (10, "暂时没有素材信息")}
- </#if>
- <#for item : pageResult.list()>
- <tr valign="middle" bgcolor=<#if item_index % 2 == 0>${zmr_tr_odd_bgcolor}<#else>${zmr_tr_even_bgcolor}</#if> class="z-text-center z-h60">
- <td><input name="mid" type="radio" data-role="z-radio" data-class="${zmr_color_class}" value="${item.getMid()}"></td>
- <td>${Global.get(DesMaterialCatCache.class).name(item.getCatId())}</td>
- <td>
- <select class="z-select z-blue" onchange="doUpdateStatus(${item.getMid()}, this.value);">
- <option value="0" <#if item.getMaterialStatus()=0>selected</#if>>正常</option>
- <option value="1" <#if item.getMaterialStatus()=1>selected</#if> class="z-text-red"><font class="z-text-red">停用</font></option>
- </select></td>
- <td><input class="z-input z-w100" value="${item.getMaterialSeq()}" onblur="doUpdateSeq(${item.getMid()}, this.value);" data-options="type:Integer;paste:true;" ></td>
- <td><input class="z-input z-w200" value="${item.getKeywords()}" onblur="doUpdateKeywords(${item.getMid()}, this.value);"></td>
- <td>${item.getMaterialSuffix()}</td>
- <td><#if Validates.isNotEmpty(item.getThumbUrl())><img src="${item.getThumbUrl()}" style="max-width:70px;"></#if></td>
- <td><button class="z-button z-h30 ${zmr_color_class}" onclick="doDeleteWorksMaterial('${item.getMid()}');">删除</button></td>
- </tr>
- </#for>
- </table>
- ${zhiqim_manager_paging (pageResult, "/works/materialContList.htm")}
- </div>
|