Namespace.register("Feedback");//注册命名空间 Feedback.Init=function () { Feedback={}; Feedback.informationtSet = $(".informationtSet")[0]//获取管理员设置 Feedback.informationtPermissions = $(".informationtPermissions")[0];//获取成员管理 Feedback.informationHeaderRight = $(".informationHeaderRight")[0];//头部右侧 Feedback.informationtcreateItem = $(".informationtcreateItem")[0]//获取创建项目 Feedback.userName = $(".userName")[0]//获取用户名 Feedback.asideMenuUl = $(".asideMenu ul")[0];//获取项目列表ul Feedback.timeSequence = $(".timeSequence")[0]//反馈时间段 Feedback.logoTitle = $(".logoTitle")[0]//反馈标题位置 Feedback.mainCouple = $(".mainCouple")[0]; Feedback.informationtInfo = $(".informationtInfo")[0];//获取反馈信息 Feedback.informationtTime = $(".informationtTime")[0];//获取反馈时间 Feedback.informationtPaging = $(".informationtPaging")[0];//获取分页 Feedback.totalPage = 0;//总页数 Feedback.informationtAddUser = $(".informationtAddUser")[0];//添加用户项目权限 Feedback.informationDetailed = $(".informationDetailed")[0];//反馈查看更多 Feedback.nowPage=1;//分页当前页 Feedback.Cd = "http://cd.1473.cn/php";//cd.1473 Feedback.Db = "db.1473.cn";//db.1473 Feedback.SqlName = "UseStudio_FeedBack";//数据库名 Feedback.UserId = U.UF.Cookie.get("usestudiosso","userid")[0];//用户id Feedback.Permissions=function(JurisdictionName){//超级管理员 if(JurisdictionName === "administrator"){ Feedback.informationtSet.style.display = "inline-block"; Feedback.informationtSet.onclick=function(){ Feedback.displayItem(); var icon = $$("img", { "className":"close","src":"./images/close.png","onclick":"Feedback.OnclickdisplayItem('"+Feedback.informationtPermissions.className+"')" }, Feedback.informationtPermissions); var permissionsHead = $$("div", { "className": "permissionsHead", }, Feedback.informationtPermissions); var sapn = $$("sapn", { "innerHTML":"成员" }, permissionsHead); var permissionsMembers = $$("div", { "className": "permissionsMembers", }, Feedback.informationtPermissions); Feedback.informationtPermissions.style.display = "block" U.A.Request(Feedback.Cd,[Feedback.Db,Feedback.SqlName,"GetUser"],function (r){//查询用户 if(r.value){ var tbody = $$("table", {//创建表格 "className": "tbMain", }, permissionsMembers); for(var i=0;i=2){ ul.children[i+1].setAttribute("class","paging"); } } } ul.onclick = function(ev,a) {//点击分页 ev = ev || event; var target = ev.target || ev.srcElement; if(target.tagName=="LI"){ classPaging(); target.setAttribute("class","paging active"); Feedback.nowPage = parseInt(target.innerHTML); Feedback.OnclickTime(id,time,(Feedback.nowPage-1)*10,10); } } up.onclick = function() {//点击上页 if(ul.children[1].className=="paging active"&&ul.children[1].innerText==1){ return false; } var previousElementSibling = $(".informationtPaging .active")[0].previousElementSibling; classPaging(); Feedback.nowPage = Feedback.nowPage-1; if(ul.children[1].innerHTML>Feedback.nowPage){ ul.children[1].innerHTML=Feedback.nowPage; ul.children[2].innerHTML=Feedback.nowPage+1; ul.children[3].innerHTML=Feedback.nowPage+2; ul.children[1].setAttribute("class","paging active"); }else{ previousElementSibling.setAttribute("class","paging active"); } Feedback.OnclickTime(id,time,(Feedback.nowPage-1)*10,10); } down.onclick = function(ev) {//点击下页 ev = ev || event; var target = ev.target || ev.srcElement; if(Feedback.nowPage==Feedback.totalPage||Feedback.nowPage>Feedback.totalPage){ return false; }else{ } var nextElementSibling = $(".informationtPaging .active")[0].nextElementSibling; classPaging(); Feedback.nowPage = Feedback.nowPage+1; if(ul.children[3].innerHTML=2){ Feedback.asideMenuUl.children[i].setAttribute("class","asideItem"); Feedback.asideMenuUl.children[i].removeChild(Feedback.asideMenuUl.children[i].children[1]) } } Feedback.logoTitle.innerHTML = "反馈后台信息管理"+":"+target.innerText; if( target.tagName=="LI"){ target.appendChild(icon); target.setAttribute("class","asideItembg asideItem"); }else{ target.parentNode.appendChild(icon); target.parentNode.setAttribute("class","asideItembg asideItem"); } var productId = target.parentNode.productId; if(Feedback.informationtInfo.firstChild !== null){ Feedback.informationtInfo.removeChild(Feedback.informationtInfo.firstChild); } if(Feedback.informationtTime.firstChild !==null){ Feedback.informationtTime.removeChild(Feedback.informationtTime.firstChild); } if(Feedback.informationHeaderRight.firstChild.className == "actionItem"){ Feedback.informationHeaderRight.removeChild(Feedback.informationHeaderRight.firstChild) } Feedback.displayItem(); Feedback.displayPage(); Feedback.itemOperation(productId,JurisdictionName); Feedback.createInfo(productId); Feedback.InfoPaging(productId,'30days'); }; } } }) } }();