1 varSafe = {2Safe_type:<%=safe_type_tab%>,3Detaillist:<%=tempdetaillist%>,4Modulelist:<%=modulelist%>,5Utmlist:<%=utmlist%>,6Params:{type1:<%=tempvalueid%>,modulevalueid:<%=modulevalueid%>},7Inincontrol:function(){8 safe.bind_safe1 ();9 Safe.bing_safe3 ();Ten Safe.bind_safe2 (safe.params.type1); One$ ("#selTempList"). Change (function(){ A varTempid = $ ( This). Val (); -$ ("#dataTempDatialTable tbody tr"). Remove (); - if(tempid!=0){ the Safe.bind_safe2 (tempid); - } - }); -$ ("#selUtNavList"). Change (function(){ +$ ("#hidNavModuleUrl"). Val ($ ( This). attr ("Data-url")); - }); + A //bind drop Object when modified at varid = getquerystring (' Mid '); - varIdedit = (id! =NULL); - if(idedit) { - if(safe.params.type1==1){ -$ ("#selTempList"). Val (safe.params.type1); -$ ("#dataTempDatialTable tbody tr"). Remove (); in Safe.bind_safe2 (safe.params.type1); - } to } + }, -Bind_safe1:function(){ the varType1 = $ ("#selTempList"); *$.each (Safe.safe_type.ds,function(i,item) { $ varSELTMEP = Safe.params.type1 = = item.id? ' selected= ' selected "': ';Panax NotoginsengType1.append (' <option value= ' ' +item.id+ ', ' +seltmep+ ' > ' +item. Tempname+ ' </option> '); - }); the }, +Bind_safe2:function(ID) { A vartype2 = $ ("#dataTempDatialTable tbody"); the varnum = 0; + varISBOOLUTM =false; - varsel = ""; $ //Mold Frame $$.each (Safe.detailList.ds,function(i,ite) { - if(ITE. Tempid = =ID) { -++num; the varHtmlSelect = ' <select id= ' selmodulelist ' +num+ ' "name=" Selmodulelist "style=" width:200px; " ></select> '; - WuyiType2.append ("<tr><td>" +num+ "<td>" +ite.id+ "</td><td>" +ite. Rectanglename+ "</td><td>" +ite. Divid+ "</td><td>" +ite. width+ "</td><td>" +ite. height+ "</td><td style= ' width:210px; ' > "+htmlselect+" </td></tr> "); the - //Module Wu varModul = $ ("#selModuleList" +num); -$.each (Safe.moduleList.ds,function(J, item) { About //Mold Frame and module relationship list $ if(Safe.utmlist! =NULL){ -$.each (Safe.utmList.ds,function(k, tem) { - if(TEM. Tempdetaild = = Ite.id && tem. ModuleID = =item.id) { -ISBOOLUTM =true; Asel = Isboolutm? ' selected = ' selected ': ';//the corresponding module is selected by default when editing + } the }); - } $ if(item. Type! = 4){ theModul.append (' <option value= ' ' +item.id+ ', ' +sel+ ' > ' +item. Displayname+ ' </option> '); the } the if(Sel! = "" | | ISBOOLUTM = =true){ thesel = ""; -ISBOOLUTM =false; in } the }); the } About }); the }, theBing_safe3:function(){ the varUtnav = $ ("#selUtNavList"); +$.each (Safe.moduleList.ds,function(i, Navitem) { - if(Navitem.type = = 4){ the varSelmodule = Safe.params.moduleValueId = = navitem.id? ' selected= ' selected "': ';BayiUtnav.append (' <option data-url= ' ' +navitem.url+ ' "value=" ' +navitem.id+ ' "' +selmodule+ ' > ' +navitem.displayname + ' </option> '); the } the }); - //navigation URL Initial value -$ ("#hidNavModuleUrl"). Val (Utnav.find ("option:selected"). attr ("Data-url")); the } the};View Code
JS Initialization Object