91 lines
3.1 KiB
Plaintext
91 lines
3.1 KiB
Plaintext
<%@ page contentType="text/html; charset=GBK"%><%@
|
||
include
|
||
file="/Frame/resources/include/include_begin_list.jspf"%>
|
||
<%
|
||
ASObjectModel doTemp = new ASObjectModel("APP_VERSION_LIST");
|
||
doTemp.setLockCount(2); //锁定两列
|
||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||
|
||
dwTemp.Style="1"; //设置为Grid风格
|
||
dwTemp.ReadOnly = "1";//编辑模式
|
||
dwTemp.setPageSize(10);
|
||
dwTemp.ConvertCode2Title = "1";
|
||
dwTemp.genHTMLObjectWindow("");
|
||
|
||
String sButtons[][] = {
|
||
{"true","","Button","新增APP应用","新增一个版本","newRecord()","","","","btn_icon_add"},
|
||
{"true","","Button","APP应用信息","查看版本信息","viewAndEdit()","","","","btn_icon_detail"},
|
||
{"true","","Button","上传APP应用","查看版本信息","uploadApp()","","","","btn_icon_up"},
|
||
{"true","","Button","删除该应用","删除该版本","if(confirm('确实要删除吗?'))as_delete(0,'')","","","","btn_icon_delete"},
|
||
{"true","","Button","下载应用到本地","下载该版本","downloadFile()","","","","btn_icon_down"}
|
||
};
|
||
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||
<script type="text/javascript">
|
||
|
||
$(function() {
|
||
$("#ATTACHMENT").attr("type","file");
|
||
$("#myiframe0").attr("enctype","multipart/form-data");
|
||
var params={};
|
||
params["usreid"]="<%=CurUser.getUserID()%>";
|
||
var sparma="";
|
||
for(var key in params){
|
||
sparma=sparma+"<input type=\"text\" name=\""+key+"\" value=\""+params[key]+"\">"
|
||
}
|
||
hideItem(0,"FILENAME");
|
||
$("#ATTACHMENT").append(sparma);
|
||
$("#myiframe0").attr("action", "");
|
||
$("#myiframe0").attr("method","post");
|
||
});
|
||
|
||
function newRecord() {
|
||
var sUrl = "/AppFresh/AppVersion/AppVersionInfo.jsp";
|
||
AsDialog.PopView(sUrl, "", "dialogWidth=600px;dialogHeight=450px;",
|
||
function(message) {
|
||
reloadSelf();
|
||
}, "新增一个版本");
|
||
}
|
||
|
||
function viewAndEdit() {
|
||
var sUrl = "/AppFresh/AppVersion/AppVersionInfo.jsp";
|
||
var id = getItemValue(0, getRow(0), 'id');
|
||
if (id == "" || typeof(id) == "undefined") {
|
||
alert("请选上传的版本!");
|
||
return false;
|
||
}
|
||
AsDialog.PopView(sUrl, "id=" + id,
|
||
"dialogWidth=600px;dialogHeight=450px;", function(message) {
|
||
reloadSelf();
|
||
}, "新增一个版本");
|
||
}
|
||
|
||
function uploadApp(){
|
||
var id = getItemValue(0,getRow(0),'id');
|
||
if (id == "" || typeof(id) == "undefined") {
|
||
alert("请选上传的版本!");
|
||
return false;
|
||
}
|
||
var sUrl = "/AppFresh/AppVersion/AppVersionFile.jsp";
|
||
AsDialog.PopView(sUrl, "id=" + id,
|
||
"dialogWidth=600px;dialogHeight=450px;", function(message) {
|
||
reloadSelf();
|
||
}, "上传一个版本");
|
||
}
|
||
|
||
function downloadFile() {
|
||
var id = getItemValue(0, getRow(), "id");
|
||
if (typeof (id) == "undefined" || id.length == 0) {
|
||
alert("请选上传的版本!");
|
||
return;
|
||
}
|
||
|
||
var FILE_NAME = getItemValue(0, getRow(), "FILE_NAME");
|
||
if (typeof (FILE_NAME) == "undefined" || FILE_NAME.length == 0) {
|
||
alert("该版本还未上传APP应用文件!");
|
||
return;
|
||
}
|
||
|
||
var requestUrl = '<%=sWebRootPath%>/webapi/resf/files/downloadAppById?id=' + id;
|
||
location.href = requestUrl;
|
||
}
|
||
</script>
|
||
<%@ include file="/Frame/resources/include/include_end.jspf"%> |