//打开查看资源信息窗口
|
function OpenZiYuan(id) {
|
var url = "/res/ZiYuan/ZiYuanBaseInfo?resourceid=" + id;
|
//winPro.openFullwin(url, "查看资源", "yes");
|
window.open(url);
|
$.ajax({
|
url: '/res/resActionRecord/registerActionRecord',
|
type:'post',
|
data: {'resourceid': id, 'actiontype': '浏览'}
|
});
|
}
|
//打开编辑资源信息窗口
|
function ZiYuanEdit(id) {
|
var url = "/res/ResManage/ResRegister/ResEdit?resMainInfoId=" + id;
|
// winPro.openFullwin(url, "编辑资源", "yes");
|
openFullWindow(url, "编辑资源");
|
$.ajax({
|
url: '/res/resActionRecord/registerActionRecord',
|
type:'post',
|
data: {'resourceid': id, 'actiontype': '编辑'}
|
});
|
}
|
|
|
//转码,主要用于列表的title属性
|
function htmlEncodeByRegExp(str){
|
var s = "";
|
if(str == null || str.length == 0) return "";
|
// s = str.replace(/&/g,"&");
|
s = str.replace(/</g,"<");
|
s = s.replace(/>/g,">");
|
s = s.replace(/ /g," ");
|
s = s.replace(/\'/g,"'");
|
s = s.replace(/\"/g,""");
|
return s;
|
}
|
|
//判断发布时间选择框,后一个时间是否小于前一个时间
|
function checkDate() {
|
var pubdateBegin = $("#pubdateBegin").val();
|
var pubdatefinish = $("#pubdatefinish").val();
|
if(pubdateBegin != "" && pubdatefinish != ""){
|
var pubdatestart = new Date(pubdateBegin.replace(/-/g,"/"));
|
var pubdateend = new Date(pubdatefinish.replace(/-/g,"/"));
|
if(pubdatestart > pubdateend){
|
alert("结束时间不能小于开始时间!");
|
return false;
|
}
|
else {
|
return true;
|
}
|
}
|
else {
|
return true;
|
}
|
}
|
|
//判断申请时间选择框,后一个时间是否小于前一个时间
|
function checkDate2() {
|
var pubdateBegin = $("#appdateBeg").val();
|
var pubdatefinish = $("#appdateEnd").val();
|
if(pubdateBegin != "" && pubdatefinish != ""){
|
var pubdatestart = new Date(pubdateBegin.replace(/-/g,"/"));
|
var pubdateend = new Date(pubdatefinish.replace(/-/g,"/"));
|
if(pubdatestart > pubdateend){
|
alert("结束时间不能小于开始时间!");
|
return false;
|
}
|
else {
|
return true;
|
}
|
}
|
else {
|
return true;
|
}
|
}
|