first commit
This commit is contained in:
@@ -0,0 +1,89 @@
|
||||
<script>
|
||||
Z.onload(function(){
|
||||
|
||||
});
|
||||
|
||||
var catList = Z.J.toObject('${Global.get(MaterialCatCache.class).list()}');
|
||||
function doSelType(value)
|
||||
{//素材类型
|
||||
var catCode = Z("#catCode");
|
||||
catCode[0].options.length = 0;
|
||||
|
||||
var defaultCode = null;
|
||||
for(var i=0;i<catList.length;i++)
|
||||
{
|
||||
var obj = catList[i];
|
||||
if(obj.typeCode == value)
|
||||
{
|
||||
catCode[0].options.add(new Option(obj.catName, obj.catCode));
|
||||
if(defaultCode == null)
|
||||
defaultCode = obj.catCode;
|
||||
}
|
||||
}
|
||||
|
||||
Z.Select.load();
|
||||
}
|
||||
|
||||
function doSubmit()
|
||||
{//提交
|
||||
var ajax = new Z.Ajax();
|
||||
ajax.setClassName("UserMaterialPresenter");
|
||||
ajax.setMethodName("doApplySysMaterial");
|
||||
ajax.addParam("svgId", "${material.getSvgId()}");
|
||||
ajax.addParam("typeCode", Z("#typeCode").val());
|
||||
ajax.addParam("catCode", Z("#catCode").val());
|
||||
ajax.addParam("keywords", Z("#keywords").val());
|
||||
ajax.addParam("svgSeq", Z("#svgSeq").val());
|
||||
ajax.setFailureAlert();
|
||||
ajax.setSuccess(function(){
|
||||
Z.alert("添加成功", function(){parent.Z.Dialog.close();});
|
||||
});
|
||||
ajax.execute();
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="content">
|
||||
<form id="theForm" name="theForm">
|
||||
<input type="hidden" name="mediaId" id="mediaId" value="">
|
||||
<table class="z-table z-bordered z-pd10 z-bg-white z-text-left">
|
||||
<tr>
|
||||
<td align="right" width="200">选择类型:</td>
|
||||
<td width="*">
|
||||
<select class="z-float-left z-select z-w200" data-role="z-select" data-class="${zmr_color_class}" name="typeCode" id="typeCode" onchange="doSelType(this.value)">
|
||||
<#for item : MaterialConstants.getMaterialTypeList()>
|
||||
<option value="${item.value()}" <#if item.value() == material.getTypeCode()>selected</#if>>${item.desc()}</option>
|
||||
</#for>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<td align="right">选择分类:</td>
|
||||
<td>
|
||||
<select id="catCode" name="catCode" class="z-float-left z-select z-w200" data-role="z-select" data-class="${zmr_color_class}" >
|
||||
<#for cat : Global.get(MaterialCatCache.class).list()>
|
||||
<#if cat.getTypeCode()== material.getTypeCode()>
|
||||
<option value="${cat.getCatCode()}" <#if cat.getCatCode() == material.getCatCode()>selected</#if>>${cat.getCatName()}</option>
|
||||
</#if>
|
||||
</#for>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="z-h40" >
|
||||
<td align="right">关键字:(多个逗号分隔)</td>
|
||||
<td>
|
||||
<input id="keywords" name="keywords" input class="z-input z-w200 ${zmr_color_class}" value="${material.getKeywords()}" maxlength="20">
|
||||
<font color=red>*</font></td>
|
||||
</tr>
|
||||
<tr class="z-h40" >
|
||||
<td align="right">序号:</td>
|
||||
<td>
|
||||
<input id="svgSeq" name="svgSeq" input class="z-input z-w200 ${zmr_color_class}" value="${material.getSvgSeq()}" maxlength="5">
|
||||
<font color=red>*</font></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
<div class="z-bg-gray z-absolute z-w100p z-h80 z-text-center z-pd20" style="bottom:0;">
|
||||
<button type="button" class="z-button z-large z-w100 z-blue" onclick="doSubmit();">确定</button>
|
||||
<button type="button" class="z-button z-large z-w100 z-mg-l10" onclick="parent.Z.Dialog.close();">关闭</button>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user