Commit 79ae949f authored by liuchao's avatar liuchao

no message

parent 4a699e64
...@@ -67,13 +67,13 @@ public class UserController extends BaseController<Object>{ ...@@ -67,13 +67,13 @@ public class UserController extends BaseController<Object>{
if (StringUtils.isEmpty(userVo.getId())) { if (StringUtils.isEmpty(userVo.getId())) {
Boolean userIsExistMobile = userService.validateUserExistByMobile(userVo.getMobile()); Boolean userIsExistMobile = userService.validateUserExistByPaperId(userVo.getPaperId());
if (userIsExistMobile) { if (userIsExistMobile) {
view.getModel().put("message", "userIsExist_mobile"); view.getModel().put("message", "userIsExist_paperId");
return view; return view;
} }
Boolean userIsExistUserName = userService.validateUserExistByTeamName(userVo.getTeamName()); Boolean userIsExistUserName = userService.validateUserExistByUserName(userVo.getUserName());
if (userIsExistUserName) { if (userIsExistUserName) {
view.getModel().put("message", "userIsExist_teamName"); view.getModel().put("message", "userIsExist_teamName");
return view; return view;
...@@ -106,8 +106,8 @@ public class UserController extends BaseController<Object>{ ...@@ -106,8 +106,8 @@ public class UserController extends BaseController<Object>{
} }
} }
user = userService.findById(userVo.getId()); user = userService.findById(userVo.getId());
if (StringUtils.isNotBlank(userVo.getTeamName())) { if (StringUtils.isNotBlank(userVo.getUserName())) {
Boolean userIsExistUserName = userService.validateUserExistByTeamName(userVo.getTeamName()); Boolean userIsExistUserName = userService.validateUserExistByUserName(userVo.getUserName());
if (userIsExistUserName) { if (userIsExistUserName) {
view.getModel().put("message", "userIsExist_teamName"); view.getModel().put("message", "userIsExist_teamName");
return view; return view;
...@@ -129,13 +129,13 @@ public class UserController extends BaseController<Object>{ ...@@ -129,13 +129,13 @@ public class UserController extends BaseController<Object>{
@Auth(verifyLogin = false, verifyURL = false) @Auth(verifyLogin = false, verifyURL = false)
@RequestMapping("/api/signin") @RequestMapping("/api/signin")
public ModelAndView signin(HttpServletRequest request, public ModelAndView signin(HttpServletRequest request,
final HttpServletResponse response, String mobile, String pwd) final HttpServletResponse response, String userName, String pwd)
throws Exception { throws Exception {
ModelAndView view = new ModelAndView(); ModelAndView view = new ModelAndView();
ResourceBundle rb = ResourceBundle.getBundle("system"); ResourceBundle rb = ResourceBundle.getBundle("system");
String superAdmin = rb.getString("account"); String superAdmin = rb.getString("account");
if (mobile.equals(superAdmin)) { if (userName.equals(superAdmin)) {
String p = rb.getString("password"); String p = rb.getString("password");
if (p.equals(pwd)) { if (p.equals(pwd)) {
...@@ -144,17 +144,22 @@ public class UserController extends BaseController<Object>{ ...@@ -144,17 +144,22 @@ public class UserController extends BaseController<Object>{
user.setUserName(superAdmin); user.setUserName(superAdmin);
user.setPwd(MD5.digest(pwd)); user.setPwd(MD5.digest(pwd));
SessionUtils.setUser(request, user); SessionUtils.setUser(request, user);
view.getModelMap().addAttribute("status", 2); view.getModelMap().addAttribute("status", 1);
} else { } else {
view.getModelMap().addAttribute("status", 0); view.getModelMap().addAttribute("status", 0);
} }
} else { } else {
User user = userService.userLogin(mobile, pwd); User user = userService.userLogin(userName, pwd);
if (user != null) { if (user != null) {
// 设置User到Session // 设置User到Session
SessionUtils.setUser(request, user); if ("1".equals(user.getRole())){
view.getModelMap().addAttribute("status", 1); SessionUtils.setUser(request, user);
view.getModelMap().addAttribute("status", 1);
} else {
view.getModelMap().addAttribute("status", 0);
}
} else { } else {
view.getModelMap().addAttribute("status", 0); view.getModelMap().addAttribute("status", 0);
} }
...@@ -175,7 +180,7 @@ public class UserController extends BaseController<Object>{ ...@@ -175,7 +180,7 @@ public class UserController extends BaseController<Object>{
if (superAdmin.equals(userSession.getMobile()) && MD5.digest(p).equals(userSession.getPwd())) { if (superAdmin.equals(userSession.getMobile()) && MD5.digest(p).equals(userSession.getPwd())) {
IPageList<User> userPage = userService.findByUsers(userVo.getSearchStr(), userVo.getGroups(), userVo.getOrder(), userVo.getSort(), IPageList<User> userPage = userService.findByUsers(userVo.getSearchStr(), userVo.getRole(), userVo.getOrder(), userVo.getSort(),
new Hints(getStartRow(request), getPageCount(request))); new Hints(getStartRow(request), getPageCount(request)));
view.getModelMap().addAttribute("userPage", userPage); view.getModelMap().addAttribute("userPage", userPage);
......
...@@ -17,13 +17,19 @@ public class WebSiteController extends BaseController<Object>{ ...@@ -17,13 +17,19 @@ public class WebSiteController extends BaseController<Object>{
@Autowired @Autowired
private ApplicationContext applicationContext; private ApplicationContext applicationContext;
@RequestMapping("/index") @RequestMapping("/default")
public ModelAndView index() throws Exception { public ModelAndView index() throws Exception {
ModelAndView t_view = new ModelAndView(); ModelAndView t_view = new ModelAndView();
t_view.setViewName("index"); t_view.setViewName("index");
return t_view; return t_view;
} }
@RequestMapping("/")
public ModelAndView login() throws Exception {
ModelAndView t_view = new ModelAndView();
t_view.setViewName("index");
return t_view;
}
@RequestMapping("/result") @RequestMapping("/result")
......
...@@ -7,16 +7,14 @@ import com.qiankun.pages.IPageList; ...@@ -7,16 +7,14 @@ import com.qiankun.pages.IPageList;
public interface UserDao extends IDao<User, String> { public interface UserDao extends IDao<User, String> {
IPageList<User> findUserPage(String searchStr, String groupId, String order, String sort, Hints hints); IPageList<User> findUserPage(String searchStr, String role, String order, String sort, Hints hints);
User findLastUserByGroup(String groupId); User login(String userName, String password);
User login(String mobile, String password); Boolean validateUserExistByPaperId(String mobile);
Boolean validateUserExistByMobile(String mobile);
Boolean validatePwd(String id, String password); Boolean validatePwd(String id, String password);
Boolean validateUserExistByTeamName(String userName); Boolean validateUserExistByUserName(String userName);
} }
...@@ -15,21 +15,21 @@ public class UserDaoImpl extends AbsDao<User, String> implements UserDao { ...@@ -15,21 +15,21 @@ public class UserDaoImpl extends AbsDao<User, String> implements UserDao {
private static final String FIND = "from User where "; private static final String FIND = "from User where ";
private static final String FIND_USER_PAGE = " from User where (userId like ? or mobile like ?) "; private static final String FIND_USER_PAGE = " from User where (mobile like ? or paperId like ? or name like ? or userName like ?) ";
private static final String FIND_LASTUSER_BY_GROUP = " from User where groups = ? order by createTime desc"; // private static final String FIND_LASTUSER_BY_GROUP = " from User where groups = ? order by createTime desc";
private static final String LOGIN = " from User where mobile = ? and pwd = ? and isRemove=false"; private static final String LOGIN = " from User where mobile = ? and pwd = ? and isRemove=false";
private static final String VALIDATE_MOBILE = " from User where mobile = ?"; private static final String VALIDATE_PAPERID = " from User where paperId = ?";
private static final String VALIDATE_TEAMNAME = " from User where teamName = ?"; private static final String VALIDATE_USERNAME = " from User where userName = ?";
private static final String VALIDATE_PWD = " from User where id = ? and pwd = ? and isRemove=false"; private static final String VALIDATE_PWD = " from User where id = ? and pwd = ? and isRemove=false";
@Override @Override
public Boolean validateUserExistByMobile(String mobile) { public Boolean validateUserExistByPaperId(String paperId) {
Long count = findCount(" select count(*) " + VALIDATE_MOBILE, mobile); Long count = findCount(" select count(*) " + VALIDATE_PAPERID, paperId);
if (count > 0) if (count > 0)
return true; return true;
else else
...@@ -37,30 +37,30 @@ public class UserDaoImpl extends AbsDao<User, String> implements UserDao { ...@@ -37,30 +37,30 @@ public class UserDaoImpl extends AbsDao<User, String> implements UserDao {
} }
@Override @Override
public Boolean validateUserExistByTeamName(String userName) { public Boolean validateUserExistByUserName(String userName) {
Long count = findCount(" select count(*) " + VALIDATE_TEAMNAME, userName); Long count = findCount(" select count(*) " + VALIDATE_USERNAME, userName);
if (count > 0) if (count > 0)
return true; return true;
else else
return false; return false;
} }
@Override // @Override
public User findLastUserByGroup(String groupId) { // public User findLastUserByGroup(String groupId) {
//
List<User> records = find(FIND_LASTUSER_BY_GROUP , new Hints(0,1), groupId); // List<User> records = find(FIND_LASTUSER_BY_GROUP , new Hints(0,1), groupId);
if (records.size()>0) { // if (records.size()>0) {
return records.get(0); // return records.get(0);
} else { // } else {
return null; // return null;
} // }
//
//
} // }
@Override @Override
public IPageList<User> findUserPage(String searchStr, String groupId, String order, String sort, Hints hints) { public IPageList<User> findUserPage(String searchStr, String role, String order, String sort, Hints hints) {
if (order == null){ if (order == null){
...@@ -71,7 +71,7 @@ public class UserDaoImpl extends AbsDao<User, String> implements UserDao { ...@@ -71,7 +71,7 @@ public class UserDaoImpl extends AbsDao<User, String> implements UserDao {
} }
String groupHql = null; String groupHql = null;
if (groupId != null){ if (role != null){
groupHql = " and groups = ? "; groupHql = " and groups = ? ";
} }
...@@ -80,9 +80,9 @@ public class UserDaoImpl extends AbsDao<User, String> implements UserDao { ...@@ -80,9 +80,9 @@ public class UserDaoImpl extends AbsDao<User, String> implements UserDao {
} }
String param = "%" + searchStr + "%"; String param = "%" + searchStr + "%";
IPageList<User> users = new PageListImpl<User>(); IPageList<User> users = new PageListImpl<User>();
if (groupId != null){ if (role != null){
users.setRecords(find(FIND_USER_PAGE + groupHql + sortHQL(order, sort), hints, param, param, groupId)); users.setRecords(find(FIND_USER_PAGE + groupHql + sortHQL(order, sort), hints, param, param, role));
users.setRecordTotal(findCount(" select count(*) " + FIND_USER_PAGE + groupHql, param, param, groupId)); users.setRecordTotal(findCount(" select count(*) " + FIND_USER_PAGE + groupHql, param, param, role));
} else { } else {
users.setRecords(find(FIND_USER_PAGE + sortHQL(order, sort), hints, param, param)); users.setRecords(find(FIND_USER_PAGE + sortHQL(order, sort), hints, param, param));
users.setRecordTotal(findCount(" select count(*) " + FIND_USER_PAGE, param, param)); users.setRecordTotal(findCount(" select count(*) " + FIND_USER_PAGE, param, param));
......
...@@ -50,7 +50,7 @@ public class LoginInterceptor extends HandlerInterceptorAdapter { ...@@ -50,7 +50,7 @@ public class LoginInterceptor extends HandlerInterceptorAdapter {
if (auth == null || auth.verifyLogin()) { if (auth == null || auth.verifyLogin()) {
if (user == null) { if (user == null) {
response.setStatus(response.SC_GATEWAY_TIMEOUT); response.setStatus(response.SC_GATEWAY_TIMEOUT);
response.sendRedirect(baseUri + "/"); response.sendRedirect(baseUri + "/login");
return false; return false;
} }
} }
......
...@@ -32,8 +32,8 @@ public class UserService { ...@@ -32,8 +32,8 @@ public class UserService {
userDao.remove(id); userDao.remove(id);
} }
public User userLogin(final String mobile, final String password) { public User userLogin(final String userName, final String password) {
return userDao.login(mobile, MD5.digest(password)); return userDao.login(userName, MD5.digest(password));
} }
...@@ -42,16 +42,12 @@ public class UserService { ...@@ -42,16 +42,12 @@ public class UserService {
return users; return users;
} }
public User findLastUserByGroup(String groupId) { public Boolean validateUserExistByPaperId(String paperId) {
return userDao.findLastUserByGroup(groupId); return userDao.validateUserExistByPaperId(paperId);
} }
public Boolean validateUserExistByMobile(String mobile) { public Boolean validateUserExistByUserName(String userName) {
return userDao.validateUserExistByMobile(mobile); return userDao.validateUserExistByUserName(userName);
}
public Boolean validateUserExistByTeamName(String userName) {
return userDao.validateUserExistByTeamName(userName);
} }
......
package com.qiankun.vo; package com.qiankun.vo;
import org.apache.commons.lang.StringUtils; import javax.persistence.Lob;
public class UserVo { public class UserVo {
private String id; private String id;
private String userId; //团队编号
private String userName; //单位名称
private String teamName; //团队名称
private String mobile; //手机
private String email;
private String oldpwd; //原密码
private String pwd; //密码
private String groups; //组
private String memberName1; //成员姓名
private String memberGender1; //成员性别
private String memberTel1; //成员电话
private String memberEmail1; //成员邮箱
private String memberGrade1; //成员年级专业
private String memberName2; //成员姓名
private String memberGender2; //成员性别
private String memberTel2; //成员电话
private String memberEmail2; //成员邮箱
private String memberGrade2; //成员年级专业
private String memberName3; //成员姓名 private String userName; //用户名
private String memberGender3; //成员性别 private String name; //姓名
private String memberTel3; //成员电话 private String gender; //性别
private String memberEmail3; //成员邮箱 private String birthdate; //出生年月
private String memberGrade3; //成员年级专业 private String paperType; //证件类型
private String paperId; //证件号
private String nation; //民族
private String nativePlace; //籍贯
private String nationality; //国籍
private String education; //学历
private String domicilePlace; //户籍所在地
private String addr; //经常居住地
private String unit; //单位、学校
private String unitAddr; //单位、学校地址
private String unitTel; //单位、学校电话
private String profession; //职业
private String mobile; //本人手机
private String email; //电话
private String tel; //固定电话
private String qq;
private String weixin; //微信号
private Integer donateBloodCount; //无偿献血次数
private String bloodType; //血型
private Integer height; //身高
private Integer weight; //体重
private String memberName4; //成员姓名 @Lob
private String memberGender4; //成员性别 private String remark; //备注
private String memberTel4; //成员电话
private String memberEmail4; //成员邮箱 private String pwd; //密码
private String memberGrade4; //成员年级专业
private String teacher; //指导老师 private String role; //角色 1.管理员 2.志愿者 3.预注册用户
private String teacherTel;
private String teacherEmail;
private String contacts; //联系人 private String oldpwd; //原密码
private String achievement; //成绩
private Boolean changePassword; private Boolean changePassword;
private String searchStr; private String searchStr;
private String order; private String order;
...@@ -55,229 +52,205 @@ public class UserVo { ...@@ -55,229 +52,205 @@ public class UserVo {
public void setId(String id) { public void setId(String id) {
this.id = id; this.id = id;
} }
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public String getUserName() { public String getUserName() {
return StringUtils.deleteWhitespace(userName); return userName;
} }
public void setUserName(String userName) { public void setUserName(String userName) {
this.userName = userName; this.userName = userName;
} }
public String getMobile() { public String getName() {
return mobile; return name;
}
public void setMobile(String mobile) {
this.mobile = mobile;
}
public String getPwd() {
return pwd;
}
public void setPwd(String pwd) {
this.pwd = pwd;
}
public String getGroups() {
return groups;
} }
public void setGroups(String groups) { public void setName(String name) {
this.groups = groups; this.name = name;
} }
public String getTeacher() { public String getGender() {
return teacher; return gender;
} }
public void setTeacher(String teacher) { public void setGender(String gender) {
this.teacher = teacher; this.gender = gender;
} }
public String getContacts() { public String getBirthdate() {
return contacts; return birthdate;
} }
public void setContacts(String contacts) { public void setBirthdate(String birthdate) {
this.contacts = contacts; this.birthdate = birthdate;
} }
public String getAchievement() { public String getPaperType() {
return achievement; return paperType;
} }
public void setAchievement(String achievement) { public void setPaperType(String paperType) {
this.achievement = achievement; this.paperType = paperType;
} }
public Boolean getChangePassword() { public String getPaperId() {
return changePassword; return paperId;
}
public void setChangePassword(Boolean changePassword) {
this.changePassword = changePassword;
} }
public String getOldpwd() { public void setPaperId(String paperId) {
return oldpwd; this.paperId = paperId;
}
public void setOldpwd(String oldpwd) {
this.oldpwd = oldpwd;
} }
public String getSearchStr() { public String getNation() {
return searchStr; return nation;
} }
public void setSearchStr(String searchStr) { public void setNation(String nation) {
this.searchStr = searchStr; this.nation = nation;
} }
public String getOrder() { public String getNativePlace() {
return order; return nativePlace;
} }
public void setOrder(String order) { public void setNativePlace(String nativePlace) {
this.order = order; this.nativePlace = nativePlace;
} }
public String getSort() { public String getNationality() {
return sort; return nationality;
} }
public void setSort(String sort) { public void setNationality(String nationality) {
this.sort = sort; this.nationality = nationality;
} }
public String getEmail() { public String getEducation() {
return email; return education;
} }
public void setEmail(String email) { public void setEducation(String education) {
this.email = email; this.education = education;
} }
public String getTeamName() { public String getDomicilePlace() {
return StringUtils.deleteWhitespace(teamName); return domicilePlace;
} }
public void setTeamName(String teamName) { public void setDomicilePlace(String domicilePlace) {
this.teamName = teamName; this.domicilePlace = domicilePlace;
} }
public String getMemberName1() { public String getAddr() {
return memberName1; return addr;
} }
public void setMemberName1(String memberName1) { public void setAddr(String addr) {
this.memberName1 = memberName1; this.addr = addr;
} }
public String getMemberGender1() { public String getUnit() {
return memberGender1; return unit;
} }
public void setMemberGender1(String memberGender1) { public void setUnit(String unit) {
this.memberGender1 = memberGender1; this.unit = unit;
} }
public String getMemberTel1() { public String getUnitAddr() {
return memberTel1; return unitAddr;
} }
public void setMemberTel1(String memberTel1) { public void setUnitAddr(String unitAddr) {
this.memberTel1 = memberTel1; this.unitAddr = unitAddr;
} }
public String getMemberEmail1() { public String getUnitTel() {
return memberEmail1; return unitTel;
} }
public void setMemberEmail1(String memberEmail1) { public void setUnitTel(String unitTel) {
this.memberEmail1 = memberEmail1; this.unitTel = unitTel;
} }
public String getMemberGrade1() { public String getProfession() {
return memberGrade1; return profession;
} }
public void setMemberGrade1(String memberGrade1) { public void setProfession(String profession) {
this.memberGrade1 = memberGrade1; this.profession = profession;
} }
public String getMemberName2() { public String getMobile() {
return memberName2; return mobile;
} }
public void setMemberName2(String memberName2) { public void setMobile(String mobile) {
this.memberName2 = memberName2; this.mobile = mobile;
} }
public String getMemberGender2() { public String getEmail() {
return memberGender2; return email;
} }
public void setMemberGender2(String memberGender2) { public void setEmail(String email) {
this.memberGender2 = memberGender2; this.email = email;
} }
public String getMemberTel2() { public String getTel() {
return memberTel2; return tel;
} }
public void setMemberTel2(String memberTel2) { public void setTel(String tel) {
this.memberTel2 = memberTel2; this.tel = tel;
} }
public String getMemberEmail2() { public String getQq() {
return memberEmail2; return qq;
} }
public void setMemberEmail2(String memberEmail2) { public void setQq(String qq) {
this.memberEmail2 = memberEmail2; this.qq = qq;
} }
public String getMemberGrade2() { public String getWeixin() {
return memberGrade2; return weixin;
} }
public void setMemberGrade2(String memberGrade2) { public void setWeixin(String weixin) {
this.memberGrade2 = memberGrade2; this.weixin = weixin;
} }
public String getMemberName3() { public Integer getDonateBloodCount() {
return memberName3; return donateBloodCount;
} }
public void setMemberName3(String memberName3) { public void setDonateBloodCount(Integer donateBloodCount) {
this.memberName3 = memberName3; this.donateBloodCount = donateBloodCount;
} }
public String getMemberGender3() { public String getBloodType() {
return memberGender3; return bloodType;
} }
public void setMemberGender3(String memberGender3) { public void setBloodType(String bloodType) {
this.memberGender3 = memberGender3; this.bloodType = bloodType;
} }
public String getMemberTel3() { public Integer getHeight() {
return memberTel3; return height;
} }
public void setMemberTel3(String memberTel3) { public void setHeight(Integer height) {
this.memberTel3 = memberTel3; this.height = height;
} }
public String getMemberEmail3() { public Integer getWeight() {
return memberEmail3; return weight;
} }
public void setMemberEmail3(String memberEmail3) { public void setWeight(Integer weight) {
this.memberEmail3 = memberEmail3; this.weight = weight;
} }
public String getMemberGrade3() { public String getRemark() {
return memberGrade3; return remark;
} }
public void setMemberGrade3(String memberGrade3) { public void setRemark(String remark) {
this.memberGrade3 = memberGrade3; this.remark = remark;
} }
public String getMemberName4() { public String getPwd() {
return memberName4; return pwd;
} }
public void setMemberName4(String memberName4) { public void setPwd(String pwd) {
this.memberName4 = memberName4; this.pwd = pwd;
} }
public String getMemberGender4() { public String getRole() {
return memberGender4; return role;
} }
public void setMemberGender4(String memberGender4) { public void setRole(String role) {
this.memberGender4 = memberGender4; this.role = role;
} }
public String getMemberTel4() { public Boolean getChangePassword() {
return memberTel4; return changePassword;
} }
public void setMemberTel4(String memberTel4) { public void setChangePassword(Boolean changePassword) {
this.memberTel4 = memberTel4; this.changePassword = changePassword;
} }
public String getMemberEmail4() { public String getSearchStr() {
return memberEmail4; return searchStr;
} }
public void setMemberEmail4(String memberEmail4) { public void setSearchStr(String searchStr) {
this.memberEmail4 = memberEmail4; this.searchStr = searchStr;
} }
public String getMemberGrade4() { public String getOrder() {
return memberGrade4; return order;
} }
public void setMemberGrade4(String memberGrade4) { public void setOrder(String order) {
this.memberGrade4 = memberGrade4; this.order = order;
} }
public String getTeacherTel() { public String getSort() {
return teacherTel; return sort;
} }
public void setTeacherTel(String teacherTel) { public void setSort(String sort) {
this.teacherTel = teacherTel; this.sort = sort;
} }
public String getTeacherEmail() { public String getOldpwd() {
return teacherEmail; return oldpwd;
} }
public void setTeacherEmail(String teacherEmail) { public void setOldpwd(String oldpwd) {
this.teacherEmail = teacherEmail; this.oldpwd = oldpwd;
} }
......
...@@ -13,60 +13,9 @@ ...@@ -13,60 +13,9 @@
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>2019年“一汽丰田杯”中国工业工程与精益管理创新大赛</title> <title></title>
<style> <style>
.footer {
position: fixed;width:100%;text-align: center;bottom:0;color:#f0f0f0;
background-color: #0a1020;
height:35px;
padding-top:7px;
}
/* loading */
#maskloading{
height:100%;
width:100%;
position:fixed;
top:0px;
left:0px;
background-color: #000000;
opacity: 0.6;
filter: alpha(opacity = 60);
}
.ios-overlay-show {
animation-duration: 750ms;
animation-name: ios-overlay-show;
}
.ui-ios-overlay {
background: none repeat scroll 0 0 rgba(0, 0, 0, 0.8);
border-radius: 20px;
height: 200px;
left: 50%;
margin-left: -100px;
margin-top: -100px;
position: fixed;
top: 40%;
width: 200px;
z-index: 99999;
}
.ui-ios-overlay img {
display: block;
margin: 20% auto 0;
}
.ui-ios-overlay .title {
bottom: 30px;
color: #FFFFFF;
display: block;
font-size: 26px;
font-weight: bold;
left: 0;
position: absolute;
text-align: center;
width: 100%;
}
/* end loading */
</style> </style>
...@@ -77,11 +26,11 @@ ...@@ -77,11 +26,11 @@
<![endif] --> <![endif] -->
<!-- page specific plugin styles --> <!-- page specific plugin styles -->
<!-- fonts --> <!-- fonts -->
<!-- <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:400,300"/> -->
<link rel="stylesheet" href="<webpath:path/>/resources/css/googleCss.css">
<!-- ace styles --> <!-- ace styles -->
<link rel="stylesheet" href="<webpath:path/>/resources/assets/css/ace.min.css" /> <link rel="stylesheet" href="<webpath:path/>/resources/assets/css/ace.min.css" />
<link rel="stylesheet" href="<webpath:path/>/resources/assets/css/ace-rtl.min.css"/> <link rel="stylesheet" href="<webpath:path/>/resources/assets/css/ace-rtl.min.css"/>
<link rel="stylesheet" href="<webpath:path/>/resources/assets/css/ace-skins.min.css" />
<link rel="stylesheet" href="<webpath:path/>/resources/css/page.css"> <link rel="stylesheet" href="<webpath:path/>/resources/css/page.css">
<!--[if lte IE 8] > <!--[if lte IE 8] >
<link rel="stylesheet" href="<webpath:path/>/resources/assets/css/ace-ie.min.css"/> <link rel="stylesheet" href="<webpath:path/>/resources/assets/css/ace-ie.min.css"/>
...@@ -92,10 +41,35 @@ ...@@ -92,10 +41,35 @@
var webPath="<webpath:path/>"; var webPath="<webpath:path/>";
</script> </script>
<!-- inline styles related to this page --> <!-- inline styles related to this page -->
<script type="text/javascript" src="<webpath:path/>/resources/js/tools/jquery.min.js"></script> <script src="<webpath:path/>/resources/assets/js/jquery-2.0.3.min.js"></script>
<script type="text/javascript" src="<webpath:path/>/resources/assets/js/bootstrap.min.js"></script>
<script src="<webpath:path/>/resources/assets/js/ace-extra.min.js"></script>
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="<webpath:path/>/resources/assets/js/html5shiv.js"></script>
<script src="<webpath:path/>/resources/assets/js/respond.min.js"></script>
<![endif]-->
<script src="<webpath:path/>/resources/assets/js/jquery.ui.touch-punch.min.js"></script>
<script src="<webpath:path/>/resources/assets/js/jquery.slimscroll.min.js"></script>
<script src="<webpath:path/>/resources/assets/js/jquery.easy-pie-chart.min.js"></script>
<script src="<webpath:path/>/resources/assets/js/jquery.sparkline.min.js"></script>
<script src="<webpath:path/>/resources/assets/js/flot/jquery.flot.min.js"></script>
<script src="<webpath:path/>/resources/assets/js/flot/jquery.flot.pie.min.js"></script>
<script src="<webpath:path/>/resources/assets/js/flot/jquery.flot.resize.min.js"></script>
<!-- ace scripts -->
<script src="<webpath:path/>/resources/assets/js/ace-elements.min.js"></script>
<script src="<webpath:path/>/resources/assets/js/ace.min.js"></script>
<script type="text/javascript" src="<webpath:path/>/resources/js/tools/jquery.validate.js"></script> <script type="text/javascript" src="<webpath:path/>/resources/js/tools/jquery.validate.js"></script>
<script type="text/javascript" src="<webpath:path/>/resources/assets/js/bootbox.min.js"></script> <script type="text/javascript" src="<webpath:path/>/resources/assets/js/bootbox.min.js"></script>
<script type="text/javascript" src="<webpath:path/>/resources/assets/js/bootstrap.min.js"></script>
<%-- <script type="text/javascript" src="<webpath:path/>/resources/js/tools/jquerysession.js"></script> --%> <%-- <script type="text/javascript" src="<webpath:path/>/resources/js/tools/jquerysession.js"></script> --%>
<script type="text/javascript" src="<webpath:path/>/resources/js/argus.js"></script> <script type="text/javascript" src="<webpath:path/>/resources/js/argus.js"></script>
<!--[if lt IE 9] > <!--[if lt IE 9] >
...@@ -114,15 +88,240 @@ ...@@ -114,15 +88,240 @@
<!-- BEGIN BODY --> <!-- BEGIN BODY -->
<body> <body>
<div class="navbar navbar-default" id="navbar">
<div class="navbar-container" id="navbar-container">
<div class="navbar-header pull-left">
<a href="#" class="navbar-brand">
<small>
<i class="icon-leaf"></i>
中国造血干细胞捐献者资料库天津管理中心
</small>
</a><!-- /.brand -->
</div><!-- /.navbar-header -->
<div class="navbar-header pull-right" role="navigation">
<ul class="nav ace-nav">
<li class="light-blue">
<a data-toggle="dropdown" href="#" class="dropdown-toggle">
<span class="user-info">
<small>您好,</small>
${sessionScope.session_user.userName}
</span>
<i class="icon-caret-down"></i>
</a>
<ul class="user-menu pull-right dropdown-menu dropdown-yellow dropdown-caret dropdown-close">
<!-- <li>
<a href="#">
<i class="icon-user"></i>
修改密码
</a>
</li>
<li class="divider"></li> -->
<li>
<a href="#">
<i class="icon-off"></i>
退出
</a>
</li>
</ul>
</li>
</ul><!-- /.ace-nav -->
</div><!-- /.navbar-header -->
</div><!-- /.container -->
</div>
<div class="main-container" id="main-container">
<script type="text/javascript">
try{ace.settings.check('main-container' , 'fixed')}catch(e){}
</script>
<div class="main-container-inner">
<a class="menu-toggler" id="menu-toggler" href="#">
<span class="menu-text"></span>
</a>
<div class="sidebar" id="sidebar">
<script type="text/javascript">
try{ace.settings.check('sidebar' , 'fixed')}catch(e){}
</script>
<ul class="nav nav-list">
<li class="active">
<a href="index.html">
<i class="icon-user"></i>
<span class="menu-text"> 用户管理 </span>
</a>
</li>
<li>
<a href="#" class="dropdown-toggle">
<i class="icon-heart"></i>
<span class="menu-text"> 彩虹计划 </span>
<b class="arrow icon-angle-down"></b>
</a>
<ul class="submenu">
<li>
<a href="elements.html">
<i class="icon-double-angle-right"></i>
彩虹计划用户管理
</a>
</li>
<li>
<a href="buttons.html">
<i class="icon-double-angle-right"></i>
愿望管理
</a>
</li>
</ul>
</li>
<li>
<a href="#" class="dropdown-toggle">
<i class="icon-book"></i>
<span class="menu-text"> 电子证书 </span>
<b class="arrow icon-angle-down"></b>
</a>
<ul class="submenu">
<li>
<a href="tables.html">
<i class="icon-double-angle-right"></i>
模版管理
</a>
</li>
<li>
<a href="jqgrid.html">
<i class="icon-double-angle-right"></i>
证书管理
</a>
</li>
</ul>
</li>
<li>
<a href="#" class="dropdown-toggle">
<i class="icon-group"></i>
<span class="menu-text"> 活动管理 </span>
<b class="arrow icon-angle-down"></b>
</a>
<ul class="submenu">
<li>
<a href="form-elements.html">
<i class="icon-double-angle-right"></i>
活动管理
</a>
</li>
<li>
<a href="form-wizard.html">
<i class="icon-double-angle-right"></i>
活动类别
</a>
</li>
</ul>
</li>
<li>
<a href="widgets.html">
<i class="icon-list-alt"></i>
<span class="menu-text"> 积分管理 </span>
</a>
</li>
<li>
<a href="calendar.html">
<i class="icon-briefcase "></i>
<span class="menu-text">
礼物管理
</span>
</a>
</li>
<li>
<a href="#" class="dropdown-toggle">
<i class="icon-envelope "></i>
<span class="menu-text"> 消息管理 </span>
<b class="arrow icon-angle-down"></b>
</a>
<ul class="submenu">
<li>
<a href="profile.html">
<i class="icon-double-angle-right"></i>
消息设置
</a>
</li>
<li>
<a href="inbox.html">
<i class="icon-double-angle-right"></i>
消息管理
</a>
</li>
</ul>
</li>
</ul><!-- /.nav-list -->
<div class="sidebar-collapse" id="sidebar-collapse">
<i class="icon-double-angle-left" data-icon1="icon-double-angle-left" data-icon2="icon-double-angle-right"></i>
</div>
</div>
<decorator:body />
</div><!-- /.main-container-inner -->
<a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
<i class="icon-double-angle-up icon-only bigger-110"></i>
</a>
</div>
<decorator:body />
<div class="footer">
<img src="<webpath:path/>/resources/images/ga.png"/>&nbsp;<a target="_blank" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=12011102000403" style="color:#fff;">津公网安备 12011102000403号</a>
&nbsp;&nbsp;<a target="_blank" href="http://www.miitbeian.gov.cn/" style="color:#fff;">津ICP备16006658号-2</a>&nbsp;&nbsp;系统技术支持:镜像科技(天津)有限公司&nbsp;&nbsp;邮箱:chinaielean@163.com
</div>
</body> </body>
<!-- END BODY --> <!-- END BODY -->
......
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="webpath" uri="/WEB-INF/tlds/path.tld"%>
<%@ taglib prefix="webpage" uri="/WEB-INF/tlds/pageview.tld"%>
<head>
</head>
<div class="main-content">
<div class="breadcrumbs" id="breadcrumbs">
<ul class="breadcrumb">
<li>
<i class="icon-home home-icon"></i>
<a href="#">首页</a>
</li>
</ul><!-- .breadcrumb -->
</div>
</div>
...@@ -11,22 +11,65 @@ ...@@ -11,22 +11,65 @@
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>后台系统</title> <title>后台系统</title>
<link href="<webpath:path/>/resources/frame/style/authority/login_css.css" rel="stylesheet" type="text/css" /> <link rel="stylesheet" type="text/css" href="<webpath:path/>/resources/assets/css/bootstrap.min.css"/>
<script type="text/javascript" src="<webpath:path/>/resources/frame/scripts/jquery/jquery-1.7.1.js"></script> <link href="<webpath:path/>/resources/css/login_css.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<webpath:path/>/resources/js/tools/jquery.min.js"></script>
<script type="text/javascript" src="<webpath:path/>/resources/js/tools/jquery.validate.js"></script>
<script type="text/javascript" src="<webpath:path/>/resources/assets/js/bootbox.min.js"></script>
<script type="text/javascript" src="<webpath:path/>/resources/assets/js/bootstrap.min.js"></script>
<script type="text/javascript" src="<webpath:path/>/resources/js/argus.js"></script>
<script type="text/javascript"> <script type="text/javascript">
var webPath="<webpath:path/>";
$(document).ready(function(){ $(document).ready(function(){
$("#login_sub").click(function(){ $("#submitForm").validate({
$("#submitForm").attr("action", "index.html").submit(); rules:{
userName:{
required: true
},
pwd:{
required:true
}
},
messages:{
userName:{
required:"请填写用户名!"
},
pwd:{
required:"请填写密码!"
}
},
submitHandler:function(form){
var userName=$('#userName').val();
var pwd=$('#pwd').val();
$.ajax({
type: 'POST',
url: '/api/signin',
dataType:'json',
data: {
userName:userName,
pwd:pwd
},
success: function(data){
var status = data.status;
if(status == 1){
window.location.href = webPath + "/default";
}else if(status == 0){
bootbox.dialog({
message:"请核对用户名或密码是否正确!",
buttons:{
"success":{
"label":"OK",
"className":"btn-sm btn-primary"
}
}
});
}
}
});
}
}); });
}); });
/*回车事件*/
function EnterPress(e){ //传入 event
var e = e || window.event;
if(e.keyCode == 13){
$("#submitForm").attr("action", "index.html").submit();
}
}
</script> </script>
</head> </head>
<body> <body>
...@@ -39,13 +82,13 @@ ...@@ -39,13 +82,13 @@
<span id="login_err" class="sty_txt2"></span> <span id="login_err" class="sty_txt2"></span>
</div> </div>
<div> <div>
用户名:<input type="text" name="userName" class="username" id="name"> 用户名:<input type="text" name="userName" class="username" id="userName">
</div> </div>
<div> <div>
&nbsp;&nbsp;&nbsp;&nbsp;码:<input type="password" name="pwd" class="pwd" id="pwd"> &nbsp;&nbsp;&nbsp;&nbsp;码:<input type="password" name="pwd" class="pwd" id="pwd">
</div> </div>
<div id="btn_area"> <div id="btn_area">
<input type="button" class="login_btn" id="login_sub" value="登 录"> <input type="submit" class="login_btn" id="login_sub" value="登 录">
<input type="reset" class="login_btn" id="login_ret" value="重 置"> <input type="reset" class="login_btn" id="login_ret" value="重 置">
</div> </div>
</form> </form>
...@@ -54,59 +97,7 @@ ...@@ -54,59 +97,7 @@
</div> </div>
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
$().ready(function() {
$("#login_form").validate({
rules:{
userName:{
required: true
},
pwd:{
required:true
}
},
messages:{
userName:{
required:"请填写用户名!"
},
pwd:{
required:"请填写密码!"
}
},
submitHandler:function(form){
var userName=$('#userName').val();
var pwd=$('#pwd').val();
$.ajax({
type: 'POST',
url: '/api/signin',
dataType:'json',
data: {
userName:userName,
pwd:pwd
},
success: function(data){
var status = data.status;
if(status == 1)
window.location.href = webPath + "/default";
}else if(status == 0){
bootbox.dialog({
message:"请核对用户名或密码是否正确!",
buttons:{
"success":{
"label":"OK",
"className":"btn-sm btn-primary"
}
}
});
} else if (status == 2){
window.location.href = webPath + "/api/user/list";
}
}
});
}
});
});
</script> </script>
</body> </body>
......
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="webpath" uri="/WEB-INF/tlds/path.tld"%>
<%@ taglib prefix="webpage" uri="/WEB-INF/tlds/pageview.tld"%>
<head>
</head>
<div class="main-content">
<div class="breadcrumbs" id="breadcrumbs">
<ul class="breadcrumb">
<li>
<i class="icon-home home-icon"></i>
<a href="#">首页</a>
</li>
<li class="active">用户管理</li>
</ul><!-- .breadcrumb -->
</div>
</div>
...@@ -5,7 +5,7 @@ html { ...@@ -5,7 +5,7 @@ html {
body { body {
padding-bottom: 0; padding-bottom: 0;
background-color: #e4e6e9; background-color: #fff;
min-height: 100%; min-height: 100%;
font-family: 'Open Sans'; font-family: 'Open Sans';
font-size: 13px; font-size: 13px;
...@@ -1756,7 +1756,7 @@ blockquote, blockquote.pull-right { ...@@ -1756,7 +1756,7 @@ blockquote, blockquote.pull-right {
background-color: transparent; background-color: transparent;
display: inline-block; display: inline-block;
line-height: 24px; line-height: 24px;
margin: 0 22px 0 12px; margin: 5px 22px 0 12px;
padding: 0; padding: 0;
font-size: 13px; font-size: 13px;
color: #333; color: #333;
......
...@@ -22,7 +22,7 @@ html,body { ...@@ -22,7 +22,7 @@ html,body {
margin: 0 auto; margin: 0 auto;
width: 812px; width: 812px;
height: 408px; height: 408px;
background: url('../../images/login/login.png') 0px 0px no-repeat; background: url('../images/login.png') 0px 0px no-repeat;
position: relative; position: relative;
} }
...@@ -74,7 +74,7 @@ html,body { ...@@ -74,7 +74,7 @@ html,body {
border-style: none; border-style: none;
cursor: pointer; cursor: pointer;
font-family: "Microsoft YaHei", "微软雅黑", "sans-serif"; font-family: "Microsoft YaHei", "微软雅黑", "sans-serif";
background: url('../../images/login/btn.jpg') 0px -1px no-repeat; background: url('../images/btn.jpg') 0px -1px no-repeat;
} }
.login_btn:hover { .login_btn:hover {
...@@ -85,6 +85,10 @@ html,body { ...@@ -85,6 +85,10 @@ html,body {
border-style: none; border-style: none;
cursor: pointer; cursor: pointer;
font-family: "Microsoft YaHei", "微软雅黑", "sans-serif"; font-family: "Microsoft YaHei", "微软雅黑", "sans-serif";
background: url('../../images/login/btn_hover.jpg') 0px 0px no-repeat; background: url('../images/btn_hover.jpg') 0px 0px no-repeat;
color: #fff; color: #fff;
}
.error{
color:#ff0000;
} }
\ No newline at end of file
<html>
<head>
<meta http-equiv="content-type" content="text/xml; charset=utf-8" />
<title>My97DatePicker</title>
<script type="text/javascript" src="config.js"></script>
<script>
if(parent==window)
location.href = 'http://www.my97.net/';
var $d, $dp, $pdp = parent.$dp, $dt, $tdt, $sdt, $IE=$pdp.ie, $FF = $pdp.ff,$OPERA=$pdp.opera, $ny, $cMark = false;
if ($pdp.eCont) {
$dp = {};
for (var p in $pdp) {
$dp[p] = $pdp[p];
}
}
else
$dp = $pdp;
$dp.getLangIndex = function(name){
var arr = langList;
for (var i = 0; i < arr.length; i++) {
if (arr[i].name == name) {
return i;
}
}
return -1;
}
$dp.getLang = function(name){
var index = $dp.getLangIndex(name);
if (index == -1) {
index = 0;
}
return langList[index];
}
$dp.realLang = $dp.getLang($dp.lang);
document.write("<script src='lang/" + $dp.realLang.name + ".js' charset='" + $dp.realLang.charset + "'><\/script>");
for (var i = 0; i < skinList.length; i++) {
document.write('<link rel="stylesheet" type="text/css" href="skin/' + skinList[i].name + '/datepicker.css" title="' + skinList[i].name + '" charset="' + skinList[i].charset + '" disabled="true"/>');
}
</script>
<script type="text/javascript" src="calendar.js"></script>
</head>
<body leftmargin="0" topmargin="0" onload="$c.autoSize()">
</body>
</html>
<script>new My97DP();</script>
\ No newline at end of file
/*
* My97 DatePicker 4.6 Prerelease
* SITE: http://dp.my97.net
* BLOG: http://my97.cnblogs.com
* MAIL: smallcarrot@163.com
*/
var $dp,WdatePicker;(function(){var _={
$wdate:true,
$dpPath:"",
$crossFrame:true,
doubleCalendar:false,
position:{},
lang:"auto",
skin:"default",
dateFmt:"yyyy-MM-dd",
realDateFmt:"yyyy-MM-dd",
realTimeFmt:"HH:mm:ss",
realFullFmt:"%Date %Time",
minDate:"1900-01-01 00:00:00",
maxDate:"2099-12-31 23:59:59",
startDate:"",
alwaysUseStartDate:false,
yearOffset:1911,
firstDayOfWeek:0,
isShowWeek:false,
highLineWeekDay:true,
isShowClear:true,
isShowToday:true,
isShowOthers:true,
readOnly:false,
errDealMode:0,
autoPickDate:null,
qsEnabled:true,
specialDates:null,specialDays:null,disabledDates:null,disabledDays:null,opposite:false,onpicking:null,onpicked:null,onclearing:null,oncleared:null,ychanging:null,ychanged:null,Mchanging:null,Mchanged:null,dchanging:null,dchanged:null,Hchanging:null,Hchanged:null,mchanging:null,mchanged:null,schanging:null,schanged:null,eCont:null,vel:null,errMsg:"",quickSel:[],has:{}};WdatePicker=U;var X=window,O="document",J="documentElement",C="getElementsByTagName",V,A,T,I,b;switch(navigator.appName){case"Microsoft Internet Explorer":T=true;break;case"Opera":b=true;break;default:I=true;break}A=L();if(_.$wdate)M(A+"skin/WdatePicker.css");V=X;if(_.$crossFrame){try{while(V.parent[O]!=V[O]&&V.parent[O][C]("frameset").length==0)V=V.parent}catch(P){}}if(!V.$dp)V.$dp={ff:I,ie:T,opera:b,el:null,win:X,status:0,defMinDate:_.minDate,defMaxDate:_.maxDate,flatCfgs:[]};B();if($dp.status==0)Z(X,function(){U(null,true)});if(!X[O].docMD){E(X[O],"onmousedown",D);X[O].docMD=true}if(!V[O].docMD){E(V[O],"onmousedown",D);V[O].docMD=true}E(X,"onunload",function(){if($dp.dd)Q($dp.dd,"none")});function B(){V.$dp=V.$dp||{};obj={$:function($){return(typeof $=="string")?this.win[O].getElementById($):$},$D:function($,_){return this.$DV(this.$($).value,_)},$DV:function(_,$){if(_!=""){this.dt=$dp.cal.splitDate(_,$dp.cal.dateFmt);if($)for(var A in $){if(this.dt[A]===undefined)this.errMsg="invalid property:"+A;this.dt[A]+=$[A]}if(this.dt.refresh())return this.dt}return""},show:function(){Q(this.dd,"block")},hide:function(){Q(this.dd,"none")},attachEvent:E};for(var $ in obj)V.$dp[$]=obj[$];$dp=V.$dp}function E(A,$,_){if(T)A.attachEvent($,_);else{var B=$.replace(/on/,"");_._ieEmuEventHandler=function($){return _($)};A.addEventListener(B,_._ieEmuEventHandler,false)}}function L(){var _,A,$=X[O][C]("script");for(var B=0;B<$.length;B++){_=$[B].src.substring(0,$[B].src.toLowerCase().indexOf("wdatepicker.js"));A=_.lastIndexOf("/");if(A>0)_=_.substring(0,A+1);if(_)break}return _}function F(F){var E,C;if(F.substring(0,1)!="/"&&F.indexOf("://")==-1){E=V.location.href;C=location.href;if(E.indexOf("?")>-1)E=E.substring(0,E.indexOf("?"));if(C.indexOf("?")>-1)C=C.substring(0,C.indexOf("?"));var G,I,$="",D="",A="",J,H,B="";for(J=0;J<Math.max(E.length,C.length);J++){G=E.charAt(J).toLowerCase();I=C.charAt(J).toLowerCase();if(G==I){if(G=="/")H=J}else{$=E.substring(H+1,E.length);$=$.substring(0,$.lastIndexOf("/"));D=C.substring(H+1,C.length);D=D.substring(0,D.lastIndexOf("/"));break}}if($!="")for(J=0;J<$.split("/").length;J++)B+="../";if(D!="")B+=D+"/";F=E.substring(0,E.lastIndexOf("/")+1)+B+F}_.$dpPath=F}function M(A,$,B){var D=X[O][C]("HEAD").item(0),_=X[O].createElement("link");if(D){_.href=A;_.rel="stylesheet";_.type="text/css";if($)_.title=$;if(B)_.charset=B;D.appendChild(_)}}function Z($,_){E($,"onload",_)}function G($){$=$||V;var A=0,_=0;while($!=V){var D=$.parent[O][C]("iframe");for(var F=0;F<D.length;F++){try{if(D[F].contentWindow==$){var E=W(D[F]);A+=E.left;_+=E.top;break}}catch(B){}}$=$.parent}return{"leftM":A,"topM":_}}function W(E){if(T)return E.getBoundingClientRect();else{var A={ROOT_TAG:/^body|html$/i,OP_SCROLL:/^(?:inline|table-row)$/i},G=null,_=E.offsetTop,F=E.offsetLeft,D=E.offsetWidth,B=E.offsetHeight,C=E.offsetParent;if(C!=E)while(C){F+=C.offsetLeft;_+=C.offsetTop;if(C.tagName.toLowerCase()=="body")G=C.ownerDocument.defaultView;C=C.offsetParent}C=E.parentNode;while(C.tagName&&!A.ROOT_TAG.test(C.tagName)){if(C.scrollTop||C.scrollLeft)if(!A.OP_SCROLL.test(Q(C)))if(!b||C.style.overflow!=="visible"){F-=C.scrollLeft;_-=C.scrollTop}C=C.parentNode}var $=a(G);F-=$.left;_-=$.top;D+=F;B+=_;return{"left":F,"top":_,"right":D,"bottom":B}}}function N($){$=$||V;var _=$[O];_=_[J]&&_[J].clientHeight&&_[J].clientHeight<=_.body.clientHeight?_[J]:_.body;return{"width":_.clientWidth,"height":_.clientHeight}}function a($){$=$||V;var B=$[O],A=B[J],_=B.body;B=(A&&A.scrollTop!=null&&(A.scrollTop>_.scrollLeft||A.scrollLeft>_.scrollLeft))?A:_;return{"top":B.scrollTop,"left":B.scrollLeft}}function D($){src=$?($.srcElement||$.target):null;if($dp&&$dp.cal&&!$dp.eCont&&$dp.dd&&Q($dp.dd)=="block"&&src!=$dp.el)$dp.cal.close()}function Y(){$dp.status=2;H()}function H(){if($dp.flatCfgs.length>0){var $=$dp.flatCfgs.shift();$.el={innerHTML:""};$.autoPickDate=true;$.qsEnabled=false;K($)}}var R,$;function U(E,_){$dp.win=X;B();E=E||{};if(_){if(!D()){$=$||setInterval(function(){if(V[O].readyState=="complete")clearInterval($);U(null,true)},50);return}if($dp.status==0){$dp.status=1;K({el:{innerHTML:""}},true)}else return}else if(E.eCont){E.eCont=$dp.$(E.eCont);$dp.flatCfgs.push(E);if($dp.status==2)H()}else{if($dp.status==0){U(null,true);return}if($dp.status!=2)return;var C=A();if(C){$dp.srcEl=C.srcElement||C.target;C.cancelBubble=true}E.el=$dp.$(E.el||$dp.srcEl);if(!E.el||E.el.disabled||(E.el==$dp.el&&Q($dp.dd)!="none"&&$dp.dd.style.left!="-1970px"))return;K(E)}function D(){if(T&&V!=X&&V[O].readyState!="complete")return false;return true}function A(){if(I){func=A.caller;while(func!=null){var $=func.arguments[0];if($&&($+"").indexOf("Event")>=0)return $;func=func.caller}return null}return event}}function S(_,$){return _.currentStyle?_.currentStyle[$]:document.defaultView.getComputedStyle(_,false)[$]}function Q(_,$){if(_)if($!=null)_.style.display=$;else return S(_,"display")}function K(H,$){for(var D in _)if(D.substring(0,1)!="$")$dp[D]=_[D];for(D in H)if($dp[D]===undefined)$dp.errMsg="invalid property:"+D;else $dp[D]=H[D];var E=$dp.el?$dp.el.nodeName:"INPUT";if($||$dp.eCont||new RegExp(/input|textarea|div|span|p|a/ig).test(E))$dp.elProp=E=="INPUT"?"value":"innerHTML";else return;if($dp.lang=="auto")$dp.lang=T?navigator.browserLanguage.toLowerCase():navigator.language.toLowerCase();if(!$dp.dd||$dp.eCont||($dp.lang&&$dp.realLang&&$dp.realLang.name!=$dp.lang&&$dp.getLangIndex&&$dp.getLangIndex($dp.lang)>=0)){if($dp.dd&&!$dp.eCont)V[O].body.removeChild($dp.dd);if(_.$dpPath=="")F(A);var B="<iframe src=\""+_.$dpPath+"My97DatePicker.htm\" frameborder=\"0\" border=\"0\" scrolling=\"no\"></iframe>";if($dp.eCont){$dp.eCont.innerHTML=B;Z($dp.eCont.childNodes[0],Y)}else{$dp.dd=V[O].createElement("DIV");$dp.dd.style.cssText="position:absolute;z-index:19700";$dp.dd.innerHTML=B;V[O].body.insertBefore($dp.dd,V[O].body.firstChild);Z($dp.dd.childNodes[0],Y);if($)$dp.dd.style.left=$dp.dd.style.top="-1970px";else{$dp.show();C()}}}else if($dp.cal){$dp.show();$dp.cal.init();if(!$dp.eCont)C()}function C(){var F=$dp.position.left,B=$dp.position.top,C=$dp.el;if(C!=$dp.srcEl&&(Q(C)=="none"||C.type=="hidden"))C=$dp.srcEl;var H=W(C),$=G(X),D=N(V),A=a(V),E=$dp.dd.offsetHeight,_=$dp.dd.offsetWidth;if(isNaN(B)){if(B=="above"||(B!="under"&&(($.topM+H.bottom+E>D.height)&&($.topM+H.top-E>0))))B=A.top+$.topM+H.top-E-3;else B=A.top+$.topM+H.bottom;B+=T?-1:1}else B+=A.top+$.topM;if(isNaN(F))F=A.left+Math.min($.leftM+H.left,D.width-_-5)-(T?2:0);else F+=A.left+$.leftM;$dp.dd.style.top=B+"px";$dp.dd.style.left=F+"px"}}})()
\ No newline at end of file
/*
* My97 DatePicker 4.6 Prerelease
* SITE: http://dp.my97.net
* BLOG: http://my97.cnblogs.com
* MAIL: smallcarrot@163.com
*/
eval(function(B,D,A,G,E,F){function C(A){return A<62?String.fromCharCode(A+=A<26?65:A<52?71:-4):A<63?'_':A<64?'$':C(A>>6)+C(A&63)}while(A>0)E[C(G--)]=D[--A];return B.replace(/[\w\$]+/g,function(A){return E[A]==F[A]?A:E[A]})}('k g;d(FI){E8.Ca.__defineSetter__("C$",_(b){d(!b){q.Bm();}6 b;});E8.Ca.__defineGetter__("FE",_(){k b=q.Fz;CK(b.FO!=U){b=b.parentNode;}6 b;});HTMLElement.Ca.Cu=_(a,A){k b=a.8(/Es/,"");A.Ed=_(b){Fu.BI=b;6 A();};q.addEventListener(b,A.Ed,z);};}_ EN(){g=q;q.CW=[];c=CS.createElement("m");c.$="EB";c.BQ=\'<m BM=dpTitle><m y="Cq NavImgll"><L C8="###"></L></m><m y="Cq NavImgl"><L C8="###"></L></m><m 3="B8:CB"><m y="CJ MMenu"></m><BH y=Ce Bd=U></m><m 3="B8:CB"><m y="CJ YMenu"></m><BH y=Ce Bd=V></m><m y="Cq NavImgrr"><L C8="###"></L></m><m y="Cq NavImgr"><L C8="###"></L></m><m 3="B8:EO"></m></m><m 3="position:absolute;overflow:hidden"></m><m></m><m BM=dpTime><m y="CJ hhMenu"></m><m y="CJ mmMenu"></m><m y="CJ ssMenu"></m><5 B4=T By=T Bw=T><h><e rowspan=V><Dg BM=dpTimeStr></Dg>&Dj;<BH y=tB D2=V Bd=W><BH 2=":" y=FS Ec><BH y=FW D2=V Bd=BA><BH 2=":" y=FS Ec><BH y=FW D2=V Bd=X></e><e><BZ BM=dpTimeUp></BZ></e></h><h><e><BZ BM=dpTimeDown></BZ></e></h></5></m><m BM=dpQS></m><m BM=dpControl><BH y=DS BM=dpClearInput Dp=BZ Bd=BJ><BH y=DS BM=dpTodayInput Dp=BZ Bd=Y><BH y=DS BM=dpOkInput Dp=BZ Bd=Ci></m>\';EJ(c,_(){Cs();});a();q.FX();b();D8("S,K,H,P,R");c.EM.9=_(){D7(U);};c.El.9=_(){D7(-U);};c.ED.9=_(){d(c.BV.3.De!="Fo"){g.D1();C6(c.BV);}r{t(c.BV);}};EJ(c.Cn,_(){d(j.Bj.3.De!="E7"){c.BO.EC();}BI.C$=z;});CS.body.EL(c);_ a(){k a=b("L");x=b("m"),BS=b("BH"),EA=b("BZ"),FJ=b("Dg");c.DN=a[T];c.Ck=a[U];c.DO=a[W];c.Cz=a[V];c.C3=x[Z];c.BO=BS[T];c.BG=BS[U];c.Do=x[T];c.Ct=x[BA];c.CN=x[BJ];c.BV=x[B3];c.CT=x[Dy];c.EK=x[CR];c.EX=x[13];c.FA=x[14];c.Fe=x[Dx];c.ED=x[16];c.Ef=x[17];c.C2=BS[V];c.Ds=BS[BA];c.D5=BS[BJ];c.Cv=BS[Y];c.Bx=BS[Ci];c.Cn=BS[Z];c.EM=EA[T];c.El=EA[U];c.Fj=FJ[T];_ b(b){6 c.DW(b);}}_ b(){c.DN.9=_(){BN=BN<=T?BN-U:-U;d(BN%X==T){c.BG.EC();6;}c.BG.2=l.S-U;c.BG.CC();};c.Ck.9=_(){l.v("K",-U);c.BO.CC();};c.DO.9=_(){l.v("K",U);c.BO.CC();};c.Cz.9=_(){BN=BN>=T?BN+U:U;d(BN%X==T){c.BG.EC();6;}c.BG.2=l.S+U;c.BG.CC();};}}EN.Ca={FX:_(){BN=T;j.DH=q;d(j.Cm&&j.f.Cm!=w){j.f.Cm=s;j.f.Dt();}b();q.Bi=j.Bi;q.E6();q.CD=j.CD==w?(j.n.Bb&&j.n.Bb?z:s):j.CD;l=q.Eu=o BP();BF=o BP();Bl=q.B2=o BP();q.FK=q.Cd("disabledDates");q.FD=q.Cd("disabledDays");q.E3=q.Cd("specialDates");q.FY=q.Cd("specialDays");q.BY=q.C0(j.BY,j.BY!=j.Ej?j.Bg:j.CL,j.Ej);q.Bc=q.C0(j.Bc,j.Bc!=j.Fv?j.Bg:j.CL,j.Fv);d(q.BY.Br(q.Bc)>T){j.D3=1.err_1;}d(q.BW()){q.Ei();q.B_=j.f[j.BE];}r{q.Bh(z,V);}i("S");i("K");i("M");i("H");i("P");i("R");c.Fj.BQ=1.timeStr;c.Cv.2=1.clearStr;c.Bx.2=1.todayStr;c.Cn.2=1.okStr;q.EW();q.Ex();d(j.D3){alert(j.D3);}q.D_();Cs();d(j.f.FO==U){j.Cu(j.f,"EF",_(b){d(j.f==(b.FE||b.Fz)){Ea=(b.Bu==CY)?b.D6:b.Bu;d(Ea==Z){d(!j.DH.Du()){b.Bm?b.Bm():b.C$=z;j.DH.Bh(z,V);j.Bq();}r{j.DH.Bh(s);j.t();}}}});}_ b(){k a,b;p(a=T;(b=CS.DW("link")[a]);a++){d(v(b,"rel").BL("3")!=-U&&v(b,"Fp")){b.Bv=s;d(v(b,"Fp")==j.skin){b.Bv=z;}}}}},Ei:_(){k A=q.Cg(),b=s;d(A!=T){b=z;k a;d(A>T){a=q.Bc;}r{a=q.BY;}d(j.n.DD){l.S=a.S;l.K=a.K;l.M=a.M;}d(j.n.Bb){l.H=a.H;l.P=a.P;l.R=a.R;}}6 b;},Cp:_(K,F,EV,a,D,B,A,EU,G){k E;d(K&&K.BW){E=K;}r{E=o BP();d(K!=""){F=F||j.Bi;k J,DX=T,I,C=/Cw|Cf|DR|S|B7|CQ|Dl|K|Bj|M|E4|H|E1|P|FU|R|B9|D|Dz|B$|Cl/BX,CA=F.EI(C);C.C_=T;d(G){I=K.Dv(/\\B$+/);}r{k b=T,H="^";CK((I=C.DF(F))!==w){d(b>T){H+=F.CM(b,I.DB);}b=I.DB-b;b=C.C_;Cb(I[T]){u"Cw":H+="(\\\\M{BA})";0;u"Cf":H+="(\\\\M{W})";0;Ft:d(o Ch("B7|CQ|B9|D|Dz|B$|Cl").D9(I[T])){H+="(\\\\D+)";}r{H+="(\\\\M\\\\M?)";}0;}}H+=".*b";I=o Ch(H).DF(K);DX=U;}d(I){p(J=T;J<CA.7;J++){k BB=I[J+DX];d(BB){Cb(CA[J]){u"B7":u"CQ":E.K=BK(CA[J],BB);0;u"S":u"DR":BB=CF(BB,T);d(BB<50){BB+=Ee;}r{BB+=1900;}E.S=BB;0;u"Cf":E.S=CF(BB,T)+j.Ew;0;Ft:E[CA[J].D0(-U)]=BB;0;}}}}r{E.M=32;}}}E.FB(EV,a,D,B,A,EU);6 E;_ BK(b,A){k B=b=="B7"?1.FH:1.Bt;p(k a=T;a<CR;a++){d(B[a].EQ()==A.substr(T,B[a].7).EQ()){6 a+U;}}6-U;}},Cd:_(B){k A,a=j[B],b="(?:";d(a){p(A=T;A<a.7;A++){b+=q.C5(a[A]);d(A!=a.7-U){b+="|";}}b=o Ch(b+")");}r{b=w;}6 b;},Dh:_(){k b=q.DY();d(j.f[j.BE]!=b){j.f[j.BE]=b;}q.Cy();},Cy:_(b){k a=j.b(j.vel),b=CX(b,q.DY(j.Bg));d(a){a.2=b;}v(j.f,"DL",b);},C5:_(R){k DK="DA",Bf,B1,Fd=/#\\{(.*?)\\}/;R=R+"";p(k N=T;N<DK.7;N++){R=R.8("%"+DK.Bz(N),q.Ba(DK.Bz(N),w,BF));}d(R.CM(T,W)=="#F{"){R=R.CM(W,R.7-U);d(R.BL("6 ")<T){R="6 "+R;}R=j.win.CO(\'o Function("\'+R+\'");\');R=R();}r{CK((Bf=Fd.DF(R))!=w){Bf.C_=Bf.DB+Bf[U].7+V;B1=DE(CO(Bf[U]));d(B1<T){B1="Bo"+(-B1);}R=R.CM(T,Bf.DB)+B1+R.CM(Bf.C_+U);}}6 R;},C0:_(b,A,B){k a;b=q.C5(b);d(!b||b==""){b=B;}d(typeof b=="object"){a=b;}r{a=q.Cp(b,A,w,w,U,T,T,T,s);a.S=(""+a.S).8(/^Bo/,"-");a.K=(""+a.K).8(/^Bo/,"-");a.M=(""+a.M).8(/^Bo/,"-");a.H=(""+a.H).8(/^Bo/,"-");a.P=(""+a.P).8(/^Bo/,"-");a.R=(""+a.R).8(/^Bo/,"-");d(b.BL("%E$")>=T){b=b.8(/%E$/BX,"T");a.M=T;a.K=DE(a.K)+U;}a.CI();}6 a;},BW:_(){k A,a;d(j.alwaysUseStartDate||(j.ES!=""&&j.f[j.BE]=="")){A=q.C5(j.ES);a=j.Bg;}r{A=j.f[j.BE];a=q.Bi;}l.CZ(q.Cp(A,a));d(A!=""){k b=U;d(j.n.DD&&!q.DP(l)){l.S=BF.S;l.K=BF.K;l.M=BF.M;b=T;}d(j.n.Bb&&!q.Db(l)){l.H=BF.H;l.P=BF.P;l.R=BF.R;b=T;}6 b&&q.BR(l);}6 U;},DP:_(b){d(b.S!=w){b=CH(b.S,BA)+"-"+b.K+"-"+b.M;}6 b.EI(/^((\\M{V}(([Em][048])|([Ey][26]))[\\-\\/\\R]?((((T?[E0])|(U[FQ]))[\\-\\/\\R]?((T?[U-Z])|([U-V][T-Z])|(W[FP])))|(((T?[Eo])|(Dy))[\\-\\/\\R]?((T?[U-Z])|([U-V][T-Z])|(CP)))|(T?V[\\-\\/\\R]?((T?[U-Z])|([U-V][T-Z])))))|(\\M{V}(([Em][1235679])|([Ey][01345789]))[\\-\\/\\R]?((((T?[E0])|(U[FQ]))[\\-\\/\\R]?((T?[U-Z])|([U-V][T-Z])|(W[FP])))|(((T?[Eo])|(Dy))[\\-\\/\\R]?((T?[U-Z])|([U-V][T-Z])|(CP)))|(T?V[\\-\\/\\R]?((T?[U-Z])|(U[T-Z])|(V[T-Ci]))))))(\\R(((T?[T-Z])|([U-V][T-W]))\\:([T-X]?[T-Z])((\\R)|(\\:([T-X]?[T-Z])))))?b/);},Db:_(b){d(b.H!=w){b=b.H+":"+b.P+":"+b.R;}6 b.EI(/^([T-Z]|([T-U][T-Z])|([V][T-W])):([T-Z]|([T-X][T-Z])):([T-Z]|([T-X][T-Z]))b/);},Cg:_(b,a){a=a||l;k A=a.Br(q.BY,b);d(A>T){A=a.Br(q.Bc,b);d(A<T){A=T;}}6 A;},BR:_(A,b,a){b=b||j.n.DV;k B=q.Cg(b,A);d(B==T){d(b=="M"&&a==w){a=o BU(A.S,A.K-U,A.M).Be();}B=!q.Ev(a)&&!q.FT(A);}r{B=z;}6 j.opposite?!B:B;},Du:_(){k A=j.f,b=q,a=j.f[j.BE];d(a!=w){d(a!=""&&!j.Cm){b.B2.CZ(b.Cp(a,b.Bi));}d(a==""||(b.DP(b.B2)&&b.Db(b.B2)&&b.BR(b.B2))){d(a!=""){b.Eu.CZ(b.B2);b.Dh();}r{b.Cy("");}}r{6 z;}}6 s;},close:_(){Cs();d(q.Du()){q.Bh(s);j.t();}r{q.Bh(z);}},Cr:_(){k a,F,b,I,C,G=o B5(),A=1.Fr,B=j.firstDayOfWeek,H="",E="",J=o BP(l.S,l.K,l.M,T,T,T),BK=J.S,D=J.K;C=U-o BU(BK,D-U,U).Be()+B;d(C>U){C-=Y;}G.L("<5 y=Fn DC=EE% Bw=T B4=T By=T>");G.L("<h y=Ez Dd=D$>");d(j.FV){G.L("<e>"+A[T]+"</e>");}p(a=T;a<Y;a++){G.L("<e>"+A[(B+a)%Y+U]+"</e>");}G.L("</h>");p(a=U,F=C;a<Y;a++){G.L("<h>");p(b=T;b<Y;b++){J.BW(BK,D,F++);J.CI();d(J.K==D){I=s;d(J.Br(Bl,"M")==T){H="Wselday";}r{d(J.Br(BF,"M")==T){H="Wtoday";}r{H=(j.En&&(T==(B+b)%Y||BJ==(B+b)%Y)?"Wwday":"Wday");}}E=(j.En&&(T==(B+b)%Y||BJ==(B+b)%Y)?"WwdayOn":"WdayOn");}r{d(j.isShowOthers){I=s;H="WotherDay";E="WotherDayOn";}r{I=z;}}d(j.FV&&b==T&&(a<BA||I)){G.L("<e y=Wweek>"+Dk(J,U)+"</e>");}G.L("<e Dd=D$ ");d(I){d(q.BR(J,"M",b)){d(q.FM(o BU(J.S,J.K-U,J.M).Be())||q.Fk(J)){H="WspecialDay";}G.L(\'9="CG(\'+J.S+","+J.K+","+J.M+\');" \');G.L("B6=\\"q.$=\'"+E+"\'\\" ");G.L("Bs=\\"q.$=\'"+H+"\'\\" ");}r{H="WinvalidDay";}G.L("y="+H);G.L(">"+J.M+"</e>");}r{G.L("></e>");}}G.L("</h>");}G.L("</5>");6 G.O();},FT:_(b){6 q.Dr(b,q.FK);},Ev:_(b){6 q.Dq(b,q.FD);},Fk:_(b){6 q.Dr(b,q.E3,U);},FM:_(b){6 q.Dq(b,q.FY,U);},Dr:_(A,b){k a=b&&b.D9(q.C7(j.Bg,A));6 a;},Dq:_(b,A){k a=A&&A.D9(b);6 a;},Cc:_(Q,BC,Da,EY,Bp){k R=o B5(),DU=Bp?"Da"+Q:Q;Et=l[Q];R.L("<5 B4=T By=W Bw=T");p(k N=T;N<Da;N++){R.L(\'<h CE="CE">\');p(k O=T;O<BC;O++){R.L("<e CE ");l[Q]=CO(EY);d(q.BR(l,Q)){R.L("y=\'BD\' B6=\\"q.$=\'CV\'\\" Bs=\\"q.$=\'BD\'\\" Cx=\\"");R.L("t(c."+Q+"D);c."+DU+"BK.2="+l[Q]+";c."+DU+\'BK.Dt();"\');}r{R.L("y=\'Dn\'");}R.L(">"+(Q=="K"?1.Bt[l[Q]-U]:l[Q])+"</e>");}R.L("</h>");}R.L("</5>");l[Q]=Et;6 R.O();},DT:_(a,A){d(a){k b=a.offsetLeft;d(EZ){b=a.getBoundingClientRect().CB;}A.3.CB=b;}},_fM:_(b){q.DT(b,c.Ct);c.Ct.BQ=q.Cc("K",V,BJ,"N+O*BJ+U",b==c.Bn);},Dc:_(A,b){k a=o B5();b=CX(b,l.S-X);a.L(q.Cc("S",V,X,b+"+N+O*X",A==c.B0));a.L("<5 B4=T By=W Bw=T Dd=D$><h><e ");a.L(q.BY.S<b?"y=\'BD\' B6=\\"q.$=\'CV\'\\" Bs=\\"q.$=\'BD\'\\" Cx=\'d(BI.Bm)BI.Bm();BI.EP=s;g.Dc(T,"+(b-B3)+")\'":"y=\'Dn\'");a.L(">\\u2190</e><e y=\'BD\' B6=\\"q.$=\'CV\'\\" Bs=\\"q.$=\'BD\'\\" Cx=\\"t(c.CN);c.BG.Dt();\\">\\E9</e><e ");a.L(q.Bc.S>b+B3?"y=\'BD\' B6=\\"q.$=\'CV\'\\" Bs=\\"q.$=\'BD\'\\" Cx=\'d(BI.Bm)BI.Bm();BI.EP=s;g.Dc(T,"+(b+B3)+")\'":"y=\'Dn\'");a.L(">\\u2192</e></h></5>");q.DT(A,c.CN);c.CN.BQ=a.O();},DM:_(b,A,a){c[b+"D"].BQ=q.Cc(b,BJ,A,a);},_fH:_(){q.DM("H",BA,"N * BJ + O");},_fm:_(){q.DM("P",V,"N * CP + O * X");},_fs:_(){q.DM("R",U,"O * B3");},D1:_(b){q.Fi();k C=q.CW,B=C.3,A=o B5();A.L(\'<5 y=Fn DC="\'+c.CT.FF+\'DJ" Eh="\'+c.CT.Eb+\'DJ" Bw=T B4=T By=T>\');A.L(\'<h y=Ez><e><m 3="B8:CB">\'+1.quickStr+"</m>");d(!b){A.L(\'<m 3="B8:EO;cursor:pointer" 9="t(c.BV);">\\E9</m>\');}A.L("</e></h>");p(k a=T;a<C.7;a++){d(C[a]){A.L("<h><e CE=\'CE\' y=\'BD\' B6=\\"q.$=\'CV\'\\" Bs=\\"q.$=\'BD\'\\" 9=\\"");A.L("CG("+C[a].S+", "+C[a].K+", "+C[a].M+","+C[a].H+","+C[a].P+","+C[a].R+\');">\');A.L("&Dj;"+q.C7(w,C[a]));A.L("</e></h>");}r{A.L("<h><e y=\'BD\'>&Dj;</e></h>");}}A.L("</5>");c.BV.BQ=A.O();},E6:_(){b(/Cl/);b(/Dz|B$/);b(/B9|D/);b(/Cw|Cf|DR|S/);b(/B7|CQ|Dl|K/);b(/Bj|M/);b(/E4|H/);b(/E1|P/);b(/FU|R/);j.n.DD=(j.n.S||j.n.K||j.n.M)?s:z;j.n.Bb=(j.n.H||j.n.P||j.n.R)?s:z;j.CL=j.CL.8(/%BU/,j.Fw).8(/%Time/,j.Fc);d(j.n.DD){d(j.n.Bb){j.Bg=j.CL;}r{j.Bg=j.Fw;}}r{j.Bg=j.Fc;}_ b(a){k b=(a+"").D0(U,V);j.n[b]=a.DF(j.Bi)?(j.n.DV=b,s):z;}},EW:_(){k b=T;j.n.S?(b=U,Bq(c.BG,c.DN,c.Cz)):t(c.BG,c.DN,c.Cz);j.n.K?(b=U,Bq(c.BO,c.Ck,c.DO)):t(c.BO,c.Ck,c.DO);b?Bq(c.Do):t(c.Do);d(j.n.Bb){Bq(c.EK);DI(c.C2,j.n.H);DI(c.Ds,j.n.P);DI(c.D5,j.n.R);}r{t(c.EK);}C1(c.Cv,j.isShowClear);C1(c.Bx,j.isShowToday);C1(c.ED,(j.n.M&&j.qsEnabled));d(j.Fb){t(c.Ef);}},Bh:_(B,b){k a=j.f,D=FI?"y":"$";d(B){C(a);}r{d(b==w){b=j.errDealMode;}Cb(b){u T:d(confirm(1.errAlertMsg)){a[j.BE]=q.B_;C(a);}r{A(a);}0;u U:a[j.BE]=q.B_;C(a);0;u V:A(a);0;}}_ C(b){k A=b.$;d(A){k a=A.8(/Fl/BX,"");d(A!=a){v(b,D,a);}}}_ A(b){v(b,D,b.$+" Fl");}},Ba:_(b,G,E){E=E||Bl;k H,F=[b+b,b],a,C=E[b],A=_(b){6 CH(C,b.7);};Cb(b.Bz(T)){u"Cl":C=Be(E);0;u"D":k B=Be(E)+U;A=_(b){6 b.7==V?1.aLongWeekStr[B]:1.Fr[B];};0;u"B$":C=Dk(E);0;u"S":F=["Cw","Cf","DR","S"];G=G||F[T];A=_(b){6 CH((b.7<BA)?(b.7<W?E.S%EE:(E.S+Ee-j.Ew)%1000):C,b.7);};0;u"K":F=["B7","CQ","Dl","K"];A=_(b){6(b.7==BA)?1.FH[C-U]:(b.7==W)?1.Bt[C-U]:CH(C,b.7);};0;}G=G||b+b;k D=[];p(H=T;H<F.7;H++){a=F[H];d(G.BL(a)>=T){D[H]=A(a);G=G.8(a,"{"+H+"}");}}p(H=T;H<D.7;H++){G=G.8(o Ch("\\\\{"+H+"\\\\}","BX"),D[H]);}6 G;},C7:_(C,A){A=A||Bl;C=C||q.Bi;k b="ydHmswW";p(k B=T;B<b.7;B++){k a=b.Bz(B);d(j.n[a]){C=q.Ba(a,C,A);}}d(j.n.D){C=C.8(/B9/BX,"%Bj").8(/D/BX,"%M");C=q.Ba("K",C,A);C=C.8(/\\%Bj/BX,q.Ba("D","B9")).8(/\\%M/BX,q.Ba("D","D"));}r{C=q.Ba("K",C,A);}6 C;},getNewP:_(a,b){6 q.Ba(a,b,l);},DY:_(b){6 q.C7(b,l);},D_:_(){c.C3.BQ="";d(j.doubleCalendar){g.CD=s;c.$="EB WdateDiv2";k b=o B5();b.L("<5 DC=EE% B4=T By=T Bw=T><h><e Ep=Ff>");b.L(q.Cr());b.L("</e><e Ep=Ff>");l.v("K",U);b.L(q.Cr());c.Bn=c.BO.FC(s);c.B0=c.BG.FC(s);c.C3.EL(c.Bn);c.C3.EL(c.B0);c.Bn.2=1.Bt[l.K-U];v(c.Bn,"DL",l.K);c.B0.2=l.S;D8("Fh,FZ");c.Bn.$=c.B0.$="Ce";l.v("K",-U);b.L("</e></h></5>");c.CT.BQ=b.O();}r{c.$="EB";c.CT.BQ=q.Cr();}d(!j.n.M){q.D1(s);C6(c.BV);}r{t(c.BV);}q.E5();},E5:_(){k b=parent.CS.DW("iframe");p(k a=T;a<b.7;a++){d(b[a].contentWindow==Fu){b[a].3.DC=c.FF+"DJ";b[a].3.Eh=c.Eb+"DJ";}}},ER:_(){CK(!q.DP(l)&&l.M>T){l.M--;}q.Dh();d(!j.Fb){d(q.BR(l)){g.Bh(s);t(j.Bj);}r{g.Bh(z);}}d(j.ET){Bk("ET");}r{d(q.B_!=j.f[j.BE]&&j.f.Fx){C9(j.f,"Eg");}}},Ex:_(){c.Cv.9=_(){d(!Bk("onclearing")){j.f[j.BE]="";g.Cy("");t(j.Bj);d(j.Fm){Bk("Fm");}r{d(g.B_!=j.f[j.BE]&&j.f.Fx){C9(j.f,"Eg");}}}};c.Cn.9=_(){CG();};d(q.BR(BF)){c.Bx.Bv=z;c.Bx.9=_(){l.CZ(BF);CG();};}r{c.Bx.Bv=s;}},Fi:_(){k H,B,C,A,F=[],E=X,a=j.E_.7,G=j.n.DV;d(a>E){a=E;}r{d(G=="P"||G=="R"){F=[T,Dx,CP,Fg,Fa,-60,-Fg,-CP,-Dx,-U];}r{p(H=T;H<E*V;H++){F[H]=l[G]-E+U+H;}}}p(H=B=T;H<a;H++){C=q.C0(j.E_[H]);d(q.BR(C)){q.CW[B++]=C;}}k D="DA",b=[U,U,U,T,T,T];p(H=T;H<=D.BL(G);H++){b[H]=l[D.Bz(H)];}p(H=T;B<E;H++){d(H<F.7){C=o BP(b[T],b[U],b[V],b[W],b[BA],b[X]);C[G]=F[H];C.CI();d(q.BR(C)){q.CW[B++]=C;}}r{q.CW[B++]=w;}}}};_ B5(){q.R=o Array();q.N=T;q.L=_(b){q.R[q.N++]=b;};q.O=_(){6 q.R.join("");};}_ Dk(A,B){B=B||T;k C=o BU(A.S,A.K-U,A.M+B),a=C.Be();C.Fy(C.C4()-(a+BJ)%Y+W);k b=C.Fq();C.setMonth(T);C.Fy(BA);6 Math.round((b-C.Fq())/(Y*86400000))+U;}_ Be(b){k a=o BU(b.S,b.K-U,b.M);6 a.Be();}_ Bq(){DQ(CU,"");}_ C6(){DQ(CU,"Fo");}_ t(){DQ(CU,"E7");}_ DQ(a,b){p(N=T;N<a.7;N++){a[N].3.De=b;}}_ C1(a,b){b?Bq(a):t(a);}_ DI(a,b){d(b){a.Bv=z;}r{a.Bv=s;a.2="00";}}_ BC(Q,BT,FR){d(Q=="K"){BT=Co(BT,U,CR);}r{d(Q=="H"){BT=Co(BT,T,23);}r{d("ms".BL(Q)>=T){BT=Co(BT,T,Fa);}}}d(Bl[Q]!=BT&&!Bk(Q+"changing")){k Fs=\'i("\'+Q+\'",\'+BT+")",DG=g.Cg();d(DG==T){CO(Fs);}r{d(DG<T){Dm(g.BY);}r{d(DG>T){Dm(g.Bc);}}}d(!FR&&"yMd".BL(Q)>=T){g.D_();}Bk(Q+"changed");}_ Dm(b){i("S",b.S);i("K",b.K);i("M",b.M);d(j.n.Bb){i("H",b.H);i("P",b.P);i("R",b.R);}}}_ CG(A,D,F,b,E,B){k C=o BP(l.S,l.K,l.M,l.H,l.P,l.R);l.BW(A,D,F,b,E,B);d(!Bk("onpicking")){k a=C.S==A&&C.K==D&&C.M==F;d(!a&&CU.7!=T){BC("S",A,s);BC("K",D,s);BC("M",F);}d(g.CD||a||CU.7==T){g.ER();}}r{l=C;}}_ Bk(b){k a;d(j[b]){a=j[b].call(j.f,j);}6 a;}_ i(a,b){b=b||l[a];Bl[a]=l[a]=b;d("yHms".BL(a)>=T){c[a+"BK"].2=b;}d(a=="K"){v(c.BO,"DL",b);c.BO.2=1.Bt[b-U];}}_ v(b,A,a){d(a===CY){6 b.getAttribute(A);}r{d(b.FL){b.FL(A,a);}}}_ Co(A,a,b){d(A<a){A=a;}r{d(A>b){A=b;}}6 A;}_ EJ(b,a){b.Cu("EF",_(){k A=BI,b=(A.Bu==CY)?A.D6:A.Bu;d(b==Z){a();}});}_ CH(b,a){b=b+"";CK(b.7<a){b="T"+b;}6 b;}_ Cs(){t(c.CN,c.Ct,c.EX,c.FA,c.Fe);}_ D7(b){d(g.Cj==CY){g.Cj=c.C2;}Cb(g.Cj){u c.C2:BC("H",l.H+b);0;u c.Ds:BC("P",l.P+b);0;u c.D5:BC("R",l.R+b);0;}}_ BP(b,a,B,C,A,D){q.BW(b,a,B,C,A,D);}BP.Ca={BW:_(a,C,E,b,D,A){k B=o BU();q.S=4(a,q.S,B.D4());q.K=4(C,q.K,B.EH()+U);q.M=j.n.M?4(E,q.M,B.C4()):U;q.H=4(b,q.H,B.Di());q.P=4(D,q.P,B.Df());q.R=4(A,q.R,B.Dw());},CZ:_(b){d(b){q.BW(b.S,b.K,b.M,b.H,b.P,b.R);}},FB:_(a,C,E,b,D,A){k B=o BU();q.S=4(q.S,a,B.D4());q.K=4(q.K,C,B.EH()+U);q.M=j.n.M?4(q.M,E,B.C4()):U;q.H=4(q.H,b,B.Di());q.P=4(q.P,D,B.Df());q.R=4(q.R,A,B.Dw());},Br:_(B,C){k a="DA",D,A;C=a.BL(C);C=C>=T?C:X;p(k b=T;b<=C;b++){A=a.Bz(b);D=q[A]-B[A];d(D>T){6 U;}r{d(D<T){6-U;}}}6 T;},CI:_(){k b=o BU(q.S,q.K-U,q.M,q.H,q.P,q.R);q.S=b.D4();q.K=b.EH()+U;q.M=b.C4();q.H=b.Di();q.P=b.Df();q.R=b.Dw();6!FN(q.S);},v:_(A,a){d("DA".BL(A)>=T){k b=q.M;q.M=U;q[A]+=a;q.CI();q.M=b;}}};_ DE(b){6 parseInt(b,B3);}_ CF(b,a){6 CX(DE(b),a);}_ 4(a,b,A){6 CF(a,CX(b,A));}_ CX(b,a){6 b==w||FN(b)?a:b;}_ C9(b,a){d(EZ){b.C9("Es"+a);}r{k A=CS.createEvent("HTMLEvents");A.initEvent(a,s,s);b.dispatchEvent(A);}}_ EG(A){k b,a,B="S,K,H,P,R,FZ,Fh".Dv(",");p(a=T;a<B.7;a++){b=B[a];d(c[b+"BK"]==A){6 b.D0(b.7-U,b.7);}}6 T;}_ Ek(){k b=EG(q);d(b=="S"){q.$="E2";}r{d(b=="K"){q.$="E2";q.2=v(q,"DL");}r{d(b){g.Cj=q;}r{6;}}}q.select();g["Cc"+b](q);C6(c[b+"D"]);}_ Er(){k Q=EG(q),Bp,DZ=q.2,Eq=l[Q];l[Q]=CF(DZ,l[Q]);d(Q=="S"){Bp=q==c.B0;d(Bp&&l.K==CR){l.S-=U;}q.$="Ce";}r{d(Q=="K"){Bp=q==c.Bn;d(Bp){d(Eq==CR){l.S+=U;}l.v("K",-U);}d(Bl.K==l.K){q.2=1.Bt[DZ-U];}BC("S",l.S,s);q.$="Ce";}}CO(\'BC("\'+Q+\'",\'+l[Q]+")");t(c[Q+"D"]);}_ FG(){k b=BI,a=(b.Bu==CY)?b.D6:b.Bu;d(!$OPERA&&!((a>=48&&a<=57)||(a>=96&&a<=105)||a==Ci||a==46||a==37||a==39||a==Z)){b.C$=z;}}_ D8(A){k b=A.Dv(",");p(k a=T;a<b.7;a++){k B=b[a]+"BK";c[B].onfocus=Ek;c[B].CC=Er;c[B].Cu("EF",FG);}}','J|K|M|a|d|i|j|m|p|s|y|0|1|2|3|5|7|9|_|$|$d|if|td|el|$c|tr|sv|$dp|var|$dt|div|has|new|for|this|else|true|hide|case|attr|null|divs|class|false|break|$lang|value|style|pInt3|table|return|length|replace|onclick|function|className|4|L|c|menu|elProp|$tdt|yI|input|event|6|I|indexOf|id|$ny|MI|DPDate|innerHTML|checkValid|ipts|pv|Date|qsDivSel|loadDate|g|minDate|button|getP|st|maxDate|tabindex|getDay|arr|realFmt|mark|dateFmt|dd|callFunc|$sdt|preventDefault|rMI|9700|isR|show|compareWith|onmouseout|aMonStr|which|disabled|border|todayI|cellpadding|charAt|ryI|tmpEval|date|10|cellspacing|sb|onmouseover|MMMM|float|DD|oldValue|W|Q|left|onblur|autoPickDate|nowrap|pInt2|day_Click|doStr|refresh|menuSel|while|realFullFmt|substring|yD|eval|30|MMM|12|document|dDiv|arguments|menuOn|QS|rtn|undefined|loadFromDate|prototype|switch|_f|_initRe|yminput|yyy|checkRange|RegExp|8|currFocus|leftImg|w|readOnly|okI|makeInRange|splitDate|navImg|_fd|hideSel|MD|attachEvent|clearI|yyyy|onmousedown|setRealValue|navRightImg|doCustomDate|shorH|HI|rMD|getDate|doExp|showB|getDateStr|href|fireEvent|lastIndex|returnValue|yMdHms|index|width|sd|pInt|exec|rv|cal|disHMS|px|ps|realValue|_fHMS|navLeftImg|rightImg|isDate|setDisp|yy|dpButton|_fMyPos|fp|minUnit|getElementsByTagName|P|getNewDateStr|v|r|isTime|_fy|align|display|getMinutes|span|update|getHours|nbsp|getWeek|MM|_setAll|invalidMenu|titleDiv|type|testDay|testDate|mI|blur|checkAndUpdate|split|getSeconds|15|11|WW|slice|_fillQS|maxlength|errMsg|getFullYear|sI|keyCode|updownEvent|_inputBindEvent|test|draw|center|btns|WdateDiv|focus|qsDiv|100|onkeydown|_foundInput|getMonth|match|attachTabEvent|tDiv|appendChild|upButton|My97DP|right|cancelBubble|toLowerCase|pickDate|startDate|onpicked|N|O|initShowAndHide|HD|e|$IE|k|offsetHeight|readonly|_ieEmuEventHandler|2000|bDiv|change|height|_makeDateInRange|defMinDate|_focus|downButton|02468|highLineWeekDay|469|valign|oldv|_blur|on|bak|newdate|testDisDay|yearOffset|initBtn|13579|MTitle|13578|mm|yminputfocus|sdateRe|HH|autoSize|_dealFmt|none|Event|xd7|quickSel|ld|mD|coverDate|cloneNode|ddayRe|srcElement|offsetWidth|_inputKeydown|aLongMonStr|$FF|spans|ddateRe|setAttribute|testSpeDay|isNaN|nodeType|01|02|notDraw|tm|testDisDate|ss|isShowWeek|tE|init|sdayRe|ry|59|eCont|realTimeFmt|re|sD|top|45|rM|initQS|timeSpan|testSpeDate|WdateFmtErr|oncleared|WdayTable|block|title|valueOf|aWeekStr|func|default|window|defMaxDate|realDateFmt|onchange|setDate|target'.split('|'),364,371,{},{}))
\ No newline at end of file
var langList =
[
{name:'en', charset:'UTF-8'},
{name:'zh-cn', charset:'gb2312'},
{name:'zh-tw', charset:'GBK'}
];
var skinList =
[
{name:'default', charset:'gb2312'},
{name:'whyGreen', charset:'gb2312'}
];
\ No newline at end of file
var $lang={
errAlertMsg: "Invalid date or the date out of range,redo or not?",
aWeekStr: ["wk", "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
aLongWeekStr:["wk","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],
aMonStr: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
aLongMonStr: ["January","February","March","April","May","June","July","August","September","October","November","December"],
clearStr: "Clear",
todayStr: "Today",
okStr: "OK",
updateStr: "OK",
timeStr: "Time",
quickStr: "Quick Selection",
err_1: 'MinDate Cannot be bigger than MaxDate!'
}
\ No newline at end of file
var $lang={
errAlertMsg: "不合法的日期格式或者日期超出限定范围,需要撤销吗?",
aWeekStr: ["周","日","一","二","三","四","五","六"],
aLongWeekStr:["周","星期日","星期一","星期二","星期三","星期四","星期五","星期六"],
aMonStr: ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一","十二"],
aLongMonStr: ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],
clearStr: "清空",
todayStr: "今天",
okStr: "确定",
updateStr: "确定",
timeStr: "时间",
quickStr: "快速选择",
err_1: '最小日期不能大于最大日期!'
}
\ No newline at end of file
var $lang={
errAlertMsg: "不合法的日期格式或者日期超出限定範圍,需要撤銷嗎?",
aWeekStr: ["周","日","一","二","三","四","五","六"],
aLongWeekStr:["周","星期日","星期一","星期二","星期三","星期四","星期五","星期六"],
aMonStr: ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一","十二"],
aLongMonStr: ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],
clearStr: "清空",
todayStr: "今天",
okStr: "確定",
updateStr: "確定",
timeStr: "時間",
quickStr: "快速選擇",
err_1: '最小日期不能大於最大日期!'
}
\ No newline at end of file
.Wdate{
border:#999 1px solid;
height:20px;
background:#fff url(datePicker.gif) no-repeat right;
}
.WdateFmtErr{
font-weight:bold;
color:red;
}
\ No newline at end of file
/*
* My97 DatePicker 4.6
* 皮肤名称:default
*/
/* 日期选择容器 DIV */
.WdateDiv{
width:180px;
background-color:#FFFFFF;
border:#bbb 1px solid;
padding:2px;
}
/* 双月日历的宽度 */
.WdateDiv2{
width:360px;
}
.WdateDiv *{font-size:9pt;}
/****************************
* 导航图标 全部是A标签
***************************/
.WdateDiv .NavImg a{
display:block;
cursor:pointer;
height:16px;
width:16px;
}
.WdateDiv .NavImgll a{
float:left;
background:transparent url(img.gif) no-repeat scroll 0 0;
}
.WdateDiv .NavImgl a{
float:left;
background:transparent url(img.gif) no-repeat scroll -16px 0;
}
.WdateDiv .NavImgr a{
float:right;
background:transparent url(img.gif) no-repeat scroll -32px 0;
}
.WdateDiv .NavImgrr a{
float:right;
background:transparent url(img.gif) no-repeat scroll -48px 0;
}
/****************************
* 年份月份相关
***************************/
/* 年份月份栏 DIV */
.WdateDiv #dpTitle{
height:24px;
margin-bottom:2px;
padding:1px;
}
/* 年份月份输入框 INPUT */
.WdateDiv .yminput{
margin-top:2px;
text-align:center;
border:0px;
height:16px;
width:50px;
cursor:pointer;
}
/* 年份月份输入框获得焦点时的样式 INPUT */
.WdateDiv .yminputfocus{
margin-top:2px;
text-align:center;
font-weight:bold;
color:blue;
border:#ccc 1px solid;
height:16px;
width:50px;
}
/* 菜单选择框 DIV */
.WdateDiv .menuSel{
z-index:1;
position:absolute;
background-color:#FFFFFF;
border:#ccc 1px solid;
display:none;
}
/* 菜单的样式 TD */
.WdateDiv .menu{
cursor:pointer;
background-color:#fff;
}
/* 菜单的mouseover样式 TD */
.WdateDiv .menuOn{
cursor:pointer;
background-color:#BEEBEE;
}
/* 菜单无效时的样式 TD */
.WdateDiv .invalidMenu{
color:#aaa;
}
/* 年选择框的偏移 DIV */
.WdateDiv .YMenu{
margin-top:16px;
}
/* 月选择框的偏移 DIV */
.WdateDiv .MMenu{
margin-top:16px;
*width:62px;
}
/* 时选择框的位置 DIV */
.WdateDiv .hhMenu{
margin-top:-90px;
margin-left:26px;
}
/* 分选择框的位置 DIV */
.WdateDiv .mmMenu{
margin-top:-46px;
margin-left:26px;
}
/* 秒选择框的位置 DIV */
.WdateDiv .ssMenu{
margin-top:-24px;
margin-left:26px;
}
/****************************
* 周相关
***************************/
.WdateDiv .Wweek {
text-align:center;
background:#DAF3F5;
border-right:#BDEBEE 1px solid;
}
/****************************
* 星期,日期相关
***************************/
/* 星期栏 TR */
.WdateDiv .MTitle{
background-color:#BDEBEE;
}
/* 日期栏表格 TABLE */
.WdateDiv .WdayTable{
line-height:20px;
border:#c5d9e8 1px solid;
}
/* 日期格的样式 TD */
.WdateDiv .Wday{
cursor:pointer;
}
/* 日期格的mouseover样式 TD */
.WdateDiv .WdayOn{
cursor:pointer;
background-color:#C0EBEF;
}
/* 周末日期格的样式 TD */
.WdateDiv .Wwday{
cursor:pointer;
color:#FF2F2F;
}
/* 周末日期格的mouseover样式 TD */
.WdateDiv .WwdayOn{
cursor:pointer;
color:#000;
background-color:#C0EBEF;
}
.WdateDiv .Wtoday{
cursor:pointer;
color:blue;
}
.WdateDiv .Wselday{
background-color:#A9E4E9;
}
.WdateDiv .WspecialDay{
background-color:#66F4DF;
}
/* 其他月份的日期 */
.WdateDiv .WotherDay{
cursor:pointer;
color:#6A6AFF;
}
/* 其他月份的日期mouseover样式 */
.WdateDiv .WotherDayOn{
cursor:pointer;
background-color:#C0EBEF;
}
/* 无效日期的样式,即在日期范围以外日期格的样式,不能选择的日期 */
.WdateDiv .WinvalidDay{
color:#aaa;
}
/****************************
* 时间相关
***************************/
/* 时间栏 DIV */
.WdateDiv #dpTime{
float:left;
margin-top:3px;
margin-right:30px;
}
/* 时间文字 SPAN */
.WdateDiv #dpTime #dpTimeStr{
margin-left:1px;
}
/* 时间输入框 INPUT */
.WdateDiv #dpTime input{
height:16px;
width:18px;
text-align:center;
border:#ccc 1px solid;
}
/* 时间 时 INPUT */
.WdateDiv #dpTime .tB{
border-right:0px;
}
/* 时间 分和间隔符 ':' INPUT */
.WdateDiv #dpTime .tE{
border-left:0;
border-right:0;
}
/* 时间 秒 INPUT */
.WdateDiv #dpTime .tm{
width:7px;
border-left:0;
border-right:0;
}
/* 时间右边的向上按钮 BUTTON */
.WdateDiv #dpTime #dpTimeUp{
height:10px;
width:13px;
border:0px;
background:url(img.gif) no-repeat -32px -16px;
}
/* 时间右边的向下按钮 BUTTON */
.WdateDiv #dpTime #dpTimeDown{
height:10px;
width:13px;
border:0px;
background:url(img.gif) no-repeat -48px -16px;
}
/****************************
* 其他
***************************/
.WdateDiv #dpQS {
float:left;
margin-right:3px;
margin-top:3px;
background:url(img.gif) no-repeat 0px -16px;
width:20px;
height:20px;
cursor:pointer;
}
.WdateDiv #dpControl {
text-align:right;
margin-top:3px;
}
.WdateDiv .dpButton{
height:20px;
width:45px;
border:#ccc 1px solid;
padding:2px;
margin-right:1px;
}
\ No newline at end of file
/*
* My97 DatePicker 4.6
* 皮肤名称:whyGreen
*/
/* 日期选择容器 DIV */
.WdateDiv{
width:180px;
background-color:#fff;
border:#C5E1E4 1px solid;
padding:2px;
}
/* 双月日历的宽度 */
.WdateDiv2{
width:360px;
}
.WdateDiv *{font-size:9pt;}
/****************************
* 导航图标 全部是A标签
***************************/
.WdateDiv .NavImg a{
cursor:pointer;
display:block;
width:16px;
height:16px;
margin-top:1px;
}
.WdateDiv .NavImgll a{
float:left;
background:url(img.gif) no-repeat;
}
.WdateDiv .NavImgl a{
float:left;
background:url(img.gif) no-repeat -16px 0px;
}
.WdateDiv .NavImgr a{
float:right;
background:url(img.gif) no-repeat -32px 0px;
}
.WdateDiv .NavImgrr a{
float:right;
background:url(img.gif) no-repeat -48px 0px;
}
/****************************
* 年份月份相关
***************************/
/* 年份月份栏 DIV */
.WdateDiv #dpTitle{
height:24px;
padding:1px;
border:#c5d9e8 1px solid;
background:url(bg.jpg);
margin-bottom:2px;
}
/* 年份月份输入框 INPUT */
.WdateDiv .yminput{
margin-top:2px;
text-align:center;
border:0px;
height:16px;
width:50px;
color:#034c50;
background-color:transparent;
cursor:pointer;
}
/* 年份月份输入框获得焦点时的样式 INPUT */
.WdateDiv .yminputfocus{
margin-top:2px;
text-align:center;
border:#939393 1px solid;
font-weight:bold;
color:#034c50;
height:16px;
width:50px;
}
/* 菜单选择框 DIV */
.WdateDiv .menuSel{
z-index:1;
position:absolute;
background-color:#FFFFFF;
border:#A3C6C8 1px solid;
display:none;
}
/* 菜单的样式 TD */
.WdateDiv .menu{
cursor:pointer;
background-color:#fff;
color:#11777C;
}
/* 菜单的mouseover样式 TD */
.WdateDiv .menuOn{
cursor:pointer;
background-color:#BEEBEE;
}
/* 菜单无效时的样式 TD */
.WdateDiv .invalidMenu{
color:#aaa;
}
/* 年选择框的偏移 DIV */
.WdateDiv .YMenu{
margin-top:16px;
}
/* 月选择框的偏移 DIV */
.WdateDiv .MMenu{
margin-top:16px;
*width:62px;
}
/* 时选择框的位置 DIV */
.WdateDiv .hhMenu{
margin-top:-90px;
margin-left:26px;
}
/* 分选择框的位置 DIV */
.WdateDiv .mmMenu{
margin-top:-46px;
margin-left:26px;
}
/* 秒选择框的位置 DIV */
.WdateDiv .ssMenu{
margin-top:-24px;
margin-left:26px;
}
/****************************
* 周相关
***************************/
.WdateDiv .Wweek {
text-align:center;
background:#DAF3F5;
border-right:#BDEBEE 1px solid;
}
/****************************
* 星期,日期相关
***************************/
/* 星期栏 TR */
.WdateDiv .MTitle{
color:#13777e;
background-color:#bdebee;
}
/* 日期栏表格 TABLE */
.WdateDiv .WdayTable{
line-height:20px;
color:#13777e;
background-color:#edfbfb;
border:#BEE9F0 1px solid;
}
/* 日期格的样式 TD */
.WdateDiv .Wday{
cursor:pointer;
}
/* 日期格的mouseover样式 TD */
.WdateDiv .WdayOn{
cursor:pointer;
background-color:#74d2d9 ;
}
/* 周末日期格的样式 TD */
.WdateDiv .Wwday{
cursor:pointer;
color:#ab1e1e;
}
/* 周末日期格的mouseover样式 TD */
.WdateDiv .WwdayOn{
cursor:pointer;
background-color:#74d2d9;
}
.WdateDiv .Wtoday{
cursor:pointer;
color:blue;
}
.WdateDiv .Wselday{
background-color:#A7E2E7;
}
.WdateDiv .WspecialDay{
background-color:#66F4DF;
}
/* 其他月份的日期 */
.WdateDiv .WotherDay{
cursor:pointer;
color:#0099CC;
}
/* 其他月份的日期mouseover样式 */
.WdateDiv .WotherDayOn{
cursor:pointer;
background-color:#C0EBEF;
}
/* 无效日期的样式,即在日期范围以外日期格的样式,不能选择的日期 */
.WdateDiv .WinvalidDay{
color:#aaa;
}
/****************************
* 时间相关
***************************/
/* 时间栏 DIV */
.WdateDiv #dpTime{
}
/* 时间文字 SPAN */
.WdateDiv #dpTime #dpTimeStr{
margin-left:1px;
color:#497F7F;
}
/* 时间输入框 INPUT */
.WdateDiv #dpTime input{
height:16px;
width:18px;
text-align:center;
color:#333;
border:#61CAD0 1px solid;
}
/* 时间 时 INPUT */
.WdateDiv #dpTime .tB{
border-right:0px;
}
/* 时间 分和间隔符 ':' INPUT */
.WdateDiv #dpTime .tE{
border-left:0;
border-right:0;
}
/* 时间 秒 INPUT */
.WdateDiv #dpTime .tm{
width:7px;
border-left:0;
border-right:0;
}
/* 时间右边的向上按钮 BUTTON */
.WdateDiv #dpTime #dpTimeUp{
height:10px;
width:13px;
border:0px;
background:url(img.gif) no-repeat -32px -16px;
}
/* 时间右边的向下按钮 BUTTON */
.WdateDiv #dpTime #dpTimeDown{
height:10px;
width:13px;
border:0px;
background:url(img.gif) no-repeat -48px -16px;
}
/****************************
* 其他
***************************/
.WdateDiv #dpQS {
float:left;
margin-right:3px;
margin-top:3px;
background:url(img.gif) no-repeat 0px -16px;
width:20px;
height:20px;
cursor:pointer;
}
.WdateDiv #dpControl {
text-align:right;
margin-top:3px;
}
.WdateDiv .dpButton{
height:20px;
width:45px;
padding:2px;
border:#38B1B9 1px solid;
background-color:#CFEBEE;
color:#08575B;
}
\ No newline at end of file
/*!
* artDialog 4.1.7
* Date: 2013-03-03 08:04
* http://code.google.com/p/artdialog/
* (c) 2009-2012 TangBin, http://www.planeArt.cn
*
* This is licensed under the GNU LGPL, version 2.1 or later.
* For details, see: http://creativecommons.org/licenses/LGPL/2.1/
*/
(function(e,t){function h(e,t,n){t=t||document,n=n||"*";var r=0,i=0,s=[],o=t.getElementsByTagName(n),u=o.length,a=new RegExp("(^|\\s)"+e+"(\\s|$)");for(;r<u;r++)a.test(o[r].className)&&(s[i]=o[r],i++);return s}function p(r){var i=n.expando,s=r===e?0:r[i];return s===t&&(r[i]=s=++n.uuid),s}function d(){if(n.isReady)return;try{document.documentElement.doScroll("left")}catch(e){setTimeout(d,1);return}n.ready()}function v(e){return n.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:!1}var n=e.art=function(e,t){return new n.fn.init(e,t)},r=!1,i=[],s,o="opacity"in document.documentElement.style,u=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,a=/[\n\t]/g,f=/alpha\([^)]*\)/i,l=/opacity=([^)]*)/,c=/^([+-]=)?([\d+-.]+)(.*)$/;return e.$===t&&(e.$=n),n.fn=n.prototype={constructor:n,ready:function(e){return n.bindReady(),n.isReady?e.call(document,n):i&&i.push(e),this},hasClass:function(e){var t=" "+e+" ";return(" "+this[0].className+" ").replace(a," ").indexOf(t)>-1?!0:!1},addClass:function(e){return this.hasClass(e)||(this[0].className+=" "+e),this},removeClass:function(e){var t=this[0];return e?this.hasClass(e)&&(t.className=t.className.replace(e," ")):t.className="",this},css:function(e,r){var i,s=this[0],o=arguments[0];if(typeof e=="string"){if(r===t)return n.css(s,e);e==="opacity"?n.opacity.set(s,r):s.style[e]=r}else for(i in o)i==="opacity"?n.opacity.set(s,o[i]):s.style[i]=o[i];return this},show:function(){return this.css("display","block")},hide:function(){return this.css("display","none")},offset:function(){var e=this[0],t=e.getBoundingClientRect(),n=e.ownerDocument,r=n.body,i=n.documentElement,s=i.clientTop||r.clientTop||0,o=i.clientLeft||r.clientLeft||0,u=t.top+(self.pageYOffset||i.scrollTop)-s,a=t.left+(self.pageXOffset||i.scrollLeft)-o;return{left:a,top:u}},html:function(e){var r=this[0];return e===t?r.innerHTML:(n.cleanData(r.getElementsByTagName("*")),r.innerHTML=e,this)},remove:function(){var e=this[0];return n.cleanData(e.getElementsByTagName("*")),n.cleanData([e]),e.parentNode.removeChild(e),this},bind:function(e,t){return n.event.add(this[0],e,t),this},unbind:function(e,t){return n.event.remove(this[0],e,t),this}},n.fn.init=function(e,t){var r,i;t=t||document;if(!e)return this;if(e.nodeType)return this[0]=e,this;if(e==="body"&&t.body)return this[0]=t.body,this;if(e==="head"||e==="html")return this[0]=t.getElementsByTagName(e)[0],this;if(typeof e=="string"){r=u.exec(e);if(r&&r[2])return i=t.getElementById(r[2]),i&&i.parentNode&&(this[0]=i),this}return typeof e=="function"?n(document).ready(e):(this[0]=e,this)},n.fn.init.prototype=n.fn,n.noop=function(){},n.isWindow=function(e){return e&&typeof e=="object"&&"setInterval"in e},n.isArray=function(e){return Object.prototype.toString.call(e)==="[object Array]"},n.fn.find=function(e){var t,r=this[0],i=e.split(".")[1];return i?document.getElementsByClassName?t=r.getElementsByClassName(i):t=h(i,r):t=r.getElementsByTagName(e),n(t[0])},n.each=function(e,n){var r,i=0,s=e.length,o=s===t;if(o){for(r in e)if(n.call(e[r],r,e[r])===!1)break}else for(var u=e[0];i<s&&n.call(u,i,u)!==!1;u=e[++i]);return e},n.data=function(e,r,i){var s=n.cache,o=p(e);return r===t?s[o]:(s[o]||(s[o]={}),i!==t&&(s[o][r]=i),s[o][r])},n.removeData=function(e,t){var r=!0,i=n.expando,s=n.cache,o=p(e),u=o&&s[o];if(!u)return;if(t){delete u[t];for(var a in u)r=!1;r&&delete n.cache[o]}else delete s[o],e.removeAttribute?e.removeAttribute(i):e[i]=null},n.uuid=0,n.cache={},n.expando="@cache"+ +(new Date),n.event={add:function(e,t,r){var i,s,o=n.event,u=n.data(e,"@events")||n.data(e,"@events",{});i=u[t]=u[t]||{},s=i.listeners=i.listeners||[],s.push(r),i.handler||(i.elem=e,i.handler=o.handler(i),e.addEventListener?e.addEventListener(t,i.handler,!1):e.attachEvent("on"+t,i.handler))},remove:function(e,t,r){var i,s,o,u=n.event,a=!0,f=n.data(e,"@events");if(!f)return;if(!t){for(i in f)u.remove(e,i);return}s=f[t];if(!s)return;o=s.listeners;if(r)for(i=0;i<o.length;i++)o[i]===r&&o.splice(i--,1);else s.listeners=[];if(s.listeners.length===0){e.removeEventListener?e.removeEventListener(t,s.handler,!1):e.detachEvent("on"+t,s.handler),delete f[t],s=n.data(e,"@events");for(var l in s)a=!1;a&&n.removeData(e,"@events")}},handler:function(t){return function(r){r=n.event.fix(r||e.event);for(var i=0,s=t.listeners,o;o=s[i++];)o.call(t.elem,r)===!1&&(r.preventDefault(),r.stopPropagation())}},fix:function(e){if(e.target)return e;var t={target:e.srcElement||document,preventDefault:function(){e.returnValue=!1},stopPropagation:function(){e.cancelBubble=!0}};for(var n in e)t[n]=e[n];return t}},n.cleanData=function(e){var t=0,r,i=e.length,s=n.event.remove,o=n.removeData;for(;t<i;t++)r=e[t],s(r),o(r)},n.isReady=!1,n.ready=function(){if(!n.isReady){if(!document.body)return setTimeout(n.ready,13);n.isReady=!0;if(i){var e,t=0;while(e=i[t++])e.call(document,n);i=null}}},n.bindReady=function(){if(r)return;r=!0;if(document.readyState==="complete")return n.ready();if(document.addEventListener)document.addEventListener("DOMContentLoaded",s,!1),e.addEventListener("load",n.ready,!1);else if(document.attachEvent){document.attachEvent("onreadystatechange",s),e.attachEvent("onload",n.ready);var t=!1;try{t=e.frameElement==null}catch(i){}document.documentElement.doScroll&&t&&d()}},document.addEventListener?s=function(){document.removeEventListener("DOMContentLoaded",s,!1),n.ready()}:document.attachEvent&&(s=function(){document.readyState==="complete"&&(document.detachEvent("onreadystatechange",s),n.ready())}),n.css="defaultView"in document&&"getComputedStyle"in document.defaultView?function(e,t){return document.defaultView.getComputedStyle(e,!1)[t]}:function(e,t){var r=t==="opacity"?n.opacity.get(e):e.currentStyle[t];return r||""},n.opacity={get:function(e){return o?document.defaultView.getComputedStyle(e,!1).opacity:l.test((e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?parseFloat(RegExp.$1)/100+"":1},set:function(e,t){if(o)return e.style.opacity=t;var n=e.style;n.zoom=1;var r="alpha(opacity="+t*100+")",i=n.filter||"";n.filter=f.test(i)?i.replace(f,r):n.filter+" "+r}},n.each(["Left","Top"],function(e,t){var r="scroll"+t;n.fn[r]=function(){var t=this[0],n;return n=v(t),n?"pageXOffset"in n?n[e?"pageYOffset":"pageXOffset"]:n.document.documentElement[r]||n.document.body[r]:t[r]}}),n.each(["Height","Width"],function(e,t){var r=t.toLowerCase();n.fn[r]=function(e){var r=this[0];return r?n.isWindow(r)?r.document.documentElement["client"+t]||r.document.body["client"+t]:r.nodeType===9?Math.max(r.documentElement["client"+t],r.body["scroll"+t],r.documentElement["scroll"+t],r.body["offset"+t],r.documentElement["offset"+t]):null:e==null?null:this}}),n.ajax=function(t){var r=e.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"),i=t.url;if(t.cache===!1){var s=+(new Date),o=i.replace(/([?&])_=[^&]*/,"$1_="+s);i=o+(o===i?(/\?/.test(i)?"&":"?")+"_="+s:"")}r.onreadystatechange=function(){r.readyState===4&&r.status===200&&(t.success&&t.success(r.responseText),r.onreadystatechange=n.noop)},r.open("GET",i,1),r.send(null)},n.fn.animate=function(e,t,r,i){t=t||400,typeof r=="function"&&(i=r),r=r&&n.easing[r]?r:"swing";var s=this[0],o,u,a,f,l,h,p={speed:t,easing:r,callback:function(){o!=null&&(s.style.overflow=""),i&&i()}};return p.curAnim={},n.each(e,function(e,t){p.curAnim[e]=t}),n.each(e,function(e,t){u=new n.fx(s,p,e),a=c.exec(t),f=parseFloat(e==="opacity"||s.style&&s.style[e]!=null?n.css(s,e):s[e]),l=parseFloat(a[2]),h=a[3];if(e==="height"||e==="width")l=Math.max(0,l),o=[s.style.overflow,s.style.overflowX,s.style.overflowY];u.custom(f,l,h)}),o!=null&&(s.style.overflow="hidden"),this},n.timers=[],n.fx=function(e,t,n){this.elem=e,this.options=t,this.prop=n},n.fx.prototype={custom:function(e,t,r){function s(){return i.step()}var i=this;i.startTime=n.fx.now(),i.start=e,i.end=t,i.unit=r,i.now=i.start,i.state=i.pos=0,s.elem=i.elem,s(),n.timers.push(s),n.timerId||(n.timerId=setInterval(n.fx.tick,13))},step:function(){var e=this,t=n.fx.now(),r=!0;if(t>=e.options.speed+e.startTime){e.now=e.end,e.state=e.pos=1,e.update(),e.options.curAnim[e.prop]=!0;for(var i in e.options.curAnim)e.options.curAnim[i]!==!0&&(r=!1);return r&&e.options.callback.call(e.elem),!1}var s=t-e.startTime;return e.state=s/e.options.speed,e.pos=n.easing[e.options.easing](e.state,s,0,1,e.options.speed),e.now=e.start+(e.end-e.start)*e.pos,e.update(),!0},update:function(){var e=this;e.prop==="opacity"?n.opacity.set(e.elem,e.now):e.elem.style&&e.elem.style[e.prop]!=null?e.elem.style[e.prop]=e.now+e.unit:e.elem[e.prop]=e.now}},n.fx.now=function(){return+(new Date)},n.easing={linear:function(e,t,n,r){return n+r*e},swing:function(e,t,n,r){return(-Math.cos(e*Math.PI)/2+.5)*r+n}},n.fx.tick=function(){var e=n.timers;for(var t=0;t<e.length;t++)!e[t]()&&e.splice(t--,1);!e.length&&n.fx.stop()},n.fx.stop=function(){clearInterval(n.timerId),n.timerId=null},n.fn.stop=function(){var e=n.timers;for(var t=e.length-1;t>=0;t--)e[t].elem===this[0]&&e.splice(t,1);return this},n})(window),function(e,t,n){e.noop=e.noop||function(){};var r,i,s,o,u=0,a=e(t),f=e(document),l=e("html"),c=document.documentElement,h=t.VBArray&&!t.XMLHttpRequest,p="createTouch"in document&&!("onmousemove"in c)||/(iPhone|iPad|iPod)/i.test(navigator.userAgent),d="artDialog"+ +(new Date),v=function(t,i,s){t=t||{};if(typeof t=="string"||t.nodeType===1)t={content:t,fixed:!p};var o,a=v.defaults,f=t.follow=this.nodeType===1&&this||t.follow;for(var l in a)t[l]===n&&(t[l]=a[l]);return e.each({ok:"yesFn",cancel:"noFn",close:"closeFn",init:"initFn",okVal:"yesText",cancelVal:"noText"},function(e,r){t[e]=t[e]!==n?t[e]:t[r]}),typeof f=="string"&&(f=e(f)[0]),t.id=f&&f[d+"follow"]||t.id||d+u,o=v.list[t.id],f&&o?o.follow(f).zIndex().focus():o?o.zIndex().focus():(p&&(t.fixed=!1),e.isArray(t.button)||(t.button=t.button?[t.button]:[]),i!==n&&(t.ok=i),s!==n&&(t.cancel=s),t.ok&&t.button.push({name:t.okVal,callback:t.ok,focus:!0}),t.cancel&&t.button.push({name:t.cancelVal,callback:t.cancel}),v.defaults.zIndex=t.zIndex,u++,v.list[t.id]=r?r._init(t):new v.fn._init(t))};v.fn=v.prototype={version:"4.1.7",closed:!0,_init:function(e){var n=this,i,s=e.icon,o=s&&(h?{png:"icons/"+s+".png"}:{backgroundImage:"url('"+e.path+"/skins/icons/"+s+".png')"});return n.closed=!1,n.config=e,n.DOM=i=n.DOM||n._getDOM(),i.wrap.addClass(e.skin),i.close[e.cancel===!1?"hide":"show"](),i.icon[0].style.display=s?"":"none",i.iconBg.css(o||{background:"none"}),i.se.css("cursor",e.resize?"se-resize":"auto"),i.title.css("cursor",e.drag?"move":"auto"),i.content.css("padding",e.padding),n[e.show?"show":"hide"](!0),n.button(e.button).title(e.title).content(e.content,!0).size(e.width,e.height).time(e.time),e.follow?n.follow(e.follow):n.position(e.left,e.top),n.zIndex().focus(),e.lock&&n.lock(),n._addEvent(),n._ie6PngFix(),r=null,e.init&&e.init.call(n,t),n},content:function(e){var t,r,i,s,o=this,u=o.DOM,a=u.wrap[0],f=a.offsetWidth,l=a.offsetHeight,c=parseInt(a.style.left),h=parseInt(a.style.top),p=a.style.width,d=u.content,v=d[0];return o._elemBack&&o._elemBack(),a.style.width="auto",e===n?v:(typeof e=="string"?d.html(e):e&&e.nodeType===1&&(s=e.style.display,t=e.previousSibling,r=e.nextSibling,i=e.parentNode,o._elemBack=function(){t&&t.parentNode?t.parentNode.insertBefore(e,t.nextSibling):r&&r.parentNode?r.parentNode.insertBefore(e,r):i&&i.appendChild(e),e.style.display=s,o._elemBack=null},d.html(""),v.appendChild(e),e.style.display="block"),arguments[1]||(o.config.follow?o.follow(o.config.follow):(f=a.offsetWidth-f,l=a.offsetHeight-l,c-=f/2,h-=l/2,a.style.left=Math.max(c,0)+"px",a.style.top=Math.max(h,0)+"px"),p&&p!=="auto"&&(a.style.width=a.offsetWidth+"px"),o._autoPositionType()),o._ie6SelectFix(),o._runScript(v),o)},title:function(e){var t=this.DOM,r=t.wrap,i=t.title,s="aui_state_noTitle";return e===n?i[0]:(e===!1?(i.hide().html(""),r.addClass(s)):(i.show().html(e||""),r.removeClass(s)),this)},position:function(e,t){var r=this,i=r.config,s=r.DOM.wrap[0],o=h?!1:i.fixed,u=h&&r.config.fixed,l=f.scrollLeft(),c=f.scrollTop(),p=o?0:l,d=o?0:c,v=a.width(),m=a.height(),g=s.offsetWidth,y=s.offsetHeight,b=s.style;if(e||e===0)r._left=e.toString().indexOf("%")!==-1?e:null,e=r._toNumber(e,v-g),typeof e=="number"?(e=u?e+=l:e+p,b.left=Math.max(e,p)+"px"):typeof e=="string"&&(b.left=e);if(t||t===0)r._top=t.toString().indexOf("%")!==-1?t:null,t=r._toNumber(t,m-y),typeof t=="number"?(t=u?t+=c:t+d,b.top=Math.max(t,d)+"px"):typeof t=="string"&&(b.top=t);return e!==n&&t!==n&&(r._follow=null,r._autoPositionType()),r},size:function(e,t){var n,r,i,s,o=this,u=o.config,f=o.DOM,l=f.wrap,c=f.main,h=l[0].style,p=c[0].style;return e&&(o._width=e.toString().indexOf("%")!==-1?e:null,n=a.width()-l[0].offsetWidth+c[0].offsetWidth,i=o._toNumber(e,n),e=i,typeof e=="number"?(h.width="auto",p.width=Math.max(o.config.minWidth,e)+"px",h.width=l[0].offsetWidth+"px"):typeof e=="string"&&(p.width=e,e==="auto"&&l.css("width","auto"))),t&&(o._height=t.toString().indexOf("%")!==-1?t:null,r=a.height()-l[0].offsetHeight+c[0].offsetHeight,s=o._toNumber(t,r),t=s,typeof t=="number"?p.height=Math.max(o.config.minHeight,t)+"px":typeof t=="string"&&(p.height=t)),o._ie6SelectFix(),o},follow:function(t){var n,r=this,i=r.config;if(typeof t=="string"||t&&t.nodeType===1)n=e(t),t=n[0];if(!t||!t.offsetWidth&&!t.offsetHeight)return r.position(r._left,r._top);var s=d+"follow",o=a.width(),u=a.height(),l=f.scrollLeft(),c=f.scrollTop(),p=n.offset(),v=t.offsetWidth,m=t.offsetHeight,g=h?!1:i.fixed,y=g?p.left-l:p.left,b=g?p.top-c:p.top,w=r.DOM.wrap[0],E=w.style,S=w.offsetWidth,x=w.offsetHeight,T=y-(S-v)/2,N=b+m,C=g?0:l,k=g?0:c;return T=T<C?y:T+S>o&&y-S>C?y-S+v:T,N=N+x>u+k&&b-x>k?b-x:N,E.left=T+"px",E.top=N+"px",r._follow&&r._follow.removeAttribute(s),r._follow=t,t[s]=i.id,r._autoPositionType(),r},button:function(){var t=this,r=arguments,i=t.DOM,s=i.buttons,o=s[0],u="aui_state_highlight",a=t._listeners=t._listeners||{},f=e.isArray(r[0])?r[0]:[].slice.call(r);return r[0]===n?o:(e.each(f,function(n,r){var i=r.name,s=!a[i],f=s?document.createElement("button"):a[i].elem;a[i]||(a[i]={}),r.callback&&(a[i].callback=r.callback),r.className&&(f.className=r.className),r.focus&&(t._focus&&t._focus.removeClass(u),t._focus=e(f).addClass(u),t.focus()),f.setAttribute("type","button"),f[d+"callback"]=i,f.disabled=!!r.disabled,s&&(f.innerHTML=i,a[i].elem=f,o.appendChild(f))}),s[0].style.display=f.length?"":"none",t._ie6SelectFix(),t)},show:function(){return this.DOM.wrap.show(),!arguments[0]&&this._lockMaskWrap&&this._lockMaskWrap.show(),this},hide:function(){return this.DOM.wrap.hide(),!arguments[0]&&this._lockMaskWrap&&this._lockMaskWrap.hide(),this},close:function(){if(this.closed)return this;var e=this,n=e.DOM,i=n.wrap,s=v.list,o=e.config.close,u=e.config.follow;e.time();if(typeof o=="function"&&o.call(e,t)===!1)return e;e.unlock(),e._elemBack&&e._elemBack(),i[0].className=i[0].style.cssText="",n.title.html(""),n.content.html(""),n.buttons.html(""),v.focus===e&&(v.focus=null),u&&u.removeAttribute(d+"follow"),delete s[e.config.id],e._removeEvent(),e.hide(!0)._setAbsolute();for(var a in e)e.hasOwnProperty(a)&&a!=="DOM"&&delete e[a];return r?i.remove():r=e,e},time:function(e){var t=this,n=t.config.cancelVal,r=t._timer;return r&&clearTimeout(r),e&&(t._timer=setTimeout(function(){t._click(n)},1e3*e)),t},focus:function(){try{if(this.config.focus){var e=this._focus&&this._focus[0]||this.DOM.close[0];e&&e.focus()}}catch(t){}return this},zIndex:function(){var e=this,t=e.DOM,n=t.wrap,r=v.focus,i=v.defaults.zIndex++;return n.css("zIndex",i),e._lockMask&&e._lockMask.css("zIndex",i-1),r&&r.DOM.wrap.removeClass("aui_state_focus"),v.focus=e,n.addClass("aui_state_focus"),e},lock:function(){if(this._lock)return this;var t=this,n=v.defaults.zIndex-1,r=t.DOM.wrap,i=t.config,s=f.width(),o=f.height(),u=t._lockMaskWrap||e(document.body.appendChild(document.createElement("div"))),a=t._lockMask||e(u[0].appendChild(document.createElement("div"))),l="(document).documentElement",c=p?"width:"+s+"px;height:"+o+"px":"width:100%;height:100%",d=h?"position:absolute;left:expression("+l+".scrollLeft);top:expression("+l+".scrollTop);width:expression("+l+".clientWidth);height:expression("+l+".clientHeight)":"";return t.zIndex(),r.addClass("aui_state_lock"),u[0].style.cssText=c+";position:fixed;z-index:"+n+";top:0;left:0;overflow:hidden;"+d,a[0].style.cssText="height:100%;background:"+i.background+";filter:alpha(opacity=0);opacity:0",h&&a.html('<iframe src="about:blank" style="width:100%;height:100%;position:absolute;top:0;left:0;z-index:-1;filter:alpha(opacity=0)"></iframe>'),a.stop(),a.bind("click",function(){t._reset()}).bind("dblclick",function(){t._click(t.config.cancelVal)}),i.duration===0?a.css({opacity:i.opacity}):a.animate({opacity:i.opacity},i.duration),t._lockMaskWrap=u,t._lockMask=a,t._lock=!0,t},unlock:function(){var e=this,t=e._lockMaskWrap,n=e._lockMask;if(!e._lock)return e;var i=t[0].style,s=function(){h&&(i.removeExpression("width"),i.removeExpression("height"),i.removeExpression("left"),i.removeExpression("top")),i.cssText="display:none",r&&t.remove()};return n.stop().unbind(),e.DOM.wrap.removeClass("aui_state_lock"),e.config.duration?n.animate({opacity:0},e.config.duration,s):s(),e._lock=!1,e},_getDOM:function(){var t=document.createElement("div"),n=document.body;t.style.cssText="position:absolute;left:0;top:0",t.innerHTML=v._templates,n.insertBefore(t,n.firstChild);var r,i=0,s={wrap:e(t)},o=t.getElementsByTagName("*"),u=o.length;for(;i<u;i++)r=o[i].className.split("aui_")[1],r&&(s[r]=e(o[i]));return s},_toNumber:function(e,t){if(!e&&e!==0||typeof e=="number")return e;var n=e.length-1;return e.lastIndexOf("px")===n?e=parseInt(e):e.lastIndexOf("%")===n&&(e=parseInt(t*e.split("%")[0]/100)),e},_ie6PngFix:h?function(){var e=0,t,n,r,i,s=v.defaults.path+"/skins/",o=this.DOM.wrap[0].getElementsByTagName("*");for(;e<o.length;e++)t=o[e],n=t.currentStyle.png,n&&(r=s+n,i=t.runtimeStyle,i.backgroundImage="none",i.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+r+"',sizingMethod='crop')")}:e.noop,_ie6SelectFix:h?function(){var e=this.DOM.wrap,t=e[0],n=d+"iframeMask",r=e[n],i=t.offsetWidth,s=t.offsetHeight;i+="px",s+="px",r?(r.style.width=i,r.style.height=s):(r=t.appendChild(document.createElement("iframe")),e[n]=r,r.src="about:blank",r.style.cssText="position:absolute;z-index:-1;left:0;top:0;filter:alpha(opacity=0);width:"+i+";height:"+s)}:e.noop,_runScript:function(e){var t,n=0,r=0,i=e.getElementsByTagName("script"),s=i.length,o=[];for(;n<s;n++)i[n].type==="text/dialog"&&(o[r]=i[n].innerHTML,r++);o.length&&(o=o.join(""),t=new Function(o),t.call(this))},_autoPositionType:function(){this[this.config.fixed?"_setFixed":"_setAbsolute"]()},_setFixed:function(){return h&&e(function(){var t="backgroundAttachment";l.css(t)!=="fixed"&&e("body").css(t)!=="fixed"&&l.css({zoom:1,backgroundImage:"url(about:blank)",backgroundAttachment:"fixed"})}),function(){var e=this.DOM.wrap,t=e[0].style;if(h){var n=parseInt(e.css("left")),r=parseInt(e.css("top")),i=f.scrollLeft(),s=f.scrollTop(),o="(document.documentElement)";this._setAbsolute(),t.setExpression("left","eval("+o+".scrollLeft + "+(n-i)+') + "px"'),t.setExpression("top","eval("+o+".scrollTop + "+(r-s)+') + "px"')}else t.position="fixed"}}(),_setAbsolute:function(){var e=this.DOM.wrap[0].style;h&&(e.removeExpression("left"),e.removeExpression("top")),e.position="absolute"},_click:function(e){var n=this,r=n._listeners[e]&&n._listeners[e].callback;return typeof r!="function"||r.call(n,t)!==!1?n.close():n},_reset:function(e){var t,n=this,r=n._winSize||a.width()*a.height(),i=n._follow,s=n._width,o=n._height,u=n._left,f=n._top;if(e){t=n._winSize=a.width()*a.height();if(r===t)return}(s||o)&&n.size(s,o),i?n.follow(i):(u||f)&&n.position(u,f)},_addEvent:function(){var e,n=this,r=n.config,i="CollectGarbage"in t,s=n.DOM;n._winResize=function(){e&&clearTimeout(e),e=setTimeout(function(){n._reset(i)},40)},a.bind("resize",n._winResize),s.wrap.bind("click",function(e){var t=e.target,i;if(t.disabled)return!1;if(t===s.close[0])return n._click(r.cancelVal),!1;i=t[d+"callback"],i&&n._click(i),n._ie6SelectFix()}).bind("mousedown",function(){n.zIndex()})},_removeEvent:function(){var e=this,t=e.DOM;t.wrap.unbind(),a.unbind("resize",e._winResize)}},v.fn._init.prototype=v.fn,e.fn.dialog=e.fn.artDialog=function(){var e=arguments;return this[this.live?"live":"bind"]("click",function(){return v.apply(this,e),!1}),this},v.focus=null,v.get=function(e){return e===n?v.list:v.list[e]},v.list={},f.bind("keydown",function(e){var t=e.target,n=t.nodeName,r=/^INPUT|TEXTAREA$/,i=v.focus,s=e.keyCode;if(!i||!i.config.esc||r.test(n))return;s===27&&i._click(i.config.cancelVal)}),o=t._artDialog_path||function(e,t,n){for(t in e)e[t].src&&e[t].src.indexOf("artDialog")!==-1&&(n=e[t]);return i=n||e[e.length-1],n=i.src.replace(/\\/g,"/"),n.lastIndexOf("/")<0?".":n.substring(0,n.lastIndexOf("/"))}(document.getElementsByTagName("script")),s=i.src.split("skin=")[1];if(s){var m=document.createElement("link");m.rel="stylesheet",m.href=o+"/skins/"+s+".css?"+v.fn.version,i.parentNode.insertBefore(m,i)}a.bind("load",function(){setTimeout(function(){if(u)return;v({left:"-9999em",time:9,fixed:!1,lock:!1,focus:!1})},150)});try{document.execCommand("BackgroundImageCache",!1,!0)}catch(g){}v._templates='<div class="aui_outer"><table class="aui_border"><tbody><tr><td class="aui_nw"></td><td class="aui_n"></td><td class="aui_ne"></td></tr><tr><td class="aui_w"></td><td class="aui_c"><div class="aui_inner"><table class="aui_dialog"><tbody><tr><td colspan="2" class="aui_header"><div class="aui_titleBar"><div class="aui_title"></div><a class="aui_close" href="javascript:/*artDialog*/;">\u00d7</a></div></td></tr><tr><td class="aui_icon"><div class="aui_iconBg"></div></td><td class="aui_main"><div class="aui_content"></div></td></tr><tr><td colspan="2" class="aui_footer"><div class="aui_buttons"></div></td></tr></tbody></table></div></td><td class="aui_e"></td></tr><tr><td class="aui_sw"></td><td class="aui_s"></td><td class="aui_se"></td></tr></tbody></table></div>',v.defaults={content:'<div class="aui_loading"><span>loading..</span></div>',title:"\u6d88\u606f",button:null,ok:null,cancel:null,init:null,close:null,okVal:"\u786e\u5b9a",cancelVal:"\u53d6\u6d88",width:"auto",height:"auto",minWidth:96,minHeight:32,padding:"20px 25px",skin:"",icon:null,time:null,esc:!0,focus:!0,show:!0,follow:null,path:o,lock:!1,background:"#000",opacity:.7,duration:300,fixed:!1,left:"50%",top:"38.2%",zIndex:1987,resize:!0,drag:!0},t.artDialog=e.dialog=e.artDialog=v}(this.art||this.jQuery&&(this.art=jQuery),this),function(e){var t,n,r=e(window),i=e(document),s=document.documentElement,o=!("minWidth"in s.style),u="onlosecapture"in s,a="setCapture"in s;artDialog.dragEvent=function(){var e=this,t=function(t){var n=e[t];e[t]=function(){return n.apply(e,arguments)}};t("start"),t("move"),t("end")},artDialog.dragEvent.prototype={onstart:e.noop,start:function(e){return i.bind("mousemove",this.move).bind("mouseup",this.end),this._sClientX=e.clientX,this._sClientY=e.clientY,this.onstart(e.clientX,e.clientY),!1},onmove:e.noop,move:function(e){return this._mClientX=e.clientX,this._mClientY=e.clientY,this.onmove(e.clientX-this._sClientX,e.clientY-this._sClientY),!1},onend:e.noop,end:function(e){return i.unbind("mousemove",this.move).unbind("mouseup",this.end),this.onend(e.clientX,e.clientY),!1}},n=function(e){var n,s,f,l,c,h,p=artDialog.focus,d=p.DOM,v=d.wrap,m=d.title,g=d.main,y="getSelection"in window?function(){window.getSelection().removeAllRanges()}:function(){try{document.selection.empty()}catch(e){}};t.onstart=function(e,n){h?(s=g[0].offsetWidth,f=g[0].offsetHeight):(l=v[0].offsetLeft,c=v[0].offsetTop),i.bind("dblclick",t.end),!o&&u?m.bind("losecapture",t.end):r.bind("blur",t.end),a&&m[0].setCapture(),v.addClass("aui_state_drag"),p.focus()},t.onmove=function(e,t){if(h){var r=v[0].style,i=g[0].style,o=e+s,u=t+f;r.width="auto",i.width=Math.max(0,o)+"px",r.width=v[0].offsetWidth+"px",i.height=Math.max(0,u)+"px"}else{var i=v[0].style,a=Math.max(n.minX,Math.min(n.maxX,e+l)),d=Math.max(n.minY,Math.min(n.maxY,t+c));i.left=a+"px",i.top=d+"px"}y(),p._ie6SelectFix()},t.onend=function(e,n){i.unbind("dblclick",t.end),!o&&u?m.unbind("losecapture",t.end):r.unbind("blur",t.end),a&&m[0].releaseCapture(),o&&!p.closed&&p._autoPositionType(),v.removeClass("aui_state_drag")},h=e.target===d.se[0]?!0:!1,n=function(){var e,t,n=p.DOM.wrap[0],s=n.style.position==="fixed",o=n.offsetWidth,u=n.offsetHeight,a=r.width(),f=r.height(),l=s?0:i.scrollLeft(),c=s?0:i.scrollTop(),e=a-o+l;return t=f-u+c,{minX:l,minY:c,maxX:e,maxY:t}}(),t.start(e)},i.bind("mousedown",function(e){var r=artDialog.focus;if(!r)return;var i=e.target,s=r.config,o=r.DOM;if(s.drag!==!1&&i===o.title[0]||s.resize!==!1&&i===o.se[0])return t=t||new artDialog.dragEvent,n(e),!1})}(this.art||this.jQuery&&(this.art=jQuery))
\ No newline at end of file
/*!
* artDialog 4.1.7
* Date: 2013-03-03 08:04
* http://code.google.com/p/artdialog/
* (c) 2009-2012 TangBin, http://www.planeArt.cn
*
* This is licensed under the GNU LGPL, version 2.1 or later.
* For details, see: http://creativecommons.org/licenses/LGPL/2.1/
*/
;(function (window, undefined) {
//if (window.jQuery) return jQuery;
var $ = window.art = function (selector, context) {
return new $.fn.init(selector, context);
},
readyBound = false,
readyList = [],
DOMContentLoaded,
isOpacity = 'opacity' in document.documentElement.style,
quickExpr = /^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,
rclass = /[\n\t]/g,
ralpha = /alpha\([^)]*\)/i,
ropacity = /opacity=([^)]*)/,
rfxnum = /^([+-]=)?([\d+-.]+)(.*)$/;
if (window.$ === undefined) window.$ = $;
$.fn = $.prototype = {
constructor: $,
/**
* DOM 就绪
* @param {Function} 回调函数
*/
ready: function (callback) {
$.bindReady();
if ($.isReady) {
callback.call(document, $);
} else if (readyList) {
readyList.push(callback);
};
return this;
},
/**
* 判断样式类是否存在
* @param {String} 名称
* @return {Boolean}
*/
hasClass: function (name) {
var className = ' ' + name + ' ';
if ((' ' + this[0].className + ' ').replace(rclass, ' ')
.indexOf(className) > -1) return true;
return false;
},
/**
* 添加样式类
* @param {String} 名称
*/
addClass: function (name) {
if (!this.hasClass(name)) this[0].className += ' ' + name;
return this;
},
/**
* 移除样式类
* @param {String} 名称
*/
removeClass: function (name) {
var elem = this[0];
if (!name) {
elem.className = '';
} else
if (this.hasClass(name)) {
elem.className = elem.className.replace(name, ' ');
};
return this;
},
/**
* 读写样式<br />
* css(name) 访问第一个匹配元素的样式属性<br />
* css(properties) 把一个"名/值对"对象设置为所有匹配元素的样式属性<br />
* css(name, value) 在所有匹配的元素中,设置一个样式属性的值<br />
*/
css: function (name, value) {
var i, elem = this[0], obj = arguments[0];
if (typeof name === 'string') {
if (value === undefined) {
return $.css(elem, name);
} else {
name === 'opacity' ?
$.opacity.set(elem, value) :
elem.style[name] = value;
};
} else {
for (i in obj) {
i === 'opacity' ?
$.opacity.set(elem, obj[i]) :
elem.style[i] = obj[i];
};
};
return this;
},
/** 显示元素 */
show: function () {
return this.css('display', 'block');
},
/** 隐藏元素 */
hide: function () {
return this.css('display', 'none');
},
/**
* 获取相对文档的坐标
* @return {Object} 返回left、top的数值
*/
offset: function () {
var elem = this[0],
box = elem.getBoundingClientRect(),
doc = elem.ownerDocument,
body = doc.body,
docElem = doc.documentElement,
clientTop = docElem.clientTop || body.clientTop || 0,
clientLeft = docElem.clientLeft || body.clientLeft || 0,
top = box.top + (self.pageYOffset || docElem.scrollTop) - clientTop,
left = box.left + (self.pageXOffset || docElem.scrollLeft) - clientLeft;
return {
left: left,
top: top
};
},
/**
* 读写HTML - (不支持文本框)
* @param {String} 内容
*/
html: function (content) {
var elem = this[0];
if (content === undefined) return elem.innerHTML;
$.cleanData(elem.getElementsByTagName('*'));
elem.innerHTML = content;
return this;
},
/**
* 移除节点
*/
remove: function () {
var elem = this[0];
$.cleanData(elem.getElementsByTagName('*'));
$.cleanData([elem]);
elem.parentNode.removeChild(elem);
return this;
},
/**
* 事件绑定
* @param {String} 类型
* @param {Function} 要绑定的函数
*/
bind: function (type, callback) {
$.event.add(this[0], type, callback);
return this;
},
/**
* 移除事件
* @param {String} 类型
* @param {Function} 要卸载的函数
*/
unbind: function(type, callback) {
$.event.remove(this[0], type, callback);
return this;
}
};
$.fn.init = function (selector, context) {
var match, elem;
context = context || document;
if (!selector) return this;
if (selector.nodeType) {
this[0] = selector;
return this;
};
if (selector === 'body' && context.body) {
this[0] = context.body;
return this;
};
if (selector === 'head' || selector === 'html') {
this[0] = context.getElementsByTagName(selector)[0];
return this;
};
if (typeof selector === 'string') {
match = quickExpr.exec(selector);
if (match && match[2]) {
elem = context.getElementById(match[2]);
if (elem && elem.parentNode) this[0] = elem;
return this;
};
};
if (typeof selector === 'function') return $(document).ready(selector);
this[0] = selector;
return this;
};
$.fn.init.prototype = $.fn;
/** 空函数 */
$.noop = function () {};
/** 检测window */
$.isWindow = function (obj) {
return obj && typeof obj === 'object' && 'setInterval' in obj;
};
/** 数组判定 */
$.isArray = function (obj) {
return Object.prototype.toString.call(obj) === '[object Array]';
};
/**
* 搜索子元素
* 注意:只支持nodeName或.className的形式,并且只返回第一个元素
* @param {String}
*/
$.fn.find = function (expr) {
var value, elem = this[0],
className = expr.split('.')[1];
if (className) {
if (document.getElementsByClassName) {
value = elem.getElementsByClassName(className);
} else {
value = getElementsByClassName(className, elem);
};
} else {
value = elem.getElementsByTagName(expr);
};
return $(value[0]);
};
function getElementsByClassName (className, node, tag) {
node = node || document;
tag = tag || '*';
var i = 0,
j = 0,
classElements = [],
els = node.getElementsByTagName(tag),
elsLen = els.length,
pattern = new RegExp("(^|\\s)" + className + "(\\s|$)");
for (; i < elsLen; i ++) {
if (pattern.test(els[i].className)) {
classElements[j] = els[i];
j ++;
};
};
return classElements;
};
/**
* 遍历
* @param {Object}
* @param {Function}
*/
$.each = function (obj, callback) {
var name, i = 0,
length = obj.length,
isObj = length === undefined;
if (isObj) {
for (name in obj) {
if (callback.call(obj[name], name, obj[name]) === false) break;
};
} else {
for (var value = obj[0];
i < length && callback.call(value, i, value) !== false;
value = obj[++i]) {};
};
return obj;
};
/**
* 读写缓存
* @param {HTMLElement} 元素
* @param {String} 缓存名称
* @param {Any} 数据
* @return {Any} 如果无参数data则返回缓存数据
*/
$.data = function (elem, name, data) {
var cache = $.cache,
id = uuid(elem);
if (name === undefined) return cache[id];
if (!cache[id]) cache[id] = {};
if (data !== undefined) cache[id][name] = data;
return cache[id][name];
};
/**
* 删除缓存
* @param {HTMLElement} 元素
* @param {String} 缓存名称
*/
$.removeData = function (elem, name) {
var empty = true,
expando = $.expando,
cache = $.cache,
id = uuid(elem),
thisCache = id && cache[id];
if (!thisCache) return;
if (name) {
delete thisCache[name];
for (var n in thisCache) empty = false;
if (empty) delete $.cache[id];
} else {
delete cache[id];
if (elem.removeAttribute) {
elem.removeAttribute(expando);
} else {
elem[expando] = null;
};
};
};
$.uuid = 0;
$.cache = {};
$.expando = '@cache' + + new Date
// 标记元素唯一身份
function uuid (elem) {
var expando = $.expando,
id = elem === window ? 0 : elem[expando];
if (id === undefined) elem[expando] = id = ++ $.uuid;
return id;
};
/**
* 事件机制
* @namespace
* @requires [$.data, $.removeData]
*/
$.event = {
/**
* 添加事件
* @param {HTMLElement} 元素
* @param {String} 事件类型
* @param {Function} 要添加的函数
*/
add: function (elem, type, callback) {
var cache, listeners,
that = $.event,
data = $.data(elem, '@events') || $.data(elem, '@events', {});
cache = data[type] = data[type] || {};
listeners = cache.listeners = cache.listeners || [];
listeners.push(callback);
if (!cache.handler) {
cache.elem = elem;
cache.handler = that.handler(cache);
elem.addEventListener
? elem.addEventListener(type, cache.handler, false)
: elem.attachEvent('on' + type, cache.handler);
};
},
/**
* 卸载事件
* @param {HTMLElement} 元素
* @param {String} 事件类型
* @param {Function} 要卸载的函数
*/
remove: function (elem, type, callback) {
var i, cache, listeners,
that = $.event,
empty = true,
data = $.data(elem, '@events');
if (!data) return;
if (!type) {
for (i in data) that.remove(elem, i);
return;
};
cache = data[type];
if (!cache) return;
listeners = cache.listeners;
if (callback) {
for (i = 0; i < listeners.length; i ++) {
listeners[i] === callback && listeners.splice(i--, 1);
};
} else {
cache.listeners = [];
};
if (cache.listeners.length === 0) {
elem.removeEventListener
? elem.removeEventListener(type, cache.handler, false)
: elem.detachEvent('on' + type, cache.handler);
delete data[type];
cache = $.data(elem, '@events');
for (var n in cache) empty = false;
if (empty) $.removeData(elem, '@events');
};
},
/** @inner 事件句柄 */
handler: function (cache) {
return function (event) {
event = $.event.fix(event || window.event);
for (var i = 0, list = cache.listeners, fn; fn = list[i++];) {
if (fn.call(cache.elem, event) === false) {
event.preventDefault();
event.stopPropagation();
};
};
};
},
/** @inner Event对象兼容处理 */
fix: function (event) {
if (event.target) return event;
var event2 = {
target: event.srcElement || document,
preventDefault: function () {event.returnValue = false},
stopPropagation: function () {event.cancelBubble = true}
};
// IE6/7/8 在原生window.event对象写入数据会导致内存无法回收,应当采用拷贝
for (var i in event) event2[i] = event[i];
return event2;
}
};
/**
* 清理元素集的事件与缓存
* @requires [$.removeData, $.event]
* @param {HTMLCollection} 元素集
*/
$.cleanData = function (elems) {
var i = 0, elem,
len = elems.length,
removeEvent = $.event.remove,
removeData = $.removeData;
for (; i < len; i ++) {
elem = elems[i];
removeEvent(elem);
removeData(elem);
};
};
// DOM就绪事件
$.isReady = false;
$.ready = function () {
if (!$.isReady) {
if (!document.body) return setTimeout($.ready, 13);
$.isReady = true;
if (readyList) {
var fn, i = 0;
while ((fn = readyList[i++])) {
fn.call(document, $);
};
readyList = null;
};
};
};
$.bindReady = function () {
if (readyBound) return;
readyBound = true;
if (document.readyState === 'complete') {
return $.ready();
};
if (document.addEventListener) {
document.addEventListener('DOMContentLoaded', DOMContentLoaded, false);
window.addEventListener('load', $.ready, false);
} else if (document.attachEvent) {
document.attachEvent('onreadystatechange', DOMContentLoaded);
window.attachEvent('onload', $.ready);
var toplevel = false;
try {
toplevel = window.frameElement == null;
} catch (e) {};
if (document.documentElement.doScroll && toplevel) {
doScrollCheck();
};
};
};
if (document.addEventListener) {
DOMContentLoaded = function () {
document.removeEventListener('DOMContentLoaded', DOMContentLoaded, false);
$.ready();
};
} else if (document.attachEvent) {
DOMContentLoaded = function () {
if (document.readyState === 'complete') {
document.detachEvent('onreadystatechange', DOMContentLoaded);
$.ready();
};
};
};
function doScrollCheck () {
if ($.isReady) return;
try {
document.documentElement.doScroll('left');
} catch (e) {
setTimeout(doScrollCheck, 1);
return;
};
$.ready();
};
// 获取css
$.css = 'defaultView' in document && 'getComputedStyle' in document.defaultView ?
function (elem, name) {
return document.defaultView.getComputedStyle(elem, false)[name];
} :
function (elem, name) {
var ret = name === 'opacity' ? $.opacity.get(elem) : elem.currentStyle[name];
return ret || '';
};
// 跨浏览器处理opacity
$.opacity = {
get: function (elem) {
return isOpacity ?
document.defaultView.getComputedStyle(elem, false).opacity :
ropacity.test((elem.currentStyle
? elem.currentStyle.filter
: elem.style.filter) || '')
? (parseFloat(RegExp.$1) / 100) + ''
: 1;
},
set: function (elem, value) {
if (isOpacity) return elem.style.opacity = value;
var style = elem.style;
style.zoom = 1;
var opacity = 'alpha(opacity=' + value * 100 + ')',
filter = style.filter || '';
style.filter = ralpha.test(filter) ?
filter.replace(ralpha, opacity) :
style.filter + ' ' + opacity;
}
};
/**
* 获取滚动条位置 - [不支持写入]
* $.fn.scrollLeft, $.fn.scrollTop
* @example 获取文档垂直滚动条:$(document).scrollTop()
* @return {Number} 返回滚动条位置
*/
$.each(['Left', 'Top'], function (i, name) {
var method = 'scroll' + name;
$.fn[method] = function () {
var elem = this[0], win;
win = getWindow(elem);
return win ?
('pageXOffset' in win) ?
win[i ? 'pageYOffset' : 'pageXOffset'] :
win.document.documentElement[method] || win.document.body[method] :
elem[method];
};
});
function getWindow (elem) {
return $.isWindow(elem) ?
elem :
elem.nodeType === 9 ?
elem.defaultView || elem.parentWindow :
false;
};
/**
* 获取窗口或文档尺寸 - [只支持window与document读取]
* @example
获取文档宽度:$(document).width()
获取可视范围:$(window).width()
* @return {Number}
*/
$.each(['Height', 'Width'], function (i, name) {
var type = name.toLowerCase();
$.fn[type] = function (size) {
var elem = this[0];
if (!elem) {
return size == null ? null : this;
};
return $.isWindow(elem) ?
elem.document.documentElement['client' + name] || elem.document.body['client' + name] :
(elem.nodeType === 9) ?
Math.max(
elem.documentElement['client' + name],
elem.body['scroll' + name], elem.documentElement['scroll' + name],
elem.body['offset' + name], elem.documentElement['offset' + name]
) : null;
};
});
/**
* 简单ajax支持
* @example
* $.ajax({
* url: url,
* success: callback,
* cache: cache
* });
*/
$.ajax = function (config) {
var ajax = window.XMLHttpRequest ?
new XMLHttpRequest() :
new ActiveXObject('Microsoft.XMLHTTP'),
url = config.url;
if (config.cache === false) {
var ts = + new Date,
ret = url.replace(/([?&])_=[^&]*/, "$1_=" + ts );
url = ret + ((ret === url) ? (/\?/.test(url) ? "&" : "?") + "_=" + ts : "");
};
ajax.onreadystatechange = function() {
if (ajax.readyState === 4 && ajax.status === 200) {
config.success && config.success(ajax.responseText);
ajax.onreadystatechange = $.noop;
};
};
ajax.open('GET', url, 1);
ajax.send(null);
};
/** 动画引擎 - [不支持链式列队操作] */
$.fn.animate = function (prop, speed, easing, callback) {
speed = speed || 400;
if (typeof easing === 'function') callback = easing;
easing = easing && $.easing[easing] ? easing : 'swing';
var elem = this[0], overflow,
fx, parts, start, end, unit,
opt = {
speed: speed,
easing: easing,
callback: function () {
if (overflow != null) elem.style.overflow = '';
callback && callback();
}
};
opt.curAnim = {};
$.each(prop, function (name, val) {
opt.curAnim[name] = val;
});
$.each(prop, function (name, val) {
fx = new $.fx(elem, opt, name);
parts = rfxnum.exec(val);
start = parseFloat(name === 'opacity'
|| (elem.style && elem.style[name] != null) ?
$.css(elem, name) :
elem[name]);
end = parseFloat(parts[2]);
unit = parts[3];
if (name === 'height' || name === 'width') {
end = Math.max(0, end);
overflow = [elem.style.overflow,
elem.style.overflowX, elem.style.overflowY];
};
fx.custom(start, end, unit);
});
if (overflow != null) elem.style.overflow = 'hidden';
return this;
};
$.timers = [];
$.fx = function (elem, options, prop) {
this.elem = elem;
this.options = options;
this.prop = prop;
};
$.fx.prototype = {
custom: function (from, to, unit) {
var that = this;
that.startTime = $.fx.now();
that.start = from;
that.end = to;
that.unit = unit;
that.now = that.start;
that.state = that.pos = 0;
function t() {
return that.step();
};
t.elem = that.elem;
t();
$.timers.push(t);
if (!$.timerId) $.timerId = setInterval($.fx.tick, 13);
},
step: function () {
var that = this, t = $.fx.now(), done = true;
if (t >= that.options.speed + that.startTime) {
that.now = that.end;
that.state = that.pos = 1;
that.update();
that.options.curAnim[that.prop] = true;
for (var i in that.options.curAnim) {
if (that.options.curAnim[i] !== true) {
done = false;
};
};
if (done) that.options.callback.call(that.elem);
return false;
} else {
var n = t - that.startTime;
that.state = n / that.options.speed;
that.pos = $.easing[that.options.easing](that.state, n, 0, 1, that.options.speed);
that.now = that.start + ((that.end - that.start) * that.pos);
that.update();
return true;
};
},
update: function () {
var that = this;
if (that.prop === 'opacity') {
$.opacity.set(that.elem, that.now);
} else
if (that.elem.style && that.elem.style[that.prop] != null) {
that.elem.style[that.prop] = that.now + that.unit;
} else {
that.elem[that.prop] = that.now;
};
}
};
$.fx.now = function () {
return + new Date;
};
$.easing = {
linear: function (p, n, firstNum, diff) {
return firstNum + diff * p;
},
swing: function (p, n, firstNum, diff) {
return ((-Math.cos(p * Math.PI) / 2) + 0.5) * diff + firstNum;
}
};
$.fx.tick = function () {
var timers = $.timers;
for (var i = 0; i < timers.length; i++) {
!timers[i]() && timers.splice(i--, 1);
};
!timers.length && $.fx.stop();
};
$.fx.stop = function () {
clearInterval($.timerId);
$.timerId = null;
};
$.fn.stop = function () {
var timers = $.timers;
for (var i = timers.length - 1; i >= 0; i--) {
if (timers[i].elem === this[0]) timers.splice(i, 1);
};
return this;
};
//-------------end
return $}(window));
//------------------------------------------------
// 对话框模块
//------------------------------------------------
;(function ($, window, undefined) {
$.noop = $.noop || function () {}; // jQuery 1.3.2
var _box, _thisScript, _skin, _path,
_count = 0,
_$window = $(window),
_$document = $(document),
_$html = $('html'),
_elem = document.documentElement,
_isIE6 = window.VBArray && !window.XMLHttpRequest,
_isMobile = 'createTouch' in document && !('onmousemove' in _elem)
|| /(iPhone|iPad|iPod)/i.test(navigator.userAgent),
_expando = 'artDialog' + + new Date;
var artDialog = function (config, ok, cancel) {
config = config || {};
if (typeof config === 'string' || config.nodeType === 1) {
config = {content: config, fixed: !_isMobile};
};
var api,
defaults = artDialog.defaults,
elem = config.follow = this.nodeType === 1 && this || config.follow;
// 合并默认配置
for (var i in defaults) {
if (config[i] === undefined) config[i] = defaults[i];
};
// 兼容v4.1.0之前的参数,未来版本将删除此
$.each({ok:"yesFn",cancel:"noFn",close:"closeFn",init:"initFn",okVal:"yesText",cancelVal:"noText"},
function(i,o){config[i]=config[i]!==undefined?config[i]:config[o]});
// 返回跟随模式或重复定义的ID
if (typeof elem === 'string') elem = $(elem)[0];
config.id = elem && elem[_expando + 'follow'] || config.id || _expando + _count;
api = artDialog.list[config.id];
if (elem && api) return api.follow(elem).zIndex().focus();
if (api) return api.zIndex().focus();
// 目前主流移动设备对fixed支持不好
if (_isMobile) config.fixed = false;
// 按钮队列
if (!$.isArray(config.button)) {
config.button = config.button ? [config.button] : [];
};
if (ok !== undefined) config.ok = ok;
if (cancel !== undefined) config.cancel = cancel;
config.ok && config.button.push({
name: config.okVal,
callback: config.ok,
focus: true
});
config.cancel && config.button.push({
name: config.cancelVal,
callback: config.cancel
});
// zIndex全局配置
artDialog.defaults.zIndex = config.zIndex;
_count ++;
return artDialog.list[config.id] = _box ?
_box._init(config) : new artDialog.fn._init(config);
};
artDialog.fn = artDialog.prototype = {
version: '4.1.7',
closed: true,
_init: function (config) {
var that = this, DOM,
icon = config.icon,
iconBg = icon && (_isIE6 ? {png: 'icons/' + icon + '.png'}
: {backgroundImage: 'url(\'' + config.path + '/skins/icons/' + icon + '.png\')'});
that.closed = false;
that.config = config;
that.DOM = DOM = that.DOM || that._getDOM();
DOM.wrap.addClass(config.skin);
DOM.close[config.cancel === false ? 'hide' : 'show']();
DOM.icon[0].style.display = icon ? '' : 'none';
DOM.iconBg.css(iconBg || {background: 'none'});
DOM.se.css('cursor', config.resize ? 'se-resize' : 'auto');
DOM.title.css('cursor', config.drag ? 'move' : 'auto');
DOM.content.css('padding', config.padding);
that[config.show ? 'show' : 'hide'](true)
that.button(config.button)
.title(config.title)
.content(config.content, true)
.size(config.width, config.height)
.time(config.time);
config.follow
? that.follow(config.follow)
: that.position(config.left, config.top);
that.zIndex().focus();
config.lock && that.lock();
that._addEvent();
that._ie6PngFix();
_box = null;
config.init && config.init.call(that, window);
return that;
},
/**
* 设置内容
* @param {String, HTMLElement} 内容 (可选)
* @return {this, HTMLElement} 如果无参数则返回内容容器DOM对象
*/
content: function (msg) {
var prev, next, parent, display,
that = this,
DOM = that.DOM,
wrap = DOM.wrap[0],
width = wrap.offsetWidth,
height = wrap.offsetHeight,
left = parseInt(wrap.style.left),
top = parseInt(wrap.style.top),
cssWidth = wrap.style.width,
$content = DOM.content,
content = $content[0];
that._elemBack && that._elemBack();
wrap.style.width = 'auto';
if (msg === undefined) return content;
if (typeof msg === 'string') {
$content.html(msg);
} else if (msg && msg.nodeType === 1) {
// 让传入的元素在对话框关闭后可以返回到原来的地方
display = msg.style.display;
prev = msg.previousSibling;
next = msg.nextSibling;
parent = msg.parentNode;
that._elemBack = function () {
if (prev && prev.parentNode) {
prev.parentNode.insertBefore(msg, prev.nextSibling);
} else if (next && next.parentNode) {
next.parentNode.insertBefore(msg, next);
} else if (parent) {
parent.appendChild(msg);
};
msg.style.display = display;
that._elemBack = null;
};
$content.html('');
content.appendChild(msg);
msg.style.display = 'block';
};
// 新增内容后调整位置
if (!arguments[1]) {
if (that.config.follow) {
that.follow(that.config.follow);
} else {
width = wrap.offsetWidth - width;
height = wrap.offsetHeight - height;
left = left - width / 2;
top = top - height / 2;
wrap.style.left = Math.max(left, 0) + 'px';
wrap.style.top = Math.max(top, 0) + 'px';
};
if (cssWidth && cssWidth !== 'auto') {
wrap.style.width = wrap.offsetWidth + 'px';
};
that._autoPositionType();
};
that._ie6SelectFix();
that._runScript(content);
return that;
},
/**
* 设置标题
* @param {String, Boolean} 标题内容. 为false则隐藏标题栏
* @return {this, HTMLElement} 如果无参数则返回内容器DOM对象
*/
title: function (text) {
var DOM = this.DOM,
wrap = DOM.wrap,
title = DOM.title,
className = 'aui_state_noTitle';
if (text === undefined) return title[0];
if (text === false) {
title.hide().html('');
wrap.addClass(className);
} else {
title.show().html(text || '');
wrap.removeClass(className);
};
return this;
},
/**
* 位置(相对于可视区域)
* @param {Number, String}
* @param {Number, String}
*/
position: function (left, top) {
var that = this,
config = that.config,
wrap = that.DOM.wrap[0],
isFixed = _isIE6 ? false : config.fixed,
ie6Fixed = _isIE6 && that.config.fixed,
docLeft = _$document.scrollLeft(),
docTop = _$document.scrollTop(),
dl = isFixed ? 0 : docLeft,
dt = isFixed ? 0 : docTop,
ww = _$window.width(),
wh = _$window.height(),
ow = wrap.offsetWidth,
oh = wrap.offsetHeight,
style = wrap.style;
if (left || left === 0) {
that._left = left.toString().indexOf('%') !== -1 ? left : null;
left = that._toNumber(left, ww - ow);
if (typeof left === 'number') {
left = ie6Fixed ? (left += docLeft) : left + dl;
style.left = Math.max(left, dl) + 'px';
} else if (typeof left === 'string') {
style.left = left;
};
};
if (top || top === 0) {
that._top = top.toString().indexOf('%') !== -1 ? top : null;
top = that._toNumber(top, wh - oh);
if (typeof top === 'number') {
top = ie6Fixed ? (top += docTop) : top + dt;
style.top = Math.max(top, dt) + 'px';
} else if (typeof top === 'string') {
style.top = top;
};
};
if (left !== undefined && top !== undefined) {
that._follow = null;
that._autoPositionType();
};
return that;
},
/**
* 尺寸
* @param {Number, String} 宽度
* @param {Number, String} 高度
*/
size: function (width, height) {
var maxWidth, maxHeight, scaleWidth, scaleHeight,
that = this,
config = that.config,
DOM = that.DOM,
wrap = DOM.wrap,
main = DOM.main,
wrapStyle = wrap[0].style,
style = main[0].style;
if (width) {
that._width = width.toString().indexOf('%') !== -1 ? width : null;
maxWidth = _$window.width() - wrap[0].offsetWidth + main[0].offsetWidth;
scaleWidth = that._toNumber(width, maxWidth);
width = scaleWidth;
if (typeof width === 'number') {
wrapStyle.width = 'auto';
style.width = Math.max(that.config.minWidth, width) + 'px';
wrapStyle.width = wrap[0].offsetWidth + 'px'; // 防止未定义宽度的表格遇到浏览器右边边界伸缩
} else if (typeof width === 'string') {
style.width = width;
width === 'auto' && wrap.css('width', 'auto');
};
};
if (height) {
that._height = height.toString().indexOf('%') !== -1 ? height : null;
maxHeight = _$window.height() - wrap[0].offsetHeight + main[0].offsetHeight;
scaleHeight = that._toNumber(height, maxHeight);
height = scaleHeight;
if (typeof height === 'number') {
style.height = Math.max(that.config.minHeight, height) + 'px';
} else if (typeof height === 'string') {
style.height = height;
};
};
that._ie6SelectFix();
return that;
},
/**
* 跟随元素
* @param {HTMLElement, String}
*/
follow: function (elem) {
var $elem, that = this, config = that.config;
if (typeof elem === 'string' || elem && elem.nodeType === 1) {
$elem = $(elem);
elem = $elem[0];
};
// 隐藏元素不可用
if (!elem || !elem.offsetWidth && !elem.offsetHeight) {
return that.position(that._left, that._top);
};
var expando = _expando + 'follow',
winWidth = _$window.width(),
winHeight = _$window.height(),
docLeft = _$document.scrollLeft(),
docTop = _$document.scrollTop(),
offset = $elem.offset(),
width = elem.offsetWidth,
height = elem.offsetHeight,
isFixed = _isIE6 ? false : config.fixed,
left = isFixed ? offset.left - docLeft : offset.left,
top = isFixed ? offset.top - docTop : offset.top,
wrap = that.DOM.wrap[0],
style = wrap.style,
wrapWidth = wrap.offsetWidth,
wrapHeight = wrap.offsetHeight,
setLeft = left - (wrapWidth - width) / 2,
setTop = top + height,
dl = isFixed ? 0 : docLeft,
dt = isFixed ? 0 : docTop;
setLeft = setLeft < dl ? left :
(setLeft + wrapWidth > winWidth) && (left - wrapWidth > dl)
? left - wrapWidth + width
: setLeft;
setTop = (setTop + wrapHeight > winHeight + dt)
&& (top - wrapHeight > dt)
? top - wrapHeight
: setTop;
style.left = setLeft + 'px';
style.top = setTop + 'px';
that._follow && that._follow.removeAttribute(expando);
that._follow = elem;
elem[expando] = config.id;
that._autoPositionType();
return that;
},
/**
* 自定义按钮
* @example
button({
name: 'login',
callback: function () {},
disabled: false,
focus: true
}, .., ..)
*/
button: function () {
var that = this,
ags = arguments,
DOM = that.DOM,
buttons = DOM.buttons,
elem = buttons[0],
strongButton = 'aui_state_highlight',
listeners = that._listeners = that._listeners || {},
list = $.isArray(ags[0]) ? ags[0] : [].slice.call(ags);
if (ags[0] === undefined) return elem;
$.each(list, function (i, val) {
var name = val.name,
isNewButton = !listeners[name],
button = !isNewButton ?
listeners[name].elem :
document.createElement('button');
if (!listeners[name]) listeners[name] = {};
if (val.callback) listeners[name].callback = val.callback;
if (val.className) button.className = val.className;
if (val.focus) {
that._focus && that._focus.removeClass(strongButton);
that._focus = $(button).addClass(strongButton);
that.focus();
};
// Internet Explorer 的默认类型是 "button",
// 而其他浏览器中(包括 W3C 规范)的默认值是 "submit"
// @see http://www.w3school.com.cn/tags/att_button_type.asp
button.setAttribute('type', 'button');
button[_expando + 'callback'] = name;
button.disabled = !!val.disabled;
if (isNewButton) {
button.innerHTML = name;
listeners[name].elem = button;
elem.appendChild(button);
};
});
buttons[0].style.display = list.length ? '' : 'none';
that._ie6SelectFix();
return that;
},
/** 显示对话框 */
show: function () {
this.DOM.wrap.show();
!arguments[0] && this._lockMaskWrap && this._lockMaskWrap.show();
return this;
},
/** 隐藏对话框 */
hide: function () {
this.DOM.wrap.hide();
!arguments[0] && this._lockMaskWrap && this._lockMaskWrap.hide();
return this;
},
/** 关闭对话框 */
close: function () {
if (this.closed) return this;
var that = this,
DOM = that.DOM,
wrap = DOM.wrap,
list = artDialog.list,
fn = that.config.close,
follow = that.config.follow;
that.time();
if (typeof fn === 'function' && fn.call(that, window) === false) {
return that;
};
that.unlock();
// 置空内容
that._elemBack && that._elemBack();
wrap[0].className = wrap[0].style.cssText = '';
DOM.title.html('');
DOM.content.html('');
DOM.buttons.html('');
if (artDialog.focus === that) artDialog.focus = null;
if (follow) follow.removeAttribute(_expando + 'follow');
delete list[that.config.id];
that._removeEvent();
that.hide(true)._setAbsolute();
// 清空除this.DOM之外临时对象,恢复到初始状态,以便使用单例模式
for (var i in that) {
if (that.hasOwnProperty(i) && i !== 'DOM') delete that[i];
};
// 移除HTMLElement或重用
_box ? wrap.remove() : _box = that;
return that;
},
/**
* 定时关闭
* @param {Number} 单位为秒, 无参数则停止计时器
*/
time: function (second) {
var that = this,
cancel = that.config.cancelVal,
timer = that._timer;
timer && clearTimeout(timer);
if (second) {
that._timer = setTimeout(function(){
that._click(cancel);
}, 1000 * second);
};
return that;
},
/** 设置焦点 */
focus: function () {
try {
if (this.config.focus) {
var elem = this._focus && this._focus[0] || this.DOM.close[0];
elem && elem.focus();
}
} catch (e) {}; // IE对不可见元素设置焦点会报错
return this;
},
/** 置顶对话框 */
zIndex: function () {
var that = this,
DOM = that.DOM,
wrap = DOM.wrap,
top = artDialog.focus,
index = artDialog.defaults.zIndex ++;
// 设置叠加高度
wrap.css('zIndex', index);
that._lockMask && that._lockMask.css('zIndex', index - 1);
// 设置最高层的样式
top && top.DOM.wrap.removeClass('aui_state_focus');
artDialog.focus = that;
wrap.addClass('aui_state_focus');
return that;
},
/** 设置屏锁 */
lock: function () {
if (this._lock) return this;
var that = this,
index = artDialog.defaults.zIndex - 1,
wrap = that.DOM.wrap,
config = that.config,
docWidth = _$document.width(),
docHeight = _$document.height(),
lockMaskWrap = that._lockMaskWrap || $(document.body.appendChild(document.createElement('div'))),
lockMask = that._lockMask || $(lockMaskWrap[0].appendChild(document.createElement('div'))),
domTxt = '(document).documentElement',
sizeCss = _isMobile ? 'width:' + docWidth + 'px;height:' + docHeight
+ 'px' : 'width:100%;height:100%',
ie6Css = _isIE6 ?
'position:absolute;left:expression(' + domTxt + '.scrollLeft);top:expression('
+ domTxt + '.scrollTop);width:expression(' + domTxt
+ '.clientWidth);height:expression(' + domTxt + '.clientHeight)'
: '';
that.zIndex();
wrap.addClass('aui_state_lock');
lockMaskWrap[0].style.cssText = sizeCss + ';position:fixed;z-index:'
+ index + ';top:0;left:0;overflow:hidden;' + ie6Css;
lockMask[0].style.cssText = 'height:100%;background:' + config.background
+ ';filter:alpha(opacity=0);opacity:0';
// 让IE6锁屏遮罩能够盖住下拉控件
if (_isIE6) lockMask.html(
'<iframe src="about:blank" style="width:100%;height:100%;position:absolute;' +
'top:0;left:0;z-index:-1;filter:alpha(opacity=0)"></iframe>');
lockMask.stop();
lockMask.bind('click', function () {
that._reset();
}).bind('dblclick', function () {
that._click(that.config.cancelVal);
});
if (config.duration === 0) {
lockMask.css({opacity: config.opacity});
} else {
lockMask.animate({opacity: config.opacity}, config.duration);
};
that._lockMaskWrap = lockMaskWrap;
that._lockMask = lockMask;
that._lock = true;
return that;
},
/** 解开屏锁 */
unlock: function () {
var that = this,
lockMaskWrap = that._lockMaskWrap,
lockMask = that._lockMask;
if (!that._lock) return that;
var style = lockMaskWrap[0].style;
var un = function () {
if (_isIE6) {
style.removeExpression('width');
style.removeExpression('height');
style.removeExpression('left');
style.removeExpression('top');
};
style.cssText = 'display:none';
_box && lockMaskWrap.remove();
};
lockMask.stop().unbind();
that.DOM.wrap.removeClass('aui_state_lock');
if (!that.config.duration) {// 取消动画,快速关闭
un();
} else {
lockMask.animate({opacity: 0}, that.config.duration, un);
};
that._lock = false;
return that;
},
// 获取元素
_getDOM: function () {
var wrap = document.createElement('div'),
body = document.body;
wrap.style.cssText = 'position:absolute;left:0;top:0';
wrap.innerHTML = artDialog._templates;
body.insertBefore(wrap, body.firstChild);
var name, i = 0,
DOM = {wrap: $(wrap)},
els = wrap.getElementsByTagName('*'),
elsLen = els.length;
for (; i < elsLen; i ++) {
name = els[i].className.split('aui_')[1];
if (name) DOM[name] = $(els[i]);
};
return DOM;
},
// px与%单位转换成数值 (百分比单位按照最大值换算)
// 其他的单位返回原值
_toNumber: function (thisValue, maxValue) {
if (!thisValue && thisValue !== 0 || typeof thisValue === 'number') {
return thisValue;
};
var last = thisValue.length - 1;
if (thisValue.lastIndexOf('px') === last) {
thisValue = parseInt(thisValue);
} else if (thisValue.lastIndexOf('%') === last) {
thisValue = parseInt(maxValue * thisValue.split('%')[0] / 100);
};
return thisValue;
},
// 让IE6 CSS支持PNG背景
_ie6PngFix: _isIE6 ? function () {
var i = 0, elem, png, pngPath, runtimeStyle,
path = artDialog.defaults.path + '/skins/',
list = this.DOM.wrap[0].getElementsByTagName('*');
for (; i < list.length; i ++) {
elem = list[i];
png = elem.currentStyle['png'];
if (png) {
pngPath = path + png;
runtimeStyle = elem.runtimeStyle;
runtimeStyle.backgroundImage = 'none';
runtimeStyle.filter = "progid:DXImageTransform.Microsoft." +
"AlphaImageLoader(src='" + pngPath + "',sizingMethod='crop')";
};
};
} : $.noop,
// 强制覆盖IE6下拉控件
_ie6SelectFix: _isIE6 ? function () {
var $wrap = this.DOM.wrap,
wrap = $wrap[0],
expando = _expando + 'iframeMask',
iframe = $wrap[expando],
width = wrap.offsetWidth,
height = wrap.offsetHeight;
width = width + 'px';
height = height + 'px';
if (iframe) {
iframe.style.width = width;
iframe.style.height = height;
} else {
iframe = wrap.appendChild(document.createElement('iframe'));
$wrap[expando] = iframe;
iframe.src = 'about:blank';
iframe.style.cssText = 'position:absolute;z-index:-1;left:0;top:0;'
+ 'filter:alpha(opacity=0);width:' + width + ';height:' + height;
};
} : $.noop,
// 解析HTML片段中自定义类型脚本,其this指向artDialog内部
// <script type="text/dialog">/* [code] */</script>
_runScript: function (elem) {
var fun, i = 0, n = 0,
tags = elem.getElementsByTagName('script'),
length = tags.length,
script = [];
for (; i < length; i ++) {
if (tags[i].type === 'text/dialog') {
script[n] = tags[i].innerHTML;
n ++;
};
};
if (script.length) {
script = script.join('');
fun = new Function(script);
fun.call(this);
};
},
// 自动切换定位类型
_autoPositionType: function () {
this[this.config.fixed ? '_setFixed' : '_setAbsolute']();/////////////
},
// 设置静止定位
// IE6 Fixed @see: http://www.planeart.cn/?p=877
_setFixed: (function () {
_isIE6 && $(function () {
var bg = 'backgroundAttachment';
if (_$html.css(bg) !== 'fixed' && $('body').css(bg) !== 'fixed') {
_$html.css({
zoom: 1,// 避免偶尔出现body背景图片异常的情况
backgroundImage: 'url(about:blank)',
backgroundAttachment: 'fixed'
});
};
});
return function () {
var $elem = this.DOM.wrap,
style = $elem[0].style;
if (_isIE6) {
var left = parseInt($elem.css('left')),
top = parseInt($elem.css('top')),
sLeft = _$document.scrollLeft(),
sTop = _$document.scrollTop(),
txt = '(document.documentElement)';
this._setAbsolute();
style.setExpression('left', 'eval(' + txt + '.scrollLeft + '
+ (left - sLeft) + ') + "px"');
style.setExpression('top', 'eval(' + txt + '.scrollTop + '
+ (top - sTop) + ') + "px"');
} else {
style.position = 'fixed';
};
};
}()),
// 设置绝对定位
_setAbsolute: function () {
var style = this.DOM.wrap[0].style;
if (_isIE6) {
style.removeExpression('left');
style.removeExpression('top');
};
style.position = 'absolute';
},
// 按钮回调函数触发
_click: function (name) {
var that = this,
fn = that._listeners[name] && that._listeners[name].callback;
return typeof fn !== 'function' || fn.call(that, window) !== false ?
that.close() : that;
},
// 重置位置与尺寸
_reset: function (test) {
var newSize,
that = this,
oldSize = that._winSize || _$window.width() * _$window.height(),
elem = that._follow,
width = that._width,
height = that._height,
left = that._left,
top = that._top;
if (test) {
// IE6~7 window.onresize bug
newSize = that._winSize = _$window.width() * _$window.height();
if (oldSize === newSize) return;
};
if (width || height) that.size(width, height);
if (elem) {
that.follow(elem);
} else if (left || top) {
that.position(left, top);
};
},
// 事件代理
_addEvent: function () {
var resizeTimer,
that = this,
config = that.config,
isIE = 'CollectGarbage' in window,
DOM = that.DOM;
// 窗口调节事件
that._winResize = function () {
resizeTimer && clearTimeout(resizeTimer);
resizeTimer = setTimeout(function () {
that._reset(isIE);
}, 40);
};
_$window.bind('resize', that._winResize);
// 监听点击
DOM.wrap
.bind('click', function (event) {
var target = event.target, callbackID;
if (target.disabled) return false; // IE BUG
if (target === DOM.close[0]) {
that._click(config.cancelVal);
return false;
} else {
callbackID = target[_expando + 'callback'];
callbackID && that._click(callbackID);
};
that._ie6SelectFix();
})
.bind('mousedown', function () {
that.zIndex();
});
},
// 卸载事件代理
_removeEvent: function () {
var that = this,
DOM = that.DOM;
DOM.wrap.unbind();
_$window.unbind('resize', that._winResize);
}
};
artDialog.fn._init.prototype = artDialog.fn;
$.fn.dialog = $.fn.artDialog = function () {
var config = arguments;
this[this.live ? 'live' : 'bind']('click', function () {
artDialog.apply(this, config);
return false;
});
return this;
};
/** 最顶层的对话框API */
artDialog.focus = null;
/** 获取某对话框API */
artDialog.get = function (id) {
return id === undefined
? artDialog.list
: artDialog.list[id];
};
artDialog.list = {};
// 全局快捷键
_$document.bind('keydown', function (event) {
var target = event.target,
nodeName = target.nodeName,
rinput = /^INPUT|TEXTAREA$/,
api = artDialog.focus,
keyCode = event.keyCode;
if (!api || !api.config.esc || rinput.test(nodeName)) return;
keyCode === 27 && api._click(api.config.cancelVal);
});
// 获取artDialog路径
_path = window['_artDialog_path'] || (function (script, i, me) {
for (i in script) {
// 如果通过第三方脚本加载器加载本文件,请保证文件名含有"artDialog"字符
if (script[i].src && script[i].src.indexOf('artDialog') !== -1) me = script[i];
};
_thisScript = me || script[script.length - 1];
me = _thisScript.src.replace(/\\/g, '/');
return me.lastIndexOf('/') < 0 ? '.' : me.substring(0, me.lastIndexOf('/'));
}(document.getElementsByTagName('script')));
// 无阻塞载入CSS (如"artDialog.js?skin=aero")
_skin = _thisScript.src.split('skin=')[1];
if (_skin) {
var link = document.createElement('link');
link.rel = 'stylesheet';
link.href = _path + '/skins/' + _skin + '.css?' + artDialog.fn.version;
_thisScript.parentNode.insertBefore(link, _thisScript);
};
// 触发浏览器预先缓存背景图片
_$window.bind('load', function () {
setTimeout(function () {
if (_count) return;
artDialog({left: '-9999em',time: 9,fixed: false,lock: false,focus: false});
}, 150);
});
// 开启IE6 CSS背景图片缓存
try {
document.execCommand('BackgroundImageCache', false, true);
} catch (e) {};
// 使用uglifyjs压缩能够预先处理"+"号合并字符串
// uglifyjs: http://marijnhaverbeke.nl/uglifyjs
artDialog._templates =
'<div class="aui_outer">'
+ '<table class="aui_border">'
+ '<tbody>'
+ '<tr>'
+ '<td class="aui_nw"></td>'
+ '<td class="aui_n"></td>'
+ '<td class="aui_ne"></td>'
+ '</tr>'
+ '<tr>'
+ '<td class="aui_w"></td>'
+ '<td class="aui_c">'
+ '<div class="aui_inner">'
+ '<table class="aui_dialog">'
+ '<tbody>'
+ '<tr>'
+ '<td colspan="2" class="aui_header">'
+ '<div class="aui_titleBar">'
+ '<div class="aui_title"></div>'
+ '<a class="aui_close" href="javascript:/*artDialog*/;">'
+ '\xd7'
+ '</a>'
+ '</div>'
+ '</td>'
+ '</tr>'
+ '<tr>'
+ '<td class="aui_icon">'
+ '<div class="aui_iconBg"></div>'
+ '</td>'
+ '<td class="aui_main">'
+ '<div class="aui_content"></div>'
+ '</td>'
+ '</tr>'
+ '<tr>'
+ '<td colspan="2" class="aui_footer">'
+ '<div class="aui_buttons"></div>'
+ '</td>'
+ '</tr>'
+ '</tbody>'
+ '</table>'
+ '</div>'
+ '</td>'
+ '<td class="aui_e"></td>'
+ '</tr>'
+ '<tr>'
+ '<td class="aui_sw"></td>'
+ '<td class="aui_s"></td>'
+ '<td class="aui_se"></td>'
+ '</tr>'
+ '</tbody>'
+ '</table>'
+'</div>';
/**
* 默认配置
*/
artDialog.defaults = {
// 消息内容
content: '<div class="aui_loading"><span>loading..</span></div>',
title: '\u6d88\u606f', // 标题. 默认'消息'
button: null, // 自定义按钮
ok: null, // 确定按钮回调函数
cancel: null, // 取消按钮回调函数
init: null, // 对话框初始化后执行的函数
close: null, // 对话框关闭前执行的函数
okVal: '\u786E\u5B9A', // 确定按钮文本. 默认'确定'
cancelVal: '\u53D6\u6D88', // 取消按钮文本. 默认'取消'
width: 'auto', // 内容宽度
height: 'auto', // 内容高度
minWidth: 96, // 最小宽度限制
minHeight: 32, // 最小高度限制
padding: '20px 25px', // 内容与边界填充距离
skin: '', // 皮肤名(预留接口,尚未实现)
icon: null, // 消息图标名称
time: null, // 自动关闭时间
esc: true, // 是否支持Esc键关闭
focus: true, // 是否支持对话框按钮自动聚焦
show: true, // 初始化后是否显示对话框
follow: null, // 跟随某元素(即让对话框在元素附近弹出)
path: _path, // artDialog路径
lock: false, // 是否锁屏
background: '#000', // 遮罩颜色
opacity: .7, // 遮罩透明度
duration: 300, // 遮罩透明度渐变动画速度
fixed: false, // 是否静止定位
left: '50%', // X轴坐标
top: '38.2%', // Y轴坐标
zIndex: 1987, // 对话框叠加高度值(重要:此值不能超过浏览器最大限制)
resize: true, // 是否允许用户调节尺寸
drag: true // 是否允许用户拖动位置
};
window.artDialog = $.dialog = $.artDialog = artDialog;
}(this.art || this.jQuery && (this.art = jQuery), this));
//------------------------------------------------
// 对话框模块-拖拽支持(可选外置模块)
//------------------------------------------------
;(function ($) {
var _dragEvent, _use,
_$window = $(window),
_$document = $(document),
_elem = document.documentElement,
_isIE6 = !('minWidth' in _elem.style),
_isLosecapture = 'onlosecapture' in _elem,
_isSetCapture = 'setCapture' in _elem;
// 拖拽事件
artDialog.dragEvent = function () {
var that = this,
proxy = function (name) {
var fn = that[name];
that[name] = function () {
return fn.apply(that, arguments);
};
};
proxy('start');
proxy('move');
proxy('end');
};
artDialog.dragEvent.prototype = {
// 开始拖拽
onstart: $.noop,
start: function (event) {
_$document
.bind('mousemove', this.move)
.bind('mouseup', this.end);
this._sClientX = event.clientX;
this._sClientY = event.clientY;
this.onstart(event.clientX, event.clientY);
return false;
},
// 正在拖拽
onmove: $.noop,
move: function (event) {
this._mClientX = event.clientX;
this._mClientY = event.clientY;
this.onmove(
event.clientX - this._sClientX,
event.clientY - this._sClientY
);
return false;
},
// 结束拖拽
onend: $.noop,
end: function (event) {
_$document
.unbind('mousemove', this.move)
.unbind('mouseup', this.end);
this.onend(event.clientX, event.clientY);
return false;
}
};
_use = function (event) {
var limit, startWidth, startHeight, startLeft, startTop, isResize,
api = artDialog.focus,
//config = api.config,
DOM = api.DOM,
wrap = DOM.wrap,
title = DOM.title,
main = DOM.main;
// 清除文本选择
var clsSelect = 'getSelection' in window ? function () {
window.getSelection().removeAllRanges();
} : function () {
try {
document.selection.empty();
} catch (e) {};
};
// 对话框准备拖动
_dragEvent.onstart = function (x, y) {
if (isResize) {
startWidth = main[0].offsetWidth;
startHeight = main[0].offsetHeight;
} else {
startLeft = wrap[0].offsetLeft;
startTop = wrap[0].offsetTop;
};
_$document.bind('dblclick', _dragEvent.end);
!_isIE6 && _isLosecapture ?
title.bind('losecapture', _dragEvent.end) :
_$window.bind('blur', _dragEvent.end);
_isSetCapture && title[0].setCapture();
wrap.addClass('aui_state_drag');
api.focus();
};
// 对话框拖动进行中
_dragEvent.onmove = function (x, y) {
if (isResize) {
var wrapStyle = wrap[0].style,
style = main[0].style,
width = x + startWidth,
height = y + startHeight;
wrapStyle.width = 'auto';
style.width = Math.max(0, width) + 'px';
wrapStyle.width = wrap[0].offsetWidth + 'px';
style.height = Math.max(0, height) + 'px';
} else {
var style = wrap[0].style,
left = Math.max(limit.minX, Math.min(limit.maxX, x + startLeft)),
top = Math.max(limit.minY, Math.min(limit.maxY, y + startTop));
style.left = left + 'px';
style.top = top + 'px';
};
clsSelect();
api._ie6SelectFix();
};
// 对话框拖动结束
_dragEvent.onend = function (x, y) {
_$document.unbind('dblclick', _dragEvent.end);
!_isIE6 && _isLosecapture ?
title.unbind('losecapture', _dragEvent.end) :
_$window.unbind('blur', _dragEvent.end);
_isSetCapture && title[0].releaseCapture();
_isIE6 && !api.closed && api._autoPositionType();
wrap.removeClass('aui_state_drag');
};
isResize = event.target === DOM.se[0] ? true : false;
limit = (function () {
var maxX, maxY,
wrap = api.DOM.wrap[0],
fixed = wrap.style.position === 'fixed',
ow = wrap.offsetWidth,
oh = wrap.offsetHeight,
ww = _$window.width(),
wh = _$window.height(),
dl = fixed ? 0 : _$document.scrollLeft(),
dt = fixed ? 0 : _$document.scrollTop(),
// 坐标最大值限制
maxX = ww - ow + dl;
maxY = wh - oh + dt;
return {
minX: dl,
minY: dt,
maxX: maxX,
maxY: maxY
};
})();
_dragEvent.start(event);
};
// 代理 mousedown 事件触发对话框拖动
_$document.bind('mousedown', function (event) {
var api = artDialog.focus;
if (!api) return;
var target = event.target,
config = api.config,
DOM = api.DOM;
if (config.drag !== false && target === DOM.title[0]
|| config.resize !== false && target === DOM.se[0]) {
_dragEvent = _dragEvent || new artDialog.dragEvent();
_use(event);
return false;// 防止firefox与chrome滚屏
};
});
})(this.art || this.jQuery && (this.art = jQuery));
/*!
* artDialog 4.1.7
* Date: 2013-03-03 08:04
* http://code.google.com/p/artdialog/
* (c) 2009-2012 TangBin, http://www.planeArt.cn
*
* This is licensed under the GNU LGPL, version 2.1 or later.
* For details, see: http://creativecommons.org/licenses/LGPL/2.1/
*/
(function(e,t,n){e.noop=e.noop||function(){};var r,i,s,o,u=0,a=e(t),f=e(document),l=e("html"),c=document.documentElement,h=t.VBArray&&!t.XMLHttpRequest,p="createTouch"in document&&!("onmousemove"in c)||/(iPhone|iPad|iPod)/i.test(navigator.userAgent),d="artDialog"+ +(new Date),v=function(t,i,s){t=t||{};if(typeof t=="string"||t.nodeType===1)t={content:t,fixed:!p};var o,a=v.defaults,f=t.follow=this.nodeType===1&&this||t.follow;for(var l in a)t[l]===n&&(t[l]=a[l]);return e.each({ok:"yesFn",cancel:"noFn",close:"closeFn",init:"initFn",okVal:"yesText",cancelVal:"noText"},function(e,r){t[e]=t[e]!==n?t[e]:t[r]}),typeof f=="string"&&(f=e(f)[0]),t.id=f&&f[d+"follow"]||t.id||d+u,o=v.list[t.id],f&&o?o.follow(f).zIndex().focus():o?o.zIndex().focus():(p&&(t.fixed=!1),e.isArray(t.button)||(t.button=t.button?[t.button]:[]),i!==n&&(t.ok=i),s!==n&&(t.cancel=s),t.ok&&t.button.push({name:t.okVal,callback:t.ok,focus:!0}),t.cancel&&t.button.push({name:t.cancelVal,callback:t.cancel}),v.defaults.zIndex=t.zIndex,u++,v.list[t.id]=r?r._init(t):new v.fn._init(t))};v.fn=v.prototype={version:"4.1.7",closed:!0,_init:function(e){var n=this,i,s=e.icon,o=s&&(h?{png:"icons/"+s+".png"}:{backgroundImage:"url('"+e.path+"/skins/icons/"+s+".png')"});return n.closed=!1,n.config=e,n.DOM=i=n.DOM||n._getDOM(),i.wrap.addClass(e.skin),i.close[e.cancel===!1?"hide":"show"](),i.icon[0].style.display=s?"":"none",i.iconBg.css(o||{background:"none"}),i.se.css("cursor",e.resize?"se-resize":"auto"),i.title.css("cursor",e.drag?"move":"auto"),i.content.css("padding",e.padding),n[e.show?"show":"hide"](!0),n.button(e.button).title(e.title).content(e.content,!0).size(e.width,e.height).time(e.time),e.follow?n.follow(e.follow):n.position(e.left,e.top),n.zIndex().focus(),e.lock&&n.lock(),n._addEvent(),n._ie6PngFix(),r=null,e.init&&e.init.call(n,t),n},content:function(e){var t,r,i,s,o=this,u=o.DOM,a=u.wrap[0],f=a.offsetWidth,l=a.offsetHeight,c=parseInt(a.style.left),h=parseInt(a.style.top),p=a.style.width,d=u.content,v=d[0];return o._elemBack&&o._elemBack(),a.style.width="auto",e===n?v:(typeof e=="string"?d.html(e):e&&e.nodeType===1&&(s=e.style.display,t=e.previousSibling,r=e.nextSibling,i=e.parentNode,o._elemBack=function(){t&&t.parentNode?t.parentNode.insertBefore(e,t.nextSibling):r&&r.parentNode?r.parentNode.insertBefore(e,r):i&&i.appendChild(e),e.style.display=s,o._elemBack=null},d.html(""),v.appendChild(e),e.style.display="block"),arguments[1]||(o.config.follow?o.follow(o.config.follow):(f=a.offsetWidth-f,l=a.offsetHeight-l,c-=f/2,h-=l/2,a.style.left=Math.max(c,0)+"px",a.style.top=Math.max(h,0)+"px"),p&&p!=="auto"&&(a.style.width=a.offsetWidth+"px"),o._autoPositionType()),o._ie6SelectFix(),o._runScript(v),o)},title:function(e){var t=this.DOM,r=t.wrap,i=t.title,s="aui_state_noTitle";return e===n?i[0]:(e===!1?(i.hide().html(""),r.addClass(s)):(i.show().html(e||""),r.removeClass(s)),this)},position:function(e,t){var r=this,i=r.config,s=r.DOM.wrap[0],o=h?!1:i.fixed,u=h&&r.config.fixed,l=f.scrollLeft(),c=f.scrollTop(),p=o?0:l,d=o?0:c,v=a.width(),m=a.height(),g=s.offsetWidth,y=s.offsetHeight,b=s.style;if(e||e===0)r._left=e.toString().indexOf("%")!==-1?e:null,e=r._toNumber(e,v-g),typeof e=="number"?(e=u?e+=l:e+p,b.left=Math.max(e,p)+"px"):typeof e=="string"&&(b.left=e);if(t||t===0)r._top=t.toString().indexOf("%")!==-1?t:null,t=r._toNumber(t,m-y),typeof t=="number"?(t=u?t+=c:t+d,b.top=Math.max(t,d)+"px"):typeof t=="string"&&(b.top=t);return e!==n&&t!==n&&(r._follow=null,r._autoPositionType()),r},size:function(e,t){var n,r,i,s,o=this,u=o.config,f=o.DOM,l=f.wrap,c=f.main,h=l[0].style,p=c[0].style;return e&&(o._width=e.toString().indexOf("%")!==-1?e:null,n=a.width()-l[0].offsetWidth+c[0].offsetWidth,i=o._toNumber(e,n),e=i,typeof e=="number"?(h.width="auto",p.width=Math.max(o.config.minWidth,e)+"px",h.width=l[0].offsetWidth+"px"):typeof e=="string"&&(p.width=e,e==="auto"&&l.css("width","auto"))),t&&(o._height=t.toString().indexOf("%")!==-1?t:null,r=a.height()-l[0].offsetHeight+c[0].offsetHeight,s=o._toNumber(t,r),t=s,typeof t=="number"?p.height=Math.max(o.config.minHeight,t)+"px":typeof t=="string"&&(p.height=t)),o._ie6SelectFix(),o},follow:function(t){var n,r=this,i=r.config;if(typeof t=="string"||t&&t.nodeType===1)n=e(t),t=n[0];if(!t||!t.offsetWidth&&!t.offsetHeight)return r.position(r._left,r._top);var s=d+"follow",o=a.width(),u=a.height(),l=f.scrollLeft(),c=f.scrollTop(),p=n.offset(),v=t.offsetWidth,m=t.offsetHeight,g=h?!1:i.fixed,y=g?p.left-l:p.left,b=g?p.top-c:p.top,w=r.DOM.wrap[0],E=w.style,S=w.offsetWidth,x=w.offsetHeight,T=y-(S-v)/2,N=b+m,C=g?0:l,k=g?0:c;return T=T<C?y:T+S>o&&y-S>C?y-S+v:T,N=N+x>u+k&&b-x>k?b-x:N,E.left=T+"px",E.top=N+"px",r._follow&&r._follow.removeAttribute(s),r._follow=t,t[s]=i.id,r._autoPositionType(),r},button:function(){var t=this,r=arguments,i=t.DOM,s=i.buttons,o=s[0],u="aui_state_highlight",a=t._listeners=t._listeners||{},f=e.isArray(r[0])?r[0]:[].slice.call(r);return r[0]===n?o:(e.each(f,function(n,r){var i=r.name,s=!a[i],f=s?document.createElement("button"):a[i].elem;a[i]||(a[i]={}),r.callback&&(a[i].callback=r.callback),r.className&&(f.className=r.className),r.focus&&(t._focus&&t._focus.removeClass(u),t._focus=e(f).addClass(u),t.focus()),f.setAttribute("type","button"),f[d+"callback"]=i,f.disabled=!!r.disabled,s&&(f.innerHTML=i,a[i].elem=f,o.appendChild(f))}),s[0].style.display=f.length?"":"none",t._ie6SelectFix(),t)},show:function(){return this.DOM.wrap.show(),!arguments[0]&&this._lockMaskWrap&&this._lockMaskWrap.show(),this},hide:function(){return this.DOM.wrap.hide(),!arguments[0]&&this._lockMaskWrap&&this._lockMaskWrap.hide(),this},close:function(){if(this.closed)return this;var e=this,n=e.DOM,i=n.wrap,s=v.list,o=e.config.close,u=e.config.follow;e.time();if(typeof o=="function"&&o.call(e,t)===!1)return e;e.unlock(),e._elemBack&&e._elemBack(),i[0].className=i[0].style.cssText="",n.title.html(""),n.content.html(""),n.buttons.html(""),v.focus===e&&(v.focus=null),u&&u.removeAttribute(d+"follow"),delete s[e.config.id],e._removeEvent(),e.hide(!0)._setAbsolute();for(var a in e)e.hasOwnProperty(a)&&a!=="DOM"&&delete e[a];return r?i.remove():r=e,e},time:function(e){var t=this,n=t.config.cancelVal,r=t._timer;return r&&clearTimeout(r),e&&(t._timer=setTimeout(function(){t._click(n)},1e3*e)),t},focus:function(){try{if(this.config.focus){var e=this._focus&&this._focus[0]||this.DOM.close[0];e&&e.focus()}}catch(t){}return this},zIndex:function(){var e=this,t=e.DOM,n=t.wrap,r=v.focus,i=v.defaults.zIndex++;return n.css("zIndex",i),e._lockMask&&e._lockMask.css("zIndex",i-1),r&&r.DOM.wrap.removeClass("aui_state_focus"),v.focus=e,n.addClass("aui_state_focus"),e},lock:function(){if(this._lock)return this;var t=this,n=v.defaults.zIndex-1,r=t.DOM.wrap,i=t.config,s=f.width(),o=f.height(),u=t._lockMaskWrap||e(document.body.appendChild(document.createElement("div"))),a=t._lockMask||e(u[0].appendChild(document.createElement("div"))),l="(document).documentElement",c=p?"width:"+s+"px;height:"+o+"px":"width:100%;height:100%",d=h?"position:absolute;left:expression("+l+".scrollLeft);top:expression("+l+".scrollTop);width:expression("+l+".clientWidth);height:expression("+l+".clientHeight)":"";return t.zIndex(),r.addClass("aui_state_lock"),u[0].style.cssText=c+";position:fixed;z-index:"+n+";top:0;left:0;overflow:hidden;"+d,a[0].style.cssText="height:100%;background:"+i.background+";filter:alpha(opacity=0);opacity:0",h&&a.html('<iframe src="about:blank" style="width:100%;height:100%;position:absolute;top:0;left:0;z-index:-1;filter:alpha(opacity=0)"></iframe>'),a.stop(),a.bind("click",function(){t._reset()}).bind("dblclick",function(){t._click(t.config.cancelVal)}),i.duration===0?a.css({opacity:i.opacity}):a.animate({opacity:i.opacity},i.duration),t._lockMaskWrap=u,t._lockMask=a,t._lock=!0,t},unlock:function(){var e=this,t=e._lockMaskWrap,n=e._lockMask;if(!e._lock)return e;var i=t[0].style,s=function(){h&&(i.removeExpression("width"),i.removeExpression("height"),i.removeExpression("left"),i.removeExpression("top")),i.cssText="display:none",r&&t.remove()};return n.stop().unbind(),e.DOM.wrap.removeClass("aui_state_lock"),e.config.duration?n.animate({opacity:0},e.config.duration,s):s(),e._lock=!1,e},_getDOM:function(){var t=document.createElement("div"),n=document.body;t.style.cssText="position:absolute;left:0;top:0",t.innerHTML=v._templates,n.insertBefore(t,n.firstChild);var r,i=0,s={wrap:e(t)},o=t.getElementsByTagName("*"),u=o.length;for(;i<u;i++)r=o[i].className.split("aui_")[1],r&&(s[r]=e(o[i]));return s},_toNumber:function(e,t){if(!e&&e!==0||typeof e=="number")return e;var n=e.length-1;return e.lastIndexOf("px")===n?e=parseInt(e):e.lastIndexOf("%")===n&&(e=parseInt(t*e.split("%")[0]/100)),e},_ie6PngFix:h?function(){var e=0,t,n,r,i,s=v.defaults.path+"/skins/",o=this.DOM.wrap[0].getElementsByTagName("*");for(;e<o.length;e++)t=o[e],n=t.currentStyle.png,n&&(r=s+n,i=t.runtimeStyle,i.backgroundImage="none",i.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+r+"',sizingMethod='crop')")}:e.noop,_ie6SelectFix:h?function(){var e=this.DOM.wrap,t=e[0],n=d+"iframeMask",r=e[n],i=t.offsetWidth,s=t.offsetHeight;i+="px",s+="px",r?(r.style.width=i,r.style.height=s):(r=t.appendChild(document.createElement("iframe")),e[n]=r,r.src="about:blank",r.style.cssText="position:absolute;z-index:-1;left:0;top:0;filter:alpha(opacity=0);width:"+i+";height:"+s)}:e.noop,_runScript:function(e){var t,n=0,r=0,i=e.getElementsByTagName("script"),s=i.length,o=[];for(;n<s;n++)i[n].type==="text/dialog"&&(o[r]=i[n].innerHTML,r++);o.length&&(o=o.join(""),t=new Function(o),t.call(this))},_autoPositionType:function(){this[this.config.fixed?"_setFixed":"_setAbsolute"]()},_setFixed:function(){return h&&e(function(){var t="backgroundAttachment";l.css(t)!=="fixed"&&e("body").css(t)!=="fixed"&&l.css({zoom:1,backgroundImage:"url(about:blank)",backgroundAttachment:"fixed"})}),function(){var e=this.DOM.wrap,t=e[0].style;if(h){var n=parseInt(e.css("left")),r=parseInt(e.css("top")),i=f.scrollLeft(),s=f.scrollTop(),o="(document.documentElement)";this._setAbsolute(),t.setExpression("left","eval("+o+".scrollLeft + "+(n-i)+') + "px"'),t.setExpression("top","eval("+o+".scrollTop + "+(r-s)+') + "px"')}else t.position="fixed"}}(),_setAbsolute:function(){var e=this.DOM.wrap[0].style;h&&(e.removeExpression("left"),e.removeExpression("top")),e.position="absolute"},_click:function(e){var n=this,r=n._listeners[e]&&n._listeners[e].callback;return typeof r!="function"||r.call(n,t)!==!1?n.close():n},_reset:function(e){var t,n=this,r=n._winSize||a.width()*a.height(),i=n._follow,s=n._width,o=n._height,u=n._left,f=n._top;if(e){t=n._winSize=a.width()*a.height();if(r===t)return}(s||o)&&n.size(s,o),i?n.follow(i):(u||f)&&n.position(u,f)},_addEvent:function(){var e,n=this,r=n.config,i="CollectGarbage"in t,s=n.DOM;n._winResize=function(){e&&clearTimeout(e),e=setTimeout(function(){n._reset(i)},40)},a.bind("resize",n._winResize),s.wrap.bind("click",function(e){var t=e.target,i;if(t.disabled)return!1;if(t===s.close[0])return n._click(r.cancelVal),!1;i=t[d+"callback"],i&&n._click(i),n._ie6SelectFix()}).bind("mousedown",function(){n.zIndex()})},_removeEvent:function(){var e=this,t=e.DOM;t.wrap.unbind(),a.unbind("resize",e._winResize)}},v.fn._init.prototype=v.fn,e.fn.dialog=e.fn.artDialog=function(){var e=arguments;return this[this.live?"live":"bind"]("click",function(){return v.apply(this,e),!1}),this},v.focus=null,v.get=function(e){return e===n?v.list:v.list[e]},v.list={},f.bind("keydown",function(e){var t=e.target,n=t.nodeName,r=/^INPUT|TEXTAREA$/,i=v.focus,s=e.keyCode;if(!i||!i.config.esc||r.test(n))return;s===27&&i._click(i.config.cancelVal)}),o=t._artDialog_path||function(e,t,n){for(t in e)e[t].src&&e[t].src.indexOf("artDialog")!==-1&&(n=e[t]);return i=n||e[e.length-1],n=i.src.replace(/\\/g,"/"),n.lastIndexOf("/")<0?".":n.substring(0,n.lastIndexOf("/"))}(document.getElementsByTagName("script")),s=i.src.split("skin=")[1];if(s){var m=document.createElement("link");m.rel="stylesheet",m.href=o+"/skins/"+s+".css?"+v.fn.version,i.parentNode.insertBefore(m,i)}a.bind("load",function(){setTimeout(function(){if(u)return;v({left:"-9999em",time:9,fixed:!1,lock:!1,focus:!1})},150)});try{document.execCommand("BackgroundImageCache",!1,!0)}catch(g){}v._templates='<div class="aui_outer"><table class="aui_border"><tbody><tr><td class="aui_nw"></td><td class="aui_n"></td><td class="aui_ne"></td></tr><tr><td class="aui_w"></td><td class="aui_c"><div class="aui_inner"><table class="aui_dialog"><tbody><tr><td colspan="2" class="aui_header"><div class="aui_titleBar"><div class="aui_title"></div><a class="aui_close" href="javascript:/*artDialog*/;">\u00d7</a></div></td></tr><tr><td class="aui_icon"><div class="aui_iconBg"></div></td><td class="aui_main"><div class="aui_content"></div></td></tr><tr><td colspan="2" class="aui_footer"><div class="aui_buttons"></div></td></tr></tbody></table></div></td><td class="aui_e"></td></tr><tr><td class="aui_sw"></td><td class="aui_s"></td><td class="aui_se"></td></tr></tbody></table></div>',v.defaults={content:'<div class="aui_loading"><span>loading..</span></div>',title:"\u6d88\u606f",button:null,ok:null,cancel:null,init:null,close:null,okVal:"\u786e\u5b9a",cancelVal:"\u53d6\u6d88",width:"auto",height:"auto",minWidth:96,minHeight:32,padding:"20px 25px",skin:"",icon:null,time:null,esc:!0,focus:!0,show:!0,follow:null,path:o,lock:!1,background:"#000",opacity:.7,duration:300,fixed:!1,left:"50%",top:"38.2%",zIndex:1987,resize:!0,drag:!0},t.artDialog=e.dialog=e.artDialog=v})(this.art||this.jQuery&&(this.art=jQuery),this),function(e){var t,n,r=e(window),i=e(document),s=document.documentElement,o=!("minWidth"in s.style),u="onlosecapture"in s,a="setCapture"in s;artDialog.dragEvent=function(){var e=this,t=function(t){var n=e[t];e[t]=function(){return n.apply(e,arguments)}};t("start"),t("move"),t("end")},artDialog.dragEvent.prototype={onstart:e.noop,start:function(e){return i.bind("mousemove",this.move).bind("mouseup",this.end),this._sClientX=e.clientX,this._sClientY=e.clientY,this.onstart(e.clientX,e.clientY),!1},onmove:e.noop,move:function(e){return this._mClientX=e.clientX,this._mClientY=e.clientY,this.onmove(e.clientX-this._sClientX,e.clientY-this._sClientY),!1},onend:e.noop,end:function(e){return i.unbind("mousemove",this.move).unbind("mouseup",this.end),this.onend(e.clientX,e.clientY),!1}},n=function(e){var n,s,f,l,c,h,p=artDialog.focus,d=p.DOM,v=d.wrap,m=d.title,g=d.main,y="getSelection"in window?function(){window.getSelection().removeAllRanges()}:function(){try{document.selection.empty()}catch(e){}};t.onstart=function(e,n){h?(s=g[0].offsetWidth,f=g[0].offsetHeight):(l=v[0].offsetLeft,c=v[0].offsetTop),i.bind("dblclick",t.end),!o&&u?m.bind("losecapture",t.end):r.bind("blur",t.end),a&&m[0].setCapture(),v.addClass("aui_state_drag"),p.focus()},t.onmove=function(e,t){if(h){var r=v[0].style,i=g[0].style,o=e+s,u=t+f;r.width="auto",i.width=Math.max(0,o)+"px",r.width=v[0].offsetWidth+"px",i.height=Math.max(0,u)+"px"}else{var i=v[0].style,a=Math.max(n.minX,Math.min(n.maxX,e+l)),d=Math.max(n.minY,Math.min(n.maxY,t+c));i.left=a+"px",i.top=d+"px"}y(),p._ie6SelectFix()},t.onend=function(e,n){i.unbind("dblclick",t.end),!o&&u?m.unbind("losecapture",t.end):r.unbind("blur",t.end),a&&m[0].releaseCapture(),o&&!p.closed&&p._autoPositionType(),v.removeClass("aui_state_drag")},h=e.target===d.se[0]?!0:!1,n=function(){var e,t,n=p.DOM.wrap[0],s=n.style.position==="fixed",o=n.offsetWidth,u=n.offsetHeight,a=r.width(),f=r.height(),l=s?0:i.scrollLeft(),c=s?0:i.scrollTop(),e=a-o+l;return t=f-u+c,{minX:l,minY:c,maxX:e,maxY:t}}(),t.start(e)},i.bind("mousedown",function(e){var r=artDialog.focus;if(!r)return;var i=e.target,s=r.config,o=r.DOM;if(s.drag!==!1&&i===o.title[0]||s.resize!==!1&&i===o.se[0])return t=t||new artDialog.dragEvent,n(e),!1})}(this.art||this.jQuery&&(this.art=jQuery))
\ No newline at end of file
/*!
* artDialog 4.1.7
* Date: 2013-03-03 08:04
* http://code.google.com/p/artdialog/
* (c) 2009-2012 TangBin, http://www.planeArt.cn
*
* This is licensed under the GNU LGPL, version 2.1 or later.
* For details, see: http://creativecommons.org/licenses/LGPL/2.1/
*/
//------------------------------------------------
// 对话框模块
//------------------------------------------------
;(function ($, window, undefined) {
$.noop = $.noop || function () {}; // jQuery 1.3.2
var _box, _thisScript, _skin, _path,
_count = 0,
_$window = $(window),
_$document = $(document),
_$html = $('html'),
_elem = document.documentElement,
_isIE6 = window.VBArray && !window.XMLHttpRequest,
_isMobile = 'createTouch' in document && !('onmousemove' in _elem)
|| /(iPhone|iPad|iPod)/i.test(navigator.userAgent),
_expando = 'artDialog' + + new Date;
var artDialog = function (config, ok, cancel) {
config = config || {};
if (typeof config === 'string' || config.nodeType === 1) {
config = {content: config, fixed: !_isMobile};
};
var api,
defaults = artDialog.defaults,
elem = config.follow = this.nodeType === 1 && this || config.follow;
// 合并默认配置
for (var i in defaults) {
if (config[i] === undefined) config[i] = defaults[i];
};
// 兼容v4.1.0之前的参数,未来版本将删除此
$.each({ok:"yesFn",cancel:"noFn",close:"closeFn",init:"initFn",okVal:"yesText",cancelVal:"noText"},
function(i,o){config[i]=config[i]!==undefined?config[i]:config[o]});
// 返回跟随模式或重复定义的ID
if (typeof elem === 'string') elem = $(elem)[0];
config.id = elem && elem[_expando + 'follow'] || config.id || _expando + _count;
api = artDialog.list[config.id];
if (elem && api) return api.follow(elem).zIndex().focus();
if (api) return api.zIndex().focus();
// 目前主流移动设备对fixed支持不好
if (_isMobile) config.fixed = false;
// 按钮队列
if (!$.isArray(config.button)) {
config.button = config.button ? [config.button] : [];
};
if (ok !== undefined) config.ok = ok;
if (cancel !== undefined) config.cancel = cancel;
config.ok && config.button.push({
name: config.okVal,
callback: config.ok,
focus: true
});
config.cancel && config.button.push({
name: config.cancelVal,
callback: config.cancel
});
// zIndex全局配置
artDialog.defaults.zIndex = config.zIndex;
_count ++;
return artDialog.list[config.id] = _box ?
_box._init(config) : new artDialog.fn._init(config);
};
artDialog.fn = artDialog.prototype = {
version: '4.1.7',
closed: true,
_init: function (config) {
var that = this, DOM,
icon = config.icon,
iconBg = icon && (_isIE6 ? {png: 'icons/' + icon + '.png'}
: {backgroundImage: 'url(\'' + config.path + '/skins/icons/' + icon + '.png\')'});
that.closed = false;
that.config = config;
that.DOM = DOM = that.DOM || that._getDOM();
DOM.wrap.addClass(config.skin);
DOM.close[config.cancel === false ? 'hide' : 'show']();
DOM.icon[0].style.display = icon ? '' : 'none';
DOM.iconBg.css(iconBg || {background: 'none'});
DOM.se.css('cursor', config.resize ? 'se-resize' : 'auto');
DOM.title.css('cursor', config.drag ? 'move' : 'auto');
DOM.content.css('padding', config.padding);
that[config.show ? 'show' : 'hide'](true)
that.button(config.button)
.title(config.title)
.content(config.content, true)
.size(config.width, config.height)
.time(config.time);
config.follow
? that.follow(config.follow)
: that.position(config.left, config.top);
that.zIndex().focus();
config.lock && that.lock();
that._addEvent();
that._ie6PngFix();
_box = null;
config.init && config.init.call(that, window);
return that;
},
/**
* 设置内容
* @param {String, HTMLElement} 内容 (可选)
* @return {this, HTMLElement} 如果无参数则返回内容容器DOM对象
*/
content: function (msg) {
var prev, next, parent, display,
that = this,
DOM = that.DOM,
wrap = DOM.wrap[0],
width = wrap.offsetWidth,
height = wrap.offsetHeight,
left = parseInt(wrap.style.left),
top = parseInt(wrap.style.top),
cssWidth = wrap.style.width,
$content = DOM.content,
content = $content[0];
that._elemBack && that._elemBack();
wrap.style.width = 'auto';
if (msg === undefined) return content;
if (typeof msg === 'string') {
$content.html(msg);
} else if (msg && msg.nodeType === 1) {
// 让传入的元素在对话框关闭后可以返回到原来的地方
display = msg.style.display;
prev = msg.previousSibling;
next = msg.nextSibling;
parent = msg.parentNode;
that._elemBack = function () {
if (prev && prev.parentNode) {
prev.parentNode.insertBefore(msg, prev.nextSibling);
} else if (next && next.parentNode) {
next.parentNode.insertBefore(msg, next);
} else if (parent) {
parent.appendChild(msg);
};
msg.style.display = display;
that._elemBack = null;
};
$content.html('');
content.appendChild(msg);
msg.style.display = 'block';
};
// 新增内容后调整位置
if (!arguments[1]) {
if (that.config.follow) {
that.follow(that.config.follow);
} else {
width = wrap.offsetWidth - width;
height = wrap.offsetHeight - height;
left = left - width / 2;
top = top - height / 2;
wrap.style.left = Math.max(left, 0) + 'px';
wrap.style.top = Math.max(top, 0) + 'px';
};
if (cssWidth && cssWidth !== 'auto') {
wrap.style.width = wrap.offsetWidth + 'px';
};
that._autoPositionType();
};
that._ie6SelectFix();
that._runScript(content);
return that;
},
/**
* 设置标题
* @param {String, Boolean} 标题内容. 为false则隐藏标题栏
* @return {this, HTMLElement} 如果无参数则返回内容器DOM对象
*/
title: function (text) {
var DOM = this.DOM,
wrap = DOM.wrap,
title = DOM.title,
className = 'aui_state_noTitle';
if (text === undefined) return title[0];
if (text === false) {
title.hide().html('');
wrap.addClass(className);
} else {
title.show().html(text || '');
wrap.removeClass(className);
};
return this;
},
/**
* 位置(相对于可视区域)
* @param {Number, String}
* @param {Number, String}
*/
position: function (left, top) {
var that = this,
config = that.config,
wrap = that.DOM.wrap[0],
isFixed = _isIE6 ? false : config.fixed,
ie6Fixed = _isIE6 && that.config.fixed,
docLeft = _$document.scrollLeft(),
docTop = _$document.scrollTop(),
dl = isFixed ? 0 : docLeft,
dt = isFixed ? 0 : docTop,
ww = _$window.width(),
wh = _$window.height(),
ow = wrap.offsetWidth,
oh = wrap.offsetHeight,
style = wrap.style;
if (left || left === 0) {
that._left = left.toString().indexOf('%') !== -1 ? left : null;
left = that._toNumber(left, ww - ow);
if (typeof left === 'number') {
left = ie6Fixed ? (left += docLeft) : left + dl;
style.left = Math.max(left, dl) + 'px';
} else if (typeof left === 'string') {
style.left = left;
};
};
if (top || top === 0) {
that._top = top.toString().indexOf('%') !== -1 ? top : null;
top = that._toNumber(top, wh - oh);
if (typeof top === 'number') {
top = ie6Fixed ? (top += docTop) : top + dt;
style.top = Math.max(top, dt) + 'px';
} else if (typeof top === 'string') {
style.top = top;
};
};
if (left !== undefined && top !== undefined) {
that._follow = null;
that._autoPositionType();
};
return that;
},
/**
* 尺寸
* @param {Number, String} 宽度
* @param {Number, String} 高度
*/
size: function (width, height) {
var maxWidth, maxHeight, scaleWidth, scaleHeight,
that = this,
config = that.config,
DOM = that.DOM,
wrap = DOM.wrap,
main = DOM.main,
wrapStyle = wrap[0].style,
style = main[0].style;
if (width) {
that._width = width.toString().indexOf('%') !== -1 ? width : null;
maxWidth = _$window.width() - wrap[0].offsetWidth + main[0].offsetWidth;
scaleWidth = that._toNumber(width, maxWidth);
width = scaleWidth;
if (typeof width === 'number') {
wrapStyle.width = 'auto';
style.width = Math.max(that.config.minWidth, width) + 'px';
wrapStyle.width = wrap[0].offsetWidth + 'px'; // 防止未定义宽度的表格遇到浏览器右边边界伸缩
} else if (typeof width === 'string') {
style.width = width;
width === 'auto' && wrap.css('width', 'auto');
};
};
if (height) {
that._height = height.toString().indexOf('%') !== -1 ? height : null;
maxHeight = _$window.height() - wrap[0].offsetHeight + main[0].offsetHeight;
scaleHeight = that._toNumber(height, maxHeight);
height = scaleHeight;
if (typeof height === 'number') {
style.height = Math.max(that.config.minHeight, height) + 'px';
} else if (typeof height === 'string') {
style.height = height;
};
};
that._ie6SelectFix();
return that;
},
/**
* 跟随元素
* @param {HTMLElement, String}
*/
follow: function (elem) {
var $elem, that = this, config = that.config;
if (typeof elem === 'string' || elem && elem.nodeType === 1) {
$elem = $(elem);
elem = $elem[0];
};
// 隐藏元素不可用
if (!elem || !elem.offsetWidth && !elem.offsetHeight) {
return that.position(that._left, that._top);
};
var expando = _expando + 'follow',
winWidth = _$window.width(),
winHeight = _$window.height(),
docLeft = _$document.scrollLeft(),
docTop = _$document.scrollTop(),
offset = $elem.offset(),
width = elem.offsetWidth,
height = elem.offsetHeight,
isFixed = _isIE6 ? false : config.fixed,
left = isFixed ? offset.left - docLeft : offset.left,
top = isFixed ? offset.top - docTop : offset.top,
wrap = that.DOM.wrap[0],
style = wrap.style,
wrapWidth = wrap.offsetWidth,
wrapHeight = wrap.offsetHeight,
setLeft = left - (wrapWidth - width) / 2,
setTop = top + height,
dl = isFixed ? 0 : docLeft,
dt = isFixed ? 0 : docTop;
setLeft = setLeft < dl ? left :
(setLeft + wrapWidth > winWidth) && (left - wrapWidth > dl)
? left - wrapWidth + width
: setLeft;
setTop = (setTop + wrapHeight > winHeight + dt)
&& (top - wrapHeight > dt)
? top - wrapHeight
: setTop;
style.left = setLeft + 'px';
style.top = setTop + 'px';
that._follow && that._follow.removeAttribute(expando);
that._follow = elem;
elem[expando] = config.id;
that._autoPositionType();
return that;
},
/**
* 自定义按钮
* @example
button({
name: 'login',
callback: function () {},
disabled: false,
focus: true
}, .., ..)
*/
button: function () {
var that = this,
ags = arguments,
DOM = that.DOM,
buttons = DOM.buttons,
elem = buttons[0],
strongButton = 'aui_state_highlight',
listeners = that._listeners = that._listeners || {},
list = $.isArray(ags[0]) ? ags[0] : [].slice.call(ags);
if (ags[0] === undefined) return elem;
$.each(list, function (i, val) {
var name = val.name,
isNewButton = !listeners[name],
button = !isNewButton ?
listeners[name].elem :
document.createElement('button');
if (!listeners[name]) listeners[name] = {};
if (val.callback) listeners[name].callback = val.callback;
if (val.className) button.className = val.className;
if (val.focus) {
that._focus && that._focus.removeClass(strongButton);
that._focus = $(button).addClass(strongButton);
that.focus();
};
// Internet Explorer 的默认类型是 "button",
// 而其他浏览器中(包括 W3C 规范)的默认值是 "submit"
// @see http://www.w3school.com.cn/tags/att_button_type.asp
button.setAttribute('type', 'button');
button[_expando + 'callback'] = name;
button.disabled = !!val.disabled;
if (isNewButton) {
button.innerHTML = name;
listeners[name].elem = button;
elem.appendChild(button);
};
});
buttons[0].style.display = list.length ? '' : 'none';
that._ie6SelectFix();
return that;
},
/** 显示对话框 */
show: function () {
this.DOM.wrap.show();
!arguments[0] && this._lockMaskWrap && this._lockMaskWrap.show();
return this;
},
/** 隐藏对话框 */
hide: function () {
this.DOM.wrap.hide();
!arguments[0] && this._lockMaskWrap && this._lockMaskWrap.hide();
return this;
},
/** 关闭对话框 */
close: function () {
if (this.closed) return this;
var that = this,
DOM = that.DOM,
wrap = DOM.wrap,
list = artDialog.list,
fn = that.config.close,
follow = that.config.follow;
that.time();
if (typeof fn === 'function' && fn.call(that, window) === false) {
return that;
};
that.unlock();
// 置空内容
that._elemBack && that._elemBack();
wrap[0].className = wrap[0].style.cssText = '';
DOM.title.html('');
DOM.content.html('');
DOM.buttons.html('');
if (artDialog.focus === that) artDialog.focus = null;
if (follow) follow.removeAttribute(_expando + 'follow');
delete list[that.config.id];
that._removeEvent();
that.hide(true)._setAbsolute();
// 清空除this.DOM之外临时对象,恢复到初始状态,以便使用单例模式
for (var i in that) {
if (that.hasOwnProperty(i) && i !== 'DOM') delete that[i];
};
// 移除HTMLElement或重用
_box ? wrap.remove() : _box = that;
return that;
},
/**
* 定时关闭
* @param {Number} 单位为秒, 无参数则停止计时器
*/
time: function (second) {
var that = this,
cancel = that.config.cancelVal,
timer = that._timer;
timer && clearTimeout(timer);
if (second) {
that._timer = setTimeout(function(){
that._click(cancel);
}, 1000 * second);
};
return that;
},
/** 设置焦点 */
focus: function () {
try {
if (this.config.focus) {
var elem = this._focus && this._focus[0] || this.DOM.close[0];
elem && elem.focus();
}
} catch (e) {}; // IE对不可见元素设置焦点会报错
return this;
},
/** 置顶对话框 */
zIndex: function () {
var that = this,
DOM = that.DOM,
wrap = DOM.wrap,
top = artDialog.focus,
index = artDialog.defaults.zIndex ++;
// 设置叠加高度
wrap.css('zIndex', index);
that._lockMask && that._lockMask.css('zIndex', index - 1);
// 设置最高层的样式
top && top.DOM.wrap.removeClass('aui_state_focus');
artDialog.focus = that;
wrap.addClass('aui_state_focus');
return that;
},
/** 设置屏锁 */
lock: function () {
if (this._lock) return this;
var that = this,
index = artDialog.defaults.zIndex - 1,
wrap = that.DOM.wrap,
config = that.config,
docWidth = _$document.width(),
docHeight = _$document.height(),
lockMaskWrap = that._lockMaskWrap || $(document.body.appendChild(document.createElement('div'))),
lockMask = that._lockMask || $(lockMaskWrap[0].appendChild(document.createElement('div'))),
domTxt = '(document).documentElement',
sizeCss = _isMobile ? 'width:' + docWidth + 'px;height:' + docHeight
+ 'px' : 'width:100%;height:100%',
ie6Css = _isIE6 ?
'position:absolute;left:expression(' + domTxt + '.scrollLeft);top:expression('
+ domTxt + '.scrollTop);width:expression(' + domTxt
+ '.clientWidth);height:expression(' + domTxt + '.clientHeight)'
: '';
that.zIndex();
wrap.addClass('aui_state_lock');
lockMaskWrap[0].style.cssText = sizeCss + ';position:fixed;z-index:'
+ index + ';top:0;left:0;overflow:hidden;' + ie6Css;
lockMask[0].style.cssText = 'height:100%;background:' + config.background
+ ';filter:alpha(opacity=0);opacity:0';
// 让IE6锁屏遮罩能够盖住下拉控件
if (_isIE6) lockMask.html(
'<iframe src="about:blank" style="width:100%;height:100%;position:absolute;' +
'top:0;left:0;z-index:-1;filter:alpha(opacity=0)"></iframe>');
lockMask.stop();
lockMask.bind('click', function () {
that._reset();
}).bind('dblclick', function () {
that._click(that.config.cancelVal);
});
if (config.duration === 0) {
lockMask.css({opacity: config.opacity});
} else {
lockMask.animate({opacity: config.opacity}, config.duration);
};
that._lockMaskWrap = lockMaskWrap;
that._lockMask = lockMask;
that._lock = true;
return that;
},
/** 解开屏锁 */
unlock: function () {
var that = this,
lockMaskWrap = that._lockMaskWrap,
lockMask = that._lockMask;
if (!that._lock) return that;
var style = lockMaskWrap[0].style;
var un = function () {
if (_isIE6) {
style.removeExpression('width');
style.removeExpression('height');
style.removeExpression('left');
style.removeExpression('top');
};
style.cssText = 'display:none';
_box && lockMaskWrap.remove();
};
lockMask.stop().unbind();
that.DOM.wrap.removeClass('aui_state_lock');
if (!that.config.duration) {// 取消动画,快速关闭
un();
} else {
lockMask.animate({opacity: 0}, that.config.duration, un);
};
that._lock = false;
return that;
},
// 获取元素
_getDOM: function () {
var wrap = document.createElement('div'),
body = document.body;
wrap.style.cssText = 'position:absolute;left:0;top:0';
wrap.innerHTML = artDialog._templates;
body.insertBefore(wrap, body.firstChild);
var name, i = 0,
DOM = {wrap: $(wrap)},
els = wrap.getElementsByTagName('*'),
elsLen = els.length;
for (; i < elsLen; i ++) {
name = els[i].className.split('aui_')[1];
if (name) DOM[name] = $(els[i]);
};
return DOM;
},
// px与%单位转换成数值 (百分比单位按照最大值换算)
// 其他的单位返回原值
_toNumber: function (thisValue, maxValue) {
if (!thisValue && thisValue !== 0 || typeof thisValue === 'number') {
return thisValue;
};
var last = thisValue.length - 1;
if (thisValue.lastIndexOf('px') === last) {
thisValue = parseInt(thisValue);
} else if (thisValue.lastIndexOf('%') === last) {
thisValue = parseInt(maxValue * thisValue.split('%')[0] / 100);
};
return thisValue;
},
// 让IE6 CSS支持PNG背景
_ie6PngFix: _isIE6 ? function () {
var i = 0, elem, png, pngPath, runtimeStyle,
path = artDialog.defaults.path + '/skins/',
list = this.DOM.wrap[0].getElementsByTagName('*');
for (; i < list.length; i ++) {
elem = list[i];
png = elem.currentStyle['png'];
if (png) {
pngPath = path + png;
runtimeStyle = elem.runtimeStyle;
runtimeStyle.backgroundImage = 'none';
runtimeStyle.filter = "progid:DXImageTransform.Microsoft." +
"AlphaImageLoader(src='" + pngPath + "',sizingMethod='crop')";
};
};
} : $.noop,
// 强制覆盖IE6下拉控件
_ie6SelectFix: _isIE6 ? function () {
var $wrap = this.DOM.wrap,
wrap = $wrap[0],
expando = _expando + 'iframeMask',
iframe = $wrap[expando],
width = wrap.offsetWidth,
height = wrap.offsetHeight;
width = width + 'px';
height = height + 'px';
if (iframe) {
iframe.style.width = width;
iframe.style.height = height;
} else {
iframe = wrap.appendChild(document.createElement('iframe'));
$wrap[expando] = iframe;
iframe.src = 'about:blank';
iframe.style.cssText = 'position:absolute;z-index:-1;left:0;top:0;'
+ 'filter:alpha(opacity=0);width:' + width + ';height:' + height;
};
} : $.noop,
// 解析HTML片段中自定义类型脚本,其this指向artDialog内部
// <script type="text/dialog">/* [code] */</script>
_runScript: function (elem) {
var fun, i = 0, n = 0,
tags = elem.getElementsByTagName('script'),
length = tags.length,
script = [];
for (; i < length; i ++) {
if (tags[i].type === 'text/dialog') {
script[n] = tags[i].innerHTML;
n ++;
};
};
if (script.length) {
script = script.join('');
fun = new Function(script);
fun.call(this);
};
},
// 自动切换定位类型
_autoPositionType: function () {
this[this.config.fixed ? '_setFixed' : '_setAbsolute']();/////////////
},
// 设置静止定位
// IE6 Fixed @see: http://www.planeart.cn/?p=877
_setFixed: (function () {
_isIE6 && $(function () {
var bg = 'backgroundAttachment';
if (_$html.css(bg) !== 'fixed' && $('body').css(bg) !== 'fixed') {
_$html.css({
zoom: 1,// 避免偶尔出现body背景图片异常的情况
backgroundImage: 'url(about:blank)',
backgroundAttachment: 'fixed'
});
};
});
return function () {
var $elem = this.DOM.wrap,
style = $elem[0].style;
if (_isIE6) {
var left = parseInt($elem.css('left')),
top = parseInt($elem.css('top')),
sLeft = _$document.scrollLeft(),
sTop = _$document.scrollTop(),
txt = '(document.documentElement)';
this._setAbsolute();
style.setExpression('left', 'eval(' + txt + '.scrollLeft + '
+ (left - sLeft) + ') + "px"');
style.setExpression('top', 'eval(' + txt + '.scrollTop + '
+ (top - sTop) + ') + "px"');
} else {
style.position = 'fixed';
};
};
}()),
// 设置绝对定位
_setAbsolute: function () {
var style = this.DOM.wrap[0].style;
if (_isIE6) {
style.removeExpression('left');
style.removeExpression('top');
};
style.position = 'absolute';
},
// 按钮回调函数触发
_click: function (name) {
var that = this,
fn = that._listeners[name] && that._listeners[name].callback;
return typeof fn !== 'function' || fn.call(that, window) !== false ?
that.close() : that;
},
// 重置位置与尺寸
_reset: function (test) {
var newSize,
that = this,
oldSize = that._winSize || _$window.width() * _$window.height(),
elem = that._follow,
width = that._width,
height = that._height,
left = that._left,
top = that._top;
if (test) {
// IE6~7 window.onresize bug
newSize = that._winSize = _$window.width() * _$window.height();
if (oldSize === newSize) return;
};
if (width || height) that.size(width, height);
if (elem) {
that.follow(elem);
} else if (left || top) {
that.position(left, top);
};
},
// 事件代理
_addEvent: function () {
var resizeTimer,
that = this,
config = that.config,
isIE = 'CollectGarbage' in window,
DOM = that.DOM;
// 窗口调节事件
that._winResize = function () {
resizeTimer && clearTimeout(resizeTimer);
resizeTimer = setTimeout(function () {
that._reset(isIE);
}, 40);
};
_$window.bind('resize', that._winResize);
// 监听点击
DOM.wrap
.bind('click', function (event) {
var target = event.target, callbackID;
if (target.disabled) return false; // IE BUG
if (target === DOM.close[0]) {
that._click(config.cancelVal);
return false;
} else {
callbackID = target[_expando + 'callback'];
callbackID && that._click(callbackID);
};
that._ie6SelectFix();
})
.bind('mousedown', function () {
that.zIndex();
});
},
// 卸载事件代理
_removeEvent: function () {
var that = this,
DOM = that.DOM;
DOM.wrap.unbind();
_$window.unbind('resize', that._winResize);
}
};
artDialog.fn._init.prototype = artDialog.fn;
$.fn.dialog = $.fn.artDialog = function () {
var config = arguments;
this[this.live ? 'live' : 'bind']('click', function () {
artDialog.apply(this, config);
return false;
});
return this;
};
/** 最顶层的对话框API */
artDialog.focus = null;
/** 获取某对话框API */
artDialog.get = function (id) {
return id === undefined
? artDialog.list
: artDialog.list[id];
};
artDialog.list = {};
// 全局快捷键
_$document.bind('keydown', function (event) {
var target = event.target,
nodeName = target.nodeName,
rinput = /^INPUT|TEXTAREA$/,
api = artDialog.focus,
keyCode = event.keyCode;
if (!api || !api.config.esc || rinput.test(nodeName)) return;
keyCode === 27 && api._click(api.config.cancelVal);
});
// 获取artDialog路径
_path = window['_artDialog_path'] || (function (script, i, me) {
for (i in script) {
// 如果通过第三方脚本加载器加载本文件,请保证文件名含有"artDialog"字符
if (script[i].src && script[i].src.indexOf('artDialog') !== -1) me = script[i];
};
_thisScript = me || script[script.length - 1];
me = _thisScript.src.replace(/\\/g, '/');
return me.lastIndexOf('/') < 0 ? '.' : me.substring(0, me.lastIndexOf('/'));
}(document.getElementsByTagName('script')));
// 无阻塞载入CSS (如"artDialog.js?skin=aero")
_skin = _thisScript.src.split('skin=')[1];
if (_skin) {
var link = document.createElement('link');
link.rel = 'stylesheet';
link.href = _path + '/skins/' + _skin + '.css?' + artDialog.fn.version;
_thisScript.parentNode.insertBefore(link, _thisScript);
};
// 触发浏览器预先缓存背景图片
_$window.bind('load', function () {
setTimeout(function () {
if (_count) return;
artDialog({left: '-9999em',time: 9,fixed: false,lock: false,focus: false});
}, 150);
});
// 开启IE6 CSS背景图片缓存
try {
document.execCommand('BackgroundImageCache', false, true);
} catch (e) {};
// 使用uglifyjs压缩能够预先处理"+"号合并字符串
// uglifyjs: http://marijnhaverbeke.nl/uglifyjs
artDialog._templates =
'<div class="aui_outer">'
+ '<table class="aui_border">'
+ '<tbody>'
+ '<tr>'
+ '<td class="aui_nw"></td>'
+ '<td class="aui_n"></td>'
+ '<td class="aui_ne"></td>'
+ '</tr>'
+ '<tr>'
+ '<td class="aui_w"></td>'
+ '<td class="aui_c">'
+ '<div class="aui_inner">'
+ '<table class="aui_dialog">'
+ '<tbody>'
+ '<tr>'
+ '<td colspan="2" class="aui_header">'
+ '<div class="aui_titleBar">'
+ '<div class="aui_title"></div>'
+ '<a class="aui_close" href="javascript:/*artDialog*/;">'
+ '\xd7'
+ '</a>'
+ '</div>'
+ '</td>'
+ '</tr>'
+ '<tr>'
+ '<td class="aui_icon">'
+ '<div class="aui_iconBg"></div>'
+ '</td>'
+ '<td class="aui_main">'
+ '<div class="aui_content"></div>'
+ '</td>'
+ '</tr>'
+ '<tr>'
+ '<td colspan="2" class="aui_footer">'
+ '<div class="aui_buttons"></div>'
+ '</td>'
+ '</tr>'
+ '</tbody>'
+ '</table>'
+ '</div>'
+ '</td>'
+ '<td class="aui_e"></td>'
+ '</tr>'
+ '<tr>'
+ '<td class="aui_sw"></td>'
+ '<td class="aui_s"></td>'
+ '<td class="aui_se"></td>'
+ '</tr>'
+ '</tbody>'
+ '</table>'
+'</div>';
/**
* 默认配置
*/
artDialog.defaults = {
// 消息内容
content: '<div class="aui_loading"><span>loading..</span></div>',
title: '\u6d88\u606f', // 标题. 默认'消息'
button: null, // 自定义按钮
ok: null, // 确定按钮回调函数
cancel: null, // 取消按钮回调函数
init: null, // 对话框初始化后执行的函数
close: null, // 对话框关闭前执行的函数
okVal: '\u786E\u5B9A', // 确定按钮文本. 默认'确定'
cancelVal: '\u53D6\u6D88', // 取消按钮文本. 默认'取消'
width: 'auto', // 内容宽度
height: 'auto', // 内容高度
minWidth: 96, // 最小宽度限制
minHeight: 32, // 最小高度限制
padding: '20px 25px', // 内容与边界填充距离
skin: '', // 皮肤名(预留接口,尚未实现)
icon: null, // 消息图标名称
time: null, // 自动关闭时间
esc: true, // 是否支持Esc键关闭
focus: true, // 是否支持对话框按钮自动聚焦
show: true, // 初始化后是否显示对话框
follow: null, // 跟随某元素(即让对话框在元素附近弹出)
path: _path, // artDialog路径
lock: false, // 是否锁屏
background: '#000', // 遮罩颜色
opacity: .7, // 遮罩透明度
duration: 300, // 遮罩透明度渐变动画速度
fixed: false, // 是否静止定位
left: '50%', // X轴坐标
top: '38.2%', // Y轴坐标
zIndex: 1987, // 对话框叠加高度值(重要:此值不能超过浏览器最大限制)
resize: true, // 是否允许用户调节尺寸
drag: true // 是否允许用户拖动位置
};
window.artDialog = $.dialog = $.artDialog = artDialog;
}(this.art || this.jQuery && (this.art = jQuery), this));
//------------------------------------------------
// 对话框模块-拖拽支持(可选外置模块)
//------------------------------------------------
;(function ($) {
var _dragEvent, _use,
_$window = $(window),
_$document = $(document),
_elem = document.documentElement,
_isIE6 = !('minWidth' in _elem.style),
_isLosecapture = 'onlosecapture' in _elem,
_isSetCapture = 'setCapture' in _elem;
// 拖拽事件
artDialog.dragEvent = function () {
var that = this,
proxy = function (name) {
var fn = that[name];
that[name] = function () {
return fn.apply(that, arguments);
};
};
proxy('start');
proxy('move');
proxy('end');
};
artDialog.dragEvent.prototype = {
// 开始拖拽
onstart: $.noop,
start: function (event) {
_$document
.bind('mousemove', this.move)
.bind('mouseup', this.end);
this._sClientX = event.clientX;
this._sClientY = event.clientY;
this.onstart(event.clientX, event.clientY);
return false;
},
// 正在拖拽
onmove: $.noop,
move: function (event) {
this._mClientX = event.clientX;
this._mClientY = event.clientY;
this.onmove(
event.clientX - this._sClientX,
event.clientY - this._sClientY
);
return false;
},
// 结束拖拽
onend: $.noop,
end: function (event) {
_$document
.unbind('mousemove', this.move)
.unbind('mouseup', this.end);
this.onend(event.clientX, event.clientY);
return false;
}
};
_use = function (event) {
var limit, startWidth, startHeight, startLeft, startTop, isResize,
api = artDialog.focus,
//config = api.config,
DOM = api.DOM,
wrap = DOM.wrap,
title = DOM.title,
main = DOM.main;
// 清除文本选择
var clsSelect = 'getSelection' in window ? function () {
window.getSelection().removeAllRanges();
} : function () {
try {
document.selection.empty();
} catch (e) {};
};
// 对话框准备拖动
_dragEvent.onstart = function (x, y) {
if (isResize) {
startWidth = main[0].offsetWidth;
startHeight = main[0].offsetHeight;
} else {
startLeft = wrap[0].offsetLeft;
startTop = wrap[0].offsetTop;
};
_$document.bind('dblclick', _dragEvent.end);
!_isIE6 && _isLosecapture ?
title.bind('losecapture', _dragEvent.end) :
_$window.bind('blur', _dragEvent.end);
_isSetCapture && title[0].setCapture();
wrap.addClass('aui_state_drag');
api.focus();
};
// 对话框拖动进行中
_dragEvent.onmove = function (x, y) {
if (isResize) {
var wrapStyle = wrap[0].style,
style = main[0].style,
width = x + startWidth,
height = y + startHeight;
wrapStyle.width = 'auto';
style.width = Math.max(0, width) + 'px';
wrapStyle.width = wrap[0].offsetWidth + 'px';
style.height = Math.max(0, height) + 'px';
} else {
var style = wrap[0].style,
left = Math.max(limit.minX, Math.min(limit.maxX, x + startLeft)),
top = Math.max(limit.minY, Math.min(limit.maxY, y + startTop));
style.left = left + 'px';
style.top = top + 'px';
};
clsSelect();
api._ie6SelectFix();
};
// 对话框拖动结束
_dragEvent.onend = function (x, y) {
_$document.unbind('dblclick', _dragEvent.end);
!_isIE6 && _isLosecapture ?
title.unbind('losecapture', _dragEvent.end) :
_$window.unbind('blur', _dragEvent.end);
_isSetCapture && title[0].releaseCapture();
_isIE6 && !api.closed && api._autoPositionType();
wrap.removeClass('aui_state_drag');
};
isResize = event.target === DOM.se[0] ? true : false;
limit = (function () {
var maxX, maxY,
wrap = api.DOM.wrap[0],
fixed = wrap.style.position === 'fixed',
ow = wrap.offsetWidth,
oh = wrap.offsetHeight,
ww = _$window.width(),
wh = _$window.height(),
dl = fixed ? 0 : _$document.scrollLeft(),
dt = fixed ? 0 : _$document.scrollTop(),
// 坐标最大值限制
maxX = ww - ow + dl;
maxY = wh - oh + dt;
return {
minX: dl,
minY: dt,
maxX: maxX,
maxY: maxY
};
})();
_dragEvent.start(event);
};
// 代理 mousedown 事件触发对话框拖动
_$document.bind('mousedown', function (event) {
var api = artDialog.focus;
if (!api) return;
var target = event.target,
config = api.config,
DOM = api.DOM;
if (config.drag !== false && target === DOM.title[0]
|| config.resize !== false && target === DOM.se[0]) {
_dragEvent = _dragEvent || new artDialog.dragEvent();
_use(event);
return false;// 防止firefox与chrome滚屏
};
});
})(this.art || this.jQuery && (this.art = jQuery));
/*!
* artDialog iframeTools
* Date: 2011-12-08 1:32
* http://code.google.com/p/artdialog/
* (c) 2009-2011 TangBin, http://www.planeArt.cn
*
* This is licensed under the GNU LGPL, version 2.1 or later.
* For details, see: http://creativecommons.org/licenses/LGPL/2.1/
*/
eval(function(B,D,A,G,E,F){function C(A){return A<62?String.fromCharCode(A+=A<26?65:A<52?71:-4):A<63?'_':A<64?'$':C(A>>6)+C(A&63)}while(A>0)E[C(G--)]=D[--A];return B.replace(/[\w\$]+/g,function(A){return E[A]==F[A]?A:E[A]})}('(6(E,C,D,A){c B,X,W,J="@_.DATA",K="@_.OPEN",H="@_.OPENER",I=C.k=C.k||"@_.WINNAME"+(Bd Bo).Be(),F=C.VBArray&&!C.XMLHttpRequest;E(6(){!C.Bu&&7.BY==="B0"&&Br("9 Error: 7.BY === \\"B0\\"")});c G=D.d=6(){c W=C,X=6(A){f{c W=C[A].7;W.BE}u(X){v!V}v C[A].9&&W.BE("frameset").length===U};v X("d")?W=C.d:X("BB")&&(W=C.BB),W}();D.BB=G,B=G.9,W=6(){v B.BW.w},D.m=6(C,B){c W=D.d,X=W[J]||{};W[J]=X;b(B!==A)X[C]=B;else v X[C];v X},D.BQ=6(W){c X=D.d[J];X&&X[W]&&1 X[W]},D.through=X=6(){c X=B.BR(i,BJ);v G!==C&&(D.B4[X.0.Z]=X),X},G!==C&&E(C).BN("unload",6(){c A=D.B4,W;BO(c X BS A)A[X]&&(W=A[X].0,W&&(W.duration=U),A[X].s(),1 A[X])}),D.p=6(B,O,BZ){O=O||{};c N,L,M,Bc,T,S,R,Q,BF,P=D.d,Ba="8:BD;n:-Bb;d:-Bb;Bp:o U;Bf:transparent",BI="r:g%;x:g%;Bp:o U";b(BZ===!V){c BH=(Bd Bo).Be(),BG=B.replace(/([?&])W=[^&]*/,"$1_="+BH);B=BG+(BG===B?(/\\?/.test(B)?"&":"?")+"W="+BH:"")}c G=6(){c B,C,W=L.2.B2(".aui_loading"),A=N.0;M.addClass("Bi"),W&&W.hide();f{Q=T.$,R=E(Q.7),BF=Q.7.Bg}u(X){T.q.5=BI,A.z?N.z(A.z):N.8(A.n,A.d),O.j&&O.j.l(N,Q,P),O.j=By;v}B=A.r==="Bt"?R.r()+(F?U:parseInt(E(BF).Bv("marginLeft"))):A.r,C=A.x==="Bt"?R.x():A.x,setTimeout(6(){T.q.5=BI},U),N.Bk(B,C),A.z?N.z(A.z):N.8(A.n,A.d),O.j&&O.j.l(N,Q,P),O.j=By},I={w:W(),j:6(){N=i,L=N.h,Bc=L.BM,M=L.2,T=N.BK=P.7.Bn("BK"),T.Bx=B,T.k="Open"+N.0.Z,T.q.5=Ba,T.BX("frameborder",U,U),T.BX("allowTransparency",!U),S=E(T),N.2().B3(T),Q=T.$;f{Q.k=T.k,D.m(T.k+K,N),D.m(T.k+H,C)}u(X){}S.BN("BC",G)},s:6(){S.Bv("4","o").unbind("BC",G);b(O.s&&O.s.l(i,T.$,P)===!V)v!V;M.removeClass("Bi"),S[U].Bx="about:blank",S.remove();f{D.BQ(T.k+K),D.BQ(T.k+H)}u(X){}}};Bq O.Y=="6"&&(I.Y=6(){v O.Y.l(N,T.$,P)}),Bq O.y=="6"&&(I.y=6(){v O.y.l(N,T.$,P)}),1 O.2;BO(c J BS O)I[J]===A&&(I[J]=O[J]);v X(I)},D.p.Bw=D.m(I+K),D.BT=D.m(I+H)||C,D.p.origin=D.BT,D.s=6(){c X=D.m(I+K);v X&&X.s(),!V},G!=C&&E(7).BN("mousedown",6(){c X=D.p.Bw;X&&X.w()}),D.BC=6(C,D,B){B=B||!V;c G=D||{},H={w:W(),j:6(A){c W=i,X=W.0;E.ajax({url:C,success:6(X){W.2(X),G.j&&G.j.l(W,A)},cache:B})}};1 D.2;BO(c F BS G)H[F]===A&&(H[F]=G[F]);v X(H)},D.Br=6(B,A){v X({Z:"Alert",w:W(),BL:"warning",t:!U,BA:!U,2:B,Y:!U,s:A})},D.confirm=6(C,A,B){v X({Z:"Confirm",w:W(),BL:"Bm",t:!U,BA:!U,3:U.V,2:C,Y:6(X){v A.l(i,X)},y:6(X){v B&&B.l(i,X)}})},D.prompt=6(D,B,C){C=C||"";c A;v X({Z:"Prompt",w:W(),BL:"Bm",t:!U,BA:!U,3:U.V,2:["<e q=\\"margin-bottom:5px;font-Bk:12px\\">",D,"</e>","<e>","<Bl B1=\\"",C,"\\" q=\\"r:18em;Bh:6px 4px\\" />","</e>"].join(""),j:6(){A=i.h.2.B2("Bl")[U],A.select(),A.BP()},Y:6(X){v B&&B.l(i,A.B1,X)},y:!U})},D.tips=6(B,A){v X({Z:"Tips",w:W(),title:!V,y:!V,t:!U,BA:!V}).2("<e q=\\"Bh: U 1em;\\">"+B+"</e>").time(A||V.B6)},E(6(){c A=D.dragEvent;b(!A)v;c B=E(C),X=E(7),W=F?"BD":"t",H=A.prototype,I=7.Bn("e"),G=I.q;G.5="4:o;8:"+W+";n:U;d:U;r:g%;x:g%;"+"cursor:move;filter:alpha(3=U);3:U;Bf:#FFF",7.Bg.B3(I),H.Bj=H.Bs,H.BV=H.Bz,H.Bs=6(){c E=D.BP.h,C=E.BM[U],A=E.2[U].BE("BK")[U];H.Bj.BR(i,BJ),G.4="block",G.w=D.BW.w+B5,W==="BD"&&(G.r=B.r()+"a",G.x=B.x()+"a",G.n=X.scrollLeft()+"a",G.d=X.scrollTop()+"a"),A&&C.offsetWidth*C.offsetHeight>307200&&(C.q.BU="hidden")},H.Bz=6(){c X=D.BP;H.BV.BR(i,BJ),G.4="o",X&&(X.h.BM[U].q.BU="visible")}})})(i.art||i.Bu,i,i.9)','P|R|T|U|V|W|0|1|_|$|ok|id|px|if|var|top|div|try|100|DOM|this|init|name|call|data|left|none|open|style|width|close|fixed|catch|return|zIndex|height|cancel|follow|config|delete|content|opacity|display|cssText|function|document|position|artDialog|ARTDIALOG|contentWindow|lock|parent|load|absolute|getElementsByTagName|S|Y|Z|a|arguments|iframe|icon|main|bind|for|focus|removeData|apply|in|opener|visibility|_end|defaults|setAttribute|compatMode|O|Q|9999em|X|new|getTime|background|body|padding|aui_state_full|_start|size|input|question|createElement|Date|border|typeof|alert|start|auto|jQuery|css|api|src|null|end|BackCompat|value|find|appendChild|list|3|5'.split('|'),109,122,{},{}))
\ No newline at end of file
/*!
* artDialog iframeTools
* Date: 2011-11-25 13:54
* http://code.google.com/p/artdialog/
* (c) 2009-2011 TangBin, http://www.planeArt.cn
*
* This is licensed under the GNU LGPL, version 2.1 or later.
* For details, see: http://creativecommons.org/licenses/LGPL/2.1/
*/
;(function ($, window, artDialog, undefined) {
var _topDialog, _proxyDialog, _zIndex,
_data = '@ARTDIALOG.DATA',
_open = '@ARTDIALOG.OPEN',
_opener = '@ARTDIALOG.OPENER',
_winName = window.name = window.name
|| '@ARTDIALOG.WINNAME' + + new Date,
_isIE6 = window.VBArray && !window.XMLHttpRequest;
$(function () {
!window.jQuery && document.compatMode === 'BackCompat'
// 不支持怪异模式,请用主流的XHTML1.0或者HTML5的DOCTYPE申明
&& alert('artDialog Error: document.compatMode === "BackCompat"');
});
/** 获取 artDialog 可跨级调用的最高层的 window 对象 */
var _top = artDialog.top = function () {
var top = window,
test = function (name) {
try {
var doc = window[name].document; // 跨域|无权限
doc.getElementsByTagName; // chrome 本地安全限制
} catch (e) {
return false;
};
return window[name].artDialog
// 框架集无法显示第三方元素
&& doc.getElementsByTagName('frameset').length === 0;
};
if (test('top')) {
top = window.top;
} else if (test('parent')) {
top = window.parent;
};
return top;
}();
artDialog.parent = _top; // 兼容v4.1之前版本,未来版本将删除此
_topDialog = _top.artDialog;
// 获取顶层页面对话框叠加值
_zIndex = function () {
return _topDialog.defaults.zIndex;
};
/**
* 跨框架数据共享接口
* @see http://www.planeart.cn/?p=1554
* @param {String} 存储的数据名
* @param {Any} 将要存储的任意数据(无此项则返回被查询的数据)
*/
artDialog.data = function (name, value) {
var top = artDialog.top,
cache = top[_data] || {};
top[_data] = cache;
if (value !== undefined) {
cache[name] = value;
} else {
return cache[name];
};
return cache;
};
/**
* 数据共享删除接口
* @param {String} 删除的数据名
*/
artDialog.removeData = function (name) {
var cache = artDialog.top[_data];
if (cache && cache[name]) delete cache[name];
};
/** 跨框架普通对话框 */
artDialog.through = _proxyDialog = function () {
var api = _topDialog.apply(this, arguments);
// 缓存从当前 window(可能为iframe)调出所有跨框架对话框,
// 以便让当前 window 卸载前去关闭这些对话框。
// 因为iframe注销后也会从内存中删除其创建的对象,这样可以防止回调函数报错
if (_top !== window) artDialog.list[api.config.id] = api;
return api;
};
// 框架页面卸载前关闭所有穿越的对话框
_top !== window && $(window).bind('unload', function () {
var list = artDialog.list, config;
for (var i in list) {
if (list[i]) {
config = list[i].config;
if (config) config.duration = 0; // 取消动画
list[i].close();
//delete list[i];
};
};
});
/**
* 弹窗 (iframe)
* @param {String} 地址
* @param {Object} 配置参数. 这里传入的回调函数接收的第1个参数为iframe内部window对象
* @param {Boolean} 是否允许缓存. 默认true
*/
artDialog.open = function (url, options, cache) {
options = options || {};
var api, DOM,
$content, $main, iframe, $iframe, $idoc, iwin, ibody,
top = artDialog.top,
initCss = 'position:absolute;left:-9999em;top:-9999em;border:none 0;background:transparent',
loadCss = 'width:100%;height:100%;border:none 0';
if (cache === false) {
var ts = + new Date,
ret = url.replace(/([?&])_=[^&]*/, "$1_=" + ts );
url = ret + ((ret === url) ? (/\?/.test(url) ? "&" : "?") + "_=" + ts : "");
};
var load = function () {
var iWidth, iHeight,
loading = DOM.content.find('.aui_loading'),
aConfig = api.config;
$content.addClass('aui_state_full');
loading && loading.hide();
try {
iwin = iframe.contentWindow;
$idoc = $(iwin.document);
ibody = iwin.document.body;
} catch (e) {// 跨域
iframe.style.cssText = loadCss;
aConfig.follow
? api.follow(aConfig.follow)
: api.position(aConfig.left, aConfig.top);
options.init && options.init.call(api, iwin, top);
options.init = null;
return;
};
// 获取iframe内部尺寸
iWidth = aConfig.width === 'auto'
? $idoc.width() + (_isIE6 ? 0 : parseInt($(ibody).css('marginLeft')))
: aConfig.width;
iHeight = aConfig.height === 'auto'
? $idoc.height()
: aConfig.height;
// 适应iframe尺寸
setTimeout(function () {
iframe.style.cssText = loadCss;
}, 0);// setTimeout: 防止IE6~7对话框样式渲染异常
api.size(iWidth, iHeight);
// 调整对话框位置
aConfig.follow
? api.follow(aConfig.follow)
: api.position(aConfig.left, aConfig.top);
options.init && options.init.call(api, iwin, top);
options.init = null;
};
var config = {
zIndex: _zIndex(),
init: function () {
api = this;
DOM = api.DOM;
$main = DOM.main;
$content = DOM.content;
iframe = api.iframe = top.document.createElement('iframe');
iframe.src = url;
iframe.name = 'Open' + api.config.id;
iframe.style.cssText = initCss;
iframe.setAttribute('frameborder', 0, 0);
iframe.setAttribute('allowTransparency', true);
$iframe = $(iframe);
api.content().appendChild(iframe);
iwin = iframe.contentWindow;
try {
iwin.name = iframe.name;
artDialog.data(iframe.name + _open, api);
artDialog.data(iframe.name + _opener, window);
} catch (e) {};
$iframe.bind('load', load);
},
close: function () {
$iframe.css('display', 'none').unbind('load', load);
if (options.close && options.close.call(this, iframe.contentWindow, top) === false) {
return false;
};
$content.removeClass('aui_state_full');
// 重要!需要重置iframe地址,否则下次出现的对话框在IE6、7无法聚焦input
// IE删除iframe后,iframe仍然会留在内存中出现上述问题,置换src是最容易解决的方法
$iframe[0].src = 'about:blank';
$iframe.remove();
try {
artDialog.removeData(iframe.name + _open);
artDialog.removeData(iframe.name + _opener);
} catch (e) {};
}
};
// 回调函数第一个参数指向iframe内部window对象
if (typeof options.ok === 'function') config.ok = function () {
return options.ok.call(api, iframe.contentWindow, top);
};
if (typeof options.cancel === 'function') config.cancel = function () {
return options.cancel.call(api, iframe.contentWindow, top);
};
delete options.content;
for (var i in options) {
if (config[i] === undefined) config[i] = options[i];
};
return _proxyDialog(config);
};
/** 引用open方法扩展方法(在open打开的iframe内部私有方法) */
artDialog.open.api = artDialog.data(_winName + _open);
/** 引用open方法触发来源页面window(在open打开的iframe内部私有方法) */
artDialog.opener = artDialog.data(_winName + _opener) || window;
artDialog.open.origin = artDialog.opener; // 兼容v4.1之前版本,未来版本将删除此
/** artDialog.open 打开的iframe页面里关闭对话框快捷方法 */
artDialog.close = function () {
var api = artDialog.data(_winName + _open);
api && api.close();
return false;
};
// 点击iframe内容切换叠加高度
_top != window && $(document).bind('mousedown', function () {
var api = artDialog.open.api;
api && api.zIndex();
});
/**
* Ajax填充内容
* @param {String} 地址
* @param {Object} 配置参数
* @param {Boolean} 是否允许缓存. 默认true
*/
artDialog.load = function(url, options, cache){
cache = cache || false;
var opt = options || {};
var config = {
zIndex: _zIndex(),
init: function(here){
var api = this,
aConfig = api.config;
$.ajax({
url: url,
success: function (content) {
api.content(content);
opt.init && opt.init.call(api, here);
},
cache: cache
});
}
};
delete options.content;
for (var i in opt) {
if (config[i] === undefined) config[i] = opt[i];
};
return _proxyDialog(config);
};
/**
* 警告
* @param {String} 消息内容
*/
artDialog.alert = function (content, callback) {
return _proxyDialog({
id: 'Alert',
zIndex: _zIndex(),
icon: 'warning',
fixed: true,
lock: true,
content: content,
ok: true,
close: callback
});
};
/**
* 确认
* @param {String} 消息内容
* @param {Function} 确定按钮回调函数
* @param {Function} 取消按钮回调函数
*/
artDialog.confirm = function (content, yes, no) {
return _proxyDialog({
id: 'Confirm',
zIndex: _zIndex(),
icon: 'question',
fixed: true,
lock: true,
opacity: .1,
content: content,
ok: function (here) {
return yes.call(this, here);
},
cancel: function (here) {
return no && no.call(this, here);
}
});
};
/**
* 提问
* @param {String} 提问内容
* @param {Function} 回调函数. 接收参数:输入值
* @param {String} 默认值
*/
artDialog.prompt = function (content, yes, value) {
value = value || '';
var input;
return _proxyDialog({
id: 'Prompt',
zIndex: _zIndex(),
icon: 'question',
fixed: true,
lock: true,
opacity: .1,
content: [
'<div style="margin-bottom:5px;font-size:12px">',
content,
'</div>',
'<div>',
'<input value="',
value,
'" style="width:18em;padding:6px 4px" />',
'</div>'
].join(''),
init: function () {
input = this.DOM.content.find('input')[0];
input.select();
input.focus();
},
ok: function (here) {
return yes && yes.call(this, input.value, here);
},
cancel: true
});
};
/**
* 短暂提示
* @param {String} 提示内容
* @param {Number} 显示时间 (默认1.5秒)
*/
artDialog.tips = function (content, time) {
return _proxyDialog({
id: 'Tips',
zIndex: _zIndex(),
title: false,
cancel: false,
fixed: true,
lock: false
})
.content('<div style="padding: 0 1em;">' + content + '</div>')
.time(time || 1.5);
};
// 增强artDialog拖拽体验
// - 防止鼠标落入iframe导致不流畅
// - 对超大对话框拖动优化
$(function () {
var event = artDialog.dragEvent;
if (!event) return;
var $window = $(window),
$document = $(document),
positionType = _isIE6 ? 'absolute' : 'fixed',
dragEvent = event.prototype,
mask = document.createElement('div'),
style = mask.style;
style.cssText = 'display:none;position:' + positionType + ';left:0;top:0;width:100%;height:100%;'
+ 'cursor:move;filter:alpha(opacity=0);opacity:0;background:#FFF';
document.body.appendChild(mask);
dragEvent._start = dragEvent.start;
dragEvent._end = dragEvent.end;
dragEvent.start = function () {
var DOM = artDialog.focus.DOM,
main = DOM.main[0],
iframe = DOM.content[0].getElementsByTagName('iframe')[0];
dragEvent._start.apply(this, arguments);
style.display = 'block';
style.zIndex = artDialog.defaults.zIndex + 3;
if (positionType === 'absolute') {
style.width = $window.width() + 'px';
style.height = $window.height() + 'px';
style.left = $document.scrollLeft() + 'px';
style.top = $document.scrollTop() + 'px';
};
if (iframe && main.offsetWidth * main.offsetHeight > 307200) {
main.style.visibility = 'hidden';
};
};
dragEvent.end = function () {
var dialog = artDialog.focus;
dragEvent._end.apply(this, arguments);
style.display = 'none';
if (dialog) dialog.DOM.main[0].style.visibility = 'visible';
};
});
})(this.art || this.jQuery, this, this.artDialog);
@charset "utf-8";
/*
* artDialog skin
* http://code.google.com/p/artdialog/
* (c) 2009-2011 TangBin, http://www.planeArt.cn
*
* This is licensed under the GNU LGPL, version 2.1 or later.
* For details, see: http://creativecommons.org/licenses/LGPL/2.1/
*/
/* common start */
body { _margin:0; _height:100%; /*IE6 BUG*/ }
.aui_outer { text-align:left; }
table.aui_border, table.aui_dialog { border:0; margin:0; border-collapse:collapse; width:auto; }
.aui_nw, .aui_n, .aui_ne, .aui_w, .aui_c, .aui_e, .aui_sw, .aui_s, .aui_se, .aui_header, .aui_tdIcon, .aui_main, .aui_footer { padding:0; }
.aui_header, .aui_buttons button { font: 12px/1.11 'Microsoft Yahei', Tahoma, Arial, Helvetica, STHeiti; _font-family:Tahoma,Arial,Helvetica,STHeiti; -o-font-family: Tahoma, Arial; }
.aui_title { overflow:hidden; text-overflow: ellipsis; }
.aui_state_noTitle .aui_title { display:none; }
.aui_close { display:block; position:absolute; text-decoration:none; outline:none; _cursor:pointer; }
.aui_close:hover { text-decoration:none; }
.aui_main { text-align:center; min-width:9em; min-width:0\9/*IE8 BUG*/; }
.aui_content { display:inline-block; *zoom:1; *display:inline; text-align:left; border:none 0; }
.aui_content.aui_state_full { display:block; width:100%; margin:0; padding:0!important; height:100%; }
.aui_loading { width:96px; height:32px; text-align:left; text-indent:-999em; overflow:hidden; background:url(icons/loading.gif) no-repeat center center; }
.aui_icon { vertical-align: middle; }
.aui_icon div { width:48px; height:48px; margin:10px 0 10px 10px; background-position: center center; background-repeat:no-repeat; }
.aui_buttons { padding:8px; text-align:right; white-space:nowrap; }
.aui_buttons button { margin-left:15px; padding: 6px 8px; cursor: pointer; display: inline-block; text-align: center; line-height: 1; *padding:4px 10px; *height:2em; letter-spacing:2px; font-family: Tahoma, Arial/9!important; width:auto; overflow:visible; *width:1; color: #333; border: solid 1px #999; border-radius: 5px; background: #DDD; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFF', endColorstr='#DDDDDD'); background: linear-gradient(top, #FFF, #DDD); background: -moz-linear-gradient(top, #FFF, #DDD); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#FFF), to(#DDD)); text-shadow: 0px 1px 1px rgba(255, 255, 255, 1); box-shadow: 0 1px 0 rgba(255, 255, 255, .7), 0 -1px 0 rgba(0, 0, 0, .09); -moz-transition:-moz-box-shadow linear .2s; -webkit-transition: -webkit-box-shadow linear .2s; transition: box-shadow linear .2s; }
.aui_buttons button::-moz-focus-inner{ border:0; padding:0; margin:0; }
.aui_buttons button:focus { outline:none 0; border-color:#426DC9; box-shadow:0 0 8px rgba(66, 109, 201, .9); }
.aui_buttons button:hover { color:#000; border-color:#666; }
.aui_buttons button:active { border-color:#666; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#DDDDDD', endColorstr='#FFFFFF'); background: linear-gradient(top, #DDD, #FFF); background: -moz-linear-gradient(top, #DDD, #FFF); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#DDD), to(#FFF)); box-shadow:inset 0 1px 5px rgba(66, 109, 201, .9), inset 0 1px 1em rgba(0, 0, 0, .3); }
.aui_buttons button[disabled] { cursor:default; color:#666; background:#DDD; border: solid 1px #999; filter:alpha(opacity=50); opacity:.5; box-shadow:none; }
button.aui_state_highlight { color: #FFF; border: solid 1px #1c6a9e; background: #2288cc; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#33bbee', endColorstr='#2288cc'); background: linear-gradient(top, #33bbee, #2288cc); background: -moz-linear-gradient(top, #33bbee, #2288cc); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#33bbee), to(#2288cc)); text-shadow: -1px -1px 1px #1c6a9e; }
button.aui_state_highlight:hover { color:#FFF; border-color:#0F3A56; }
button.aui_state_highlight:active { border-color:#1c6a9e; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#33bbee', endColorstr='#2288cc'); background: linear-gradient(top, #33bbee, #2288cc); background: -moz-linear-gradient(top, #33bbee, #2288cc); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#33bbee), to(#2288cc)); }
/* common end */
.aui_inner { background:#FFF; }
.aui_titleBar { width:100%; height:0; position:relative; bottom:30px; _bottom:0; _margin-top:-30px; }
.aui_title { height:29px; line-height:29px; padding:0 16px 0 0; _padding:0; color:#FFF; font-weight:700; text-shadow:1px 1px 0 rgba(0, 0, 0, .9); }
.aui_nw, .aui_ne, .aui_sw, .aui_se, .aui_n, .aui_s, .aui_close { background-image:url(aero/aero_s.png); background-repeat:no-repeat; }
.aui_nw { width:14px; height:34px; background-position: 0 0; _png:aero/ie6/aui_nw.png; }
.aui_ne { width:14px; height:34px; background-position: -14px 0; _png:aero/ie6/aui_ne.png; }
.aui_sw { width:14px; height:14px; background-position: 0 -34px; _png:aero/ie6/aui_sw.png; }
.aui_se { width:14px; height:14px; background-position: -14px -34px; _png:aero/ie6/aui_se.png; }
.aui_close { top:7px; right:0; _z-index:1; width:13px; height:13px; _font-size:0; _line-height:0; text-indent:-9999em; background-position:left -96px; _background:url(aero/ie6/aui_close.png); }
.aui_close:hover { background-position:right -96px; _background:url(aero/ie6/aui_close.hover.png); }
.aui_n, .aui_s { background-repeat:repeat-x; }
.aui_n { background-position: 0 -48px; _png:aero/ie6/aui_n.png; }
.aui_s { background-position: 0 -82px; _png:aero/ie6/aui_s.png; }
.aui_w, .aui_e { background-image:url(aero/aero_s2.png); background-repeat:repeat-y; }
.aui_w { background-position:left top; _png:aero/ie6/aui_w.png; }
.aui_e { background-position: right bottom; _png:aero/ie6/aui_e.png; }
.aui_state_noTitle .aui_nw, .aui_state_noTitle .aui_ne, .aui_state_noTitle .aui_sw, .aui_state_noTitle .aui_se { width:3px; height:3px; }
.aui_state_noTitle .aui_inner { border:1px solid #666; background:#FFF; }
.aui_state_noTitle .aui_outer { box-shadow:none; }
.aui_state_noTitle .aui_nw, .aui_state_noTitle .aui_n, .aui_state_noTitle .aui_ne, .aui_state_noTitle .aui_w, .aui_state_noTitle .aui_e, .aui_state_noTitle .aui_sw, .aui_state_noTitle .aui_s, .aui_state_noTitle .aui_se { background:rgba(0, 0, 0, .05); background:#000\9!important; filter:alpha(opacity=5)!important; }
.aui_state_noTitle .aui_titleBar { bottom:0; _bottom:0; _margin-top:0; }
.aui_state_noTitle .aui_close { top:0; right:0; width:18px; height:18px; line-height:18px; text-align:center; text-indent:0; font-family: Helvetica, STHeiti; _font-family: '\u9ed1\u4f53', 'Book Antiqua', Palatino; font-size:18px; text-decoration:none; color:#214FA3; background:none; filter:!important; }
.aui_state_noTitle .aui_close:hover, .aui_state_noTitle .aui_close:active { text-decoration:none; color:#900; }
\ No newline at end of file
@charset "utf-8";
/*
* artDialog skin
* http://code.google.com/p/artdialog/
* (c) 2009-2011 TangBin, http://www.planeArt.cn
*
* This is licensed under the GNU LGPL, version 2.1 or later.
* For details, see: http://creativecommons.org/licenses/LGPL/2.1/
*/
/* common start */
body { _margin:0; _height:100%; /*IE6 BUG*/ }
.aui_outer { text-align:left; }
table.aui_border, table.aui_dialog { border:0; margin:0; border-collapse:collapse; width:auto; }
.aui_nw, .aui_n, .aui_ne, .aui_w, .aui_c, .aui_e, .aui_sw, .aui_s, .aui_se, .aui_header, .aui_tdIcon, .aui_main, .aui_footer { padding:0; }
.aui_header, .aui_buttons button { font: 12px/1.11 'Microsoft Yahei', Tahoma, Arial, Helvetica, STHeiti; _font-family:Tahoma,Arial,Helvetica,STHeiti; -o-font-family: Tahoma, Arial; }
.aui_title { overflow:hidden; text-overflow: ellipsis; }
.aui_state_noTitle .aui_title { display:none; }
.aui_close { display:block; position:absolute; text-decoration:none; outline:none; _cursor:pointer; }
.aui_close:hover { text-decoration:none; }
.aui_main { text-align:center; min-width:9em; min-width:0 \9/*IE8 BUG*/; }
.aui_content { display:inline-block; *zoom:1; *display:inline; text-align:left; border:none 0; }
.aui_content.aui_state_full { display:block; width:100%; margin:0; padding:0!important; height:100%; }
.aui_loading { width:96px; height:32px; text-align:left; text-indent:-999em; overflow:hidden; background:url(icons/loading.gif) no-repeat center center; }
.aui_icon { vertical-align: middle; }
.aui_icon div { width:48px; height:48px; margin:10px 0 10px 10px; background-position: center center; background-repeat:no-repeat; }
.aui_buttons { padding:8px; text-align:right; white-space:nowrap; }
.aui_buttons button { margin-left:15px; padding: 6px 8px; cursor: pointer; display: inline-block; text-align: center; line-height: 1; *padding:4px 10px; *height:2em; letter-spacing:2px; font-family: Tahoma, Arial/9!important; width:auto; overflow:visible; *width:1; color: #333; border: solid 1px #999; border-radius: 5px; background: #DDD; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFF', endColorstr='#DDDDDD'); background: linear-gradient(top, #FFF, #DDD); background: -moz-linear-gradient(top, #FFF, #DDD); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#FFF), to(#DDD)); text-shadow: 0px 1px 1px rgba(255, 255, 255, 1); box-shadow: 0 1px 0 rgba(255, 255, 255, .7), 0 -1px 0 rgba(0, 0, 0, .09); -moz-transition:-moz-box-shadow linear .2s; -webkit-transition: -webkit-box-shadow linear .2s; transition: box-shadow linear .2s; }
.aui_buttons button::-moz-focus-inner{ border:0; padding:0; margin:0; }
.aui_buttons button:focus { outline:none 0; border-color:#426DC9; box-shadow:0 0 8px rgba(66, 109, 201, .9); }
.aui_buttons button:hover { color:#000; border-color:#666; }
.aui_buttons button:active { border-color:#666; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#DDDDDD', endColorstr='#FFFFFF'); background: linear-gradient(top, #DDD, #FFF); background: -moz-linear-gradient(top, #DDD, #FFF); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#DDD), to(#FFF)); box-shadow:inset 0 1px 5px rgba(66, 109, 201, .9), inset 0 1px 1em rgba(0, 0, 0, .3); }
.aui_buttons button[disabled] { cursor:default; color:#666; background:#DDD; border: solid 1px #999; filter:alpha(opacity=50); opacity:.5; box-shadow:none; }
button.aui_state_highlight { color: #FFF; border: solid 1px #3399dd; background: #2288cc; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#33bbee', endColorstr='#2288cc'); background: linear-gradient(top, #33bbee, #2288cc); background: -moz-linear-gradient(top, #33bbee, #2288cc); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#33bbee), to(#2288cc)); text-shadow: -1px -1px 1px #1c6a9e; }
button.aui_state_highlight:hover { color:#FFF; border-color:#1c6a9e; }
button.aui_state_highlight:active { border-color:#1c6a9e; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#33bbee', endColorstr='#2288cc'); background: linear-gradient(top, #33bbee, #2288cc); background: -moz-linear-gradient(top, #33bbee, #2288cc); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#33bbee), to(#2288cc)); }
/* common end */
.aui_inner { background:#f7f7f7; }
.aui_titleBar { width:100%; height:0; position:relative; bottom:30px; _bottom:0; _margin-top:-30px; }
.aui_title { height:29px; line-height:29px; padding:0 25px 0 0; _padding:0; text-indent:5px; color:#FFF; font-weight:700; text-shadow:-1px -1px 0 rgba(0, 0, 0, .7); }
.aui_nw, .aui_ne, .aui_sw, .aui_se, .aui_n, .aui_s, .aui_close { background-image:url(black/bg.png); background-repeat:no-repeat; }
.aui_nw { width:15px; height:38px; background-position: 0 0; _png:black/ie6/nw.png; }
.aui_ne { width:15px; height:38px; background-position: -15px 0; _png:black/ie6/ne.png; }
.aui_sw { width:15px; height:18px; background-position: 0 -38px; _png:black/ie6/sw.png; }
.aui_se { width:15px; height:18px; background-position: -15px -38px; _png:black/ie6/se.png; }
.aui_close { top:4px; right:4px; _z-index:1; width:20px; height:20px; _font-size:0; _line-height:0; text-indent:-9999em; background-position:0 -112px; _png:black/ie6/close.png; }
.aui_close:hover { background-position:0 -132px; }
.aui_n, .aui_s { background-repeat:repeat-x; }
.aui_n { background-position: 0 -56px; _png:black/ie6/n.png; }
.aui_s { background-position: 0 -94px; _png:black/ie6/s.png; }
.aui_w, .aui_e { background-image:url(black/bg2.png); background-repeat:repeat-y; }
.aui_w { background-position:left top; _png:black/ie6/w.png; }
.aui_e { background-position: right bottom; _png:black/ie6/e.png; }
aui_icon, .aui_main { padding-top:3px; }
@media screen and (min-width:0) {
.aui_outer { border-radius:8px; box-shadow:0 5px 15px rgba(0, 0, 0, .4); -moz-transition:-moz-box-shadow linear .2s; -webkit-transition: -webkit-box-shadow linear .2s; transition: -webkit-box-shadow linear .2s; }
.aui_state_drag .aui_outer { box-shadow:none; }
.aui_state_lock .aui_outer { box-shadow:0 3px 26px rgba(0, 0, 0, .9); }
.aui_outer:active { box-shadow:0 0 5px rgba(0, 0, 0, .1)!important; }
.aui_state_drag .aui_outer { box-shadow:none!important; }
.aui_nw, .aui_ne, .aui_sw, .aui_se, .aui_n, .aui_s, .aui_close { background-image:url(black/bg_css3.png); }
.aui_nw { width:5px; height:31px; }
.aui_ne { width:5px; height:31px; background-position: -5px 0; _png:black/ie6/ne.png; }
.aui_sw { width:5px; height:5px;background-position: 0 -31px; }
.aui_se { width:5px; height:5px; background-position: -5px -31px; }
.aui_close { background-position:0 -72px; }
.aui_close:hover { background-position:0 -92px; }
.aui_n { background-position: 0 -36px; }
.aui_s { background-position: 0 -67px; }
.aui_w, .aui_e { background-image:url(black/bg_css3_2.png); }
}
.aui_state_noTitle .aui_nw, .aui_state_noTitle .aui_ne, .aui_state_noTitle .aui_sw, .aui_state_noTitle .aui_se { width:3px; height:3px; }
.aui_state_noTitle .aui_inner { border:1px solid #666; background:#FFF; }
.aui_state_noTitle .aui_outer { box-shadow:none; }
.aui_state_noTitle .aui_nw, .aui_state_noTitle .aui_n, .aui_state_noTitle .aui_ne, .aui_state_noTitle .aui_w, .aui_state_noTitle .aui_e, .aui_state_noTitle .aui_sw, .aui_state_noTitle .aui_s, .aui_state_noTitle .aui_se { background:rgba(0, 0, 0, .05); background:#000\9!important; filter:alpha(opacity=5)!important; }
.aui_state_noTitle .aui_titleBar { bottom:0; _bottom:0; _margin-top:0; }
.aui_state_noTitle .aui_close { top:0; right:0; width:18px; height:18px; line-height:18px; text-align:center; text-indent:0; font-family: Helvetica, STHeiti; _font-family: '\u9ed1\u4f53', 'Book Antiqua', Palatino; font-size:18px; text-decoration:none; color:#214FA3; background:none; filter:!important; }
.aui_state_noTitle .aui_close:hover, .aui_state_noTitle .aui_close:active { text-decoration:none; color:#900; }
\ No newline at end of file
@charset "utf-8";
/*
* artDialog skin
* http://code.google.com/p/artdialog/
* (c) 2009-2011 TangBin, http://www.planeArt.cn
*
* This is licensed under the GNU LGPL, version 2.1 or later.
* For details, see: http://creativecommons.org/licenses/LGPL/2.1/
*/
/* common start */
body { _margin:0; _height:100%; /*IE6 BUG*/ }
.aui_outer { text-align:left; }
table.aui_border, table.aui_dialog { border:0; margin:0; border-collapse:collapse; width:auto; }
.aui_nw, .aui_n, .aui_ne, .aui_w, .aui_c, .aui_e, .aui_sw, .aui_s, .aui_se, .aui_header, .aui_tdIcon, .aui_main, .aui_footer { padding:0; }
.aui_header, .aui_buttons button { font: 12px/1.11 'Microsoft Yahei', Tahoma, Arial, Helvetica, STHeiti; _font-family:Tahoma,Arial,Helvetica,STHeiti; -o-font-family: Tahoma, Arial; }
.aui_title { overflow:hidden; text-overflow: ellipsis; }
.aui_state_noTitle .aui_title { display:none; }
.aui_close { display:block; position:absolute; text-decoration:none; outline:none; _cursor:pointer; }
.aui_close:hover { text-decoration:none; }
.aui_main { text-align:center; min-width:9em; min-width:0 \9/*IE8 BUG*/; }
.aui_content { display:inline-block; *zoom:1; *display:inline; text-align:left; border:none 0; }
.aui_content.aui_state_full { display:block; width:100%; margin:0; padding:0!important; height:100%; }
.aui_loading { width:96px; height:32px; text-align:left; text-indent:-999em; overflow:hidden; background:url(icons/loading.gif) no-repeat center center; }
.aui_icon { vertical-align: middle; }
.aui_icon div { width:48px; height:48px; margin:10px 0 10px 10px; background-position: center center; background-repeat:no-repeat; }
.aui_buttons { padding:8px; text-align:right; white-space:nowrap; }
.aui_buttons button { margin-left:15px; padding: 6px 8px; cursor: pointer; display: inline-block; text-align: center; line-height: 1; *padding:4px 10px; *height:2em; letter-spacing:2px; font-family: Tahoma, Arial/9!important; width:auto; overflow:visible; *width:1; color: #333; border: solid 1px #999; border-radius: 5px; background: #DDD; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFF', endColorstr='#DDDDDD'); background: linear-gradient(top, #FFF, #DDD); background: -moz-linear-gradient(top, #FFF, #DDD); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#FFF), to(#DDD)); text-shadow: 0px 1px 1px rgba(255, 255, 255, 1); box-shadow: 0 1px 0 rgba(255, 255, 255, .7), 0 -1px 0 rgba(0, 0, 0, .09); -moz-transition:-moz-box-shadow linear .2s; -webkit-transition: -webkit-box-shadow linear .2s; transition: box-shadow linear .2s; }
.aui_buttons button::-moz-focus-inner{ border:0; padding:0; margin:0; }
.aui_buttons button:focus { outline:none 0; border-color:#426DC9; box-shadow:0 0 8px rgba(66, 109, 201, .9); }
.aui_buttons button:hover { color:#000; border-color:#666; }
.aui_buttons button:active { border-color:#666; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#DDDDDD', endColorstr='#FFFFFF'); background: linear-gradient(top, #DDD, #FFF); background: -moz-linear-gradient(top, #DDD, #FFF); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#DDD), to(#FFF)); box-shadow:inset 0 1px 5px rgba(66, 109, 201, .9), inset 0 1px 1em rgba(0, 0, 0, .3); }
.aui_buttons button[disabled] { cursor:default; color:#666; background:#DDD; border: solid 1px #999; filter:alpha(opacity=50); opacity:.5; box-shadow:none; }
button.aui_state_highlight { color: #FFF; border: solid 1px #3399dd; background: #2288cc; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#33bbee', endColorstr='#2288cc'); background: linear-gradient(top, #33bbee, #2288cc); background: -moz-linear-gradient(top, #33bbee, #2288cc); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#33bbee), to(#2288cc)); text-shadow: -1px -1px 1px #1c6a9e; }
button.aui_state_highlight:hover { color:#FFF; border-color:#1c6a9e; }
button.aui_state_highlight:active { border-color:#1c6a9e; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#33bbee', endColorstr='#2288cc'); background: linear-gradient(top, #33bbee, #2288cc); background: -moz-linear-gradient(top, #33bbee, #2288cc); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#33bbee), to(#2288cc)); }
/* common end */
.aui_inner { background:#f7f7f7; }
.aui_titleBar { width:100%; height:0; position:relative; bottom:30px; _bottom:0; _margin-top:-30px; }
.aui_title { height:29px; line-height:29px; padding:0 25px 0 0; _padding:0; text-indent:5px; color:#FFF; font-weight:700; text-shadow:-1px -1px 0 rgba(33, 79, 183, .7); }
.aui_nw, .aui_ne, .aui_sw, .aui_se, .aui_n, .aui_s, .aui_close { background-image:url(blue/bg.png); background-repeat:no-repeat; }
.aui_nw { width:15px; height:38px; background-position: 0 0; _png:blue/ie6/nw.png; }
.aui_ne { width:15px; height:38px; background-position: -15px 0; _png:blue/ie6/ne.png; }
.aui_sw { width:15px; height:18px; background-position: 0 -38px; _png:blue/ie6/sw.png; }
.aui_se { width:15px; height:18px; background-position: -15px -38px; _png:blue/ie6/se.png; }
.aui_close { top:4px; right:4px; _z-index:1; width:20px; height:20px; _font-size:0; _line-height:0; text-indent:-9999em; background-position:0 -112px; _png:blue/ie6/close.png; }
.aui_close:hover { background-position:0 -132px; }
.aui_n, .aui_s { background-repeat:repeat-x; }
.aui_n { background-position: 0 -56px; _png:blue/ie6/n.png; }
.aui_s { background-position: 0 -94px; _png:blue/ie6/s.png; }
.aui_w, .aui_e { background-image:url(blue/bg2.png); background-repeat:repeat-y; }
.aui_w { background-position:left top; _png:blue/ie6/w.png; }
.aui_e { background-position: right bottom; _png:blue/ie6/e.png; }
aui_icon, .aui_main { padding-top:3px; }
@media screen and (min-width:0) {
.aui_outer { border-radius:8px; box-shadow:0 5px 15px rgba(2, 37, 69, .4); -moz-transition:-moz-box-shadow linear .2s; -webkit-transition: -webkit-box-shadow linear .2s; transition: -webkit-box-shadow linear .2s; }
.aui_state_drag .aui_outer { box-shadow:none; }
.aui_state_lock .aui_outer { box-shadow:0 3px 26px rgba(0, 0, 0, .9); }
.aui_outer:active { box-shadow:0 0 5px rgba(2, 37, 69, .1)!important; }
.aui_state_drag .aui_outer { box-shadow:none!important; }
.aui_nw, .aui_ne, .aui_sw, .aui_se, .aui_n, .aui_s, .aui_close { background-image:url(blue/bg_css3.png); }
.aui_nw { width:5px; height:31px; }
.aui_ne { width:5px; height:31px; background-position: -5px 0; _png:blue/ie6/ne.png; }
.aui_sw { width:5px; height:5px;background-position: 0 -31px; }
.aui_se { width:5px; height:5px; background-position: -5px -31px; }
.aui_close { background-position:0 -72px; }
.aui_close:hover { background-position:0 -92px; }
.aui_n { background-position: 0 -36px; }
.aui_s { background-position: 0 -67px; }
.aui_w, .aui_e { background-image:url(blue/bg_css3_2.png); }
}
.aui_state_noTitle .aui_nw, .aui_state_noTitle .aui_ne, .aui_state_noTitle .aui_sw, .aui_state_noTitle .aui_se { width:3px; height:3px; }
.aui_state_noTitle .aui_inner { border:1px solid #666; background:#FFF; }
.aui_state_noTitle .aui_outer { box-shadow:none; }
.aui_state_noTitle .aui_nw, .aui_state_noTitle .aui_n, .aui_state_noTitle .aui_ne, .aui_state_noTitle .aui_w, .aui_state_noTitle .aui_e, .aui_state_noTitle .aui_sw, .aui_state_noTitle .aui_s, .aui_state_noTitle .aui_se { background:rgba(0, 0, 0, .05); background:#000\9!important; filter:alpha(opacity=5)!important; }
.aui_state_noTitle .aui_titleBar { bottom:0; _bottom:0; _margin-top:0; }
.aui_state_noTitle .aui_close { top:0; right:0; width:18px; height:18px; line-height:18px; text-align:center; text-indent:0; font-family: Helvetica, STHeiti; _font-family: '\u9ed1\u4f53', 'Book Antiqua', Palatino; font-size:18px; text-decoration:none; color:#214FA3; background:none; filter:!important; }
.aui_state_noTitle .aui_close:hover, .aui_state_noTitle .aui_close:active { text-decoration:none; color:#900; }
\ No newline at end of file
@charset "utf-8";
/*
* artDialog skin
* http://code.google.com/p/artdialog/
* (c) 2009-2011 TangBin, http://www.planeArt.cn
*
* This is licensed under the GNU LGPL, version 2.1 or later.
* For details, see: http://creativecommons.org/licenses/LGPL/2.1/
*/
/* common start */
body { _margin:0; _height:100%; /*IE6 BUG*/ }
.aui_outer { text-align:left; }
table.aui_border, table.aui_dialog { border:0; margin:0; border-collapse:collapse; width:auto; }
.aui_nw, .aui_n, .aui_ne, .aui_w, .aui_c, .aui_e, .aui_sw, .aui_s, .aui_se, .aui_header, .aui_tdIcon, .aui_main, .aui_footer { padding:0; }
.aui_header, .aui_buttons button { font: 12px/1.11 'Microsoft Yahei', Tahoma, Arial, Helvetica, STHeiti; _font-family:Tahoma,Arial,Helvetica,STHeiti; -o-font-family: Tahoma, Arial; }
.aui_title { overflow:hidden; text-overflow: ellipsis; }
.aui_state_noTitle .aui_title { display:none; }
.aui_close { display:block; position:absolute; text-decoration:none; outline:none; _cursor:pointer; }
.aui_close:hover { text-decoration:none; }
.aui_main { text-align:center; min-width:9em; min-width:0\9/*IE8 BUG*/; }
.aui_content { display:inline-block; *zoom:1; *display:inline; text-align:left; border:none 0; }
.aui_content.aui_state_full { display:block; width:100%; margin:0; padding:0!important; height:100%; }
.aui_loading { width:96px; height:32px; text-align:left; text-indent:-999em; overflow:hidden; background:url(icons/loading.gif) no-repeat center center; }
.aui_icon { vertical-align: middle; }
.aui_icon div { width:48px; height:48px; margin:10px 0 10px 10px; background-position: center center; background-repeat:no-repeat; }
.aui_buttons { padding:8px; text-align:right; white-space:nowrap; }
.aui_buttons button { margin-left:15px; padding: 6px 8px; cursor: pointer; display: inline-block; text-align: center; line-height: 1; *padding:4px 10px; *height:2em; letter-spacing:2px; font-family: Tahoma, Arial/9!important; width:auto; overflow:visible; *width:1; color: #333; border: solid 1px #999; border-radius: 5px; background: #DDD; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFF', endColorstr='#DDDDDD'); background: linear-gradient(top, #FFF, #DDD); background: -moz-linear-gradient(top, #FFF, #DDD); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#FFF), to(#DDD)); text-shadow: 0px 1px 1px rgba(255, 255, 255, 1); box-shadow: 0 1px 0 rgba(255, 255, 255, .7), 0 -1px 0 rgba(0, 0, 0, .09); -moz-transition:-moz-box-shadow linear .2s; -webkit-transition: -webkit-box-shadow linear .2s; transition: box-shadow linear .2s; }
.aui_buttons button::-moz-focus-inner{ border:0; padding:0; margin:0; }
.aui_buttons button:focus { outline:none 0; border-color:#426DC9; box-shadow:0 0 8px rgba(66, 109, 201, .9); }
.aui_buttons button:hover { color:#000; border-color:#666; }
.aui_buttons button:active { border-color:#666; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#DDDDDD', endColorstr='#FFFFFF'); background: linear-gradient(top, #DDD, #FFF); background: -moz-linear-gradient(top, #DDD, #FFF); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#DDD), to(#FFF)); box-shadow:inset 0 1px 5px rgba(66, 109, 201, .9), inset 0 1px 1em rgba(0, 0, 0, .3); }
.aui_buttons button[disabled] { cursor:default; color:#666; background:#DDD; border: solid 1px #999; filter:alpha(opacity=50); opacity:.5; box-shadow:none; }
button.aui_state_highlight { color: #FFF; border: solid 1px #1c6a9e; background: #2288cc; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#33bbee', endColorstr='#2288cc'); background: linear-gradient(top, #33bbee, #2288cc); background: -moz-linear-gradient(top, #33bbee, #2288cc); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#33bbee), to(#2288cc)); text-shadow: -1px -1px 1px #1c6a9e; }
button.aui_state_highlight:hover { color:#FFF; border-color:#0F3A56; }
button.aui_state_highlight:active { border-color:#1c6a9e; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#33bbee', endColorstr='#2288cc'); background: linear-gradient(top, #33bbee, #2288cc); background: -moz-linear-gradient(top, #33bbee, #2288cc); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#33bbee), to(#2288cc)); }
/* common end */
.aui_inner { background:#FFF; }
.aui_titleBar { width:100%; height:0; position:relative; bottom:26px; _bottom:0; _margin-top:-26px;}
.aui_title { height:26px; line-height:23px; padding:0 60px 0 5px; color:#FFF; font-weight:700; text-shadow:0 1px 0 #000; }
.aui_nw, .aui_ne, .aui_w, .aui_e, .aui_sw, .aui_se, .aui_close { background-image:url(chrome/chrome_s.png); background-repeat:no-repeat; }
.aui_nw { width:5px; height:26px; background-position: -46px -8px; }
.aui_ne { width:5px; height:26px; background-position: -53px -8px; }
.aui_w { background-position:-60px 0; background-repeat:repeat-y; }
.aui_e { background-position:-65px 0; background-repeat:repeat-y; }
.aui_sw { width:5px; height:5px; background-position: -46px -2px;}
.aui_se { width:5px; height:5px; background-position: -53px -2px;}
.aui_close { top:1px; right:0; width:44px; height:17px; background-position:0 0; _font-size:0; _line-height:0; text-indent:-9999em; }
.aui_close:hover { background-position:0 -18px; }
.aui_n, .aui_s { background-image:url(chrome/border.png); background-repeat:repeat-x; }
.aui_n { background-position:0 top; }
.aui_s { background-position: 0 bottom; }
.aui_buttons { background-color:#F6F6F6; border-top:solid 1px #DADEE5; }
.aui_state_noTitle .aui_nw, .aui_state_noTitle .aui_ne, .aui_state_noTitle .aui_sw, .aui_state_noTitle .aui_se { width:3px; height:3px; }
.aui_state_noTitle .aui_inner { border:1px solid #666; background:#FFF; }
.aui_state_noTitle .aui_outer { box-shadow:none; }
.aui_state_noTitle .aui_nw, .aui_state_noTitle .aui_n, .aui_state_noTitle .aui_ne, .aui_state_noTitle .aui_w, .aui_state_noTitle .aui_e, .aui_state_noTitle .aui_sw, .aui_state_noTitle .aui_s, .aui_state_noTitle .aui_se { background:rgba(0, 0, 0, .05); background:#000\9!important; filter:alpha(opacity=5)!important; }
.aui_state_noTitle .aui_titleBar { bottom:0; _bottom:0; _margin-top:0; }
.aui_state_noTitle .aui_close { top:0; right:0; width:18px; height:18px; line-height:18px; text-align:center; text-indent:0; font-family: Helvetica, STHeiti; _font-family: '\u9ed1\u4f53', 'Book Antiqua', Palatino; font-size:18px; text-decoration:none; color:#214FA3; background:none; filter:!important; }
.aui_state_noTitle .aui_close:hover, .aui_state_noTitle .aui_close:active { text-decoration:none; color:#900; }
@charset "utf-8";
/*
* artDialog skin
* http://code.google.com/p/artdialog/
* (c) 2009-2011 TangBin, http://www.planeArt.cn
*
* This is licensed under the GNU LGPL, version 2.1 or later.
* For details, see: http://creativecommons.org/licenses/LGPL/2.1/
*/
/* common start */
body { _margin:0; _height:100%; /*IE6 BUG*/ }
.aui_outer { text-align:left; }
table.aui_border, table.aui_dialog { border:0; margin:0; border-collapse:collapse; width:auto; }
.aui_nw, .aui_n, .aui_ne, .aui_w, .aui_c, .aui_e, .aui_sw, .aui_s, .aui_se, .aui_header, .aui_tdIcon, .aui_main, .aui_footer { padding:0; }
.aui_header, .aui_buttons button { font: 12px/1.11 'Microsoft Yahei', Tahoma, Arial, Helvetica, STHeiti; _font-family:Tahoma,Arial,Helvetica,STHeiti; -o-font-family: Tahoma, Arial; }
.aui_title { overflow:hidden; text-overflow: ellipsis; }
.aui_state_noTitle .aui_title { display:none; }
.aui_close { display:block; position:absolute; text-decoration:none; outline:none; _cursor:pointer; }
.aui_close:hover { text-decoration:none; }
.aui_main { text-align:center; min-width:9em; min-width:0\9/*IE8 BUG*/; }
.aui_content { display:inline-block; *zoom:1; *display:inline; text-align:left; border:none 0; }
.aui_content.aui_state_full { display:block; width:100%; margin:0; padding:0!important; height:100%; }
.aui_loading { width:96px; height:32px; text-align:left; text-indent:-999em; overflow:hidden; background:url(icons/loading.gif) no-repeat center center; }
.aui_icon { vertical-align: middle; }
.aui_icon div { width:48px; height:48px; margin:10px 0 10px 10px; background-position: center center; background-repeat:no-repeat; }
.aui_buttons { padding:8px; text-align:right; white-space:nowrap; }
.aui_buttons button { margin-left:15px; padding: 6px 8px; cursor: pointer; display: inline-block; text-align: center; line-height: 1; *padding:4px 10px; *height:2em; letter-spacing:2px; font-family: Tahoma, Arial/9!important; width:auto; overflow:visible; *width:1; color: #333; border: solid 1px #999; border-radius: 5px; background: #DDD; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFF', endColorstr='#DDDDDD'); background: linear-gradient(top, #FFF, #DDD); background: -moz-linear-gradient(top, #FFF, #DDD); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#FFF), to(#DDD)); text-shadow: 0px 1px 1px rgba(255, 255, 255, 1); box-shadow: 0 1px 0 rgba(255, 255, 255, .7), 0 -1px 0 rgba(0, 0, 0, .09); -moz-transition:-moz-box-shadow linear .2s; -webkit-transition: -webkit-box-shadow linear .2s; transition: box-shadow linear .2s; }
.aui_buttons button::-moz-focus-inner{ border:0; padding:0; margin:0; }
.aui_buttons button:focus { outline:none 0; border-color:#426DC9; box-shadow:0 0 8px rgba(66, 109, 201, .9); }
.aui_buttons button:hover { color:#000; border-color:#666; }
.aui_buttons button:active { border-color:#666; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#DDDDDD', endColorstr='#FFFFFF'); background: linear-gradient(top, #DDD, #FFF); background: -moz-linear-gradient(top, #DDD, #FFF); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#DDD), to(#FFF)); box-shadow:inset 0 1px 5px rgba(66, 109, 201, .9), inset 0 1px 1em rgba(0, 0, 0, .3); }
.aui_buttons button[disabled] { cursor:default; color:#666; background:#DDD; border: solid 1px #999; filter:alpha(opacity=50); opacity:.5; box-shadow:none; }
button.aui_state_highlight { color: #FFF; border: solid 1px #1c6a9e; background: #2288cc; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#33bbee', endColorstr='#2288cc'); background: linear-gradient(top, #33bbee, #2288cc); background: -moz-linear-gradient(top, #33bbee, #2288cc); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#33bbee), to(#2288cc)); text-shadow: -1px -1px 1px #1c6a9e; }
button.aui_state_highlight:hover { color:#FFF; border-color:#0F3A56; }
button.aui_state_highlight:active { border-color:#1c6a9e; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#33bbee', endColorstr='#2288cc'); background: linear-gradient(top, #33bbee, #2288cc); background: -moz-linear-gradient(top, #33bbee, #2288cc); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#33bbee), to(#2288cc)); }
/* common end */
.aui_inner { background:#FFF; }
.aui_outer, .aui_inner { border:1px solid rgba(0, 0, 0, .7); border:1px solid #333\9; }
.aui_border { box-shadow: inset 0 0 1px rgba(255, 255, 255, .9); }
.aui_nw, .aui_ne, .aui_sw, .aui_se { width:8px; height:8px; }
.aui_nw, .aui_n, .aui_ne, .aui_w, .aui_e, .aui_sw, .aui_s, .aui_se { background:rgba(0, 0, 0, .4); background:#000\9!important; filter:alpha(opacity=40); }
.aui_state_lock .aui_nw, .aui_state_lock .aui_n, .aui_state_lock .aui_ne, .aui_state_lock .aui_w, .aui_state_lock .aui_e, .aui_state_lock .aui_sw, .aui_state_lock .aui_s, .aui_state_lock .aui_se { background:rgba(0, 0, 0, .5); background:#000\9!important; filter:alpha(opacity=50); }
.aui_state_focus .aui_dialog { box-shadow: 0 0 3px rgba(0, 0, 0, 0.4); }
.aui_state_focus .aui_outer { box-shadow: 0 2px 3px rgba(0, 0, 0, 0.1); }
.aui_state_lock .aui_border { box-shadow:0 3px 26px rgba(0, 0, 0, .9); }
.aui_state_drag .aui_outer, .aui_outer:active { box-shadow:none; }
.aui_titleBar { position:relative; height:100%; }
.aui_title { height:28px; line-height:27px; padding:0 28px 0 10px; text-shadow:0 1px 0 rgba(255, 255, 255, .7); background-color:#edf5f8; font-weight:bold; color:#95a7ae; font-family: Tahoma, Arial/9!important; background-color:#bdc6cd; background: linear-gradient(top, #edf5f8, #bdc6cd); background: -moz-linear-gradient(top, #edf5f8, #bdc6cd); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#edf5f8), to(#bdc6cd)); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#edf5f8', endColorstr='#bdc6cd'); border-top:1px solid #edf5f8; border-bottom:1px solid #b6bec5; }
.aui_state_focus .aui_title { color:#4c5a5f; }
.aui_state_drag .aui_title { background: linear-gradient(top, #bdc6cd, #edf5f8); background: -moz-linear-gradient(top, #bdc6cd, #edf5f8); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#bdc6cd), to(#edf5f8)); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#bdc6cd', endColorstr='#edf5f8'); box-shadow:none; }
.aui_state_drag .aui_titleBar { box-shadow:none; }
.aui_close { padding:0; top:4px; right:4px; width:21px; height:21px; line-height:21px; font-size:18px; color:#68767b; text-align:center; font-family: Helvetica, STHeiti; _font-family: Tahoma, '\u9ed1\u4f53', 'Book Antiqua', Palatino; text-shadow:0 1px 0 rgba(255, 255, 255, .9); }
.aui_close:hover { background:#C72015; color:#FFF; }
.aui_close:active { box-shadow: none; }
.aui_content { color:#666; }
.aui_state_focus .aui_content { color:#000; }
.aui_buttons { background-color:#F6F6F6; border-top:solid 1px #DADEE5; }
.aui_state_noTitle .aui_nw, .aui_state_noTitle .aui_ne, .aui_state_noTitle .aui_sw, .aui_state_noTitle .aui_se { width:3px; height:3px; }
.aui_state_noTitle .aui_inner { border:1px solid #666; background:#FFF; }
.aui_state_noTitle .aui_outer { border:none 0; box-shadow:none; }
.aui_state_noTitle .aui_nw, .aui_state_noTitle .aui_n, .aui_state_noTitle .aui_ne, .aui_state_noTitle .aui_w, .aui_state_noTitle .aui_e, .aui_state_noTitle .aui_sw, .aui_state_noTitle .aui_s, .aui_state_noTitle .aui_se { background:rgba(0, 0, 0, .05); background:#000\9!important; filter:alpha(opacity=5)!important; }
.aui_state_noTitle .aui_titleBar { bottom:0; _bottom:0; _margin-top:0; }
.aui_state_noTitle .aui_close { top:0; right:0; width:18px; height:18px; line-height:18px; text-align:center; text-indent:0; font-size:18px; text-decoration:none; color:#214FA3; background:none; filter:!important; }
.aui_state_noTitle .aui_close:hover, .aui_state_noTitle .aui_close:active { text-decoration:none; color:#900; }
.aui_state_noTitle .aui_dialog { box-shadow: none; }
\ No newline at end of file
@charset "utf-8";
/*
* artDialog skin
* http://code.google.com/p/artdialog/
* (c) 2009-2011 TangBin, http://www.planeArt.cn
*
* This is licensed under the GNU LGPL, version 2.1 or later.
* For details, see: http://creativecommons.org/licenses/LGPL/2.1/
*/
/* common start */
body { _margin:0; _height:100%; /*IE6 BUG*/ }
.aui_outer { text-align:left; }
table.aui_border, table.aui_dialog { border:0; margin:0; border-collapse:collapse; width:auto; }
.aui_nw, .aui_n, .aui_ne, .aui_w, .aui_c, .aui_e, .aui_sw, .aui_s, .aui_se, .aui_header, .aui_tdIcon, .aui_main, .aui_footer { padding:0; }
.aui_header, .aui_buttons button { font: 12px/1.11 'Microsoft Yahei', Tahoma, Arial, Helvetica, STHeiti; _font-family:Tahoma,Arial,Helvetica,STHeiti; -o-font-family: Tahoma, Arial; }
.aui_title { overflow:hidden; text-overflow: ellipsis; }
.aui_state_noTitle .aui_title { display:none; }
.aui_close { display:block; position:absolute; text-decoration:none; outline:none; _cursor:pointer; }
.aui_close:hover { text-decoration:none; }
.aui_main { text-align:center; min-width:9em; min-width:0 \9/*IE8 BUG*/; }
.aui_content { display:inline-block; *zoom:1; *display:inline; text-align:left; border:none 0; }
.aui_content.aui_state_full { display:block; width:100%; margin:0; padding:0!important; height:100%; }
.aui_loading { width:96px; height:32px; text-align:left; text-indent:-999em; overflow:hidden; background:url(icons/loading.gif) no-repeat center center; }
.aui_icon { vertical-align: middle; }
.aui_icon div { width:48px; height:48px; margin:10px 0 10px 10px; background-position: center center; background-repeat:no-repeat; }
.aui_buttons { padding:8px; text-align:right; white-space:nowrap; }
.aui_buttons button { margin-left:15px; padding: 6px 8px; cursor: pointer; display: inline-block; text-align: center; line-height: 1; *padding:4px 10px; *height:2em; letter-spacing:2px; font-family: Tahoma, Arial/9!important; width:auto; overflow:visible; *width:1; color: #333; border: solid 1px #999; border-radius: 5px; background: #DDD; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFF', endColorstr='#DDDDDD'); background: linear-gradient(top, #FFF, #DDD); background: -moz-linear-gradient(top, #FFF, #DDD); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#FFF), to(#DDD)); text-shadow: 0px 1px 1px rgba(255, 255, 255, 1); box-shadow: 0 1px 0 rgba(255, 255, 255, .7), 0 -1px 0 rgba(0, 0, 0, .09); -moz-transition:-moz-box-shadow linear .2s; -webkit-transition: -webkit-box-shadow linear .2s; transition: box-shadow linear .2s; }
.aui_buttons button::-moz-focus-inner{ border:0; padding:0; margin:0; }
.aui_buttons button:focus { outline:none 0; border-color:#426DC9; box-shadow:0 0 8px rgba(0, 50, 0, .7); }
.aui_buttons button:hover { color:#000; border-color:#666; }
.aui_buttons button:active { border-color:#666; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#DDDDDD', endColorstr='#FFFFFF'); background: linear-gradient(top, #DDD, #FFF); background: -moz-linear-gradient(top, #DDD, #FFF); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#DDD), to(#FFF)); box-shadow:inset 0 1px 5px rgba(0, 50, 0, .7), inset 0 1px 1em rgba(0, 0, 0, .3); }
.aui_buttons button[disabled] { cursor:default; color:#666; background:#DDD; border: solid 1px #999; filter:alpha(opacity=50); opacity:.5; box-shadow:none; }
button.aui_state_highlight { color: #FFF; border: solid 1px #679a10; background: #7cb61b; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#98d237', endColorstr='#7cb61b'); background: linear-gradient(top, #98d237, #7cb61b); background: -moz-linear-gradient(top, #98d237, #7cb61b); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#98d237), to(#7cb61b)); text-shadow: -1px -1px 1px #679a10; }
button.aui_state_highlight:focus { border-color:#679a10; }
button.aui_state_highlight:hover { color:#FFF; border-color:#3c5412; }
button.aui_state_highlight:active { border-color:#3c5412; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#98d237', endColorstr='#7cb61b'); background: linear-gradient(top, #98d237, #7cb61b); background: -moz-linear-gradient(top, #98d237, #7cb61b); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#98d237), to(#7cb61b)); }
/* common end */
.aui_inner { background:#f7f7f7; }
.aui_titleBar { width:100%; height:0; position:relative; bottom:30px; _bottom:0; _margin-top:-30px; }
.aui_title { height:29px; line-height:29px; padding:0 25px 0 0; _padding:0; text-indent:5px; color:#FFF; font-weight:700; text-shadow:-1px -1px 0 rgba(0, 50, 0, .7); }
.aui_nw, .aui_ne, .aui_sw, .aui_se, .aui_n, .aui_s, .aui_close { background-image:url(green/bg.png); background-repeat:no-repeat; }
.aui_nw { width:15px; height:38px; background-position: 0 0; _png:green/ie6/nw.png; }
.aui_ne { width:15px; height:38px; background-position: -15px 0; _png:green/ie6/ne.png; }
.aui_sw { width:15px; height:18px; background-position: 0 -38px; _png:green/ie6/sw.png; }
.aui_se { width:15px; height:18px; background-position: -15px -38px; _png:green/ie6/se.png; }
.aui_close { top:4px; right:4px; _z-index:1; width:20px; height:20px; _font-size:0; _line-height:0; text-indent:-9999em; background-position:0 -112px; _png:green/ie6/close.png; }
.aui_close:hover { background-position:0 -132px; }
.aui_n, .aui_s { background-repeat:repeat-x; }
.aui_n { background-position: 0 -56px; _png:green/ie6/n.png; }
.aui_s { background-position: 0 -94px; _png:green/ie6/s.png; }
.aui_w, .aui_e { background-image:url(green/bg2.png); background-repeat:repeat-y; }
.aui_w { background-position:left top; _png:green/ie6/w.png; }
.aui_e { background-position: right bottom; _png:green/ie6/e.png; }
aui_icon, .aui_main { padding-top:3px; }
@media screen and (min-width:0) {
.aui_outer { border-radius:8px; box-shadow:0 5px 15px rgba(0, 50, 0, .4); -moz-transition:-moz-box-shadow linear .2s; -webkit-transition: -webkit-box-shadow linear .2s; transition: -webkit-box-shadow linear .2s; }
.aui_state_lock .aui_outer { box-shadow:0 3px 26px rgba(0, 0, 0, .9); }
.aui_outer:active { box-shadow:0 0 5px rgba(0, 50, 0, .1)!important; }
.aui_state_drag .aui_outer { box-shadow:none!important; }
.aui_nw, .aui_ne, .aui_sw, .aui_se, .aui_n, .aui_s, .aui_close { background-image:url(green/bg_css3.png); }
.aui_nw { width:5px; height:31px; }
.aui_ne { width:5px; height:31px; background-position: -5px 0; _png:green/ie6/ne.png; }
.aui_sw { width:5px; height:5px;background-position: 0 -31px; }
.aui_se { width:5px; height:5px; background-position: -5px -31px; }
.aui_close { background-position:0 -72px; }
.aui_close:hover { background-position:0 -92px; }
.aui_n { background-position: 0 -36px; }
.aui_s { background-position: 0 -67px; }
.aui_w, .aui_e { background-image:url(green/bg_css3_2.png); }
}
.aui_state_noTitle .aui_nw, .aui_state_noTitle .aui_ne, .aui_state_noTitle .aui_sw, .aui_state_noTitle .aui_se { width:3px; height:3px; }
.aui_state_noTitle .aui_inner { border:1px solid #666; background:#FFF; }
.aui_state_noTitle .aui_outer { box-shadow:none; }
.aui_state_noTitle .aui_nw, .aui_state_noTitle .aui_n, .aui_state_noTitle .aui_ne, .aui_state_noTitle .aui_w, .aui_state_noTitle .aui_e, .aui_state_noTitle .aui_sw, .aui_state_noTitle .aui_s, .aui_state_noTitle .aui_se { background:rgba(0, 0, 0, .05); background:#000\9!important; filter:alpha(opacity=5)!important; }
.aui_state_noTitle .aui_titleBar { bottom:0; _bottom:0; _margin-top:0; }
.aui_state_noTitle .aui_close { top:0; right:0; width:18px; height:18px; line-height:18px; text-align:center; text-indent:0; font-family: Helvetica, STHeiti; _font-family: '\u9ed1\u4f53', 'Book Antiqua', Palatino; font-size:18px; text-decoration:none; color:#214FA3; background:none; filter:!important; }
.aui_state_noTitle .aui_close:hover, .aui_state_noTitle .aui_close:active { text-decoration:none; color:#900; }
\ No newline at end of file
@charset "utf-8";
/*
* artDialog skin
* http://code.google.com/p/artdialog/
* (c) 2009-2011 TangBin, http://www.planeArt.cn
*
* This is licensed under the GNU LGPL, version 2.1 or later.
* For details, see: http://creativecommons.org/licenses/LGPL/2.1/
*/
/* common start */
body { _margin:0; _height:100%; /*IE6 BUG*/ }
.aui_outer { text-align:left; }
table.aui_border, table.aui_dialog { border:0; margin:0; border-collapse:collapse; width:auto; }
.aui_nw, .aui_n, .aui_ne, .aui_w, .aui_c, .aui_e, .aui_sw, .aui_s, .aui_se, .aui_header, .aui_tdIcon, .aui_main, .aui_footer { padding:0; }
.aui_header, .aui_buttons button { font: 12px/1.11 'Microsoft Yahei', Tahoma, Arial, Helvetica, STHeiti; _font-family:Tahoma,Arial,Helvetica,STHeiti; -o-font-family: Tahoma, Arial; }
.aui_title { overflow:hidden; text-overflow: ellipsis; }
.aui_state_noTitle .aui_title { display:none; }
.aui_close { display:block; position:absolute; text-decoration:none; outline:none; _cursor:pointer; }
.aui_close:hover { text-decoration:none; }
.aui_main { text-align:center; min-width:9em; min-width:0\9/*IE8 BUG*/; }
.aui_content { display:inline-block; *zoom:1; *display:inline; text-align:left; border:none 0; }
.aui_content.aui_state_full { display:block; width:100%; margin:0; padding:0!important; height:100%; }
.aui_loading { width:96px; height:32px; text-align:left; text-indent:-999em; overflow:hidden; background:url(icons/loading.gif) no-repeat center center; }
.aui_icon { vertical-align: middle; }
.aui_icon div { width:48px; height:48px; margin:10px 0 10px 10px; background-position: center center; background-repeat:no-repeat; }
.aui_buttons { padding:8px; text-align:right; white-space:nowrap; }
.aui_buttons button { margin-left:15px; padding: 6px 8px; cursor: pointer; display: inline-block; text-align: center; line-height: 1; *padding:4px 10px; *height:2em; letter-spacing:2px; font-family: Tahoma, Arial/9!important; width:auto; overflow:visible; *width:1; color: #333; border: solid 1px #999; border-radius: 5px; background: #DDD; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFF', endColorstr='#DDDDDD'); background: linear-gradient(top, #FFF, #DDD); background: -moz-linear-gradient(top, #FFF, #DDD); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#FFF), to(#DDD)); text-shadow: 0px 1px 1px rgba(255, 255, 255, 1); box-shadow: 0 1px 0 rgba(255, 255, 255, .7), 0 -1px 0 rgba(0, 0, 0, .09); -moz-transition:-moz-box-shadow linear .2s; -webkit-transition: -webkit-box-shadow linear .2s; transition: box-shadow linear .2s; }
.aui_buttons button::-moz-focus-inner{ border:0; padding:0; margin:0; }
.aui_buttons button:focus { outline:none 0; border-color:#426DC9; box-shadow:0 0 8px rgba(66, 109, 201, .9); }
.aui_buttons button:hover { color:#000; border-color:#666; }
.aui_buttons button:active { border-color:#666; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#DDDDDD', endColorstr='#FFFFFF'); background: linear-gradient(top, #DDD, #FFF); background: -moz-linear-gradient(top, #DDD, #FFF); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#DDD), to(#FFF)); box-shadow:inset 0 1px 5px rgba(66, 109, 201, .9), inset 0 1px 1em rgba(0, 0, 0, .3); }
.aui_buttons button[disabled] { cursor:default; color:#666; background:#DDD; border: solid 1px #999; filter:alpha(opacity=50); opacity:.5; box-shadow:none; }
button.aui_state_highlight { color: #FFF; border: solid 1px #1c6a9e; background: #2288cc; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#33bbee', endColorstr='#2288cc'); background: linear-gradient(top, #33bbee, #2288cc); background: -moz-linear-gradient(top, #33bbee, #2288cc); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#33bbee), to(#2288cc)); text-shadow: -1px -1px 1px #1c6a9e; }
button.aui_state_highlight:hover { color:#FFF; border-color:#0F3A56; }
button.aui_state_highlight:active { border-color:#1c6a9e; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#33bbee', endColorstr='#2288cc'); background: linear-gradient(top, #33bbee, #2288cc); background: -moz-linear-gradient(top, #33bbee, #2288cc); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#33bbee), to(#2288cc)); }
/* common end */
.aui_inner { background:#FFF; }
.aui_titleBar { width:100%; }
.aui_title { position:absolute; left:0; top:0; width:100%; height:22px; text-align:left; text-indent:-999em; font-size:0; }
.aui_nw, .aui_ne, .aui_sw, .aui_se, .aui_n, .aui_s, .aui_close { background-image:url(idialog/idialog_s.png); background-repeat:no-repeat; }
.aui_nw { width:15px; height:15px; background-position: 0 0; _png:idialog/ie6/aui_nw.png; }
.aui_ne { width:15px; height:15px; background-position: -15px 0; _png:idialog/ie6/aui_ne.png; }
.aui_sw { width:15px; height:15px; background-position: 0 -15px; _png:idialog/ie6/aui_sw.png; }
.aui_se { width:15px; height:15px; background-position: -15px -15px; _png:idialog/ie6/aui_se.png; }
.aui_close { position:absolute; right:-8px; top:-8px; _z-index:1; width:34px; height:34px; _font-size:0; _line-height:0; text-indent:-9999em; background-position:0 -60px; _png:idialog/ie6/aui_close.png; }
.aui_close:hover { background-position:0 -94px; _png:idialog/ie6/aui_close.hover.png; }
.aui_n, .aui_s { background-repeat:repeat-x; }
.aui_n { background-position: 0 -30px; _png:idialog/ie6/aui_n.png; }
.aui_s { background-position: 0 -45px; _png:idialog/ie6/aui_s.png; }
.aui_w, .aui_e { background-image:url(idialog/idialog_s2.png); background-repeat:repeat-y; }
.aui_w { background-position:left top; _png:idialog/ie6/aui_w.png; }
.aui_e { background-position: right bottom; _png:idialog/ie6/aui_e.png; }
@media screen and (min-width:0) {/* css3 */
.aui_nw, .aui_ne, .aui_sw, .aui_se{ width:5px; height:5px; }
.aui_nw, .aui_n, .aui_ne, .aui_w, .aui_e, .aui_sw, .aui_s, .aui_se { background:none; }
.aui_sw, .aui_s, .aui_se { background:url(idialog/idialog_s.png) repeat-x 0 -45px; }
.aui_sw { border-radius:0 0 0 5px; }
.aui_se { border-radius:0 0 5px 0; }
.aui_outer { border:1px solid #929292; border-radius:5px; box-shadow:0 3px 8px rgba(0, 0, 0, .2); -moz-transition:-moz-box-shadow linear .2s; -webkit-transition: -webkit-box-shadow linear .2s; transition: -webkit-box-shadow linear .2s; }
.aui_border { border-radius:5px; background:#FFF; }
.aui_state_drag .aui_outer { box-shadow:none; }
.aui_state_lock .aui_outer { box-shadow:0 3px 26px rgba(0, 0, 0, .9); }
.aui_outer:active { box-shadow:0 0 5px rgba(0, 0, 0, .1)!important; }
.aui_state_drag .aui_outer { box-shadow:none!important; }
.aui_close { right:-16px; top:-16px; }
}
@media screen and (-webkit-min-device-pixel-ratio:0) {/* apple | webkit */
.aui_close { right:auto; left:-16px; top:-16px; }
}
@charset "utf-8";
/*
* artDialog skin
* http://code.google.com/p/artdialog/
* (c) 2009-2011 TangBin, http://www.planeArt.cn
*
* This is licensed under the GNU LGPL, version 2.1 or later.
* For details, see: http://creativecommons.org/licenses/LGPL/2.1/
*/
/* common start */
body { _margin:0; _height:100%; /*IE6 BUG*/ }
.aui_outer { text-align:left; }
table.aui_border, table.aui_dialog { border:0; margin:0; border-collapse:collapse; width:auto; }
.aui_nw, .aui_n, .aui_ne, .aui_w, .aui_c, .aui_e, .aui_sw, .aui_s, .aui_se, .aui_header, .aui_tdIcon, .aui_main, .aui_footer { padding:0; }
.aui_header, .aui_buttons button { font: 12px/1.11 'Microsoft Yahei', Tahoma, Arial, Helvetica, STHeiti; _font-family:Tahoma,Arial,Helvetica,STHeiti; -o-font-family: Tahoma, Arial; }
.aui_title { overflow:hidden; text-overflow: ellipsis; }
.aui_state_noTitle .aui_title { display:none; }
.aui_close { display:block; position:absolute; text-decoration:none; outline:none; _cursor:pointer; }
.aui_close:hover { text-decoration:none; }
.aui_main { text-align:center; min-width:9em; min-width:0\9/*IE8 BUG*/; }
.aui_content { display:inline-block; *zoom:1; *display:inline; text-align:left; border:none 0; }
.aui_content.aui_state_full { display:block; width:100%; margin:0; padding:0!important; height:100%; }
.aui_loading { width:96px; height:32px; text-align:left; text-indent:-999em; overflow:hidden; background:url(icons/loading.gif) no-repeat center center; }
.aui_icon { vertical-align: middle; }
.aui_icon div { width:48px; height:48px; margin:10px 0 10px 10px; background-position: center center; background-repeat:no-repeat; }
.aui_buttons { padding:8px; text-align:right; white-space:nowrap; }
.aui_buttons button { margin-left:15px; padding: 6px 8px; cursor: pointer; display: inline-block; text-align: center; line-height: 1; *padding:4px 10px; *height:2em; letter-spacing:2px; font-family: Tahoma, Arial/9!important; width:auto; overflow:visible; *width:1; color: #333; border: solid 1px #999; border-radius: 5px; background: #DDD; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFF', endColorstr='#DDDDDD'); background: linear-gradient(top, #FFF, #DDD); background: -moz-linear-gradient(top, #FFF, #DDD); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#FFF), to(#DDD)); text-shadow: 0px 1px 1px rgba(255, 255, 255, 1); box-shadow: 0 1px 0 rgba(255, 255, 255, .7), 0 -1px 0 rgba(0, 0, 0, .09); -moz-transition:-moz-box-shadow linear .2s; -webkit-transition: -webkit-box-shadow linear .2s; transition: box-shadow linear .2s; }
.aui_buttons button::-moz-focus-inner{ border:0; padding:0; margin:0; }
.aui_buttons button:focus { outline:none 0; border-color:#426DC9; box-shadow:0 0 8px rgba(66, 109, 201, .9); }
.aui_buttons button:hover { color:#000; border-color:#666; }
.aui_buttons button:active { border-color:#666; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#DDDDDD', endColorstr='#FFFFFF'); background: linear-gradient(top, #DDD, #FFF); background: -moz-linear-gradient(top, #DDD, #FFF); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#DDD), to(#FFF)); box-shadow:inset 0 1px 5px rgba(66, 109, 201, .9), inset 0 1px 1em rgba(0, 0, 0, .3); }
.aui_buttons button[disabled] { cursor:default; color:#666; background:#DDD; border: solid 1px #999; filter:alpha(opacity=50); opacity:.5; box-shadow:none; }
button.aui_state_highlight { color: #FFF; border: solid 1px #1c6a9e; background: #2288cc; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#33bbee', endColorstr='#2288cc'); background: linear-gradient(top, #33bbee, #2288cc); background: -moz-linear-gradient(top, #33bbee, #2288cc); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#33bbee), to(#2288cc)); text-shadow: -1px -1px 1px #1c6a9e; }
button.aui_state_highlight:hover { color:#FFF; border-color:#0F3A56; }
button.aui_state_highlight:active { border-color:#1c6a9e; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#33bbee', endColorstr='#2288cc'); background: linear-gradient(top, #33bbee, #2288cc); background: -moz-linear-gradient(top, #33bbee, #2288cc); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#33bbee), to(#2288cc)); }
/* common end */
.aui_inner { background:#f0f1f9; }
.aui_titleBar { width:100%; height:0; position:relative; bottom:27px; _bottom:0; _margin-top:-27px; }
.aui_title { height:27px; line-height:27px; padding:0 37px 0 0; _padding:0; color:#333; text-shadow:1px 1px 0 rgba(255, 255, 255, .7); }
.aui_nw, .aui_ne, .aui_sw, .aui_se, .aui_n, .aui_s, .aui_close { background-image:url(opera/s1.png); background-repeat:no-repeat; }
.aui_nw { width:15px; height:32px; background-position: 0 0; _png:opera/ie6/aui_nw.png; }
.aui_ne { width:15px; height:32px; background-position: -15px 0; _png:opera/ie6/aui_ne.png; }
.aui_sw { width:15px; height:15px; background-position: 0 -33px; _png:opera/ie6/aui_sw.png; }
.aui_se { width:15px; height:15px; background-position: -15px -33px; _png:opera/ie6/aui_se.png; }
.aui_close { top:0; right:0; _z-index:1; width:27px; height:27px; _font-size:0; _line-height:0; *zoom:1; text-indent:-9999em; background-position:0 -96px; _png:opera/ie6/aui_close.png; }
.aui_close:hover { background-position:0 -123px; _png:opera/ie6/aui_close.hover.png; }
.aui_n, .aui_s { background-repeat:repeat-x; }
.aui_n { background-position: 0 -48px; _png:opera/ie6/aui_n.png; }
.aui_s { background-position: 0 -81px; _png:opera/ie6/aui_s.png; }
.aui_w, .aui_e { background-image:url(opera/s2.png); background-repeat:repeat-y; }
.aui_w { background-position:left top; _png:opera/ie6/aui_w.png; }
.aui_e { background-position: right bottom; _png:opera/ie6/aui_e.png; }
.aui_icon, .aui_main { padding-top:10px; }
.aui_state_noTitle .aui_nw, .aui_state_noTitle .aui_ne, .aui_state_noTitle .aui_sw, .aui_state_noTitle .aui_se { width:3px; height:3px; }
.aui_state_noTitle .aui_inner { border:1px solid #666; background:#FFF; }
.aui_state_noTitle .aui_outer { box-shadow:none; }
.aui_state_noTitle .aui_nw, .aui_state_noTitle .aui_n, .aui_state_noTitle .aui_ne, .aui_state_noTitle .aui_w, .aui_state_noTitle .aui_e, .aui_state_noTitle .aui_sw, .aui_state_noTitle .aui_s, .aui_state_noTitle .aui_se { background:rgba(0, 0, 0, .05); background:#000\9!important; filter:alpha(opacity=5)!important; }
.aui_state_noTitle .aui_titleBar { bottom:0; _bottom:0; _margin-top:0; }
.aui_state_noTitle .aui_close { top:0; right:0; width:18px; height:18px; line-height:18px; text-align:center; text-indent:0; font-family: Helvetica, STHeiti; _font-family: '\u9ed1\u4f53', 'Book Antiqua', Palatino; font-size:18px; text-decoration:none; color:#214FA3; background:none; filter:!important; }
.aui_state_noTitle .aui_close:hover, .aui_state_noTitle .aui_close:active { text-decoration:none; color:#900; }
\ No newline at end of file
@charset "utf-8";
/*
* artDialog skin
* http://code.google.com/p/artdialog/
* (c) 2009-2011 TangBin, http://www.planeArt.cn
*
* This is licensed under the GNU LGPL, version 2.1 or later.
* For details, see: http://creativecommons.org/licenses/LGPL/2.1/
*/
/* common start */
body { _margin:0; _height:100%; /*IE6 BUG*/ }
.aui_outer { text-align:left; }
table.aui_border, table.aui_dialog { border:0; margin:0; border-collapse:collapse; width:auto; }
.aui_nw, .aui_n, .aui_ne, .aui_w, .aui_c, .aui_e, .aui_sw, .aui_s, .aui_se, .aui_header, .aui_tdIcon, .aui_main, .aui_footer { padding:0; }
.aui_header, .aui_buttons button { font: 12px/1.11 'Microsoft Yahei', Tahoma, Arial, Helvetica, STHeiti; _font-family:Tahoma,Arial,Helvetica,STHeiti; -o-font-family: Tahoma, Arial; }
.aui_title { overflow:hidden; text-overflow: ellipsis; }
.aui_state_noTitle .aui_title { display:none; }
.aui_close { display:block; position:absolute; text-decoration:none; outline:none; _cursor:pointer; }
.aui_close:hover { text-decoration:none; }
.aui_main { text-align:center; min-width:9em; min-width:0\9/*IE8 BUG*/; }
.aui_content { display:inline-block; *zoom:1; *display:inline; text-align:left; border:none 0; }
.aui_content.aui_state_full { display:block; width:100%; margin:0; padding:0!important; height:100%; }
.aui_loading { width:96px; height:32px; text-align:left; text-indent:-999em; overflow:hidden; background:url(icons/loading.gif) no-repeat center center; }
.aui_icon { vertical-align: middle; }
.aui_icon div { width:48px; height:48px; margin:10px 0 10px 10px; background-position: center center; background-repeat:no-repeat; }
.aui_buttons { padding:8px; text-align:right; white-space:nowrap; }
.aui_buttons button { margin-left:15px; padding: 6px 8px; cursor: pointer; display: inline-block; text-align: center; line-height: 1; *padding:4px 10px; *height:2em; letter-spacing:2px; font-family: Tahoma, Arial/9!important; width:auto; overflow:visible; *width:1; color: #333; border: solid 1px #999; border-radius: 5px; background: #DDD; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFF', endColorstr='#DDDDDD'); background: linear-gradient(top, #FFF, #DDD); background: -moz-linear-gradient(top, #FFF, #DDD); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#FFF), to(#DDD)); text-shadow: 0px 1px 1px rgba(255, 255, 255, 1); box-shadow: 0 1px 0 rgba(255, 255, 255, .7), 0 -1px 0 rgba(0, 0, 0, .09); -moz-transition:-moz-box-shadow linear .2s; -webkit-transition: -webkit-box-shadow linear .2s; transition: box-shadow linear .2s; }
.aui_buttons button::-moz-focus-inner{ border:0; padding:0; margin:0; }
.aui_buttons button:focus { outline:none 0; border-color:#426DC9; box-shadow:0 0 8px rgba(66, 109, 201, .9); }
.aui_buttons button:hover { color:#000; border-color:#666; }
.aui_buttons button:active { border-color:#666; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#DDDDDD', endColorstr='#FFFFFF'); background: linear-gradient(top, #DDD, #FFF); background: -moz-linear-gradient(top, #DDD, #FFF); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#DDD), to(#FFF)); box-shadow:inset 0 1px 5px rgba(66, 109, 201, .9), inset 0 1px 1em rgba(0, 0, 0, .3); }
.aui_buttons button[disabled] { cursor:default; color:#666; background:#DDD; border: solid 1px #999; filter:alpha(opacity=50); opacity:.5; box-shadow:none; }
button.aui_state_highlight { color: #FFF; border: solid 1px #1c6a9e; background: #2288cc; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#33bbee', endColorstr='#2288cc'); background: linear-gradient(top, #33bbee, #2288cc); background: -moz-linear-gradient(top, #33bbee, #2288cc); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#33bbee), to(#2288cc)); text-shadow: -1px -1px 1px #1c6a9e; }
button.aui_state_highlight:hover { color:#FFF; border-color:#0F3A56; }
button.aui_state_highlight:active { border-color:#1c6a9e; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#33bbee', endColorstr='#2288cc'); background: linear-gradient(top, #33bbee, #2288cc); background: -moz-linear-gradient(top, #33bbee, #2288cc); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#33bbee), to(#2288cc)); }
/* common end */
.aui_inner { background:#FFF; border:1px solid #666; }
.aui_nw, .aui_ne, .aui_sw, .aui_se { width:3px; height:3px; }
.aui_nw, .aui_n, .aui_ne, .aui_w, .aui_e, .aui_sw, .aui_s, .aui_se { background:rgba(0, 0, 0, .05); background:#000\9!important; filter:alpha(opacity=5); }
.aui_titleBar { position:relative; height:100%; }
.aui_title { position:absolute; top:0; left:0; width:100%; height:24px; text-indent:-9999em; overflow:hidden; font-size:0; }
.aui_state_drag .aui_title { color:#666; }
.aui_close { padding:0; top:0; right:0; width:18px; height:18px; line-height:18px; text-align:center; font-family: Helvetica, STHeiti; _font-family: '\u9ed1\u4f53', 'Book Antiqua', Palatino; font-size:18px; text-decoration:none; color:#214FA3; }
.aui_close:hover, .aui_close:active { text-decoration:none; color:#900; }
.aui_content { color:#666; }
.aui_state_focus .aui_content { color:#000; }
@media screen and (min-width:0) {
.aui_close { width:20px; height:20px; line-height:20px; right:-10px; top:-10px; border-radius:20px; background:#999; color:#FFF; box-shadow:0 1px 3px rgba(0, 0, 0, .3); -moz-transition: linear .06s; -webkit-transition: linear .06s; transition: linear .06s; }
.aui_close:hover { width:24px; height:24px; line-height:24px; right:-12px; top:-12px; color:#FFF; box-shadow:0 1px 3px rgba(209, 40, 42, .5); background:#d1282a; border-radius:24px; }
.aui_state_lock .aui_dialog { box-shadow:0 3px 26px rgba(0, 0, 0, .9); -moz-transition:-moz-box-shadow linear .2s; -webkit-transition: -webkit-box-shadow linear .2s; transition: -webkit-box-shadow linear .2s; }
.aui_dialog:active { box-shadow:0 0 5px rgba(0, 0, 0, .1)!important; }
.aui_state_drag .aui_outer { box-shadow:none!important; }
}
@charset "utf-8";
/*
* artDialog skin
* http://code.google.com/p/artdialog/
* (c) 2009-2011 TangBin, http://www.planeArt.cn
*
* This is licensed under the GNU LGPL, version 2.1 or later.
* For details, see: http://creativecommons.org/licenses/LGPL/2.1/
*/
/* common start */
body { _margin:0; _height:100%; /*IE6 BUG*/ }
.aui_outer { text-align:left; }
table.aui_border, table.aui_dialog { border:0; margin:0; border-collapse:collapse; width:auto; }
.aui_nw, .aui_n, .aui_ne, .aui_w, .aui_c, .aui_e, .aui_sw, .aui_s, .aui_se, .aui_header, .aui_tdIcon, .aui_main, .aui_footer { padding:0; }
.aui_header, .aui_buttons button { font: 12px/1.11 'Microsoft Yahei', Tahoma, Arial, Helvetica, STHeiti; _font-family:Tahoma,Arial,Helvetica,STHeiti; -o-font-family: Tahoma, Arial; }
.aui_title { overflow:hidden; text-overflow: ellipsis; }
.aui_state_noTitle .aui_title { display:none; }
.aui_close { display:block; position:absolute; text-decoration:none; outline:none; _cursor:pointer; }
.aui_close:hover { text-decoration:none; }
.aui_main { text-align:center; min-width:9em; min-width:0\9/*IE8 BUG*/; }
.aui_content { display:inline-block; *zoom:1; *display:inline; text-align:left; border:none 0; }
.aui_content.aui_state_full { display:block; width:100%; margin:0; padding:0!important; height:100%; }
.aui_loading { width:96px; height:32px; text-align:left; text-indent:-999em; overflow:hidden; background:url(icons/loading.gif) no-repeat center center; }
.aui_icon { vertical-align: middle; }
.aui_icon div { width:48px; height:48px; margin:10px 0 10px 10px; background-position: center center; background-repeat:no-repeat; }
.aui_buttons { padding:8px; text-align:right; white-space:nowrap; }
.aui_buttons button { margin-left:15px; padding: 6px 8px; cursor: pointer; display: inline-block; text-align: center; line-height: 1; *padding:4px 10px; *height:2em; letter-spacing:2px; font-family: Tahoma, Arial/9!important; width:auto; overflow:visible; *width:1; color: #333; border: solid 1px #999; border-radius: 5px; background: #DDD; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFF', endColorstr='#DDDDDD'); background: linear-gradient(top, #FFF, #DDD); background: -moz-linear-gradient(top, #FFF, #DDD); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#FFF), to(#DDD)); text-shadow: 0px 1px 1px rgba(255, 255, 255, 1); box-shadow: 0 1px 0 rgba(255, 255, 255, .7), 0 -1px 0 rgba(0, 0, 0, .09); -moz-transition:-moz-box-shadow linear .2s; -webkit-transition: -webkit-box-shadow linear .2s; transition: box-shadow linear .2s; }
.aui_buttons button::-moz-focus-inner{ border:0; padding:0; margin:0; }
.aui_buttons button:focus { outline:none 0; border-color:#426DC9; box-shadow:0 0 8px rgba(66, 109, 201, .9); }
.aui_buttons button:hover { color:#000; border-color:#666; }
.aui_buttons button:active { border-color:#666; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#DDDDDD', endColorstr='#FFFFFF'); background: linear-gradient(top, #DDD, #FFF); background: -moz-linear-gradient(top, #DDD, #FFF); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#DDD), to(#FFF)); box-shadow:inset 0 1px 5px rgba(66, 109, 201, .9), inset 0 1px 1em rgba(0, 0, 0, .3); }
.aui_buttons button[disabled] { cursor:default; color:#666; background:#DDD; border: solid 1px #999; filter:alpha(opacity=50); opacity:.5; box-shadow:none; }
button.aui_state_highlight { color: #FFF; border: solid 1px #1c6a9e; background: #2288cc; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#33bbee', endColorstr='#2288cc'); background: linear-gradient(top, #33bbee, #2288cc); background: -moz-linear-gradient(top, #33bbee, #2288cc); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#33bbee), to(#2288cc)); text-shadow: -1px -1px 1px #1c6a9e; }
button.aui_state_highlight:hover { color:#FFF; border-color:#0F3A56; }
button.aui_state_highlight:active { border-color:#1c6a9e; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#33bbee', endColorstr='#2288cc'); background: linear-gradient(top, #33bbee, #2288cc); background: -moz-linear-gradient(top, #33bbee, #2288cc); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#33bbee), to(#2288cc)); }
/* common end */
.aui_inner { background:rgba(0, 0, 0, .7); }
.aui_dialog { background:#FFF; border-radius:3px; }
.aui_outer { border:1px solid #000; border-radius:5px; box-shadow: 0 3px 0 rgba(0,0,0,0.1); -moz-transition:-moz-box-shadow linear .2s; -webkit-transition: -webkit-box-shadow linear .2s; transition: -webkit-box-shadow linear .2s; }
.aui_state_lock .aui_outer { box-shadow:0 3px 26px rgba(0, 0, 0, .9); }
.aui_outer:active { box-shadow:none!important; }
.aui_state_drag .aui_outer { box-shadow:none!important; }
.aui_border { border-radius:3px; }
.aui_nw, .aui_ne { width:5px; height:37px; }
.aui_sw, .aui_se { width:5px; height:5px; }
.aui_nw, .aui_n, .aui_ne, .aui_w, .aui_e, .aui_sw, .aui_s, .aui_se { background:rgba(0, 0, 0, .7); background:#000\9!important; filter:alpha(opacity=70); }
.aui_titleBar { width:100%; height:0; position:relative; bottom:33px; _bottom:0; _margin-top:-33px; }
.aui_title { height:27px; line-height:27px; padding:0 16px 0 5px; color:#FFF; font-weight:700; text-shadow:0 1px 0 #000; }
.aui_close { padding:0; top:2px; right:5px; width:21px; height:21px; line-height:21px; font-size:18px; text-align:center; color:#EBEBEB; font-family: Helvetica, STHeiti; _font-family: Tahoma, '\u9ed1\u4f53', 'Book Antiqua', Palatino; border:1px solid transparent; _border:0 none; background:#000; border-radius:15px; }
.aui_state_drag .aui_close { color:#FFF; }
.aui_close:hover { background:#C72015; border:1px solid #000; _border:0 none; box-shadow: 0 1px 0 rgba(255, 255, 255, .3), inset 0 1px 0 rgba(255, 255, 255, .3); }
.aui_close:active { box-shadow: none; }
.aui_state_noTitle { }
.aui_content { color:#666; }
.aui_state_noTitle .aui_nw, .aui_state_noTitle .aui_ne { height:5px; }
.aui_state_noTitle .aui_titleBar { bottom:0; _bottom:0; _margin-top:0; }
.aui_state_noTitle .aui_close { top:5px; }
/**菜单跳转**/
function rightMain(url){
$('#rightMain').attr('src', url);
}
/** 异步加载栋号列表 * */
function getFyDhListByFyXqCode() {
var fyXq = $("#fyXq").val();
if (fyXq == "" || fyXq == null) {
$("#fyDh").html('<option value="">--请选择--</option>');
} else {
/** 异步加载栋号列表 * */
$.ajax({
type : "POST",
url : "getFyDhListByFyXqCode.action",
data : {
"fyXqCode" : fyXq
},
dataType : "json",
success : function(data) {
// 如果返回数据不为空,更改“房源信息”
if (data == null || data == '') {// 如果为空
alert("该小区下暂无栋号列表,请联系\n管理员维护数据哦!!!");
$("#fyDh").html('<option value="">--请选择--</option>');
} else {
var str = '<option value="">--请选择--</option>';
// 将返回的数据赋给zTree
for (var i = 0; i < data.length; i++) {
str += '<option value="' + data[i].weiduID + '">'
+ data[i].weiduName + '</option>';
}
// alert(str);
$("#fyDh").html(str);
}
}
});
}
}
/*
* 是否全选
*/
function selectOrClearAllCheckbox(obj) {
var checkStatus = $(obj).attr("checked");
if (checkStatus == "checked") {
$("input[type='checkbox']").attr("checked", true);
} else {
$("input[type='checkbox']").attr("checked", false);
}
}
/** 日期函数,加几天,减几天 **/
function getNextDay(dd, dadd) {
// 可以加上错误处理
var a = new Date(dd);
a = a.valueOf();
a = a + dadd * 24 * 60 * 60 * 1000;
a = new Date(a);
var m = a.getMonth() + 1;
if (m.toString().length == 1) {
m = '0' + m;
}
var d = a.getDate();
if (d.toString().length == 1) {
d = '0' + d;
}
return a.getFullYear() + "-" + m + "-" + d;
}
/** table鼠标悬停换色* */
$(function() {
// 如果鼠标移到行上时,执行函数
$(".table tr").mouseover(function() {
$(this).css({background : "#CDDAEB"});
$(this).children('td').each(function(index, ele){
$(ele).css({color: "#1D1E21"});
});
}).mouseout(function() {
$(this).css({background : "#FFF"});
$(this).children('td').each(function(index, ele){
$(ele).css({color: "#909090"});
});
});
});
This source diff could not be displayed because it is too large. You can view the blob instead.
/*
* jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
*
* Uses the built in easing capabilities added In jQuery 1.1
* to offer multiple easing options
*
* TERMS OF USE - jQuery Easing
*
* Open source under the BSD License.
*
* Copyright © 2008 George McGinley Smith
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* Neither the name of the author nor the names of contributors may be used to endorse
* or promote products derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
// t: current time, b: begInnIng value, c: change In value, d: duration
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('h.i[\'1a\']=h.i[\'z\'];h.O(h.i,{y:\'D\',z:9(x,t,b,c,d){6 h.i[h.i.y](x,t,b,c,d)},17:9(x,t,b,c,d){6 c*(t/=d)*t+b},D:9(x,t,b,c,d){6-c*(t/=d)*(t-2)+b},13:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t+b;6-c/2*((--t)*(t-2)-1)+b},X:9(x,t,b,c,d){6 c*(t/=d)*t*t+b},U:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t+1)+b},R:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t+b;6 c/2*((t-=2)*t*t+2)+b},N:9(x,t,b,c,d){6 c*(t/=d)*t*t*t+b},M:9(x,t,b,c,d){6-c*((t=t/d-1)*t*t*t-1)+b},L:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t*t+b;6-c/2*((t-=2)*t*t*t-2)+b},K:9(x,t,b,c,d){6 c*(t/=d)*t*t*t*t+b},J:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t*t*t+1)+b},I:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t*t*t+b;6 c/2*((t-=2)*t*t*t*t+2)+b},G:9(x,t,b,c,d){6-c*8.C(t/d*(8.g/2))+c+b},15:9(x,t,b,c,d){6 c*8.n(t/d*(8.g/2))+b},12:9(x,t,b,c,d){6-c/2*(8.C(8.g*t/d)-1)+b},Z:9(x,t,b,c,d){6(t==0)?b:c*8.j(2,10*(t/d-1))+b},Y:9(x,t,b,c,d){6(t==d)?b+c:c*(-8.j(2,-10*t/d)+1)+b},W:9(x,t,b,c,d){e(t==0)6 b;e(t==d)6 b+c;e((t/=d/2)<1)6 c/2*8.j(2,10*(t-1))+b;6 c/2*(-8.j(2,-10*--t)+2)+b},V:9(x,t,b,c,d){6-c*(8.o(1-(t/=d)*t)-1)+b},S:9(x,t,b,c,d){6 c*8.o(1-(t=t/d-1)*t)+b},Q:9(x,t,b,c,d){e((t/=d/2)<1)6-c/2*(8.o(1-t*t)-1)+b;6 c/2*(8.o(1-(t-=2)*t)+1)+b},P:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d)==1)6 b+c;e(!p)p=d*.3;e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);6-(a*8.j(2,10*(t-=1))*8.n((t*d-s)*(2*8.g)/p))+b},H:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d)==1)6 b+c;e(!p)p=d*.3;e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);6 a*8.j(2,-10*t)*8.n((t*d-s)*(2*8.g)/p)+c+b},T:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d/2)==2)6 b+c;e(!p)p=d*(.3*1.5);e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);e(t<1)6-.5*(a*8.j(2,10*(t-=1))*8.n((t*d-s)*(2*8.g)/p))+b;6 a*8.j(2,-10*(t-=1))*8.n((t*d-s)*(2*8.g)/p)*.5+c+b},F:9(x,t,b,c,d,s){e(s==u)s=1.l;6 c*(t/=d)*t*((s+1)*t-s)+b},E:9(x,t,b,c,d,s){e(s==u)s=1.l;6 c*((t=t/d-1)*t*((s+1)*t+s)+1)+b},16:9(x,t,b,c,d,s){e(s==u)s=1.l;e((t/=d/2)<1)6 c/2*(t*t*(((s*=(1.B))+1)*t-s))+b;6 c/2*((t-=2)*t*(((s*=(1.B))+1)*t+s)+2)+b},A:9(x,t,b,c,d){6 c-h.i.v(x,d-t,0,c,d)+b},v:9(x,t,b,c,d){e((t/=d)<(1/2.k)){6 c*(7.q*t*t)+b}m e(t<(2/2.k)){6 c*(7.q*(t-=(1.5/2.k))*t+.k)+b}m e(t<(2.5/2.k)){6 c*(7.q*(t-=(2.14/2.k))*t+.11)+b}m{6 c*(7.q*(t-=(2.18/2.k))*t+.19)+b}},1b:9(x,t,b,c,d){e(t<d/2)6 h.i.A(x,t*2,0,c,d)*.5+b;6 h.i.v(x,t*2-d,0,c,d)*.5+c*.5+b}});',62,74,'||||||return||Math|function|||||if|var|PI|jQuery|easing|pow|75|70158|else|sin|sqrt||5625|asin|||undefined|easeOutBounce|abs||def|swing|easeInBounce|525|cos|easeOutQuad|easeOutBack|easeInBack|easeInSine|easeOutElastic|easeInOutQuint|easeOutQuint|easeInQuint|easeInOutQuart|easeOutQuart|easeInQuart|extend|easeInElastic|easeInOutCirc|easeInOutCubic|easeOutCirc|easeInOutElastic|easeOutCubic|easeInCirc|easeInOutExpo|easeInCubic|easeOutExpo|easeInExpo||9375|easeInOutSine|easeInOutQuad|25|easeOutSine|easeInOutBack|easeInQuad|625|984375|jswing|easeInOutBounce'.split('|'),0,{}))
/*
*
* TERMS OF USE - EASING EQUATIONS
*
* Open source under the BSD License.
*
* Copyright © 2001 Robert Penner
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* Neither the name of the author nor the names of contributors may be used to endorse
* or promote products derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/*
* FancyBox - jQuery Plugin
* Simple and fancy lightbox alternative
*
* Examples and documentation at: http://fancybox.net
*
* Copyright (c) 2008 - 2010 Janis Skarnelis
* That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support is greatly appreciated.
*
* Version: 1.3.4 (11/11/2010)
* Requires: jQuery v1.3+
*
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*/
;(function($) {
var tmp, loading, overlay, wrap, outer, content, close, title, nav_left, nav_right,
selectedIndex = 0, selectedOpts = {}, selectedArray = [], currentIndex = 0, currentOpts = {}, currentArray = [],
ajaxLoader = null, imgPreloader = new Image(), imgRegExp = /\.(jpg|gif|png|bmp|jpeg)(.*)?$/i, swfRegExp = /[^\.]\.(swf)\s*$/i,
loadingTimer, loadingFrame = 1,
titleHeight = 0, titleStr = '', start_pos, final_pos, busy = false, fx = $.extend($('<div/>')[0], { prop: 0 }),
isIE6 = $.browser.msie && $.browser.version < 7 && !window.XMLHttpRequest,
/*
* Private methods
*/
_abort = function() {
loading.hide();
imgPreloader.onerror = imgPreloader.onload = null;
if (ajaxLoader) {
ajaxLoader.abort();
}
tmp.empty();
},
_error = function() {
if (false === selectedOpts.onError(selectedArray, selectedIndex, selectedOpts)) {
loading.hide();
busy = false;
return;
}
selectedOpts.titleShow = false;
selectedOpts.width = 'auto';
selectedOpts.height = 'auto';
tmp.html( '<p id="fancybox-error">The requested content cannot be loaded.<br />Please try again later.</p>' );
_process_inline();
},
_start = function() {
var obj = selectedArray[ selectedIndex ],
href,
type,
title,
str,
emb,
ret;
_abort();
selectedOpts = $.extend({}, $.fn.fancybox.defaults, (typeof $(obj).data('fancybox') == 'undefined' ? selectedOpts : $(obj).data('fancybox')));
ret = selectedOpts.onStart(selectedArray, selectedIndex, selectedOpts);
if (ret === false) {
busy = false;
return;
} else if (typeof ret == 'object') {
selectedOpts = $.extend(selectedOpts, ret);
}
title = selectedOpts.title || (obj.nodeName ? $(obj).attr('title') : obj.title) || '';
if (obj.nodeName && !selectedOpts.orig) {
selectedOpts.orig = $(obj).children("img:first").length ? $(obj).children("img:first") : $(obj);
}
if (title === '' && selectedOpts.orig && selectedOpts.titleFromAlt) {
title = selectedOpts.orig.attr('alt');
}
href = selectedOpts.href || (obj.nodeName ? $(obj).attr('href') : obj.href) || null;
if ((/^(?:javascript)/i).test(href) || href == '#') {
href = null;
}
if (selectedOpts.type) {
type = selectedOpts.type;
if (!href) {
href = selectedOpts.content;
}
} else if (selectedOpts.content) {
type = 'html';
} else if (href) {
if (href.match(imgRegExp)) {
type = 'image';
} else if (href.match(swfRegExp)) {
type = 'swf';
} else if ($(obj).hasClass("iframe")) {
type = 'iframe';
} else if (href.indexOf("#") === 0) {
type = 'inline';
} else {
type = 'ajax';
}
}
if (!type) {
_error();
return;
}
if (type == 'inline') {
obj = href.substr(href.indexOf("#"));
type = $(obj).length > 0 ? 'inline' : 'ajax';
}
selectedOpts.type = type;
selectedOpts.href = href;
selectedOpts.title = title;
if (selectedOpts.autoDimensions) {
if (selectedOpts.type == 'html' || selectedOpts.type == 'inline' || selectedOpts.type == 'ajax') {
selectedOpts.width = 'auto';
selectedOpts.height = 'auto';
} else {
selectedOpts.autoDimensions = false;
}
}
if (selectedOpts.modal) {
selectedOpts.overlayShow = true;
selectedOpts.hideOnOverlayClick = false;
selectedOpts.hideOnContentClick = false;
selectedOpts.enableEscapeButton = false;
selectedOpts.showCloseButton = false;
}
selectedOpts.padding = parseInt(selectedOpts.padding, 10);
selectedOpts.margin = parseInt(selectedOpts.margin, 10);
tmp.css('padding', (selectedOpts.padding + selectedOpts.margin));
$('.fancybox-inline-tmp').unbind('fancybox-cancel').bind('fancybox-change', function() {
$(this).replaceWith(content.children());
});
switch (type) {
case 'html' :
tmp.html( selectedOpts.content );
_process_inline();
break;
case 'inline' :
if ( $(obj).parent().is('#fancybox-content') === true) {
busy = false;
return;
}
$('<div class="fancybox-inline-tmp" />')
.hide()
.insertBefore( $(obj) )
.bind('fancybox-cleanup', function() {
$(this).replaceWith(content.children());
}).bind('fancybox-cancel', function() {
$(this).replaceWith(tmp.children());
});
$(obj).appendTo(tmp);
_process_inline();
break;
case 'image':
busy = false;
$.fancybox.showActivity();
imgPreloader = new Image();
imgPreloader.onerror = function() {
_error();
};
imgPreloader.onload = function() {
busy = true;
imgPreloader.onerror = imgPreloader.onload = null;
_process_image();
};
imgPreloader.src = href;
break;
case 'swf':
selectedOpts.scrolling = 'no';
str = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="' + selectedOpts.width + '" height="' + selectedOpts.height + '"><param name="movie" value="' + href + '"></param>';
emb = '';
$.each(selectedOpts.swf, function(name, val) {
str += '<param name="' + name + '" value="' + val + '"></param>';
emb += ' ' + name + '="' + val + '"';
});
str += '<embed src="' + href + '" type="application/x-shockwave-flash" width="' + selectedOpts.width + '" height="' + selectedOpts.height + '"' + emb + '></embed></object>';
tmp.html(str);
_process_inline();
break;
case 'ajax':
busy = false;
$.fancybox.showActivity();
selectedOpts.ajax.win = selectedOpts.ajax.success;
ajaxLoader = $.ajax($.extend({}, selectedOpts.ajax, {
url : href,
data : selectedOpts.ajax.data || {},
error : function(XMLHttpRequest, textStatus, errorThrown) {
if ( XMLHttpRequest.status > 0 ) {
_error();
}
},
success : function(data, textStatus, XMLHttpRequest) {
var o = typeof XMLHttpRequest == 'object' ? XMLHttpRequest : ajaxLoader;
if (o.status == 200) {
if ( typeof selectedOpts.ajax.win == 'function' ) {
ret = selectedOpts.ajax.win(href, data, textStatus, XMLHttpRequest);
if (ret === false) {
loading.hide();
return;
} else if (typeof ret == 'string' || typeof ret == 'object') {
data = ret;
}
}
tmp.html( data );
_process_inline();
}
}
}));
break;
case 'iframe':
_show();
break;
}
},
_process_inline = function() {
var
w = selectedOpts.width,
h = selectedOpts.height;
if (w.toString().indexOf('%') > -1) {
w = parseInt( ($(window).width() - (selectedOpts.margin * 2)) * parseFloat(w) / 100, 10) + 'px';
} else {
w = w == 'auto' ? 'auto' : w + 'px';
}
if (h.toString().indexOf('%') > -1) {
h = parseInt( ($(window).height() - (selectedOpts.margin * 2)) * parseFloat(h) / 100, 10) + 'px';
} else {
h = h == 'auto' ? 'auto' : h + 'px';
}
tmp.wrapInner('<div style="width:' + w + ';height:' + h + ';overflow: ' + (selectedOpts.scrolling == 'auto' ? 'auto' : (selectedOpts.scrolling == 'yes' ? 'scroll' : 'hidden')) + ';position:relative;"></div>');
selectedOpts.width = tmp.width();
selectedOpts.height = tmp.height();
_show();
},
_process_image = function() {
selectedOpts.width = imgPreloader.width;
selectedOpts.height = imgPreloader.height;
$("<img />").attr({
'id' : 'fancybox-img',
'src' : imgPreloader.src,
'alt' : selectedOpts.title
}).appendTo( tmp );
_show();
},
_show = function() {
var pos, equal;
loading.hide();
if (wrap.is(":visible") && false === currentOpts.onCleanup(currentArray, currentIndex, currentOpts)) {
$.event.trigger('fancybox-cancel');
busy = false;
return;
}
busy = true;
$(content.add( overlay )).unbind();
$(window).unbind("resize.fb scroll.fb");
$(document).unbind('keydown.fb');
if (wrap.is(":visible") && currentOpts.titlePosition !== 'outside') {
wrap.css('height', wrap.height());
}
currentArray = selectedArray;
currentIndex = selectedIndex;
currentOpts = selectedOpts;
if (currentOpts.overlayShow) {
overlay.css({
'background-color' : currentOpts.overlayColor,
'opacity' : currentOpts.overlayOpacity,
'cursor' : currentOpts.hideOnOverlayClick ? 'pointer' : 'auto',
'height' : $(document).height()
});
if (!overlay.is(':visible')) {
if (isIE6) {
$('select:not(#fancybox-tmp select)').filter(function() {
return this.style.visibility !== 'hidden';
}).css({'visibility' : 'hidden'}).one('fancybox-cleanup', function() {
this.style.visibility = 'inherit';
});
}
overlay.show();
}
} else {
overlay.hide();
}
final_pos = _get_zoom_to();
_process_title();
if (wrap.is(":visible")) {
$( close.add( nav_left ).add( nav_right ) ).hide();
pos = wrap.position(),
start_pos = {
top : pos.top,
left : pos.left,
width : wrap.width(),
height : wrap.height()
};
equal = (start_pos.width == final_pos.width && start_pos.height == final_pos.height);
content.fadeTo(currentOpts.changeFade, 0.3, function() {
var finish_resizing = function() {
content.html( tmp.contents() ).fadeTo(currentOpts.changeFade, 1, _finish);
};
$.event.trigger('fancybox-change');
content
.empty()
.removeAttr('filter')
.css({
'border-width' : currentOpts.padding,
'width' : final_pos.width - currentOpts.padding * 2,
'height' : selectedOpts.autoDimensions ? 'auto' : final_pos.height - titleHeight - currentOpts.padding * 2
});
if (equal) {
finish_resizing();
} else {
fx.prop = 0;
$(fx).animate({prop: 1}, {
duration : currentOpts.changeSpeed,
easing : currentOpts.easingChange,
step : _draw,
complete : finish_resizing
});
}
});
return;
}
wrap.removeAttr("style");
content.css('border-width', currentOpts.padding);
if (currentOpts.transitionIn == 'elastic') {
start_pos = _get_zoom_from();
content.html( tmp.contents() );
wrap.show();
if (currentOpts.opacity) {
final_pos.opacity = 0;
}
fx.prop = 0;
$(fx).animate({prop: 1}, {
duration : currentOpts.speedIn,
easing : currentOpts.easingIn,
step : _draw,
complete : _finish
});
return;
}
if (currentOpts.titlePosition == 'inside' && titleHeight > 0) {
title.show();
}
content
.css({
'width' : final_pos.width - currentOpts.padding * 2,
'height' : selectedOpts.autoDimensions ? 'auto' : final_pos.height - titleHeight - currentOpts.padding * 2
})
.html( tmp.contents() );
wrap
.css(final_pos)
.fadeIn( currentOpts.transitionIn == 'none' ? 0 : currentOpts.speedIn, _finish );
},
_format_title = function(title) {
if (title && title.length) {
if (currentOpts.titlePosition == 'float') {
return '<table id="fancybox-title-float-wrap" cellpadding="0" cellspacing="0"><tr><td id="fancybox-title-float-left"></td><td id="fancybox-title-float-main">' + title + '</td><td id="fancybox-title-float-right"></td></tr></table>';
}
return '<div id="fancybox-title-' + currentOpts.titlePosition + '">' + title + '</div>';
}
return false;
},
_process_title = function() {
titleStr = currentOpts.title || '';
titleHeight = 0;
title
.empty()
.removeAttr('style')
.removeClass();
if (currentOpts.titleShow === false) {
title.hide();
return;
}
titleStr = $.isFunction(currentOpts.titleFormat) ? currentOpts.titleFormat(titleStr, currentArray, currentIndex, currentOpts) : _format_title(titleStr);
if (!titleStr || titleStr === '') {
title.hide();
return;
}
title
.addClass('fancybox-title-' + currentOpts.titlePosition)
.html( titleStr )
.appendTo( 'body' )
.show();
switch (currentOpts.titlePosition) {
case 'inside':
title
.css({
'width' : final_pos.width - (currentOpts.padding * 2),
'marginLeft' : currentOpts.padding,
'marginRight' : currentOpts.padding
});
titleHeight = title.outerHeight(true);
title.appendTo( outer );
final_pos.height += titleHeight;
break;
case 'over':
title
.css({
'marginLeft' : currentOpts.padding,
'width' : final_pos.width - (currentOpts.padding * 2),
'bottom' : currentOpts.padding
})
.appendTo( outer );
break;
case 'float':
title
.css('left', parseInt((title.width() - final_pos.width - 40)/ 2, 10) * -1)
.appendTo( wrap );
break;
default:
title
.css({
'width' : final_pos.width - (currentOpts.padding * 2),
'paddingLeft' : currentOpts.padding,
'paddingRight' : currentOpts.padding
})
.appendTo( wrap );
break;
}
title.hide();
},
_set_navigation = function() {
if (currentOpts.enableEscapeButton || currentOpts.enableKeyboardNav) {
$(document).bind('keydown.fb', function(e) {
if (e.keyCode == 27 && currentOpts.enableEscapeButton) {
e.preventDefault();
$.fancybox.close();
} else if ((e.keyCode == 37 || e.keyCode == 39) && currentOpts.enableKeyboardNav && e.target.tagName !== 'INPUT' && e.target.tagName !== 'TEXTAREA' && e.target.tagName !== 'SELECT') {
e.preventDefault();
$.fancybox[ e.keyCode == 37 ? 'prev' : 'next']();
}
});
}
if (!currentOpts.showNavArrows) {
nav_left.hide();
nav_right.hide();
return;
}
if ((currentOpts.cyclic && currentArray.length > 1) || currentIndex !== 0) {
nav_left.show();
}
if ((currentOpts.cyclic && currentArray.length > 1) || currentIndex != (currentArray.length -1)) {
nav_right.show();
}
},
_finish = function () {
if (!$.support.opacity) {
content.get(0).style.removeAttribute('filter');
wrap.get(0).style.removeAttribute('filter');
}
if (selectedOpts.autoDimensions) {
content.css('height', 'auto');
}
wrap.css('height', 'auto');
if (titleStr && titleStr.length) {
title.show();
}
if (currentOpts.showCloseButton) {
close.show();
}
_set_navigation();
if (currentOpts.hideOnContentClick) {
content.bind('click', $.fancybox.close);
}
if (currentOpts.hideOnOverlayClick) {
overlay.bind('click', $.fancybox.close);
}
$(window).bind("resize.fb", $.fancybox.resize);
if (currentOpts.centerOnScroll) {
$(window).bind("scroll.fb", $.fancybox.center);
}
if (currentOpts.type == 'iframe') {
$('<iframe id="fancybox-frame" name="fancybox-frame' + new Date().getTime() + '" frameborder="0" hspace="0" ' + ($.browser.msie ? 'allowtransparency="true""' : '') + ' scrolling="' + selectedOpts.scrolling + '" src="' + currentOpts.href + '"></iframe>').appendTo(content);
}
wrap.show();
busy = false;
$.fancybox.center();
currentOpts.onComplete(currentArray, currentIndex, currentOpts);
_preload_images();
},
_preload_images = function() {
var href,
objNext;
if ((currentArray.length -1) > currentIndex) {
href = currentArray[ currentIndex + 1 ].href;
if (typeof href !== 'undefined' && href.match(imgRegExp)) {
objNext = new Image();
objNext.src = href;
}
}
if (currentIndex > 0) {
href = currentArray[ currentIndex - 1 ].href;
if (typeof href !== 'undefined' && href.match(imgRegExp)) {
objNext = new Image();
objNext.src = href;
}
}
},
_draw = function(pos) {
var dim = {
width : parseInt(start_pos.width + (final_pos.width - start_pos.width) * pos, 10),
height : parseInt(start_pos.height + (final_pos.height - start_pos.height) * pos, 10),
top : parseInt(start_pos.top + (final_pos.top - start_pos.top) * pos, 10),
left : parseInt(start_pos.left + (final_pos.left - start_pos.left) * pos, 10)
};
if (typeof final_pos.opacity !== 'undefined') {
dim.opacity = pos < 0.5 ? 0.5 : pos;
}
wrap.css(dim);
content.css({
'width' : dim.width - currentOpts.padding * 2,
'height' : dim.height - (titleHeight * pos) - currentOpts.padding * 2
});
},
_get_viewport = function() {
return [
$(window).width() - (currentOpts.margin * 2),
$(window).height() - (currentOpts.margin * 2),
$(document).scrollLeft() + currentOpts.margin,
$(document).scrollTop() + currentOpts.margin
];
},
_get_zoom_to = function () {
var view = _get_viewport(),
to = {},
resize = currentOpts.autoScale,
double_padding = currentOpts.padding * 2,
ratio;
if (currentOpts.width.toString().indexOf('%') > -1) {
to.width = parseInt((view[0] * parseFloat(currentOpts.width)) / 100, 10);
} else {
to.width = currentOpts.width + double_padding;
}
if (currentOpts.height.toString().indexOf('%') > -1) {
to.height = parseInt((view[1] * parseFloat(currentOpts.height)) / 100, 10);
} else {
to.height = currentOpts.height + double_padding;
}
if (resize && (to.width > view[0] || to.height > view[1])) {
if (selectedOpts.type == 'image' || selectedOpts.type == 'swf') {
ratio = (currentOpts.width ) / (currentOpts.height );
if ((to.width ) > view[0]) {
to.width = view[0];
to.height = parseInt(((to.width - double_padding) / ratio) + double_padding, 10);
}
if ((to.height) > view[1]) {
to.height = view[1];
to.width = parseInt(((to.height - double_padding) * ratio) + double_padding, 10);
}
} else {
to.width = Math.min(to.width, view[0]);
to.height = Math.min(to.height, view[1]);
}
}
to.top = parseInt(Math.max(view[3] - 20, view[3] + ((view[1] - to.height - 40) * 0.5)), 10);
to.left = parseInt(Math.max(view[2] - 20, view[2] + ((view[0] - to.width - 40) * 0.5)), 10);
return to;
},
_get_obj_pos = function(obj) {
var pos = obj.offset();
pos.top += parseInt( obj.css('paddingTop'), 10 ) || 0;
pos.left += parseInt( obj.css('paddingLeft'), 10 ) || 0;
pos.top += parseInt( obj.css('border-top-width'), 10 ) || 0;
pos.left += parseInt( obj.css('border-left-width'), 10 ) || 0;
pos.width = obj.width();
pos.height = obj.height();
return pos;
},
_get_zoom_from = function() {
var orig = selectedOpts.orig ? $(selectedOpts.orig) : false,
from = {},
pos,
view;
if (orig && orig.length) {
pos = _get_obj_pos(orig);
from = {
width : pos.width + (currentOpts.padding * 2),
height : pos.height + (currentOpts.padding * 2),
top : pos.top - currentOpts.padding - 20,
left : pos.left - currentOpts.padding - 20
};
} else {
view = _get_viewport();
from = {
width : currentOpts.padding * 2,
height : currentOpts.padding * 2,
top : parseInt(view[3] + view[1] * 0.5, 10),
left : parseInt(view[2] + view[0] * 0.5, 10)
};
}
return from;
},
_animate_loading = function() {
if (!loading.is(':visible')){
clearInterval(loadingTimer);
return;
}
$('div', loading).css('top', (loadingFrame * -40) + 'px');
loadingFrame = (loadingFrame + 1) % 12;
};
/*
* Public methods
*/
$.fn.fancybox = function(options) {
if (!$(this).length) {
return this;
}
$(this)
.data('fancybox', $.extend({}, options, ($.metadata ? $(this).metadata() : {})))
.unbind('click.fb')
.bind('click.fb', function(e) {
e.preventDefault();
if (busy) {
return;
}
busy = true;
$(this).blur();
selectedArray = [];
selectedIndex = 0;
var rel = $(this).attr('rel') || '';
if (!rel || rel == '' || rel === 'nofollow') {
selectedArray.push(this);
} else {
selectedArray = $("a[rel=" + rel + "], area[rel=" + rel + "]");
selectedIndex = selectedArray.index( this );
}
_start();
return;
});
return this;
};
$.fancybox = function(obj) {
var opts;
if (busy) {
return;
}
busy = true;
opts = typeof arguments[1] !== 'undefined' ? arguments[1] : {};
selectedArray = [];
selectedIndex = parseInt(opts.index, 10) || 0;
if ($.isArray(obj)) {
for (var i = 0, j = obj.length; i < j; i++) {
if (typeof obj[i] == 'object') {
$(obj[i]).data('fancybox', $.extend({}, opts, obj[i]));
} else {
obj[i] = $({}).data('fancybox', $.extend({content : obj[i]}, opts));
}
}
selectedArray = jQuery.merge(selectedArray, obj);
} else {
if (typeof obj == 'object') {
$(obj).data('fancybox', $.extend({}, opts, obj));
} else {
obj = $({}).data('fancybox', $.extend({content : obj}, opts));
}
selectedArray.push(obj);
}
if (selectedIndex > selectedArray.length || selectedIndex < 0) {
selectedIndex = 0;
}
_start();
};
$.fancybox.showActivity = function() {
clearInterval(loadingTimer);
loading.show();
loadingTimer = setInterval(_animate_loading, 66);
};
$.fancybox.hideActivity = function() {
loading.hide();
};
$.fancybox.next = function() {
return $.fancybox.pos( currentIndex + 1);
};
$.fancybox.prev = function() {
return $.fancybox.pos( currentIndex - 1);
};
$.fancybox.pos = function(pos) {
if (busy) {
return;
}
pos = parseInt(pos);
selectedArray = currentArray;
if (pos > -1 && pos < currentArray.length) {
selectedIndex = pos;
_start();
} else if (currentOpts.cyclic && currentArray.length > 1) {
selectedIndex = pos >= currentArray.length ? 0 : currentArray.length - 1;
_start();
}
return;
};
$.fancybox.cancel = function() {
if (busy) {
return;
}
busy = true;
$.event.trigger('fancybox-cancel');
_abort();
selectedOpts.onCancel(selectedArray, selectedIndex, selectedOpts);
busy = false;
};
// Note: within an iframe use - parent.$.fancybox.close();
$.fancybox.close = function() {
if (busy || wrap.is(':hidden')) {
return;
}
busy = true;
if (currentOpts && false === currentOpts.onCleanup(currentArray, currentIndex, currentOpts)) {
busy = false;
return;
}
_abort();
$(close.add( nav_left ).add( nav_right )).hide();
$(content.add( overlay )).unbind();
$(window).unbind("resize.fb scroll.fb");
$(document).unbind('keydown.fb');
content.find('iframe').attr('src', isIE6 && /^https/i.test(window.location.href || '') ? 'javascript:void(false)' : 'about:blank');
if (currentOpts.titlePosition !== 'inside') {
title.empty();
}
wrap.stop();
function _cleanup() {
overlay.fadeOut('fast');
title.empty().hide();
wrap.hide();
$.event.trigger('fancybox-cleanup');
content.empty();
currentOpts.onClosed(currentArray, currentIndex, currentOpts);
currentArray = selectedOpts = [];
currentIndex = selectedIndex = 0;
currentOpts = selectedOpts = {};
busy = false;
}
if (currentOpts.transitionOut == 'elastic') {
start_pos = _get_zoom_from();
var pos = wrap.position();
final_pos = {
top : pos.top ,
left : pos.left,
width : wrap.width(),
height : wrap.height()
};
if (currentOpts.opacity) {
final_pos.opacity = 1;
}
title.empty().hide();
fx.prop = 1;
$(fx).animate({ prop: 0 }, {
duration : currentOpts.speedOut,
easing : currentOpts.easingOut,
step : _draw,
complete : _cleanup
});
} else {
wrap.fadeOut( currentOpts.transitionOut == 'none' ? 0 : currentOpts.speedOut, _cleanup);
}
};
$.fancybox.resize = function() {
if (overlay.is(':visible')) {
overlay.css('height', $(document).height());
}
$.fancybox.center(true);
};
$.fancybox.center = function() {
var view, align;
if (busy) {
return;
}
align = arguments[0] === true ? 1 : 0;
view = _get_viewport();
if (!align && (wrap.width() > view[0] || wrap.height() > view[1])) {
return;
}
wrap
.stop()
.animate({
'top' : parseInt(Math.max(view[3] - 20, view[3] + ((view[1] - content.height() - 40) * 0.5) - currentOpts.padding)),
'left' : parseInt(Math.max(view[2] - 20, view[2] + ((view[0] - content.width() - 40) * 0.5) - currentOpts.padding))
}, typeof arguments[0] == 'number' ? arguments[0] : 200);
};
$.fancybox.init = function() {
if ($("#fancybox-wrap").length) {
return;
}
$('body').append(
tmp = $('<div id="fancybox-tmp"></div>'),
loading = $('<div id="fancybox-loading"><div></div></div>'),
overlay = $('<div id="fancybox-overlay"></div>'),
wrap = $('<div id="fancybox-wrap"></div>')
);
outer = $('<div id="fancybox-outer"></div>')
.append('<div class="fancybox-bg" id="fancybox-bg-n"></div><div class="fancybox-bg" id="fancybox-bg-ne"></div><div class="fancybox-bg" id="fancybox-bg-e"></div><div class="fancybox-bg" id="fancybox-bg-se"></div><div class="fancybox-bg" id="fancybox-bg-s"></div><div class="fancybox-bg" id="fancybox-bg-sw"></div><div class="fancybox-bg" id="fancybox-bg-w"></div><div class="fancybox-bg" id="fancybox-bg-nw"></div>')
.appendTo( wrap );
outer.append(
content = $('<div id="fancybox-content"></div>'),
close = $('<a id="fancybox-close"></a>'),
title = $('<div id="fancybox-title"></div>'),
nav_left = $('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'),
nav_right = $('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>')
);
close.click($.fancybox.close);
loading.click($.fancybox.cancel);
nav_left.click(function(e) {
e.preventDefault();
$.fancybox.prev();
});
nav_right.click(function(e) {
e.preventDefault();
$.fancybox.next();
});
if ($.fn.mousewheel) {
wrap.bind('mousewheel.fb', function(e, delta) {
if (busy) {
e.preventDefault();
} else if ($(e.target).get(0).clientHeight == 0 || $(e.target).get(0).scrollHeight === $(e.target).get(0).clientHeight) {
e.preventDefault();
$.fancybox[ delta > 0 ? 'prev' : 'next']();
}
});
}
if (!$.support.opacity) {
wrap.addClass('fancybox-ie');
}
if (isIE6) {
loading.addClass('fancybox-ie6');
wrap.addClass('fancybox-ie6');
$('<iframe id="fancybox-hide-sel-frame" src="' + (/^https/i.test(window.location.href || '') ? 'javascript:void(false)' : 'about:blank' ) + '" scrolling="no" border="0" frameborder="0" tabindex="-1"></iframe>').prependTo(outer);
}
};
$.fn.fancybox.defaults = {
padding : 10,
margin : 40,
opacity : false,
modal : false,
cyclic : false,
scrolling : 'auto', // 'auto', 'yes' or 'no'
width : 560,
height : 340,
autoScale : true,
autoDimensions : true,
centerOnScroll : false,
ajax : {},
swf : { wmode: 'transparent' },
hideOnOverlayClick : true,
hideOnContentClick : false,
overlayShow : true,
overlayOpacity : 0.7,
overlayColor : '#777',
titleShow : true,
titlePosition : 'float', // 'float', 'outside', 'inside' or 'over'
titleFormat : null,
titleFromAlt : false,
transitionIn : 'fade', // 'elastic', 'fade' or 'none'
transitionOut : 'fade', // 'elastic', 'fade' or 'none'
speedIn : 300,
speedOut : 300,
changeSpeed : 300,
changeFade : 'fast',
easingIn : 'swing',
easingOut : 'swing',
showCloseButton : true,
showNavArrows : true,
enableEscapeButton : true,
enableKeyboardNav : true,
onStart : function(){},
onCancel : function(){},
onComplete : function(){},
onCleanup : function(){},
onClosed : function(){},
onError : function(){}
};
$(document).ready(function() {
$.fancybox.init();
});
})(jQuery);
\ No newline at end of file
/*
* FancyBox - jQuery Plugin
* Simple and fancy lightbox alternative
*
* Examples and documentation at: http://fancybox.net
*
* Copyright (c) 2008 - 2010 Janis Skarnelis
* That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support is greatly appreciated.
*
* Version: 1.3.4 (11/11/2010)
* Requires: jQuery v1.3+
*
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*/
;(function(b){var m,t,u,f,D,j,E,n,z,A,q=0,e={},o=[],p=0,d={},l=[],G=null,v=new Image,J=/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i,W=/[^\.]\.(swf)\s*$/i,K,L=1,y=0,s="",r,i,h=false,B=b.extend(b("<div/>")[0],{prop:0}),M=b.browser.msie&&b.browser.version<7&&!window.XMLHttpRequest,N=function(){t.hide();v.onerror=v.onload=null;G&&G.abort();m.empty()},O=function(){if(false===e.onError(o,q,e)){t.hide();h=false}else{e.titleShow=false;e.width="auto";e.height="auto";m.html('<p id="fancybox-error">The requested content cannot be loaded.<br />Please try again later.</p>');
F()}},I=function(){var a=o[q],c,g,k,C,P,w;N();e=b.extend({},b.fn.fancybox.defaults,typeof b(a).data("fancybox")=="undefined"?e:b(a).data("fancybox"));w=e.onStart(o,q,e);if(w===false)h=false;else{if(typeof w=="object")e=b.extend(e,w);k=e.title||(a.nodeName?b(a).attr("title"):a.title)||"";if(a.nodeName&&!e.orig)e.orig=b(a).children("img:first").length?b(a).children("img:first"):b(a);if(k===""&&e.orig&&e.titleFromAlt)k=e.orig.attr("alt");c=e.href||(a.nodeName?b(a).attr("href"):a.href)||null;if(/^(?:javascript)/i.test(c)||
c=="#")c=null;if(e.type){g=e.type;if(!c)c=e.content}else if(e.content)g="html";else if(c)g=c.match(J)?"image":c.match(W)?"swf":b(a).hasClass("iframe")?"iframe":c.indexOf("#")===0?"inline":"ajax";if(g){if(g=="inline"){a=c.substr(c.indexOf("#"));g=b(a).length>0?"inline":"ajax"}e.type=g;e.href=c;e.title=k;if(e.autoDimensions)if(e.type=="html"||e.type=="inline"||e.type=="ajax"){e.width="auto";e.height="auto"}else e.autoDimensions=false;if(e.modal){e.overlayShow=true;e.hideOnOverlayClick=false;e.hideOnContentClick=
false;e.enableEscapeButton=false;e.showCloseButton=false}e.padding=parseInt(e.padding,10);e.margin=parseInt(e.margin,10);m.css("padding",e.padding+e.margin);b(".fancybox-inline-tmp").unbind("fancybox-cancel").bind("fancybox-change",function(){b(this).replaceWith(j.children())});switch(g){case "html":m.html(e.content);F();break;case "inline":if(b(a).parent().is("#fancybox-content")===true){h=false;break}b('<div class="fancybox-inline-tmp" />').hide().insertBefore(b(a)).bind("fancybox-cleanup",function(){b(this).replaceWith(j.children())}).bind("fancybox-cancel",
function(){b(this).replaceWith(m.children())});b(a).appendTo(m);F();break;case "image":h=false;b.fancybox.showActivity();v=new Image;v.onerror=function(){O()};v.onload=function(){h=true;v.onerror=v.onload=null;e.width=v.width;e.height=v.height;b("<img />").attr({id:"fancybox-img",src:v.src,alt:e.title}).appendTo(m);Q()};v.src=c;break;case "swf":e.scrolling="no";C='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+e.width+'" height="'+e.height+'"><param name="movie" value="'+c+
'"></param>';P="";b.each(e.swf,function(x,H){C+='<param name="'+x+'" value="'+H+'"></param>';P+=" "+x+'="'+H+'"'});C+='<embed src="'+c+'" type="application/x-shockwave-flash" width="'+e.width+'" height="'+e.height+'"'+P+"></embed></object>";m.html(C);F();break;case "ajax":h=false;b.fancybox.showActivity();e.ajax.win=e.ajax.success;G=b.ajax(b.extend({},e.ajax,{url:c,data:e.ajax.data||{},error:function(x){x.status>0&&O()},success:function(x,H,R){if((typeof R=="object"?R:G).status==200){if(typeof e.ajax.win==
"function"){w=e.ajax.win(c,x,H,R);if(w===false){t.hide();return}else if(typeof w=="string"||typeof w=="object")x=w}m.html(x);F()}}}));break;case "iframe":Q()}}else O()}},F=function(){var a=e.width,c=e.height;a=a.toString().indexOf("%")>-1?parseInt((b(window).width()-e.margin*2)*parseFloat(a)/100,10)+"px":a=="auto"?"auto":a+"px";c=c.toString().indexOf("%")>-1?parseInt((b(window).height()-e.margin*2)*parseFloat(c)/100,10)+"px":c=="auto"?"auto":c+"px";m.wrapInner('<div style="width:'+a+";height:"+c+
";overflow: "+(e.scrolling=="auto"?"auto":e.scrolling=="yes"?"scroll":"hidden")+';position:relative;"></div>');e.width=m.width();e.height=m.height();Q()},Q=function(){var a,c;t.hide();if(f.is(":visible")&&false===d.onCleanup(l,p,d)){b.event.trigger("fancybox-cancel");h=false}else{h=true;b(j.add(u)).unbind();b(window).unbind("resize.fb scroll.fb");b(document).unbind("keydown.fb");f.is(":visible")&&d.titlePosition!=="outside"&&f.css("height",f.height());l=o;p=q;d=e;if(d.overlayShow){u.css({"background-color":d.overlayColor,
opacity:d.overlayOpacity,cursor:d.hideOnOverlayClick?"pointer":"auto",height:b(document).height()});if(!u.is(":visible")){M&&b("select:not(#fancybox-tmp select)").filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one("fancybox-cleanup",function(){this.style.visibility="inherit"});u.show()}}else u.hide();i=X();s=d.title||"";y=0;n.empty().removeAttr("style").removeClass();if(d.titleShow!==false){if(b.isFunction(d.titleFormat))a=d.titleFormat(s,l,p,d);else a=s&&s.length?
d.titlePosition=="float"?'<table id="fancybox-title-float-wrap" cellpadding="0" cellspacing="0"><tr><td id="fancybox-title-float-left"></td><td id="fancybox-title-float-main">'+s+'</td><td id="fancybox-title-float-right"></td></tr></table>':'<div id="fancybox-title-'+d.titlePosition+'">'+s+"</div>":false;s=a;if(!(!s||s==="")){n.addClass("fancybox-title-"+d.titlePosition).html(s).appendTo("body").show();switch(d.titlePosition){case "inside":n.css({width:i.width-d.padding*2,marginLeft:d.padding,marginRight:d.padding});
y=n.outerHeight(true);n.appendTo(D);i.height+=y;break;case "over":n.css({marginLeft:d.padding,width:i.width-d.padding*2,bottom:d.padding}).appendTo(D);break;case "float":n.css("left",parseInt((n.width()-i.width-40)/2,10)*-1).appendTo(f);break;default:n.css({width:i.width-d.padding*2,paddingLeft:d.padding,paddingRight:d.padding}).appendTo(f)}}}n.hide();if(f.is(":visible")){b(E.add(z).add(A)).hide();a=f.position();r={top:a.top,left:a.left,width:f.width(),height:f.height()};c=r.width==i.width&&r.height==
i.height;j.fadeTo(d.changeFade,0.3,function(){var g=function(){j.html(m.contents()).fadeTo(d.changeFade,1,S)};b.event.trigger("fancybox-change");j.empty().removeAttr("filter").css({"border-width":d.padding,width:i.width-d.padding*2,height:e.autoDimensions?"auto":i.height-y-d.padding*2});if(c)g();else{B.prop=0;b(B).animate({prop:1},{duration:d.changeSpeed,easing:d.easingChange,step:T,complete:g})}})}else{f.removeAttr("style");j.css("border-width",d.padding);if(d.transitionIn=="elastic"){r=V();j.html(m.contents());
f.show();if(d.opacity)i.opacity=0;B.prop=0;b(B).animate({prop:1},{duration:d.speedIn,easing:d.easingIn,step:T,complete:S})}else{d.titlePosition=="inside"&&y>0&&n.show();j.css({width:i.width-d.padding*2,height:e.autoDimensions?"auto":i.height-y-d.padding*2}).html(m.contents());f.css(i).fadeIn(d.transitionIn=="none"?0:d.speedIn,S)}}}},Y=function(){if(d.enableEscapeButton||d.enableKeyboardNav)b(document).bind("keydown.fb",function(a){if(a.keyCode==27&&d.enableEscapeButton){a.preventDefault();b.fancybox.close()}else if((a.keyCode==
37||a.keyCode==39)&&d.enableKeyboardNav&&a.target.tagName!=="INPUT"&&a.target.tagName!=="TEXTAREA"&&a.target.tagName!=="SELECT"){a.preventDefault();b.fancybox[a.keyCode==37?"prev":"next"]()}});if(d.showNavArrows){if(d.cyclic&&l.length>1||p!==0)z.show();if(d.cyclic&&l.length>1||p!=l.length-1)A.show()}else{z.hide();A.hide()}},S=function(){if(!b.support.opacity){j.get(0).style.removeAttribute("filter");f.get(0).style.removeAttribute("filter")}e.autoDimensions&&j.css("height","auto");f.css("height","auto");
s&&s.length&&n.show();d.showCloseButton&&E.show();Y();d.hideOnContentClick&&j.bind("click",b.fancybox.close);d.hideOnOverlayClick&&u.bind("click",b.fancybox.close);b(window).bind("resize.fb",b.fancybox.resize);d.centerOnScroll&&b(window).bind("scroll.fb",b.fancybox.center);if(d.type=="iframe")b('<iframe id="fancybox-frame" name="fancybox-frame'+(new Date).getTime()+'" frameborder="0" hspace="0" '+(b.browser.msie?'allowtransparency="true""':"")+' scrolling="'+e.scrolling+'" src="'+d.href+'"></iframe>').appendTo(j);
f.show();h=false;b.fancybox.center();d.onComplete(l,p,d);var a,c;if(l.length-1>p){a=l[p+1].href;if(typeof a!=="undefined"&&a.match(J)){c=new Image;c.src=a}}if(p>0){a=l[p-1].href;if(typeof a!=="undefined"&&a.match(J)){c=new Image;c.src=a}}},T=function(a){var c={width:parseInt(r.width+(i.width-r.width)*a,10),height:parseInt(r.height+(i.height-r.height)*a,10),top:parseInt(r.top+(i.top-r.top)*a,10),left:parseInt(r.left+(i.left-r.left)*a,10)};if(typeof i.opacity!=="undefined")c.opacity=a<0.5?0.5:a;f.css(c);
j.css({width:c.width-d.padding*2,height:c.height-y*a-d.padding*2})},U=function(){return[b(window).width()-d.margin*2,b(window).height()-d.margin*2,b(document).scrollLeft()+d.margin,b(document).scrollTop()+d.margin]},X=function(){var a=U(),c={},g=d.autoScale,k=d.padding*2;c.width=d.width.toString().indexOf("%")>-1?parseInt(a[0]*parseFloat(d.width)/100,10):d.width+k;c.height=d.height.toString().indexOf("%")>-1?parseInt(a[1]*parseFloat(d.height)/100,10):d.height+k;if(g&&(c.width>a[0]||c.height>a[1]))if(e.type==
"image"||e.type=="swf"){g=d.width/d.height;if(c.width>a[0]){c.width=a[0];c.height=parseInt((c.width-k)/g+k,10)}if(c.height>a[1]){c.height=a[1];c.width=parseInt((c.height-k)*g+k,10)}}else{c.width=Math.min(c.width,a[0]);c.height=Math.min(c.height,a[1])}c.top=parseInt(Math.max(a[3]-20,a[3]+(a[1]-c.height-40)*0.5),10);c.left=parseInt(Math.max(a[2]-20,a[2]+(a[0]-c.width-40)*0.5),10);return c},V=function(){var a=e.orig?b(e.orig):false,c={};if(a&&a.length){c=a.offset();c.top+=parseInt(a.css("paddingTop"),
10)||0;c.left+=parseInt(a.css("paddingLeft"),10)||0;c.top+=parseInt(a.css("border-top-width"),10)||0;c.left+=parseInt(a.css("border-left-width"),10)||0;c.width=a.width();c.height=a.height();c={width:c.width+d.padding*2,height:c.height+d.padding*2,top:c.top-d.padding-20,left:c.left-d.padding-20}}else{a=U();c={width:d.padding*2,height:d.padding*2,top:parseInt(a[3]+a[1]*0.5,10),left:parseInt(a[2]+a[0]*0.5,10)}}return c},Z=function(){if(t.is(":visible")){b("div",t).css("top",L*-40+"px");L=(L+1)%12}else clearInterval(K)};
b.fn.fancybox=function(a){if(!b(this).length)return this;b(this).data("fancybox",b.extend({},a,b.metadata?b(this).metadata():{})).unbind("click.fb").bind("click.fb",function(c){c.preventDefault();if(!h){h=true;b(this).blur();o=[];q=0;c=b(this).attr("rel")||"";if(!c||c==""||c==="nofollow")o.push(this);else{o=b("a[rel="+c+"], area[rel="+c+"]");q=o.index(this)}I()}});return this};b.fancybox=function(a,c){var g;if(!h){h=true;g=typeof c!=="undefined"?c:{};o=[];q=parseInt(g.index,10)||0;if(b.isArray(a)){for(var k=
0,C=a.length;k<C;k++)if(typeof a[k]=="object")b(a[k]).data("fancybox",b.extend({},g,a[k]));else a[k]=b({}).data("fancybox",b.extend({content:a[k]},g));o=jQuery.merge(o,a)}else{if(typeof a=="object")b(a).data("fancybox",b.extend({},g,a));else a=b({}).data("fancybox",b.extend({content:a},g));o.push(a)}if(q>o.length||q<0)q=0;I()}};b.fancybox.showActivity=function(){clearInterval(K);t.show();K=setInterval(Z,66)};b.fancybox.hideActivity=function(){t.hide()};b.fancybox.next=function(){return b.fancybox.pos(p+
1)};b.fancybox.prev=function(){return b.fancybox.pos(p-1)};b.fancybox.pos=function(a){if(!h){a=parseInt(a);o=l;if(a>-1&&a<l.length){q=a;I()}else if(d.cyclic&&l.length>1){q=a>=l.length?0:l.length-1;I()}}};b.fancybox.cancel=function(){if(!h){h=true;b.event.trigger("fancybox-cancel");N();e.onCancel(o,q,e);h=false}};b.fancybox.close=function(){function a(){u.fadeOut("fast");n.empty().hide();f.hide();b.event.trigger("fancybox-cleanup");j.empty();d.onClosed(l,p,d);l=e=[];p=q=0;d=e={};h=false}if(!(h||f.is(":hidden"))){h=
true;if(d&&false===d.onCleanup(l,p,d))h=false;else{N();b(E.add(z).add(A)).hide();b(j.add(u)).unbind();b(window).unbind("resize.fb scroll.fb");b(document).unbind("keydown.fb");j.find("iframe").attr("src",M&&/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank");d.titlePosition!=="inside"&&n.empty();f.stop();if(d.transitionOut=="elastic"){r=V();var c=f.position();i={top:c.top,left:c.left,width:f.width(),height:f.height()};if(d.opacity)i.opacity=1;n.empty().hide();B.prop=1;
b(B).animate({prop:0},{duration:d.speedOut,easing:d.easingOut,step:T,complete:a})}else f.fadeOut(d.transitionOut=="none"?0:d.speedOut,a)}}};b.fancybox.resize=function(){u.is(":visible")&&u.css("height",b(document).height());b.fancybox.center(true)};b.fancybox.center=function(a){var c,g;if(!h){g=a===true?1:0;c=U();!g&&(f.width()>c[0]||f.height()>c[1])||f.stop().animate({top:parseInt(Math.max(c[3]-20,c[3]+(c[1]-j.height()-40)*0.5-d.padding)),left:parseInt(Math.max(c[2]-20,c[2]+(c[0]-j.width()-40)*0.5-
d.padding))},typeof a=="number"?a:200)}};b.fancybox.init=function(){if(!b("#fancybox-wrap").length){b("body").append(m=b('<div id="fancybox-tmp"></div>'),t=b('<div id="fancybox-loading"><div></div></div>'),u=b('<div id="fancybox-overlay"></div>'),f=b('<div id="fancybox-wrap"></div>'));D=b('<div id="fancybox-outer"></div>').append('<div class="fancybox-bg" id="fancybox-bg-n"></div><div class="fancybox-bg" id="fancybox-bg-ne"></div><div class="fancybox-bg" id="fancybox-bg-e"></div><div class="fancybox-bg" id="fancybox-bg-se"></div><div class="fancybox-bg" id="fancybox-bg-s"></div><div class="fancybox-bg" id="fancybox-bg-sw"></div><div class="fancybox-bg" id="fancybox-bg-w"></div><div class="fancybox-bg" id="fancybox-bg-nw"></div>').appendTo(f);
D.append(j=b('<div id="fancybox-content"></div>'),E=b('<a id="fancybox-close"></a>'),n=b('<div id="fancybox-title"></div>'),z=b('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'),A=b('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>'));E.click(b.fancybox.close);t.click(b.fancybox.cancel);z.click(function(a){a.preventDefault();b.fancybox.prev()});A.click(function(a){a.preventDefault();b.fancybox.next()});
b.fn.mousewheel&&f.bind("mousewheel.fb",function(a,c){if(h)a.preventDefault();else if(b(a.target).get(0).clientHeight==0||b(a.target).get(0).scrollHeight===b(a.target).get(0).clientHeight){a.preventDefault();b.fancybox[c>0?"prev":"next"]()}});b.support.opacity||f.addClass("fancybox-ie");if(M){t.addClass("fancybox-ie6");f.addClass("fancybox-ie6");b('<iframe id="fancybox-hide-sel-frame" src="'+(/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank")+'" scrolling="no" border="0" frameborder="0" tabindex="-1"></iframe>').prependTo(D)}}};
b.fn.fancybox.defaults={padding:10,margin:40,opacity:false,modal:false,cyclic:false,scrolling:"auto",width:560,height:340,autoScale:true,autoDimensions:true,centerOnScroll:false,ajax:{},swf:{wmode:"transparent"},hideOnOverlayClick:true,hideOnContentClick:false,overlayShow:true,overlayOpacity:0.7,overlayColor:"#777",titleShow:true,titlePosition:"float",titleFormat:null,titleFromAlt:false,transitionIn:"fade",transitionOut:"fade",speedIn:300,speedOut:300,changeSpeed:300,changeFade:"fast",easingIn:"swing",
easingOut:"swing",showCloseButton:true,showNavArrows:true,enableEscapeButton:true,enableKeyboardNav:true,onStart:function(){},onCancel:function(){},onComplete:function(){},onCleanup:function(){},onClosed:function(){},onError:function(){}};b(document).ready(function(){b.fancybox.init()})})(jQuery);
\ No newline at end of file
/*! Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net)
* Licensed under the MIT License (LICENSE.txt).
*
* Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
* Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
* Thanks to: Seamus Leahy for adding deltaX and deltaY
*
* Version: 3.0.4
*
* Requires: 1.2.2+
*/
(function(d){function g(a){var b=a||window.event,i=[].slice.call(arguments,1),c=0,h=0,e=0;a=d.event.fix(b);a.type="mousewheel";if(a.wheelDelta)c=a.wheelDelta/120;if(a.detail)c=-a.detail/3;e=c;if(b.axis!==undefined&&b.axis===b.HORIZONTAL_AXIS){e=0;h=-1*c}if(b.wheelDeltaY!==undefined)e=b.wheelDeltaY/120;if(b.wheelDeltaX!==undefined)h=-1*b.wheelDeltaX/120;i.unshift(a,c,h,e);return d.event.handle.apply(this,i)}var f=["DOMMouseScroll","mousewheel"];d.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a=
f.length;a;)this.addEventListener(f[--a],g,false);else this.onmousewheel=g},teardown:function(){if(this.removeEventListener)for(var a=f.length;a;)this.removeEventListener(f[--a],g,false);else this.onmousewheel=null}};d.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})})(jQuery);
\ No newline at end of file
/*!
* jQuery JavaScript Library v1.4.4
* http://jquery.com/
*
* Copyright 2010, John Resig
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* Includes Sizzle.js
* http://sizzlejs.com/
* Copyright 2010, The Dojo Foundation
* Released under the MIT, BSD, and GPL Licenses.
*
* Date: Thu Nov 11 19:04:53 2010 -0500
*/
(function(E,B){function ka(a,b,d){if(d===B&&a.nodeType===1){d=a.getAttribute("data-"+b);if(typeof d==="string"){try{d=d==="true"?true:d==="false"?false:d==="null"?null:!c.isNaN(d)?parseFloat(d):Ja.test(d)?c.parseJSON(d):d}catch(e){}c.data(a,b,d)}else d=B}return d}function U(){return false}function ca(){return true}function la(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function Ka(a){var b,d,e,f,h,l,k,o,x,r,A,C=[];f=[];h=c.data(this,this.nodeType?"events":"__events__");if(typeof h==="function")h=
h.events;if(!(a.liveFired===this||!h||!h.live||a.button&&a.type==="click")){if(a.namespace)A=RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)");a.liveFired=this;var J=h.live.slice(0);for(k=0;k<J.length;k++){h=J[k];h.origType.replace(X,"")===a.type?f.push(h.selector):J.splice(k--,1)}f=c(a.target).closest(f,a.currentTarget);o=0;for(x=f.length;o<x;o++){r=f[o];for(k=0;k<J.length;k++){h=J[k];if(r.selector===h.selector&&(!A||A.test(h.namespace))){l=r.elem;e=null;if(h.preType==="mouseenter"||
h.preType==="mouseleave"){a.type=h.preType;e=c(a.relatedTarget).closest(h.selector)[0]}if(!e||e!==l)C.push({elem:l,handleObj:h,level:r.level})}}}o=0;for(x=C.length;o<x;o++){f=C[o];if(d&&f.level>d)break;a.currentTarget=f.elem;a.data=f.handleObj.data;a.handleObj=f.handleObj;A=f.handleObj.origHandler.apply(f.elem,arguments);if(A===false||a.isPropagationStopped()){d=f.level;if(A===false)b=false;if(a.isImmediatePropagationStopped())break}}return b}}function Y(a,b){return(a&&a!=="*"?a+".":"")+b.replace(La,
"`").replace(Ma,"&")}function ma(a,b,d){if(c.isFunction(b))return c.grep(a,function(f,h){return!!b.call(f,h,f)===d});else if(b.nodeType)return c.grep(a,function(f){return f===b===d});else if(typeof b==="string"){var e=c.grep(a,function(f){return f.nodeType===1});if(Na.test(b))return c.filter(b,e,!d);else b=c.filter(b,e)}return c.grep(a,function(f){return c.inArray(f,b)>=0===d})}function na(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var e=c.data(a[d++]),f=c.data(this,
e);if(e=e&&e.events){delete f.handle;f.events={};for(var h in e)for(var l in e[h])c.event.add(this,h,e[h][l],e[h][l].data)}}})}function Oa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function oa(a,b,d){var e=b==="width"?a.offsetWidth:a.offsetHeight;if(d==="border")return e;c.each(b==="width"?Pa:Qa,function(){d||(e-=parseFloat(c.css(a,"padding"+this))||0);if(d==="margin")e+=parseFloat(c.css(a,
"margin"+this))||0;else e-=parseFloat(c.css(a,"border"+this+"Width"))||0});return e}function da(a,b,d,e){if(c.isArray(b)&&b.length)c.each(b,function(f,h){d||Ra.test(a)?e(a,h):da(a+"["+(typeof h==="object"||c.isArray(h)?f:"")+"]",h,d,e)});else if(!d&&b!=null&&typeof b==="object")c.isEmptyObject(b)?e(a,""):c.each(b,function(f,h){da(a+"["+f+"]",h,d,e)});else e(a,b)}function S(a,b){var d={};c.each(pa.concat.apply([],pa.slice(0,b)),function(){d[this]=a});return d}function qa(a){if(!ea[a]){var b=c("<"+
a+">").appendTo("body"),d=b.css("display");b.remove();if(d==="none"||d==="")d="block";ea[a]=d}return ea[a]}function fa(a){return c.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var t=E.document,c=function(){function a(){if(!b.isReady){try{t.documentElement.doScroll("left")}catch(j){setTimeout(a,1);return}b.ready()}}var b=function(j,s){return new b.fn.init(j,s)},d=E.jQuery,e=E.$,f,h=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,l=/\S/,k=/^\s+/,o=/\s+$/,x=/\W/,r=/\d/,A=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,
C=/^[\],:{}\s]*$/,J=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,w=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,I=/(?:^|:|,)(?:\s*\[)+/g,L=/(webkit)[ \/]([\w.]+)/,g=/(opera)(?:.*version)?[ \/]([\w.]+)/,i=/(msie) ([\w.]+)/,n=/(mozilla)(?:.*? rv:([\w.]+))?/,m=navigator.userAgent,p=false,q=[],u,y=Object.prototype.toString,F=Object.prototype.hasOwnProperty,M=Array.prototype.push,N=Array.prototype.slice,O=String.prototype.trim,D=Array.prototype.indexOf,R={};b.fn=b.prototype={init:function(j,
s){var v,z,H;if(!j)return this;if(j.nodeType){this.context=this[0]=j;this.length=1;return this}if(j==="body"&&!s&&t.body){this.context=t;this[0]=t.body;this.selector="body";this.length=1;return this}if(typeof j==="string")if((v=h.exec(j))&&(v[1]||!s))if(v[1]){H=s?s.ownerDocument||s:t;if(z=A.exec(j))if(b.isPlainObject(s)){j=[t.createElement(z[1])];b.fn.attr.call(j,s,true)}else j=[H.createElement(z[1])];else{z=b.buildFragment([v[1]],[H]);j=(z.cacheable?z.fragment.cloneNode(true):z.fragment).childNodes}return b.merge(this,
j)}else{if((z=t.getElementById(v[2]))&&z.parentNode){if(z.id!==v[2])return f.find(j);this.length=1;this[0]=z}this.context=t;this.selector=j;return this}else if(!s&&!x.test(j)){this.selector=j;this.context=t;j=t.getElementsByTagName(j);return b.merge(this,j)}else return!s||s.jquery?(s||f).find(j):b(s).find(j);else if(b.isFunction(j))return f.ready(j);if(j.selector!==B){this.selector=j.selector;this.context=j.context}return b.makeArray(j,this)},selector:"",jquery:"1.4.4",length:0,size:function(){return this.length},
toArray:function(){return N.call(this,0)},get:function(j){return j==null?this.toArray():j<0?this.slice(j)[0]:this[j]},pushStack:function(j,s,v){var z=b();b.isArray(j)?M.apply(z,j):b.merge(z,j);z.prevObject=this;z.context=this.context;if(s==="find")z.selector=this.selector+(this.selector?" ":"")+v;else if(s)z.selector=this.selector+"."+s+"("+v+")";return z},each:function(j,s){return b.each(this,j,s)},ready:function(j){b.bindReady();if(b.isReady)j.call(t,b);else q&&q.push(j);return this},eq:function(j){return j===
-1?this.slice(j):this.slice(j,+j+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(N.apply(this,arguments),"slice",N.call(arguments).join(","))},map:function(j){return this.pushStack(b.map(this,function(s,v){return j.call(s,v,s)}))},end:function(){return this.prevObject||b(null)},push:M,sort:[].sort,splice:[].splice};b.fn.init.prototype=b.fn;b.extend=b.fn.extend=function(){var j,s,v,z,H,G=arguments[0]||{},K=1,Q=arguments.length,ga=false;
if(typeof G==="boolean"){ga=G;G=arguments[1]||{};K=2}if(typeof G!=="object"&&!b.isFunction(G))G={};if(Q===K){G=this;--K}for(;K<Q;K++)if((j=arguments[K])!=null)for(s in j){v=G[s];z=j[s];if(G!==z)if(ga&&z&&(b.isPlainObject(z)||(H=b.isArray(z)))){if(H){H=false;v=v&&b.isArray(v)?v:[]}else v=v&&b.isPlainObject(v)?v:{};G[s]=b.extend(ga,v,z)}else if(z!==B)G[s]=z}return G};b.extend({noConflict:function(j){E.$=e;if(j)E.jQuery=d;return b},isReady:false,readyWait:1,ready:function(j){j===true&&b.readyWait--;
if(!b.readyWait||j!==true&&!b.isReady){if(!t.body)return setTimeout(b.ready,1);b.isReady=true;if(!(j!==true&&--b.readyWait>0))if(q){var s=0,v=q;for(q=null;j=v[s++];)j.call(t,b);b.fn.trigger&&b(t).trigger("ready").unbind("ready")}}},bindReady:function(){if(!p){p=true;if(t.readyState==="complete")return setTimeout(b.ready,1);if(t.addEventListener){t.addEventListener("DOMContentLoaded",u,false);E.addEventListener("load",b.ready,false)}else if(t.attachEvent){t.attachEvent("onreadystatechange",u);E.attachEvent("onload",
b.ready);var j=false;try{j=E.frameElement==null}catch(s){}t.documentElement.doScroll&&j&&a()}}},isFunction:function(j){return b.type(j)==="function"},isArray:Array.isArray||function(j){return b.type(j)==="array"},isWindow:function(j){return j&&typeof j==="object"&&"setInterval"in j},isNaN:function(j){return j==null||!r.test(j)||isNaN(j)},type:function(j){return j==null?String(j):R[y.call(j)]||"object"},isPlainObject:function(j){if(!j||b.type(j)!=="object"||j.nodeType||b.isWindow(j))return false;if(j.constructor&&
!F.call(j,"constructor")&&!F.call(j.constructor.prototype,"isPrototypeOf"))return false;for(var s in j);return s===B||F.call(j,s)},isEmptyObject:function(j){for(var s in j)return false;return true},error:function(j){throw j;},parseJSON:function(j){if(typeof j!=="string"||!j)return null;j=b.trim(j);if(C.test(j.replace(J,"@").replace(w,"]").replace(I,"")))return E.JSON&&E.JSON.parse?E.JSON.parse(j):(new Function("return "+j))();else b.error("Invalid JSON: "+j)},noop:function(){},globalEval:function(j){if(j&&
l.test(j)){var s=t.getElementsByTagName("head")[0]||t.documentElement,v=t.createElement("script");v.type="text/javascript";if(b.support.scriptEval)v.appendChild(t.createTextNode(j));else v.text=j;s.insertBefore(v,s.firstChild);s.removeChild(v)}},nodeName:function(j,s){return j.nodeName&&j.nodeName.toUpperCase()===s.toUpperCase()},each:function(j,s,v){var z,H=0,G=j.length,K=G===B||b.isFunction(j);if(v)if(K)for(z in j){if(s.apply(j[z],v)===false)break}else for(;H<G;){if(s.apply(j[H++],v)===false)break}else if(K)for(z in j){if(s.call(j[z],
z,j[z])===false)break}else for(v=j[0];H<G&&s.call(v,H,v)!==false;v=j[++H]);return j},trim:O?function(j){return j==null?"":O.call(j)}:function(j){return j==null?"":j.toString().replace(k,"").replace(o,"")},makeArray:function(j,s){var v=s||[];if(j!=null){var z=b.type(j);j.length==null||z==="string"||z==="function"||z==="regexp"||b.isWindow(j)?M.call(v,j):b.merge(v,j)}return v},inArray:function(j,s){if(s.indexOf)return s.indexOf(j);for(var v=0,z=s.length;v<z;v++)if(s[v]===j)return v;return-1},merge:function(j,
s){var v=j.length,z=0;if(typeof s.length==="number")for(var H=s.length;z<H;z++)j[v++]=s[z];else for(;s[z]!==B;)j[v++]=s[z++];j.length=v;return j},grep:function(j,s,v){var z=[],H;v=!!v;for(var G=0,K=j.length;G<K;G++){H=!!s(j[G],G);v!==H&&z.push(j[G])}return z},map:function(j,s,v){for(var z=[],H,G=0,K=j.length;G<K;G++){H=s(j[G],G,v);if(H!=null)z[z.length]=H}return z.concat.apply([],z)},guid:1,proxy:function(j,s,v){if(arguments.length===2)if(typeof s==="string"){v=j;j=v[s];s=B}else if(s&&!b.isFunction(s)){v=
s;s=B}if(!s&&j)s=function(){return j.apply(v||this,arguments)};if(j)s.guid=j.guid=j.guid||s.guid||b.guid++;return s},access:function(j,s,v,z,H,G){var K=j.length;if(typeof s==="object"){for(var Q in s)b.access(j,Q,s[Q],z,H,v);return j}if(v!==B){z=!G&&z&&b.isFunction(v);for(Q=0;Q<K;Q++)H(j[Q],s,z?v.call(j[Q],Q,H(j[Q],s)):v,G);return j}return K?H(j[0],s):B},now:function(){return(new Date).getTime()},uaMatch:function(j){j=j.toLowerCase();j=L.exec(j)||g.exec(j)||i.exec(j)||j.indexOf("compatible")<0&&n.exec(j)||
[];return{browser:j[1]||"",version:j[2]||"0"}},browser:{}});b.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(j,s){R["[object "+s+"]"]=s.toLowerCase()});m=b.uaMatch(m);if(m.browser){b.browser[m.browser]=true;b.browser.version=m.version}if(b.browser.webkit)b.browser.safari=true;if(D)b.inArray=function(j,s){return D.call(s,j)};if(!/\s/.test("\u00a0")){k=/^[\s\xA0]+/;o=/[\s\xA0]+$/}f=b(t);if(t.addEventListener)u=function(){t.removeEventListener("DOMContentLoaded",u,
false);b.ready()};else if(t.attachEvent)u=function(){if(t.readyState==="complete"){t.detachEvent("onreadystatechange",u);b.ready()}};return E.jQuery=E.$=b}();(function(){c.support={};var a=t.documentElement,b=t.createElement("script"),d=t.createElement("div"),e="script"+c.now();d.style.display="none";d.innerHTML=" <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var f=d.getElementsByTagName("*"),h=d.getElementsByTagName("a")[0],l=t.createElement("select"),
k=l.appendChild(t.createElement("option"));if(!(!f||!f.length||!h)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(h.getAttribute("style")),hrefNormalized:h.getAttribute("href")==="/a",opacity:/^0.55$/.test(h.style.opacity),cssFloat:!!h.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:k.selected,deleteExpando:true,optDisabled:false,checkClone:false,
scriptEval:false,noCloneEvent:true,boxModel:null,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableHiddenOffsets:true};l.disabled=true;c.support.optDisabled=!k.disabled;b.type="text/javascript";try{b.appendChild(t.createTextNode("window."+e+"=1;"))}catch(o){}a.insertBefore(b,a.firstChild);if(E[e]){c.support.scriptEval=true;delete E[e]}try{delete b.test}catch(x){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function r(){c.support.noCloneEvent=
false;d.detachEvent("onclick",r)});d.cloneNode(true).fireEvent("onclick")}d=t.createElement("div");d.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";a=t.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var r=t.createElement("div");r.style.width=r.style.paddingLeft="1px";t.body.appendChild(r);c.boxModel=c.support.boxModel=r.offsetWidth===2;if("zoom"in r.style){r.style.display="inline";r.style.zoom=
1;c.support.inlineBlockNeedsLayout=r.offsetWidth===2;r.style.display="";r.innerHTML="<div style='width:4px;'></div>";c.support.shrinkWrapBlocks=r.offsetWidth!==2}r.innerHTML="<table><tr><td style='padding:0;display:none'></td><td>t</td></tr></table>";var A=r.getElementsByTagName("td");c.support.reliableHiddenOffsets=A[0].offsetHeight===0;A[0].style.display="";A[1].style.display="none";c.support.reliableHiddenOffsets=c.support.reliableHiddenOffsets&&A[0].offsetHeight===0;r.innerHTML="";t.body.removeChild(r).style.display=
"none"});a=function(r){var A=t.createElement("div");r="on"+r;var C=r in A;if(!C){A.setAttribute(r,"return;");C=typeof A[r]==="function"}return C};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=f=h=null}})();var ra={},Ja=/^(?:\{.*\}|\[.*\])$/;c.extend({cache:{},uuid:0,expando:"jQuery"+c.now(),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},data:function(a,b,d){if(c.acceptData(a)){a=a==E?ra:a;var e=a.nodeType,f=e?a[c.expando]:null,h=
c.cache;if(!(e&&!f&&typeof b==="string"&&d===B)){if(e)f||(a[c.expando]=f=++c.uuid);else h=a;if(typeof b==="object")if(e)h[f]=c.extend(h[f],b);else c.extend(h,b);else if(e&&!h[f])h[f]={};a=e?h[f]:h;if(d!==B)a[b]=d;return typeof b==="string"?a[b]:a}}},removeData:function(a,b){if(c.acceptData(a)){a=a==E?ra:a;var d=a.nodeType,e=d?a[c.expando]:a,f=c.cache,h=d?f[e]:e;if(b){if(h){delete h[b];d&&c.isEmptyObject(h)&&c.removeData(a)}}else if(d&&c.support.deleteExpando)delete a[c.expando];else if(a.removeAttribute)a.removeAttribute(c.expando);
else if(d)delete f[e];else for(var l in a)delete a[l]}},acceptData:function(a){if(a.nodeName){var b=c.noData[a.nodeName.toLowerCase()];if(b)return!(b===true||a.getAttribute("classid")!==b)}return true}});c.fn.extend({data:function(a,b){var d=null;if(typeof a==="undefined"){if(this.length){var e=this[0].attributes,f;d=c.data(this[0]);for(var h=0,l=e.length;h<l;h++){f=e[h].name;if(f.indexOf("data-")===0){f=f.substr(5);ka(this[0],f,d[f])}}}return d}else if(typeof a==="object")return this.each(function(){c.data(this,
a)});var k=a.split(".");k[1]=k[1]?"."+k[1]:"";if(b===B){d=this.triggerHandler("getData"+k[1]+"!",[k[0]]);if(d===B&&this.length){d=c.data(this[0],a);d=ka(this[0],a,d)}return d===B&&k[1]?this.data(k[0]):d}else return this.each(function(){var o=c(this),x=[k[0],b];o.triggerHandler("setData"+k[1]+"!",x);c.data(this,a,b);o.triggerHandler("changeData"+k[1]+"!",x)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var e=
c.data(a,b);if(!d)return e||[];if(!e||c.isArray(d))e=c.data(a,b,c.makeArray(d));else e.push(d);return e}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),e=d.shift();if(e==="inprogress")e=d.shift();if(e){b==="fx"&&d.unshift("inprogress");e.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===B)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,
a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var sa=/[\n\t]/g,ha=/\s+/,Sa=/\r/g,Ta=/^(?:href|src|style)$/,Ua=/^(?:button|input)$/i,Va=/^(?:button|input|object|select|textarea)$/i,Wa=/^a(?:rea)?$/i,ta=/^(?:radio|checkbox)$/i;c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",
colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};c.fn.extend({attr:function(a,b){return c.access(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(x){var r=c(this);r.addClass(a.call(this,x,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ha),d=0,e=this.length;d<e;d++){var f=this[d];if(f.nodeType===
1)if(f.className){for(var h=" "+f.className+" ",l=f.className,k=0,o=b.length;k<o;k++)if(h.indexOf(" "+b[k]+" ")<0)l+=" "+b[k];f.className=c.trim(l)}else f.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(o){var x=c(this);x.removeClass(a.call(this,o,x.attr("class")))});if(a&&typeof a==="string"||a===B)for(var b=(a||"").split(ha),d=0,e=this.length;d<e;d++){var f=this[d];if(f.nodeType===1&&f.className)if(a){for(var h=(" "+f.className+" ").replace(sa," "),
l=0,k=b.length;l<k;l++)h=h.replace(" "+b[l]+" "," ");f.className=c.trim(h)}else f.className=""}return this},toggleClass:function(a,b){var d=typeof a,e=typeof b==="boolean";if(c.isFunction(a))return this.each(function(f){var h=c(this);h.toggleClass(a.call(this,f,h.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var f,h=0,l=c(this),k=b,o=a.split(ha);f=o[h++];){k=e?k:!l.hasClass(f);l[k?"addClass":"removeClass"](f)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,
"__className__",this.className);this.className=this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(sa," ").indexOf(a)>-1)return true;return false},val:function(a){if(!arguments.length){var b=this[0];if(b){if(c.nodeName(b,"option")){var d=b.attributes.value;return!d||d.specified?b.value:b.text}if(c.nodeName(b,"select")){var e=b.selectedIndex;d=[];var f=b.options;b=b.type==="select-one";
if(e<0)return null;var h=b?e:0;for(e=b?e+1:f.length;h<e;h++){var l=f[h];if(l.selected&&(c.support.optDisabled?!l.disabled:l.getAttribute("disabled")===null)&&(!l.parentNode.disabled||!c.nodeName(l.parentNode,"optgroup"))){a=c(l).val();if(b)return a;d.push(a)}}return d}if(ta.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Sa,"")}return B}var k=c.isFunction(a);return this.each(function(o){var x=c(this),r=a;if(this.nodeType===1){if(k)r=
a.call(this,o,x.val());if(r==null)r="";else if(typeof r==="number")r+="";else if(c.isArray(r))r=c.map(r,function(C){return C==null?"":C+""});if(c.isArray(r)&&ta.test(this.type))this.checked=c.inArray(x.val(),r)>=0;else if(c.nodeName(this,"select")){var A=c.makeArray(r);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),A)>=0});if(!A.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},
attr:function(a,b,d,e){if(!a||a.nodeType===3||a.nodeType===8)return B;if(e&&b in c.attrFn)return c(a)[b](d);e=a.nodeType!==1||!c.isXMLDoc(a);var f=d!==B;b=e&&c.props[b]||b;var h=Ta.test(b);if((b in a||a[b]!==B)&&e&&!h){if(f){b==="type"&&Ua.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");if(d===null)a.nodeType===1&&a.removeAttribute(b);else a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&
b.specified?b.value:Va.test(a.nodeName)||Wa.test(a.nodeName)&&a.href?0:B;return a[b]}if(!c.support.style&&e&&b==="style"){if(f)a.style.cssText=""+d;return a.style.cssText}f&&a.setAttribute(b,""+d);if(!a.attributes[b]&&a.hasAttribute&&!a.hasAttribute(b))return B;a=!c.support.hrefNormalized&&e&&h?a.getAttribute(b,2):a.getAttribute(b);return a===null?B:a}});var X=/\.(.*)$/,ia=/^(?:textarea|input|select)$/i,La=/\./g,Ma=/ /g,Xa=/[^\w\s.|`]/g,Ya=function(a){return a.replace(Xa,"\\$&")},ua={focusin:0,focusout:0};
c.event={add:function(a,b,d,e){if(!(a.nodeType===3||a.nodeType===8)){if(c.isWindow(a)&&a!==E&&!a.frameElement)a=E;if(d===false)d=U;else if(!d)return;var f,h;if(d.handler){f=d;d=f.handler}if(!d.guid)d.guid=c.guid++;if(h=c.data(a)){var l=a.nodeType?"events":"__events__",k=h[l],o=h.handle;if(typeof k==="function"){o=k.handle;k=k.events}else if(!k){a.nodeType||(h[l]=h=function(){});h.events=k={}}if(!o)h.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,
arguments):B};o.elem=a;b=b.split(" ");for(var x=0,r;l=b[x++];){h=f?c.extend({},f):{handler:d,data:e};if(l.indexOf(".")>-1){r=l.split(".");l=r.shift();h.namespace=r.slice(0).sort().join(".")}else{r=[];h.namespace=""}h.type=l;if(!h.guid)h.guid=d.guid;var A=k[l],C=c.event.special[l]||{};if(!A){A=k[l]=[];if(!C.setup||C.setup.call(a,e,r,o)===false)if(a.addEventListener)a.addEventListener(l,o,false);else a.attachEvent&&a.attachEvent("on"+l,o)}if(C.add){C.add.call(a,h);if(!h.handler.guid)h.handler.guid=
d.guid}A.push(h);c.event.global[l]=true}a=null}}},global:{},remove:function(a,b,d,e){if(!(a.nodeType===3||a.nodeType===8)){if(d===false)d=U;var f,h,l=0,k,o,x,r,A,C,J=a.nodeType?"events":"__events__",w=c.data(a),I=w&&w[J];if(w&&I){if(typeof I==="function"){w=I;I=I.events}if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(f in I)c.event.remove(a,f+b)}else{for(b=b.split(" ");f=b[l++];){r=f;k=f.indexOf(".")<0;o=[];if(!k){o=f.split(".");f=o.shift();x=RegExp("(^|\\.)"+
c.map(o.slice(0).sort(),Ya).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(A=I[f])if(d){r=c.event.special[f]||{};for(h=e||0;h<A.length;h++){C=A[h];if(d.guid===C.guid){if(k||x.test(C.namespace)){e==null&&A.splice(h--,1);r.remove&&r.remove.call(a,C)}if(e!=null)break}}if(A.length===0||e!=null&&A.length===1){if(!r.teardown||r.teardown.call(a,o)===false)c.removeEvent(a,f,w.handle);delete I[f]}}else for(h=0;h<A.length;h++){C=A[h];if(k||x.test(C.namespace)){c.event.remove(a,r,C.handler,h);A.splice(h--,1)}}}if(c.isEmptyObject(I)){if(b=
w.handle)b.elem=null;delete w.events;delete w.handle;if(typeof w==="function")c.removeData(a,J);else c.isEmptyObject(w)&&c.removeData(a)}}}}},trigger:function(a,b,d,e){var f=a.type||a;if(!e){a=typeof a==="object"?a[c.expando]?a:c.extend(c.Event(f),a):c.Event(f);if(f.indexOf("!")>=0){a.type=f=f.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[f]&&c.each(c.cache,function(){this.events&&this.events[f]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===
8)return B;a.result=B;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(e=d.nodeType?c.data(d,"handle"):(c.data(d,"__events__")||{}).handle)&&e.apply(d,b);e=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+f]&&d["on"+f].apply(d,b)===false){a.result=false;a.preventDefault()}}catch(h){}if(!a.isPropagationStopped()&&e)c.event.trigger(a,b,e,true);else if(!a.isDefaultPrevented()){var l;e=a.target;var k=f.replace(X,""),o=c.nodeName(e,"a")&&k===
"click",x=c.event.special[k]||{};if((!x._default||x._default.call(d,a)===false)&&!o&&!(e&&e.nodeName&&c.noData[e.nodeName.toLowerCase()])){try{if(e[k]){if(l=e["on"+k])e["on"+k]=null;c.event.triggered=true;e[k]()}}catch(r){}if(l)e["on"+k]=l;c.event.triggered=false}}},handle:function(a){var b,d,e,f;d=[];var h=c.makeArray(arguments);a=h[0]=c.event.fix(a||E.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive;if(!b){e=a.type.split(".");a.type=e.shift();d=e.slice(0).sort();e=RegExp("(^|\\.)"+
d.join("\\.(?:.*\\.)?")+"(\\.|$)")}a.namespace=a.namespace||d.join(".");f=c.data(this,this.nodeType?"events":"__events__");if(typeof f==="function")f=f.events;d=(f||{})[a.type];if(f&&d){d=d.slice(0);f=0;for(var l=d.length;f<l;f++){var k=d[f];if(b||e.test(k.namespace)){a.handler=k.handler;a.data=k.data;a.handleObj=k;k=k.handler.apply(this,h);if(k!==B){a.result=k;if(k===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}}return a.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
fix:function(a){if(a[c.expando])return a;var b=a;a=c.Event(b);for(var d=this.props.length,e;d;){e=this.props[--d];a[e]=b[e]}if(!a.target)a.target=a.srcElement||t;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=t.documentElement;d=t.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop||
d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(a.which==null&&(a.charCode!=null||a.keyCode!=null))a.which=a.charCode!=null?a.charCode:a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==B)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a){c.event.add(this,Y(a.origType,a.selector),c.extend({},a,{handler:Ka,guid:a.handler.guid}))},remove:function(a){c.event.remove(this,
Y(a.origType,a.selector),a)}},beforeunload:{setup:function(a,b,d){if(c.isWindow(this))this.onbeforeunload=d},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};c.removeEvent=t.removeEventListener?function(a,b,d){a.removeEventListener&&a.removeEventListener(b,d,false)}:function(a,b,d){a.detachEvent&&a.detachEvent("on"+b,d)};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=a;this.type=a.type}else this.type=a;this.timeStamp=
c.now();this[c.expando]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=ca;var a=this.originalEvent;if(a)if(a.preventDefault)a.preventDefault();else a.returnValue=false},stopPropagation:function(){this.isPropagationStopped=ca;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=ca;this.stopPropagation()},isDefaultPrevented:U,isPropagationStopped:U,isImmediatePropagationStopped:U};
var va=function(a){var b=a.relatedTarget;try{for(;b&&b!==this;)b=b.parentNode;if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}}catch(d){}},wa=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?wa:va,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?wa:va)}}});if(!c.support.submitBubbles)c.event.special.submit={setup:function(){if(this.nodeName.toLowerCase()!==
"form"){c.event.add(this,"click.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="submit"||d==="image")&&c(b).closest("form").length){a.liveFired=B;return la("submit",this,arguments)}});c.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="text"||d==="password")&&c(b).closest("form").length&&a.keyCode===13){a.liveFired=B;return la("submit",this,arguments)}})}else return false},teardown:function(){c.event.remove(this,".specialSubmit")}};if(!c.support.changeBubbles){var V,
xa=function(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>-1?c.map(a.options,function(e){return e.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},Z=function(a,b){var d=a.target,e,f;if(!(!ia.test(d.nodeName)||d.readOnly)){e=c.data(d,"_change_data");f=xa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",f);if(!(e===B||f===e))if(e!=null||f){a.type="change";a.liveFired=
B;return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:Z,beforedeactivate:Z,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return Z.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return Z.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a,"_change_data",xa(a))}},setup:function(){if(this.type===
"file")return false;for(var a in V)c.event.add(this,a+".specialChange",V[a]);return ia.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return ia.test(this.nodeName)}};V=c.event.special.change.filters;V.focus=V.beforeactivate}t.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(e){e=c.event.fix(e);e.type=b;return c.event.trigger(e,null,e.target)}c.event.special[b]={setup:function(){ua[b]++===0&&t.addEventListener(a,d,true)},teardown:function(){--ua[b]===
0&&t.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,e,f){if(typeof d==="object"){for(var h in d)this[b](h,e,d[h],f);return this}if(c.isFunction(e)||e===false){f=e;e=B}var l=b==="one"?c.proxy(f,function(o){c(this).unbind(o,l);return f.apply(this,arguments)}):f;if(d==="unload"&&b!=="one")this.one(d,e,f);else{h=0;for(var k=this.length;h<k;h++)c.event.add(this[h],d,l,e)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&!a.preventDefault)for(var d in a)this.unbind(d,
a[d]);else{d=0;for(var e=this.length;d<e;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,e){return this.live(b,d,e,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){var d=c.Event(a);d.preventDefault();d.stopPropagation();c.event.trigger(d,b,this[0]);return d.result}},toggle:function(a){for(var b=arguments,d=
1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(e){var f=(c.data(this,"lastToggle"+a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,f+1);e.preventDefault();return b[f].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var ya={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};c.each(["live","die"],function(a,b){c.fn[b]=function(d,e,f,h){var l,k=0,o,x,r=h||this.selector;h=h?this:c(this.context);if(typeof d===
"object"&&!d.preventDefault){for(l in d)h[b](l,e,d[l],r);return this}if(c.isFunction(e)){f=e;e=B}for(d=(d||"").split(" ");(l=d[k++])!=null;){o=X.exec(l);x="";if(o){x=o[0];l=l.replace(X,"")}if(l==="hover")d.push("mouseenter"+x,"mouseleave"+x);else{o=l;if(l==="focus"||l==="blur"){d.push(ya[l]+x);l+=x}else l=(ya[l]||l)+x;if(b==="live"){x=0;for(var A=h.length;x<A;x++)c.event.add(h[x],"live."+Y(l,r),{data:e,selector:r,handler:f,origType:l,origHandler:f,preType:o})}else h.unbind("live."+Y(l,r),f)}}return this}});
c.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),function(a,b){c.fn[b]=function(d,e){if(e==null){e=d;d=null}return arguments.length>0?this.bind(b,d,e):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});E.attachEvent&&!E.addEventListener&&c(E).bind("unload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});
(function(){function a(g,i,n,m,p,q){p=0;for(var u=m.length;p<u;p++){var y=m[p];if(y){var F=false;for(y=y[g];y;){if(y.sizcache===n){F=m[y.sizset];break}if(y.nodeType===1&&!q){y.sizcache=n;y.sizset=p}if(y.nodeName.toLowerCase()===i){F=y;break}y=y[g]}m[p]=F}}}function b(g,i,n,m,p,q){p=0;for(var u=m.length;p<u;p++){var y=m[p];if(y){var F=false;for(y=y[g];y;){if(y.sizcache===n){F=m[y.sizset];break}if(y.nodeType===1){if(!q){y.sizcache=n;y.sizset=p}if(typeof i!=="string"){if(y===i){F=true;break}}else if(k.filter(i,
[y]).length>0){F=y;break}}y=y[g]}m[p]=F}}}var d=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,f=Object.prototype.toString,h=false,l=true;[0,0].sort(function(){l=false;return 0});var k=function(g,i,n,m){n=n||[];var p=i=i||t;if(i.nodeType!==1&&i.nodeType!==9)return[];if(!g||typeof g!=="string")return n;var q,u,y,F,M,N=true,O=k.isXML(i),D=[],R=g;do{d.exec("");if(q=d.exec(R)){R=q[3];D.push(q[1]);if(q[2]){F=q[3];
break}}}while(q);if(D.length>1&&x.exec(g))if(D.length===2&&o.relative[D[0]])u=L(D[0]+D[1],i);else for(u=o.relative[D[0]]?[i]:k(D.shift(),i);D.length;){g=D.shift();if(o.relative[g])g+=D.shift();u=L(g,u)}else{if(!m&&D.length>1&&i.nodeType===9&&!O&&o.match.ID.test(D[0])&&!o.match.ID.test(D[D.length-1])){q=k.find(D.shift(),i,O);i=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]}if(i){q=m?{expr:D.pop(),set:C(m)}:k.find(D.pop(),D.length===1&&(D[0]==="~"||D[0]==="+")&&i.parentNode?i.parentNode:i,O);u=q.expr?k.filter(q.expr,
q.set):q.set;if(D.length>0)y=C(u);else N=false;for(;D.length;){q=M=D.pop();if(o.relative[M])q=D.pop();else M="";if(q==null)q=i;o.relative[M](y,q,O)}}else y=[]}y||(y=u);y||k.error(M||g);if(f.call(y)==="[object Array]")if(N)if(i&&i.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&k.contains(i,y[g])))n.push(u[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&n.push(u[g]);else n.push.apply(n,y);else C(y,n);if(F){k(F,p,n,m);k.uniqueSort(n)}return n};k.uniqueSort=function(g){if(w){h=
l;g.sort(w);if(h)for(var i=1;i<g.length;i++)g[i]===g[i-1]&&g.splice(i--,1)}return g};k.matches=function(g,i){return k(g,null,null,i)};k.matchesSelector=function(g,i){return k(i,null,null,[g]).length>0};k.find=function(g,i,n){var m;if(!g)return[];for(var p=0,q=o.order.length;p<q;p++){var u,y=o.order[p];if(u=o.leftMatch[y].exec(g)){var F=u[1];u.splice(1,1);if(F.substr(F.length-1)!=="\\"){u[1]=(u[1]||"").replace(/\\/g,"");m=o.find[y](u,i,n);if(m!=null){g=g.replace(o.match[y],"");break}}}}m||(m=i.getElementsByTagName("*"));
return{set:m,expr:g}};k.filter=function(g,i,n,m){for(var p,q,u=g,y=[],F=i,M=i&&i[0]&&k.isXML(i[0]);g&&i.length;){for(var N in o.filter)if((p=o.leftMatch[N].exec(g))!=null&&p[2]){var O,D,R=o.filter[N];D=p[1];q=false;p.splice(1,1);if(D.substr(D.length-1)!=="\\"){if(F===y)y=[];if(o.preFilter[N])if(p=o.preFilter[N](p,F,n,y,m,M)){if(p===true)continue}else q=O=true;if(p)for(var j=0;(D=F[j])!=null;j++)if(D){O=R(D,p,j,F);var s=m^!!O;if(n&&O!=null)if(s)q=true;else F[j]=false;else if(s){y.push(D);q=true}}if(O!==
B){n||(F=y);g=g.replace(o.match[N],"");if(!q)return[];break}}}if(g===u)if(q==null)k.error(g);else break;u=g}return F};k.error=function(g){throw"Syntax error, unrecognized expression: "+g;};var o=k.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+\-]*)\))?/,
POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(g){return g.getAttribute("href")}},relative:{"+":function(g,i){var n=typeof i==="string",m=n&&!/\W/.test(i);n=n&&!m;if(m)i=i.toLowerCase();m=0;for(var p=g.length,q;m<p;m++)if(q=g[m]){for(;(q=q.previousSibling)&&q.nodeType!==1;);g[m]=n||q&&q.nodeName.toLowerCase()===
i?q||false:q===i}n&&k.filter(i,g,true)},">":function(g,i){var n,m=typeof i==="string",p=0,q=g.length;if(m&&!/\W/.test(i))for(i=i.toLowerCase();p<q;p++){if(n=g[p]){n=n.parentNode;g[p]=n.nodeName.toLowerCase()===i?n:false}}else{for(;p<q;p++)if(n=g[p])g[p]=m?n.parentNode:n.parentNode===i;m&&k.filter(i,g,true)}},"":function(g,i,n){var m,p=e++,q=b;if(typeof i==="string"&&!/\W/.test(i)){m=i=i.toLowerCase();q=a}q("parentNode",i,p,g,m,n)},"~":function(g,i,n){var m,p=e++,q=b;if(typeof i==="string"&&!/\W/.test(i)){m=
i=i.toLowerCase();q=a}q("previousSibling",i,p,g,m,n)}},find:{ID:function(g,i,n){if(typeof i.getElementById!=="undefined"&&!n)return(g=i.getElementById(g[1]))&&g.parentNode?[g]:[]},NAME:function(g,i){if(typeof i.getElementsByName!=="undefined"){for(var n=[],m=i.getElementsByName(g[1]),p=0,q=m.length;p<q;p++)m[p].getAttribute("name")===g[1]&&n.push(m[p]);return n.length===0?null:n}},TAG:function(g,i){return i.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,i,n,m,p,q){g=" "+g[1].replace(/\\/g,
"")+" ";if(q)return g;q=0;for(var u;(u=i[q])!=null;q++)if(u)if(p^(u.className&&(" "+u.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))n||m.push(u);else if(n)i[q]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},CHILD:function(g){if(g[1]==="nth"){var i=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=i[1]+(i[2]||1)-0;g[3]=i[3]-0}g[0]=e++;return g},ATTR:function(g,i,n,
m,p,q){i=g[1].replace(/\\/g,"");if(!q&&o.attrMap[i])g[1]=o.attrMap[i];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,i,n,m,p){if(g[1]==="not")if((d.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,i);else{g=k.filter(g[3],i,n,true^p);n||m.push.apply(m,g);return false}else if(o.match.POS.test(g[0])||o.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===
true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,i,n){return!!k(n[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===
g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},setFilters:{first:function(g,i){return i===0},last:function(g,i,n,m){return i===m.length-1},even:function(g,i){return i%2===0},odd:function(g,i){return i%2===1},lt:function(g,i,n){return i<n[3]-0},gt:function(g,i,n){return i>n[3]-0},nth:function(g,i,n){return n[3]-
0===i},eq:function(g,i,n){return n[3]-0===i}},filter:{PSEUDO:function(g,i,n,m){var p=i[1],q=o.filters[p];if(q)return q(g,n,i,m);else if(p==="contains")return(g.textContent||g.innerText||k.getText([g])||"").indexOf(i[3])>=0;else if(p==="not"){i=i[3];n=0;for(m=i.length;n<m;n++)if(i[n]===g)return false;return true}else k.error("Syntax error, unrecognized expression: "+p)},CHILD:function(g,i){var n=i[1],m=g;switch(n){case "only":case "first":for(;m=m.previousSibling;)if(m.nodeType===1)return false;if(n===
"first")return true;m=g;case "last":for(;m=m.nextSibling;)if(m.nodeType===1)return false;return true;case "nth":n=i[2];var p=i[3];if(n===1&&p===0)return true;var q=i[0],u=g.parentNode;if(u&&(u.sizcache!==q||!g.nodeIndex)){var y=0;for(m=u.firstChild;m;m=m.nextSibling)if(m.nodeType===1)m.nodeIndex=++y;u.sizcache=q}m=g.nodeIndex-p;return n===0?m===0:m%n===0&&m/n>=0}},ID:function(g,i){return g.nodeType===1&&g.getAttribute("id")===i},TAG:function(g,i){return i==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===
i},CLASS:function(g,i){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(i)>-1},ATTR:function(g,i){var n=i[1];n=o.attrHandle[n]?o.attrHandle[n](g):g[n]!=null?g[n]:g.getAttribute(n);var m=n+"",p=i[2],q=i[4];return n==null?p==="!=":p==="="?m===q:p==="*="?m.indexOf(q)>=0:p==="~="?(" "+m+" ").indexOf(q)>=0:!q?m&&n!==false:p==="!="?m!==q:p==="^="?m.indexOf(q)===0:p==="$="?m.substr(m.length-q.length)===q:p==="|="?m===q||m.substr(0,q.length+1)===q+"-":false},POS:function(g,i,n,m){var p=o.setFilters[i[2]];
if(p)return p(g,n,i,m)}}},x=o.match.POS,r=function(g,i){return"\\"+(i-0+1)},A;for(A in o.match){o.match[A]=RegExp(o.match[A].source+/(?![^\[]*\])(?![^\(]*\))/.source);o.leftMatch[A]=RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[A].source.replace(/\\(\d+)/g,r))}var C=function(g,i){g=Array.prototype.slice.call(g,0);if(i){i.push.apply(i,g);return i}return g};try{Array.prototype.slice.call(t.documentElement.childNodes,0)}catch(J){C=function(g,i){var n=0,m=i||[];if(f.call(g)==="[object Array]")Array.prototype.push.apply(m,
g);else if(typeof g.length==="number")for(var p=g.length;n<p;n++)m.push(g[n]);else for(;g[n];n++)m.push(g[n]);return m}}var w,I;if(t.documentElement.compareDocumentPosition)w=function(g,i){if(g===i){h=true;return 0}if(!g.compareDocumentPosition||!i.compareDocumentPosition)return g.compareDocumentPosition?-1:1;return g.compareDocumentPosition(i)&4?-1:1};else{w=function(g,i){var n,m,p=[],q=[];n=g.parentNode;m=i.parentNode;var u=n;if(g===i){h=true;return 0}else if(n===m)return I(g,i);else if(n){if(!m)return 1}else return-1;
for(;u;){p.unshift(u);u=u.parentNode}for(u=m;u;){q.unshift(u);u=u.parentNode}n=p.length;m=q.length;for(u=0;u<n&&u<m;u++)if(p[u]!==q[u])return I(p[u],q[u]);return u===n?I(g,q[u],-1):I(p[u],i,1)};I=function(g,i,n){if(g===i)return n;for(g=g.nextSibling;g;){if(g===i)return-1;g=g.nextSibling}return 1}}k.getText=function(g){for(var i="",n,m=0;g[m];m++){n=g[m];if(n.nodeType===3||n.nodeType===4)i+=n.nodeValue;else if(n.nodeType!==8)i+=k.getText(n.childNodes)}return i};(function(){var g=t.createElement("div"),
i="script"+(new Date).getTime(),n=t.documentElement;g.innerHTML="<a name='"+i+"'/>";n.insertBefore(g,n.firstChild);if(t.getElementById(i)){o.find.ID=function(m,p,q){if(typeof p.getElementById!=="undefined"&&!q)return(p=p.getElementById(m[1]))?p.id===m[1]||typeof p.getAttributeNode!=="undefined"&&p.getAttributeNode("id").nodeValue===m[1]?[p]:B:[]};o.filter.ID=function(m,p){var q=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&q&&q.nodeValue===p}}n.removeChild(g);
n=g=null})();(function(){var g=t.createElement("div");g.appendChild(t.createComment(""));if(g.getElementsByTagName("*").length>0)o.find.TAG=function(i,n){var m=n.getElementsByTagName(i[1]);if(i[1]==="*"){for(var p=[],q=0;m[q];q++)m[q].nodeType===1&&p.push(m[q]);m=p}return m};g.innerHTML="<a href='#'></a>";if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")o.attrHandle.href=function(i){return i.getAttribute("href",2)};g=null})();t.querySelectorAll&&
function(){var g=k,i=t.createElement("div");i.innerHTML="<p class='TEST'></p>";if(!(i.querySelectorAll&&i.querySelectorAll(".TEST").length===0)){k=function(m,p,q,u){p=p||t;m=m.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!u&&!k.isXML(p))if(p.nodeType===9)try{return C(p.querySelectorAll(m),q)}catch(y){}else if(p.nodeType===1&&p.nodeName.toLowerCase()!=="object"){var F=p.getAttribute("id"),M=F||"__sizzle__";F||p.setAttribute("id",M);try{return C(p.querySelectorAll("#"+M+" "+m),q)}catch(N){}finally{F||
p.removeAttribute("id")}}return g(m,p,q,u)};for(var n in g)k[n]=g[n];i=null}}();(function(){var g=t.documentElement,i=g.matchesSelector||g.mozMatchesSelector||g.webkitMatchesSelector||g.msMatchesSelector,n=false;try{i.call(t.documentElement,"[test!='']:sizzle")}catch(m){n=true}if(i)k.matchesSelector=function(p,q){q=q.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(p))try{if(n||!o.match.PSEUDO.test(q)&&!/!=/.test(q))return i.call(p,q)}catch(u){}return k(q,null,null,[p]).length>0}})();(function(){var g=
t.createElement("div");g.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){o.order.splice(1,0,"CLASS");o.find.CLASS=function(i,n,m){if(typeof n.getElementsByClassName!=="undefined"&&!m)return n.getElementsByClassName(i[1])};g=null}}})();k.contains=t.documentElement.contains?function(g,i){return g!==i&&(g.contains?g.contains(i):true)}:t.documentElement.compareDocumentPosition?
function(g,i){return!!(g.compareDocumentPosition(i)&16)}:function(){return false};k.isXML=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false};var L=function(g,i){for(var n,m=[],p="",q=i.nodeType?[i]:i;n=o.match.PSEUDO.exec(g);){p+=n[0];g=g.replace(o.match.PSEUDO,"")}g=o.relative[g]?g+"*":g;n=0;for(var u=q.length;n<u;n++)k(g,q[n],m);return k.filter(p,m)};c.find=k;c.expr=k.selectors;c.expr[":"]=c.expr.filters;c.unique=k.uniqueSort;c.text=k.getText;c.isXMLDoc=k.isXML;
c.contains=k.contains})();var Za=/Until$/,$a=/^(?:parents|prevUntil|prevAll)/,ab=/,/,Na=/^.[^:#\[\.,]*$/,bb=Array.prototype.slice,cb=c.expr.match.POS;c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,e=0,f=this.length;e<f;e++){d=b.length;c.find(a,this[e],b);if(e>0)for(var h=d;h<b.length;h++)for(var l=0;l<d;l++)if(b[l]===b[h]){b.splice(h--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=0,e=b.length;d<e;d++)if(c.contains(this,b[d]))return true})},
not:function(a){return this.pushStack(ma(this,a,false),"not",a)},filter:function(a){return this.pushStack(ma(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a,b){var d=[],e,f,h=this[0];if(c.isArray(a)){var l,k={},o=1;if(h&&a.length){e=0;for(f=a.length;e<f;e++){l=a[e];k[l]||(k[l]=c.expr.match.POS.test(l)?c(l,b||this.context):l)}for(;h&&h.ownerDocument&&h!==b;){for(l in k){e=k[l];if(e.jquery?e.index(h)>-1:c(h).is(e))d.push({selector:l,elem:h,level:o})}h=
h.parentNode;o++}}return d}l=cb.test(a)?c(a,b||this.context):null;e=0;for(f=this.length;e<f;e++)for(h=this[e];h;)if(l?l.index(h)>-1:c.find.matchesSelector(h,a)){d.push(h);break}else{h=h.parentNode;if(!h||!h.ownerDocument||h===b)break}d=d.length>1?c.unique(d):d;return this.pushStack(d,"closest",a)},index:function(a){if(!a||typeof a==="string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var d=typeof a==="string"?c(a,b||this.context):
c.makeArray(a),e=c.merge(this.get(),d);return this.pushStack(!d[0]||!d[0].parentNode||d[0].parentNode.nodeType===11||!e[0]||!e[0].parentNode||e[0].parentNode.nodeType===11?e:c.unique(e))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,
2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,
b){c.fn[a]=function(d,e){var f=c.map(this,b,d);Za.test(a)||(e=d);if(e&&typeof e==="string")f=c.filter(e,f);f=this.length>1?c.unique(f):f;if((this.length>1||ab.test(e))&&$a.test(a))f=f.reverse();return this.pushStack(f,a,bb.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return b.length===1?c.find.matchesSelector(b[0],a)?[b[0]]:[]:c.find.matches(a,b)},dir:function(a,b,d){var e=[];for(a=a[b];a&&a.nodeType!==9&&(d===B||a.nodeType!==1||!c(a).is(d));){a.nodeType===1&&
e.push(a);a=a[b]}return e},nth:function(a,b,d){b=b||1;for(var e=0;a;a=a[d])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var za=/ jQuery\d+="(?:\d+|null)"/g,$=/^\s+/,Aa=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Ba=/<([\w:]+)/,db=/<tbody/i,eb=/<|&#?\w+;/,Ca=/<(?:script|object|embed|option|style)/i,Da=/checked\s*(?:[^=]|=\s*.checked.)/i,fb=/\=([^="'>\s]+\/)>/g,P={option:[1,
"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};P.optgroup=P.option;P.tbody=P.tfoot=P.colgroup=P.caption=P.thead;P.th=P.td;if(!c.support.htmlSerialize)P._default=[1,"div<div>","</div>"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=
c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==B)return this.empty().append((this[0]&&this[0].ownerDocument||t).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this},
wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},
prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,
this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,e;(e=this[d])!=null;d++)if(!a||c.filter(a,[e]).length){if(!b&&e.nodeType===1){c.cleanData(e.getElementsByTagName("*"));c.cleanData([e])}e.parentNode&&e.parentNode.removeChild(e)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild);
return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,e=this.ownerDocument;if(!d){d=e.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(za,"").replace(fb,'="$1">').replace($,"")],e)[0]}else return this.cloneNode(true)});if(a===true){na(this,b);na(this.find("*"),b.find("*"))}return b},html:function(a){if(a===B)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(za,""):null;
else if(typeof a==="string"&&!Ca.test(a)&&(c.support.leadingWhitespace||!$.test(a))&&!P[(Ba.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Aa,"<$1></$2>");try{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){c.cleanData(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(e){this.empty().append(a)}}else c.isFunction(a)?this.each(function(f){var h=c(this);h.html(a.call(this,f,h.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(c.isFunction(a))return this.each(function(b){var d=
c(this),e=d.html();d.replaceWith(a.call(this,b,e))});if(typeof a!=="string")a=c(a).detach();return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){var e,f,h,l=a[0],k=[];if(!c.support.checkClone&&arguments.length===3&&typeof l==="string"&&Da.test(l))return this.each(function(){c(this).domManip(a,
b,d,true)});if(c.isFunction(l))return this.each(function(x){var r=c(this);a[0]=l.call(this,x,b?r.html():B);r.domManip(a,b,d)});if(this[0]){e=l&&l.parentNode;e=c.support.parentNode&&e&&e.nodeType===11&&e.childNodes.length===this.length?{fragment:e}:c.buildFragment(a,this,k);h=e.fragment;if(f=h.childNodes.length===1?h=h.firstChild:h.firstChild){b=b&&c.nodeName(f,"tr");f=0;for(var o=this.length;f<o;f++)d.call(b?c.nodeName(this[f],"table")?this[f].getElementsByTagName("tbody")[0]||this[f].appendChild(this[f].ownerDocument.createElement("tbody")):
this[f]:this[f],f>0||e.cacheable||this.length>1?h.cloneNode(true):h)}k.length&&c.each(k,Oa)}return this}});c.buildFragment=function(a,b,d){var e,f,h;b=b&&b[0]?b[0].ownerDocument||b[0]:t;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===t&&!Ca.test(a[0])&&(c.support.checkClone||!Da.test(a[0]))){f=true;if(h=c.fragments[a[0]])if(h!==1)e=h}if(!e){e=b.createDocumentFragment();c.clean(a,b,e,d)}if(f)c.fragments[a[0]]=h?e:1;return{fragment:e,cacheable:f}};c.fragments={};c.each({appendTo:"append",
prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var e=[];d=c(d);var f=this.length===1&&this[0].parentNode;if(f&&f.nodeType===11&&f.childNodes.length===1&&d.length===1){d[b](this[0]);return this}else{f=0;for(var h=d.length;f<h;f++){var l=(f>0?this.clone(true):this).get();c(d[f])[b](l);e=e.concat(l)}return this.pushStack(e,a,d.selector)}}});c.extend({clean:function(a,b,d,e){b=b||t;if(typeof b.createElement==="undefined")b=b.ownerDocument||
b[0]&&b[0].ownerDocument||t;for(var f=[],h=0,l;(l=a[h])!=null;h++){if(typeof l==="number")l+="";if(l){if(typeof l==="string"&&!eb.test(l))l=b.createTextNode(l);else if(typeof l==="string"){l=l.replace(Aa,"<$1></$2>");var k=(Ba.exec(l)||["",""])[1].toLowerCase(),o=P[k]||P._default,x=o[0],r=b.createElement("div");for(r.innerHTML=o[1]+l+o[2];x--;)r=r.lastChild;if(!c.support.tbody){x=db.test(l);k=k==="table"&&!x?r.firstChild&&r.firstChild.childNodes:o[1]==="<table>"&&!x?r.childNodes:[];for(o=k.length-
1;o>=0;--o)c.nodeName(k[o],"tbody")&&!k[o].childNodes.length&&k[o].parentNode.removeChild(k[o])}!c.support.leadingWhitespace&&$.test(l)&&r.insertBefore(b.createTextNode($.exec(l)[0]),r.firstChild);l=r.childNodes}if(l.nodeType)f.push(l);else f=c.merge(f,l)}}if(d)for(h=0;f[h];h++)if(e&&c.nodeName(f[h],"script")&&(!f[h].type||f[h].type.toLowerCase()==="text/javascript"))e.push(f[h].parentNode?f[h].parentNode.removeChild(f[h]):f[h]);else{f[h].nodeType===1&&f.splice.apply(f,[h+1,0].concat(c.makeArray(f[h].getElementsByTagName("script"))));
d.appendChild(f[h])}return f},cleanData:function(a){for(var b,d,e=c.cache,f=c.event.special,h=c.support.deleteExpando,l=0,k;(k=a[l])!=null;l++)if(!(k.nodeName&&c.noData[k.nodeName.toLowerCase()]))if(d=k[c.expando]){if((b=e[d])&&b.events)for(var o in b.events)f[o]?c.event.remove(k,o):c.removeEvent(k,o,b.handle);if(h)delete k[c.expando];else k.removeAttribute&&k.removeAttribute(c.expando);delete e[d]}}});var Ea=/alpha\([^)]*\)/i,gb=/opacity=([^)]*)/,hb=/-([a-z])/ig,ib=/([A-Z])/g,Fa=/^-?\d+(?:px)?$/i,
jb=/^-?\d/,kb={position:"absolute",visibility:"hidden",display:"block"},Pa=["Left","Right"],Qa=["Top","Bottom"],W,Ga,aa,lb=function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){if(arguments.length===2&&b===B)return this;return c.access(this,a,b,true,function(d,e,f){return f!==B?c.style(d,e,f):c.css(d,e)})};c.extend({cssHooks:{opacity:{get:function(a,b){if(b){var d=W(a,"opacity","opacity");return d===""?"1":d}else return a.style.opacity}}},cssNumber:{zIndex:true,fontWeight:true,opacity:true,
zoom:true,lineHeight:true},cssProps:{"float":c.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,d,e){if(!(!a||a.nodeType===3||a.nodeType===8||!a.style)){var f,h=c.camelCase(b),l=a.style,k=c.cssHooks[h];b=c.cssProps[h]||h;if(d!==B){if(!(typeof d==="number"&&isNaN(d)||d==null)){if(typeof d==="number"&&!c.cssNumber[h])d+="px";if(!k||!("set"in k)||(d=k.set(a,d))!==B)try{l[b]=d}catch(o){}}}else{if(k&&"get"in k&&(f=k.get(a,false,e))!==B)return f;return l[b]}}},css:function(a,b,d){var e,f=c.camelCase(b),
h=c.cssHooks[f];b=c.cssProps[f]||f;if(h&&"get"in h&&(e=h.get(a,true,d))!==B)return e;else if(W)return W(a,b,f)},swap:function(a,b,d){var e={},f;for(f in b){e[f]=a.style[f];a.style[f]=b[f]}d.call(a);for(f in b)a.style[f]=e[f]},camelCase:function(a){return a.replace(hb,lb)}});c.curCSS=c.css;c.each(["height","width"],function(a,b){c.cssHooks[b]={get:function(d,e,f){var h;if(e){if(d.offsetWidth!==0)h=oa(d,b,f);else c.swap(d,kb,function(){h=oa(d,b,f)});if(h<=0){h=W(d,b,b);if(h==="0px"&&aa)h=aa(d,b,b);
if(h!=null)return h===""||h==="auto"?"0px":h}if(h<0||h==null){h=d.style[b];return h===""||h==="auto"?"0px":h}return typeof h==="string"?h:h+"px"}},set:function(d,e){if(Fa.test(e)){e=parseFloat(e);if(e>=0)return e+"px"}else return e}}});if(!c.support.opacity)c.cssHooks.opacity={get:function(a,b){return gb.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var d=a.style;d.zoom=1;var e=c.isNaN(b)?"":"alpha(opacity="+b*100+")",f=
d.filter||"";d.filter=Ea.test(f)?f.replace(Ea,e):d.filter+" "+e}};if(t.defaultView&&t.defaultView.getComputedStyle)Ga=function(a,b,d){var e;d=d.replace(ib,"-$1").toLowerCase();if(!(b=a.ownerDocument.defaultView))return B;if(b=b.getComputedStyle(a,null)){e=b.getPropertyValue(d);if(e===""&&!c.contains(a.ownerDocument.documentElement,a))e=c.style(a,d)}return e};if(t.documentElement.currentStyle)aa=function(a,b){var d,e,f=a.currentStyle&&a.currentStyle[b],h=a.style;if(!Fa.test(f)&&jb.test(f)){d=h.left;
e=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;h.left=b==="fontSize"?"1em":f||0;f=h.pixelLeft+"px";h.left=d;a.runtimeStyle.left=e}return f===""?"auto":f};W=Ga||aa;if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=a.offsetHeight;return a.offsetWidth===0&&b===0||!c.support.reliableHiddenOffsets&&(a.style.display||c.css(a,"display"))==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var mb=c.now(),nb=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
ob=/^(?:select|textarea)/i,pb=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,qb=/^(?:GET|HEAD)$/,Ra=/\[\]$/,T=/\=\?(&|$)/,ja=/\?/,rb=/([?&])_=[^&]*/,sb=/^(\w+:)?\/\/([^\/?#]+)/,tb=/%20/g,ub=/#.*$/,Ha=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!=="string"&&Ha)return Ha.apply(this,arguments);else if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var f=a.slice(e,a.length);a=a.slice(0,e)}e="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b===
"object"){b=c.param(b,c.ajaxSettings.traditional);e="POST"}var h=this;c.ajax({url:a,type:e,dataType:"html",data:b,complete:function(l,k){if(k==="success"||k==="notmodified")h.html(f?c("<div>").append(l.responseText.replace(nb,"")).find(f):l.responseText);d&&h.each(d,[l.responseText,k,l])}});return this},serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&
!this.disabled&&(this.checked||ob.test(this.nodeName)||pb.test(this.type))}).map(function(a,b){var d=c(this).val();return d==null?null:c.isArray(d)?c.map(d,function(e){return{name:b.name,value:e}}):{name:b.name,value:d}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,e){if(c.isFunction(b)){e=e||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:e})},
getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,e){if(c.isFunction(b)){e=e||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:e})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return new E.XMLHttpRequest},accepts:{xml:"application/xml, text/xml",html:"text/html",
script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},ajax:function(a){var b=c.extend(true,{},c.ajaxSettings,a),d,e,f,h=b.type.toUpperCase(),l=qb.test(h);b.url=b.url.replace(ub,"");b.context=a&&a.context!=null?a.context:b;if(b.data&&b.processData&&typeof b.data!=="string")b.data=c.param(b.data,b.traditional);if(b.dataType==="jsonp"){if(h==="GET")T.test(b.url)||(b.url+=(ja.test(b.url)?"&":"?")+(b.jsonp||"callback")+"=?");else if(!b.data||
!T.test(b.data))b.data=(b.data?b.data+"&":"")+(b.jsonp||"callback")+"=?";b.dataType="json"}if(b.dataType==="json"&&(b.data&&T.test(b.data)||T.test(b.url))){d=b.jsonpCallback||"jsonp"+mb++;if(b.data)b.data=(b.data+"").replace(T,"="+d+"$1");b.url=b.url.replace(T,"="+d+"$1");b.dataType="script";var k=E[d];E[d]=function(m){if(c.isFunction(k))k(m);else{E[d]=B;try{delete E[d]}catch(p){}}f=m;c.handleSuccess(b,w,e,f);c.handleComplete(b,w,e,f);r&&r.removeChild(A)}}if(b.dataType==="script"&&b.cache===null)b.cache=
false;if(b.cache===false&&l){var o=c.now(),x=b.url.replace(rb,"$1_="+o);b.url=x+(x===b.url?(ja.test(b.url)?"&":"?")+"_="+o:"")}if(b.data&&l)b.url+=(ja.test(b.url)?"&":"?")+b.data;b.global&&c.active++===0&&c.event.trigger("ajaxStart");o=(o=sb.exec(b.url))&&(o[1]&&o[1].toLowerCase()!==location.protocol||o[2].toLowerCase()!==location.host);if(b.dataType==="script"&&h==="GET"&&o){var r=t.getElementsByTagName("head")[0]||t.documentElement,A=t.createElement("script");if(b.scriptCharset)A.charset=b.scriptCharset;
A.src=b.url;if(!d){var C=false;A.onload=A.onreadystatechange=function(){if(!C&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){C=true;c.handleSuccess(b,w,e,f);c.handleComplete(b,w,e,f);A.onload=A.onreadystatechange=null;r&&A.parentNode&&r.removeChild(A)}}}r.insertBefore(A,r.firstChild);return B}var J=false,w=b.xhr();if(w){b.username?w.open(h,b.url,b.async,b.username,b.password):w.open(h,b.url,b.async);try{if(b.data!=null&&!l||a&&a.contentType)w.setRequestHeader("Content-Type",
b.contentType);if(b.ifModified){c.lastModified[b.url]&&w.setRequestHeader("If-Modified-Since",c.lastModified[b.url]);c.etag[b.url]&&w.setRequestHeader("If-None-Match",c.etag[b.url])}o||w.setRequestHeader("X-Requested-With","XMLHttpRequest");w.setRequestHeader("Accept",b.dataType&&b.accepts[b.dataType]?b.accepts[b.dataType]+", */*; q=0.01":b.accepts._default)}catch(I){}if(b.beforeSend&&b.beforeSend.call(b.context,w,b)===false){b.global&&c.active--===1&&c.event.trigger("ajaxStop");w.abort();return false}b.global&&
c.triggerGlobal(b,"ajaxSend",[w,b]);var L=w.onreadystatechange=function(m){if(!w||w.readyState===0||m==="abort"){J||c.handleComplete(b,w,e,f);J=true;if(w)w.onreadystatechange=c.noop}else if(!J&&w&&(w.readyState===4||m==="timeout")){J=true;w.onreadystatechange=c.noop;e=m==="timeout"?"timeout":!c.httpSuccess(w)?"error":b.ifModified&&c.httpNotModified(w,b.url)?"notmodified":"success";var p;if(e==="success")try{f=c.httpData(w,b.dataType,b)}catch(q){e="parsererror";p=q}if(e==="success"||e==="notmodified")d||
c.handleSuccess(b,w,e,f);else c.handleError(b,w,e,p);d||c.handleComplete(b,w,e,f);m==="timeout"&&w.abort();if(b.async)w=null}};try{var g=w.abort;w.abort=function(){w&&Function.prototype.call.call(g,w);L("abort")}}catch(i){}b.async&&b.timeout>0&&setTimeout(function(){w&&!J&&L("timeout")},b.timeout);try{w.send(l||b.data==null?null:b.data)}catch(n){c.handleError(b,w,null,n);c.handleComplete(b,w,e,f)}b.async||L();return w}},param:function(a,b){var d=[],e=function(h,l){l=c.isFunction(l)?l():l;d[d.length]=
encodeURIComponent(h)+"="+encodeURIComponent(l)};if(b===B)b=c.ajaxSettings.traditional;if(c.isArray(a)||a.jquery)c.each(a,function(){e(this.name,this.value)});else for(var f in a)da(f,a[f],b,e);return d.join("&").replace(tb,"+")}});c.extend({active:0,lastModified:{},etag:{},handleError:function(a,b,d,e){a.error&&a.error.call(a.context,b,d,e);a.global&&c.triggerGlobal(a,"ajaxError",[b,a,e])},handleSuccess:function(a,b,d,e){a.success&&a.success.call(a.context,e,d,b);a.global&&c.triggerGlobal(a,"ajaxSuccess",
[b,a])},handleComplete:function(a,b,d){a.complete&&a.complete.call(a.context,b,d);a.global&&c.triggerGlobal(a,"ajaxComplete",[b,a]);a.global&&c.active--===1&&c.event.trigger("ajaxStop")},triggerGlobal:function(a,b,d){(a.context&&a.context.url==null?c(a.context):c.event).trigger(b,d)},httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status===1223}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),
e=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(e)c.etag[b]=e;return a.status===304},httpData:function(a,b,d){var e=a.getResponseHeader("content-type")||"",f=b==="xml"||!b&&e.indexOf("xml")>=0;a=f?a.responseXML:a.responseText;f&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b==="json"||!b&&e.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&e.indexOf("javascript")>=0)c.globalEval(a);return a}});
if(E.ActiveXObject)c.ajaxSettings.xhr=function(){if(E.location.protocol!=="file:")try{return new E.XMLHttpRequest}catch(a){}try{return new E.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}};c.support.ajax=!!c.ajaxSettings.xhr();var ea={},vb=/^(?:toggle|show|hide)$/,wb=/^([+\-]=)?([\d+.\-]+)(.*)$/,ba,pa=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b,d){if(a||a===0)return this.animate(S("show",
3),a,b,d);else{d=0;for(var e=this.length;d<e;d++){a=this[d];b=a.style.display;if(!c.data(a,"olddisplay")&&b==="none")b=a.style.display="";b===""&&c.css(a,"display")==="none"&&c.data(a,"olddisplay",qa(a.nodeName))}for(d=0;d<e;d++){a=this[d];b=a.style.display;if(b===""||b==="none")a.style.display=c.data(a,"olddisplay")||""}return this}},hide:function(a,b,d){if(a||a===0)return this.animate(S("hide",3),a,b,d);else{a=0;for(b=this.length;a<b;a++){d=c.css(this[a],"display");d!=="none"&&c.data(this[a],"olddisplay",
d)}for(a=0;a<b;a++)this[a].style.display="none";return this}},_toggle:c.fn.toggle,toggle:function(a,b,d){var e=typeof a==="boolean";if(c.isFunction(a)&&c.isFunction(b))this._toggle.apply(this,arguments);else a==null||e?this.each(function(){var f=e?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(S("toggle",3),a,b,d);return this},fadeTo:function(a,b,d,e){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d,e)},animate:function(a,b,d,e){var f=c.speed(b,
d,e);if(c.isEmptyObject(a))return this.each(f.complete);return this[f.queue===false?"each":"queue"](function(){var h=c.extend({},f),l,k=this.nodeType===1,o=k&&c(this).is(":hidden"),x=this;for(l in a){var r=c.camelCase(l);if(l!==r){a[r]=a[l];delete a[l];l=r}if(a[l]==="hide"&&o||a[l]==="show"&&!o)return h.complete.call(this);if(k&&(l==="height"||l==="width")){h.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY];if(c.css(this,"display")==="inline"&&c.css(this,"float")==="none")if(c.support.inlineBlockNeedsLayout)if(qa(this.nodeName)===
"inline")this.style.display="inline-block";else{this.style.display="inline";this.style.zoom=1}else this.style.display="inline-block"}if(c.isArray(a[l])){(h.specialEasing=h.specialEasing||{})[l]=a[l][1];a[l]=a[l][0]}}if(h.overflow!=null)this.style.overflow="hidden";h.curAnim=c.extend({},a);c.each(a,function(A,C){var J=new c.fx(x,h,A);if(vb.test(C))J[C==="toggle"?o?"show":"hide":C](a);else{var w=wb.exec(C),I=J.cur()||0;if(w){var L=parseFloat(w[2]),g=w[3]||"px";if(g!=="px"){c.style(x,A,(L||1)+g);I=(L||
1)/J.cur()*I;c.style(x,A,I+g)}if(w[1])L=(w[1]==="-="?-1:1)*L+I;J.custom(I,L,g)}else J.custom(I,C,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]);this.each(function(){for(var e=d.length-1;e>=0;e--)if(d[e].elem===this){b&&d[e](true);d.splice(e,1)}});b||this.dequeue();return this}});c.each({slideDown:S("show",1),slideUp:S("hide",1),slideToggle:S("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){c.fn[a]=function(d,e,f){return this.animate(b,
d,e,f)}});c.extend({speed:function(a,b,d){var e=a&&typeof a==="object"?c.extend({},a):{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};e.duration=c.fx.off?0:typeof e.duration==="number"?e.duration:e.duration in c.fx.speeds?c.fx.speeds[e.duration]:c.fx.speeds._default;e.old=e.complete;e.complete=function(){e.queue!==false&&c(this).dequeue();c.isFunction(e.old)&&e.old.call(this)};return e},easing:{linear:function(a,b,d,e){return d+e*a},swing:function(a,b,d,e){return(-Math.cos(a*
Math.PI)/2+0.5)*e+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]||c.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a=parseFloat(c.css(this.elem,this.prop));return a&&a>-1E4?a:0},custom:function(a,b,d){function e(l){return f.step(l)}
var f=this,h=c.fx;this.startTime=c.now();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start;this.pos=this.state=0;e.elem=this.elem;if(e()&&c.timers.push(e)&&!ba)ba=setInterval(h.tick,h.interval)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;
this.custom(this.cur(),0)},step:function(a){var b=c.now(),d=true;if(a||b>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var e in this.options.curAnim)if(this.options.curAnim[e]!==true)d=false;if(d){if(this.options.overflow!=null&&!c.support.shrinkWrapBlocks){var f=this.elem,h=this.options;c.each(["","X","Y"],function(k,o){f.style["overflow"+o]=h.overflow[k]})}this.options.hide&&c(this.elem).hide();if(this.options.hide||
this.options.show)for(var l in this.options.curAnim)c.style(this.elem,l,this.options.orig[l]);this.options.complete.call(this.elem)}return false}else{a=b-this.startTime;this.state=a/this.options.duration;b=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||b](this.state,a,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=
c.timers,b=0;b<a.length;b++)a[b]()||a.splice(b--,1);a.length||c.fx.stop()},interval:13,stop:function(){clearInterval(ba);ba=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===
b.elem}).length};var xb=/^t(?:able|d|h)$/i,Ia=/^(?:body|html)$/i;c.fn.offset="getBoundingClientRect"in t.documentElement?function(a){var b=this[0],d;if(a)return this.each(function(l){c.offset.setOffset(this,a,l)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);try{d=b.getBoundingClientRect()}catch(e){}var f=b.ownerDocument,h=f.documentElement;if(!d||!c.contains(h,b))return d||{top:0,left:0};b=f.body;f=fa(f);return{top:d.top+(f.pageYOffset||c.support.boxModel&&
h.scrollTop||b.scrollTop)-(h.clientTop||b.clientTop||0),left:d.left+(f.pageXOffset||c.support.boxModel&&h.scrollLeft||b.scrollLeft)-(h.clientLeft||b.clientLeft||0)}}:function(a){var b=this[0];if(a)return this.each(function(x){c.offset.setOffset(this,a,x)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d,e=b.offsetParent,f=b.ownerDocument,h=f.documentElement,l=f.body;d=(f=f.defaultView)?f.getComputedStyle(b,null):b.currentStyle;
for(var k=b.offsetTop,o=b.offsetLeft;(b=b.parentNode)&&b!==l&&b!==h;){if(c.offset.supportsFixedPosition&&d.position==="fixed")break;d=f?f.getComputedStyle(b,null):b.currentStyle;k-=b.scrollTop;o-=b.scrollLeft;if(b===e){k+=b.offsetTop;o+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&xb.test(b.nodeName))){k+=parseFloat(d.borderTopWidth)||0;o+=parseFloat(d.borderLeftWidth)||0}e=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&d.overflow!=="visible"){k+=
parseFloat(d.borderTopWidth)||0;o+=parseFloat(d.borderLeftWidth)||0}d=d}if(d.position==="relative"||d.position==="static"){k+=l.offsetTop;o+=l.offsetLeft}if(c.offset.supportsFixedPosition&&d.position==="fixed"){k+=Math.max(h.scrollTop,l.scrollTop);o+=Math.max(h.scrollLeft,l.scrollLeft)}return{top:k,left:o}};c.offset={initialize:function(){var a=t.body,b=t.createElement("div"),d,e,f,h=parseFloat(c.css(a,"marginTop"))||0;c.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",
height:"1px",visibility:"hidden"});b.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";a.insertBefore(b,a.firstChild);d=b.firstChild;e=d.firstChild;f=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=e.offsetTop!==5;this.doesAddBorderForTableAndCells=
f.offsetTop===5;e.style.position="fixed";e.style.top="20px";this.supportsFixedPosition=e.offsetTop===20||e.offsetTop===15;e.style.position=e.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=e.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==h;a.removeChild(b);c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.css(a,
"marginTop"))||0;d+=parseFloat(c.css(a,"marginLeft"))||0}return{top:b,left:d}},setOffset:function(a,b,d){var e=c.css(a,"position");if(e==="static")a.style.position="relative";var f=c(a),h=f.offset(),l=c.css(a,"top"),k=c.css(a,"left"),o=e==="absolute"&&c.inArray("auto",[l,k])>-1;e={};var x={};if(o)x=f.position();l=o?x.top:parseInt(l,10)||0;k=o?x.left:parseInt(k,10)||0;if(c.isFunction(b))b=b.call(a,d,h);if(b.top!=null)e.top=b.top-h.top+l;if(b.left!=null)e.left=b.left-h.left+k;"using"in b?b.using.call(a,
e):f.css(e)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),e=Ia.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.css(a,"marginTop"))||0;d.left-=parseFloat(c.css(a,"marginLeft"))||0;e.top+=parseFloat(c.css(b[0],"borderTopWidth"))||0;e.left+=parseFloat(c.css(b[0],"borderLeftWidth"))||0;return{top:d.top-e.top,left:d.left-e.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||t.body;a&&!Ia.test(a.nodeName)&&
c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(e){var f=this[0],h;if(!f)return null;if(e!==B)return this.each(function(){if(h=fa(this))h.scrollTo(!a?e:c(h).scrollLeft(),a?e:c(h).scrollTop());else this[d]=e});else return(h=fa(f))?"pageXOffset"in h?h[a?"pageYOffset":"pageXOffset"]:c.support.boxModel&&h.document.documentElement[d]||h.document.body[d]:f[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();
c.fn["inner"+b]=function(){return this[0]?parseFloat(c.css(this[0],d,"padding")):null};c.fn["outer"+b]=function(e){return this[0]?parseFloat(c.css(this[0],d,e?"margin":"border")):null};c.fn[d]=function(e){var f=this[0];if(!f)return e==null?null:this;if(c.isFunction(e))return this.each(function(l){var k=c(this);k[d](e.call(this,l,k[d]()))});if(c.isWindow(f))return f.document.compatMode==="CSS1Compat"&&f.document.documentElement["client"+b]||f.document.body["client"+b];else if(f.nodeType===9)return Math.max(f.documentElement["client"+
b],f.body["scroll"+b],f.documentElement["scroll"+b],f.body["offset"+b],f.documentElement["offset"+b]);else if(e===B){f=c.css(f,d);var h=parseFloat(f);return c.isNaN(h)?f:h}else return this.css(d,typeof e==="string"?e:e+"px")}})})(window);
This source diff could not be displayed because it is too large. You can view the blob instead.
// jQuery Alert Dialogs Plugin
//
// Version 1.1
//
// Cory S.N. LaViska
// A Beautiful Site (http://abeautifulsite.net/)
// 14 May 2009
//
// Visit http://abeautifulsite.net/notebook/87 for more information
//
// Usage:
// jAlert( message, [title, callback] )
// jConfirm( message, [title, callback] )
// jPrompt( message, [value, title, callback] )
//
// History:
//
// 1.00 - Released (29 December 2008)
//
// 1.01 - Fixed bug where unbinding would destroy all resize events
//
// License:
//
// This plugin is dual-licensed under the GNU General Public License and the MIT License and
// is copyright 2008 A Beautiful Site, LLC.
//
(function($) {
$.alerts = {
// These properties can be read/written by accessing $.alerts.propertyName from your scripts at any time
verticalOffset: -75, // vertical offset of the dialog from center screen, in pixels
horizontalOffset: 0, // horizontal offset of the dialog from center screen, in pixels/
repositionOnResize: true, // re-centers the dialog on window resize
overlayOpacity: .01, // transparency level of overlay
overlayColor: '#FFF', // base color of overlay
draggable: true, // make the dialogs draggable (requires UI Draggables plugin)
okButton: '&nbsp;OK&nbsp;', // text for the OK button
cancelButton: '&nbsp;Cancel&nbsp;', // text for the Cancel button
dialogClass: null, // if specified, this class will be applied to all dialogs
// Public methods
alert: function(message, title, callback) {
if( title == null ) title = 'Alert';
$.alerts._show(title, message, null, 'alert', function(result) {
if( callback ) callback(result);
});
},
confirm: function(message, title, callback) {
if( title == null ) title = 'Confirm';
$.alerts._show(title, message, null, 'confirm', function(result) {
if( callback ) callback(result);
});
},
prompt: function(message, value, title, callback) {
if( title == null ) title = 'Prompt';
$.alerts._show(title, message, value, 'prompt', function(result) {
if( callback ) callback(result);
});
},
// Private methods
_show: function(title, msg, value, type, callback) {
$.alerts._hide();
$.alerts._overlay('show');
$("BODY").append(
'<div id="popup_container">' +
'<h1 id="popup_title"></h1>' +
'<div id="popup_content">' +
'<div id="popup_message"></div>' +
'</div>' +
'</div>');
if( $.alerts.dialogClass ) $("#popup_container").addClass($.alerts.dialogClass);
// IE6 Fix
var pos = ($.browser.msie && parseInt($.browser.version) <= 6 ) ? 'absolute' : 'fixed';
$("#popup_container").css({
position: pos,
zIndex: 99999,
padding: 0,
margin: 0
});
$("#popup_title").text(title);
$("#popup_content").addClass(type);
$("#popup_message").text(msg);
$("#popup_message").html( $("#popup_message").text().replace(/\n/g, '<br />') );
$("#popup_container").css({
minWidth: $("#popup_container").outerWidth(),
maxWidth: $("#popup_container").outerWidth()
});
$.alerts._reposition();
$.alerts._maintainPosition(true);
switch( type ) {
case 'alert':
$("#popup_message").after('<div id="popup_panel"><input type="button" value="' + $.alerts.okButton + '" id="popup_ok" /></div>');
$("#popup_ok").click( function() {
$.alerts._hide();
callback(true);
});
$("#popup_ok").focus().keypress( function(e) {
if( e.keyCode == 13 || e.keyCode == 27 ) $("#popup_ok").trigger('click');
});
break;
case 'confirm':
$("#popup_message").after('<div id="popup_panel"><input type="button" value="' + $.alerts.okButton + '" id="popup_ok" /> <input type="button" value="' + $.alerts.cancelButton + '" id="popup_cancel" /></div>');
$("#popup_ok").click( function() {
$.alerts._hide();
if( callback ) callback(true);
});
$("#popup_cancel").click( function() {
$.alerts._hide();
if( callback ) callback(false);
});
$("#popup_ok").focus();
$("#popup_ok, #popup_cancel").keypress( function(e) {
if( e.keyCode == 13 ) $("#popup_ok").trigger('click');
if( e.keyCode == 27 ) $("#popup_cancel").trigger('click');
});
break;
case 'prompt':
$("#popup_message").append('<br /><input type="text" size="30" id="popup_prompt" />').after('<div id="popup_panel"><input type="button" value="' + $.alerts.okButton + '" id="popup_ok" /> <input type="button" value="' + $.alerts.cancelButton + '" id="popup_cancel" /></div>');
$("#popup_prompt").width( $("#popup_message").width() );
$("#popup_ok").click( function() {
var val = $("#popup_prompt").val();
$.alerts._hide();
if( callback ) callback( val );
});
$("#popup_cancel").click( function() {
$.alerts._hide();
if( callback ) callback( null );
});
$("#popup_prompt, #popup_ok, #popup_cancel").keypress( function(e) {
if( e.keyCode == 13 ) $("#popup_ok").trigger('click');
if( e.keyCode == 27 ) $("#popup_cancel").trigger('click');
});
if( value ) $("#popup_prompt").val(value);
$("#popup_prompt").focus().select();
break;
}
// Make draggable
if( $.alerts.draggable ) {
try {
$("#popup_container").draggable({ handle: $("#popup_title") });
$("#popup_title").css({ cursor: 'move' });
} catch(e) { /* requires jQuery UI draggables */ }
}
},
_hide: function() {
$("#popup_container").remove();
$.alerts._overlay('hide');
$.alerts._maintainPosition(false);
},
_overlay: function(status) {
switch( status ) {
case 'show':
$.alerts._overlay('hide');
$("BODY").append('<div id="popup_overlay"></div>');
$("#popup_overlay").css({
position: 'absolute',
zIndex: 99998,
top: '0px',
left: '0px',
width: '100%',
height: $(document).height(),
background: $.alerts.overlayColor,
opacity: $.alerts.overlayOpacity
});
break;
case 'hide':
$("#popup_overlay").remove();
break;
}
},
_reposition: function() {
var top = (($(window).height() / 2) - ($("#popup_container").outerHeight() / 2)) + $.alerts.verticalOffset;
var left = (($(window).width() / 2) - ($("#popup_container").outerWidth() / 2)) + $.alerts.horizontalOffset;
if( top < 0 ) top = 0;
if( left < 0 ) left = 0;
// IE6 fix
if( $.browser.msie && parseInt($.browser.version) <= 6 ) top = top + $(window).scrollTop();
$("#popup_container").css({
top: top + 'px',
left: left + 'px'
});
$("#popup_overlay").height( $(document).height() );
},
_maintainPosition: function(status) {
if( $.alerts.repositionOnResize ) {
switch(status) {
case true:
$(window).bind('resize', $.alerts._reposition);
break;
case false:
$(window).unbind('resize', $.alerts._reposition);
break;
}
}
}
}
// Shortuct functions
jAlert = function(message, title, callback) {
$.alerts.alert(message, title, callback);
}
jConfirm = function(message, title, callback) {
$.alerts.confirm(message, title, callback);
};
jPrompt = function(message, value, title, callback) {
$.alerts.prompt(message, value, title, callback);
};
})(jQuery);
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
/*
* JQuery zTree core 3.2
* http://code.google.com/p/jquerytree/
*
* Copyright (c) 2010 Hunter.z (baby666.cn)
*
* Licensed same as jquery - MIT License
* http://www.opensource.org/licenses/mit-license.php
*
* email: hunter.z@263.net
* Date: 2012-05-13
*/
(function(l){var D,E,F,G,H,I,p={},J={},s={},M=0,K={treeId:"",treeObj:null,view:{addDiyDom:null,autoCancelSelected:!0,dblClickExpand:!0,expandSpeed:"fast",fontCss:{},nameIsHTML:!1,selectedMulti:!0,showIcon:!0,showLine:!0,showTitle:!0},data:{key:{children:"children",name:"name",title:"",url:"url"},simpleData:{enable:!1,idKey:"id",pIdKey:"pId",rootPId:null},keep:{parent:!1,leaf:!1}},async:{enable:!1,contentType:"application/x-www-form-urlencoded",type:"post",dataType:"text",url:"",autoParam:[],otherParam:[],
dataFilter:null},callback:{beforeAsync:null,beforeClick:null,beforeRightClick:null,beforeMouseDown:null,beforeMouseUp:null,beforeExpand:null,beforeCollapse:null,beforeRemove:null,onAsyncError:null,onAsyncSuccess:null,onNodeCreated:null,onClick:null,onRightClick:null,onMouseDown:null,onMouseUp:null,onExpand:null,onCollapse:null,onRemove:null}},t=[function(b){var a=b.treeObj,c=f.event;a.unbind(c.NODECREATED);a.bind(c.NODECREATED,function(a,c,g){k.apply(b.callback.onNodeCreated,[a,c,g])});a.unbind(c.CLICK);
a.bind(c.CLICK,function(a,c,g,j,f){k.apply(b.callback.onClick,[c,g,j,f])});a.unbind(c.EXPAND);a.bind(c.EXPAND,function(a,c,g){k.apply(b.callback.onExpand,[a,c,g])});a.unbind(c.COLLAPSE);a.bind(c.COLLAPSE,function(a,c,g){k.apply(b.callback.onCollapse,[a,c,g])});a.unbind(c.ASYNC_SUCCESS);a.bind(c.ASYNC_SUCCESS,function(a,c,g,j){k.apply(b.callback.onAsyncSuccess,[a,c,g,j])});a.unbind(c.ASYNC_ERROR);a.bind(c.ASYNC_ERROR,function(a,c,g,j,f,h){k.apply(b.callback.onAsyncError,[a,c,g,j,f,h])})}],q=[function(b){var a=
h.getCache(b);a||(a={},h.setCache(b,a));a.nodes=[];a.doms=[]}],v=[function(b,a,c,d,e,g){if(c){var j=b.data.key.children;c.level=a;c.tId=b.treeId+"_"+ ++M;c.parentTId=d?d.tId:null;if(c[j]&&c[j].length>0){if(typeof c.open=="string")c.open=k.eqs(c.open,"true");c.open=!!c.open;c.isParent=!0;c.zAsync=!0}else{c.open=!1;if(typeof c.isParent=="string")c.isParent=k.eqs(c.isParent,"true");c.isParent=!!c.isParent;c.zAsync=!c.isParent}c.isFirstNode=e;c.isLastNode=g;c.getParentNode=function(){return h.getNodeCache(b,
c.parentTId)};c.getPreNode=function(){return h.getPreNode(b,c)};c.getNextNode=function(){return h.getNextNode(b,c)};c.isAjaxing=!1;h.fixPIdKeyValue(b,c)}}],w=[function(b){var a=b.target,c=p[b.data.treeId],d="",e=null,g="",j="",i=null,m=null,l=null;if(k.eqs(b.type,"mousedown"))j="mousedown";else if(k.eqs(b.type,"mouseup"))j="mouseup";else if(k.eqs(b.type,"contextmenu"))j="contextmenu";else if(k.eqs(b.type,"click"))if(k.eqs(a.tagName,"span")&&a.getAttribute("treeNode"+f.id.SWITCH)!==null)d=a.parentNode.id,
g="switchNode";else{if(l=k.getMDom(c,a,[{tagName:"a",attrName:"treeNode"+f.id.A}]))d=l.parentNode.id,g="clickNode"}else if(k.eqs(b.type,"dblclick")&&(j="dblclick",l=k.getMDom(c,a,[{tagName:"a",attrName:"treeNode"+f.id.A}])))d=l.parentNode.id,g="switchNode";if(j.length>0&&d.length==0&&(l=k.getMDom(c,a,[{tagName:"a",attrName:"treeNode"+f.id.A}])))d=l.parentNode.id;if(d.length>0)switch(e=h.getNodeCache(c,d),g){case "switchNode":e.isParent?k.eqs(b.type,"click")||k.eqs(b.type,"dblclick")&&k.apply(c.view.dblClickExpand,
[c.treeId,e],c.view.dblClickExpand)?i=D:g="":g="";break;case "clickNode":i=E}switch(j){case "mousedown":m=F;break;case "mouseup":m=G;break;case "dblclick":m=H;break;case "contextmenu":m=I}return{stop:!1,node:e,nodeEventType:g,nodeEventCallback:i,treeEventType:j,treeEventCallback:m}}],x=[function(b){var a=h.getRoot(b);a||(a={},h.setRoot(b,a));a.children=[];a.expandTriggerFlag=!1;a.curSelectedList=[];a.noSelection=!0;a.createdNodes=[]}],y=[],z=[],A=[],B=[],C=[],h={addNodeCache:function(b,a){h.getCache(b).nodes[a.tId]=
a},addAfterA:function(b){z.push(b)},addBeforeA:function(b){y.push(b)},addInnerAfterA:function(b){B.push(b)},addInnerBeforeA:function(b){A.push(b)},addInitBind:function(b){t.push(b)},addInitCache:function(b){q.push(b)},addInitNode:function(b){v.push(b)},addInitProxy:function(b){w.push(b)},addInitRoot:function(b){x.push(b)},addNodesData:function(b,a,c){var d=b.data.key.children;a[d]||(a[d]=[]);if(a[d].length>0)a[d][a[d].length-1].isLastNode=!1,i.setNodeLineIcos(b,a[d][a[d].length-1]);a.isParent=!0;
a[d]=a[d].concat(c)},addSelectedNode:function(b,a){var c=h.getRoot(b);h.isSelectedNode(b,a)||c.curSelectedList.push(a)},addCreatedNode:function(b,a){(b.callback.onNodeCreated||b.view.addDiyDom)&&h.getRoot(b).createdNodes.push(a)},addZTreeTools:function(b){C.push(b)},exSetting:function(b){l.extend(!0,K,b)},fixPIdKeyValue:function(b,a){b.data.simpleData.enable&&(a[b.data.simpleData.pIdKey]=a.parentTId?a.getParentNode()[b.data.simpleData.idKey]:b.data.simpleData.rootPId)},getAfterA:function(b,a,c){for(var d=
0,e=z.length;d<e;d++)z[d].apply(this,arguments)},getBeforeA:function(b,a,c){for(var d=0,e=y.length;d<e;d++)y[d].apply(this,arguments)},getInnerAfterA:function(b,a,c){for(var d=0,e=B.length;d<e;d++)B[d].apply(this,arguments)},getInnerBeforeA:function(b,a,c){for(var d=0,e=A.length;d<e;d++)A[d].apply(this,arguments)},getCache:function(b){return s[b.treeId]},getNextNode:function(b,a){if(!a)return null;var c=b.data.key.children,d=a.parentTId?a.getParentNode():h.getRoot(b);if(!a.isLastNode)if(a.isFirstNode)return d[c][1];
else for(var e=1,g=d[c].length-1;e<g;e++)if(d[c][e]===a)return d[c][e+1];return null},getNodeByParam:function(b,a,c,d){if(!a||!c)return null;for(var e=b.data.key.children,g=0,j=a.length;g<j;g++){if(a[g][c]==d)return a[g];var f=h.getNodeByParam(b,a[g][e],c,d);if(f)return f}return null},getNodeCache:function(b,a){if(!a)return null;var c=s[b.treeId].nodes[a];return c?c:null},getNodes:function(b){return h.getRoot(b)[b.data.key.children]},getNodesByParam:function(b,a,c,d){if(!a||!c)return[];for(var e=
b.data.key.children,g=[],j=0,f=a.length;j<f;j++)a[j][c]==d&&g.push(a[j]),g=g.concat(h.getNodesByParam(b,a[j][e],c,d));return g},getNodesByParamFuzzy:function(b,a,c,d){if(!a||!c)return[];for(var e=b.data.key.children,g=[],j=0,f=a.length;j<f;j++)typeof a[j][c]=="string"&&a[j][c].indexOf(d)>-1&&g.push(a[j]),g=g.concat(h.getNodesByParamFuzzy(b,a[j][e],c,d));return g},getNodesByFilter:function(b,a,c,d){if(!a)return d?null:[];for(var e=b.data.key.children,g=d?null:[],j=0,f=a.length;j<f;j++){if(k.apply(c,
[a[j]],!1)){if(d)return a[j];g.push(a[j])}var i=h.getNodesByFilter(b,a[j][e],c,d);if(d&&i)return i;g=d?i:g.concat(i)}return g},getPreNode:function(b,a){if(!a)return null;var c=b.data.key.children,d=a.parentTId?a.getParentNode():h.getRoot(b);if(!a.isFirstNode)if(a.isLastNode)return d[c][d[c].length-2];else for(var e=1,g=d[c].length-1;e<g;e++)if(d[c][e]===a)return d[c][e-1];return null},getRoot:function(b){return b?J[b.treeId]:null},getSetting:function(b){return p[b]},getSettings:function(){return p},
getTitleKey:function(b){return b.data.key.title===""?b.data.key.name:b.data.key.title},getZTreeTools:function(b){return(b=this.getRoot(this.getSetting(b)))?b.treeTools:null},initCache:function(b){for(var a=0,c=q.length;a<c;a++)q[a].apply(this,arguments)},initNode:function(b,a,c,d,e,g){for(var j=0,f=v.length;j<f;j++)v[j].apply(this,arguments)},initRoot:function(b){for(var a=0,c=x.length;a<c;a++)x[a].apply(this,arguments)},isSelectedNode:function(b,a){for(var c=h.getRoot(b),d=0,e=c.curSelectedList.length;d<
e;d++)if(a===c.curSelectedList[d])return!0;return!1},removeNodeCache:function(b,a){var c=b.data.key.children;if(a[c])for(var d=0,e=a[c].length;d<e;d++)arguments.callee(b,a[c][d]);delete h.getCache(b).nodes[a.tId]},removeSelectedNode:function(b,a){for(var c=h.getRoot(b),d=0,e=c.curSelectedList.length;d<e;d++)if(a===c.curSelectedList[d]||!h.getNodeCache(b,c.curSelectedList[d].tId))c.curSelectedList.splice(d,1),d--,e--},setCache:function(b,a){s[b.treeId]=a},setRoot:function(b,a){J[b.treeId]=a},setZTreeTools:function(b,
a){for(var c=0,d=C.length;c<d;c++)C[c].apply(this,arguments)},transformToArrayFormat:function(b,a){if(!a)return[];var c=b.data.key.children,d=[];if(k.isArray(a))for(var e=0,g=a.length;e<g;e++)d.push(a[e]),a[e][c]&&(d=d.concat(h.transformToArrayFormat(b,a[e][c])));else d.push(a),a[c]&&(d=d.concat(h.transformToArrayFormat(b,a[c])));return d},transformTozTreeFormat:function(b,a){var c,d,e=b.data.simpleData.idKey,g=b.data.simpleData.pIdKey,j=b.data.key.children;if(!e||e==""||!a)return[];if(k.isArray(a)){var f=
[],i=[];for(c=0,d=a.length;c<d;c++)i[a[c][e]]=a[c];for(c=0,d=a.length;c<d;c++)i[a[c][g]]&&a[c][e]!=a[c][g]?(i[a[c][g]][j]||(i[a[c][g]][j]=[]),i[a[c][g]][j].push(a[c])):f.push(a[c]);return f}else return[a]}},n={bindEvent:function(b){for(var a=0,c=t.length;a<c;a++)t[a].apply(this,arguments)},bindTree:function(b){var a={treeId:b.treeId},b=b.treeObj;b.unbind("click",n.proxy);b.bind("click",a,n.proxy);b.unbind("dblclick",n.proxy);b.bind("dblclick",a,n.proxy);b.unbind("mouseover",n.proxy);b.bind("mouseover",
a,n.proxy);b.unbind("mouseout",n.proxy);b.bind("mouseout",a,n.proxy);b.unbind("mousedown",n.proxy);b.bind("mousedown",a,n.proxy);b.unbind("mouseup",n.proxy);b.bind("mouseup",a,n.proxy);b.unbind("contextmenu",n.proxy);b.bind("contextmenu",a,n.proxy)},doProxy:function(b){for(var a=[],c=0,d=w.length;c<d;c++){var e=w[c].apply(this,arguments);a.push(e);if(e.stop)break}return a},proxy:function(b){var a=h.getSetting(b.data.treeId);if(!k.uCanDo(a,b))return!0;for(var c=n.doProxy(b),d=!0,e=!1,g=0,j=c.length;g<
j;g++){var f=c[g];f.nodeEventCallback&&(e=!0,d=f.nodeEventCallback.apply(f,[b,f.node])&&d);f.treeEventCallback&&(e=!0,d=f.treeEventCallback.apply(f,[b,f.node])&&d)}try{e&&l("input:focus").length==0&&k.noSel(a)}catch(i){}return d}};D=function(b,a){var c=p[b.data.treeId];if(a.open){if(k.apply(c.callback.beforeCollapse,[c.treeId,a],!0)==!1)return!0}else if(k.apply(c.callback.beforeExpand,[c.treeId,a],!0)==!1)return!0;h.getRoot(c).expandTriggerFlag=!0;i.switchNode(c,a);return!0};E=function(b,a){var c=
p[b.data.treeId],d=c.view.autoCancelSelected&&b.ctrlKey&&h.isSelectedNode(c,a)?0:c.view.autoCancelSelected&&b.ctrlKey&&c.view.selectedMulti?2:1;if(k.apply(c.callback.beforeClick,[c.treeId,a,d],!0)==!1)return!0;d===0?i.cancelPreSelectedNode(c,a):i.selectNode(c,a,d===2);c.treeObj.trigger(f.event.CLICK,[b,c.treeId,a,d]);return!0};F=function(b,a){var c=p[b.data.treeId];k.apply(c.callback.beforeMouseDown,[c.treeId,a],!0)&&k.apply(c.callback.onMouseDown,[b,c.treeId,a]);return!0};G=function(b,a){var c=p[b.data.treeId];
k.apply(c.callback.beforeMouseUp,[c.treeId,a],!0)&&k.apply(c.callback.onMouseUp,[b,c.treeId,a]);return!0};H=function(b,a){var c=p[b.data.treeId];k.apply(c.callback.beforeDblClick,[c.treeId,a],!0)&&k.apply(c.callback.onDblClick,[b,c.treeId,a]);return!0};I=function(b,a){var c=p[b.data.treeId];k.apply(c.callback.beforeRightClick,[c.treeId,a],!0)&&k.apply(c.callback.onRightClick,[b,c.treeId,a]);return typeof c.callback.onRightClick!="function"};var k={apply:function(b,a,c){return typeof b=="function"?
b.apply(L,a?a:[]):c},canAsync:function(b,a){var c=b.data.key.children;return b.async.enable&&a&&a.isParent&&!(a.zAsync||a[c]&&a[c].length>0)},clone:function(b){var a;if(b instanceof Array){a=[];for(var c=b.length;c--;)a[c]=arguments.callee(b[c]);return a}else if(typeof b=="function")return b;else if(b instanceof Object){a={};for(c in b)a[c]=arguments.callee(b[c]);return a}else return b},eqs:function(b,a){return b.toLowerCase()===a.toLowerCase()},isArray:function(b){return Object.prototype.toString.apply(b)===
"[object Array]"},getMDom:function(b,a,c){if(!a)return null;for(;a&&a.id!==b.treeId;){for(var d=0,e=c.length;a.tagName&&d<e;d++)if(k.eqs(a.tagName,c[d].tagName)&&a.getAttribute(c[d].attrName)!==null)return a;a=a.parentNode}return null},noSel:function(b){if(h.getRoot(b).noSelection)try{window.getSelection?window.getSelection().removeAllRanges():document.selection.empty()}catch(a){}},uCanDo:function(){return!0}},i={addNodes:function(b,a,c,d){if(!b.data.keep.leaf||!a||a.isParent)if(k.isArray(c)||(c=
[c]),b.data.simpleData.enable&&(c=h.transformTozTreeFormat(b,c)),a){var e=l("#"+a.tId+f.id.SWITCH),g=l("#"+a.tId+f.id.ICON),j=l("#"+a.tId+f.id.UL);if(!a.open)i.replaceSwitchClass(a,e,f.folder.CLOSE),i.replaceIcoClass(a,g,f.folder.CLOSE),a.open=!1,j.css({display:"none"});h.addNodesData(b,a,c);i.createNodes(b,a.level+1,c,a);d||i.expandCollapseParentNode(b,a,!0)}else h.addNodesData(b,h.getRoot(b),c),i.createNodes(b,0,c,null)},appendNodes:function(b,a,c,d,e,g){if(!c)return[];for(var j=[],l=b.data.key.children,
m=b.data.key.name,n=h.getTitleKey(b),p=0,N=c.length;p<N;p++){var o=c[p],u=(d?d:h.getRoot(b))[l].length==c.length&&p==0,r=p==c.length-1;e&&(h.initNode(b,a,o,d,u,r,g),h.addNodeCache(b,o));u=[];o[l]&&o[l].length>0&&(u=i.appendNodes(b,a+1,o[l],o,e,g&&o.open));if(g){var r=i.makeNodeUrl(b,o),s=i.makeNodeFontCss(b,o),t=[],q;for(q in s)t.push(q,":",s[q],";");j.push("<li id='",o.tId,"' class='level",o.level,"' tabindex='0' hidefocus='true' treenode>","<span id='",o.tId,f.id.SWITCH,"' title='' class='",i.makeNodeLineClass(b,
o),"' treeNode",f.id.SWITCH,"></span>");h.getBeforeA(b,o,j);j.push("<a id='",o.tId,f.id.A,"' class='level",o.level,"' treeNode",f.id.A,' onclick="',o.click||"",'" ',r!=null&&r.length>0?"href='"+r+"'":""," target='",i.makeNodeTarget(o),"' style='",t.join(""),"'");k.apply(b.view.showTitle,[b.treeId,o],b.view.showTitle)&&o[n]&&j.push("title='",o[n].replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),"'");j.push(">");h.getInnerBeforeA(b,o,j);r=b.view.nameIsHTML?o[m]:o[m].replace(/&/g,"&amp;").replace(/</g,
"&lt;").replace(/>/g,"&gt;");j.push("<span id='",o.tId,f.id.ICON,"' title='' treeNode",f.id.ICON," class='",i.makeNodeIcoClass(b,o),"' style='",i.makeNodeIcoStyle(b,o),"'></span><span id='",o.tId,f.id.SPAN,"'>",r,"</span>");h.getInnerAfterA(b,o,j);j.push("</a>");h.getAfterA(b,o,j);o.isParent&&o.open&&i.makeUlHtml(b,o,j,u.join(""));j.push("</li>");h.addCreatedNode(b,o)}}return j},appendParentULDom:function(b,a){var c=[],d=l("#"+a.tId),e=l("#"+a.tId+f.id.UL),g=i.appendNodes(b,a.level+1,a[b.data.key.children],
a,!1,!0);i.makeUlHtml(b,a,c,g.join(""));!d.get(0)&&a.parentTId&&(i.appendParentULDom(b,a.getParentNode()),d=l("#"+a.tId));e.get(0)&&e.remove();d.append(c.join(""));i.createNodeCallback(b)},asyncNode:function(b,a,c,d){var e,g;if(a&&!a.isParent)return k.apply(d),!1;else if(a&&a.isAjaxing)return!1;else if(k.apply(b.callback.beforeAsync,[b.treeId,a],!0)==!1)return k.apply(d),!1;if(a)a.isAjaxing=!0,l("#"+a.tId+f.id.ICON).attr({style:"","class":"button ico_loading"});var j=b.async.contentType=="application/json",
h=j?"{":"",m="";for(e=0,g=b.async.autoParam.length;a&&e<g;e++){var n=b.async.autoParam[e].split("="),p=n;n.length>1&&(p=n[1],n=n[0]);j?(m=typeof a[n]=="string"?'"':"",h+='"'+p+('":'+m+a[n]).replace(/'/g,"\\'")+m+","):h+=p+("="+a[n]).replace(/&/g,"%26")+"&"}if(k.isArray(b.async.otherParam))for(e=0,g=b.async.otherParam.length;e<g;e+=2)j?(m=typeof b.async.otherParam[e+1]=="string"?'"':"",h+='"'+b.async.otherParam[e]+('":'+m+b.async.otherParam[e+1]).replace(/'/g,"\\'")+m+","):h+=b.async.otherParam[e]+
("="+b.async.otherParam[e+1]).replace(/&/g,"%26")+"&";else for(var q in b.async.otherParam)j?(m=typeof b.async.otherParam[q]=="string"?'"':"",h+='"'+q+('":'+m+b.async.otherParam[q]).replace(/'/g,"\\'")+m+","):h+=q+("="+b.async.otherParam[q]).replace(/&/g,"%26")+"&";h.length>1&&(h=h.substring(0,h.length-1));j&&(h+="}");l.ajax({contentType:b.async.contentType,type:b.async.type,url:k.apply(b.async.url,[b.treeId,a],b.async.url),data:h,dataType:b.async.dataType,success:function(e){var g=[];try{g=!e||e.length==
0?[]:typeof e=="string"?eval("("+e+")"):e}catch(j){}if(a)a.isAjaxing=null,a.zAsync=!0;i.setNodeLineIcos(b,a);g&&g!=""?(g=k.apply(b.async.dataFilter,[b.treeId,a,g],g),i.addNodes(b,a,g?k.clone(g):[],!!c)):i.addNodes(b,a,[],!!c);b.treeObj.trigger(f.event.ASYNC_SUCCESS,[b.treeId,a,e]);k.apply(d)},error:function(c,d,e){if(a)a.isAjaxing=null;i.setNodeLineIcos(b,a);b.treeObj.trigger(f.event.ASYNC_ERROR,[b.treeId,a,c,d,e])}});return!0},cancelPreSelectedNode:function(b,a){for(var c=h.getRoot(b).curSelectedList,
d=c.length-1;d>=0;d--)if(!a||a===c[d])if(l("#"+c[d].tId+f.id.A).removeClass(f.node.CURSELECTED),i.setNodeName(b,c[d]),a){h.removeSelectedNode(b,a);break}if(!a)h.getRoot(b).curSelectedList=[]},createNodeCallback:function(b){if(b.callback.onNodeCreated||b.view.addDiyDom)for(var a=h.getRoot(b);a.createdNodes.length>0;){var c=a.createdNodes.shift();k.apply(b.view.addDiyDom,[b.treeId,c]);b.callback.onNodeCreated&&b.treeObj.trigger(f.event.NODECREATED,[b.treeId,c])}},createNodes:function(b,a,c,d){if(c&&
c.length!=0){var e=h.getRoot(b),g=b.data.key.children,g=!d||d.open||!!l("#"+d[g][0].tId).get(0);e.createdNodes=[];a=i.appendNodes(b,a,c,d,!0,g);d?(d=l("#"+d.tId+f.id.UL),d.get(0)&&d.append(a.join(""))):b.treeObj.append(a.join(""));i.createNodeCallback(b)}},expandCollapseNode:function(b,a,c,d,e){var g=h.getRoot(b),j=b.data.key.children;if(a){if(g.expandTriggerFlag){var n=e,e=function(){n&&n();a.open?b.treeObj.trigger(f.event.EXPAND,[b.treeId,a]):b.treeObj.trigger(f.event.COLLAPSE,[b.treeId,a])};g.expandTriggerFlag=
!1}if(a.open==c)k.apply(e,[]);else{!a.open&&a.isParent&&(!l("#"+a.tId+f.id.UL).get(0)||a[j]&&a[j].length>0&&!l("#"+a[j][0].tId).get(0))&&i.appendParentULDom(b,a);var c=l("#"+a.tId+f.id.UL),g=l("#"+a.tId+f.id.SWITCH),m=l("#"+a.tId+f.id.ICON);a.isParent?(a.open=!a.open,a.iconOpen&&a.iconClose&&m.attr("style",i.makeNodeIcoStyle(b,a)),a.open?(i.replaceSwitchClass(a,g,f.folder.OPEN),i.replaceIcoClass(a,m,f.folder.OPEN),d==!1||b.view.expandSpeed==""?(c.show(),k.apply(e,[])):a[j]&&a[j].length>0?c.slideDown(b.view.expandSpeed,
e):(c.show(),k.apply(e,[]))):(i.replaceSwitchClass(a,g,f.folder.CLOSE),i.replaceIcoClass(a,m,f.folder.CLOSE),d==!1||b.view.expandSpeed==""||!(a[j]&&a[j].length>0)?(c.hide(),k.apply(e,[])):c.slideUp(b.view.expandSpeed,e))):k.apply(e,[])}}else k.apply(e,[])},expandCollapseParentNode:function(b,a,c,d,e){a&&(a.parentTId?(i.expandCollapseNode(b,a,c,d),a.parentTId&&i.expandCollapseParentNode(b,a.getParentNode(),c,d,e)):i.expandCollapseNode(b,a,c,d,e))},expandCollapseSonNode:function(b,a,c,d,e){var g=h.getRoot(b),
f=b.data.key.children,g=a?a[f]:g[f],f=a?!1:d,k=h.getRoot(b).expandTriggerFlag;h.getRoot(b).expandTriggerFlag=!1;if(g)for(var l=0,n=g.length;l<n;l++)g[l]&&i.expandCollapseSonNode(b,g[l],c,f);h.getRoot(b).expandTriggerFlag=k;i.expandCollapseNode(b,a,c,d,e)},makeNodeFontCss:function(b,a){var c=k.apply(b.view.fontCss,[b.treeId,a],b.view.fontCss);return c&&typeof c!="function"?c:{}},makeNodeIcoClass:function(b,a){var c=["ico"];a.isAjaxing||(c[0]=(a.iconSkin?a.iconSkin+"_":"")+c[0],a.isParent?c.push(a.open?
f.folder.OPEN:f.folder.CLOSE):c.push(f.folder.DOCU));return"button "+c.join("_")},makeNodeIcoStyle:function(b,a){var c=[];if(!a.isAjaxing){var d=a.isParent&&a.iconOpen&&a.iconClose?a.open?a.iconOpen:a.iconClose:a.icon;d&&c.push("background:url(",d,") 0 0 no-repeat;");(b.view.showIcon==!1||!k.apply(b.view.showIcon,[b.treeId,a],!0))&&c.push("width:0px;height:0px;")}return c.join("")},makeNodeLineClass:function(b,a){var c=[];b.view.showLine?a.level==0&&a.isFirstNode&&a.isLastNode?c.push(f.line.ROOT):
a.level==0&&a.isFirstNode?c.push(f.line.ROOTS):a.isLastNode?c.push(f.line.BOTTOM):c.push(f.line.CENTER):c.push(f.line.NOLINE);a.isParent?c.push(a.open?f.folder.OPEN:f.folder.CLOSE):c.push(f.folder.DOCU);return i.makeNodeLineClassEx(a)+c.join("_")},makeNodeLineClassEx:function(b){return"button level"+b.level+" switch "},makeNodeTarget:function(b){return b.target||"_blank"},makeNodeUrl:function(b,a){var c=b.data.key.url;return a[c]?a[c]:null},makeUlHtml:function(b,a,c,d){c.push("<ul id='",a.tId,f.id.UL,
"' class='level",a.level," ",i.makeUlLineClass(b,a),"' style='display:",a.open?"block":"none","'>");c.push(d);c.push("</ul>")},makeUlLineClass:function(b,a){return b.view.showLine&&!a.isLastNode?f.line.LINE:""},removeChildNodes:function(b,a){if(a){var c=b.data.key.children,d=a[c];if(d){for(var e=0,g=d.length;e<g;e++)h.removeNodeCache(b,d[e]);h.removeSelectedNode(b);delete a[c];b.data.keep.parent?l("#"+a.tId+f.id.UL).empty():(a.isParent=!1,a.open=!1,c=l("#"+a.tId+f.id.SWITCH),d=l("#"+a.tId+f.id.ICON),
i.replaceSwitchClass(a,c,f.folder.DOCU),i.replaceIcoClass(a,d,f.folder.DOCU),l("#"+a.tId+f.id.UL).remove())}}},removeNode:function(b,a){var c=h.getRoot(b),d=b.data.key.children,e=a.parentTId?a.getParentNode():c;a.isFirstNode=!1;a.isLastNode=!1;a.getPreNode=function(){return null};a.getNextNode=function(){return null};l("#"+a.tId).remove();h.removeNodeCache(b,a);h.removeSelectedNode(b,a);for(var g=0,j=e[d].length;g<j;g++)if(e[d][g].tId==a.tId){e[d].splice(g,1);break}var k;if(!b.data.keep.parent&&e[d].length<
1)e.isParent=!1,e.open=!1,g=l("#"+e.tId+f.id.UL),j=l("#"+e.tId+f.id.SWITCH),k=l("#"+e.tId+f.id.ICON),i.replaceSwitchClass(e,j,f.folder.DOCU),i.replaceIcoClass(e,k,f.folder.DOCU),g.css("display","none");else if(b.view.showLine&&e[d].length>0){var m=e[d][e[d].length-1];m.isLastNode=!0;m.isFirstNode=e[d].length==1;g=l("#"+m.tId+f.id.UL);j=l("#"+m.tId+f.id.SWITCH);k=l("#"+m.tId+f.id.ICON);e==c?e[d].length==1?i.replaceSwitchClass(m,j,f.line.ROOT):(c=l("#"+e[d][0].tId+f.id.SWITCH),i.replaceSwitchClass(e[d][0],
c,f.line.ROOTS),i.replaceSwitchClass(m,j,f.line.BOTTOM)):i.replaceSwitchClass(m,j,f.line.BOTTOM);g.removeClass(f.line.LINE)}},replaceIcoClass:function(b,a,c){if(a&&!b.isAjaxing&&(b=a.attr("class"),b!=void 0)){b=b.split("_");switch(c){case f.folder.OPEN:case f.folder.CLOSE:case f.folder.DOCU:b[b.length-1]=c}a.attr("class",b.join("_"))}},replaceSwitchClass:function(b,a,c){if(a){var d=a.attr("class");if(d!=void 0){d=d.split("_");switch(c){case f.line.ROOT:case f.line.ROOTS:case f.line.CENTER:case f.line.BOTTOM:case f.line.NOLINE:d[0]=
i.makeNodeLineClassEx(b)+c;break;case f.folder.OPEN:case f.folder.CLOSE:case f.folder.DOCU:d[1]=c}a.attr("class",d.join("_"));c!==f.folder.DOCU?a.removeAttr("disabled"):a.attr("disabled","disabled")}}},selectNode:function(b,a,c){c||i.cancelPreSelectedNode(b);l("#"+a.tId+f.id.A).addClass(f.node.CURSELECTED);h.addSelectedNode(b,a)},setNodeFontCss:function(b,a){var c=l("#"+a.tId+f.id.A),d=i.makeNodeFontCss(b,a);d&&c.css(d)},setNodeLineIcos:function(b,a){if(a){var c=l("#"+a.tId+f.id.SWITCH),d=l("#"+a.tId+
f.id.UL),e=l("#"+a.tId+f.id.ICON),g=i.makeUlLineClass(b,a);g.length==0?d.removeClass(f.line.LINE):d.addClass(g);c.attr("class",i.makeNodeLineClass(b,a));a.isParent?c.removeAttr("disabled"):c.attr("disabled","disabled");e.removeAttr("style");e.attr("style",i.makeNodeIcoStyle(b,a));e.attr("class",i.makeNodeIcoClass(b,a))}},setNodeName:function(b,a){var c=b.data.key.name,d=h.getTitleKey(b),e=l("#"+a.tId+f.id.SPAN);e.empty();b.view.nameIsHTML?e.html(a[c]):e.text(a[c]);k.apply(b.view.showTitle,[b.treeId,
a],b.view.showTitle)&&a[d]&&l("#"+a.tId+f.id.A).attr("title",a[d])},setNodeTarget:function(b){l("#"+b.tId+f.id.A).attr("target",i.makeNodeTarget(b))},setNodeUrl:function(b,a){var c=l("#"+a.tId+f.id.A),d=i.makeNodeUrl(b,a);d==null||d.length==0?c.removeAttr("href"):c.attr("href",d)},switchNode:function(b,a){a.open||!k.canAsync(b,a)?i.expandCollapseNode(b,a,!a.open):b.async.enable?i.asyncNode(b,a)||i.expandCollapseNode(b,a,!a.open):a&&i.expandCollapseNode(b,a,!a.open)}};l.fn.zTree={consts:{event:{NODECREATED:"ztree_nodeCreated",
CLICK:"ztree_click",EXPAND:"ztree_expand",COLLAPSE:"ztree_collapse",ASYNC_SUCCESS:"ztree_async_success",ASYNC_ERROR:"ztree_async_error"},id:{A:"_a",ICON:"_ico",SPAN:"_span",SWITCH:"_switch",UL:"_ul"},line:{ROOT:"root",ROOTS:"roots",CENTER:"center",BOTTOM:"bottom",NOLINE:"noline",LINE:"line"},folder:{OPEN:"open",CLOSE:"close",DOCU:"docu"},node:{CURSELECTED:"curSelectedNode"}},_z:{tools:k,view:i,event:n,data:h},getZTreeObj:function(b){return(b=h.getZTreeTools(b))?b:null},init:function(b,a,c){var d=
k.clone(K);l.extend(!0,d,a);d.treeId=b.attr("id");d.treeObj=b;d.treeObj.empty();p[d.treeId]=d;if(l.browser.msie&&parseInt(l.browser.version)<7)d.view.expandSpeed="";h.initRoot(d);b=h.getRoot(d);a=d.data.key.children;c=c?k.clone(k.isArray(c)?c:[c]):[];b[a]=d.data.simpleData.enable?h.transformTozTreeFormat(d,c):c;h.initCache(d);n.bindTree(d);n.bindEvent(d);c={setting:d,addNodes:function(a,b,c){function f(){i.addNodes(d,a,h,c==!0)}if(!b)return null;a||(a=null);if(a&&!a.isParent&&d.data.keep.leaf)return null;
var h=k.clone(k.isArray(b)?b:[b]);k.canAsync(d,a)?i.asyncNode(d,a,c,f):f();return h},cancelSelectedNode:function(a){i.cancelPreSelectedNode(this.setting,a)},expandAll:function(a){a=!!a;i.expandCollapseSonNode(this.setting,null,a,!0);return a},expandNode:function(a,b,c,f,m){if(!a||!a.isParent)return null;b!==!0&&b!==!1&&(b=!a.open);if((m=!!m)&&b&&k.apply(d.callback.beforeExpand,[d.treeId,a],!0)==!1)return null;else if(m&&!b&&k.apply(d.callback.beforeCollapse,[d.treeId,a],!0)==!1)return null;b&&a.parentTId&&
i.expandCollapseParentNode(this.setting,a.getParentNode(),b,!1);if(b===a.open&&!c)return null;h.getRoot(d).expandTriggerFlag=m;c?i.expandCollapseSonNode(this.setting,a,b,!0,function(){f!==!1&&l("#"+a.tId).focus().blur()}):(a.open=!b,i.switchNode(this.setting,a),f!==!1&&l("#"+a.tId).focus().blur());return b},getNodes:function(){return h.getNodes(this.setting)},getNodeByParam:function(a,b,c){return!a?null:h.getNodeByParam(this.setting,c?c[this.setting.data.key.children]:h.getNodes(this.setting),a,b)},
getNodeByTId:function(a){return h.getNodeCache(this.setting,a)},getNodesByParam:function(a,b,c){return!a?null:h.getNodesByParam(this.setting,c?c[this.setting.data.key.children]:h.getNodes(this.setting),a,b)},getNodesByParamFuzzy:function(a,b,c){return!a?null:h.getNodesByParamFuzzy(this.setting,c?c[this.setting.data.key.children]:h.getNodes(this.setting),a,b)},getNodesByFilter:function(a,b,c){b=!!b;return!a||typeof a!="function"?b?null:[]:h.getNodesByFilter(this.setting,c?c[this.setting.data.key.children]:
h.getNodes(this.setting),a,b)},getNodeIndex:function(a){if(!a)return null;for(var b=d.data.key.children,c=a.parentTId?a.getParentNode():h.getRoot(this.setting),f=0,i=c[b].length;f<i;f++)if(c[b][f]==a)return f;return-1},getSelectedNodes:function(){for(var a=[],b=h.getRoot(this.setting).curSelectedList,c=0,d=b.length;c<d;c++)a.push(b[c]);return a},isSelectedNode:function(a){return h.isSelectedNode(this.setting,a)},reAsyncChildNodes:function(a,b,c){if(this.setting.async.enable){var d=!a;d&&(a=h.getRoot(this.setting));
b=="refresh"&&(a[this.setting.data.key.children]=[],d?this.setting.treeObj.empty():l("#"+a.tId+f.id.UL).empty());i.asyncNode(this.setting,d?null:a,!!c)}},refresh:function(){this.setting.treeObj.empty();var a=h.getRoot(this.setting),b=a[this.setting.data.key.children];h.initRoot(this.setting);a[this.setting.data.key.children]=b;h.initCache(this.setting);i.createNodes(this.setting,0,a[this.setting.data.key.children])},removeChildNodes:function(a){if(!a)return null;var b=a[d.data.key.children];i.removeChildNodes(d,
a);return b?b:null},removeNode:function(a,b){a&&(b=!!b,b&&k.apply(d.callback.beforeRemove,[d.treeId,a],!0)==!1||(i.removeNode(d,a),b&&this.setting.treeObj.trigger(f.event.REMOVE,[d.treeId,a])))},selectNode:function(a,b){a&&k.uCanDo(this.setting)&&(b=d.view.selectedMulti&&b,a.parentTId?i.expandCollapseParentNode(this.setting,a.getParentNode(),!0,!1,function(){l("#"+a.tId).focus().blur()}):l("#"+a.tId).focus().blur(),i.selectNode(this.setting,a,b))},transformTozTreeNodes:function(a){return h.transformTozTreeFormat(this.setting,
a)},transformToArray:function(a){return h.transformToArrayFormat(this.setting,a)},updateNode:function(a){a&&l("#"+a.tId).get(0)&&k.uCanDo(this.setting)&&(i.setNodeName(this.setting,a),i.setNodeTarget(a),i.setNodeUrl(this.setting,a),i.setNodeLineIcos(this.setting,a),i.setNodeFontCss(this.setting,a))}};b.treeTools=c;h.setZTreeTools(d,c);b[a]&&b[a].length>0?i.createNodes(d,0,b[a]):d.async.enable&&d.async.url&&d.async.url!==""&&i.asyncNode(d);return c}};var L=l.fn.zTree,f=L.consts})(jQuery);
/*
* JQuery zTree excheck 3.2
* http://code.google.com/p/jquerytree/
*
* Copyright (c) 2010 Hunter.z (baby666.cn)
*
* Licensed same as jquery - MIT License
* http://www.opensource.org/licenses/mit-license.php
*
* email: hunter.z@263.net
* Date: 2012-05-13
*/
(function(l){var p,q,r,o={event:{CHECK:"ztree_check"},id:{CHECK:"_check"},checkbox:{STYLE:"checkbox",DEFAULT:"chk",DISABLED:"disable",FALSE:"false",TRUE:"true",FULL:"full",PART:"part",FOCUS:"focus"},radio:{STYLE:"radio",TYPE_ALL:"all",TYPE_LEVEL:"level"}},u={check:{enable:!1,autoCheckTrigger:!1,chkStyle:o.checkbox.STYLE,nocheckInherit:!1,radioType:o.radio.TYPE_LEVEL,chkboxType:{Y:"ps",N:"ps"}},data:{key:{checked:"checked"}},callback:{beforeCheck:null,onCheck:null}};p=function(c,a){if(a.chkDisabled===
!0)return!1;var b=g.getSetting(c.data.treeId),d=b.data.key.checked;if(n.apply(b.callback.beforeCheck,[b.treeId,a],!0)==!1)return!0;a[d]=!a[d];e.checkNodeRelation(b,a);d=l("#"+a.tId+i.id.CHECK);e.setChkClass(b,d,a);e.repairParentChkClassWithSelf(b,a);b.treeObj.trigger(i.event.CHECK,[b.treeId,a]);return!0};q=function(c,a){if(a.chkDisabled===!0)return!1;var b=g.getSetting(c.data.treeId),d=l("#"+a.tId+i.id.CHECK);a.check_Focus=!0;e.setChkClass(b,d,a);return!0};r=function(c,a){if(a.chkDisabled===!0)return!1;
var b=g.getSetting(c.data.treeId),d=l("#"+a.tId+i.id.CHECK);a.check_Focus=!1;e.setChkClass(b,d,a);return!0};l.extend(!0,l.fn.zTree.consts,o);l.extend(!0,l.fn.zTree._z,{tools:{},view:{checkNodeRelation:function(c,a){var b,d,f,j=c.data.key.children,k=c.data.key.checked;b=i.radio;if(c.check.chkStyle==b.STYLE){var h=g.getRadioCheckedList(c);if(a[k])if(c.check.radioType==b.TYPE_ALL){for(d=h.length-1;d>=0;d--)b=h[d],b[k]=!1,h.splice(d,1),e.setChkClass(c,l("#"+b.tId+i.id.CHECK),b),b.parentTId!=a.parentTId&&
e.repairParentChkClassWithSelf(c,b);h.push(a)}else{h=a.parentTId?a.getParentNode():g.getRoot(c);for(d=0,f=h[j].length;d<f;d++)b=h[j][d],b[k]&&b!=a&&(b[k]=!1,e.setChkClass(c,l("#"+b.tId+i.id.CHECK),b))}else if(c.check.radioType==b.TYPE_ALL)for(d=0,f=h.length;d<f;d++)if(a==h[d]){h.splice(d,1);break}}else a[k]&&(!a[j]||a[j].length==0||c.check.chkboxType.Y.indexOf("s")>-1)&&e.setSonNodeCheckBox(c,a,!0),!a[k]&&(!a[j]||a[j].length==0||c.check.chkboxType.N.indexOf("s")>-1)&&e.setSonNodeCheckBox(c,a,!1),
a[k]&&c.check.chkboxType.Y.indexOf("p")>-1&&e.setParentNodeCheckBox(c,a,!0),!a[k]&&c.check.chkboxType.N.indexOf("p")>-1&&e.setParentNodeCheckBox(c,a,!1)},makeChkClass:function(c,a){var b=c.data.key.checked,d=i.checkbox,f=i.radio,j="",j=a.chkDisabled===!0?d.DISABLED:a.halfCheck?d.PART:c.check.chkStyle==f.STYLE?a.check_Child_State<1?d.FULL:d.PART:a[b]?a.check_Child_State===2||a.check_Child_State===-1?d.FULL:d.PART:a.check_Child_State<1?d.FULL:d.PART,b=c.check.chkStyle+"_"+(a[b]?d.TRUE:d.FALSE)+"_"+
j,b=a.check_Focus&&a.chkDisabled!==!0?b+"_"+d.FOCUS:b;return"button "+d.DEFAULT+" "+b},repairAllChk:function(c,a){if(c.check.enable&&c.check.chkStyle===i.checkbox.STYLE)for(var b=c.data.key.checked,d=c.data.key.children,f=g.getRoot(c),j=0,k=f[d].length;j<k;j++){var h=f[d][j];h.nocheck!==!0&&(h[b]=a);e.setSonNodeCheckBox(c,h,a)}},repairChkClass:function(c,a){if(a){g.makeChkFlag(c,a);var b=l("#"+a.tId+i.id.CHECK);e.setChkClass(c,b,a)}},repairParentChkClass:function(c,a){if(a&&a.parentTId){var b=a.getParentNode();
e.repairChkClass(c,b);e.repairParentChkClass(c,b)}},repairParentChkClassWithSelf:function(c,a){if(a){var b=c.data.key.children;a[b]&&a[b].length>0?e.repairParentChkClass(c,a[b][0]):e.repairParentChkClass(c,a)}},repairSonChkDisabled:function(c,a,b){if(a){var d=c.data.key.children;if(a.chkDisabled!=b)a.chkDisabled=b,a.nocheck!==!0&&e.repairChkClass(c,a);if(a[d])for(var f=0,j=a[d].length;f<j;f++)e.repairSonChkDisabled(c,a[d][f],b)}},repairParentChkDisabled:function(c,a,b){if(a){if(a.chkDisabled!=b)a.chkDisabled=
b,a.nocheck!==!0&&e.repairChkClass(c,a);e.repairParentChkDisabled(c,a.getParentNode(),b)}},setChkClass:function(c,a,b){a&&(b.nocheck===!0?a.hide():a.show(),a.removeClass(),a.addClass(e.makeChkClass(c,b)))},setParentNodeCheckBox:function(c,a,b,d){var f=c.data.key.children,j=c.data.key.checked,k=l("#"+a.tId+i.id.CHECK);d||(d=a);g.makeChkFlag(c,a);a.nocheck!==!0&&a.chkDisabled!==!0&&(a[j]=b,e.setChkClass(c,k,a),c.check.autoCheckTrigger&&a!=d&&a.nocheck!==!0&&c.treeObj.trigger(i.event.CHECK,[c.treeId,
a]));if(a.parentTId){k=!0;if(!b)for(var f=a.getParentNode()[f],h=0,m=f.length;h<m;h++)if(f[h].nocheck!==!0&&f[h][j]||f[h].nocheck===!0&&f[h].check_Child_State>0){k=!1;break}k&&e.setParentNodeCheckBox(c,a.getParentNode(),b,d)}},setSonNodeCheckBox:function(c,a,b,d){if(a){var f=c.data.key.children,j=c.data.key.checked,k=l("#"+a.tId+i.id.CHECK);d||(d=a);var h=!1;if(a[f])for(var m=0,n=a[f].length;m<n&&a.chkDisabled!==!0;m++){var o=a[f][m];e.setSonNodeCheckBox(c,o,b,d);o.chkDisabled===!0&&(h=!0)}if(a!=
g.getRoot(c)&&a.chkDisabled!==!0){h&&a.nocheck!==!0&&g.makeChkFlag(c,a);if(a.nocheck!==!0){if(a[j]=b,!h)a.check_Child_State=a[f]&&a[f].length>0?b?2:0:-1}else a.check_Child_State=-1;e.setChkClass(c,k,a);c.check.autoCheckTrigger&&a!=d&&a.nocheck!==!0&&c.treeObj.trigger(i.event.CHECK,[c.treeId,a])}}}},event:{},data:{getRadioCheckedList:function(c){for(var a=g.getRoot(c).radioCheckedList,b=0,d=a.length;b<d;b++)g.getNodeCache(c,a[b].tId)||(a.splice(b,1),b--,d--);return a},getCheckStatus:function(c,a){if(!c.check.enable||
a.nocheck)return null;var b=c.data.key.checked;return{checked:a[b],half:a.halfCheck?a.halfCheck:c.check.chkStyle==i.radio.STYLE?a.check_Child_State===2:a[b]?a.check_Child_State>-1&&a.check_Child_State<2:a.check_Child_State>0}},getTreeCheckedNodes:function(c,a,b,d){if(!a)return[];for(var f=c.data.key.children,j=c.data.key.checked,d=!d?[]:d,e=0,h=a.length;e<h;e++)a[e].nocheck!==!0&&a[e][j]==b&&d.push(a[e]),g.getTreeCheckedNodes(c,a[e][f],b,d);return d},getTreeChangeCheckedNodes:function(c,a,b){if(!a)return[];
for(var d=c.data.key.children,f=c.data.key.checked,b=!b?[]:b,e=0,k=a.length;e<k;e++)a[e].nocheck!==!0&&a[e][f]!=a[e].checkedOld&&b.push(a[e]),g.getTreeChangeCheckedNodes(c,a[e][d],b);return b},makeChkFlag:function(c,a){if(a){var b=c.data.key.children,d=c.data.key.checked,f=-1;if(a[b])for(var e=!1,g=0,h=a[b].length;g<h;g++){var m=a[b][g],l=-1;if(c.check.chkStyle==i.radio.STYLE)if(l=m.nocheck===!0?m.check_Child_State:m.halfCheck===!0?2:m.nocheck!==!0&&m[d]?2:m.check_Child_State>0?2:0,l==2){f=2;break}else l==
0&&(f=0);else if(c.check.chkStyle==i.checkbox.STYLE){l=m.nocheck===!0?m.check_Child_State:m.halfCheck===!0?1:m.nocheck!==!0&&m[d]?m.check_Child_State===-1||m.check_Child_State===2?2:1:m.check_Child_State>0?1:0;if(l===1){f=1;break}else if(l===2&&e&&l!==f){f=1;break}else if(f===2&&l>-1&&l<2){f=1;break}else l>-1&&(f=l);e||(e=m.nocheck!==!0)}}a.check_Child_State=f}}}});var o=l.fn.zTree,n=o._z.tools,i=o.consts,e=o._z.view,g=o._z.data;g.exSetting(u);g.addInitBind(function(c){var a=c.treeObj,b=i.event;a.unbind(b.CHECK);
a.bind(b.CHECK,function(a,b,e){n.apply(c.callback.onCheck,[a,b,e])})});g.addInitCache(function(){});g.addInitNode(function(c,a,b,d,e,j){if(b){a=c.data.key.checked;typeof b[a]=="string"&&(b[a]=n.eqs(b[a],"true"));b[a]=!!b[a];b.checkedOld=b[a];b.nocheck=!!b.nocheck||c.check.nocheckInherit&&d&&!!d.nocheck;b.chkDisabled=!!b.chkDisabled||d&&!!d.chkDisabled;if(typeof b.halfCheck=="string")b.halfCheck=n.eqs(b.halfCheck,"true");b.halfCheck=!!b.halfCheck;b.check_Child_State=-1;b.check_Focus=!1;b.getCheckStatus=
function(){return g.getCheckStatus(c,b)};j&&g.makeChkFlag(c,d)}});g.addInitProxy(function(c){var a=c.target,b=g.getSetting(c.data.treeId),d="",e=null,j="",k=null;if(n.eqs(c.type,"mouseover")){if(b.check.enable&&n.eqs(a.tagName,"span")&&a.getAttribute("treeNode"+i.id.CHECK)!==null)d=a.parentNode.id,j="mouseoverCheck"}else if(n.eqs(c.type,"mouseout")){if(b.check.enable&&n.eqs(a.tagName,"span")&&a.getAttribute("treeNode"+i.id.CHECK)!==null)d=a.parentNode.id,j="mouseoutCheck"}else if(n.eqs(c.type,"click")&&
b.check.enable&&n.eqs(a.tagName,"span")&&a.getAttribute("treeNode"+i.id.CHECK)!==null)d=a.parentNode.id,j="checkNode";if(d.length>0)switch(e=g.getNodeCache(b,d),j){case "checkNode":k=p;break;case "mouseoverCheck":k=q;break;case "mouseoutCheck":k=r}return{stop:!1,node:e,nodeEventType:j,nodeEventCallback:k,treeEventType:"",treeEventCallback:null}});g.addInitRoot(function(c){g.getRoot(c).radioCheckedList=[]});g.addBeforeA(function(c,a,b){var d=c.data.key.checked;c.check.enable&&(g.makeChkFlag(c,a),c.check.chkStyle==
i.radio.STYLE&&c.check.radioType==i.radio.TYPE_ALL&&a[d]&&g.getRoot(c).radioCheckedList.push(a),b.push("<span ID='",a.tId,i.id.CHECK,"' class='",e.makeChkClass(c,a),"' treeNode",i.id.CHECK,a.nocheck===!0?" style='display:none;'":"","></span>"))});g.addZTreeTools(function(c,a){a.checkNode=function(a,b,g,k){var h=this.setting.data.key.checked;if(a.chkDisabled!==!0&&(b!==!0&&b!==!1&&(b=!a[h]),k=!!k,(a[h]!==b||g)&&!(k&&n.apply(this.setting.callback.beforeCheck,[this.setting.treeId,a],!0)==!1)&&n.uCanDo(this.setting)&&
this.setting.check.enable&&a.nocheck!==!0))a[h]=b,b=l("#"+a.tId+i.id.CHECK),(g||this.setting.check.chkStyle===i.radio.STYLE)&&e.checkNodeRelation(this.setting,a),e.setChkClass(this.setting,b,a),e.repairParentChkClassWithSelf(this.setting,a),k&&c.treeObj.trigger(i.event.CHECK,[c.treeId,a])};a.checkAllNodes=function(a){e.repairAllChk(this.setting,!!a)};a.getCheckedNodes=function(a){var b=this.setting.data.key.children;return g.getTreeCheckedNodes(this.setting,g.getRoot(c)[b],a!==!1)};a.getChangeCheckedNodes=
function(){var a=this.setting.data.key.children;return g.getTreeChangeCheckedNodes(this.setting,g.getRoot(c)[a])};a.setChkDisabled=function(a,b){b=!!b;e.repairSonChkDisabled(this.setting,a,b);b||e.repairParentChkDisabled(this.setting,a,b)};var b=a.updateNode;a.updateNode=function(c,f){b&&b.apply(a,arguments);if(c&&this.setting.check.enable&&l("#"+c.tId).get(0)&&n.uCanDo(this.setting)){var g=l("#"+c.tId+i.id.CHECK);(f==!0||this.setting.check.chkStyle===i.radio.STYLE)&&e.checkNodeRelation(this.setting,
c);e.setChkClass(this.setting,g,c);e.repairParentChkClassWithSelf(this.setting,c)}}});var s=e.createNodes;e.createNodes=function(c,a,b,d){s&&s.apply(e,arguments);b&&e.repairParentChkClassWithSelf(c,d)};var t=e.removeNode;e.removeNode=function(c,a){var b=a.getParentNode();t&&t.apply(e,arguments);a&&b&&(e.repairChkClass(c,b),e.repairParentChkClass(c,b))}})(jQuery);
/*
* JQuery zTree exedit 3.2
* http://code.google.com/p/jquerytree/
*
* Copyright (c) 2010 Hunter.z (baby666.cn)
*
* Licensed same as jquery - MIT License
* http://www.opensource.org/licenses/mit-license.php
*
* email: hunter.z@263.net
* Date: 2012-05-13
*/
(function(k){var F={event:{DRAG:"ztree_drag",DROP:"ztree_drop",REMOVE:"ztree_remove",RENAME:"ztree_rename"},id:{EDIT:"_edit",INPUT:"_input",REMOVE:"_remove"},move:{TYPE_INNER:"inner",TYPE_PREV:"prev",TYPE_NEXT:"next"},node:{CURSELECTED_EDIT:"curSelectedNode_Edit",TMPTARGET_TREE:"tmpTargetzTree",TMPTARGET_NODE:"tmpTargetNode"}},E={onHoverOverNode:function(b,a){var c=o.getSetting(b.data.treeId),d=o.getRoot(c);if(d.curHoverNode!=a)E.onHoverOutNode(b);d.curHoverNode=a;f.addHoverDom(c,a)},onHoverOutNode:function(b){var b=
o.getSetting(b.data.treeId),a=o.getRoot(b);if(a.curHoverNode&&!o.isSelectedNode(b,a.curHoverNode))f.removeTreeDom(b,a.curHoverNode),a.curHoverNode=null},onMousedownNode:function(b,a){function c(b){if(z.dragFlag==0&&Math.abs(J-b.clientX)<g.edit.drag.minMoveSize&&Math.abs(K-b.clientY)<g.edit.drag.minMoveSize)return!0;var a,c,e,j,l;l=g.data.key.children;h.noSel(g);k("body").css("cursor","pointer");if(z.dragFlag==0){if(h.apply(g.callback.beforeDrag,[g.treeId,m],!0)==!1)return p(b),!0;for(a=0,c=m.length;a<
c;a++){if(a==0)z.dragNodeShowBefore=[];e=m[a];e.isParent&&e.open?(f.expandCollapseNode(g,e,!e.open),z.dragNodeShowBefore[e.tId]=!0):z.dragNodeShowBefore[e.tId]=!1}z.dragFlag=1;z.showHoverDom=!1;h.showIfameMask(g,!0);e=!0;j=-1;if(m.length>1){var s=m[0].parentTId?m[0].getParentNode()[l]:o.getNodes(g);l=[];for(a=0,c=s.length;a<c;a++)if(z.dragNodeShowBefore[s[a].tId]!==void 0&&(e&&j>-1&&j+1!==a&&(e=!1),l.push(s[a]),j=a),m.length===l.length){m=l;break}}e&&(E=m[0].getPreNode(),N=m[m.length-1].getNextNode());
C=k("<ul class='zTreeDragUL'></ul>");for(a=0,c=m.length;a<c;a++)if(e=m[a],e.editNameFlag=!1,f.selectNode(g,e,a>0),f.removeTreeDom(g,e),j=k("<li id='"+e.tId+"_tmp'></li>"),j.append(k("#"+e.tId+d.id.A).clone()),j.css("padding","0"),j.children("#"+e.tId+d.id.A).removeClass(d.node.CURSELECTED),C.append(j),a==g.edit.drag.maxShowNodeNum-1){j=k("<li id='"+e.tId+"_moretmp'><a> ... </a></li>");C.append(j);break}C.attr("id",m[0].tId+d.id.UL+"_tmp");C.addClass(g.treeObj.attr("class"));C.appendTo("body");t=
k("<span class='tmpzTreeMove_arrow'></span>");t.attr("id","zTreeMove_arrow_tmp");t.appendTo("body");g.treeObj.trigger(d.event.DRAG,[b,g.treeId,m])}if(z.dragFlag==1){r&&t.attr("id")==b.target.id&&u&&b.clientX+y.scrollLeft()+2>k("#"+u+d.id.A,r).offset().left?(e=k("#"+u+d.id.A,r),b.target=e.length>0?e.get(0):b.target):r&&(r.removeClass(d.node.TMPTARGET_TREE),u&&k("#"+u+d.id.A,r).removeClass(d.node.TMPTARGET_NODE+"_"+d.move.TYPE_PREV).removeClass(d.node.TMPTARGET_NODE+"_"+F.move.TYPE_NEXT).removeClass(d.node.TMPTARGET_NODE+
"_"+F.move.TYPE_INNER));u=r=null;w=!1;i=g;e=o.getSettings();for(var B in e)if(e[B].treeId&&e[B].edit.enable&&e[B].treeId!=g.treeId&&(b.target.id==e[B].treeId||k(b.target).parents("#"+e[B].treeId).length>0))w=!0,i=e[B];B=y.scrollTop();j=y.scrollLeft();l=i.treeObj.offset();a=i.treeObj.get(0).scrollHeight;e=i.treeObj.get(0).scrollWidth;c=b.clientY+B-l.top;var q=i.treeObj.height()+l.top-b.clientY-B,n=b.clientX+j-l.left,G=i.treeObj.width()+l.left-b.clientX-j;l=c<g.edit.drag.borderMax&&c>g.edit.drag.borderMin;
var s=q<g.edit.drag.borderMax&&q>g.edit.drag.borderMin,H=n<g.edit.drag.borderMax&&n>g.edit.drag.borderMin,D=G<g.edit.drag.borderMax&&G>g.edit.drag.borderMin,q=c>g.edit.drag.borderMin&&q>g.edit.drag.borderMin&&n>g.edit.drag.borderMin&&G>g.edit.drag.borderMin,n=l&&i.treeObj.scrollTop()<=0,G=s&&i.treeObj.scrollTop()+i.treeObj.height()+10>=a,L=H&&i.treeObj.scrollLeft()<=0,M=D&&i.treeObj.scrollLeft()+i.treeObj.width()+10>=e;if(b.target.id&&i.treeObj.find("#"+b.target.id).length>0){for(var A=b.target;A&&
A.tagName&&!h.eqs(A.tagName,"li")&&A.id!=i.treeId;)A=A.parentNode;var O=!0;for(a=0,c=m.length;a<c;a++)if(e=m[a],A.id===e.tId){O=!1;break}else if(k("#"+e.tId).find("#"+A.id).length>0){O=!1;break}if(O&&b.target.id&&(b.target.id==A.id+d.id.A||k(b.target).parents("#"+A.id+d.id.A).length>0))r=k(A),u=A.id}e=m[0];if(q&&(b.target.id==i.treeId||k(b.target).parents("#"+i.treeId).length>0)){if(!r&&(b.target.id==i.treeId||n||G||L||M)&&(w||!w&&e.parentTId))r=i.treeObj;l?i.treeObj.scrollTop(i.treeObj.scrollTop()-
10):s&&i.treeObj.scrollTop(i.treeObj.scrollTop()+10);H?i.treeObj.scrollLeft(i.treeObj.scrollLeft()-10):D&&i.treeObj.scrollLeft(i.treeObj.scrollLeft()+10);r&&r!=i.treeObj&&r.offset().left<i.treeObj.offset().left&&i.treeObj.scrollLeft(i.treeObj.scrollLeft()+r.offset().left-i.treeObj.offset().left)}C.css({top:b.clientY+B+3+"px",left:b.clientX+j+3+"px"});l=a=0;if(r&&r.attr("id")!=i.treeId){var x=u==null?null:o.getNodeCache(i,u);c=b.ctrlKey&&g.edit.drag.isMove&&g.edit.drag.isCopy||!g.edit.drag.isMove&&
g.edit.drag.isCopy;a=!!(E&&u===E.tId);l=!!(N&&u===N.tId);j=e.parentTId&&e.parentTId==u;e=(c||!l)&&h.apply(i.edit.drag.prev,[i.treeId,m,x],!!i.edit.drag.prev);a=(c||!a)&&h.apply(i.edit.drag.next,[i.treeId,m,x],!!i.edit.drag.next);D=(c||!j)&&!(i.data.keep.leaf&&!x.isParent)&&h.apply(i.edit.drag.inner,[i.treeId,m,x],!!i.edit.drag.inner);if(!e&&!a&&!D){if(r=null,u="",v=d.move.TYPE_INNER,t.css({display:"none"}),window.zTreeMoveTimer)clearTimeout(window.zTreeMoveTimer),window.zTreeMoveTargetNodeTId=null}else{c=
k("#"+u+d.id.A,r);l=x.isLastNode?null:k("#"+x.getNextNode().tId+d.id.A,r.next());s=c.offset().top;j=c.offset().left;H=e?D?0.25:a?0.5:1:-1;D=a?D?0.75:e?0.5:0:-1;b=(b.clientY+B-s)/c.height();(H==1||b<=H&&b>=-0.2)&&e?(a=1-t.width(),l=s-t.height()/2,v=d.move.TYPE_PREV):(D==0||b>=D&&b<=1.2)&&a?(a=1-t.width(),l=l==null||x.isParent&&x.open?s+c.height()-t.height()/2:l.offset().top-t.height()/2,v=d.move.TYPE_NEXT):(a=5-t.width(),l=s,v=d.move.TYPE_INNER);t.css({display:"block",top:l+"px",left:j+a+"px"});c.addClass(d.node.TMPTARGET_NODE+
"_"+v);if(P!=u||Q!=v)I=(new Date).getTime();if(x&&x.isParent&&v==d.move.TYPE_INNER&&(b=!0,window.zTreeMoveTimer&&window.zTreeMoveTargetNodeTId!==x.tId?(clearTimeout(window.zTreeMoveTimer),window.zTreeMoveTargetNodeTId=null):window.zTreeMoveTimer&&window.zTreeMoveTargetNodeTId===x.tId&&(b=!1),b))window.zTreeMoveTimer=setTimeout(function(){v==d.move.TYPE_INNER&&x&&x.isParent&&!x.open&&(new Date).getTime()-I>i.edit.drag.autoOpenTime&&h.apply(i.callback.beforeDragOpen,[i.treeId,x],!0)&&(f.switchNode(i,
x),i.edit.drag.autoExpandTrigger&&i.treeObj.trigger(d.event.EXPAND,[i.treeId,x]))},i.edit.drag.autoOpenTime+50),window.zTreeMoveTargetNodeTId=x.tId}}else if(v=d.move.TYPE_INNER,r&&h.apply(i.edit.drag.inner,[i.treeId,m,null],!!i.edit.drag.inner)?r.addClass(d.node.TMPTARGET_TREE):r=null,t.css({display:"none"}),window.zTreeMoveTimer)clearTimeout(window.zTreeMoveTimer),window.zTreeMoveTargetNodeTId=null;P=u;Q=v}return!1}function p(b){if(window.zTreeMoveTimer)clearTimeout(window.zTreeMoveTimer),window.zTreeMoveTargetNodeTId=
null;Q=P=null;y.unbind("mousemove",c);y.unbind("mouseup",p);y.unbind("selectstart",e);k("body").css("cursor","auto");r&&(r.removeClass(d.node.TMPTARGET_TREE),u&&k("#"+u+d.id.A,r).removeClass(d.node.TMPTARGET_NODE+"_"+d.move.TYPE_PREV).removeClass(d.node.TMPTARGET_NODE+"_"+F.move.TYPE_NEXT).removeClass(d.node.TMPTARGET_NODE+"_"+F.move.TYPE_INNER));h.showIfameMask(g,!1);z.showHoverDom=!0;if(z.dragFlag!=0){z.dragFlag=0;var a,l,j;for(a=0,l=m.length;a<l;a++)j=m[a],j.isParent&&z.dragNodeShowBefore[j.tId]&&
!j.open&&(f.expandCollapseNode(g,j,!j.open),delete z.dragNodeShowBefore[j.tId]);C&&C.remove();t&&t.remove();var q=b.ctrlKey&&g.edit.drag.isMove&&g.edit.drag.isCopy||!g.edit.drag.isMove&&g.edit.drag.isCopy;!q&&r&&u&&m[0].parentTId&&u==m[0].parentTId&&v==d.move.TYPE_INNER&&(r=null);if(r){var n=u==null?null:o.getNodeCache(i,u);if(h.apply(g.callback.beforeDrop,[i.treeId,m,n,v,q],!0)!=!1){var s=q?h.clone(m):m;a=function(){if(w){if(!q)for(var b=0,a=m.length;b<a;b++)f.removeNode(g,m[b]);if(v==d.move.TYPE_INNER)f.addNodes(i,
n,s);else if(f.addNodes(i,n.getParentNode(),s),v==d.move.TYPE_PREV)for(b=0,a=s.length;b<a;b++)f.moveNode(i,n,s[b],v,!1);else for(b=-1,a=s.length-1;b<a;a--)f.moveNode(i,n,s[a],v,!1)}else if(q&&v==d.move.TYPE_INNER)f.addNodes(i,n,s);else if(q&&f.addNodes(i,n.getParentNode(),s),v==d.move.TYPE_PREV)for(b=0,a=s.length;b<a;b++)f.moveNode(i,n,s[b],v,!1);else for(b=-1,a=s.length-1;b<a;a--)f.moveNode(i,n,s[a],v,!1);for(b=0,a=s.length;b<a;b++)f.selectNode(i,s[b],b>0);k("#"+s[0].tId).focus().blur()};v==d.move.TYPE_INNER&&
h.canAsync(i,n)?f.asyncNode(i,n,!1,a):a();g.treeObj.trigger(d.event.DROP,[b,i.treeId,s,n,v,q])}}else{for(a=0,l=m.length;a<l;a++)f.selectNode(i,m[a],a>0);g.treeObj.trigger(d.event.DROP,[b,g.treeId,m,null,null,null])}}}function e(){return!1}var l,j,g=o.getSetting(b.data.treeId),z=o.getRoot(g);if(b.button==2||!g.edit.enable||!g.edit.drag.isCopy&&!g.edit.drag.isMove)return!0;var q=b.target,n=o.getRoot(g).curSelectedList,m=[];if(o.isSelectedNode(g,a))for(l=0,j=n.length;l<j;l++){if(n[l].editNameFlag&&h.eqs(q.tagName,
"input")&&q.getAttribute("treeNode"+d.id.INPUT)!==null)return!0;m.push(n[l]);if(m[0].parentTId!==n[l].parentTId){m=[a];break}}else m=[a];f.editNodeBlur=!0;f.cancelCurEditNode(g,null,!0);var y=k(document),C,t,r,w=!1,i=g,E,N,P=null,Q=null,u=null,v=d.move.TYPE_INNER,J=b.clientX,K=b.clientY,I=(new Date).getTime();h.uCanDo(g)&&y.bind("mousemove",c);y.bind("mouseup",p);y.bind("selectstart",e);b.preventDefault&&b.preventDefault();return!0}},w={tools:{getAbs:function(b){b=b.getBoundingClientRect();return[b.left,
b.top]},inputFocus:function(b){b.get(0)&&(b.focus(),h.setCursorPosition(b.get(0),b.val().length))},inputSelect:function(b){b.get(0)&&(b.focus(),b.select())},setCursorPosition:function(b,a){if(b.setSelectionRange)b.focus(),b.setSelectionRange(a,a);else if(b.createTextRange){var c=b.createTextRange();c.collapse(!0);c.moveEnd("character",a);c.moveStart("character",a);c.select()}},showIfameMask:function(b,a){for(var c=o.getRoot(b);c.dragMaskList.length>0;)c.dragMaskList[0].remove(),c.dragMaskList.shift();
if(a)for(var d=k("iframe"),e=0,f=d.length;e<f;e++){var j=d.get(e),g=h.getAbs(j),j=k("<div id='zTreeMask_"+e+"' class='zTreeMask' style='background-color:yellow;opacity: 0.3;filter: alpha(opacity=30); top:"+g[1]+"px; left:"+g[0]+"px; width:"+j.offsetWidth+"px; height:"+j.offsetHeight+"px;'></div>");j.appendTo("body");c.dragMaskList.push(j)}}},view:{addEditBtn:function(b,a){if(!(a.editNameFlag||k("#"+a.tId+d.id.EDIT).length>0)&&h.apply(b.edit.showRenameBtn,[b.treeId,a],b.edit.showRenameBtn)){var c=
k("#"+a.tId+d.id.A),p="<span class='button edit' id='"+a.tId+d.id.EDIT+"' title='"+h.apply(b.edit.renameTitle,[b.treeId,a],b.edit.renameTitle)+"' treeNode"+d.id.EDIT+" style='display:none;'></span>";c.append(p);k("#"+a.tId+d.id.EDIT).bind("click",function(){if(!h.uCanDo(b)||h.apply(b.callback.beforeEditName,[b.treeId,a],!0)==!1)return!1;f.editNode(b,a);return!1}).show()}},addRemoveBtn:function(b,a){if(!(a.editNameFlag||k("#"+a.tId+d.id.REMOVE).length>0)&&h.apply(b.edit.showRemoveBtn,[b.treeId,a],
b.edit.showRemoveBtn)){var c=k("#"+a.tId+d.id.A),p="<span class='button remove' id='"+a.tId+d.id.REMOVE+"' title='"+h.apply(b.edit.removeTitle,[b.treeId,a],b.edit.removeTitle)+"' treeNode"+d.id.REMOVE+" style='display:none;'></span>";c.append(p);k("#"+a.tId+d.id.REMOVE).bind("click",function(){if(!h.uCanDo(b)||h.apply(b.callback.beforeRemove,[b.treeId,a],!0)==!1)return!1;f.removeNode(b,a);b.treeObj.trigger(d.event.REMOVE,[b.treeId,a]);return!1}).bind("mousedown",function(){return!0}).show()}},addHoverDom:function(b,
a){if(o.getRoot(b).showHoverDom)a.isHover=!0,b.edit.enable&&(f.addEditBtn(b,a),f.addRemoveBtn(b,a)),h.apply(b.view.addHoverDom,[b.treeId,a])},cancelCurEditNode:function(b,a){var c=o.getRoot(b),p=b.data.key.name,e=c.curEditNode;if(e){var l=c.curEditInput,j=a?a:l.val();if(!a&&h.apply(b.callback.beforeRename,[b.treeId,e,j],!0)===!1)return e.editNameFlag=!0,!1;else e[p]=j?j:l.val(),a||b.treeObj.trigger(d.event.RENAME,[b.treeId,e]);k("#"+e.tId+d.id.A).removeClass(d.node.CURSELECTED_EDIT);l.unbind();f.setNodeName(b,
e);e.editNameFlag=!1;c.curEditNode=null;c.curEditInput=null;f.selectNode(b,e,!1)}return c.noSelection=!0},editNode:function(b,a){var c=o.getRoot(b);f.editNodeBlur=!1;if(o.isSelectedNode(b,a)&&c.curEditNode==a&&a.editNameFlag)setTimeout(function(){h.inputFocus(c.curEditInput)},0);else{var p=b.data.key.name;a.editNameFlag=!0;f.removeTreeDom(b,a);f.cancelCurEditNode(b);f.selectNode(b,a,!1);k("#"+a.tId+d.id.SPAN).html("<input type=text class='rename' id='"+a.tId+d.id.INPUT+"' treeNode"+d.id.INPUT+" >");
var e=k("#"+a.tId+d.id.INPUT);e.attr("value",a[p]);b.edit.editNameSelectAll?h.inputSelect(e):h.inputFocus(e);e.bind("blur",function(){f.editNodeBlur||f.cancelCurEditNode(b)}).bind("keydown",function(c){c.keyCode=="13"?(f.editNodeBlur=!0,f.cancelCurEditNode(b,null,!0)):c.keyCode=="27"&&f.cancelCurEditNode(b,a[p])}).bind("click",function(){return!1}).bind("dblclick",function(){return!1});k("#"+a.tId+d.id.A).addClass(d.node.CURSELECTED_EDIT);c.curEditInput=e;c.noSelection=!1;c.curEditNode=a}},moveNode:function(b,
a,c,p,e,l){var j=o.getRoot(b),g=b.data.key.children;if(a!=c&&(!b.data.keep.leaf||!a||a.isParent||p!=d.move.TYPE_INNER)){var h=c.parentTId?c.getParentNode():j,q=a===null||a==j;q&&a===null&&(a=j);if(q)p=d.move.TYPE_INNER;j=a.parentTId?a.getParentNode():j;if(p!=d.move.TYPE_PREV&&p!=d.move.TYPE_NEXT)p=d.move.TYPE_INNER;if(p==d.move.TYPE_INNER)if(q)c.parentTId=null;else{if(!a.isParent)a.isParent=!0,a.open=!!a.open,f.setNodeLineIcos(b,a);c.parentTId=a.tId}var n;q?n=q=b.treeObj:(!l&&p==d.move.TYPE_INNER?
f.expandCollapseNode(b,a,!0,!1):l||f.expandCollapseNode(b,a.getParentNode(),!0,!1),q=k("#"+a.tId),n=k("#"+a.tId+d.id.UL),n.get(0)||(n=[],f.makeUlHtml(b,a,n,""),q.append(n.join(""))),n=k("#"+a.tId+d.id.UL));var m=k("#"+c.tId);n.get(0)&&p==d.move.TYPE_INNER?n.append(m):q.get(0)&&p==d.move.TYPE_PREV?q.before(m):q.get(0)&&p==d.move.TYPE_NEXT&&q.after(m);var y=-1,w=0,t=null,q=null,r=c.level;if(c.isFirstNode){if(y=0,h[g].length>1)t=h[g][1],t.isFirstNode=!0}else if(c.isLastNode)y=h[g].length-1,t=h[g][y-
1],t.isLastNode=!0;else for(n=0,m=h[g].length;n<m;n++)if(h[g][n].tId==c.tId){y=n;break}y>=0&&h[g].splice(y,1);if(p!=d.move.TYPE_INNER)for(n=0,m=j[g].length;n<m;n++)j[g][n].tId==a.tId&&(w=n);if(p==d.move.TYPE_INNER){a[g]||(a[g]=[]);if(a[g].length>0)q=a[g][a[g].length-1],q.isLastNode=!1;a[g].splice(a[g].length,0,c);c.isLastNode=!0;c.isFirstNode=a[g].length==1}else a.isFirstNode&&p==d.move.TYPE_PREV?(j[g].splice(w,0,c),q=a,q.isFirstNode=!1,c.parentTId=a.parentTId,c.isFirstNode=!0,c.isLastNode=!1):a.isLastNode&&
p==d.move.TYPE_NEXT?(j[g].splice(w+1,0,c),q=a,q.isLastNode=!1,c.parentTId=a.parentTId,c.isFirstNode=!1,c.isLastNode=!0):(p==d.move.TYPE_PREV?j[g].splice(w,0,c):j[g].splice(w+1,0,c),c.parentTId=a.parentTId,c.isFirstNode=!1,c.isLastNode=!1);o.fixPIdKeyValue(b,c);o.setSonNodeLevel(b,c.getParentNode(),c);f.setNodeLineIcos(b,c);f.repairNodeLevelClass(b,c,r);!b.data.keep.parent&&h[g].length<1?(h.isParent=!1,h.open=!1,a=k("#"+h.tId+d.id.UL),p=k("#"+h.tId+d.id.SWITCH),g=k("#"+h.tId+d.id.ICON),f.replaceSwitchClass(h,
p,d.folder.DOCU),f.replaceIcoClass(h,g,d.folder.DOCU),a.css("display","none")):t&&f.setNodeLineIcos(b,t);q&&f.setNodeLineIcos(b,q);b.check&&b.check.enable&&f.repairChkClass&&(f.repairChkClass(b,h),f.repairParentChkClassWithSelf(b,h),h!=c.parent&&f.repairParentChkClassWithSelf(b,c));l||f.expandCollapseParentNode(b,c.getParentNode(),!0,e)}},removeEditBtn:function(b){k("#"+b.tId+d.id.EDIT).unbind().remove()},removeRemoveBtn:function(b){k("#"+b.tId+d.id.REMOVE).unbind().remove()},removeTreeDom:function(b,
a){a.isHover=!1;f.removeEditBtn(a);f.removeRemoveBtn(a);h.apply(b.view.removeHoverDom,[b.treeId,a])},repairNodeLevelClass:function(b,a,c){if(c!==a.level){var b=k("#"+a.tId),f=k("#"+a.tId+d.id.A),e=k("#"+a.tId+d.id.UL),c="level"+c,a="level"+a.level;b.removeClass(c);b.addClass(a);f.removeClass(c);f.addClass(a);e.removeClass(c);e.addClass(a)}}},event:w,data:{setSonNodeLevel:function(b,a,c){if(c){var d=b.data.key.children;c.level=a?a.level+1:0;if(c[d])for(var a=0,e=c[d].length;a<e;a++)c[d][a]&&o.setSonNodeLevel(b,
c,c[d][a])}}}};k.extend(!0,k.fn.zTree.consts,F);k.extend(!0,k.fn.zTree._z,w);var w=k.fn.zTree,h=w._z.tools,d=w.consts,f=w._z.view,o=w._z.data,w=w._z.event;o.exSetting({edit:{enable:!1,editNameSelectAll:!1,showRemoveBtn:!0,showRenameBtn:!0,removeTitle:"remove",renameTitle:"rename",drag:{autoExpandTrigger:!1,isCopy:!0,isMove:!0,prev:!0,next:!0,inner:!0,minMoveSize:5,borderMax:10,borderMin:-5,maxShowNodeNum:5,autoOpenTime:500}},view:{addHoverDom:null,removeHoverDom:null},callback:{beforeDrag:null,beforeDragOpen:null,
beforeDrop:null,beforeEditName:null,beforeRename:null,onDrag:null,onDrop:null,onRename:null}});o.addInitBind(function(b){var a=b.treeObj,c=d.event;a.unbind(c.RENAME);a.bind(c.RENAME,function(a,c,d){h.apply(b.callback.onRename,[a,c,d])});a.unbind(c.REMOVE);a.bind(c.REMOVE,function(a,c,d){h.apply(b.callback.onRemove,[a,c,d])});a.unbind(c.DRAG);a.bind(c.DRAG,function(a,c,d,f){h.apply(b.callback.onDrag,[c,d,f])});a.unbind(c.DROP);a.bind(c.DROP,function(a,c,d,f,g,k,o){h.apply(b.callback.onDrop,[c,d,f,
g,k,o])})});o.addInitCache(function(){});o.addInitNode(function(b,a,c){if(c)c.isHover=!1,c.editNameFlag=!1});o.addInitProxy(function(b){var a=b.target,c=o.getSetting(b.data.treeId),f=b.relatedTarget,e="",l=null,j="",g=null,k=null;if(h.eqs(b.type,"mouseover")){if(k=h.getMDom(c,a,[{tagName:"a",attrName:"treeNode"+d.id.A}]))e=k.parentNode.id,j="hoverOverNode"}else if(h.eqs(b.type,"mouseout"))k=h.getMDom(c,f,[{tagName:"a",attrName:"treeNode"+d.id.A}]),k||(e="remove",j="hoverOutNode");else if(h.eqs(b.type,
"mousedown")&&(k=h.getMDom(c,a,[{tagName:"a",attrName:"treeNode"+d.id.A}])))e=k.parentNode.id,j="mousedownNode";if(e.length>0)switch(l=o.getNodeCache(c,e),j){case "mousedownNode":g=E.onMousedownNode;break;case "hoverOverNode":g=E.onHoverOverNode;break;case "hoverOutNode":g=E.onHoverOutNode}return{stop:!1,node:l,nodeEventType:j,nodeEventCallback:g,treeEventType:"",treeEventCallback:null}});o.addInitRoot(function(b){b=o.getRoot(b);b.curEditNode=null;b.curEditInput=null;b.curHoverNode=null;b.dragFlag=
0;b.dragNodeShowBefore=[];b.dragMaskList=[];b.showHoverDom=!0});o.addZTreeTools(function(b,a){a.cancelEditName=function(a){var d=o.getRoot(b),e=b.data.key.name,h=d.curEditNode;d.curEditNode&&f.cancelCurEditNode(b,a?a:h[e])};a.copyNode=function(a,k,e,l){if(!k)return null;if(a&&!a.isParent&&b.data.keep.leaf&&e===d.move.TYPE_INNER)return null;var j=h.clone(k);if(!a)a=null,e=d.move.TYPE_INNER;e==d.move.TYPE_INNER?(k=function(){f.addNodes(b,a,[j],l)},h.canAsync(b,a)?f.asyncNode(b,a,l,k):k()):(f.addNodes(b,
a.parentNode,[j],l),f.moveNode(b,a,j,e,!1,l));return j};a.editName=function(a){a&&a.tId&&a===o.getNodeCache(b,a.tId)&&(a.parentTId&&f.expandCollapseParentNode(b,a.getParentNode(),!0),f.editNode(b,a))};a.moveNode=function(a,p,e,l){function j(){f.moveNode(b,a,p,e,!1,l)}if(!p)return p;if(a&&!a.isParent&&b.data.keep.leaf&&e===d.move.TYPE_INNER)return null;else if(a&&(p.parentTId==a.tId&&e==d.move.TYPE_INNER||k("#"+p.tId).find("#"+a.tId).length>0))return null;else a||(a=null);h.canAsync(b,a)?f.asyncNode(b,
a,l,j):j();return p};a.setEditable=function(a){b.edit.enable=a;return this.refresh()}});var J=f.cancelPreSelectedNode;f.cancelPreSelectedNode=function(b,a){for(var c=o.getRoot(b).curSelectedList,d=0,e=c.length;d<e;d++)if(!a||a===c[d])if(f.removeTreeDom(b,c[d]),a)break;J&&J.apply(f,arguments)};var K=f.createNodes;f.createNodes=function(b,a,c,d){K&&K.apply(f,arguments);c&&f.repairParentChkClassWithSelf&&f.repairParentChkClassWithSelf(b,d)};f.makeNodeUrl=function(b,a){return a.url&&!b.edit.enable?a.url:
null};var I=f.removeNode;f.removeNode=function(b,a){var c=o.getRoot(b);if(c.curEditNode===a)c.curEditNode=null;I&&I.apply(f,arguments)};var L=f.selectNode;f.selectNode=function(b,a,c){var d=o.getRoot(b);if(o.isSelectedNode(b,a)&&d.curEditNode==a&&a.editNameFlag)return!1;L&&L.apply(f,arguments);f.addHoverDom(b,a);return!0};var M=h.uCanDo;h.uCanDo=function(b,a){var c=o.getRoot(b);return a&&(h.eqs(a.type,"mouseover")||h.eqs(a.type,"mouseout")||h.eqs(a.type,"mousedown")||h.eqs(a.type,"mouseup"))?!0:!c.curEditNode&&
(M?M.apply(f,arguments):!0)}})(jQuery);
/*
* JQuery zTree core 3.2
* http://code.google.com/p/jquerytree/
*
* Copyright (c) 2010 Hunter.z (baby666.cn)
*
* Licensed same as jquery - MIT License
* http://www.opensource.org/licenses/mit-license.php
*
* email: hunter.z@263.net
* Date: 2012-05-13
*/
(function($){
var settings = {}, roots = {}, caches = {}, zId = 0,
//default consts of core
_consts = {
event: {
NODECREATED: "ztree_nodeCreated",
CLICK: "ztree_click",
EXPAND: "ztree_expand",
COLLAPSE: "ztree_collapse",
ASYNC_SUCCESS: "ztree_async_success",
ASYNC_ERROR: "ztree_async_error"
},
id: {
A: "_a",
ICON: "_ico",
SPAN: "_span",
SWITCH: "_switch",
UL: "_ul"
},
line: {
ROOT: "root",
ROOTS: "roots",
CENTER: "center",
BOTTOM: "bottom",
NOLINE: "noline",
LINE: "line"
},
folder: {
OPEN: "open",
CLOSE: "close",
DOCU: "docu"
},
node: {
CURSELECTED: "curSelectedNode"
}
},
//default setting of core
_setting = {
treeId: "",
treeObj: null,
view: {
addDiyDom: null,
autoCancelSelected: true,
dblClickExpand: true,
expandSpeed: "fast",
fontCss: {},
nameIsHTML: false,
selectedMulti: true,
showIcon: true,
showLine: true,
showTitle: true
},
data: {
key: {
children: "children",
name: "name",
title: "",
url: "url"
},
simpleData: {
enable: false,
idKey: "id",
pIdKey: "pId",
rootPId: null
},
keep: {
parent: false,
leaf: false
}
},
async: {
enable: false,
contentType: "application/x-www-form-urlencoded",
type: "post",
dataType: "text",
url: "",
autoParam: [],
otherParam: [],
dataFilter: null
},
callback: {
beforeAsync:null,
beforeClick:null,
beforeRightClick:null,
beforeMouseDown:null,
beforeMouseUp:null,
beforeExpand:null,
beforeCollapse:null,
beforeRemove:null,
onAsyncError:null,
onAsyncSuccess:null,
onNodeCreated:null,
onClick:null,
onRightClick:null,
onMouseDown:null,
onMouseUp:null,
onExpand:null,
onCollapse:null,
onRemove:null
}
},
//default root of core
//zTree use root to save full data
_initRoot = function (setting) {
var r = data.getRoot(setting);
if (!r) {
r = {};
data.setRoot(setting, r);
}
r.children = [];
r.expandTriggerFlag = false;
r.curSelectedList = [];
r.noSelection = true;
r.createdNodes = [];
},
//default cache of core
_initCache = function(setting) {
var c = data.getCache(setting);
if (!c) {
c = {};
data.setCache(setting, c);
}
c.nodes = [];
c.doms = [];
},
//default bindEvent of core
_bindEvent = function(setting) {
var o = setting.treeObj,
c = consts.event;
o.unbind(c.NODECREATED);
o.bind(c.NODECREATED, function (event, treeId, node) {
tools.apply(setting.callback.onNodeCreated, [event, treeId, node]);
});
o.unbind(c.CLICK);
o.bind(c.CLICK, function (event, srcEvent, treeId, node, clickFlag) {
tools.apply(setting.callback.onClick, [srcEvent, treeId, node, clickFlag]);
});
o.unbind(c.EXPAND);
o.bind(c.EXPAND, function (event, treeId, node) {
tools.apply(setting.callback.onExpand, [event, treeId, node]);
});
o.unbind(c.COLLAPSE);
o.bind(c.COLLAPSE, function (event, treeId, node) {
tools.apply(setting.callback.onCollapse, [event, treeId, node]);
});
o.unbind(c.ASYNC_SUCCESS);
o.bind(c.ASYNC_SUCCESS, function (event, treeId, node, msg) {
tools.apply(setting.callback.onAsyncSuccess, [event, treeId, node, msg]);
});
o.unbind(c.ASYNC_ERROR);
o.bind(c.ASYNC_ERROR, function (event, treeId, node, XMLHttpRequest, textStatus, errorThrown) {
tools.apply(setting.callback.onAsyncError, [event, treeId, node, XMLHttpRequest, textStatus, errorThrown]);
});
},
//default event proxy of core
_eventProxy = function(event) {
var target = event.target,
setting = settings[event.data.treeId],
tId = "", node = null,
nodeEventType = "", treeEventType = "",
nodeEventCallback = null, treeEventCallback = null,
tmp = null;
if (tools.eqs(event.type, "mousedown")) {
treeEventType = "mousedown";
} else if (tools.eqs(event.type, "mouseup")) {
treeEventType = "mouseup";
} else if (tools.eqs(event.type, "contextmenu")) {
treeEventType = "contextmenu";
} else if (tools.eqs(event.type, "click")) {
if (tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.SWITCH) !== null) {
tId = target.parentNode.id;
nodeEventType = "switchNode";
} else {
tmp = tools.getMDom(setting, target, [{tagName:"a", attrName:"treeNode"+consts.id.A}]);
if (tmp) {
tId = tmp.parentNode.id;
nodeEventType = "clickNode";
}
}
} else if (tools.eqs(event.type, "dblclick")) {
treeEventType = "dblclick";
tmp = tools.getMDom(setting, target, [{tagName:"a", attrName:"treeNode"+consts.id.A}]);
if (tmp) {
tId = tmp.parentNode.id;
nodeEventType = "switchNode";
}
}
if (treeEventType.length > 0 && tId.length == 0) {
tmp = tools.getMDom(setting, target, [{tagName:"a", attrName:"treeNode"+consts.id.A}]);
if (tmp) {tId = tmp.parentNode.id;}
}
// event to node
if (tId.length>0) {
node = data.getNodeCache(setting, tId);
switch (nodeEventType) {
case "switchNode" :
if (!node.isParent) {
nodeEventType = "";
} else if (tools.eqs(event.type, "click")
|| (tools.eqs(event.type, "dblclick") && tools.apply(setting.view.dblClickExpand, [setting.treeId, node], setting.view.dblClickExpand))) {
nodeEventCallback = handler.onSwitchNode;
} else {
nodeEventType = "";
}
break;
case "clickNode" :
nodeEventCallback = handler.onClickNode;
break;
}
}
// event to zTree
switch (treeEventType) {
case "mousedown" :
treeEventCallback = handler.onZTreeMousedown;
break;
case "mouseup" :
treeEventCallback = handler.onZTreeMouseup;
break;
case "dblclick" :
treeEventCallback = handler.onZTreeDblclick;
break;
case "contextmenu" :
treeEventCallback = handler.onZTreeContextmenu;
break;
}
var proxyResult = {
stop: false,
node: node,
nodeEventType: nodeEventType,
nodeEventCallback: nodeEventCallback,
treeEventType: treeEventType,
treeEventCallback: treeEventCallback
};
return proxyResult
},
//default init node of core
_initNode = function(setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) {
if (!n) return;
var childKey = setting.data.key.children;
n.level = level;
n.tId = setting.treeId + "_" + (++zId);
n.parentTId = parentNode ? parentNode.tId : null;
if (n[childKey] && n[childKey].length > 0) {
if (typeof n.open == "string") n.open = tools.eqs(n.open, "true");
n.open = !!n.open;
n.isParent = true;
n.zAsync = true;
} else {
n.open = false;
if (typeof n.isParent == "string") n.isParent = tools.eqs(n.isParent, "true");
n.isParent = !!n.isParent;
n.zAsync = !n.isParent;
}
n.isFirstNode = isFirstNode;
n.isLastNode = isLastNode;
n.getParentNode = function() {return data.getNodeCache(setting, n.parentTId);};
n.getPreNode = function() {return data.getPreNode(setting, n);};
n.getNextNode = function() {return data.getNextNode(setting, n);};
n.isAjaxing = false;
data.fixPIdKeyValue(setting, n);
},
_init = {
bind: [_bindEvent],
caches: [_initCache],
nodes: [_initNode],
proxys: [_eventProxy],
roots: [_initRoot],
beforeA: [],
afterA: [],
innerBeforeA: [],
innerAfterA: [],
zTreeTools: []
},
//method of operate data
data = {
addNodeCache: function(setting, node) {
data.getCache(setting).nodes[node.tId] = node;
},
addAfterA: function(afterA) {
_init.afterA.push(afterA);
},
addBeforeA: function(beforeA) {
_init.beforeA.push(beforeA);
},
addInnerAfterA: function(innerAfterA) {
_init.innerAfterA.push(innerAfterA);
},
addInnerBeforeA: function(innerBeforeA) {
_init.innerBeforeA.push(innerBeforeA);
},
addInitBind: function(bindEvent) {
_init.bind.push(bindEvent);
},
addInitCache: function(initCache) {
_init.caches.push(initCache);
},
addInitNode: function(initNode) {
_init.nodes.push(initNode);
},
addInitProxy: function(initProxy) {
_init.proxys.push(initProxy);
},
addInitRoot: function(initRoot) {
_init.roots.push(initRoot);
},
addNodesData: function(setting, parentNode, nodes) {
var childKey = setting.data.key.children;
if (!parentNode[childKey]) parentNode[childKey] = [];
if (parentNode[childKey].length > 0) {
parentNode[childKey][parentNode[childKey].length - 1].isLastNode = false;
view.setNodeLineIcos(setting, parentNode[childKey][parentNode[childKey].length - 1]);
}
parentNode.isParent = true;
parentNode[childKey] = parentNode[childKey].concat(nodes);
},
addSelectedNode: function(setting, node) {
var root = data.getRoot(setting);
if (!data.isSelectedNode(setting, node)) {
root.curSelectedList.push(node);
}
},
addCreatedNode: function(setting, node) {
if (!!setting.callback.onNodeCreated || !!setting.view.addDiyDom) {
var root = data.getRoot(setting);
root.createdNodes.push(node);
}
},
addZTreeTools: function(zTreeTools) {
_init.zTreeTools.push(zTreeTools);
},
exSetting: function(s) {
$.extend(true, _setting, s);
},
fixPIdKeyValue: function(setting, node) {
if (setting.data.simpleData.enable) {
node[setting.data.simpleData.pIdKey] = node.parentTId ? node.getParentNode()[setting.data.simpleData.idKey] : setting.data.simpleData.rootPId;
}
},
getAfterA: function(setting, node, array) {
for (var i=0, j=_init.afterA.length; i<j; i++) {
_init.afterA[i].apply(this, arguments);
}
},
getBeforeA: function(setting, node, array) {
for (var i=0, j=_init.beforeA.length; i<j; i++) {
_init.beforeA[i].apply(this, arguments);
}
},
getInnerAfterA: function(setting, node, array) {
for (var i=0, j=_init.innerAfterA.length; i<j; i++) {
_init.innerAfterA[i].apply(this, arguments);
}
},
getInnerBeforeA: function(setting, node, array) {
for (var i=0, j=_init.innerBeforeA.length; i<j; i++) {
_init.innerBeforeA[i].apply(this, arguments);
}
},
getCache: function(setting) {
return caches[setting.treeId];
},
getNextNode: function(setting, node) {
if (!node) return null;
var childKey = setting.data.key.children,
p = node.parentTId ? node.getParentNode() : data.getRoot(setting);
if (node.isLastNode) {
return null;
} else if (node.isFirstNode) {
return p[childKey][1];
} else {
for (var i=1, l=p[childKey].length-1; i<l; i++) {
if (p[childKey][i] === node) {
return p[childKey][i+1];
}
}
}
return null;
},
getNodeByParam: function(setting, nodes, key, value) {
if (!nodes || !key) return null;
var childKey = setting.data.key.children;
for (var i = 0, l = nodes.length; i < l; i++) {
if (nodes[i][key] == value) {
return nodes[i];
}
var tmp = data.getNodeByParam(setting, nodes[i][childKey], key, value);
if (tmp) return tmp;
}
return null;
},
getNodeCache: function(setting, tId) {
if (!tId) return null;
var n = caches[setting.treeId].nodes[tId];
return n ? n : null;
},
getNodes: function(setting) {
return data.getRoot(setting)[setting.data.key.children];
},
getNodesByParam: function(setting, nodes, key, value) {
if (!nodes || !key) return [];
var childKey = setting.data.key.children,
result = [];
for (var i = 0, l = nodes.length; i < l; i++) {
if (nodes[i][key] == value) {
result.push(nodes[i]);
}
result = result.concat(data.getNodesByParam(setting, nodes[i][childKey], key, value));
}
return result;
},
getNodesByParamFuzzy: function(setting, nodes, key, value) {
if (!nodes || !key) return [];
var childKey = setting.data.key.children,
result = [];
for (var i = 0, l = nodes.length; i < l; i++) {
if (typeof nodes[i][key] == "string" && nodes[i][key].indexOf(value)>-1) {
result.push(nodes[i]);
}
result = result.concat(data.getNodesByParamFuzzy(setting, nodes[i][childKey], key, value));
}
return result;
},
getNodesByFilter: function(setting, nodes, filter, isSingle) {
if (!nodes) return (isSingle ? null : []);
var childKey = setting.data.key.children,
result = isSingle ? null : [];
for (var i = 0, l = nodes.length; i < l; i++) {
if (tools.apply(filter, [nodes[i]], false)) {
if (isSingle) {return nodes[i];}
result.push(nodes[i]);
}
var tmpResult = data.getNodesByFilter(setting, nodes[i][childKey], filter, isSingle);
if (isSingle && !!tmpResult) {return tmpResult;}
result = isSingle ? tmpResult : result.concat(tmpResult);
}
return result;
},
getPreNode: function(setting, node) {
if (!node) return null;
var childKey = setting.data.key.children,
p = node.parentTId ? node.getParentNode() : data.getRoot(setting);
if (node.isFirstNode) {
return null;
} else if (node.isLastNode) {
return p[childKey][p[childKey].length-2];
} else {
for (var i=1, l=p[childKey].length-1; i<l; i++) {
if (p[childKey][i] === node) {
return p[childKey][i-1];
}
}
}
return null;
},
getRoot: function(setting) {
return setting ? roots[setting.treeId] : null;
},
getSetting: function(treeId) {
return settings[treeId];
},
getSettings: function() {
return settings;
},
getTitleKey: function(setting) {
return setting.data.key.title === "" ? setting.data.key.name : setting.data.key.title;
},
getZTreeTools: function(treeId) {
var r = this.getRoot(this.getSetting(treeId));
return r ? r.treeTools : null;
},
initCache: function(setting) {
for (var i=0, j=_init.caches.length; i<j; i++) {
_init.caches[i].apply(this, arguments);
}
},
initNode: function(setting, level, node, parentNode, preNode, nextNode) {
for (var i=0, j=_init.nodes.length; i<j; i++) {
_init.nodes[i].apply(this, arguments);
}
},
initRoot: function(setting) {
for (var i=0, j=_init.roots.length; i<j; i++) {
_init.roots[i].apply(this, arguments);
}
},
isSelectedNode: function(setting, node) {
var root = data.getRoot(setting);
for (var i=0, j=root.curSelectedList.length; i<j; i++) {
if(node === root.curSelectedList[i]) return true;
}
return false;
},
removeNodeCache: function(setting, node) {
var childKey = setting.data.key.children;
if (node[childKey]) {
for (var i=0, l=node[childKey].length; i<l; i++) {
arguments.callee(setting, node[childKey][i]);
}
}
delete data.getCache(setting).nodes[node.tId];
},
removeSelectedNode: function(setting, node) {
var root = data.getRoot(setting);
for (var i=0, j=root.curSelectedList.length; i<j; i++) {
if(node === root.curSelectedList[i] || !data.getNodeCache(setting, root.curSelectedList[i].tId)) {
root.curSelectedList.splice(i, 1);
i--;j--;
}
}
},
setCache: function(setting, cache) {
caches[setting.treeId] = cache;
},
setRoot: function(setting, root) {
roots[setting.treeId] = root;
},
setZTreeTools: function(setting, zTreeTools) {
for (var i=0, j=_init.zTreeTools.length; i<j; i++) {
_init.zTreeTools[i].apply(this, arguments);
}
},
transformToArrayFormat: function (setting, nodes) {
if (!nodes) return [];
var childKey = setting.data.key.children,
r = [];
if (tools.isArray(nodes)) {
for (var i=0, l=nodes.length; i<l; i++) {
r.push(nodes[i]);
if (nodes[i][childKey])
r = r.concat(data.transformToArrayFormat(setting, nodes[i][childKey]));
}
} else {
r.push(nodes);
if (nodes[childKey])
r = r.concat(data.transformToArrayFormat(setting, nodes[childKey]));
}
return r;
},
transformTozTreeFormat: function(setting, sNodes) {
var i,l,
key = setting.data.simpleData.idKey,
parentKey = setting.data.simpleData.pIdKey,
childKey = setting.data.key.children;
if (!key || key=="" || !sNodes) return [];
if (tools.isArray(sNodes)) {
var r = [];
var tmpMap = [];
for (i=0, l=sNodes.length; i<l; i++) {
tmpMap[sNodes[i][key]] = sNodes[i];
}
for (i=0, l=sNodes.length; i<l; i++) {
if (tmpMap[sNodes[i][parentKey]] && sNodes[i][key] != sNodes[i][parentKey]) {
if (!tmpMap[sNodes[i][parentKey]][childKey])
tmpMap[sNodes[i][parentKey]][childKey] = [];
tmpMap[sNodes[i][parentKey]][childKey].push(sNodes[i]);
} else {
r.push(sNodes[i]);
}
}
return r;
}else {
return [sNodes];
}
}
},
//method of event proxy
event = {
bindEvent: function(setting) {
for (var i=0, j=_init.bind.length; i<j; i++) {
_init.bind[i].apply(this, arguments);
}
},
bindTree: function(setting) {
var eventParam = {
treeId: setting.treeId
},
o = setting.treeObj;
o.unbind('click', event.proxy);
o.bind('click', eventParam, event.proxy);
o.unbind('dblclick', event.proxy);
o.bind('dblclick', eventParam, event.proxy);
o.unbind('mouseover', event.proxy);
o.bind('mouseover', eventParam, event.proxy);
o.unbind('mouseout', event.proxy);
o.bind('mouseout', eventParam, event.proxy);
o.unbind('mousedown', event.proxy);
o.bind('mousedown', eventParam, event.proxy);
o.unbind('mouseup', event.proxy);
o.bind('mouseup', eventParam, event.proxy);
o.unbind('contextmenu', event.proxy);
o.bind('contextmenu', eventParam, event.proxy);
},
doProxy: function(e) {
var results = [];
for (var i=0, j=_init.proxys.length; i<j; i++) {
var proxyResult = _init.proxys[i].apply(this, arguments);
results.push(proxyResult);
if (proxyResult.stop) {
break;
}
}
return results;
},
proxy: function(e) {
var setting = data.getSetting(e.data.treeId);
if (!tools.uCanDo(setting, e)) return true;
var results = event.doProxy(e),
r = true, x = false;
for (var i=0, l=results.length; i<l; i++) {
var proxyResult = results[i];
if (proxyResult.nodeEventCallback) {
x = true;
r = proxyResult.nodeEventCallback.apply(proxyResult, [e, proxyResult.node]) && r;
}
if (proxyResult.treeEventCallback) {
x = true;
r = proxyResult.treeEventCallback.apply(proxyResult, [e, proxyResult.node]) && r;
}
}
try{
if (x && $("input:focus").length == 0) {
tools.noSel(setting);
}
} catch(e) {}
return r;
}
},
//method of event handler
handler = {
onSwitchNode: function (event, node) {
var setting = settings[event.data.treeId];
if (node.open) {
if (tools.apply(setting.callback.beforeCollapse, [setting.treeId, node], true) == false) return true;
data.getRoot(setting).expandTriggerFlag = true;
view.switchNode(setting, node);
} else {
if (tools.apply(setting.callback.beforeExpand, [setting.treeId, node], true) == false) return true;
data.getRoot(setting).expandTriggerFlag = true;
view.switchNode(setting, node);
}
return true;
},
onClickNode: function (event, node) {
var setting = settings[event.data.treeId],
clickFlag = ( (setting.view.autoCancelSelected && event.ctrlKey) && data.isSelectedNode(setting, node)) ? 0 : (setting.view.autoCancelSelected && event.ctrlKey && setting.view.selectedMulti) ? 2 : 1;
if (tools.apply(setting.callback.beforeClick, [setting.treeId, node, clickFlag], true) == false) return true;
if (clickFlag === 0) {
view.cancelPreSelectedNode(setting, node);
} else {
view.selectNode(setting, node, clickFlag === 2);
}
setting.treeObj.trigger(consts.event.CLICK, [event, setting.treeId, node, clickFlag]);
return true;
},
onZTreeMousedown: function(event, node) {
var setting = settings[event.data.treeId];
if (tools.apply(setting.callback.beforeMouseDown, [setting.treeId, node], true)) {
tools.apply(setting.callback.onMouseDown, [event, setting.treeId, node]);
}
return true;
},
onZTreeMouseup: function(event, node) {
var setting = settings[event.data.treeId];
if (tools.apply(setting.callback.beforeMouseUp, [setting.treeId, node], true)) {
tools.apply(setting.callback.onMouseUp, [event, setting.treeId, node]);
}
return true;
},
onZTreeDblclick: function(event, node) {
var setting = settings[event.data.treeId];
if (tools.apply(setting.callback.beforeDblClick, [setting.treeId, node], true)) {
tools.apply(setting.callback.onDblClick, [event, setting.treeId, node]);
}
return true;
},
onZTreeContextmenu: function(event, node) {
var setting = settings[event.data.treeId];
if (tools.apply(setting.callback.beforeRightClick, [setting.treeId, node], true)) {
tools.apply(setting.callback.onRightClick, [event, setting.treeId, node]);
}
return (typeof setting.callback.onRightClick) != "function";
}
},
//method of tools for zTree
tools = {
apply: function(fun, param, defaultValue) {
if ((typeof fun) == "function") {
return fun.apply(zt, param?param:[]);
}
return defaultValue;
},
canAsync: function(setting, node) {
var childKey = setting.data.key.children;
return (setting.async.enable && node && node.isParent && !(node.zAsync || (node[childKey] && node[childKey].length > 0)));
},
clone: function (jsonObj) {
var buf;
if (jsonObj instanceof Array) {
buf = [];
var i = jsonObj.length;
while (i--) {
buf[i] = arguments.callee(jsonObj[i]);
}
return buf;
}else if (typeof jsonObj == "function"){
return jsonObj;
}else if (jsonObj instanceof Object){
buf = {};
for (var k in jsonObj) {
buf[k] = arguments.callee(jsonObj[k]);
}
return buf;
}else{
return jsonObj;
}
},
eqs: function(str1, str2) {
return str1.toLowerCase() === str2.toLowerCase();
},
isArray: function(arr) {
return Object.prototype.toString.apply(arr) === "[object Array]";
},
getMDom: function (setting, curDom, targetExpr) {
if (!curDom) return null;
while (curDom && curDom.id !== setting.treeId) {
for (var i=0, l=targetExpr.length; curDom.tagName && i<l; i++) {
if (tools.eqs(curDom.tagName, targetExpr[i].tagName) && curDom.getAttribute(targetExpr[i].attrName) !== null) {
return curDom;
}
}
curDom = curDom.parentNode;
}
return null;
},
noSel: function(setting) {
var r = data.getRoot(setting);
if (r.noSelection) {
try {
window.getSelection ? window.getSelection().removeAllRanges() : document.selection.empty();
} catch(e){}
}
},
uCanDo: function(setting, e) {
return true;
}
},
//method of operate ztree dom
view = {
addNodes: function(setting, parentNode, newNodes, isSilent) {
if (setting.data.keep.leaf && parentNode && !parentNode.isParent) {
return;
}
if (!tools.isArray(newNodes)) {
newNodes = [newNodes];
}
if (setting.data.simpleData.enable) {
newNodes = data.transformTozTreeFormat(setting, newNodes);
}
if (parentNode) {
var target_switchObj = $("#" + parentNode.tId + consts.id.SWITCH),
target_icoObj = $("#" + parentNode.tId + consts.id.ICON),
target_ulObj = $("#" + parentNode.tId + consts.id.UL);
if (!parentNode.open) {
view.replaceSwitchClass(parentNode, target_switchObj, consts.folder.CLOSE);
view.replaceIcoClass(parentNode, target_icoObj, consts.folder.CLOSE);
parentNode.open = false;
target_ulObj.css({
"display": "none"
});
}
data.addNodesData(setting, parentNode, newNodes);
view.createNodes(setting, parentNode.level + 1, newNodes, parentNode);
if (!isSilent) {
view.expandCollapseParentNode(setting, parentNode, true);
}
} else {
data.addNodesData(setting, data.getRoot(setting), newNodes);
view.createNodes(setting, 0, newNodes, null);
}
},
appendNodes: function(setting, level, nodes, parentNode, initFlag, openFlag) {
if (!nodes) return [];
var html = [],
childKey = setting.data.key.children,
nameKey = setting.data.key.name,
titleKey = data.getTitleKey(setting);
for (var i = 0, l = nodes.length; i < l; i++) {
var node = nodes[i],
tmpPNode = (parentNode) ? parentNode: data.getRoot(setting),
tmpPChild = tmpPNode[childKey],
isFirstNode = ((tmpPChild.length == nodes.length) && (i == 0)),
isLastNode = (i == (nodes.length - 1));
if (initFlag) {
data.initNode(setting, level, node, parentNode, isFirstNode, isLastNode, openFlag);
data.addNodeCache(setting, node);
}
var childHtml = [];
if (node[childKey] && node[childKey].length > 0) {
//make child html first, because checkType
childHtml = view.appendNodes(setting, level + 1, node[childKey], node, initFlag, openFlag && node.open);
}
if (openFlag) {
var url = view.makeNodeUrl(setting, node),
fontcss = view.makeNodeFontCss(setting, node),
fontStyle = [];
for (var f in fontcss) {
fontStyle.push(f, ":", fontcss[f], ";");
}
html.push("<li id='", node.tId, "' class='level", node.level,"' tabindex='0' hidefocus='true' treenode>",
"<span id='", node.tId, consts.id.SWITCH,
"' title='' class='", view.makeNodeLineClass(setting, node), "' treeNode", consts.id.SWITCH,"></span>");
data.getBeforeA(setting, node, html);
html.push("<a id='", node.tId, consts.id.A, "' class='level", node.level,"' treeNode", consts.id.A," onclick=\"", (node.click || ''),
"\" ", ((url != null && url.length > 0) ? "href='" + url + "'" : ""), " target='",view.makeNodeTarget(node),"' style='", fontStyle.join(''),
"'");
if (tools.apply(setting.view.showTitle, [setting.treeId, node], setting.view.showTitle) && node[titleKey]) {html.push("title='", node[titleKey].replace(/'/g,"&#39;").replace(/</g,'&lt;').replace(/>/g,'&gt;'),"'");}
html.push(">");
data.getInnerBeforeA(setting, node, html);
var name = setting.view.nameIsHTML ? node[nameKey] : node[nameKey].replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;');
html.push("<span id='", node.tId, consts.id.ICON,
"' title='' treeNode", consts.id.ICON," class='", view.makeNodeIcoClass(setting, node), "' style='", view.makeNodeIcoStyle(setting, node), "'></span><span id='", node.tId, consts.id.SPAN,
"'>",name,"</span>");
data.getInnerAfterA(setting, node, html);
html.push("</a>");
data.getAfterA(setting, node, html);
if (node.isParent && node.open) {
view.makeUlHtml(setting, node, html, childHtml.join(''));
}
html.push("</li>");
data.addCreatedNode(setting, node);
}
}
return html;
},
appendParentULDom: function(setting, node) {
var html = [],
nObj = $("#" + node.tId),
ulObj = $("#" + node.tId + consts.id.UL),
childKey = setting.data.key.children,
childHtml = view.appendNodes(setting, node.level+1, node[childKey], node, false, true);
view.makeUlHtml(setting, node, html, childHtml.join(''));
if (!nObj.get(0) && !!node.parentTId) {
view.appendParentULDom(setting, node.getParentNode());
nObj = $("#" + node.tId);
}
if (ulObj.get(0)) {
ulObj.remove();
}
nObj.append(html.join(''));
view.createNodeCallback(setting);
},
asyncNode: function(setting, node, isSilent, callback) {
var i, l;
if (node && !node.isParent) {
tools.apply(callback);
return false;
} else if (node && node.isAjaxing) {
return false;
} else if (tools.apply(setting.callback.beforeAsync, [setting.treeId, node], true) == false) {
tools.apply(callback);
return false;
}
if (node) {
node.isAjaxing = true;
var icoObj = $("#" + node.tId + consts.id.ICON);
icoObj.attr({"style":"", "class":"button ico_loading"});
}
var isJson = (setting.async.contentType == "application/json"), tmpParam = isJson ? "{" : "", jTemp="";
for (i = 0, l = setting.async.autoParam.length; node && i < l; i++) {
var pKey = setting.async.autoParam[i].split("="), spKey = pKey;
if (pKey.length>1) {
spKey = pKey[1];
pKey = pKey[0];
}
if (isJson) {
jTemp = (typeof node[pKey] == "string") ? '"' : '';
tmpParam += '"' + spKey + ('":' + jTemp + node[pKey]).replace(/'/g,'\\\'') + jTemp + ',';
} else {
tmpParam += spKey + ("=" + node[pKey]).replace(/&/g,'%26') + "&";
}
}
if (tools.isArray(setting.async.otherParam)) {
for (i = 0, l = setting.async.otherParam.length; i < l; i += 2) {
if (isJson) {
jTemp = (typeof setting.async.otherParam[i + 1] == "string") ? '"' : '';
tmpParam += '"' + setting.async.otherParam[i] + ('":' + jTemp + setting.async.otherParam[i + 1]).replace(/'/g,'\\\'') + jTemp + ",";
} else {
tmpParam += setting.async.otherParam[i] + ("=" + setting.async.otherParam[i + 1]).replace(/&/g,'%26') + "&";
}
}
} else {
for (var p in setting.async.otherParam) {
if (isJson) {
jTemp = (typeof setting.async.otherParam[p] == "string") ? '"' : '';
tmpParam += '"' + p + ('":' + jTemp + setting.async.otherParam[p]).replace(/'/g,'\\\'') + jTemp + ",";
} else {
tmpParam += p + ("=" + setting.async.otherParam[p]).replace(/&/g,'%26') + "&";
}
}
}
if (tmpParam.length > 1) tmpParam = tmpParam.substring(0, tmpParam.length-1);
if (isJson) tmpParam += "}";
$.ajax({
contentType: setting.async.contentType,
type: setting.async.type,
url: tools.apply(setting.async.url, [setting.treeId, node], setting.async.url),
data: tmpParam,
dataType: setting.async.dataType,
success: function(msg) {
var newNodes = [];
try {
if (!msg || msg.length == 0) {
newNodes = [];
} else if (typeof msg == "string") {
newNodes = eval("(" + msg + ")");
} else {
newNodes = msg;
}
} catch(err) {}
if (node) {
node.isAjaxing = null;
node.zAsync = true;
}
view.setNodeLineIcos(setting, node);
if (newNodes && newNodes != "") {
newNodes = tools.apply(setting.async.dataFilter, [setting.treeId, node, newNodes], newNodes);
view.addNodes(setting, node, !!newNodes ? tools.clone(newNodes) : [], !!isSilent);
} else {
view.addNodes(setting, node, [], !!isSilent);
}
setting.treeObj.trigger(consts.event.ASYNC_SUCCESS, [setting.treeId, node, msg]);
tools.apply(callback);
},
error: function(XMLHttpRequest, textStatus, errorThrown) {
if (node) node.isAjaxing = null;
view.setNodeLineIcos(setting, node);
setting.treeObj.trigger(consts.event.ASYNC_ERROR, [setting.treeId, node, XMLHttpRequest, textStatus, errorThrown]);
}
});
return true;
},
cancelPreSelectedNode: function (setting, node) {
var list = data.getRoot(setting).curSelectedList;
for (var i=0, j=list.length-1; j>=i; j--) {
if (!node || node === list[j]) {
$("#" + list[j].tId + consts.id.A).removeClass(consts.node.CURSELECTED);
view.setNodeName(setting, list[j]);
if (node) {
data.removeSelectedNode(setting, node);
break;
}
}
}
if (!node) data.getRoot(setting).curSelectedList = [];
},
createNodeCallback: function(setting) {
if (!!setting.callback.onNodeCreated || !!setting.view.addDiyDom) {
var root = data.getRoot(setting);
while (root.createdNodes.length>0) {
var node = root.createdNodes.shift();
tools.apply(setting.view.addDiyDom, [setting.treeId, node]);
if (!!setting.callback.onNodeCreated) {
setting.treeObj.trigger(consts.event.NODECREATED, [setting.treeId, node]);
}
}
}
},
createNodes: function(setting, level, nodes, parentNode) {
if (!nodes || nodes.length == 0) return;
var root = data.getRoot(setting),
childKey = setting.data.key.children,
openFlag = !parentNode || parentNode.open || !!$("#" + parentNode[childKey][0].tId).get(0);
root.createdNodes = [];
var zTreeHtml = view.appendNodes(setting, level, nodes, parentNode, true, openFlag);
if (!parentNode) {
setting.treeObj.append(zTreeHtml.join(''));
} else {
var ulObj = $("#" + parentNode.tId + consts.id.UL);
if (ulObj.get(0)) {
ulObj.append(zTreeHtml.join(''));
}
}
view.createNodeCallback(setting);
},
expandCollapseNode: function(setting, node, expandFlag, animateFlag, callback) {
var root = data.getRoot(setting),
childKey = setting.data.key.children;
if (!node) {
tools.apply(callback, []);
return;
}
if (root.expandTriggerFlag) {
var _callback = callback;
callback = function(){
if (_callback) _callback();
if (node.open) {
setting.treeObj.trigger(consts.event.EXPAND, [setting.treeId, node]);
} else {
setting.treeObj.trigger(consts.event.COLLAPSE, [setting.treeId, node]);
}
};
root.expandTriggerFlag = false;
}
if (node.open == expandFlag) {
tools.apply(callback, []);
return;
}
if (!node.open && node.isParent && ((!$("#" + node.tId + consts.id.UL).get(0)) || (node[childKey] && node[childKey].length>0 && !$("#" + node[childKey][0].tId).get(0)))) {
view.appendParentULDom(setting, node);
}
var ulObj = $("#" + node.tId + consts.id.UL),
switchObj = $("#" + node.tId + consts.id.SWITCH),
icoObj = $("#" + node.tId + consts.id.ICON);
if (node.isParent) {
node.open = !node.open;
if (node.iconOpen && node.iconClose) {
icoObj.attr("style", view.makeNodeIcoStyle(setting, node));
}
if (node.open) {
view.replaceSwitchClass(node, switchObj, consts.folder.OPEN);
view.replaceIcoClass(node, icoObj, consts.folder.OPEN);
if (animateFlag == false || setting.view.expandSpeed == "") {
ulObj.show();
tools.apply(callback, []);
} else {
if (node[childKey] && node[childKey].length > 0) {
ulObj.slideDown(setting.view.expandSpeed, callback);
} else {
ulObj.show();
tools.apply(callback, []);
}
}
} else {
view.replaceSwitchClass(node, switchObj, consts.folder.CLOSE);
view.replaceIcoClass(node, icoObj, consts.folder.CLOSE);
if (animateFlag == false || setting.view.expandSpeed == "" || !(node[childKey] && node[childKey].length > 0)) {
ulObj.hide();
tools.apply(callback, []);
} else {
ulObj.slideUp(setting.view.expandSpeed, callback);
}
}
} else {
tools.apply(callback, []);
}
},
expandCollapseParentNode: function(setting, node, expandFlag, animateFlag, callback) {
if (!node) return;
if (!node.parentTId) {
view.expandCollapseNode(setting, node, expandFlag, animateFlag, callback);
return;
} else {
view.expandCollapseNode(setting, node, expandFlag, animateFlag);
}
if (node.parentTId) {
view.expandCollapseParentNode(setting, node.getParentNode(), expandFlag, animateFlag, callback);
}
},
expandCollapseSonNode: function(setting, node, expandFlag, animateFlag, callback) {
var root = data.getRoot(setting),
childKey = setting.data.key.children,
treeNodes = (node) ? node[childKey]: root[childKey],
selfAnimateSign = (node) ? false : animateFlag,
expandTriggerFlag = data.getRoot(setting).expandTriggerFlag;
data.getRoot(setting).expandTriggerFlag = false;
if (treeNodes) {
for (var i = 0, l = treeNodes.length; i < l; i++) {
if (treeNodes[i]) view.expandCollapseSonNode(setting, treeNodes[i], expandFlag, selfAnimateSign);
}
}
data.getRoot(setting).expandTriggerFlag = expandTriggerFlag;
view.expandCollapseNode(setting, node, expandFlag, animateFlag, callback );
},
makeNodeFontCss: function(setting, node) {
var fontCss = tools.apply(setting.view.fontCss, [setting.treeId, node], setting.view.fontCss);
return (fontCss && ((typeof fontCss) != "function")) ? fontCss : {};
},
makeNodeIcoClass: function(setting, node) {
var icoCss = ["ico"];
if (!node.isAjaxing) {
icoCss[0] = (node.iconSkin ? node.iconSkin + "_" : "") + icoCss[0];
if (node.isParent) {
icoCss.push(node.open ? consts.folder.OPEN : consts.folder.CLOSE);
} else {
icoCss.push(consts.folder.DOCU);
}
}
return "button " + icoCss.join('_');
},
makeNodeIcoStyle: function(setting, node) {
var icoStyle = [];
if (!node.isAjaxing) {
var icon = (node.isParent && node.iconOpen && node.iconClose) ? (node.open ? node.iconOpen : node.iconClose) : node.icon;
if (icon) icoStyle.push("background:url(", icon, ") 0 0 no-repeat;");
if (setting.view.showIcon == false || !tools.apply(setting.view.showIcon, [setting.treeId, node], true)) {
icoStyle.push("width:0px;height:0px;");
}
}
return icoStyle.join('');
},
makeNodeLineClass: function(setting, node) {
var lineClass = [];
if (setting.view.showLine) {
if (node.level == 0 && node.isFirstNode && node.isLastNode) {
lineClass.push(consts.line.ROOT);
} else if (node.level == 0 && node.isFirstNode) {
lineClass.push(consts.line.ROOTS);
} else if (node.isLastNode) {
lineClass.push(consts.line.BOTTOM);
} else {
lineClass.push(consts.line.CENTER);
}
} else {
lineClass.push(consts.line.NOLINE);
}
if (node.isParent) {
lineClass.push(node.open ? consts.folder.OPEN : consts.folder.CLOSE);
} else {
lineClass.push(consts.folder.DOCU);
}
return view.makeNodeLineClassEx(node) + lineClass.join('_');
},
makeNodeLineClassEx: function(node) {
return "button level" + node.level + " switch ";
},
makeNodeTarget: function(node) {
return (node.target || "_blank");
},
makeNodeUrl: function(setting, node) {
var urlKey = setting.data.key.url;
return node[urlKey] ? node[urlKey] : null;
},
makeUlHtml: function(setting, node, html, content) {
html.push("<ul id='", node.tId, consts.id.UL, "' class='level", node.level, " ", view.makeUlLineClass(setting, node), "' style='display:", (node.open ? "block": "none"),"'>");
html.push(content);
html.push("</ul>");
},
makeUlLineClass: function(setting, node) {
return ((setting.view.showLine && !node.isLastNode) ? consts.line.LINE : "");
},
removeChildNodes: function(setting, node) {
if (!node) return;
var childKey = setting.data.key.children,
nodes = node[childKey];
if (!nodes) return;
for (var i = 0, l = nodes.length; i < l; i++) {
data.removeNodeCache(setting, nodes[i]);
}
data.removeSelectedNode(setting);
delete node[childKey];
if (!setting.data.keep.parent) {
node.isParent = false;
node.open = false;
var tmp_switchObj = $("#" + node.tId + consts.id.SWITCH),
tmp_icoObj = $("#" + node.tId + consts.id.ICON);
view.replaceSwitchClass(node, tmp_switchObj, consts.folder.DOCU);
view.replaceIcoClass(node, tmp_icoObj, consts.folder.DOCU);
$("#" + node.tId + consts.id.UL).remove();
} else {
$("#" + node.tId + consts.id.UL).empty();
}
},
removeNode: function(setting, node) {
var root = data.getRoot(setting),
childKey = setting.data.key.children,
parentNode = (node.parentTId) ? node.getParentNode() : root;
node.isFirstNode = false;
node.isLastNode = false;
node.getPreNode = function() {return null;};
node.getNextNode = function() {return null;};
$("#" + node.tId).remove();
data.removeNodeCache(setting, node);
data.removeSelectedNode(setting, node);
for (var i = 0, l = parentNode[childKey].length; i < l; i++) {
if (parentNode[childKey][i].tId == node.tId) {
parentNode[childKey].splice(i, 1);
break;
}
}
var tmp_ulObj,tmp_switchObj,tmp_icoObj;
//repair nodes old parent
if (!setting.data.keep.parent && parentNode[childKey].length < 1) {
//old parentNode has no child nodes
parentNode.isParent = false;
parentNode.open = false;
tmp_ulObj = $("#" + parentNode.tId + consts.id.UL);
tmp_switchObj = $("#" + parentNode.tId + consts.id.SWITCH);
tmp_icoObj = $("#" + parentNode.tId + consts.id.ICON);
view.replaceSwitchClass(parentNode, tmp_switchObj, consts.folder.DOCU);
view.replaceIcoClass(parentNode, tmp_icoObj, consts.folder.DOCU);
tmp_ulObj.css("display", "none");
} else if (setting.view.showLine && parentNode[childKey].length > 0) {
//old parentNode has child nodes
var newLast = parentNode[childKey][parentNode[childKey].length - 1];
newLast.isLastNode = true;
newLast.isFirstNode = (parentNode[childKey].length == 1);
tmp_ulObj = $("#" + newLast.tId + consts.id.UL);
tmp_switchObj = $("#" + newLast.tId + consts.id.SWITCH);
tmp_icoObj = $("#" + newLast.tId + consts.id.ICON);
if (parentNode == root) {
if (parentNode[childKey].length == 1) {
//node was root, and ztree has only one root after move node
view.replaceSwitchClass(newLast, tmp_switchObj, consts.line.ROOT);
} else {
var tmp_first_switchObj = $("#" + parentNode[childKey][0].tId + consts.id.SWITCH);
view.replaceSwitchClass(parentNode[childKey][0], tmp_first_switchObj, consts.line.ROOTS);
view.replaceSwitchClass(newLast, tmp_switchObj, consts.line.BOTTOM);
}
} else {
view.replaceSwitchClass(newLast, tmp_switchObj, consts.line.BOTTOM);
}
tmp_ulObj.removeClass(consts.line.LINE);
}
},
replaceIcoClass: function(node, obj, newName) {
if (!obj || node.isAjaxing) return;
var tmpName = obj.attr("class");
if (tmpName == undefined) return;
var tmpList = tmpName.split("_");
switch (newName) {
case consts.folder.OPEN:
case consts.folder.CLOSE:
case consts.folder.DOCU:
tmpList[tmpList.length-1] = newName;
break;
}
obj.attr("class", tmpList.join("_"));
},
replaceSwitchClass: function(node, obj, newName) {
if (!obj) return;
var tmpName = obj.attr("class");
if (tmpName == undefined) return;
var tmpList = tmpName.split("_");
switch (newName) {
case consts.line.ROOT:
case consts.line.ROOTS:
case consts.line.CENTER:
case consts.line.BOTTOM:
case consts.line.NOLINE:
tmpList[0] = view.makeNodeLineClassEx(node) + newName;
break;
case consts.folder.OPEN:
case consts.folder.CLOSE:
case consts.folder.DOCU:
tmpList[1] = newName;
break;
}
obj.attr("class", tmpList.join("_"));
if (newName !== consts.folder.DOCU) {
obj.removeAttr("disabled");
} else {
obj.attr("disabled", "disabled");
}
},
selectNode: function(setting, node, addFlag) {
if (!addFlag) {
view.cancelPreSelectedNode(setting);
}
$("#" + node.tId + consts.id.A).addClass(consts.node.CURSELECTED);
data.addSelectedNode(setting, node);
},
setNodeFontCss: function(setting, treeNode) {
var aObj = $("#" + treeNode.tId + consts.id.A),
fontCss = view.makeNodeFontCss(setting, treeNode);
if (fontCss) {
aObj.css(fontCss);
}
},
setNodeLineIcos: function(setting, node) {
if (!node) return;
var switchObj = $("#" + node.tId + consts.id.SWITCH),
ulObj = $("#" + node.tId + consts.id.UL),
icoObj = $("#" + node.tId + consts.id.ICON),
ulLine = view.makeUlLineClass(setting, node);
if (ulLine.length==0) {
ulObj.removeClass(consts.line.LINE);
} else {
ulObj.addClass(ulLine);
}
switchObj.attr("class", view.makeNodeLineClass(setting, node));
if (node.isParent) {
switchObj.removeAttr("disabled");
} else {
switchObj.attr("disabled", "disabled");
}
icoObj.removeAttr("style");
icoObj.attr("style", view.makeNodeIcoStyle(setting, node));
icoObj.attr("class", view.makeNodeIcoClass(setting, node));
},
setNodeName: function(setting, node) {
var nameKey = setting.data.key.name,
titleKey = data.getTitleKey(setting),
nObj = $("#" + node.tId + consts.id.SPAN);
nObj.empty();
if (setting.view.nameIsHTML) {
nObj.html(node[nameKey]);
} else {
nObj.text(node[nameKey]);
}
if (tools.apply(setting.view.showTitle, [setting.treeId, node], setting.view.showTitle) && node[titleKey]) {
var aObj = $("#" + node.tId + consts.id.A);
aObj.attr("title", node[titleKey]);
}
},
setNodeTarget: function(node) {
var aObj = $("#" + node.tId + consts.id.A);
aObj.attr("target", view.makeNodeTarget(node));
},
setNodeUrl: function(setting, node) {
var aObj = $("#" + node.tId + consts.id.A),
url = view.makeNodeUrl(setting, node);
if (url == null || url.length == 0) {
aObj.removeAttr("href");
} else {
aObj.attr("href", url);
}
},
switchNode: function(setting, node) {
if (node.open || !tools.canAsync(setting, node)) {
view.expandCollapseNode(setting, node, !node.open);
} else if (setting.async.enable) {
if (!view.asyncNode(setting, node)) {
view.expandCollapseNode(setting, node, !node.open);
return;
}
} else if (node) {
view.expandCollapseNode(setting, node, !node.open);
}
}
};
// zTree defind
$.fn.zTree = {
consts : _consts,
_z : {
tools: tools,
view: view,
event: event,
data: data
},
getZTreeObj: function(treeId) {
var o = data.getZTreeTools(treeId);
return o ? o : null;
},
init: function(obj, zSetting, zNodes) {
var setting = tools.clone(_setting);
$.extend(true, setting, zSetting);
setting.treeId = obj.attr("id");
setting.treeObj = obj;
setting.treeObj.empty();
settings[setting.treeId] = setting;
if ($.browser.msie && parseInt($.browser.version)<7) {
setting.view.expandSpeed = "";
}
data.initRoot(setting);
var root = data.getRoot(setting),
childKey = setting.data.key.children;
zNodes = zNodes ? tools.clone(tools.isArray(zNodes)? zNodes : [zNodes]) : [];
if (setting.data.simpleData.enable) {
root[childKey] = data.transformTozTreeFormat(setting, zNodes);
} else {
root[childKey] = zNodes;
}
data.initCache(setting);
event.bindTree(setting);
event.bindEvent(setting);
var zTreeTools = {
setting : setting,
addNodes : function(parentNode, newNodes, isSilent) {
if (!newNodes) return null;
if (!parentNode) parentNode = null;
if (parentNode && !parentNode.isParent && setting.data.keep.leaf) return null;
var xNewNodes = tools.clone(tools.isArray(newNodes)? newNodes: [newNodes]);
function addCallback() {
view.addNodes(setting, parentNode, xNewNodes, (isSilent==true));
}
if (tools.canAsync(setting, parentNode)) {
view.asyncNode(setting, parentNode, isSilent, addCallback);
} else {
addCallback();
}
return xNewNodes;
},
cancelSelectedNode : function(node) {
view.cancelPreSelectedNode(this.setting, node);
},
expandAll : function(expandFlag) {
expandFlag = !!expandFlag;
view.expandCollapseSonNode(this.setting, null, expandFlag, true);
return expandFlag;
},
expandNode : function(node, expandFlag, sonSign, focus, callbackFlag) {
if (!node || !node.isParent) return null;
if (expandFlag !== true && expandFlag !== false) {
expandFlag = !node.open;
}
callbackFlag = !!callbackFlag;
if (callbackFlag && expandFlag && (tools.apply(setting.callback.beforeExpand, [setting.treeId, node], true) == false)) {
return null;
} else if (callbackFlag && !expandFlag && (tools.apply(setting.callback.beforeCollapse, [setting.treeId, node], true) == false)) {
return null;
}
if (expandFlag && node.parentTId) {
view.expandCollapseParentNode(this.setting, node.getParentNode(), expandFlag, false);
}
if (expandFlag === node.open && !sonSign) {
return null;
}
data.getRoot(setting).expandTriggerFlag = callbackFlag;
if (sonSign) {
view.expandCollapseSonNode(this.setting, node, expandFlag, true, function() {
if (focus !== false) {$("#" + node.tId).focus().blur();}
});
} else {
node.open = !expandFlag;
view.switchNode(this.setting, node);
if (focus !== false) {$("#" + node.tId).focus().blur();}
}
return expandFlag;
},
getNodes : function() {
return data.getNodes(this.setting);
},
getNodeByParam : function(key, value, parentNode) {
if (!key) return null;
return data.getNodeByParam(this.setting, parentNode?parentNode[this.setting.data.key.children]:data.getNodes(this.setting), key, value);
},
getNodeByTId : function(tId) {
return data.getNodeCache(this.setting, tId);
},
getNodesByParam : function(key, value, parentNode) {
if (!key) return null;
return data.getNodesByParam(this.setting, parentNode?parentNode[this.setting.data.key.children]:data.getNodes(this.setting), key, value);
},
getNodesByParamFuzzy : function(key, value, parentNode) {
if (!key) return null;
return data.getNodesByParamFuzzy(this.setting, parentNode?parentNode[this.setting.data.key.children]:data.getNodes(this.setting), key, value);
},
getNodesByFilter: function(filter, isSingle, parentNode) {
isSingle = !!isSingle;
if (!filter || (typeof filter != "function")) return (isSingle ? null : []);
return data.getNodesByFilter(this.setting, parentNode?parentNode[this.setting.data.key.children]:data.getNodes(this.setting), filter, isSingle);
},
getNodeIndex : function(node) {
if (!node) return null;
var childKey = setting.data.key.children,
parentNode = (node.parentTId) ? node.getParentNode() : data.getRoot(this.setting);
for (var i=0, l = parentNode[childKey].length; i < l; i++) {
if (parentNode[childKey][i] == node) return i;
}
return -1;
},
getSelectedNodes : function() {
var r = [], list = data.getRoot(this.setting).curSelectedList;
for (var i=0, l=list.length; i<l; i++) {
r.push(list[i]);
}
return r;
},
isSelectedNode : function(node) {
return data.isSelectedNode(this.setting, node);
},
reAsyncChildNodes : function(parentNode, reloadType, isSilent) {
if (!this.setting.async.enable) return;
var isRoot = !parentNode;
if (isRoot) {
parentNode = data.getRoot(this.setting);
}
if (reloadType=="refresh") {
parentNode[this.setting.data.key.children] = [];
if (isRoot) {
this.setting.treeObj.empty();
} else {
var ulObj = $("#" + parentNode.tId + consts.id.UL);
ulObj.empty();
}
}
view.asyncNode(this.setting, isRoot? null:parentNode, !!isSilent);
},
refresh : function() {
this.setting.treeObj.empty();
var root = data.getRoot(this.setting),
nodes = root[this.setting.data.key.children]
data.initRoot(this.setting);
root[this.setting.data.key.children] = nodes
data.initCache(this.setting);
view.createNodes(this.setting, 0, root[this.setting.data.key.children]);
},
removeChildNodes : function(node) {
if (!node) return null;
var childKey = setting.data.key.children,
nodes = node[childKey];
view.removeChildNodes(setting, node);
return nodes ? nodes : null;
},
removeNode : function(node, callbackFlag) {
if (!node) return;
callbackFlag = !!callbackFlag;
if (callbackFlag && tools.apply(setting.callback.beforeRemove, [setting.treeId, node], true) == false) return;
view.removeNode(setting, node);
if (callbackFlag) {
this.setting.treeObj.trigger(consts.event.REMOVE, [setting.treeId, node]);
}
},
selectNode : function(node, addFlag) {
if (!node) return;
if (tools.uCanDo(this.setting)) {
addFlag = setting.view.selectedMulti && addFlag;
if (node.parentTId) {
view.expandCollapseParentNode(this.setting, node.getParentNode(), true, false, function() {
$("#" + node.tId).focus().blur();
});
} else {
$("#" + node.tId).focus().blur();
}
view.selectNode(this.setting, node, addFlag);
}
},
transformTozTreeNodes : function(simpleNodes) {
return data.transformTozTreeFormat(this.setting, simpleNodes);
},
transformToArray : function(nodes) {
return data.transformToArrayFormat(this.setting, nodes);
},
updateNode : function(node, checkTypeFlag) {
if (!node) return;
var nObj = $("#" + node.tId);
if (nObj.get(0) && tools.uCanDo(this.setting)) {
view.setNodeName(this.setting, node);
view.setNodeTarget(node);
view.setNodeUrl(this.setting, node);
view.setNodeLineIcos(this.setting, node);
view.setNodeFontCss(this.setting, node);
}
}
}
root.treeTools = zTreeTools;
data.setZTreeTools(setting, zTreeTools);
if (root[childKey] && root[childKey].length > 0) {
view.createNodes(setting, 0, root[childKey]);
} else if (setting.async.enable && setting.async.url && setting.async.url !== '') {
view.asyncNode(setting);
}
return zTreeTools;
}
};
var zt = $.fn.zTree,
consts = zt.consts;
})(jQuery);
\ No newline at end of file
/*
* JQuery zTree core 3.2
* http://code.google.com/p/jquerytree/
*
* Copyright (c) 2010 Hunter.z (baby666.cn)
*
* Licensed same as jquery - MIT License
* http://www.opensource.org/licenses/mit-license.php
*
* email: hunter.z@263.net
* Date: 2012-05-13
*/
(function(l){var D,E,F,G,H,I,p={},J={},s={},M=0,K={treeId:"",treeObj:null,view:{addDiyDom:null,autoCancelSelected:!0,dblClickExpand:!0,expandSpeed:"fast",fontCss:{},nameIsHTML:!1,selectedMulti:!0,showIcon:!0,showLine:!0,showTitle:!0},data:{key:{children:"children",name:"name",title:"",url:"url"},simpleData:{enable:!1,idKey:"id",pIdKey:"pId",rootPId:null},keep:{parent:!1,leaf:!1}},async:{enable:!1,contentType:"application/x-www-form-urlencoded",type:"post",dataType:"text",url:"",autoParam:[],otherParam:[],
dataFilter:null},callback:{beforeAsync:null,beforeClick:null,beforeRightClick:null,beforeMouseDown:null,beforeMouseUp:null,beforeExpand:null,beforeCollapse:null,beforeRemove:null,onAsyncError:null,onAsyncSuccess:null,onNodeCreated:null,onClick:null,onRightClick:null,onMouseDown:null,onMouseUp:null,onExpand:null,onCollapse:null,onRemove:null}},t=[function(b){var a=b.treeObj,c=f.event;a.unbind(c.NODECREATED);a.bind(c.NODECREATED,function(a,c,g){k.apply(b.callback.onNodeCreated,[a,c,g])});a.unbind(c.CLICK);
a.bind(c.CLICK,function(a,c,g,j,f){k.apply(b.callback.onClick,[c,g,j,f])});a.unbind(c.EXPAND);a.bind(c.EXPAND,function(a,c,g){k.apply(b.callback.onExpand,[a,c,g])});a.unbind(c.COLLAPSE);a.bind(c.COLLAPSE,function(a,c,g){k.apply(b.callback.onCollapse,[a,c,g])});a.unbind(c.ASYNC_SUCCESS);a.bind(c.ASYNC_SUCCESS,function(a,c,g,j){k.apply(b.callback.onAsyncSuccess,[a,c,g,j])});a.unbind(c.ASYNC_ERROR);a.bind(c.ASYNC_ERROR,function(a,c,g,j,f,h){k.apply(b.callback.onAsyncError,[a,c,g,j,f,h])})}],q=[function(b){var a=
h.getCache(b);a||(a={},h.setCache(b,a));a.nodes=[];a.doms=[]}],v=[function(b,a,c,d,e,g){if(c){var j=b.data.key.children;c.level=a;c.tId=b.treeId+"_"+ ++M;c.parentTId=d?d.tId:null;if(c[j]&&c[j].length>0){if(typeof c.open=="string")c.open=k.eqs(c.open,"true");c.open=!!c.open;c.isParent=!0;c.zAsync=!0}else{c.open=!1;if(typeof c.isParent=="string")c.isParent=k.eqs(c.isParent,"true");c.isParent=!!c.isParent;c.zAsync=!c.isParent}c.isFirstNode=e;c.isLastNode=g;c.getParentNode=function(){return h.getNodeCache(b,
c.parentTId)};c.getPreNode=function(){return h.getPreNode(b,c)};c.getNextNode=function(){return h.getNextNode(b,c)};c.isAjaxing=!1;h.fixPIdKeyValue(b,c)}}],w=[function(b){var a=b.target,c=p[b.data.treeId],d="",e=null,g="",j="",i=null,m=null,l=null;if(k.eqs(b.type,"mousedown"))j="mousedown";else if(k.eqs(b.type,"mouseup"))j="mouseup";else if(k.eqs(b.type,"contextmenu"))j="contextmenu";else if(k.eqs(b.type,"click"))if(k.eqs(a.tagName,"span")&&a.getAttribute("treeNode"+f.id.SWITCH)!==null)d=a.parentNode.id,
g="switchNode";else{if(l=k.getMDom(c,a,[{tagName:"a",attrName:"treeNode"+f.id.A}]))d=l.parentNode.id,g="clickNode"}else if(k.eqs(b.type,"dblclick")&&(j="dblclick",l=k.getMDom(c,a,[{tagName:"a",attrName:"treeNode"+f.id.A}])))d=l.parentNode.id,g="switchNode";if(j.length>0&&d.length==0&&(l=k.getMDom(c,a,[{tagName:"a",attrName:"treeNode"+f.id.A}])))d=l.parentNode.id;if(d.length>0)switch(e=h.getNodeCache(c,d),g){case "switchNode":e.isParent?k.eqs(b.type,"click")||k.eqs(b.type,"dblclick")&&k.apply(c.view.dblClickExpand,
[c.treeId,e],c.view.dblClickExpand)?i=D:g="":g="";break;case "clickNode":i=E}switch(j){case "mousedown":m=F;break;case "mouseup":m=G;break;case "dblclick":m=H;break;case "contextmenu":m=I}return{stop:!1,node:e,nodeEventType:g,nodeEventCallback:i,treeEventType:j,treeEventCallback:m}}],x=[function(b){var a=h.getRoot(b);a||(a={},h.setRoot(b,a));a.children=[];a.expandTriggerFlag=!1;a.curSelectedList=[];a.noSelection=!0;a.createdNodes=[]}],y=[],z=[],A=[],B=[],C=[],h={addNodeCache:function(b,a){h.getCache(b).nodes[a.tId]=
a},addAfterA:function(b){z.push(b)},addBeforeA:function(b){y.push(b)},addInnerAfterA:function(b){B.push(b)},addInnerBeforeA:function(b){A.push(b)},addInitBind:function(b){t.push(b)},addInitCache:function(b){q.push(b)},addInitNode:function(b){v.push(b)},addInitProxy:function(b){w.push(b)},addInitRoot:function(b){x.push(b)},addNodesData:function(b,a,c){var d=b.data.key.children;a[d]||(a[d]=[]);if(a[d].length>0)a[d][a[d].length-1].isLastNode=!1,i.setNodeLineIcos(b,a[d][a[d].length-1]);a.isParent=!0;
a[d]=a[d].concat(c)},addSelectedNode:function(b,a){var c=h.getRoot(b);h.isSelectedNode(b,a)||c.curSelectedList.push(a)},addCreatedNode:function(b,a){(b.callback.onNodeCreated||b.view.addDiyDom)&&h.getRoot(b).createdNodes.push(a)},addZTreeTools:function(b){C.push(b)},exSetting:function(b){l.extend(!0,K,b)},fixPIdKeyValue:function(b,a){b.data.simpleData.enable&&(a[b.data.simpleData.pIdKey]=a.parentTId?a.getParentNode()[b.data.simpleData.idKey]:b.data.simpleData.rootPId)},getAfterA:function(b,a,c){for(var d=
0,e=z.length;d<e;d++)z[d].apply(this,arguments)},getBeforeA:function(b,a,c){for(var d=0,e=y.length;d<e;d++)y[d].apply(this,arguments)},getInnerAfterA:function(b,a,c){for(var d=0,e=B.length;d<e;d++)B[d].apply(this,arguments)},getInnerBeforeA:function(b,a,c){for(var d=0,e=A.length;d<e;d++)A[d].apply(this,arguments)},getCache:function(b){return s[b.treeId]},getNextNode:function(b,a){if(!a)return null;var c=b.data.key.children,d=a.parentTId?a.getParentNode():h.getRoot(b);if(!a.isLastNode)if(a.isFirstNode)return d[c][1];
else for(var e=1,g=d[c].length-1;e<g;e++)if(d[c][e]===a)return d[c][e+1];return null},getNodeByParam:function(b,a,c,d){if(!a||!c)return null;for(var e=b.data.key.children,g=0,j=a.length;g<j;g++){if(a[g][c]==d)return a[g];var f=h.getNodeByParam(b,a[g][e],c,d);if(f)return f}return null},getNodeCache:function(b,a){if(!a)return null;var c=s[b.treeId].nodes[a];return c?c:null},getNodes:function(b){return h.getRoot(b)[b.data.key.children]},getNodesByParam:function(b,a,c,d){if(!a||!c)return[];for(var e=
b.data.key.children,g=[],j=0,f=a.length;j<f;j++)a[j][c]==d&&g.push(a[j]),g=g.concat(h.getNodesByParam(b,a[j][e],c,d));return g},getNodesByParamFuzzy:function(b,a,c,d){if(!a||!c)return[];for(var e=b.data.key.children,g=[],j=0,f=a.length;j<f;j++)typeof a[j][c]=="string"&&a[j][c].indexOf(d)>-1&&g.push(a[j]),g=g.concat(h.getNodesByParamFuzzy(b,a[j][e],c,d));return g},getNodesByFilter:function(b,a,c,d){if(!a)return d?null:[];for(var e=b.data.key.children,g=d?null:[],j=0,f=a.length;j<f;j++){if(k.apply(c,
[a[j]],!1)){if(d)return a[j];g.push(a[j])}var i=h.getNodesByFilter(b,a[j][e],c,d);if(d&&i)return i;g=d?i:g.concat(i)}return g},getPreNode:function(b,a){if(!a)return null;var c=b.data.key.children,d=a.parentTId?a.getParentNode():h.getRoot(b);if(!a.isFirstNode)if(a.isLastNode)return d[c][d[c].length-2];else for(var e=1,g=d[c].length-1;e<g;e++)if(d[c][e]===a)return d[c][e-1];return null},getRoot:function(b){return b?J[b.treeId]:null},getSetting:function(b){return p[b]},getSettings:function(){return p},
getTitleKey:function(b){return b.data.key.title===""?b.data.key.name:b.data.key.title},getZTreeTools:function(b){return(b=this.getRoot(this.getSetting(b)))?b.treeTools:null},initCache:function(b){for(var a=0,c=q.length;a<c;a++)q[a].apply(this,arguments)},initNode:function(b,a,c,d,e,g){for(var j=0,f=v.length;j<f;j++)v[j].apply(this,arguments)},initRoot:function(b){for(var a=0,c=x.length;a<c;a++)x[a].apply(this,arguments)},isSelectedNode:function(b,a){for(var c=h.getRoot(b),d=0,e=c.curSelectedList.length;d<
e;d++)if(a===c.curSelectedList[d])return!0;return!1},removeNodeCache:function(b,a){var c=b.data.key.children;if(a[c])for(var d=0,e=a[c].length;d<e;d++)arguments.callee(b,a[c][d]);delete h.getCache(b).nodes[a.tId]},removeSelectedNode:function(b,a){for(var c=h.getRoot(b),d=0,e=c.curSelectedList.length;d<e;d++)if(a===c.curSelectedList[d]||!h.getNodeCache(b,c.curSelectedList[d].tId))c.curSelectedList.splice(d,1),d--,e--},setCache:function(b,a){s[b.treeId]=a},setRoot:function(b,a){J[b.treeId]=a},setZTreeTools:function(b,
a){for(var c=0,d=C.length;c<d;c++)C[c].apply(this,arguments)},transformToArrayFormat:function(b,a){if(!a)return[];var c=b.data.key.children,d=[];if(k.isArray(a))for(var e=0,g=a.length;e<g;e++)d.push(a[e]),a[e][c]&&(d=d.concat(h.transformToArrayFormat(b,a[e][c])));else d.push(a),a[c]&&(d=d.concat(h.transformToArrayFormat(b,a[c])));return d},transformTozTreeFormat:function(b,a){var c,d,e=b.data.simpleData.idKey,g=b.data.simpleData.pIdKey,j=b.data.key.children;if(!e||e==""||!a)return[];if(k.isArray(a)){var f=
[],i=[];for(c=0,d=a.length;c<d;c++)i[a[c][e]]=a[c];for(c=0,d=a.length;c<d;c++)i[a[c][g]]&&a[c][e]!=a[c][g]?(i[a[c][g]][j]||(i[a[c][g]][j]=[]),i[a[c][g]][j].push(a[c])):f.push(a[c]);return f}else return[a]}},n={bindEvent:function(b){for(var a=0,c=t.length;a<c;a++)t[a].apply(this,arguments)},bindTree:function(b){var a={treeId:b.treeId},b=b.treeObj;b.unbind("click",n.proxy);b.bind("click",a,n.proxy);b.unbind("dblclick",n.proxy);b.bind("dblclick",a,n.proxy);b.unbind("mouseover",n.proxy);b.bind("mouseover",
a,n.proxy);b.unbind("mouseout",n.proxy);b.bind("mouseout",a,n.proxy);b.unbind("mousedown",n.proxy);b.bind("mousedown",a,n.proxy);b.unbind("mouseup",n.proxy);b.bind("mouseup",a,n.proxy);b.unbind("contextmenu",n.proxy);b.bind("contextmenu",a,n.proxy)},doProxy:function(b){for(var a=[],c=0,d=w.length;c<d;c++){var e=w[c].apply(this,arguments);a.push(e);if(e.stop)break}return a},proxy:function(b){var a=h.getSetting(b.data.treeId);if(!k.uCanDo(a,b))return!0;for(var c=n.doProxy(b),d=!0,e=!1,g=0,j=c.length;g<
j;g++){var f=c[g];f.nodeEventCallback&&(e=!0,d=f.nodeEventCallback.apply(f,[b,f.node])&&d);f.treeEventCallback&&(e=!0,d=f.treeEventCallback.apply(f,[b,f.node])&&d)}try{e&&l("input:focus").length==0&&k.noSel(a)}catch(i){}return d}};D=function(b,a){var c=p[b.data.treeId];if(a.open){if(k.apply(c.callback.beforeCollapse,[c.treeId,a],!0)==!1)return!0}else if(k.apply(c.callback.beforeExpand,[c.treeId,a],!0)==!1)return!0;h.getRoot(c).expandTriggerFlag=!0;i.switchNode(c,a);return!0};E=function(b,a){var c=
p[b.data.treeId],d=c.view.autoCancelSelected&&b.ctrlKey&&h.isSelectedNode(c,a)?0:c.view.autoCancelSelected&&b.ctrlKey&&c.view.selectedMulti?2:1;if(k.apply(c.callback.beforeClick,[c.treeId,a,d],!0)==!1)return!0;d===0?i.cancelPreSelectedNode(c,a):i.selectNode(c,a,d===2);c.treeObj.trigger(f.event.CLICK,[b,c.treeId,a,d]);return!0};F=function(b,a){var c=p[b.data.treeId];k.apply(c.callback.beforeMouseDown,[c.treeId,a],!0)&&k.apply(c.callback.onMouseDown,[b,c.treeId,a]);return!0};G=function(b,a){var c=p[b.data.treeId];
k.apply(c.callback.beforeMouseUp,[c.treeId,a],!0)&&k.apply(c.callback.onMouseUp,[b,c.treeId,a]);return!0};H=function(b,a){var c=p[b.data.treeId];k.apply(c.callback.beforeDblClick,[c.treeId,a],!0)&&k.apply(c.callback.onDblClick,[b,c.treeId,a]);return!0};I=function(b,a){var c=p[b.data.treeId];k.apply(c.callback.beforeRightClick,[c.treeId,a],!0)&&k.apply(c.callback.onRightClick,[b,c.treeId,a]);return typeof c.callback.onRightClick!="function"};var k={apply:function(b,a,c){return typeof b=="function"?
b.apply(L,a?a:[]):c},canAsync:function(b,a){var c=b.data.key.children;return b.async.enable&&a&&a.isParent&&!(a.zAsync||a[c]&&a[c].length>0)},clone:function(b){var a;if(b instanceof Array){a=[];for(var c=b.length;c--;)a[c]=arguments.callee(b[c]);return a}else if(typeof b=="function")return b;else if(b instanceof Object){a={};for(c in b)a[c]=arguments.callee(b[c]);return a}else return b},eqs:function(b,a){return b.toLowerCase()===a.toLowerCase()},isArray:function(b){return Object.prototype.toString.apply(b)===
"[object Array]"},getMDom:function(b,a,c){if(!a)return null;for(;a&&a.id!==b.treeId;){for(var d=0,e=c.length;a.tagName&&d<e;d++)if(k.eqs(a.tagName,c[d].tagName)&&a.getAttribute(c[d].attrName)!==null)return a;a=a.parentNode}return null},noSel:function(b){if(h.getRoot(b).noSelection)try{window.getSelection?window.getSelection().removeAllRanges():document.selection.empty()}catch(a){}},uCanDo:function(){return!0}},i={addNodes:function(b,a,c,d){if(!b.data.keep.leaf||!a||a.isParent)if(k.isArray(c)||(c=
[c]),b.data.simpleData.enable&&(c=h.transformTozTreeFormat(b,c)),a){var e=l("#"+a.tId+f.id.SWITCH),g=l("#"+a.tId+f.id.ICON),j=l("#"+a.tId+f.id.UL);if(!a.open)i.replaceSwitchClass(a,e,f.folder.CLOSE),i.replaceIcoClass(a,g,f.folder.CLOSE),a.open=!1,j.css({display:"none"});h.addNodesData(b,a,c);i.createNodes(b,a.level+1,c,a);d||i.expandCollapseParentNode(b,a,!0)}else h.addNodesData(b,h.getRoot(b),c),i.createNodes(b,0,c,null)},appendNodes:function(b,a,c,d,e,g){if(!c)return[];for(var j=[],l=b.data.key.children,
m=b.data.key.name,n=h.getTitleKey(b),p=0,N=c.length;p<N;p++){var o=c[p],u=(d?d:h.getRoot(b))[l].length==c.length&&p==0,r=p==c.length-1;e&&(h.initNode(b,a,o,d,u,r,g),h.addNodeCache(b,o));u=[];o[l]&&o[l].length>0&&(u=i.appendNodes(b,a+1,o[l],o,e,g&&o.open));if(g){var r=i.makeNodeUrl(b,o),s=i.makeNodeFontCss(b,o),t=[],q;for(q in s)t.push(q,":",s[q],";");j.push("<li id='",o.tId,"' class='level",o.level,"' tabindex='0' hidefocus='true' treenode>","<span id='",o.tId,f.id.SWITCH,"' title='' class='",i.makeNodeLineClass(b,
o),"' treeNode",f.id.SWITCH,"></span>");h.getBeforeA(b,o,j);j.push("<a id='",o.tId,f.id.A,"' class='level",o.level,"' treeNode",f.id.A,' onclick="',o.click||"",'" ',r!=null&&r.length>0?"href='"+r+"'":""," target='",i.makeNodeTarget(o),"' style='",t.join(""),"'");k.apply(b.view.showTitle,[b.treeId,o],b.view.showTitle)&&o[n]&&j.push("title='",o[n].replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),"'");j.push(">");h.getInnerBeforeA(b,o,j);r=b.view.nameIsHTML?o[m]:o[m].replace(/&/g,"&amp;").replace(/</g,
"&lt;").replace(/>/g,"&gt;");j.push("<span id='",o.tId,f.id.ICON,"' title='' treeNode",f.id.ICON," class='",i.makeNodeIcoClass(b,o),"' style='",i.makeNodeIcoStyle(b,o),"'></span><span id='",o.tId,f.id.SPAN,"'>",r,"</span>");h.getInnerAfterA(b,o,j);j.push("</a>");h.getAfterA(b,o,j);o.isParent&&o.open&&i.makeUlHtml(b,o,j,u.join(""));j.push("</li>");h.addCreatedNode(b,o)}}return j},appendParentULDom:function(b,a){var c=[],d=l("#"+a.tId),e=l("#"+a.tId+f.id.UL),g=i.appendNodes(b,a.level+1,a[b.data.key.children],
a,!1,!0);i.makeUlHtml(b,a,c,g.join(""));!d.get(0)&&a.parentTId&&(i.appendParentULDom(b,a.getParentNode()),d=l("#"+a.tId));e.get(0)&&e.remove();d.append(c.join(""));i.createNodeCallback(b)},asyncNode:function(b,a,c,d){var e,g;if(a&&!a.isParent)return k.apply(d),!1;else if(a&&a.isAjaxing)return!1;else if(k.apply(b.callback.beforeAsync,[b.treeId,a],!0)==!1)return k.apply(d),!1;if(a)a.isAjaxing=!0,l("#"+a.tId+f.id.ICON).attr({style:"","class":"button ico_loading"});var j=b.async.contentType=="application/json",
h=j?"{":"",m="";for(e=0,g=b.async.autoParam.length;a&&e<g;e++){var n=b.async.autoParam[e].split("="),p=n;n.length>1&&(p=n[1],n=n[0]);j?(m=typeof a[n]=="string"?'"':"",h+='"'+p+('":'+m+a[n]).replace(/'/g,"\\'")+m+","):h+=p+("="+a[n]).replace(/&/g,"%26")+"&"}if(k.isArray(b.async.otherParam))for(e=0,g=b.async.otherParam.length;e<g;e+=2)j?(m=typeof b.async.otherParam[e+1]=="string"?'"':"",h+='"'+b.async.otherParam[e]+('":'+m+b.async.otherParam[e+1]).replace(/'/g,"\\'")+m+","):h+=b.async.otherParam[e]+
("="+b.async.otherParam[e+1]).replace(/&/g,"%26")+"&";else for(var q in b.async.otherParam)j?(m=typeof b.async.otherParam[q]=="string"?'"':"",h+='"'+q+('":'+m+b.async.otherParam[q]).replace(/'/g,"\\'")+m+","):h+=q+("="+b.async.otherParam[q]).replace(/&/g,"%26")+"&";h.length>1&&(h=h.substring(0,h.length-1));j&&(h+="}");l.ajax({contentType:b.async.contentType,type:b.async.type,url:k.apply(b.async.url,[b.treeId,a],b.async.url),data:h,dataType:b.async.dataType,success:function(e){var g=[];try{g=!e||e.length==
0?[]:typeof e=="string"?eval("("+e+")"):e}catch(j){}if(a)a.isAjaxing=null,a.zAsync=!0;i.setNodeLineIcos(b,a);g&&g!=""?(g=k.apply(b.async.dataFilter,[b.treeId,a,g],g),i.addNodes(b,a,g?k.clone(g):[],!!c)):i.addNodes(b,a,[],!!c);b.treeObj.trigger(f.event.ASYNC_SUCCESS,[b.treeId,a,e]);k.apply(d)},error:function(c,d,e){if(a)a.isAjaxing=null;i.setNodeLineIcos(b,a);b.treeObj.trigger(f.event.ASYNC_ERROR,[b.treeId,a,c,d,e])}});return!0},cancelPreSelectedNode:function(b,a){for(var c=h.getRoot(b).curSelectedList,
d=c.length-1;d>=0;d--)if(!a||a===c[d])if(l("#"+c[d].tId+f.id.A).removeClass(f.node.CURSELECTED),i.setNodeName(b,c[d]),a){h.removeSelectedNode(b,a);break}if(!a)h.getRoot(b).curSelectedList=[]},createNodeCallback:function(b){if(b.callback.onNodeCreated||b.view.addDiyDom)for(var a=h.getRoot(b);a.createdNodes.length>0;){var c=a.createdNodes.shift();k.apply(b.view.addDiyDom,[b.treeId,c]);b.callback.onNodeCreated&&b.treeObj.trigger(f.event.NODECREATED,[b.treeId,c])}},createNodes:function(b,a,c,d){if(c&&
c.length!=0){var e=h.getRoot(b),g=b.data.key.children,g=!d||d.open||!!l("#"+d[g][0].tId).get(0);e.createdNodes=[];a=i.appendNodes(b,a,c,d,!0,g);d?(d=l("#"+d.tId+f.id.UL),d.get(0)&&d.append(a.join(""))):b.treeObj.append(a.join(""));i.createNodeCallback(b)}},expandCollapseNode:function(b,a,c,d,e){var g=h.getRoot(b),j=b.data.key.children;if(a){if(g.expandTriggerFlag){var n=e,e=function(){n&&n();a.open?b.treeObj.trigger(f.event.EXPAND,[b.treeId,a]):b.treeObj.trigger(f.event.COLLAPSE,[b.treeId,a])};g.expandTriggerFlag=
!1}if(a.open==c)k.apply(e,[]);else{!a.open&&a.isParent&&(!l("#"+a.tId+f.id.UL).get(0)||a[j]&&a[j].length>0&&!l("#"+a[j][0].tId).get(0))&&i.appendParentULDom(b,a);var c=l("#"+a.tId+f.id.UL),g=l("#"+a.tId+f.id.SWITCH),m=l("#"+a.tId+f.id.ICON);a.isParent?(a.open=!a.open,a.iconOpen&&a.iconClose&&m.attr("style",i.makeNodeIcoStyle(b,a)),a.open?(i.replaceSwitchClass(a,g,f.folder.OPEN),i.replaceIcoClass(a,m,f.folder.OPEN),d==!1||b.view.expandSpeed==""?(c.show(),k.apply(e,[])):a[j]&&a[j].length>0?c.slideDown(b.view.expandSpeed,
e):(c.show(),k.apply(e,[]))):(i.replaceSwitchClass(a,g,f.folder.CLOSE),i.replaceIcoClass(a,m,f.folder.CLOSE),d==!1||b.view.expandSpeed==""||!(a[j]&&a[j].length>0)?(c.hide(),k.apply(e,[])):c.slideUp(b.view.expandSpeed,e))):k.apply(e,[])}}else k.apply(e,[])},expandCollapseParentNode:function(b,a,c,d,e){a&&(a.parentTId?(i.expandCollapseNode(b,a,c,d),a.parentTId&&i.expandCollapseParentNode(b,a.getParentNode(),c,d,e)):i.expandCollapseNode(b,a,c,d,e))},expandCollapseSonNode:function(b,a,c,d,e){var g=h.getRoot(b),
f=b.data.key.children,g=a?a[f]:g[f],f=a?!1:d,k=h.getRoot(b).expandTriggerFlag;h.getRoot(b).expandTriggerFlag=!1;if(g)for(var l=0,n=g.length;l<n;l++)g[l]&&i.expandCollapseSonNode(b,g[l],c,f);h.getRoot(b).expandTriggerFlag=k;i.expandCollapseNode(b,a,c,d,e)},makeNodeFontCss:function(b,a){var c=k.apply(b.view.fontCss,[b.treeId,a],b.view.fontCss);return c&&typeof c!="function"?c:{}},makeNodeIcoClass:function(b,a){var c=["ico"];a.isAjaxing||(c[0]=(a.iconSkin?a.iconSkin+"_":"")+c[0],a.isParent?c.push(a.open?
f.folder.OPEN:f.folder.CLOSE):c.push(f.folder.DOCU));return"button "+c.join("_")},makeNodeIcoStyle:function(b,a){var c=[];if(!a.isAjaxing){var d=a.isParent&&a.iconOpen&&a.iconClose?a.open?a.iconOpen:a.iconClose:a.icon;d&&c.push("background:url(",d,") 0 0 no-repeat;");(b.view.showIcon==!1||!k.apply(b.view.showIcon,[b.treeId,a],!0))&&c.push("width:0px;height:0px;")}return c.join("")},makeNodeLineClass:function(b,a){var c=[];b.view.showLine?a.level==0&&a.isFirstNode&&a.isLastNode?c.push(f.line.ROOT):
a.level==0&&a.isFirstNode?c.push(f.line.ROOTS):a.isLastNode?c.push(f.line.BOTTOM):c.push(f.line.CENTER):c.push(f.line.NOLINE);a.isParent?c.push(a.open?f.folder.OPEN:f.folder.CLOSE):c.push(f.folder.DOCU);return i.makeNodeLineClassEx(a)+c.join("_")},makeNodeLineClassEx:function(b){return"button level"+b.level+" switch "},makeNodeTarget:function(b){return b.target||"_blank"},makeNodeUrl:function(b,a){var c=b.data.key.url;return a[c]?a[c]:null},makeUlHtml:function(b,a,c,d){c.push("<ul id='",a.tId,f.id.UL,
"' class='level",a.level," ",i.makeUlLineClass(b,a),"' style='display:",a.open?"block":"none","'>");c.push(d);c.push("</ul>")},makeUlLineClass:function(b,a){return b.view.showLine&&!a.isLastNode?f.line.LINE:""},removeChildNodes:function(b,a){if(a){var c=b.data.key.children,d=a[c];if(d){for(var e=0,g=d.length;e<g;e++)h.removeNodeCache(b,d[e]);h.removeSelectedNode(b);delete a[c];b.data.keep.parent?l("#"+a.tId+f.id.UL).empty():(a.isParent=!1,a.open=!1,c=l("#"+a.tId+f.id.SWITCH),d=l("#"+a.tId+f.id.ICON),
i.replaceSwitchClass(a,c,f.folder.DOCU),i.replaceIcoClass(a,d,f.folder.DOCU),l("#"+a.tId+f.id.UL).remove())}}},removeNode:function(b,a){var c=h.getRoot(b),d=b.data.key.children,e=a.parentTId?a.getParentNode():c;a.isFirstNode=!1;a.isLastNode=!1;a.getPreNode=function(){return null};a.getNextNode=function(){return null};l("#"+a.tId).remove();h.removeNodeCache(b,a);h.removeSelectedNode(b,a);for(var g=0,j=e[d].length;g<j;g++)if(e[d][g].tId==a.tId){e[d].splice(g,1);break}var k;if(!b.data.keep.parent&&e[d].length<
1)e.isParent=!1,e.open=!1,g=l("#"+e.tId+f.id.UL),j=l("#"+e.tId+f.id.SWITCH),k=l("#"+e.tId+f.id.ICON),i.replaceSwitchClass(e,j,f.folder.DOCU),i.replaceIcoClass(e,k,f.folder.DOCU),g.css("display","none");else if(b.view.showLine&&e[d].length>0){var m=e[d][e[d].length-1];m.isLastNode=!0;m.isFirstNode=e[d].length==1;g=l("#"+m.tId+f.id.UL);j=l("#"+m.tId+f.id.SWITCH);k=l("#"+m.tId+f.id.ICON);e==c?e[d].length==1?i.replaceSwitchClass(m,j,f.line.ROOT):(c=l("#"+e[d][0].tId+f.id.SWITCH),i.replaceSwitchClass(e[d][0],
c,f.line.ROOTS),i.replaceSwitchClass(m,j,f.line.BOTTOM)):i.replaceSwitchClass(m,j,f.line.BOTTOM);g.removeClass(f.line.LINE)}},replaceIcoClass:function(b,a,c){if(a&&!b.isAjaxing&&(b=a.attr("class"),b!=void 0)){b=b.split("_");switch(c){case f.folder.OPEN:case f.folder.CLOSE:case f.folder.DOCU:b[b.length-1]=c}a.attr("class",b.join("_"))}},replaceSwitchClass:function(b,a,c){if(a){var d=a.attr("class");if(d!=void 0){d=d.split("_");switch(c){case f.line.ROOT:case f.line.ROOTS:case f.line.CENTER:case f.line.BOTTOM:case f.line.NOLINE:d[0]=
i.makeNodeLineClassEx(b)+c;break;case f.folder.OPEN:case f.folder.CLOSE:case f.folder.DOCU:d[1]=c}a.attr("class",d.join("_"));c!==f.folder.DOCU?a.removeAttr("disabled"):a.attr("disabled","disabled")}}},selectNode:function(b,a,c){c||i.cancelPreSelectedNode(b);l("#"+a.tId+f.id.A).addClass(f.node.CURSELECTED);h.addSelectedNode(b,a)},setNodeFontCss:function(b,a){var c=l("#"+a.tId+f.id.A),d=i.makeNodeFontCss(b,a);d&&c.css(d)},setNodeLineIcos:function(b,a){if(a){var c=l("#"+a.tId+f.id.SWITCH),d=l("#"+a.tId+
f.id.UL),e=l("#"+a.tId+f.id.ICON),g=i.makeUlLineClass(b,a);g.length==0?d.removeClass(f.line.LINE):d.addClass(g);c.attr("class",i.makeNodeLineClass(b,a));a.isParent?c.removeAttr("disabled"):c.attr("disabled","disabled");e.removeAttr("style");e.attr("style",i.makeNodeIcoStyle(b,a));e.attr("class",i.makeNodeIcoClass(b,a))}},setNodeName:function(b,a){var c=b.data.key.name,d=h.getTitleKey(b),e=l("#"+a.tId+f.id.SPAN);e.empty();b.view.nameIsHTML?e.html(a[c]):e.text(a[c]);k.apply(b.view.showTitle,[b.treeId,
a],b.view.showTitle)&&a[d]&&l("#"+a.tId+f.id.A).attr("title",a[d])},setNodeTarget:function(b){l("#"+b.tId+f.id.A).attr("target",i.makeNodeTarget(b))},setNodeUrl:function(b,a){var c=l("#"+a.tId+f.id.A),d=i.makeNodeUrl(b,a);d==null||d.length==0?c.removeAttr("href"):c.attr("href",d)},switchNode:function(b,a){a.open||!k.canAsync(b,a)?i.expandCollapseNode(b,a,!a.open):b.async.enable?i.asyncNode(b,a)||i.expandCollapseNode(b,a,!a.open):a&&i.expandCollapseNode(b,a,!a.open)}};l.fn.zTree={consts:{event:{NODECREATED:"ztree_nodeCreated",
CLICK:"ztree_click",EXPAND:"ztree_expand",COLLAPSE:"ztree_collapse",ASYNC_SUCCESS:"ztree_async_success",ASYNC_ERROR:"ztree_async_error"},id:{A:"_a",ICON:"_ico",SPAN:"_span",SWITCH:"_switch",UL:"_ul"},line:{ROOT:"root",ROOTS:"roots",CENTER:"center",BOTTOM:"bottom",NOLINE:"noline",LINE:"line"},folder:{OPEN:"open",CLOSE:"close",DOCU:"docu"},node:{CURSELECTED:"curSelectedNode"}},_z:{tools:k,view:i,event:n,data:h},getZTreeObj:function(b){return(b=h.getZTreeTools(b))?b:null},init:function(b,a,c){var d=
k.clone(K);l.extend(!0,d,a);d.treeId=b.attr("id");d.treeObj=b;d.treeObj.empty();p[d.treeId]=d;if(l.browser.msie&&parseInt(l.browser.version)<7)d.view.expandSpeed="";h.initRoot(d);b=h.getRoot(d);a=d.data.key.children;c=c?k.clone(k.isArray(c)?c:[c]):[];b[a]=d.data.simpleData.enable?h.transformTozTreeFormat(d,c):c;h.initCache(d);n.bindTree(d);n.bindEvent(d);c={setting:d,addNodes:function(a,b,c){function f(){i.addNodes(d,a,h,c==!0)}if(!b)return null;a||(a=null);if(a&&!a.isParent&&d.data.keep.leaf)return null;
var h=k.clone(k.isArray(b)?b:[b]);k.canAsync(d,a)?i.asyncNode(d,a,c,f):f();return h},cancelSelectedNode:function(a){i.cancelPreSelectedNode(this.setting,a)},expandAll:function(a){a=!!a;i.expandCollapseSonNode(this.setting,null,a,!0);return a},expandNode:function(a,b,c,f,m){if(!a||!a.isParent)return null;b!==!0&&b!==!1&&(b=!a.open);if((m=!!m)&&b&&k.apply(d.callback.beforeExpand,[d.treeId,a],!0)==!1)return null;else if(m&&!b&&k.apply(d.callback.beforeCollapse,[d.treeId,a],!0)==!1)return null;b&&a.parentTId&&
i.expandCollapseParentNode(this.setting,a.getParentNode(),b,!1);if(b===a.open&&!c)return null;h.getRoot(d).expandTriggerFlag=m;c?i.expandCollapseSonNode(this.setting,a,b,!0,function(){f!==!1&&l("#"+a.tId).focus().blur()}):(a.open=!b,i.switchNode(this.setting,a),f!==!1&&l("#"+a.tId).focus().blur());return b},getNodes:function(){return h.getNodes(this.setting)},getNodeByParam:function(a,b,c){return!a?null:h.getNodeByParam(this.setting,c?c[this.setting.data.key.children]:h.getNodes(this.setting),a,b)},
getNodeByTId:function(a){return h.getNodeCache(this.setting,a)},getNodesByParam:function(a,b,c){return!a?null:h.getNodesByParam(this.setting,c?c[this.setting.data.key.children]:h.getNodes(this.setting),a,b)},getNodesByParamFuzzy:function(a,b,c){return!a?null:h.getNodesByParamFuzzy(this.setting,c?c[this.setting.data.key.children]:h.getNodes(this.setting),a,b)},getNodesByFilter:function(a,b,c){b=!!b;return!a||typeof a!="function"?b?null:[]:h.getNodesByFilter(this.setting,c?c[this.setting.data.key.children]:
h.getNodes(this.setting),a,b)},getNodeIndex:function(a){if(!a)return null;for(var b=d.data.key.children,c=a.parentTId?a.getParentNode():h.getRoot(this.setting),f=0,i=c[b].length;f<i;f++)if(c[b][f]==a)return f;return-1},getSelectedNodes:function(){for(var a=[],b=h.getRoot(this.setting).curSelectedList,c=0,d=b.length;c<d;c++)a.push(b[c]);return a},isSelectedNode:function(a){return h.isSelectedNode(this.setting,a)},reAsyncChildNodes:function(a,b,c){if(this.setting.async.enable){var d=!a;d&&(a=h.getRoot(this.setting));
b=="refresh"&&(a[this.setting.data.key.children]=[],d?this.setting.treeObj.empty():l("#"+a.tId+f.id.UL).empty());i.asyncNode(this.setting,d?null:a,!!c)}},refresh:function(){this.setting.treeObj.empty();var a=h.getRoot(this.setting),b=a[this.setting.data.key.children];h.initRoot(this.setting);a[this.setting.data.key.children]=b;h.initCache(this.setting);i.createNodes(this.setting,0,a[this.setting.data.key.children])},removeChildNodes:function(a){if(!a)return null;var b=a[d.data.key.children];i.removeChildNodes(d,
a);return b?b:null},removeNode:function(a,b){a&&(b=!!b,b&&k.apply(d.callback.beforeRemove,[d.treeId,a],!0)==!1||(i.removeNode(d,a),b&&this.setting.treeObj.trigger(f.event.REMOVE,[d.treeId,a])))},selectNode:function(a,b){a&&k.uCanDo(this.setting)&&(b=d.view.selectedMulti&&b,a.parentTId?i.expandCollapseParentNode(this.setting,a.getParentNode(),!0,!1,function(){l("#"+a.tId).focus().blur()}):l("#"+a.tId).focus().blur(),i.selectNode(this.setting,a,b))},transformTozTreeNodes:function(a){return h.transformTozTreeFormat(this.setting,
a)},transformToArray:function(a){return h.transformToArrayFormat(this.setting,a)},updateNode:function(a){a&&l("#"+a.tId).get(0)&&k.uCanDo(this.setting)&&(i.setNodeName(this.setting,a),i.setNodeTarget(a),i.setNodeUrl(this.setting,a),i.setNodeLineIcos(this.setting,a),i.setNodeFontCss(this.setting,a))}};b.treeTools=c;h.setZTreeTools(d,c);b[a]&&b[a].length>0?i.createNodes(d,0,b[a]):d.async.enable&&d.async.url&&d.async.url!==""&&i.asyncNode(d);return c}};var L=l.fn.zTree,f=L.consts})(jQuery);
/*
* JQuery zTree excheck 3.2
* http://code.google.com/p/jquerytree/
*
* Copyright (c) 2010 Hunter.z (baby666.cn)
*
* Licensed same as jquery - MIT License
* http://www.opensource.org/licenses/mit-license.php
*
* email: hunter.z@263.net
* Date: 2012-05-13
*/
(function($){
//default consts of excheck
var _consts = {
event: {
CHECK: "ztree_check"
},
id: {
CHECK: "_check"
},
checkbox: {
STYLE: "checkbox",
DEFAULT: "chk",
DISABLED: "disable",
FALSE: "false",
TRUE: "true",
FULL: "full",
PART: "part",
FOCUS: "focus"
},
radio: {
STYLE: "radio",
TYPE_ALL: "all",
TYPE_LEVEL: "level"
}
},
//default setting of excheck
_setting = {
check: {
enable: false,
autoCheckTrigger: false,
chkStyle: _consts.checkbox.STYLE,
nocheckInherit: false,
radioType: _consts.radio.TYPE_LEVEL,
chkboxType: {
"Y": "ps",
"N": "ps"
}
},
data: {
key: {
checked: "checked"
}
},
callback: {
beforeCheck:null,
onCheck:null
}
},
//default root of excheck
_initRoot = function (setting) {
var r = data.getRoot(setting);
r.radioCheckedList = [];
},
//default cache of excheck
_initCache = function(treeId) {},
//default bind event of excheck
_bindEvent = function(setting) {
var o = setting.treeObj,
c = consts.event;
o.unbind(c.CHECK);
o.bind(c.CHECK, function (event, treeId, node) {
tools.apply(setting.callback.onCheck, [event, treeId, node]);
});
},
//default event proxy of excheck
_eventProxy = function(e) {
var target = e.target,
setting = data.getSetting(e.data.treeId),
tId = "", node = null,
nodeEventType = "", treeEventType = "",
nodeEventCallback = null, treeEventCallback = null;
if (tools.eqs(e.type, "mouseover")) {
if (setting.check.enable && tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.CHECK) !== null) {
tId = target.parentNode.id;
nodeEventType = "mouseoverCheck";
}
} else if (tools.eqs(e.type, "mouseout")) {
if (setting.check.enable && tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.CHECK) !== null) {
tId = target.parentNode.id;
nodeEventType = "mouseoutCheck";
}
} else if (tools.eqs(e.type, "click")) {
if (setting.check.enable && tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.CHECK) !== null) {
tId = target.parentNode.id;
nodeEventType = "checkNode";
}
}
if (tId.length>0) {
node = data.getNodeCache(setting, tId);
switch (nodeEventType) {
case "checkNode" :
nodeEventCallback = _handler.onCheckNode;
break;
case "mouseoverCheck" :
nodeEventCallback = _handler.onMouseoverCheck;
break;
case "mouseoutCheck" :
nodeEventCallback = _handler.onMouseoutCheck;
break;
}
}
var proxyResult = {
stop: false,
node: node,
nodeEventType: nodeEventType,
nodeEventCallback: nodeEventCallback,
treeEventType: treeEventType,
treeEventCallback: treeEventCallback
};
return proxyResult
},
//default init node of excheck
_initNode = function(setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) {
if (!n) return;
var checkedKey = setting.data.key.checked;
if (typeof n[checkedKey] == "string") n[checkedKey] = tools.eqs(n[checkedKey], "true");
n[checkedKey] = !!n[checkedKey];
n.checkedOld = n[checkedKey];
n.nocheck = !!n.nocheck || (setting.check.nocheckInherit && parentNode && !!parentNode.nocheck);
n.chkDisabled = !!n.chkDisabled || (parentNode && !!parentNode.chkDisabled);
if (typeof n.halfCheck == "string") n.halfCheck = tools.eqs(n.halfCheck, "true");
n.halfCheck = !!n.halfCheck;
n.check_Child_State = -1;
n.check_Focus = false;
n.getCheckStatus = function() {return data.getCheckStatus(setting, n);};
if (isLastNode) {
data.makeChkFlag(setting, parentNode);
}
},
//add dom for check
_beforeA = function(setting, node, html) {
var checkedKey = setting.data.key.checked;
if (setting.check.enable) {
data.makeChkFlag(setting, node);
if (setting.check.chkStyle == consts.radio.STYLE && setting.check.radioType == consts.radio.TYPE_ALL && node[checkedKey] ) {
var r = data.getRoot(setting);
r.radioCheckedList.push(node);
}
html.push("<span ID='", node.tId, consts.id.CHECK, "' class='", view.makeChkClass(setting, node), "' treeNode", consts.id.CHECK, (node.nocheck === true?" style='display:none;'":""),"></span>");
}
},
//update zTreeObj, add method of check
_zTreeTools = function(setting, zTreeTools) {
zTreeTools.checkNode = function(node, checked, checkTypeFlag, callbackFlag) {
var checkedKey = this.setting.data.key.checked;
if (node.chkDisabled === true) return;
if (checked !== true && checked !== false) {
checked = !node[checkedKey];
}
callbackFlag = !!callbackFlag;
if (node[checkedKey] === checked && !checkTypeFlag) {
return;
} else if (callbackFlag && tools.apply(this.setting.callback.beforeCheck, [this.setting.treeId, node], true) == false) {
return;
}
if (tools.uCanDo(this.setting) && this.setting.check.enable && node.nocheck !== true) {
node[checkedKey] = checked;
var checkObj = $("#" + node.tId + consts.id.CHECK);
if (checkTypeFlag || this.setting.check.chkStyle === consts.radio.STYLE) view.checkNodeRelation(this.setting, node);
view.setChkClass(this.setting, checkObj, node);
view.repairParentChkClassWithSelf(this.setting, node);
if (callbackFlag) {
setting.treeObj.trigger(consts.event.CHECK, [setting.treeId, node]);
}
}
}
zTreeTools.checkAllNodes = function(checked) {
view.repairAllChk(this.setting, !!checked);
}
zTreeTools.getCheckedNodes = function(checked) {
var childKey = this.setting.data.key.children;
checked = (checked !== false);
return data.getTreeCheckedNodes(this.setting, data.getRoot(setting)[childKey], checked);
}
zTreeTools.getChangeCheckedNodes = function() {
var childKey = this.setting.data.key.children;
return data.getTreeChangeCheckedNodes(this.setting, data.getRoot(setting)[childKey]);
}
zTreeTools.setChkDisabled = function(node, disabled) {
disabled = !!disabled;
view.repairSonChkDisabled(this.setting, node, disabled);
if (!disabled) view.repairParentChkDisabled(this.setting, node, disabled);
}
var _updateNode = zTreeTools.updateNode;
zTreeTools.updateNode = function(node, checkTypeFlag) {
if (_updateNode) _updateNode.apply(zTreeTools, arguments);
if (!node || !this.setting.check.enable) return;
var nObj = $("#" + node.tId);
if (nObj.get(0) && tools.uCanDo(this.setting)) {
var checkObj = $("#" + node.tId + consts.id.CHECK);
if (checkTypeFlag == true || this.setting.check.chkStyle === consts.radio.STYLE) view.checkNodeRelation(this.setting, node);
view.setChkClass(this.setting, checkObj, node);
view.repairParentChkClassWithSelf(this.setting, node);
}
}
},
//method of operate data
_data = {
getRadioCheckedList: function(setting) {
var checkedList = data.getRoot(setting).radioCheckedList;
for (var i=0, j=checkedList.length; i<j; i++) {
if(!data.getNodeCache(setting, checkedList[i].tId)) {
checkedList.splice(i, 1);
i--; j--;
}
}
return checkedList;
},
getCheckStatus: function(setting, node) {
if (!setting.check.enable || node.nocheck) return null;
var checkedKey = setting.data.key.checked,
r = {
checked: node[checkedKey],
half: node.halfCheck ? node.halfCheck : (setting.check.chkStyle == consts.radio.STYLE ? (node.check_Child_State === 2) : (node[checkedKey] ? (node.check_Child_State > -1 && node.check_Child_State < 2) : (node.check_Child_State > 0)))
};
return r;
},
getTreeCheckedNodes: function(setting, nodes, checked, results) {
if (!nodes) return [];
var childKey = setting.data.key.children,
checkedKey = setting.data.key.checked;
results = !results ? [] : results;
for (var i = 0, l = nodes.length; i < l; i++) {
if (nodes[i].nocheck !== true && nodes[i][checkedKey] == checked) {
results.push(nodes[i]);
}
data.getTreeCheckedNodes(setting, nodes[i][childKey], checked, results);
}
return results;
},
getTreeChangeCheckedNodes: function(setting, nodes, results) {
if (!nodes) return [];
var childKey = setting.data.key.children,
checkedKey = setting.data.key.checked;
results = !results ? [] : results;
for (var i = 0, l = nodes.length; i < l; i++) {
if (nodes[i].nocheck !== true && nodes[i][checkedKey] != nodes[i].checkedOld) {
results.push(nodes[i]);
}
data.getTreeChangeCheckedNodes(setting, nodes[i][childKey], results);
}
return results;
},
makeChkFlag: function(setting, node) {
if (!node) return;
var childKey = setting.data.key.children,
checkedKey = setting.data.key.checked,
chkFlag = -1;
if (node[childKey]) {
var start = false;
for (var i = 0, l = node[childKey].length; i < l; i++) {
var cNode = node[childKey][i];
var tmp = -1;
if (setting.check.chkStyle == consts.radio.STYLE) {
if (cNode.nocheck === true) {
tmp = cNode.check_Child_State;
} else if (cNode.halfCheck === true) {
tmp = 2;
} else if (cNode.nocheck !== true && cNode[checkedKey]) {
tmp = 2;
} else {
tmp = cNode.check_Child_State > 0 ? 2:0;
}
if (tmp == 2) {
chkFlag = 2; break;
} else if (tmp == 0){
chkFlag = 0;
}
} else if (setting.check.chkStyle == consts.checkbox.STYLE) {
if (cNode.nocheck === true) {
tmp = cNode.check_Child_State;
} else if (cNode.halfCheck === true) {
tmp = 1;
} else if (cNode.nocheck !== true && cNode[checkedKey] ) {
tmp = (cNode.check_Child_State === -1 || cNode.check_Child_State === 2) ? 2 : 1;
} else {
tmp = (cNode.check_Child_State > 0) ? 1 : 0;
}
if (tmp === 1) {
chkFlag = 1; break;
} else if (tmp === 2 && start && tmp !== chkFlag) {
chkFlag = 1; break;
} else if (chkFlag === 2 && tmp > -1 && tmp < 2) {
chkFlag = 1; break;
} else if (tmp > -1) {
chkFlag = tmp;
}
if (!start) start = (cNode.nocheck !== true);
}
}
}
node.check_Child_State = chkFlag;
}
},
//method of event proxy
_event = {
},
//method of event handler
_handler = {
onCheckNode: function (event, node) {
if (node.chkDisabled === true) return false;
var setting = data.getSetting(event.data.treeId),
checkedKey = setting.data.key.checked;
if (tools.apply(setting.callback.beforeCheck, [setting.treeId, node], true) == false) return true;
node[checkedKey] = !node[checkedKey];
view.checkNodeRelation(setting, node);
var checkObj = $("#" + node.tId + consts.id.CHECK);
view.setChkClass(setting, checkObj, node);
view.repairParentChkClassWithSelf(setting, node);
setting.treeObj.trigger(consts.event.CHECK, [setting.treeId, node]);
return true;
},
onMouseoverCheck: function(event, node) {
if (node.chkDisabled === true) return false;
var setting = data.getSetting(event.data.treeId),
checkObj = $("#" + node.tId + consts.id.CHECK);
node.check_Focus = true;
view.setChkClass(setting, checkObj, node);
return true;
},
onMouseoutCheck: function(event, node) {
if (node.chkDisabled === true) return false;
var setting = data.getSetting(event.data.treeId),
checkObj = $("#" + node.tId + consts.id.CHECK);
node.check_Focus = false;
view.setChkClass(setting, checkObj, node);
return true;
}
},
//method of tools for zTree
_tools = {
},
//method of operate ztree dom
_view = {
checkNodeRelation: function(setting, node) {
var pNode, i, l,
childKey = setting.data.key.children,
checkedKey = setting.data.key.checked,
r = consts.radio;
if (setting.check.chkStyle == r.STYLE) {
var checkedList = data.getRadioCheckedList(setting);
if (node[checkedKey]) {
if (setting.check.radioType == r.TYPE_ALL) {
for (i = checkedList.length-1; i >= 0; i--) {
pNode = checkedList[i];
pNode[checkedKey] = false;
checkedList.splice(i, 1);
view.setChkClass(setting, $("#" + pNode.tId + consts.id.CHECK), pNode);
if (pNode.parentTId != node.parentTId) {
view.repairParentChkClassWithSelf(setting, pNode);
}
}
checkedList.push(node);
} else {
var parentNode = (node.parentTId) ? node.getParentNode() : data.getRoot(setting);
for (i = 0, l = parentNode[childKey].length; i < l; i++) {
pNode = parentNode[childKey][i];
if (pNode[checkedKey] && pNode != node) {
pNode[checkedKey] = false;
view.setChkClass(setting, $("#" + pNode.tId + consts.id.CHECK), pNode);
}
}
}
} else if (setting.check.radioType == r.TYPE_ALL) {
for (i = 0, l = checkedList.length; i < l; i++) {
if (node == checkedList[i]) {
checkedList.splice(i, 1);
break;
}
}
}
} else {
if (node[checkedKey] && (!node[childKey] || node[childKey].length==0 || setting.check.chkboxType.Y.indexOf("s") > -1)) {
view.setSonNodeCheckBox(setting, node, true);
}
if (!node[checkedKey] && (!node[childKey] || node[childKey].length==0 || setting.check.chkboxType.N.indexOf("s") > -1)) {
view.setSonNodeCheckBox(setting, node, false);
}
if (node[checkedKey] && setting.check.chkboxType.Y.indexOf("p") > -1) {
view.setParentNodeCheckBox(setting, node, true);
}
if (!node[checkedKey] && setting.check.chkboxType.N.indexOf("p") > -1) {
view.setParentNodeCheckBox(setting, node, false);
}
}
},
makeChkClass: function(setting, node) {
var checkedKey = setting.data.key.checked,
c = consts.checkbox, r = consts.radio,
fullStyle = "";
if (node.chkDisabled === true) {
fullStyle = c.DISABLED;
} else if (node.halfCheck) {
fullStyle = c.PART;
} else if (setting.check.chkStyle == r.STYLE) {
fullStyle = (node.check_Child_State < 1)? c.FULL:c.PART;
} else {
fullStyle = node[checkedKey] ? ((node.check_Child_State === 2 || node.check_Child_State === -1) ? c.FULL:c.PART) : ((node.check_Child_State < 1)? c.FULL:c.PART);
}
var chkName = setting.check.chkStyle + "_" + (node[checkedKey] ? c.TRUE : c.FALSE) + "_" + fullStyle;
chkName = (node.check_Focus && node.chkDisabled !== true) ? chkName + "_" + c.FOCUS : chkName;
return "button " + c.DEFAULT + " " + chkName;
},
repairAllChk: function(setting, checked) {
if (setting.check.enable && setting.check.chkStyle === consts.checkbox.STYLE) {
var checkedKey = setting.data.key.checked,
childKey = setting.data.key.children,
root = data.getRoot(setting);
for (var i = 0, l = root[childKey].length; i<l ; i++) {
var node = root[childKey][i];
if (node.nocheck !== true) {
node[checkedKey] = checked;
}
view.setSonNodeCheckBox(setting, node, checked);
}
}
},
repairChkClass: function(setting, node) {
if (!node) return;
data.makeChkFlag(setting, node);
var checkObj = $("#" + node.tId + consts.id.CHECK);
view.setChkClass(setting, checkObj, node);
},
repairParentChkClass: function(setting, node) {
if (!node || !node.parentTId) return;
var pNode = node.getParentNode();
view.repairChkClass(setting, pNode);
view.repairParentChkClass(setting, pNode);
},
repairParentChkClassWithSelf: function(setting, node) {
if (!node) return;
var childKey = setting.data.key.children;
if (node[childKey] && node[childKey].length > 0) {
view.repairParentChkClass(setting, node[childKey][0]);
} else {
view.repairParentChkClass(setting, node);
}
},
repairSonChkDisabled: function(setting, node, chkDisabled) {
if (!node) return;
var childKey = setting.data.key.children;
if (node.chkDisabled != chkDisabled) {
node.chkDisabled = chkDisabled;
if (node.nocheck !== true) view.repairChkClass(setting, node);
}
if (node[childKey]) {
for (var i = 0, l = node[childKey].length; i < l; i++) {
var sNode = node[childKey][i];
view.repairSonChkDisabled(setting, sNode, chkDisabled);
}
}
},
repairParentChkDisabled: function(setting, node, chkDisabled) {
if (!node) return;
if (node.chkDisabled != chkDisabled) {
node.chkDisabled = chkDisabled;
if (node.nocheck !== true) view.repairChkClass(setting, node);
}
view.repairParentChkDisabled(setting, node.getParentNode(), chkDisabled);
},
setChkClass: function(setting, obj, node) {
if (!obj) return;
if (node.nocheck === true) {
obj.hide();
} else {
obj.show();
}
obj.removeClass();
obj.addClass(view.makeChkClass(setting, node));
},
setParentNodeCheckBox: function(setting, node, value, srcNode) {
var childKey = setting.data.key.children,
checkedKey = setting.data.key.checked,
checkObj = $("#" + node.tId + consts.id.CHECK);
if (!srcNode) srcNode = node;
data.makeChkFlag(setting, node);
if (node.nocheck !== true && node.chkDisabled !== true) {
node[checkedKey] = value;
view.setChkClass(setting, checkObj, node);
if (setting.check.autoCheckTrigger && node != srcNode && node.nocheck !== true) {
setting.treeObj.trigger(consts.event.CHECK, [setting.treeId, node]);
}
}
if (node.parentTId) {
var pSign = true;
if (!value) {
var pNodes = node.getParentNode()[childKey];
for (var i = 0, l = pNodes.length; i < l; i++) {
if ((pNodes[i].nocheck !== true && pNodes[i][checkedKey])
|| (pNodes[i].nocheck === true && pNodes[i].check_Child_State > 0)) {
pSign = false;
break;
}
}
}
if (pSign) {
view.setParentNodeCheckBox(setting, node.getParentNode(), value, srcNode);
}
}
},
setSonNodeCheckBox: function(setting, node, value, srcNode) {
if (!node) return;
var childKey = setting.data.key.children,
checkedKey = setting.data.key.checked,
checkObj = $("#" + node.tId + consts.id.CHECK);
if (!srcNode) srcNode = node;
var hasDisable = false;
if (node[childKey]) {
for (var i = 0, l = node[childKey].length; i < l && node.chkDisabled !== true; i++) {
var sNode = node[childKey][i];
view.setSonNodeCheckBox(setting, sNode, value, srcNode);
if (sNode.chkDisabled === true) hasDisable = true;
}
}
if (node != data.getRoot(setting) && node.chkDisabled !== true) {
if (hasDisable && node.nocheck !== true) {
data.makeChkFlag(setting, node);
}
if (node.nocheck !== true) {
node[checkedKey] = value;
if (!hasDisable) node.check_Child_State = (node[childKey] && node[childKey].length > 0) ? (value ? 2 : 0) : -1;
} else {
node.check_Child_State = -1;
}
view.setChkClass(setting, checkObj, node);
if (setting.check.autoCheckTrigger && node != srcNode && node.nocheck !== true) {
setting.treeObj.trigger(consts.event.CHECK, [setting.treeId, node]);
}
}
}
},
_z = {
tools: _tools,
view: _view,
event: _event,
data: _data
};
$.extend(true, $.fn.zTree.consts, _consts);
$.extend(true, $.fn.zTree._z, _z);
var zt = $.fn.zTree,
tools = zt._z.tools,
consts = zt.consts,
view = zt._z.view,
data = zt._z.data,
event = zt._z.event;
data.exSetting(_setting);
data.addInitBind(_bindEvent);
data.addInitCache(_initCache);
data.addInitNode(_initNode);
data.addInitProxy(_eventProxy);
data.addInitRoot(_initRoot);
data.addBeforeA(_beforeA);
data.addZTreeTools(_zTreeTools);
var _createNodes = view.createNodes;
view.createNodes = function(setting, level, nodes, parentNode) {
if (_createNodes) _createNodes.apply(view, arguments);
if (!nodes) return;
view.repairParentChkClassWithSelf(setting, parentNode);
}
var _removeNode = view.removeNode;
view.removeNode = function(setting, node) {
var parentNode = node.getParentNode();
if (_removeNode) _removeNode.apply(view, arguments);
if (!node || !parentNode) return;
view.repairChkClass(setting, parentNode);
view.repairParentChkClass(setting, parentNode);
}
})(jQuery);
\ No newline at end of file
/*
* JQuery zTree excheck 3.2
* http://code.google.com/p/jquerytree/
*
* Copyright (c) 2010 Hunter.z (baby666.cn)
*
* Licensed same as jquery - MIT License
* http://www.opensource.org/licenses/mit-license.php
*
* email: hunter.z@263.net
* Date: 2012-05-13
*/
(function(l){var p,q,r,o={event:{CHECK:"ztree_check"},id:{CHECK:"_check"},checkbox:{STYLE:"checkbox",DEFAULT:"chk",DISABLED:"disable",FALSE:"false",TRUE:"true",FULL:"full",PART:"part",FOCUS:"focus"},radio:{STYLE:"radio",TYPE_ALL:"all",TYPE_LEVEL:"level"}},u={check:{enable:!1,autoCheckTrigger:!1,chkStyle:o.checkbox.STYLE,nocheckInherit:!1,radioType:o.radio.TYPE_LEVEL,chkboxType:{Y:"ps",N:"ps"}},data:{key:{checked:"checked"}},callback:{beforeCheck:null,onCheck:null}};p=function(c,a){if(a.chkDisabled===
!0)return!1;var b=g.getSetting(c.data.treeId),d=b.data.key.checked;if(n.apply(b.callback.beforeCheck,[b.treeId,a],!0)==!1)return!0;a[d]=!a[d];e.checkNodeRelation(b,a);d=l("#"+a.tId+i.id.CHECK);e.setChkClass(b,d,a);e.repairParentChkClassWithSelf(b,a);b.treeObj.trigger(i.event.CHECK,[b.treeId,a]);return!0};q=function(c,a){if(a.chkDisabled===!0)return!1;var b=g.getSetting(c.data.treeId),d=l("#"+a.tId+i.id.CHECK);a.check_Focus=!0;e.setChkClass(b,d,a);return!0};r=function(c,a){if(a.chkDisabled===!0)return!1;
var b=g.getSetting(c.data.treeId),d=l("#"+a.tId+i.id.CHECK);a.check_Focus=!1;e.setChkClass(b,d,a);return!0};l.extend(!0,l.fn.zTree.consts,o);l.extend(!0,l.fn.zTree._z,{tools:{},view:{checkNodeRelation:function(c,a){var b,d,f,j=c.data.key.children,k=c.data.key.checked;b=i.radio;if(c.check.chkStyle==b.STYLE){var h=g.getRadioCheckedList(c);if(a[k])if(c.check.radioType==b.TYPE_ALL){for(d=h.length-1;d>=0;d--)b=h[d],b[k]=!1,h.splice(d,1),e.setChkClass(c,l("#"+b.tId+i.id.CHECK),b),b.parentTId!=a.parentTId&&
e.repairParentChkClassWithSelf(c,b);h.push(a)}else{h=a.parentTId?a.getParentNode():g.getRoot(c);for(d=0,f=h[j].length;d<f;d++)b=h[j][d],b[k]&&b!=a&&(b[k]=!1,e.setChkClass(c,l("#"+b.tId+i.id.CHECK),b))}else if(c.check.radioType==b.TYPE_ALL)for(d=0,f=h.length;d<f;d++)if(a==h[d]){h.splice(d,1);break}}else a[k]&&(!a[j]||a[j].length==0||c.check.chkboxType.Y.indexOf("s")>-1)&&e.setSonNodeCheckBox(c,a,!0),!a[k]&&(!a[j]||a[j].length==0||c.check.chkboxType.N.indexOf("s")>-1)&&e.setSonNodeCheckBox(c,a,!1),
a[k]&&c.check.chkboxType.Y.indexOf("p")>-1&&e.setParentNodeCheckBox(c,a,!0),!a[k]&&c.check.chkboxType.N.indexOf("p")>-1&&e.setParentNodeCheckBox(c,a,!1)},makeChkClass:function(c,a){var b=c.data.key.checked,d=i.checkbox,f=i.radio,j="",j=a.chkDisabled===!0?d.DISABLED:a.halfCheck?d.PART:c.check.chkStyle==f.STYLE?a.check_Child_State<1?d.FULL:d.PART:a[b]?a.check_Child_State===2||a.check_Child_State===-1?d.FULL:d.PART:a.check_Child_State<1?d.FULL:d.PART,b=c.check.chkStyle+"_"+(a[b]?d.TRUE:d.FALSE)+"_"+
j,b=a.check_Focus&&a.chkDisabled!==!0?b+"_"+d.FOCUS:b;return"button "+d.DEFAULT+" "+b},repairAllChk:function(c,a){if(c.check.enable&&c.check.chkStyle===i.checkbox.STYLE)for(var b=c.data.key.checked,d=c.data.key.children,f=g.getRoot(c),j=0,k=f[d].length;j<k;j++){var h=f[d][j];h.nocheck!==!0&&(h[b]=a);e.setSonNodeCheckBox(c,h,a)}},repairChkClass:function(c,a){if(a){g.makeChkFlag(c,a);var b=l("#"+a.tId+i.id.CHECK);e.setChkClass(c,b,a)}},repairParentChkClass:function(c,a){if(a&&a.parentTId){var b=a.getParentNode();
e.repairChkClass(c,b);e.repairParentChkClass(c,b)}},repairParentChkClassWithSelf:function(c,a){if(a){var b=c.data.key.children;a[b]&&a[b].length>0?e.repairParentChkClass(c,a[b][0]):e.repairParentChkClass(c,a)}},repairSonChkDisabled:function(c,a,b){if(a){var d=c.data.key.children;if(a.chkDisabled!=b)a.chkDisabled=b,a.nocheck!==!0&&e.repairChkClass(c,a);if(a[d])for(var f=0,j=a[d].length;f<j;f++)e.repairSonChkDisabled(c,a[d][f],b)}},repairParentChkDisabled:function(c,a,b){if(a){if(a.chkDisabled!=b)a.chkDisabled=
b,a.nocheck!==!0&&e.repairChkClass(c,a);e.repairParentChkDisabled(c,a.getParentNode(),b)}},setChkClass:function(c,a,b){a&&(b.nocheck===!0?a.hide():a.show(),a.removeClass(),a.addClass(e.makeChkClass(c,b)))},setParentNodeCheckBox:function(c,a,b,d){var f=c.data.key.children,j=c.data.key.checked,k=l("#"+a.tId+i.id.CHECK);d||(d=a);g.makeChkFlag(c,a);a.nocheck!==!0&&a.chkDisabled!==!0&&(a[j]=b,e.setChkClass(c,k,a),c.check.autoCheckTrigger&&a!=d&&a.nocheck!==!0&&c.treeObj.trigger(i.event.CHECK,[c.treeId,
a]));if(a.parentTId){k=!0;if(!b)for(var f=a.getParentNode()[f],h=0,m=f.length;h<m;h++)if(f[h].nocheck!==!0&&f[h][j]||f[h].nocheck===!0&&f[h].check_Child_State>0){k=!1;break}k&&e.setParentNodeCheckBox(c,a.getParentNode(),b,d)}},setSonNodeCheckBox:function(c,a,b,d){if(a){var f=c.data.key.children,j=c.data.key.checked,k=l("#"+a.tId+i.id.CHECK);d||(d=a);var h=!1;if(a[f])for(var m=0,n=a[f].length;m<n&&a.chkDisabled!==!0;m++){var o=a[f][m];e.setSonNodeCheckBox(c,o,b,d);o.chkDisabled===!0&&(h=!0)}if(a!=
g.getRoot(c)&&a.chkDisabled!==!0){h&&a.nocheck!==!0&&g.makeChkFlag(c,a);if(a.nocheck!==!0){if(a[j]=b,!h)a.check_Child_State=a[f]&&a[f].length>0?b?2:0:-1}else a.check_Child_State=-1;e.setChkClass(c,k,a);c.check.autoCheckTrigger&&a!=d&&a.nocheck!==!0&&c.treeObj.trigger(i.event.CHECK,[c.treeId,a])}}}},event:{},data:{getRadioCheckedList:function(c){for(var a=g.getRoot(c).radioCheckedList,b=0,d=a.length;b<d;b++)g.getNodeCache(c,a[b].tId)||(a.splice(b,1),b--,d--);return a},getCheckStatus:function(c,a){if(!c.check.enable||
a.nocheck)return null;var b=c.data.key.checked;return{checked:a[b],half:a.halfCheck?a.halfCheck:c.check.chkStyle==i.radio.STYLE?a.check_Child_State===2:a[b]?a.check_Child_State>-1&&a.check_Child_State<2:a.check_Child_State>0}},getTreeCheckedNodes:function(c,a,b,d){if(!a)return[];for(var f=c.data.key.children,j=c.data.key.checked,d=!d?[]:d,e=0,h=a.length;e<h;e++)a[e].nocheck!==!0&&a[e][j]==b&&d.push(a[e]),g.getTreeCheckedNodes(c,a[e][f],b,d);return d},getTreeChangeCheckedNodes:function(c,a,b){if(!a)return[];
for(var d=c.data.key.children,f=c.data.key.checked,b=!b?[]:b,e=0,k=a.length;e<k;e++)a[e].nocheck!==!0&&a[e][f]!=a[e].checkedOld&&b.push(a[e]),g.getTreeChangeCheckedNodes(c,a[e][d],b);return b},makeChkFlag:function(c,a){if(a){var b=c.data.key.children,d=c.data.key.checked,f=-1;if(a[b])for(var e=!1,g=0,h=a[b].length;g<h;g++){var m=a[b][g],l=-1;if(c.check.chkStyle==i.radio.STYLE)if(l=m.nocheck===!0?m.check_Child_State:m.halfCheck===!0?2:m.nocheck!==!0&&m[d]?2:m.check_Child_State>0?2:0,l==2){f=2;break}else l==
0&&(f=0);else if(c.check.chkStyle==i.checkbox.STYLE){l=m.nocheck===!0?m.check_Child_State:m.halfCheck===!0?1:m.nocheck!==!0&&m[d]?m.check_Child_State===-1||m.check_Child_State===2?2:1:m.check_Child_State>0?1:0;if(l===1){f=1;break}else if(l===2&&e&&l!==f){f=1;break}else if(f===2&&l>-1&&l<2){f=1;break}else l>-1&&(f=l);e||(e=m.nocheck!==!0)}}a.check_Child_State=f}}}});var o=l.fn.zTree,n=o._z.tools,i=o.consts,e=o._z.view,g=o._z.data;g.exSetting(u);g.addInitBind(function(c){var a=c.treeObj,b=i.event;a.unbind(b.CHECK);
a.bind(b.CHECK,function(a,b,e){n.apply(c.callback.onCheck,[a,b,e])})});g.addInitCache(function(){});g.addInitNode(function(c,a,b,d,e,j){if(b){a=c.data.key.checked;typeof b[a]=="string"&&(b[a]=n.eqs(b[a],"true"));b[a]=!!b[a];b.checkedOld=b[a];b.nocheck=!!b.nocheck||c.check.nocheckInherit&&d&&!!d.nocheck;b.chkDisabled=!!b.chkDisabled||d&&!!d.chkDisabled;if(typeof b.halfCheck=="string")b.halfCheck=n.eqs(b.halfCheck,"true");b.halfCheck=!!b.halfCheck;b.check_Child_State=-1;b.check_Focus=!1;b.getCheckStatus=
function(){return g.getCheckStatus(c,b)};j&&g.makeChkFlag(c,d)}});g.addInitProxy(function(c){var a=c.target,b=g.getSetting(c.data.treeId),d="",e=null,j="",k=null;if(n.eqs(c.type,"mouseover")){if(b.check.enable&&n.eqs(a.tagName,"span")&&a.getAttribute("treeNode"+i.id.CHECK)!==null)d=a.parentNode.id,j="mouseoverCheck"}else if(n.eqs(c.type,"mouseout")){if(b.check.enable&&n.eqs(a.tagName,"span")&&a.getAttribute("treeNode"+i.id.CHECK)!==null)d=a.parentNode.id,j="mouseoutCheck"}else if(n.eqs(c.type,"click")&&
b.check.enable&&n.eqs(a.tagName,"span")&&a.getAttribute("treeNode"+i.id.CHECK)!==null)d=a.parentNode.id,j="checkNode";if(d.length>0)switch(e=g.getNodeCache(b,d),j){case "checkNode":k=p;break;case "mouseoverCheck":k=q;break;case "mouseoutCheck":k=r}return{stop:!1,node:e,nodeEventType:j,nodeEventCallback:k,treeEventType:"",treeEventCallback:null}});g.addInitRoot(function(c){g.getRoot(c).radioCheckedList=[]});g.addBeforeA(function(c,a,b){var d=c.data.key.checked;c.check.enable&&(g.makeChkFlag(c,a),c.check.chkStyle==
i.radio.STYLE&&c.check.radioType==i.radio.TYPE_ALL&&a[d]&&g.getRoot(c).radioCheckedList.push(a),b.push("<span ID='",a.tId,i.id.CHECK,"' class='",e.makeChkClass(c,a),"' treeNode",i.id.CHECK,a.nocheck===!0?" style='display:none;'":"","></span>"))});g.addZTreeTools(function(c,a){a.checkNode=function(a,b,g,k){var h=this.setting.data.key.checked;if(a.chkDisabled!==!0&&(b!==!0&&b!==!1&&(b=!a[h]),k=!!k,(a[h]!==b||g)&&!(k&&n.apply(this.setting.callback.beforeCheck,[this.setting.treeId,a],!0)==!1)&&n.uCanDo(this.setting)&&
this.setting.check.enable&&a.nocheck!==!0))a[h]=b,b=l("#"+a.tId+i.id.CHECK),(g||this.setting.check.chkStyle===i.radio.STYLE)&&e.checkNodeRelation(this.setting,a),e.setChkClass(this.setting,b,a),e.repairParentChkClassWithSelf(this.setting,a),k&&c.treeObj.trigger(i.event.CHECK,[c.treeId,a])};a.checkAllNodes=function(a){e.repairAllChk(this.setting,!!a)};a.getCheckedNodes=function(a){var b=this.setting.data.key.children;return g.getTreeCheckedNodes(this.setting,g.getRoot(c)[b],a!==!1)};a.getChangeCheckedNodes=
function(){var a=this.setting.data.key.children;return g.getTreeChangeCheckedNodes(this.setting,g.getRoot(c)[a])};a.setChkDisabled=function(a,b){b=!!b;e.repairSonChkDisabled(this.setting,a,b);b||e.repairParentChkDisabled(this.setting,a,b)};var b=a.updateNode;a.updateNode=function(c,f){b&&b.apply(a,arguments);if(c&&this.setting.check.enable&&l("#"+c.tId).get(0)&&n.uCanDo(this.setting)){var g=l("#"+c.tId+i.id.CHECK);(f==!0||this.setting.check.chkStyle===i.radio.STYLE)&&e.checkNodeRelation(this.setting,
c);e.setChkClass(this.setting,g,c);e.repairParentChkClassWithSelf(this.setting,c)}}});var s=e.createNodes;e.createNodes=function(c,a,b,d){s&&s.apply(e,arguments);b&&e.repairParentChkClassWithSelf(c,d)};var t=e.removeNode;e.removeNode=function(c,a){var b=a.getParentNode();t&&t.apply(e,arguments);a&&b&&(e.repairChkClass(c,b),e.repairParentChkClass(c,b))}})(jQuery);
/*
* JQuery zTree exedit 3.2
* http://code.google.com/p/jquerytree/
*
* Copyright (c) 2010 Hunter.z (baby666.cn)
*
* Licensed same as jquery - MIT License
* http://www.opensource.org/licenses/mit-license.php
*
* email: hunter.z@263.net
* Date: 2012-05-13
*/
(function($){
//default consts of exedit
var _consts = {
event: {
DRAG: "ztree_drag",
DROP: "ztree_drop",
REMOVE: "ztree_remove",
RENAME: "ztree_rename"
},
id: {
EDIT: "_edit",
INPUT: "_input",
REMOVE: "_remove"
},
move: {
TYPE_INNER: "inner",
TYPE_PREV: "prev",
TYPE_NEXT: "next"
},
node: {
CURSELECTED_EDIT: "curSelectedNode_Edit",
TMPTARGET_TREE: "tmpTargetzTree",
TMPTARGET_NODE: "tmpTargetNode"
}
},
//default setting of exedit
_setting = {
edit: {
enable: false,
editNameSelectAll: false,
showRemoveBtn: true,
showRenameBtn: true,
removeTitle: "移除节点",
renameTitle: "重命名节点",
drag: {
autoExpandTrigger: false,
isCopy: true,
isMove: true,
prev: true,
next: true,
inner: true,
minMoveSize: 5,
borderMax: 10,
borderMin: -5,
maxShowNodeNum: 5,
autoOpenTime: 500
}
},
view: {
addHoverDom: null,
removeHoverDom: null
},
callback: {
beforeDrag:null,
beforeDragOpen:null,
beforeDrop:null,
beforeEditName:null,
beforeRename:null,
onDrag:null,
onDrop:null,
onRename:null
}
},
//default root of exedit
_initRoot = function (setting) {
var r = data.getRoot(setting);
r.curEditNode = null;
r.curEditInput = null;
r.curHoverNode = null;
r.dragFlag = 0;
r.dragNodeShowBefore = [];
r.dragMaskList = new Array();
r.showHoverDom = true;
},
//default cache of exedit
_initCache = function(treeId) {},
//default bind event of exedit
_bindEvent = function(setting) {
var o = setting.treeObj;
var c = consts.event;
o.unbind(c.RENAME);
o.bind(c.RENAME, function (event, treeId, treeNode) {
tools.apply(setting.callback.onRename, [event, treeId, treeNode]);
});
o.unbind(c.REMOVE);
o.bind(c.REMOVE, function (event, treeId, treeNode) {
tools.apply(setting.callback.onRemove, [event, treeId, treeNode]);
});
o.unbind(c.DRAG);
o.bind(c.DRAG, function (event, srcEvent, treeId, treeNodes) {
tools.apply(setting.callback.onDrag, [srcEvent, treeId, treeNodes]);
});
o.unbind(c.DROP);
o.bind(c.DROP, function (event, srcEvent, treeId, treeNodes, targetNode, moveType, isCopy) {
tools.apply(setting.callback.onDrop, [srcEvent, treeId, treeNodes, targetNode, moveType, isCopy]);
});
},
//default event proxy of exedit
_eventProxy = function(e) {
var target = e.target,
setting = data.getSetting(e.data.treeId),
relatedTarget = e.relatedTarget,
tId = "", node = null,
nodeEventType = "", treeEventType = "",
nodeEventCallback = null, treeEventCallback = null,
tmp = null;
if (tools.eqs(e.type, "mouseover")) {
tmp = tools.getMDom(setting, target, [{tagName:"a", attrName:"treeNode"+consts.id.A}]);
if (tmp) {
tId = tmp.parentNode.id;
nodeEventType = "hoverOverNode";
}
} else if (tools.eqs(e.type, "mouseout")) {
tmp = tools.getMDom(setting, relatedTarget, [{tagName:"a", attrName:"treeNode"+consts.id.A}]);
if (!tmp) {
tId = "remove";
nodeEventType = "hoverOutNode";
}
} else if (tools.eqs(e.type, "mousedown")) {
tmp = tools.getMDom(setting, target, [{tagName:"a", attrName:"treeNode"+consts.id.A}]);
if (tmp) {
tId = tmp.parentNode.id;
nodeEventType = "mousedownNode";
}
}
if (tId.length>0) {
node = data.getNodeCache(setting, tId);
switch (nodeEventType) {
case "mousedownNode" :
nodeEventCallback = _handler.onMousedownNode;
break;
case "hoverOverNode" :
nodeEventCallback = _handler.onHoverOverNode;
break;
case "hoverOutNode" :
nodeEventCallback = _handler.onHoverOutNode;
break;
}
}
var proxyResult = {
stop: false,
node: node,
nodeEventType: nodeEventType,
nodeEventCallback: nodeEventCallback,
treeEventType: treeEventType,
treeEventCallback: treeEventCallback
};
return proxyResult
},
//default init node of exedit
_initNode = function(setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) {
if (!n) return;
n.isHover = false;
n.editNameFlag = false;
},
//update zTreeObj, add method of edit
_zTreeTools = function(setting, zTreeTools) {
zTreeTools.cancelEditName = function(newName) {
var root = data.getRoot(setting),
nameKey = setting.data.key.name,
node = root.curEditNode;
if (!root.curEditNode) return;
view.cancelCurEditNode(setting, newName?newName:node[nameKey]);
}
zTreeTools.copyNode = function(targetNode, node, moveType, isSilent) {
if (!node) return null;
if (targetNode && !targetNode.isParent && setting.data.keep.leaf && moveType === consts.move.TYPE_INNER) return null;
var newNode = tools.clone(node);
if (!targetNode) {
targetNode = null;
moveType = consts.move.TYPE_INNER;
}
if (moveType == consts.move.TYPE_INNER) {
function copyCallback() {
view.addNodes(setting, targetNode, [newNode], isSilent);
}
if (tools.canAsync(setting, targetNode)) {
view.asyncNode(setting, targetNode, isSilent, copyCallback);
} else {
copyCallback();
}
} else {
view.addNodes(setting, targetNode.parentNode, [newNode], isSilent);
view.moveNode(setting, targetNode, newNode, moveType, false, isSilent);
}
return newNode;
}
zTreeTools.editName = function(node) {
if (!node || !node.tId || node !== data.getNodeCache(setting, node.tId)) return;
if (node.parentTId) view.expandCollapseParentNode(setting, node.getParentNode(), true);
view.editNode(setting, node)
}
zTreeTools.moveNode = function(targetNode, node, moveType, isSilent) {
if (!node) return node;
if (targetNode && !targetNode.isParent && setting.data.keep.leaf && moveType === consts.move.TYPE_INNER) {
return null;
} else if (targetNode && ((node.parentTId == targetNode.tId && moveType == consts.move.TYPE_INNER) || $("#" + node.tId).find("#" + targetNode.tId).length > 0)) {
return null;
} else if (!targetNode) {
targetNode = null;
}
function moveCallback() {
view.moveNode(setting, targetNode, node, moveType, false, isSilent);
}
if (tools.canAsync(setting, targetNode)) {
view.asyncNode(setting, targetNode, isSilent, moveCallback);
} else {
moveCallback();
}
return node;
}
zTreeTools.setEditable = function(editable) {
setting.edit.enable = editable;
return this.refresh();
}
},
//method of operate data
_data = {
setSonNodeLevel: function(setting, parentNode, node) {
if (!node) return;
var childKey = setting.data.key.children;
node.level = (parentNode)? parentNode.level + 1 : 0;
if (!node[childKey]) return;
for (var i = 0, l = node[childKey].length; i < l; i++) {
if (node[childKey][i]) data.setSonNodeLevel(setting, node, node[childKey][i]);
}
}
},
//method of event proxy
_event = {
},
//method of event handler
_handler = {
onHoverOverNode: function(event, node) {
var setting = data.getSetting(event.data.treeId),
root = data.getRoot(setting);
if (root.curHoverNode != node) {
_handler.onHoverOutNode(event);
}
root.curHoverNode = node;
view.addHoverDom(setting, node);
},
onHoverOutNode: function(event, node) {
var setting = data.getSetting(event.data.treeId),
root = data.getRoot(setting);
if (root.curHoverNode && !data.isSelectedNode(setting, root.curHoverNode)) {
view.removeTreeDom(setting, root.curHoverNode);
root.curHoverNode = null;
}
},
onMousedownNode: function(eventMouseDown, _node) {
var i,l,
setting = data.getSetting(eventMouseDown.data.treeId),
root = data.getRoot(setting);
//right click can't drag & drop
if (eventMouseDown.button == 2 || !setting.edit.enable || (!setting.edit.drag.isCopy && !setting.edit.drag.isMove)) return true;
//input of edit node name can't drag & drop
var target = eventMouseDown.target,
_nodes = data.getRoot(setting).curSelectedList,
nodes = [];
if (!data.isSelectedNode(setting, _node)) {
nodes = [_node];
} else {
for (i=0, l=_nodes.length; i<l; i++) {
if (_nodes[i].editNameFlag && tools.eqs(target.tagName, "input") && target.getAttribute("treeNode"+consts.id.INPUT) !== null) {
return true;
}
nodes.push(_nodes[i]);
if (nodes[0].parentTId !== _nodes[i].parentTId) {
nodes = [_node];
break;
}
}
}
view.editNodeBlur = true;
view.cancelCurEditNode(setting, null, true);
var doc = $(document), curNode, tmpArrow, tmpTarget,
isOtherTree = false,
targetSetting = setting,
preNode, nextNode,
preTmpTargetNodeId = null,
preTmpMoveType = null,
tmpTargetNodeId = null,
moveType = consts.move.TYPE_INNER,
mouseDownX = eventMouseDown.clientX,
mouseDownY = eventMouseDown.clientY,
startTime = (new Date()).getTime();
if (tools.uCanDo(setting)) {
doc.bind("mousemove", _docMouseMove);
}
function _docMouseMove(event) {
//avoid start drag after click node
if (root.dragFlag == 0 && Math.abs(mouseDownX - event.clientX) < setting.edit.drag.minMoveSize
&& Math.abs(mouseDownY - event.clientY) < setting.edit.drag.minMoveSize) {
return true;
}
var i, l, tmpNode, tmpDom, tmpNodes,
childKey = setting.data.key.children;
tools.noSel(setting);
$("body").css("cursor", "pointer");
if (root.dragFlag == 0) {
if (tools.apply(setting.callback.beforeDrag, [setting.treeId, nodes], true) == false) {
_docMouseUp(event);
return true;
}
for (i=0, l=nodes.length; i<l; i++) {
if (i==0) {
root.dragNodeShowBefore = [];
}
tmpNode = nodes[i];
if (tmpNode.isParent && tmpNode.open) {
view.expandCollapseNode(setting, tmpNode, !tmpNode.open);
root.dragNodeShowBefore[tmpNode.tId] = true;
} else {
root.dragNodeShowBefore[tmpNode.tId] = false;
}
}
root.dragFlag = 1;
root.showHoverDom = false;
tools.showIfameMask(setting, true);
//sort
var isOrder = true, lastIndex = -1;
if (nodes.length>1) {
var pNodes = nodes[0].parentTId ? nodes[0].getParentNode()[childKey] : data.getNodes(setting);
tmpNodes = [];
for (i=0, l=pNodes.length; i<l; i++) {
if (root.dragNodeShowBefore[pNodes[i].tId] !== undefined) {
if (isOrder && lastIndex > -1 && (lastIndex+1) !== i) {
isOrder = false;
}
tmpNodes.push(pNodes[i]);
lastIndex = i;
}
if (nodes.length === tmpNodes.length) {
nodes = tmpNodes;
break;
}
}
}
if (isOrder) {
preNode = nodes[0].getPreNode();
nextNode = nodes[nodes.length-1].getNextNode();
}
//set node in selected
curNode = $("<ul class='zTreeDragUL'></ul>");
for (i=0, l=nodes.length; i<l; i++) {
tmpNode = nodes[i];
tmpNode.editNameFlag = false;
view.selectNode(setting, tmpNode, i>0);
view.removeTreeDom(setting, tmpNode);
tmpDom = $("<li id='"+ tmpNode.tId +"_tmp'></li>");
tmpDom.append($("#" + tmpNode.tId + consts.id.A).clone());
tmpDom.css("padding", "0");
tmpDom.children("#" + tmpNode.tId + consts.id.A).removeClass(consts.node.CURSELECTED);
curNode.append(tmpDom);
if (i == setting.edit.drag.maxShowNodeNum-1) {
tmpDom = $("<li id='"+ tmpNode.tId +"_moretmp'><a> ... </a></li>");
curNode.append(tmpDom);
break;
}
}
curNode.attr("id", nodes[0].tId + consts.id.UL + "_tmp");
curNode.addClass(setting.treeObj.attr("class"));
curNode.appendTo("body");
tmpArrow = $("<span class='tmpzTreeMove_arrow'></span>");
tmpArrow.attr("id", "zTreeMove_arrow_tmp");
tmpArrow.appendTo("body");
setting.treeObj.trigger(consts.event.DRAG, [event, setting.treeId, nodes]);
}
if (root.dragFlag == 1) {
if (tmpTarget && tmpArrow.attr("id") == event.target.id && tmpTargetNodeId && (event.clientX + doc.scrollLeft()+2) > ($("#" + tmpTargetNodeId + consts.id.A, tmpTarget).offset().left)) {
var xT = $("#" + tmpTargetNodeId + consts.id.A, tmpTarget);
event.target = (xT.length > 0) ? xT.get(0) : event.target;
} else if (tmpTarget) {
tmpTarget.removeClass(consts.node.TMPTARGET_TREE);
if (tmpTargetNodeId) $("#" + tmpTargetNodeId + consts.id.A, tmpTarget).removeClass(consts.node.TMPTARGET_NODE + "_" + consts.move.TYPE_PREV)
.removeClass(consts.node.TMPTARGET_NODE + "_" + _consts.move.TYPE_NEXT).removeClass(consts.node.TMPTARGET_NODE + "_" + _consts.move.TYPE_INNER);
}
tmpTarget = null;
tmpTargetNodeId = null;
//judge drag & drop in multi ztree
isOtherTree = false;
targetSetting = setting;
var settings = data.getSettings();
for (var s in settings) {
if (settings[s].treeId && settings[s].edit.enable && settings[s].treeId != setting.treeId
&& (event.target.id == settings[s].treeId || $(event.target).parents("#" + settings[s].treeId).length>0)) {
isOtherTree = true;
targetSetting = settings[s];
}
}
var docScrollTop = doc.scrollTop(),
docScrollLeft = doc.scrollLeft(),
treeOffset = targetSetting.treeObj.offset(),
scrollHeight = targetSetting.treeObj.get(0).scrollHeight,
scrollWidth = targetSetting.treeObj.get(0).scrollWidth,
dTop = (event.clientY + docScrollTop - treeOffset.top),
dBottom = (targetSetting.treeObj.height() + treeOffset.top - event.clientY - docScrollTop),
dLeft = (event.clientX + docScrollLeft - treeOffset.left),
dRight = (targetSetting.treeObj.width() + treeOffset.left - event.clientX - docScrollLeft),
isTop = (dTop < setting.edit.drag.borderMax && dTop > setting.edit.drag.borderMin),
isBottom = (dBottom < setting.edit.drag.borderMax && dBottom > setting.edit.drag.borderMin),
isLeft = (dLeft < setting.edit.drag.borderMax && dLeft > setting.edit.drag.borderMin),
isRight = (dRight < setting.edit.drag.borderMax && dRight > setting.edit.drag.borderMin),
isTreeInner = dTop > setting.edit.drag.borderMin && dBottom > setting.edit.drag.borderMin && dLeft > setting.edit.drag.borderMin && dRight > setting.edit.drag.borderMin,
isTreeTop = (isTop && targetSetting.treeObj.scrollTop() <= 0),
isTreeBottom = (isBottom && (targetSetting.treeObj.scrollTop() + targetSetting.treeObj.height()+10) >= scrollHeight),
isTreeLeft = (isLeft && targetSetting.treeObj.scrollLeft() <= 0),
isTreeRight = (isRight && (targetSetting.treeObj.scrollLeft() + targetSetting.treeObj.width()+10) >= scrollWidth);
if (event.target.id && targetSetting.treeObj.find("#" + event.target.id).length > 0) {
//get node <li> dom
var targetObj = event.target;
while (targetObj && targetObj.tagName && !tools.eqs(targetObj.tagName, "li") && targetObj.id != targetSetting.treeId) {
targetObj = targetObj.parentNode;
}
var canMove = true;
//don't move to self or children of self
for (i=0, l=nodes.length; i<l; i++) {
tmpNode = nodes[i];
if (targetObj.id === tmpNode.tId) {
canMove = false;
break;
} else if ($("#" + tmpNode.tId).find("#" + targetObj.id).length > 0) {
canMove = false;
break;
}
}
if (canMove) {
if (event.target.id &&
(event.target.id == (targetObj.id + consts.id.A) || $(event.target).parents("#" + targetObj.id + consts.id.A).length > 0)) {
tmpTarget = $(targetObj);
tmpTargetNodeId = targetObj.id;
}
}
}
//the mouse must be in zTree
tmpNode = nodes[0];
if (isTreeInner && (event.target.id == targetSetting.treeId || $(event.target).parents("#" + targetSetting.treeId).length>0)) {
//judge mouse move in root of ztree
if (!tmpTarget && (event.target.id == targetSetting.treeId || isTreeTop || isTreeBottom || isTreeLeft || isTreeRight) && (isOtherTree || (!isOtherTree && tmpNode.parentTId))) {
tmpTarget = targetSetting.treeObj;
}
//auto scroll top
if (isTop) {
targetSetting.treeObj.scrollTop(targetSetting.treeObj.scrollTop()-10);
} else if (isBottom) {
targetSetting.treeObj.scrollTop(targetSetting.treeObj.scrollTop()+10);
}
if (isLeft) {
targetSetting.treeObj.scrollLeft(targetSetting.treeObj.scrollLeft()-10);
} else if (isRight) {
targetSetting.treeObj.scrollLeft(targetSetting.treeObj.scrollLeft()+10);
}
//auto scroll left
if (tmpTarget && tmpTarget != targetSetting.treeObj && tmpTarget.offset().left < targetSetting.treeObj.offset().left) {
targetSetting.treeObj.scrollLeft(targetSetting.treeObj.scrollLeft()+ tmpTarget.offset().left - targetSetting.treeObj.offset().left);
}
}
curNode.css({
"top": (event.clientY + docScrollTop + 3) + "px",
"left": (event.clientX + docScrollLeft + 3) + "px"
});
var dX = 0;
var dY = 0;
if (tmpTarget && tmpTarget.attr("id")!=targetSetting.treeId) {
var tmpTargetNode = tmpTargetNodeId == null ? null: data.getNodeCache(targetSetting, tmpTargetNodeId),
isCopy = (event.ctrlKey && setting.edit.drag.isMove && setting.edit.drag.isCopy) || (!setting.edit.drag.isMove && setting.edit.drag.isCopy),
isPrev = !!(preNode && tmpTargetNodeId === preNode.tId),
isNext = !!(nextNode && tmpTargetNodeId === nextNode.tId),
isInner = (tmpNode.parentTId && tmpNode.parentTId == tmpTargetNodeId),
canPrev = (isCopy || !isNext) && tools.apply(targetSetting.edit.drag.prev, [targetSetting.treeId, nodes, tmpTargetNode], !!targetSetting.edit.drag.prev),
canNext = (isCopy || !isPrev) && tools.apply(targetSetting.edit.drag.next, [targetSetting.treeId, nodes, tmpTargetNode], !!targetSetting.edit.drag.next),
canInner = (isCopy || !isInner) && !(targetSetting.data.keep.leaf && !tmpTargetNode.isParent) && tools.apply(targetSetting.edit.drag.inner, [targetSetting.treeId, nodes, tmpTargetNode], !!targetSetting.edit.drag.inner);
if (!canPrev && !canNext && !canInner) {
tmpTarget = null;
tmpTargetNodeId = "";
moveType = consts.move.TYPE_INNER;
tmpArrow.css({
"display":"none"
});
if (window.zTreeMoveTimer) {
clearTimeout(window.zTreeMoveTimer);
window.zTreeMoveTargetNodeTId = null
}
} else {
var tmpTargetA = $("#" + tmpTargetNodeId + consts.id.A, tmpTarget),
tmpNextA = tmpTargetNode.isLastNode ? null : $("#" + tmpTargetNode.getNextNode().tId + consts.id.A, tmpTarget.next()),
tmpTop = tmpTargetA.offset().top,
tmpLeft = tmpTargetA.offset().left,
prevPercent = canPrev ? (canInner ? 0.25 : (canNext ? 0.5 : 1) ) : -1,
nextPercent = canNext ? (canInner ? 0.75 : (canPrev ? 0.5 : 0) ) : -1,
dY_percent = (event.clientY + docScrollTop - tmpTop)/tmpTargetA.height();
if ((prevPercent==1 ||dY_percent<=prevPercent && dY_percent>=-.2) && canPrev) {
dX = 1 - tmpArrow.width();
dY = tmpTop - tmpArrow.height()/2;
moveType = consts.move.TYPE_PREV;
} else if ((nextPercent==0 || dY_percent>=nextPercent && dY_percent<=1.2) && canNext) {
dX = 1 - tmpArrow.width();
dY = (tmpNextA == null || (tmpTargetNode.isParent && tmpTargetNode.open)) ? (tmpTop + tmpTargetA.height() - tmpArrow.height()/2) : (tmpNextA.offset().top - tmpArrow.height()/2);
moveType = consts.move.TYPE_NEXT;
}else {
dX = 5 - tmpArrow.width();
dY = tmpTop;
moveType = consts.move.TYPE_INNER;
}
tmpArrow.css({
"display":"block",
"top": dY + "px",
"left": (tmpLeft + dX) + "px"
});
tmpTargetA.addClass(consts.node.TMPTARGET_NODE + "_" + moveType);
if (preTmpTargetNodeId != tmpTargetNodeId || preTmpMoveType != moveType) {
startTime = (new Date()).getTime();
}
if (tmpTargetNode && tmpTargetNode.isParent && moveType == consts.move.TYPE_INNER) {
var startTimer = true;
if (window.zTreeMoveTimer && window.zTreeMoveTargetNodeTId !== tmpTargetNode.tId) {
clearTimeout(window.zTreeMoveTimer);
window.zTreeMoveTargetNodeTId = null;
} else if (window.zTreeMoveTimer && window.zTreeMoveTargetNodeTId === tmpTargetNode.tId) {
startTimer = false;
}
if (startTimer) {
window.zTreeMoveTimer = setTimeout(function() {
if (moveType != consts.move.TYPE_INNER) return;
if (tmpTargetNode && tmpTargetNode.isParent && !tmpTargetNode.open && (new Date()).getTime() - startTime > targetSetting.edit.drag.autoOpenTime
&& tools.apply(targetSetting.callback.beforeDragOpen, [targetSetting.treeId, tmpTargetNode], true)) {
view.switchNode(targetSetting, tmpTargetNode);
if (targetSetting.edit.drag.autoExpandTrigger) {
targetSetting.treeObj.trigger(consts.event.EXPAND, [targetSetting.treeId, tmpTargetNode]);
}
}
}, targetSetting.edit.drag.autoOpenTime+50);
window.zTreeMoveTargetNodeTId = tmpTargetNode.tId;
}
}
}
} else {
moveType = consts.move.TYPE_INNER;
if (tmpTarget && tools.apply(targetSetting.edit.drag.inner, [targetSetting.treeId, nodes, null], !!targetSetting.edit.drag.inner)) {
tmpTarget.addClass(consts.node.TMPTARGET_TREE);
} else {
tmpTarget = null;
}
tmpArrow.css({
"display":"none"
});
if (window.zTreeMoveTimer) {
clearTimeout(window.zTreeMoveTimer);
window.zTreeMoveTargetNodeTId = null;
}
}
preTmpTargetNodeId = tmpTargetNodeId;
preTmpMoveType = moveType;
}
return false;
}
doc.bind("mouseup", _docMouseUp);
function _docMouseUp(event) {
if (window.zTreeMoveTimer) {
clearTimeout(window.zTreeMoveTimer);
window.zTreeMoveTargetNodeTId = null;
}
preTmpTargetNodeId = null;
preTmpMoveType = null;
doc.unbind("mousemove", _docMouseMove);
doc.unbind("mouseup", _docMouseUp);
doc.unbind("selectstart", _docSelect);
$("body").css("cursor", "auto");
if (tmpTarget) {
tmpTarget.removeClass(consts.node.TMPTARGET_TREE);
if (tmpTargetNodeId) $("#" + tmpTargetNodeId + consts.id.A, tmpTarget).removeClass(consts.node.TMPTARGET_NODE + "_" + consts.move.TYPE_PREV)
.removeClass(consts.node.TMPTARGET_NODE + "_" + _consts.move.TYPE_NEXT).removeClass(consts.node.TMPTARGET_NODE + "_" + _consts.move.TYPE_INNER);
}
tools.showIfameMask(setting, false);
root.showHoverDom = true;
if (root.dragFlag == 0) return;
root.dragFlag = 0;
var i, l, tmpNode;
for (i=0, l=nodes.length; i<l; i++) {
tmpNode = nodes[i];
if (tmpNode.isParent && root.dragNodeShowBefore[tmpNode.tId] && !tmpNode.open) {
view.expandCollapseNode(setting, tmpNode, !tmpNode.open);
delete root.dragNodeShowBefore[tmpNode.tId];
}
}
if (curNode) curNode.remove();
if (tmpArrow) tmpArrow.remove();
var isCopy = (event.ctrlKey && setting.edit.drag.isMove && setting.edit.drag.isCopy) || (!setting.edit.drag.isMove && setting.edit.drag.isCopy);
if (!isCopy && tmpTarget && tmpTargetNodeId && nodes[0].parentTId && tmpTargetNodeId==nodes[0].parentTId && moveType == consts.move.TYPE_INNER) {
tmpTarget = null;
}
if (tmpTarget) {
var dragTargetNode = tmpTargetNodeId == null ? null: data.getNodeCache(targetSetting, tmpTargetNodeId);
if (tools.apply(setting.callback.beforeDrop, [targetSetting.treeId, nodes, dragTargetNode, moveType, isCopy], true) == false) return;
var newNodes = isCopy ? tools.clone(nodes) : nodes;
function dropCallback() {
if (isOtherTree) {
if (!isCopy) {
for(var i=0, l=nodes.length; i<l; i++) {
view.removeNode(setting, nodes[i]);
}
}
if (moveType == consts.move.TYPE_INNER) {
view.addNodes(targetSetting, dragTargetNode, newNodes);
} else {
view.addNodes(targetSetting, dragTargetNode.getParentNode(), newNodes);
if (moveType == consts.move.TYPE_PREV) {
for (i=0, l=newNodes.length; i<l; i++) {
view.moveNode(targetSetting, dragTargetNode, newNodes[i], moveType, false);
}
} else {
for (i=-1, l=newNodes.length-1; i<l; l--) {
view.moveNode(targetSetting, dragTargetNode, newNodes[l], moveType, false);
}
}
}
} else {
if (isCopy && moveType == consts.move.TYPE_INNER) {
view.addNodes(targetSetting, dragTargetNode, newNodes);
} else {
if (isCopy) {
view.addNodes(targetSetting, dragTargetNode.getParentNode(), newNodes);
}
if (moveType == consts.move.TYPE_PREV) {
for (i=0, l=newNodes.length; i<l; i++) {
view.moveNode(targetSetting, dragTargetNode, newNodes[i], moveType, false);
}
} else {
for (i=-1, l=newNodes.length-1; i<l; l--) {
view.moveNode(targetSetting, dragTargetNode, newNodes[l], moveType, false);
}
}
}
}
for (i=0, l=newNodes.length; i<l; i++) {
view.selectNode(targetSetting, newNodes[i], i>0);
}
$("#" + newNodes[0].tId).focus().blur();
}
if (moveType == consts.move.TYPE_INNER && tools.canAsync(targetSetting, dragTargetNode)) {
view.asyncNode(targetSetting, dragTargetNode, false, dropCallback);
} else {
dropCallback();
}
setting.treeObj.trigger(consts.event.DROP, [event, targetSetting.treeId, newNodes, dragTargetNode, moveType, isCopy]);
} else {
for (i=0, l=nodes.length; i<l; i++) {
view.selectNode(targetSetting, nodes[i], i>0);
}
setting.treeObj.trigger(consts.event.DROP, [event, setting.treeId, nodes, null, null, null]);
}
}
doc.bind("selectstart", _docSelect);
function _docSelect() {
return false;
}
//Avoid FireFox's Bug
//If zTree Div CSS set 'overflow', so drag node outside of zTree, and event.target is error.
if(eventMouseDown.preventDefault) {
eventMouseDown.preventDefault();
}
return true;
}
},
//method of tools for zTree
_tools = {
getAbs: function (obj) {
var oRect = obj.getBoundingClientRect();
return [oRect.left,oRect.top]
},
inputFocus: function(inputObj) {
if (inputObj.get(0)) {
inputObj.focus();
tools.setCursorPosition(inputObj.get(0), inputObj.val().length);
}
},
inputSelect: function(inputObj) {
if (inputObj.get(0)) {
inputObj.focus();
inputObj.select();
}
},
setCursorPosition: function(obj, pos){
if(obj.setSelectionRange) {
obj.focus();
obj.setSelectionRange(pos,pos);
} else if (obj.createTextRange) {
var range = obj.createTextRange();
range.collapse(true);
range.moveEnd('character', pos);
range.moveStart('character', pos);
range.select();
}
},
showIfameMask: function(setting, showSign) {
var root = data.getRoot(setting);
//clear full mask
while (root.dragMaskList.length > 0) {
root.dragMaskList[0].remove();
root.dragMaskList.shift();
}
if (showSign) {
//show mask
var iframeList = $("iframe");
for (var i = 0, l = iframeList.length; i < l; i++) {
var obj = iframeList.get(i),
r = tools.getAbs(obj),
dragMask = $("<div id='zTreeMask_" + i + "' class='zTreeMask' style='background-color:yellow;opacity: 0.3;filter: alpha(opacity=30); top:" + r[1] + "px; left:" + r[0] + "px; width:" + obj.offsetWidth + "px; height:" + obj.offsetHeight + "px;'></div>");
dragMask.appendTo("body");
root.dragMaskList.push(dragMask);
}
}
}
},
//method of operate ztree dom
_view = {
addEditBtn: function(setting, node) {
if (node.editNameFlag || $("#" + node.tId + consts.id.EDIT).length > 0) {
return;
}
if (!tools.apply(setting.edit.showRenameBtn, [setting.treeId, node], setting.edit.showRenameBtn)) {
return;
}
var aObj = $("#" + node.tId + consts.id.A),
editStr = "<span class='button edit' id='" + node.tId + consts.id.EDIT + "' title='"+tools.apply(setting.edit.renameTitle, [setting.treeId, node], setting.edit.renameTitle)+"' treeNode"+consts.id.EDIT+" style='display:none;'></span>";
aObj.append(editStr);
$("#" + node.tId + consts.id.EDIT).bind('click',
function() {
if (!tools.uCanDo(setting) || tools.apply(setting.callback.beforeEditName, [setting.treeId, node], true) == false) return false;
view.editNode(setting, node);
return false;
}
).show();
},
addRemoveBtn: function(setting, node) {
if (node.editNameFlag || $("#" + node.tId + consts.id.REMOVE).length > 0) {
return;
}
if (!tools.apply(setting.edit.showRemoveBtn, [setting.treeId, node], setting.edit.showRemoveBtn)) {
return;
}
var aObj = $("#" + node.tId + consts.id.A),
removeStr = "<span class='button remove' id='" + node.tId + consts.id.REMOVE + "' title='"+tools.apply(setting.edit.removeTitle, [setting.treeId, node], setting.edit.removeTitle)+"' treeNode"+consts.id.REMOVE+" style='display:none;'></span>";
aObj.append(removeStr);
$("#" + node.tId + consts.id.REMOVE).bind('click',
function() {
if (!tools.uCanDo(setting) || tools.apply(setting.callback.beforeRemove, [setting.treeId, node], true) == false) return false;
view.removeNode(setting, node);
setting.treeObj.trigger(consts.event.REMOVE, [setting.treeId, node]);
return false;
}
).bind('mousedown',
function(eventMouseDown) {
return true;
}
).show();
},
addHoverDom: function(setting, node) {
if (data.getRoot(setting).showHoverDom) {
node.isHover = true;
if (setting.edit.enable) {
view.addEditBtn(setting, node);
view.addRemoveBtn(setting, node);
}
tools.apply(setting.view.addHoverDom, [setting.treeId, node]);
}
},
cancelCurEditNode: function (setting, forceName) {
var root = data.getRoot(setting),
nameKey = setting.data.key.name,
node = root.curEditNode;
if (node) {
var inputObj = root.curEditInput;
var newName = forceName ? forceName:inputObj.val();
if (!forceName && tools.apply(setting.callback.beforeRename, [setting.treeId, node, newName], true) === false) {
node.editNameFlag = true;
return false;
} else {
node[nameKey] = newName ? newName:inputObj.val();
if (!forceName) {
setting.treeObj.trigger(consts.event.RENAME, [setting.treeId, node]);
}
}
var aObj = $("#" + node.tId + consts.id.A);
aObj.removeClass(consts.node.CURSELECTED_EDIT);
inputObj.unbind();
view.setNodeName(setting, node);
node.editNameFlag = false;
root.curEditNode = null;
root.curEditInput = null;
view.selectNode(setting, node, false);
}
root.noSelection = true;
return true;
},
editNode: function(setting, node) {
var root = data.getRoot(setting);
view.editNodeBlur = false;
if (data.isSelectedNode(setting, node) && root.curEditNode == node && node.editNameFlag) {
setTimeout(function() {tools.inputFocus(root.curEditInput);}, 0);
return;
}
var nameKey = setting.data.key.name;
node.editNameFlag = true;
view.removeTreeDom(setting, node);
view.cancelCurEditNode(setting);
view.selectNode(setting, node, false);
$("#" + node.tId + consts.id.SPAN).html("<input type=text class='rename' id='" + node.tId + consts.id.INPUT + "' treeNode" + consts.id.INPUT + " >");
var inputObj = $("#" + node.tId + consts.id.INPUT);
inputObj.attr("value", node[nameKey]);
if (setting.edit.editNameSelectAll) {
tools.inputSelect(inputObj);
} else {
tools.inputFocus(inputObj);
}
inputObj.bind('blur', function(event) {
if (!view.editNodeBlur) {
view.cancelCurEditNode(setting);
}
}).bind('keydown', function(event) {
if (event.keyCode=="13") {
view.editNodeBlur = true;
view.cancelCurEditNode(setting, null, true);
} else if (event.keyCode=="27") {
view.cancelCurEditNode(setting, node[nameKey]);
}
}).bind('click', function(event) {
return false;
}).bind('dblclick', function(event) {
return false;
});
$("#" + node.tId + consts.id.A).addClass(consts.node.CURSELECTED_EDIT);
root.curEditInput = inputObj;
root.noSelection = false;
root.curEditNode = node;
},
moveNode: function(setting, targetNode, node, moveType, animateFlag, isSilent) {
var root = data.getRoot(setting),
childKey = setting.data.key.children;
if (targetNode == node) return;
if (setting.data.keep.leaf && targetNode && !targetNode.isParent && moveType == consts.move.TYPE_INNER) return;
var oldParentNode = (node.parentTId ? node.getParentNode(): root),
targetNodeIsRoot = (targetNode === null || targetNode == root);
if (targetNodeIsRoot && targetNode === null) targetNode = root;
if (targetNodeIsRoot) moveType = consts.move.TYPE_INNER;
var targetParentNode = (targetNode.parentTId ? targetNode.getParentNode() : root);
if (moveType != consts.move.TYPE_PREV && moveType != consts.move.TYPE_NEXT) {
moveType = consts.move.TYPE_INNER;
}
if (moveType == consts.move.TYPE_INNER) {
if (targetNodeIsRoot) {
//parentTId of root node is null
node.parentTId = null;
} else {
if (!targetNode.isParent) {
targetNode.isParent = true;
targetNode.open = !!targetNode.open;
view.setNodeLineIcos(setting, targetNode);
}
node.parentTId = targetNode.tId;
}
}
//move node Dom
var targetObj, target_ulObj;
if (targetNodeIsRoot) {
targetObj = setting.treeObj;
target_ulObj = targetObj;
} else {
if (!isSilent && moveType == consts.move.TYPE_INNER) {
view.expandCollapseNode(setting, targetNode, true, false);
} else if (!isSilent) {
view.expandCollapseNode(setting, targetNode.getParentNode(), true, false);
}
targetObj = $("#" + targetNode.tId);
target_ulObj = $("#" + targetNode.tId + consts.id.UL);
if (!target_ulObj.get(0)) {
var ulstr = [];
view.makeUlHtml(setting, targetNode, ulstr, '');
targetObj.append(ulstr.join(''));
}
target_ulObj = $("#" + targetNode.tId + consts.id.UL);
}
var nodeDom = $("#" + node.tId);
if (target_ulObj.get(0) && moveType == consts.move.TYPE_INNER) {
target_ulObj.append(nodeDom);
} else if (targetObj.get(0) && moveType == consts.move.TYPE_PREV) {
targetObj.before(nodeDom);
} else if (targetObj.get(0) && moveType == consts.move.TYPE_NEXT) {
targetObj.after(nodeDom);
}
//repair the data after move
var i,l,
tmpSrcIndex = -1,
tmpTargetIndex = 0,
oldNeighbor = null,
newNeighbor = null,
oldLevel = node.level;
if (node.isFirstNode) {
tmpSrcIndex = 0;
if (oldParentNode[childKey].length > 1 ) {
oldNeighbor = oldParentNode[childKey][1];
oldNeighbor.isFirstNode = true;
}
} else if (node.isLastNode) {
tmpSrcIndex = oldParentNode[childKey].length -1;
oldNeighbor = oldParentNode[childKey][tmpSrcIndex - 1];
oldNeighbor.isLastNode = true;
} else {
for (i = 0, l = oldParentNode[childKey].length; i < l; i++) {
if (oldParentNode[childKey][i].tId == node.tId) {
tmpSrcIndex = i;
break;
}
}
}
if (tmpSrcIndex >= 0) {
oldParentNode[childKey].splice(tmpSrcIndex, 1);
}
if (moveType != consts.move.TYPE_INNER) {
for (i = 0, l = targetParentNode[childKey].length; i < l; i++) {
if (targetParentNode[childKey][i].tId == targetNode.tId) tmpTargetIndex = i;
}
}
if (moveType == consts.move.TYPE_INNER) {
if (!targetNode[childKey]) targetNode[childKey] = new Array();
if (targetNode[childKey].length > 0) {
newNeighbor = targetNode[childKey][targetNode[childKey].length - 1];
newNeighbor.isLastNode = false;
}
targetNode[childKey].splice(targetNode[childKey].length, 0, node);
node.isLastNode = true;
node.isFirstNode = (targetNode[childKey].length == 1);
} else if (targetNode.isFirstNode && moveType == consts.move.TYPE_PREV) {
targetParentNode[childKey].splice(tmpTargetIndex, 0, node);
newNeighbor = targetNode;
newNeighbor.isFirstNode = false;
node.parentTId = targetNode.parentTId;
node.isFirstNode = true;
node.isLastNode = false;
} else if (targetNode.isLastNode && moveType == consts.move.TYPE_NEXT) {
targetParentNode[childKey].splice(tmpTargetIndex + 1, 0, node);
newNeighbor = targetNode;
newNeighbor.isLastNode = false;
node.parentTId = targetNode.parentTId;
node.isFirstNode = false;
node.isLastNode = true;
} else {
if (moveType == consts.move.TYPE_PREV) {
targetParentNode[childKey].splice(tmpTargetIndex, 0, node);
} else {
targetParentNode[childKey].splice(tmpTargetIndex + 1, 0, node);
}
node.parentTId = targetNode.parentTId;
node.isFirstNode = false;
node.isLastNode = false;
}
data.fixPIdKeyValue(setting, node);
data.setSonNodeLevel(setting, node.getParentNode(), node);
//repair node what been moved
view.setNodeLineIcos(setting, node);
view.repairNodeLevelClass(setting, node, oldLevel)
//repair node's old parentNode dom
if (!setting.data.keep.parent && oldParentNode[childKey].length < 1) {
//old parentNode has no child nodes
oldParentNode.isParent = false;
oldParentNode.open = false;
var tmp_ulObj = $("#" + oldParentNode.tId + consts.id.UL),
tmp_switchObj = $("#" + oldParentNode.tId + consts.id.SWITCH),
tmp_icoObj = $("#" + oldParentNode.tId + consts.id.ICON);
view.replaceSwitchClass(oldParentNode, tmp_switchObj, consts.folder.DOCU);
view.replaceIcoClass(oldParentNode, tmp_icoObj, consts.folder.DOCU);
tmp_ulObj.css("display", "none");
} else if (oldNeighbor) {
//old neigbor node
view.setNodeLineIcos(setting, oldNeighbor);
}
//new neigbor node
if (newNeighbor) {
view.setNodeLineIcos(setting, newNeighbor);
}
//repair checkbox / radio
if (!!setting.check && setting.check.enable && view.repairChkClass) {
view.repairChkClass(setting, oldParentNode);
view.repairParentChkClassWithSelf(setting, oldParentNode);
if (oldParentNode != node.parent)
view.repairParentChkClassWithSelf(setting, node);
}
//expand parents after move
if (!isSilent) {
view.expandCollapseParentNode(setting, node.getParentNode(), true, animateFlag);
}
},
removeEditBtn: function(node) {
$("#" + node.tId + consts.id.EDIT).unbind().remove();
},
removeRemoveBtn: function(node) {
$("#" + node.tId + consts.id.REMOVE).unbind().remove();
},
removeTreeDom: function(setting, node) {
node.isHover = false;
view.removeEditBtn(node);
view.removeRemoveBtn(node);
tools.apply(setting.view.removeHoverDom, [setting.treeId, node]);
},
repairNodeLevelClass: function(setting, node, oldLevel) {
if (oldLevel === node.level) return;
var liObj = $("#" + node.tId),
aObj = $("#" + node.tId + consts.id.A),
ulObj = $("#" + node.tId + consts.id.UL),
oldClass = "level" + oldLevel,
newClass = "level" + node.level;
liObj.removeClass(oldClass);
liObj.addClass(newClass);
aObj.removeClass(oldClass);
aObj.addClass(newClass);
ulObj.removeClass(oldClass);
ulObj.addClass(newClass);
}
},
_z = {
tools: _tools,
view: _view,
event: event,
data: _data
};
$.extend(true, $.fn.zTree.consts, _consts);
$.extend(true, $.fn.zTree._z, _z);
var zt = $.fn.zTree,
tools = zt._z.tools,
consts = zt.consts,
view = zt._z.view,
data = zt._z.data,
event = zt._z.event;
data.exSetting(_setting);
data.addInitBind(_bindEvent);
data.addInitCache(_initCache);
data.addInitNode(_initNode);
data.addInitProxy(_eventProxy);
data.addInitRoot(_initRoot);
data.addZTreeTools(_zTreeTools);
var _cancelPreSelectedNode = view.cancelPreSelectedNode;
view.cancelPreSelectedNode = function (setting, node) {
var list = data.getRoot(setting).curSelectedList;
for (var i=0, j=list.length; i<j; i++) {
if (!node || node === list[i]) {
view.removeTreeDom(setting, list[i]);
if (node) break;
}
}
if (_cancelPreSelectedNode) _cancelPreSelectedNode.apply(view, arguments);
}
var _createNodes = view.createNodes;
view.createNodes = function(setting, level, nodes, parentNode) {
if (_createNodes) {
_createNodes.apply(view, arguments);
}
if (!nodes) return;
if (view.repairParentChkClassWithSelf) {
view.repairParentChkClassWithSelf(setting, parentNode);
}
}
view.makeNodeUrl = function(setting, node) {
return (node.url && !setting.edit.enable) ? node.url : null;
}
var _removeNode = view.removeNode;
view.removeNode = function(setting, node) {
var root = data.getRoot(setting);
if (root.curEditNode === node) root.curEditNode = null;
if (_removeNode) {
_removeNode.apply(view, arguments);
}
}
var _selectNode = view.selectNode;
view.selectNode = function(setting, node, addFlag) {
var root = data.getRoot(setting);
if (data.isSelectedNode(setting, node) && root.curEditNode == node && node.editNameFlag) {
return false;
}
if (_selectNode) _selectNode.apply(view, arguments);
view.addHoverDom(setting, node);
return true;
}
var _uCanDo = tools.uCanDo;
tools.uCanDo = function(setting, e) {
var root = data.getRoot(setting);
if (e && (tools.eqs(e.type, "mouseover") || tools.eqs(e.type, "mouseout") || tools.eqs(e.type, "mousedown") || tools.eqs(e.type, "mouseup"))) {
return true;
}
return (!root.curEditNode) && (_uCanDo ? _uCanDo.apply(view, arguments) : true);
}
})(jQuery);
\ No newline at end of file
/*
* JQuery zTree exedit 3.2
* http://code.google.com/p/jquerytree/
*
* Copyright (c) 2010 Hunter.z (baby666.cn)
*
* Licensed same as jquery - MIT License
* http://www.opensource.org/licenses/mit-license.php
*
* email: hunter.z@263.net
* Date: 2012-05-13
*/
(function(k){var F={event:{DRAG:"ztree_drag",DROP:"ztree_drop",REMOVE:"ztree_remove",RENAME:"ztree_rename"},id:{EDIT:"_edit",INPUT:"_input",REMOVE:"_remove"},move:{TYPE_INNER:"inner",TYPE_PREV:"prev",TYPE_NEXT:"next"},node:{CURSELECTED_EDIT:"curSelectedNode_Edit",TMPTARGET_TREE:"tmpTargetzTree",TMPTARGET_NODE:"tmpTargetNode"}},E={onHoverOverNode:function(b,a){var c=o.getSetting(b.data.treeId),d=o.getRoot(c);if(d.curHoverNode!=a)E.onHoverOutNode(b);d.curHoverNode=a;f.addHoverDom(c,a)},onHoverOutNode:function(b){var b=
o.getSetting(b.data.treeId),a=o.getRoot(b);if(a.curHoverNode&&!o.isSelectedNode(b,a.curHoverNode))f.removeTreeDom(b,a.curHoverNode),a.curHoverNode=null},onMousedownNode:function(b,a){function c(b){if(z.dragFlag==0&&Math.abs(J-b.clientX)<g.edit.drag.minMoveSize&&Math.abs(K-b.clientY)<g.edit.drag.minMoveSize)return!0;var a,c,e,j,l;l=g.data.key.children;h.noSel(g);k("body").css("cursor","pointer");if(z.dragFlag==0){if(h.apply(g.callback.beforeDrag,[g.treeId,m],!0)==!1)return p(b),!0;for(a=0,c=m.length;a<
c;a++){if(a==0)z.dragNodeShowBefore=[];e=m[a];e.isParent&&e.open?(f.expandCollapseNode(g,e,!e.open),z.dragNodeShowBefore[e.tId]=!0):z.dragNodeShowBefore[e.tId]=!1}z.dragFlag=1;z.showHoverDom=!1;h.showIfameMask(g,!0);e=!0;j=-1;if(m.length>1){var s=m[0].parentTId?m[0].getParentNode()[l]:o.getNodes(g);l=[];for(a=0,c=s.length;a<c;a++)if(z.dragNodeShowBefore[s[a].tId]!==void 0&&(e&&j>-1&&j+1!==a&&(e=!1),l.push(s[a]),j=a),m.length===l.length){m=l;break}}e&&(E=m[0].getPreNode(),N=m[m.length-1].getNextNode());
C=k("<ul class='zTreeDragUL'></ul>");for(a=0,c=m.length;a<c;a++)if(e=m[a],e.editNameFlag=!1,f.selectNode(g,e,a>0),f.removeTreeDom(g,e),j=k("<li id='"+e.tId+"_tmp'></li>"),j.append(k("#"+e.tId+d.id.A).clone()),j.css("padding","0"),j.children("#"+e.tId+d.id.A).removeClass(d.node.CURSELECTED),C.append(j),a==g.edit.drag.maxShowNodeNum-1){j=k("<li id='"+e.tId+"_moretmp'><a> ... </a></li>");C.append(j);break}C.attr("id",m[0].tId+d.id.UL+"_tmp");C.addClass(g.treeObj.attr("class"));C.appendTo("body");t=
k("<span class='tmpzTreeMove_arrow'></span>");t.attr("id","zTreeMove_arrow_tmp");t.appendTo("body");g.treeObj.trigger(d.event.DRAG,[b,g.treeId,m])}if(z.dragFlag==1){r&&t.attr("id")==b.target.id&&u&&b.clientX+y.scrollLeft()+2>k("#"+u+d.id.A,r).offset().left?(e=k("#"+u+d.id.A,r),b.target=e.length>0?e.get(0):b.target):r&&(r.removeClass(d.node.TMPTARGET_TREE),u&&k("#"+u+d.id.A,r).removeClass(d.node.TMPTARGET_NODE+"_"+d.move.TYPE_PREV).removeClass(d.node.TMPTARGET_NODE+"_"+F.move.TYPE_NEXT).removeClass(d.node.TMPTARGET_NODE+
"_"+F.move.TYPE_INNER));u=r=null;w=!1;i=g;e=o.getSettings();for(var B in e)if(e[B].treeId&&e[B].edit.enable&&e[B].treeId!=g.treeId&&(b.target.id==e[B].treeId||k(b.target).parents("#"+e[B].treeId).length>0))w=!0,i=e[B];B=y.scrollTop();j=y.scrollLeft();l=i.treeObj.offset();a=i.treeObj.get(0).scrollHeight;e=i.treeObj.get(0).scrollWidth;c=b.clientY+B-l.top;var q=i.treeObj.height()+l.top-b.clientY-B,n=b.clientX+j-l.left,G=i.treeObj.width()+l.left-b.clientX-j;l=c<g.edit.drag.borderMax&&c>g.edit.drag.borderMin;
var s=q<g.edit.drag.borderMax&&q>g.edit.drag.borderMin,H=n<g.edit.drag.borderMax&&n>g.edit.drag.borderMin,D=G<g.edit.drag.borderMax&&G>g.edit.drag.borderMin,q=c>g.edit.drag.borderMin&&q>g.edit.drag.borderMin&&n>g.edit.drag.borderMin&&G>g.edit.drag.borderMin,n=l&&i.treeObj.scrollTop()<=0,G=s&&i.treeObj.scrollTop()+i.treeObj.height()+10>=a,L=H&&i.treeObj.scrollLeft()<=0,M=D&&i.treeObj.scrollLeft()+i.treeObj.width()+10>=e;if(b.target.id&&i.treeObj.find("#"+b.target.id).length>0){for(var A=b.target;A&&
A.tagName&&!h.eqs(A.tagName,"li")&&A.id!=i.treeId;)A=A.parentNode;var O=!0;for(a=0,c=m.length;a<c;a++)if(e=m[a],A.id===e.tId){O=!1;break}else if(k("#"+e.tId).find("#"+A.id).length>0){O=!1;break}if(O&&b.target.id&&(b.target.id==A.id+d.id.A||k(b.target).parents("#"+A.id+d.id.A).length>0))r=k(A),u=A.id}e=m[0];if(q&&(b.target.id==i.treeId||k(b.target).parents("#"+i.treeId).length>0)){if(!r&&(b.target.id==i.treeId||n||G||L||M)&&(w||!w&&e.parentTId))r=i.treeObj;l?i.treeObj.scrollTop(i.treeObj.scrollTop()-
10):s&&i.treeObj.scrollTop(i.treeObj.scrollTop()+10);H?i.treeObj.scrollLeft(i.treeObj.scrollLeft()-10):D&&i.treeObj.scrollLeft(i.treeObj.scrollLeft()+10);r&&r!=i.treeObj&&r.offset().left<i.treeObj.offset().left&&i.treeObj.scrollLeft(i.treeObj.scrollLeft()+r.offset().left-i.treeObj.offset().left)}C.css({top:b.clientY+B+3+"px",left:b.clientX+j+3+"px"});l=a=0;if(r&&r.attr("id")!=i.treeId){var x=u==null?null:o.getNodeCache(i,u);c=b.ctrlKey&&g.edit.drag.isMove&&g.edit.drag.isCopy||!g.edit.drag.isMove&&
g.edit.drag.isCopy;a=!!(E&&u===E.tId);l=!!(N&&u===N.tId);j=e.parentTId&&e.parentTId==u;e=(c||!l)&&h.apply(i.edit.drag.prev,[i.treeId,m,x],!!i.edit.drag.prev);a=(c||!a)&&h.apply(i.edit.drag.next,[i.treeId,m,x],!!i.edit.drag.next);D=(c||!j)&&!(i.data.keep.leaf&&!x.isParent)&&h.apply(i.edit.drag.inner,[i.treeId,m,x],!!i.edit.drag.inner);if(!e&&!a&&!D){if(r=null,u="",v=d.move.TYPE_INNER,t.css({display:"none"}),window.zTreeMoveTimer)clearTimeout(window.zTreeMoveTimer),window.zTreeMoveTargetNodeTId=null}else{c=
k("#"+u+d.id.A,r);l=x.isLastNode?null:k("#"+x.getNextNode().tId+d.id.A,r.next());s=c.offset().top;j=c.offset().left;H=e?D?0.25:a?0.5:1:-1;D=a?D?0.75:e?0.5:0:-1;b=(b.clientY+B-s)/c.height();(H==1||b<=H&&b>=-0.2)&&e?(a=1-t.width(),l=s-t.height()/2,v=d.move.TYPE_PREV):(D==0||b>=D&&b<=1.2)&&a?(a=1-t.width(),l=l==null||x.isParent&&x.open?s+c.height()-t.height()/2:l.offset().top-t.height()/2,v=d.move.TYPE_NEXT):(a=5-t.width(),l=s,v=d.move.TYPE_INNER);t.css({display:"block",top:l+"px",left:j+a+"px"});c.addClass(d.node.TMPTARGET_NODE+
"_"+v);if(P!=u||Q!=v)I=(new Date).getTime();if(x&&x.isParent&&v==d.move.TYPE_INNER&&(b=!0,window.zTreeMoveTimer&&window.zTreeMoveTargetNodeTId!==x.tId?(clearTimeout(window.zTreeMoveTimer),window.zTreeMoveTargetNodeTId=null):window.zTreeMoveTimer&&window.zTreeMoveTargetNodeTId===x.tId&&(b=!1),b))window.zTreeMoveTimer=setTimeout(function(){v==d.move.TYPE_INNER&&x&&x.isParent&&!x.open&&(new Date).getTime()-I>i.edit.drag.autoOpenTime&&h.apply(i.callback.beforeDragOpen,[i.treeId,x],!0)&&(f.switchNode(i,
x),i.edit.drag.autoExpandTrigger&&i.treeObj.trigger(d.event.EXPAND,[i.treeId,x]))},i.edit.drag.autoOpenTime+50),window.zTreeMoveTargetNodeTId=x.tId}}else if(v=d.move.TYPE_INNER,r&&h.apply(i.edit.drag.inner,[i.treeId,m,null],!!i.edit.drag.inner)?r.addClass(d.node.TMPTARGET_TREE):r=null,t.css({display:"none"}),window.zTreeMoveTimer)clearTimeout(window.zTreeMoveTimer),window.zTreeMoveTargetNodeTId=null;P=u;Q=v}return!1}function p(b){if(window.zTreeMoveTimer)clearTimeout(window.zTreeMoveTimer),window.zTreeMoveTargetNodeTId=
null;Q=P=null;y.unbind("mousemove",c);y.unbind("mouseup",p);y.unbind("selectstart",e);k("body").css("cursor","auto");r&&(r.removeClass(d.node.TMPTARGET_TREE),u&&k("#"+u+d.id.A,r).removeClass(d.node.TMPTARGET_NODE+"_"+d.move.TYPE_PREV).removeClass(d.node.TMPTARGET_NODE+"_"+F.move.TYPE_NEXT).removeClass(d.node.TMPTARGET_NODE+"_"+F.move.TYPE_INNER));h.showIfameMask(g,!1);z.showHoverDom=!0;if(z.dragFlag!=0){z.dragFlag=0;var a,l,j;for(a=0,l=m.length;a<l;a++)j=m[a],j.isParent&&z.dragNodeShowBefore[j.tId]&&
!j.open&&(f.expandCollapseNode(g,j,!j.open),delete z.dragNodeShowBefore[j.tId]);C&&C.remove();t&&t.remove();var q=b.ctrlKey&&g.edit.drag.isMove&&g.edit.drag.isCopy||!g.edit.drag.isMove&&g.edit.drag.isCopy;!q&&r&&u&&m[0].parentTId&&u==m[0].parentTId&&v==d.move.TYPE_INNER&&(r=null);if(r){var n=u==null?null:o.getNodeCache(i,u);if(h.apply(g.callback.beforeDrop,[i.treeId,m,n,v,q],!0)!=!1){var s=q?h.clone(m):m;a=function(){if(w){if(!q)for(var b=0,a=m.length;b<a;b++)f.removeNode(g,m[b]);if(v==d.move.TYPE_INNER)f.addNodes(i,
n,s);else if(f.addNodes(i,n.getParentNode(),s),v==d.move.TYPE_PREV)for(b=0,a=s.length;b<a;b++)f.moveNode(i,n,s[b],v,!1);else for(b=-1,a=s.length-1;b<a;a--)f.moveNode(i,n,s[a],v,!1)}else if(q&&v==d.move.TYPE_INNER)f.addNodes(i,n,s);else if(q&&f.addNodes(i,n.getParentNode(),s),v==d.move.TYPE_PREV)for(b=0,a=s.length;b<a;b++)f.moveNode(i,n,s[b],v,!1);else for(b=-1,a=s.length-1;b<a;a--)f.moveNode(i,n,s[a],v,!1);for(b=0,a=s.length;b<a;b++)f.selectNode(i,s[b],b>0);k("#"+s[0].tId).focus().blur()};v==d.move.TYPE_INNER&&
h.canAsync(i,n)?f.asyncNode(i,n,!1,a):a();g.treeObj.trigger(d.event.DROP,[b,i.treeId,s,n,v,q])}}else{for(a=0,l=m.length;a<l;a++)f.selectNode(i,m[a],a>0);g.treeObj.trigger(d.event.DROP,[b,g.treeId,m,null,null,null])}}}function e(){return!1}var l,j,g=o.getSetting(b.data.treeId),z=o.getRoot(g);if(b.button==2||!g.edit.enable||!g.edit.drag.isCopy&&!g.edit.drag.isMove)return!0;var q=b.target,n=o.getRoot(g).curSelectedList,m=[];if(o.isSelectedNode(g,a))for(l=0,j=n.length;l<j;l++){if(n[l].editNameFlag&&h.eqs(q.tagName,
"input")&&q.getAttribute("treeNode"+d.id.INPUT)!==null)return!0;m.push(n[l]);if(m[0].parentTId!==n[l].parentTId){m=[a];break}}else m=[a];f.editNodeBlur=!0;f.cancelCurEditNode(g,null,!0);var y=k(document),C,t,r,w=!1,i=g,E,N,P=null,Q=null,u=null,v=d.move.TYPE_INNER,J=b.clientX,K=b.clientY,I=(new Date).getTime();h.uCanDo(g)&&y.bind("mousemove",c);y.bind("mouseup",p);y.bind("selectstart",e);b.preventDefault&&b.preventDefault();return!0}},w={tools:{getAbs:function(b){b=b.getBoundingClientRect();return[b.left,
b.top]},inputFocus:function(b){b.get(0)&&(b.focus(),h.setCursorPosition(b.get(0),b.val().length))},inputSelect:function(b){b.get(0)&&(b.focus(),b.select())},setCursorPosition:function(b,a){if(b.setSelectionRange)b.focus(),b.setSelectionRange(a,a);else if(b.createTextRange){var c=b.createTextRange();c.collapse(!0);c.moveEnd("character",a);c.moveStart("character",a);c.select()}},showIfameMask:function(b,a){for(var c=o.getRoot(b);c.dragMaskList.length>0;)c.dragMaskList[0].remove(),c.dragMaskList.shift();
if(a)for(var d=k("iframe"),e=0,f=d.length;e<f;e++){var j=d.get(e),g=h.getAbs(j),j=k("<div id='zTreeMask_"+e+"' class='zTreeMask' style='background-color:yellow;opacity: 0.3;filter: alpha(opacity=30); top:"+g[1]+"px; left:"+g[0]+"px; width:"+j.offsetWidth+"px; height:"+j.offsetHeight+"px;'></div>");j.appendTo("body");c.dragMaskList.push(j)}}},view:{addEditBtn:function(b,a){if(!(a.editNameFlag||k("#"+a.tId+d.id.EDIT).length>0)&&h.apply(b.edit.showRenameBtn,[b.treeId,a],b.edit.showRenameBtn)){var c=
k("#"+a.tId+d.id.A),p="<span class='button edit' id='"+a.tId+d.id.EDIT+"' title='"+h.apply(b.edit.renameTitle,[b.treeId,a],b.edit.renameTitle)+"' treeNode"+d.id.EDIT+" style='display:none;'></span>";c.append(p);k("#"+a.tId+d.id.EDIT).bind("click",function(){if(!h.uCanDo(b)||h.apply(b.callback.beforeEditName,[b.treeId,a],!0)==!1)return!1;f.editNode(b,a);return!1}).show()}},addRemoveBtn:function(b,a){if(!(a.editNameFlag||k("#"+a.tId+d.id.REMOVE).length>0)&&h.apply(b.edit.showRemoveBtn,[b.treeId,a],
b.edit.showRemoveBtn)){var c=k("#"+a.tId+d.id.A),p="<span class='button remove' id='"+a.tId+d.id.REMOVE+"' title='"+h.apply(b.edit.removeTitle,[b.treeId,a],b.edit.removeTitle)+"' treeNode"+d.id.REMOVE+" style='display:none;'></span>";c.append(p);k("#"+a.tId+d.id.REMOVE).bind("click",function(){if(!h.uCanDo(b)||h.apply(b.callback.beforeRemove,[b.treeId,a],!0)==!1)return!1;f.removeNode(b,a);b.treeObj.trigger(d.event.REMOVE,[b.treeId,a]);return!1}).bind("mousedown",function(){return!0}).show()}},addHoverDom:function(b,
a){if(o.getRoot(b).showHoverDom)a.isHover=!0,b.edit.enable&&(f.addEditBtn(b,a),f.addRemoveBtn(b,a)),h.apply(b.view.addHoverDom,[b.treeId,a])},cancelCurEditNode:function(b,a){var c=o.getRoot(b),p=b.data.key.name,e=c.curEditNode;if(e){var l=c.curEditInput,j=a?a:l.val();if(!a&&h.apply(b.callback.beforeRename,[b.treeId,e,j],!0)===!1)return e.editNameFlag=!0,!1;else e[p]=j?j:l.val(),a||b.treeObj.trigger(d.event.RENAME,[b.treeId,e]);k("#"+e.tId+d.id.A).removeClass(d.node.CURSELECTED_EDIT);l.unbind();f.setNodeName(b,
e);e.editNameFlag=!1;c.curEditNode=null;c.curEditInput=null;f.selectNode(b,e,!1)}return c.noSelection=!0},editNode:function(b,a){var c=o.getRoot(b);f.editNodeBlur=!1;if(o.isSelectedNode(b,a)&&c.curEditNode==a&&a.editNameFlag)setTimeout(function(){h.inputFocus(c.curEditInput)},0);else{var p=b.data.key.name;a.editNameFlag=!0;f.removeTreeDom(b,a);f.cancelCurEditNode(b);f.selectNode(b,a,!1);k("#"+a.tId+d.id.SPAN).html("<input type=text class='rename' id='"+a.tId+d.id.INPUT+"' treeNode"+d.id.INPUT+" >");
var e=k("#"+a.tId+d.id.INPUT);e.attr("value",a[p]);b.edit.editNameSelectAll?h.inputSelect(e):h.inputFocus(e);e.bind("blur",function(){f.editNodeBlur||f.cancelCurEditNode(b)}).bind("keydown",function(c){c.keyCode=="13"?(f.editNodeBlur=!0,f.cancelCurEditNode(b,null,!0)):c.keyCode=="27"&&f.cancelCurEditNode(b,a[p])}).bind("click",function(){return!1}).bind("dblclick",function(){return!1});k("#"+a.tId+d.id.A).addClass(d.node.CURSELECTED_EDIT);c.curEditInput=e;c.noSelection=!1;c.curEditNode=a}},moveNode:function(b,
a,c,p,e,l){var j=o.getRoot(b),g=b.data.key.children;if(a!=c&&(!b.data.keep.leaf||!a||a.isParent||p!=d.move.TYPE_INNER)){var h=c.parentTId?c.getParentNode():j,q=a===null||a==j;q&&a===null&&(a=j);if(q)p=d.move.TYPE_INNER;j=a.parentTId?a.getParentNode():j;if(p!=d.move.TYPE_PREV&&p!=d.move.TYPE_NEXT)p=d.move.TYPE_INNER;if(p==d.move.TYPE_INNER)if(q)c.parentTId=null;else{if(!a.isParent)a.isParent=!0,a.open=!!a.open,f.setNodeLineIcos(b,a);c.parentTId=a.tId}var n;q?n=q=b.treeObj:(!l&&p==d.move.TYPE_INNER?
f.expandCollapseNode(b,a,!0,!1):l||f.expandCollapseNode(b,a.getParentNode(),!0,!1),q=k("#"+a.tId),n=k("#"+a.tId+d.id.UL),n.get(0)||(n=[],f.makeUlHtml(b,a,n,""),q.append(n.join(""))),n=k("#"+a.tId+d.id.UL));var m=k("#"+c.tId);n.get(0)&&p==d.move.TYPE_INNER?n.append(m):q.get(0)&&p==d.move.TYPE_PREV?q.before(m):q.get(0)&&p==d.move.TYPE_NEXT&&q.after(m);var y=-1,w=0,t=null,q=null,r=c.level;if(c.isFirstNode){if(y=0,h[g].length>1)t=h[g][1],t.isFirstNode=!0}else if(c.isLastNode)y=h[g].length-1,t=h[g][y-
1],t.isLastNode=!0;else for(n=0,m=h[g].length;n<m;n++)if(h[g][n].tId==c.tId){y=n;break}y>=0&&h[g].splice(y,1);if(p!=d.move.TYPE_INNER)for(n=0,m=j[g].length;n<m;n++)j[g][n].tId==a.tId&&(w=n);if(p==d.move.TYPE_INNER){a[g]||(a[g]=[]);if(a[g].length>0)q=a[g][a[g].length-1],q.isLastNode=!1;a[g].splice(a[g].length,0,c);c.isLastNode=!0;c.isFirstNode=a[g].length==1}else a.isFirstNode&&p==d.move.TYPE_PREV?(j[g].splice(w,0,c),q=a,q.isFirstNode=!1,c.parentTId=a.parentTId,c.isFirstNode=!0,c.isLastNode=!1):a.isLastNode&&
p==d.move.TYPE_NEXT?(j[g].splice(w+1,0,c),q=a,q.isLastNode=!1,c.parentTId=a.parentTId,c.isFirstNode=!1,c.isLastNode=!0):(p==d.move.TYPE_PREV?j[g].splice(w,0,c):j[g].splice(w+1,0,c),c.parentTId=a.parentTId,c.isFirstNode=!1,c.isLastNode=!1);o.fixPIdKeyValue(b,c);o.setSonNodeLevel(b,c.getParentNode(),c);f.setNodeLineIcos(b,c);f.repairNodeLevelClass(b,c,r);!b.data.keep.parent&&h[g].length<1?(h.isParent=!1,h.open=!1,a=k("#"+h.tId+d.id.UL),p=k("#"+h.tId+d.id.SWITCH),g=k("#"+h.tId+d.id.ICON),f.replaceSwitchClass(h,
p,d.folder.DOCU),f.replaceIcoClass(h,g,d.folder.DOCU),a.css("display","none")):t&&f.setNodeLineIcos(b,t);q&&f.setNodeLineIcos(b,q);b.check&&b.check.enable&&f.repairChkClass&&(f.repairChkClass(b,h),f.repairParentChkClassWithSelf(b,h),h!=c.parent&&f.repairParentChkClassWithSelf(b,c));l||f.expandCollapseParentNode(b,c.getParentNode(),!0,e)}},removeEditBtn:function(b){k("#"+b.tId+d.id.EDIT).unbind().remove()},removeRemoveBtn:function(b){k("#"+b.tId+d.id.REMOVE).unbind().remove()},removeTreeDom:function(b,
a){a.isHover=!1;f.removeEditBtn(a);f.removeRemoveBtn(a);h.apply(b.view.removeHoverDom,[b.treeId,a])},repairNodeLevelClass:function(b,a,c){if(c!==a.level){var b=k("#"+a.tId),f=k("#"+a.tId+d.id.A),e=k("#"+a.tId+d.id.UL),c="level"+c,a="level"+a.level;b.removeClass(c);b.addClass(a);f.removeClass(c);f.addClass(a);e.removeClass(c);e.addClass(a)}}},event:w,data:{setSonNodeLevel:function(b,a,c){if(c){var d=b.data.key.children;c.level=a?a.level+1:0;if(c[d])for(var a=0,e=c[d].length;a<e;a++)c[d][a]&&o.setSonNodeLevel(b,
c,c[d][a])}}}};k.extend(!0,k.fn.zTree.consts,F);k.extend(!0,k.fn.zTree._z,w);var w=k.fn.zTree,h=w._z.tools,d=w.consts,f=w._z.view,o=w._z.data,w=w._z.event;o.exSetting({edit:{enable:!1,editNameSelectAll:!1,showRemoveBtn:!0,showRenameBtn:!0,removeTitle:"remove",renameTitle:"rename",drag:{autoExpandTrigger:!1,isCopy:!0,isMove:!0,prev:!0,next:!0,inner:!0,minMoveSize:5,borderMax:10,borderMin:-5,maxShowNodeNum:5,autoOpenTime:500}},view:{addHoverDom:null,removeHoverDom:null},callback:{beforeDrag:null,beforeDragOpen:null,
beforeDrop:null,beforeEditName:null,beforeRename:null,onDrag:null,onDrop:null,onRename:null}});o.addInitBind(function(b){var a=b.treeObj,c=d.event;a.unbind(c.RENAME);a.bind(c.RENAME,function(a,c,d){h.apply(b.callback.onRename,[a,c,d])});a.unbind(c.REMOVE);a.bind(c.REMOVE,function(a,c,d){h.apply(b.callback.onRemove,[a,c,d])});a.unbind(c.DRAG);a.bind(c.DRAG,function(a,c,d,f){h.apply(b.callback.onDrag,[c,d,f])});a.unbind(c.DROP);a.bind(c.DROP,function(a,c,d,f,g,k,o){h.apply(b.callback.onDrop,[c,d,f,
g,k,o])})});o.addInitCache(function(){});o.addInitNode(function(b,a,c){if(c)c.isHover=!1,c.editNameFlag=!1});o.addInitProxy(function(b){var a=b.target,c=o.getSetting(b.data.treeId),f=b.relatedTarget,e="",l=null,j="",g=null,k=null;if(h.eqs(b.type,"mouseover")){if(k=h.getMDom(c,a,[{tagName:"a",attrName:"treeNode"+d.id.A}]))e=k.parentNode.id,j="hoverOverNode"}else if(h.eqs(b.type,"mouseout"))k=h.getMDom(c,f,[{tagName:"a",attrName:"treeNode"+d.id.A}]),k||(e="remove",j="hoverOutNode");else if(h.eqs(b.type,
"mousedown")&&(k=h.getMDom(c,a,[{tagName:"a",attrName:"treeNode"+d.id.A}])))e=k.parentNode.id,j="mousedownNode";if(e.length>0)switch(l=o.getNodeCache(c,e),j){case "mousedownNode":g=E.onMousedownNode;break;case "hoverOverNode":g=E.onHoverOverNode;break;case "hoverOutNode":g=E.onHoverOutNode}return{stop:!1,node:l,nodeEventType:j,nodeEventCallback:g,treeEventType:"",treeEventCallback:null}});o.addInitRoot(function(b){b=o.getRoot(b);b.curEditNode=null;b.curEditInput=null;b.curHoverNode=null;b.dragFlag=
0;b.dragNodeShowBefore=[];b.dragMaskList=[];b.showHoverDom=!0});o.addZTreeTools(function(b,a){a.cancelEditName=function(a){var d=o.getRoot(b),e=b.data.key.name,h=d.curEditNode;d.curEditNode&&f.cancelCurEditNode(b,a?a:h[e])};a.copyNode=function(a,k,e,l){if(!k)return null;if(a&&!a.isParent&&b.data.keep.leaf&&e===d.move.TYPE_INNER)return null;var j=h.clone(k);if(!a)a=null,e=d.move.TYPE_INNER;e==d.move.TYPE_INNER?(k=function(){f.addNodes(b,a,[j],l)},h.canAsync(b,a)?f.asyncNode(b,a,l,k):k()):(f.addNodes(b,
a.parentNode,[j],l),f.moveNode(b,a,j,e,!1,l));return j};a.editName=function(a){a&&a.tId&&a===o.getNodeCache(b,a.tId)&&(a.parentTId&&f.expandCollapseParentNode(b,a.getParentNode(),!0),f.editNode(b,a))};a.moveNode=function(a,p,e,l){function j(){f.moveNode(b,a,p,e,!1,l)}if(!p)return p;if(a&&!a.isParent&&b.data.keep.leaf&&e===d.move.TYPE_INNER)return null;else if(a&&(p.parentTId==a.tId&&e==d.move.TYPE_INNER||k("#"+p.tId).find("#"+a.tId).length>0))return null;else a||(a=null);h.canAsync(b,a)?f.asyncNode(b,
a,l,j):j();return p};a.setEditable=function(a){b.edit.enable=a;return this.refresh()}});var J=f.cancelPreSelectedNode;f.cancelPreSelectedNode=function(b,a){for(var c=o.getRoot(b).curSelectedList,d=0,e=c.length;d<e;d++)if(!a||a===c[d])if(f.removeTreeDom(b,c[d]),a)break;J&&J.apply(f,arguments)};var K=f.createNodes;f.createNodes=function(b,a,c,d){K&&K.apply(f,arguments);c&&f.repairParentChkClassWithSelf&&f.repairParentChkClassWithSelf(b,d)};f.makeNodeUrl=function(b,a){return a.url&&!b.edit.enable?a.url:
null};var I=f.removeNode;f.removeNode=function(b,a){var c=o.getRoot(b);if(c.curEditNode===a)c.curEditNode=null;I&&I.apply(f,arguments)};var L=f.selectNode;f.selectNode=function(b,a,c){var d=o.getRoot(b);if(o.isSelectedNode(b,a)&&d.curEditNode==a&&a.editNameFlag)return!1;L&&L.apply(f,arguments);f.addHoverDom(b,a);return!0};var M=h.uCanDo;h.uCanDo=function(b,a){var c=o.getRoot(b);return a&&(h.eqs(a.type,"mouseover")||h.eqs(a.type,"mouseout")||h.eqs(a.type,"mousedown")||h.eqs(a.type,"mouseup"))?!0:!c.curEditNode&&
(M?M.apply(f,arguments):!0)}})(jQuery);
/*-------------------------------------
zTree Style
version: 3.2
author: Hunter.z
email: hunter.z@263.net
website: http://code.google.com/p/jquerytree/
-------------------------------------*/
.ztree * {
padding: 0;
margin: 0;
font-size: 14px;
font-family: "", Verdana, Arial, Helvetica, AppleGothic, sans-serif;
}
.ztree {
margin: 0;
padding: 5px;
color: #333
}
.ztree li {
padding: 0;
margin: 0;
list-style: none;
line-height: 14px;
text-align: left;
white-space: nowrap;
outline: 0
}
.ztree li ul {
margin: 0;
padding: 0 0 0 18px
}
.ztree li ul.line {
background: url(../../images/authority/line_conn.gif) 0 0 repeat-y;
}
.ztree li a {
padding: 1px 3px 0 0;
margin: 0;
cursor: pointer;
height: 17px;
color: #333;
background-color: transparent;
text-decoration: none;
vertical-align: top;
display: inline-block
}
.ztree li a:hover {
text-decoration: underline
}
.ztree li a.curSelectedNode {
padding-top: 0px;
background-color: #FFE6B0;
color: black;
height: 16px;
border: 1px #FFB951 solid;
opacity: 0.8;
}
.ztree li a.curSelectedNode_Edit {
padding-top: 0px;
background-color: #FFE6B0;
color: black;
height: 16px;
border: 1px #FFB951 solid;
opacity: 0.8;
}
.ztree li a.tmpTargetNode_inner {
padding-top: 0px;
background-color: #316AC5;
color: white;
height: 16px;
border: 1px #316AC5 solid;
opacity: 0.8;
filter: alpha(opacity = 80)
}
.ztree li a.tmpTargetNode_prev {
}
.ztree li a.tmpTargetNode_next {
}
.ztree li a input.rename {
height: 14px;
width: 80px;
padding: 0;
margin: 0;
font-size: 12px;
border: 1px #7EC4CC solid;
*border: 0px
}
.ztree li span {
line-height: 16px;
margin-right: 2px
}
.ztree li span.button {
line-height: 0;
margin: 0;
width: 16px;
height: 16px;
display: inline-block;
vertical-align: middle;
border: 0 none;
cursor: pointer;
outline: none;
background-color: transparent;
background-repeat: no-repeat;
background-attachment: scroll;
/* background-image: url("../../images/authority/zTreeStandard.png"); */
/* *background-image: url("../../images/authority/zTreeStandard.gif") */
}
.ztree li span.button.chk {
width: 13px;
height: 13px;
margin: 0 3px 0 0;
cursor: auto
}
.ztree li span.button.chk.checkbox_false_full {
background-position: 0 0
}
.ztree li span.button.chk.checkbox_false_full_focus {
background-position: 0 -14px
}
.ztree li span.button.chk.checkbox_false_part {
background-position: 0 -28px
}
.ztree li span.button.chk.checkbox_false_part_focus {
background-position: 0 -42px
}
.ztree li span.button.chk.checkbox_false_disable {
background-position: 0 -56px
}
.ztree li span.button.chk.checkbox_true_full {
background-position: -14px 0
}
.ztree li span.button.chk.checkbox_true_full_focus {
background-position: -14px -14px
}
.ztree li span.button.chk.checkbox_true_part {
background-position: -14px -28px
}
.ztree li span.button.chk.checkbox_true_part_focus {
background-position: -14px -42px
}
.ztree li span.button.chk.checkbox_true_disable {
background-position: -14px -56px
}
.ztree li span.button.chk.radio_false_full {
background-position: -28px 0
}
.ztree li span.button.chk.radio_false_full_focus {
background-position: -28px -14px
}
.ztree li span.button.chk.radio_false_part {
background-position: -28px -28px
}
.ztree li span.button.chk.radio_false_part_focus {
background-position: -28px -42px
}
.ztree li span.button.chk.radio_false_disable {
background-position: -28px -56px
}
.ztree li span.button.chk.radio_true_full {
background-position: -42px 0
}
.ztree li span.button.chk.radio_true_full_focus {
background-position: -42px -14px
}
.ztree li span.button.chk.radio_true_part {
background-position: -42px -28px
}
.ztree li span.button.chk.radio_true_part_focus {
background-position: -42px -42px
}
.ztree li span.button.chk.radio_true_disable {
background-position: -42px -56px
}
.ztree li span.button.switch {
width: 18px;
height: 18px
}
.ztree li span.button.root_open {
background-position: -92px -54px
}
.ztree li span.button.root_close {
background-position: -74px -54px
}
.ztree li span.button.roots_open {
background-position: -92px 0
}
.ztree li span.button.roots_close {
background-position: -74px 0
}
.ztree li span.button.center_open {
background-position: -92px -18px
}
.ztree li span.button.center_close {
background-position: -74px -18px
}
.ztree li span.button.bottom_open {
background-position: -92px -36px
}
.ztree li span.button.bottom_close {
background-position: -74px -36px
}
.ztree li span.button.noline_open {
background-position: -92px -72px
}
.ztree li span.button.noline_close {
background-position: -74px -72px
}
.ztree li span.button.root_docu {
background: none;
}
.ztree li span.button.roots_docu {
background-position: -56px 0
}
.ztree li span.button.center_docu {
background-position: -56px -18px
}
.ztree li span.button.bottom_docu {
background-position: -56px -36px
}
.ztree li span.button.noline_docu {
background: none;
}
.ztree li span.button.ico_open {
margin-right: 2px;
background-position: -110px -16px;
vertical-align: top;
*vertical-align: middle
}
.ztree li span.button.ico_close {
margin-right: 2px;
background-position: -110px 0;
vertical-align: top;
*vertical-align: middle
}
.ztree li span.button.ico_docu {
margin-right: 2px;
background-position: -110px -32px;
vertical-align: top;
*vertical-align: middle
}
.ztree li span.button.edit {
margin-right: 2px;
background-position: -110px -48px;
vertical-align: top;
*vertical-align: middle
}
.ztree li span.button.remove {
margin-right: 2px;
background-position: -110px -64px;
vertical-align: top;
*vertical-align: middle
}
.ztree li span.button.ico_loading {
margin-right: 2px;
background: url(../../images/authority/loading.gif) no-repeat scroll 0 0
transparent;
vertical-align: top;
*vertical-align: middle
}
ul.tmpTargetzTree {
background-color: #FFE6B0;
opacity: 0.8;
filter: alpha(opacity = 80)
}
span.tmpzTreeMove_arrow {
width: 16px;
height: 16px;
display: inline-block;
padding: 0;
margin: 2px 0 0 1px;
border: 0 none;
position: absolute;
background-color: transparent;
background-repeat: no-repeat;
background-attachment: scroll;
background-position: -110px -80px;
background-image: url("../../images/authority/zTreeStandard.png");
*background-image: url("../../images/authority/zTreeStandard.gif")
}
ul.ztree.zTreeDragUL {
margin: 0;
padding: 0;
position: absolute;
width: auto;
height: auto;
overflow: hidden;
background-color: #cfcfcf;
border: 1px #00B83F dotted;
opacity: 0.8;
filter: alpha(opacity = 80)
}
.zTreeMask {
z-index: 10000;
background-color: #cfcfcf;
opacity: 0.0;
filter: alpha(opacity = 0);
position: absolute
}
\ No newline at end of file
@charset "UTF-8";
#container {
width: 96%;
margin: 0 auto;
overflow: hidden;
}
#nav_links {
width: 100%;
height: 58px;
line-height: 70px;
color: #8A8A8A;
font-size: 14px;
border-bottom: 1px solid #EDEDED;
}
#page_close{
display: inline-block; float: right;
height: 20px;
line-height: 0px;
margin-top: 26px;
}
#ui_isFlag a:link,#ui_isFlag a:visited,#ui_isFlag a:hover,#ui_isFlag a:active
{
list-style: none;
text-decoration: none;
color: #8A8A8A;
}
#ui_isFlag a:hover {
list-style: none;
text-decoration: underline;
color: #8A8A8A;
}
.ui_content {
margin-top: 5px;
overflow: auto;
clear: both;
}
.ui_op_w500 {
margin: 5px auto;
width: 500px;
border: 1px solid #8A8A8A;
}
.ui_op_w800 {
margin: 5px auto;
width: 800px;
border: 1px solid #8A8A8A;
}
.ui_nav_head {
height: 30px;
line-height: 30px;
text-align: center;
background: #044599;
color: #FFF;
margin-bottom: 10px;
font-size: 16px;
}
.ui_tb {
overflow: visible;
margin-bottom: 15px;
}
.ui_tb_h680 {
height: 680px;
overflow: auto;
}
.ui_tb_h530 {
height: 530px;
overflow: auto;
}
.ui_tb_h460 {
height: 460px;
overflow: auto;
}
.ui_tb_h300 {
height: 300px;
overflow: auto;
}
.ui_tb_h150 {
height: 150px;
overflow: auto;
}
.ui_tb_h80 {
height: 80px;
overflow: auto;
}
.ui_tb_h30 {
height: 30px;
overflow: auto;
}
#box_border {
border: 1px solid #EDEDED;
}
#box_top {
height: 37px;
line-height: 37px;
color: #fff;
background: #044599;
padding-left: 20px;
}
#box_center {
height: 50px;
line-height: 50px;
border-bottom: 1px solid #EDEDED;
}
#box_bottom {
height: 40px;
line-height: 40px;
text-align: right;
}
\ No newline at end of file
@charset "UTF-8";
body {
margin: 0;
font: normal 15px "Microsoft YaHei";
color: #0C0C0C;
font-size: 14px;
line-height: 20px;
}
html {
height: 100%;
margin: 0;
padding: 0;
}
body {
height: 100%;
margin: 0;
padding: 0;
font-family: "Microsoft Yahei"
}
html,body,div,h1,ul,li,select,p,iframe,input,textarea {
margin: 0;
padding: 0;
}
a:link,a:visited,a:hover,a:active {
list-style: none;
text-decoration: none;
color: #909090;
}
a:hover {
list-style: none;
text-decoration: underline;
color: #1A5CC6;
}
.table {
padding: 0;
margin: 0;
position: relative;
margin: 0 auto;
}
.table tbody tr th {
background: #044599 no-repeat;
text-align: center;
border-left: 1px solid #02397F;
border-right: 1px solid #02397F;
border-bottom: 1px solid #02397F;
border-top: 1px solid #02397F;
letter-spacing: 2px;
text-transform: uppercase;
font-size: 14px;
color: #fff;
height: 37px;
}
.table tbody tr td {
text-align: center;
border-left: 1px solid #ECECEC;
border-right: 1px solid #ECECEC;
border-bottom: 1px solid #ECECEC;
font-size: 15px;
color: #909090;
height: 37px;
}
.ui_text_indent {
text-indent: 5px;
clear: both;
}
.ui_text_ct {
text-align: center;
}
.ui_text_lt {
text-align: left;
}
.ui_text_rt {
text-align: right;
}
.ui_flt {
float: left;
}
.ui_frt {
float: right;
}
.ui_area01 {
width: 300px;
height: 50px;
margin: 2px 2px 2px 5px;
outline: 0;
padding: 5px;
border: 1px solid;
border-color: #C0C0C0 #D9D9D9 #D9D9D9;
border-radius: 2px;
background: #FFF;
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0
rgba(255, 255, 255, 0.2);
-webkit-transition: box-shadow, border-color .5s ease-in-out;
-moz-transition: box-shadow, border-color .5s ease-in-out;
-o-transition: box-shadow, border-color .5s ease-in-out;
}
.ui_select01 {
width: 120px;
height: 30px;
margin: 2px 2px 2px 5px;
}
.ui_select02 {
width: 80px;
height: 30px;
margin: 2px 2px 2px 5px;
}
.ui_input_txt01 {
width: 25px;
height: 16px;
margin: 1px 1px 1px 5px;
outline: 0;
padding: 5px;
border: 1px solid;
border-color: #C0C0C0 #D9D9D9 #D9D9D9;
border-radius: 2px;
background: #FFF;
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0
rgba(255, 255, 255, 0.2);
-webkit-transition: box-shadow, border-color .5s ease-in-out;
-moz-transition: box-shadow, border-color .5s ease-in-out;
-o-transition: box-shadow, border-color .5s ease-in-out;
}
.ui_input_txt02 {
width: 150px;
height: 18px;
margin: 2px 2px 2px 5px;
outline: 0;
padding: 5px;
border: 1px solid;
border-color: #C0C0C0 #D9D9D9 #D9D9D9;
border-radius: 2px;
background: #FFF;
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0
rgba(255, 255, 255, 0.2);
-webkit-transition: box-shadow, border-color .5s ease-in-out;
-moz-transition: box-shadow, border-color .5s ease-in-out;
-o-transition: box-shadow, border-color .5s ease-in-out;
}
.ui_input_txt03 {
width: 300px;
height: 18px;
margin: 2px 2px 2px 5px;
outline: 0;
padding: 5px;
border: 1px solid;
border-color: #C0C0C0 #D9D9D9 #D9D9D9;
border-radius: 2px;
background: #FFF;
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0
rgba(255, 255, 255, 0.2);
-webkit-transition: box-shadow, border-color .5s ease-in-out;
-moz-transition: box-shadow, border-color .5s ease-in-out;
-o-transition: box-shadow, border-color .5s ease-in-out;
}
.ui_input_btn01 {
width: 80px;
height: 30px;
line-height: 30px;
text-align: center;
border-style: none;
cursor: pointer;
font-family: "Microsoft YaHei", "微软雅黑", "sans-serif";
background: url('../../images/login/btn.jpg') 0px -1px no-repeat;
}
.ui_input_btn01:hover {
width: 80px;
height: 30px;
line-height: 30px;
text-align: center;
border-style: none;
cursor: pointer;
font-family: "Microsoft YaHei", "微软雅黑", "sans-serif";
background: url('../../images/login/btn_hover.jpg') 0px 0px no-repeat;
color: #fff;
}
.ui_input_btn02 {
width: 90px;
height: 30px;
line-height: 30px;
color: #4f6b72;
cursor: pointer;
color: #4f6b72;
}
.ui_txt_bold01 {
color: red;
font-weight: bolder;
}
.ui_txt_bold02 {
color: green;
font-weight: bolder;
}
.ui_txt_bold03 {
color: blue;
font-weight: bolder;
}
.ui_txt_bold04 {
color: #4470AF;
font-weight: bolder;
}
.ui_txt_bold05 {
color: black;
font-weight: bolder;
}
.ui_txt_bg01 {
background: #D1D1C8;
}
.ui_file{
border:2px solid #D8D2D2; height:25px; line-height:25px; width:189px; margin-left:5px; cursor:pointer;
}
\ No newline at end of file
/*
* FancyBox - jQuery Plugin
* Simple and fancy lightbox alternative
*
* Examples and documentation at: http://fancybox.net
*
* Copyright (c) 2008 - 2010 Janis Skarnelis
* That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support is greatly appreciated.
*
* Version: 1.3.4 (11/11/2010)
* Requires: jQuery v1.3+
*
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*/
#fancybox-loading {
position: fixed;
top: 50%;
left: 50%;
width: 40px;
height: 40px;
margin-top: -20px;
margin-left: -20px;
cursor: pointer;
overflow: hidden;
z-index: 1104;
display: none;
}
#fancybox-loading div {
position: absolute;
top: 0;
left: 0;
width: 40px;
height: 480px;
background-image: url('../../images/authority/fancybox.png');
}
#fancybox-overlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
z-index: 1100;
display: none;
}
#fancybox-tmp {
padding: 0;
margin: 0;
border: 0;
overflow: auto;
display: none;
}
#fancybox-wrap {
position: absolute;
top: 0;
left: 0;
padding: 20px;
z-index: 1101;
outline: none;
display: none;
}
#fancybox-outer {
position: relative;
width: 100%;
height: 100%;
background: #fff;
}
#fancybox-content {
width: 0;
height: 0;
padding: 0;
outline: none;
position: relative;
overflow: hidden;
z-index: 1102;
border: 0px solid #fff;
}
#fancybox-hide-sel-frame {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: transparent;
z-index: 1101;
}
#fancybox-close {
position: absolute;
top: -15px;
right: -15px;
width: 30px;
height: 30px;
background: transparent url('../../images/authority/fancybox.png') -40px 0px;
cursor: pointer;
z-index: 1103;
display: none;
}
#fancybox-error {
color: #444;
font: normal 12px/20px Arial;
padding: 14px;
margin: 0;
}
#fancybox-img {
width: 100%;
height: 100%;
padding: 0;
margin: 0;
border: none;
outline: none;
line-height: 0;
vertical-align: top;
}
#fancybox-frame {
width: 100%;
height: 100%;
border: none;
display: block;
}
#fancybox-left, #fancybox-right {
position: absolute;
bottom: 0px;
height: 100%;
width: 35%;
cursor: pointer;
outline: none;
background: transparent url('../../images/authority/blank.gif');
z-index: 1102;
display: none;
}
#fancybox-left {
left: 0px;
}
#fancybox-right {
right: 0px;
}
#fancybox-left-ico, #fancybox-right-ico {
position: absolute;
top: 50%;
left: -9999px;
width: 30px;
height: 30px;
margin-top: -15px;
cursor: pointer;
z-index: 1102;
display: block;
}
#fancybox-left-ico {
background-image: url('../../images//authorityfancybox.png');
background-position: -40px -30px;
}
#fancybox-right-ico {
background-image: url('../../images//authorityfancybox.png');
background-position: -40px -60px;
}
#fancybox-left:hover, #fancybox-right:hover {
visibility: visible; /* IE6 */
}
#fancybox-left:hover span {
left: 20px;
}
#fancybox-right:hover span {
left: auto;
right: 20px;
}
.fancybox-bg {
position: absolute;
padding: 0;
margin: 0;
border: 0;
width: 20px;
height: 20px;
z-index: 1001;
}
#fancybox-bg-n {
top: -20px;
left: 0;
width: 100%;
background-image: url('../../images/authority/fancybox-x.png');
}
#fancybox-bg-ne {
top: -20px;
right: -20px;
background-image: url('../../images/authority/fancybox.png');
background-position: -40px -162px;
}
#fancybox-bg-e {
top: 0;
right: -20px;
height: 100%;
background-image: url('../../images/authority/fancybox-y.png');
background-position: -20px 0px;
}
#fancybox-bg-se {
bottom: -20px;
right: -20px;
background-image: url('../../images/authority/fancybox.png');
background-position: -40px -182px;
}
#fancybox-bg-s {
bottom: -20px;
left: 0;
width: 100%;
background-image: url('../../images/authority/fancybox-x.png');
background-position: 0px -20px;
}
#fancybox-bg-sw {
bottom: -20px;
left: -20px;
background-image: url('../../images/authority/fancybox.png');
background-position: -40px -142px;
}
#fancybox-bg-w {
top: 0;
left: -20px;
height: 100%;
background-image: url('../../images/authority/fancybox-y.png');
}
#fancybox-bg-nw {
top: -20px;
left: -20px;
background-image: url('../../images/authority/fancybox.png');
background-position: -40px -122px;
}
#fancybox-title {
font-family: Helvetica;
font-size: 12px;
z-index: 1102;
}
.fancybox-title-inside {
padding-bottom: 10px;
text-align: center;
color: #333;
background: #fff;
position: relative;
}
.fancybox-title-outside {
padding-top: 10px;
color: #fff;
}
.fancybox-title-over {
position: absolute;
bottom: 0;
left: 0;
color: #FFF;
text-align: left;
}
#fancybox-title-over {
padding: 10px;
background-image: url('../../images/fancy_title_over.png');
display: block;
}
.fancybox-title-float {
position: absolute;
left: 0;
bottom: -20px;
height: 32px;
}
#fancybox-title-float-wrap {
border: none;
border-collapse: collapse;
width: auto;
}
#fancybox-title-float-wrap td {
border: none;
white-space: nowrap;
}
#fancybox-title-float-left {
padding: 0 0 0 15px;
background: url('../../images/fancybox.png') -40px -90px no-repeat;
}
#fancybox-title-float-main {
color: #FFF;
line-height: 29px;
font-weight: bold;
padding: 0 0 3px 0;
background: url('../../images/authority/fancybox-x.png') 0px -40px;
}
#fancybox-title-float-right {
padding: 0 0 0 15px;
background: url('../../images/authority/fancybox.png') -55px -90px no-repeat;
}
/* IE6 */
.fancybox-ie6 #fancybox-close { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_close.png', sizingMethod='scale'); }
.fancybox-ie6 #fancybox-left-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_nav_left.png', sizingMethod='scale'); }
.fancybox-ie6 #fancybox-right-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_nav_right.png', sizingMethod='scale'); }
.fancybox-ie6 #fancybox-title-over { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_over.png', sizingMethod='scale'); zoom: 1; }
.fancybox-ie6 #fancybox-title-float-left { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_left.png', sizingMethod='scale'); }
.fancybox-ie6 #fancybox-title-float-main { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_main.png', sizingMethod='scale'); }
.fancybox-ie6 #fancybox-title-float-right { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_right.png', sizingMethod='scale'); }
.fancybox-ie6 #fancybox-bg-w, .fancybox-ie6 #fancybox-bg-e, .fancybox-ie6 #fancybox-left, .fancybox-ie6 #fancybox-right, #fancybox-hide-sel-frame {
height: expression(this.parentNode.clientHeight + "px");
}
#fancybox-loading.fancybox-ie6 {
position: absolute; margin-top: 0;
top: expression( (-20 + (document.documentElement.clientHeight ? document.documentElement.clientHeight/2 : document.body.clientHeight/2 ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop )) + 'px');
}
#fancybox-loading.fancybox-ie6 div { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_loading.png', sizingMethod='scale'); }
/* IE6, IE7, IE8 */
.fancybox-ie .fancybox-bg { background: transparent !important; }
.fancybox-ie #fancybox-bg-n { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_n.png', sizingMethod='scale'); }
.fancybox-ie #fancybox-bg-ne { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_ne.png', sizingMethod='scale'); }
.fancybox-ie #fancybox-bg-e { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_e.png', sizingMethod='scale'); }
.fancybox-ie #fancybox-bg-se { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_se.png', sizingMethod='scale'); }
.fancybox-ie #fancybox-bg-s { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_s.png', sizingMethod='scale'); }
.fancybox-ie #fancybox-bg-sw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_sw.png', sizingMethod='scale'); }
.fancybox-ie #fancybox-bg-w { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_w.png', sizingMethod='scale'); }
.fancybox-ie #fancybox-bg-nw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_nw.png', sizingMethod='scale'); }
\ No newline at end of file
@charset "UTF-8";
* {
margin: 0;
padding: 0;
list-style: none;
}
html,body {
background: #FFFFFF;
font: normal 15px "Microsoft YaHei";
}
#top {
position: absolute;
top: 0;
left: 0;
right: 0;
height: 70px;
background-color: #303030;
}
#top_logo {
width: 300px;
float: left;
vertical-align: middle;
height: 65px;
line-height: 65px;
padding: 1px 1px 1px 40px;
}
#top_links {
width: 480px;
height: 65px;
float: right;
line-height: 65px;
color: #ADADAD;
line-height: 65px;
position: relative;
}
#top_op {
width: 400px;
}
#top_op ul {
list-style-type: none;
}
#top_op ul li {
display: inline-block;
margin-right: 20px;
}
#top_op ul li img {
vertical-align: text-top;
}
#top_links a:link,#nav_links a:visited,#nav_links a:hover,#nav_links a:active
{
list-style: none;
text-decoration: none;
color: #fff;
}
#top_links a:hover {
list-style: none;
text-decoration: underline;
color: #fff;
}
#top_close {
width: 80px;
position: absolute;
right: 0px;
top: 0px;
border-left: 1px solid #171717;
vertical-align: text-top;
}
#side {
position: absolute;
left: 0;
top: 70px;
bottom: 0px;
width: 280px;
overflow: hidden;
/* border-right: 5px solid #DDDDDD; */
}
#main {
position: absolute;
left: 280px;
top: 140px;
bottom: 0px;
right: 0px;
width: auto;
z-index: 2;
overflow: hidden;
}
#top_nav {
position: fixed;
width: 77%;
top: 70px;
left: 304px;
height: 58px;
line-height: 70px;
color: #8A8A8A;
font-size: 14px;
border-bottom: 1px solid #EDEDED;
}
#left_menu {
width: 60px;
position: absolute;
top: 0px;
bottom: 0px;
background: #044599;
overflow: hidden;
}
#left_menu_cnt {
width: 220px;
position: absolute;
top: 0px;
bottom: 0px;
left: 60px;
overflow: auto;
background: #F1F1F1;
}
#left_menu_cnt #nav_module {
position: fixed;
padding-left: 10px;
background: #F1F1F1;
}
#left_menu_cnt #nav_resource {
margin-top: 60px;
overflow: auto;
}
#TabPage2 li {
padding: 19px 9px 19px 15px;
cursor: pointer;
}
.selected {
background: #FFF;
cursor: pointer;
}
\ No newline at end of file
/*-------------------------------------
zTree Style
version: 3.2
author: Hunter.z
email: hunter.z@263.net
website: http://code.google.com/p/jquerytree/
-------------------------------------*/
.ztree * {
padding: 0;
margin: 0;
font-size: 14px;
font-family: "Microsoft YaHei", Verdana, Arial, Helvetica, AppleGothic, sans-serif;
}
.ztree {
margin: 0;
padding: 5px;
color: #333
}
.ztree li {
padding: 5px;
margin: 0;
list-style: none;
line-height: 14px;
text-align: left;
white-space: nowrap;
outline: 0
}
.ztree li ul {
margin: 0;
padding: 0 0 0 18px
}
.ztree li ul.line {
background: url(../../images/common/line_conn.gif) 0 0 repeat-y;
}
.ztree li a {
padding: 1px 3px 0 0;
margin: 0;
cursor: pointer;
height: 17px;
color: #333;
background-color: transparent;
text-decoration: none;
vertical-align: top;
display: inline-block
}
.ztree li a:hover {
text-decoration: underline
}
.ztree li a.curSelectedNode {
padding-top: 0px;
color: #1A5CC6;
height: 16px;
opacity: 0.8;
}
.ztree li a.curSelectedNode_Edit {
padding-top: 0px;
background-color: #FFE6B0;
color: black;
height: 16px;
border: 1px #FFB951 solid;
opacity: 0.8;
}
.ztree li a.tmpTargetNode_inner {
padding-top: 0px;
background-color: #316AC5;
color: white;
height: 16px;
border: 1px #316AC5 solid;
opacity: 0.8;
filter: alpha(opacity = 80)
}
.ztree li a.tmpTargetNode_prev {
}
.ztree li a.tmpTargetNode_next {
}
.ztree li a input.rename {
height: 14px;
width: 80px;
padding: 0;
margin: 0;
font-size: 12px;
border: 1px #7EC4CC solid;
*border: 0px
}
.ztree li span {
line-height: 16px;
margin-right: 2px
}
.ztree li span.button {
line-height: 0;
margin: 0;
width: 16px;
height: 16px;
display: inline-block;
vertical-align: middle;
border: 0 none;
cursor: pointer;
outline: none;
background-color: transparent;
background-repeat: no-repeat;
background-attachment: scroll;
background-image: url("../../images/common/nav_item_v_hover.jpg");
/* *background-image: url("../../images/common/zTreeStandard.gif") */
}
.ztree li span.button.chk {
width: 13px;
height: 13px;
margin: 0 3px 0 0;
cursor: auto
}
.ztree li span.button.chk.checkbox_false_full {
background-image: url("../../images/authority/zTreeStandard.gif");
background-position: 0 0;
margin-left: 10px;
}
.ztree li span.button.chk.checkbox_false_full_focus {
background-image: url("../../images/authority/zTreeStandard.gif");
background-position: 0 -14px;
margin-left: 10px;
}
.ztree li span.button.chk.checkbox_false_part {
background-image: url("../../images/authority/zTreeStandard.gif");
background-position: 0 -28px;
margin-left: 10px;
}
.ztree li span.button.chk.checkbox_false_part_focus {
background-image: url("../../images/authority/zTreeStandard.gif");
background-position: 0 -42px;
margin-left: 10px;
}
.ztree li span.button.chk.checkbox_false_disable {
background-image: url("../../images/authority/zTreeStandard.gif");
background-position: 0 -56px;
margin-left: 10px;
}
.ztree li span.button.chk.checkbox_true_full {
background-image: url("../../images/authority/zTreeStandard.gif");
background-position: -14px 0;
margin-left: 10px;
}
.ztree li span.button.chk.checkbox_true_full_focus {
background-image: url("../../images/authority/zTreeStandard.gif");
background-position: -14px -14px;
margin-left: 10px;
}
.ztree li span.button.chk.checkbox_true_part {
background-image: url("../../images/authority/zTreeStandard.gif");
background-position: -14px -28px;
margin-left: 10px;
}
.ztree li span.button.chk.checkbox_true_part_focus {
background-image: url("../../images/authority/zTreeStandard.gif");
background-position: -14px -42px;
margin-left: 10px;
}
.ztree li span.button.chk.checkbox_true_disable {
background-image: url("../../images/authority/zTreeStandard.gif");
background-position: -14px -56px;
margin-left: 10px;
}
.ztree li span.button.chk.radio_false_full {
background-position: -28px 0
}
.ztree li span.button.chk.radio_false_full_focus {
background-position: -28px -14px
}
.ztree li span.button.chk.radio_false_part {
background-position: -28px -28px
}
.ztree li span.button.chk.radio_false_part_focus {
background-position: -28px -42px
}
.ztree li span.button.chk.radio_false_disable {
background-position: -28px -56px
}
.ztree li span.button.chk.radio_true_full {
background-position: -42px 0
}
.ztree li span.button.chk.radio_true_full_focus {
background-position: -42px -14px
}
.ztree li span.button.chk.radio_true_part {
background-position: -42px -28px
}
.ztree li span.button.chk.radio_true_part_focus {
background-position: -42px -42px
}
.ztree li span.button.chk.radio_true_disable {
background-position: -42px -56px
}
.ztree li span.button.switch {
width: 16px;
height: 16px
}
.ztree li span.button.root_open {
/* background-position: -92px -54px */
background-image: url("../../images/common/nav_item_minus.jpg");
margin-top: 8px;
}
.ztree li span.button.root_close {
/* background-position: -74px -54px */
background-image: url("../../images/common/nav_item_plus.jpg");
}
.ztree li span.button.roots_open {
/* background-position: -92px 0 */
background-image: url("../../images/common/nav_item_minus.jpg");
margin-top: 8px;
}
.ztree li span.button.roots_close {
/* background-position: -74px 0 */
background-image: url("../../images/common/nav_item_plus.jpg");
/* margin-top: 6px; */
}
.ztree li span.button.center_open {
/* background-position: -92px -18px */
background-image: url("../../images/common/nav_item_minus.jpg");
margin-top: 8px;
}
.ztree li span.button.center_close {
/* background-position: -74px -18px */
background-image: url("../../images/common/nav_item_plus.jpg");
/* margin-top: 6px; */
}
.ztree li span.button.bottom_open {
/* background-position: -92px -36px */
background-image: url("../../images/common/nav_item_minus.jpg");
margin-top: 8px;
}
.ztree li span.button.bottom_close {
/* background-position: -74px -36px */
background-image: url("../../images/common/nav_item_plus.jpg");
/* margin-top: 6px; */
}
.ztree li span.button.noline_open {
background-image: url("../../images/common/nav_item_minus.jpg");
margin-top: 6px;
}
.ztree li span.button.noline_close {
background-image: url("../../images/common/nav_item_plus.jpg");
}
.ztree li span.button.root_docu {
background: none;
}
.ztree li span.button.roots_docu {
background-position: -56px 0
}
.ztree li span.button.center_docu {
background-position: -56px -18px
}
.ztree li span.button.bottom_docu {
background-position: -56px -36px
}
.ztree li span.button.noline_docu {
background: none;
}
.ztree li span.button.ico_open {
margin-right: 2px;
background-position: -110px -16px;
vertical-align: top;
*vertical-align: middle
}
.ztree li span.button.ico_close {
margin-right: 2px;
background-position: -110px 0;
vertical-align: top;
*vertical-align: middle
}
.ztree li span.button.ico_docu {
margin-right: 2px;
/* background-position: -110px -32px; */
vertical-align: top;
vertical-align: middle
}
.ztree li span.button.edit {
margin-right: 2px;
background-position: -110px -48px;
vertical-align: top;
*vertical-align: middle
}
.ztree li span.button.remove {
margin-right: 2px;
background-position: -110px -64px;
vertical-align: top;
*vertical-align: middle
}
.ztree li span.button.ico_loading {
margin-right: 2px;
background: url(../../images/common/loading.gif) no-repeat scroll 0 0
transparent;
vertical-align: top;
*vertical-align: middle
}
ul.tmpTargetzTree {
background-color: #FFE6B0;
opacity: 0.8;
filter: alpha(opacity = 80)
}
span.tmpzTreeMove_arrow {
width: 16px;
height: 16px;
display: inline-block;
padding: 0;
margin: 2px 0 0 1px;
border: 0 none;
position: absolute;
background-color: transparent;
background-repeat: no-repeat;
background-attachment: scroll;
background-position: -110px -80px;
background-image: url("../../images/common/nav_item_plus.jpg");
*background-image: url("../../images/common/zTreeStandard.gif")
}
ul.ztree.zTreeDragUL {
margin: 0;
padding: 0;
position: absolute;
width: auto;
height: auto;
overflow: hidden;
background-color: #cfcfcf;
border: 1px #00B83F dotted;
opacity: 0.8;
filter: alpha(opacity = 80)
}
.zTreeMask {
z-index: 10000;
background-color: #cfcfcf;
opacity: 0.0;
filter: alpha(opacity = 0);
position: absolute
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment