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.
|
|
|
|
function $(id){
|
|
|
|
|
return document.getElementById(id);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function saveSetting(){
|
|
|
|
|
var ckTimes = $("ck_interval").checked;
|
|
|
|
|
var txtTimesVal = $("txt_interval").value;
|
|
|
|
|
var iTimes = parseInt(txtTimesVal);
|
|
|
|
|
|
|
|
|
|
if(iTimes < 1 || iTimes > 30){
|
|
|
|
|
alert("间隔时间不能小于1分钟 大于30分钟");
|
|
|
|
|
}
|
|
|
|
|
if(ckTimes && iTimes > 0){
|
|
|
|
|
var readUrl = "MessageService.aspx?handle=saveuserset×="+iTimes+"&uid="+newGuid();
|
|
|
|
|
var loader = dhtmlxAjax.getSync(readUrl);
|
|
|
|
|
var loadVal = loader.xmlDoc.responseText;
|
|
|
|
|
|
|
|
|
|
var state = parseInt(loadVal);
|
|
|
|
|
|
|
|
|
|
if(state == 1){
|
|
|
|
|
window.close();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.newGuid = function(){
|
|
|
|
|
var guid = "";
|
|
|
|
|
for (var i = 1; i <= 32; i++){
|
|
|
|
|
var n = Math.floor(Math.random()*16.0).toString(16);
|
|
|
|
|
guid += n;
|
|
|
|
|
if((i==8)||(i==12)||(i==16)||(i==20))
|
|
|
|
|
guid += "-";
|
|
|
|
|
}
|
|
|
|
|
return guid.toUpperCase();
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
String.prototype.trim = function() { return this.replace(/(^\s*)|(\s*$)/g,""); }
|
|
|
|
|
|
|
|
|
|
function checkInterval(id){
|
|
|
|
|
var ckboxState = $(id).checked;
|
|
|
|
|
|
|
|
|
|
if(ckboxState){
|
|
|
|
|
$("txt_interval").disabled = false;
|
|
|
|
|
}else{
|
|
|
|
|
$("txt_interval").disabled = true;
|
|
|
|
|
}
|
|
|
|
|
}
|