You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

79 lines
2.1 KiB
JavaScript

10 months ago
function $(id){
return document.getElementById(id);
}
function parentEdit(){
var moduleID = $("h_moduleid").value;
var strName = $("txt_sysname").value.trim();
var strDesp = $("txt_description").value.trim();
if(strName == ""){
$("txt_sysname").className = "txtTab-error";
return;
}else{
$("txt_sysname").className = "txtTab";
}
if(strDesp == ""){
$("txt_description").className = "txtTab-error";
return;
}else{
$("txt_description").className = "txtTab";
}
if(moduleID == ""){
var openSet = "height=600, width=500, toolbar=no, menubar=no,scrollbars=no, resizable=1,location=no, status=no,Top= " +(screen.height-600)/2 + ",Left= "+(screen.width-500)/2
var openType = "_blank";
var openUrl = "ModuleManagement.aspx?handle=init&name="+strName;
window.open (openUrl,openType,openSet);
}else{
var openSet = "height=600, width=500, toolbar=no, menubar=no,scrollbars=no, resizable=1,location=no, status=no,Top= " +(screen.height-600)/2 + ",Left= "+(screen.width-500)/2
var openType = "_blank";
var openUrl = "ModuleManagement.aspx?handle=edit&id="+moduleID;
window.open (openUrl,openType,openSet);
}
}
function sortEdit(){
}
function postEnterFee(){
var myForm = document.getElementById("form1");
myForm.submit() ;
}
function saveModule(){
var strName = $("txt_sysname").value.trim();
var strDesp = $("txt_description").value.trim();
if(strName == ""){
$("txt_sysname").className = "btn-error";
return;
}
if(strDesp == ""){
$("txt_description").className = "btn-error";
return;
}
var postType = 0;
$("h_posttype").value = "1";
postEnterFee();
window.parent.opener.location.href = window.parent.opener.location.href;
}
function cancelModule(){
if(window.confirm("您确定要关闭模块编辑页面")){
window.close();
}
}
String.prototype.trim = function() { return this.replace(/(^\s*)|(\s*$)/g,""); }