static.scripts.common.NewCalendarSelect.js Maven / Gradle / Ivy
// 缺省值
var defaultCalendarValues=new Object();
// 页面上所有的三级级联选择
var calendarSelects= new Array();
// 当前操作影响的选择
//var myCalendarSelects=new Array();
// 当前的三级级联选择
var calendarSelectQueue=new Array();
var originalOnChanges=new Array();
var selectInited=new Object();
// 初始化学生类别选择框
function initSchemeSelect(schemes){
if(null==selectInited[this.schemeId]){
selectInited[this.schemeId]=true;
}else{
return;
}
if( null==document.getElementById(this.schemeId)) return;
dwr.util.removeAllOptions(this.schemeId);
dwr.util.addOptions(this.schemeId,schemes,'id','name');
setSelected(document.getElementById(this.schemeId),defaultCalendarValues[this.schemeId]);
var selfOnchange =document.getElementById(this.schemeId).onchange;
document.getElementById(this.schemeId).onchange=function (event){
if(event==null)
event=getEvent();
notifyCalendarChange(event);
if(selfOnchange!=null)
selfOnchange();
}
}
// 初始化学年度选择框
function initCalendarSelect(){
dwr.util.removeAllOptions(this.calendarId);
var schemeId= document.getElementById(this.schemeId);
if(schemeId.value!=""){
calendarSelectQueue.push(this);
calendarDAO.getTeachCalendarNames(setCalendarOptions,schemeId.value);
}
var originalOnChange=document.getElementById(this.schemeId).onchange;
if(null==originalOnChange){
document.getElementById(this.yearId).onchange=function(event){notifyTermChange(event,null);}
}
}
// 通知学年度变化,填充学年度选择列表
function notifyCalendarChange(event){
if(event==null)return;
//alert("event in notifyYearChange"+event);
calendarCalendarSelects = getMyCalendarSelects(getEventTarget(event).id);
//alert(calendarCalendarSelects.length);
for(var i=0;i
© 2015 - 2025 Weber Informatics LLC | Privacy Policy