diff --git a/源码/.classpath b/源码/.classpath new file mode 100644 index 0000000..2df430f --- /dev/null +++ b/源码/.classpath @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/源码/.project b/源码/.project new file mode 100644 index 0000000..b55ab72 --- /dev/null +++ b/源码/.project @@ -0,0 +1,37 @@ + + + ssm_xsktsign + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.wst.common.project.facet.core.builder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + org.eclipse.wst.validation.validationbuilder + + + + + + org.eclipse.jem.workbench.JavaEMFNature + org.eclipse.wst.common.modulecore.ModuleCoreNature + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + org.eclipse.wst.common.project.facet.core.nature + org.eclipse.wst.jsdt.core.jsNature + + diff --git a/源码/.settings/.jsdtscope b/源码/.settings/.jsdtscope new file mode 100644 index 0000000..2418123 --- /dev/null +++ b/源码/.settings/.jsdtscope @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/源码/.settings/org.eclipse.core.resources.prefs b/源码/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..e9441bb --- /dev/null +++ b/源码/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,3 @@ +eclipse.preferences.version=1 +encoding//src/main/java=UTF-8 +encoding/=UTF-8 diff --git a/源码/.settings/org.eclipse.jdt.core.prefs b/源码/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..4e4a3ad --- /dev/null +++ b/源码/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,9 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.release=disabled +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/源码/.settings/org.eclipse.m2e.core.prefs b/源码/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/源码/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/源码/.settings/org.eclipse.wst.common.component b/源码/.settings/org.eclipse.wst.common.component new file mode 100644 index 0000000..1702cee --- /dev/null +++ b/源码/.settings/org.eclipse.wst.common.component @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/源码/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml b/源码/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml new file mode 100644 index 0000000..6d59853 --- /dev/null +++ b/源码/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/源码/.settings/org.eclipse.wst.common.project.facet.core.xml b/源码/.settings/org.eclipse.wst.common.project.facet.core.xml new file mode 100644 index 0000000..e9fd478 --- /dev/null +++ b/源码/.settings/org.eclipse.wst.common.project.facet.core.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/源码/.settings/org.eclipse.wst.jsdt.ui.superType.container b/源码/.settings/org.eclipse.wst.jsdt.ui.superType.container new file mode 100644 index 0000000..3bd5d0a --- /dev/null +++ b/源码/.settings/org.eclipse.wst.jsdt.ui.superType.container @@ -0,0 +1 @@ +org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file diff --git a/源码/.settings/org.eclipse.wst.jsdt.ui.superType.name b/源码/.settings/org.eclipse.wst.jsdt.ui.superType.name new file mode 100644 index 0000000..05bd71b --- /dev/null +++ b/源码/.settings/org.eclipse.wst.jsdt.ui.superType.name @@ -0,0 +1 @@ +Window \ No newline at end of file diff --git a/源码/.settings/org.eclipse.wst.validation.prefs b/源码/.settings/org.eclipse.wst.validation.prefs new file mode 100644 index 0000000..04cad8c --- /dev/null +++ b/源码/.settings/org.eclipse.wst.validation.prefs @@ -0,0 +1,2 @@ +disabled=06target +eclipse.preferences.version=1 diff --git a/源码/pom.xml b/源码/pom.xml new file mode 100644 index 0000000..6ddb98e --- /dev/null +++ b/源码/pom.xml @@ -0,0 +1,260 @@ + + 4.0.0 + ssm_xsktsign + ssm_xsktsign + 0.0.1-SNAPSHOT + war + + + + UTF-8 + 4.1.4.RELEASE + + 3.2.8 + + 1.7.7 + 1.2.17 + + + + junit + junit + 4.11 + + test + + + + + org.testng + testng + 6.3.1 + test + + + + + + + + org.springframework + spring-core + ${spring.version} + + + org.springframework + spring-web + ${spring.version} + + + org.springframework + spring-oxm + ${spring.version} + + + org.springframework + spring-tx + ${spring.version} + + + org.springframework + spring-jdbc + ${spring.version} + + + org.springframework + spring-webmvc + ${spring.version} + + + org.springframework + spring-aop + ${spring.version} + + + org.springframework + spring-context-support + ${spring.version} + + + org.springframework + spring-test + ${spring.version} + + + + org.springframework + spring-orm + ${spring.version} + + + + org.aspectj + aspectjweaver + 1.8.5 + + + + cglib + cglib + 3.1 + + + + + org.hibernate + hibernate-validator + 5.1.0.Final + + + + + javax.validation + validation-api + 1.1.0.Final + + + + + + + com.fasterxml.jackson.core + jackson-annotations + 2.6.3 + + + com.fasterxml.jackson.core + jackson-core + 2.6.3 + + + com.fasterxml.jackson.core + jackson-databind + 2.6.3 + + + com.alibaba + fastjson + 1.2.11 + + + + org.mybatis + mybatis + ${mybatis.version} + + + + org.mybatis + mybatis-spring + 1.2.2 + + + + + com.github.miemiedev + mybatis-paginator + 1.2.15 + + + + + javax + javaee-api + 7.0 + + + + + + + commons-dbcp + commons-dbcp + 1.2.2 + + + + + jstl + jstl + 1.2 + + + + + + log4j + log4j + ${log4j.version} + + + + mysql + mysql-connector-java + 5.1.6 + + + + commons-fileupload + commons-fileupload + 1.3.1 + + + commons-io + commons-io + 2.4 + + + + + commons-logging + commons-logging + 1.1.1 + + + + com.github.pagehelper + pagehelper + 4.2.1 + + + + jsptags + pager-taglib + 2.0 + + + + + ${basedir}/src/main/java + ${basedir}/src/main/webapp/WEB-INF/classes + + + ${basedir}/resources + + **/*.java + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + 1.8 + 1.8 + + + + org.apache.maven.plugins + maven-war-plugin + 2.6 + + false + + + + + \ No newline at end of file diff --git a/源码/src/main/java/com/kwxy/hyt/base/BaseController.java b/源码/src/main/java/com/kwxy/hyt/base/BaseController.java new file mode 100644 index 0000000..bb28e00 --- /dev/null +++ b/源码/src/main/java/com/kwxy/hyt/base/BaseController.java @@ -0,0 +1,83 @@ +package com.kwxy.hyt.base; +import java.io.Serializable; +import java.util.Collection; +import java.util.HashMap; +import java.util.Map; +import java.util.Set; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.alibaba.fastjson.JSONObject; + +/** + * Controller基类 + */ +public class BaseController { + + protected Logger logger = LoggerFactory.getLogger(this.getClass()); + + protected final static String DATE_FORMATE = "yyyy-MM-dd"; + + /** + * 返回服务端处理结果 + * + * @param obj + * 服务端输出对象 + * @return 输出处理结果给前段JSON格式数据 + */ + public String responseResult(Object obj) { + String jsonObj = null; + if (obj != null) { + logger.info("后端返回对象:{}", obj); + jsonObj = JSONObject.toJSONString(obj); + logger.info("后端返回数据:" + jsonObj); + } + logger.info("输出结果:{}", jsonObj); + return jsonObj; + } + + + // 下面是判断null的操作 + + public boolean isEmpty(String str) { + return (null == str) || (str.trim().length() <= 0); + } + + public boolean isEmpty(Character cha) { + return (null == cha) || cha.equals(' '); + } + + public boolean isEmpty(Object obj) { + return (null == obj); + } + + public boolean isEmpty(Object[] objs) { + return (null == objs) || (objs.length <= 0); + } + + public boolean isEmpty(Collection obj) { + return (null == obj) || obj.isEmpty(); + } + + public boolean isEmpty(Set set) { + return (null == set) || set.isEmpty(); + } + + public boolean isEmpty(Serializable obj) { + return null == obj; + } + + public boolean isEmpty(Map map) { + return (null == map) || map.isEmpty(); + } + + /** + * + * 获得map + * @return + */ + public Map getMap(){ + return new HashMap(); + } +} diff --git a/源码/src/main/java/com/kwxy/hyt/base/BaseDao.java b/源码/src/main/java/com/kwxy/hyt/base/BaseDao.java new file mode 100644 index 0000000..164e553 --- /dev/null +++ b/源码/src/main/java/com/kwxy/hyt/base/BaseDao.java @@ -0,0 +1,191 @@ +package com.kwxy.hyt.base; + +import java.io.Serializable; +import java.util.List; +import java.util.Map; + +import org.apache.ibatis.annotations.Param; + +import com.kwxy.hyt.utils.Pager; + + +/** + * 基础dao封装一些简单的方法 + * @author + * + */ +public interface BaseDao{ + /** + * 插入一个实体 + * @param entity + */ + int insert(T entity) ; + + T save(T entity) ; + + /** + * 根据实体主键删除一个实体 + * @param primaryKey + */ + void deleteById(Serializable id); + + /** + * 通过实体删除 + * @param entity + */ + void deleteByEntity(T entity); + + /** + * 通过map删除 + * @param params + */ + void deleteByMap(Map params); + + /** + * 更新一个实体 + * @param entity + */ + void update(T entity); + + /** + * 通过id进行修改 + * @param id + */ + void updateById(T entity); + + + /** + * 根据参数查询 + * @param clz + * @param params + * @return + */ + public List listByMap(Map params); + + /** + * 查询所有实体 + * @return + */ + List listAll(); + + /** + * 查询所有实体,根据实体属性值为判断条件查询所有实体, + * @param entity + * @return + */ + List listAllByEntity(T entity); + + /** + * 根据主键获取一个实体 + * @param primaryKey + * @return + */ + T load(Serializable id); + + /** + * 根据主键获取一个实体 + * @param id + * @return + */ + T getById(Serializable id); + + /** + * 通过map查询 + * @param params + * @return + */ + T getByMap(Map params); + + /** + * 通过对象查询 + * @param entity + * @return + */ + T getByEntity(T entity); + + + //=======================一下是分页方法================================ + /** + * 默认 sqlId find是分页 + * @param sqlId + * @param params + * @return + */ + public List findByMap(Map params); + + + /** + * 通过对象查询分页 + * @param entity + * @return + */ + public List findByEntity(T entity); + /** + * 需要自己写count的分页 + * @param sqlId + * @param params + * @return + */ + public List findByCount(Map params); + + /** + * 批量新增 + * @param list + */ + public void insertBatch(List list); + + /** + * 批量修改 + * @param list + */ + public void updateBatch(List list); + + //==============================封装纯sql语法================================ + + /** + * 查询一个对象返回map + * @param sql + * @return + */ + public Map getBySqlReturnMap(@Param("sql")String sql); + + /** + * 查询一个对象返回实体类 + * @param sql + * @return + */ + public T getBySqlReturnEntity(@Param("sql")String sql); + + /** + * 查询列表返回map + * @param sql + * @return + */ + public List> listBySqlReturnMap(@Param("sql")String sql); + + /** + * 查询列表返回实体 + * @param sql + * @return + */ + public List listBySqlReturnEntity(@Param("sql")String sql); + + /** + * 查询分页 + * @param sql + * @return + */ + public List findBySqlRerturnEntity(@Param("sql")String sql); + + /** + * 通过sql修改 + * @param sql + */ + public void updateBysql(@Param("sql")String sql); + + /** + * 通过sql删除 + * @param sql + */ + public void deleteBySql(@Param("sql")String sql); +} diff --git a/源码/src/main/java/com/kwxy/hyt/base/BaseService.java b/源码/src/main/java/com/kwxy/hyt/base/BaseService.java new file mode 100644 index 0000000..f835023 --- /dev/null +++ b/源码/src/main/java/com/kwxy/hyt/base/BaseService.java @@ -0,0 +1,180 @@ +package com.kwxy.hyt.base; + +import java.io.Serializable; +import java.util.List; +import java.util.Map; + +import org.apache.ibatis.annotations.Param; + +import com.kwxy.hyt.utils.Pager; + + +public interface BaseService { + /** + * 插入一个实体 + * @param entity + */ + int insert(T entity) ; + + + + /** + * 根据实体主键删除一个实体 + * @param primaryKey + */ + void deleteById(Serializable id); + + /** + * 更新一个实体 + * @param entity + */ + void update(T entity); + + /** + * 通过id进行修改 + * @param id + */ + void updateById(T entity); + + /** + * 通过实体删除 + * @param entity + */ + void deleteByEntity(T entity); + + /** + * 通过map删除 + * @param params + */ + void deleteByMap(Map params); + + /** + * 根据参数查询 + * @param clz + * @param params + * @return + */ + public List listByMap(Map params); + + /** + * 查询所有实体 + * @return + */ + List listAll(); + + /** + * 查询所有实体,根据实体属性值为判断条件查询所有实体, + * @param entity + * @return + */ + List listAllByEntity(T entity); + + /** + * 根据主键获取一个实体 + * @param primaryKey + * @return + */ + T load(Serializable id); + + /** + * 根据主键获取一个实体 + * @param id + * @return + */ + T getById(Serializable id); + + /** + * 通过map查询 + * @param params + * @return + */ + T getByMap(Map params); + + /** + * 通过对象查询 + * @param entity + * @return + */ + T getByEntity(T entity); + + + //=======================一下是分页方法================================ + /** + * 默认 sqlId find是分页 + * @param sqlId + * @param params + * @return + */ + public Pager findByMap(Map params); + + + /** + * 通过对象查询分页 + * @param entity + * @return + */ + public Pager findByEntity(T entity); + + /** + * 批量新增 + * @param list + */ + public void insertBatch(List list); + + /** + * 批量修改 + * @param list + */ + public void updateBatch(List list); + + + //============================通过sql========================================= + + /** + * 查询一个对象返回map + * @param sql + * @return + */ + public Map getBySql(@Param("sql")String sql); + + /** + * 查询一个对象返回实体类 + * @param sql + * @return + */ + public T getBySqlReturnEntity(@Param("sql")String sql); + + /** + * 查询列表返回map + * @param sql + * @return + */ + public List> listBySqlReturnMap(@Param("sql")String sql); + + /** + * 查询列表返回实体 + * @param sql + * @return + */ + public List listBySqlReturnEntity(@Param("sql")String sql); + + /** + * 查询分页 + * @param sql + * @return + */ + public Pager findBySqlRerturnEntity(@Param("sql")String sql); + + /** + * 通过sql修改 + * @param sql + */ + public void updateBysql(@Param("sql")String sql); + + /** + * 通过sql删除 + * @param sql + */ + public void deleteBySql(@Param("sql")String sql); + +} diff --git a/源码/src/main/java/com/kwxy/hyt/base/BaseServiceImpl.java b/源码/src/main/java/com/kwxy/hyt/base/BaseServiceImpl.java new file mode 100644 index 0000000..422445f --- /dev/null +++ b/源码/src/main/java/com/kwxy/hyt/base/BaseServiceImpl.java @@ -0,0 +1,319 @@ +package com.kwxy.hyt.base; + + +import java.io.Serializable; +import java.util.Collection; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.apache.ibatis.session.SqlSession; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import com.github.pagehelper.PageHelper; +import com.kwxy.hyt.utils.Pager; +import com.kwxy.hyt.utils.SystemContext; + + +public abstract class BaseServiceImpl implements BaseService{ + + private BaseDao baseDao; + public abstract BaseDao getBaseDao(); + + /** + * 插入一个实体 + * @param entity + */ + public int insert(T entity) { + return this.getBaseDao().insert(entity); + } + + /** + * 根据实体主键删除一个实体 + * @param primaryKey + */ + public void deleteById(Serializable id) { + this.getBaseDao().deleteById(id); + } + + + /** + * 通过实体删除 + */ + public void deleteByEntity(T entity) { + this.getBaseDao().deleteByEntity(entity); + } + + /** + * 通过map删除 + */ + public void deleteByMap(Map params) { + this.getBaseDao().deleteByMap(params); + } + + /** + * 更新一个实体 + * @param entity + */ + public void update(T entity) { + this.getBaseDao().update(entity); + } + + + /** + * 通过id进行修改 + * @param id + */ + public void updateById(T entity) { + this.getBaseDao().updateById(entity); + } + + /** + * 根据参数查询 + * @param clz + * @param params + * @return + */ + public List listByMap(Map params) { + return this.getBaseDao().listByMap(params); + } + + /** + * 查询所有实体 + * @return + */ + public List listAll() { + return this.getBaseDao().listAll(); + } + + /** + * 查询所有实体,根据实体属性值为判断条件查询所有实体, + * @param entity + * @return + */ + public List listAllByEntity(T entity) { + return this.getBaseDao().listAllByEntity(entity); + } + + /** + * 根据主键获取一个实体 + * @param primaryKey + * @return + */ + public T load(Serializable id) { + return this.getBaseDao().load(id); + } + + /** + * 根据主键获取一个实体 + * @param id + * @return + */ + public T getById(Serializable id) { + return this.getBaseDao().getById(id); + } + + /** + * 通过map查询 + * @param params + * @return + */ + public T getByMap(Map params) { + return this.getBaseDao().getByMap(params); + } + + /** + * 通过对象查询 + * @param entity + * @return + */ + public T getByEntity(T entity) { + return this.getBaseDao().getByEntity(entity); + } + + /** + * 默认 sqlId find是分页 + * @param sqlId + * @param params + * @return + */ + public Pager findByMap(Map params) { + /** + * 执行分页 + */ + Integer pageSize = SystemContext.getPageSize(); + Integer pageOffset = SystemContext.getPageOffset(); + if(pageOffset==null||pageOffset<0) pageOffset = 0; + if(pageSize==null||pageSize<0) pageSize = 15; + String order = SystemContext.getOrder(); + String sort = SystemContext.getSort(); + Integer pageNum = null; + if(pageOffset == 0){ + pageNum = 1; + }else{ + pageNum = pageOffset/pageSize+1; + } + PageHelper.startPage(pageNum, pageSize); + Pager pages = new Pager(this.getBaseDao().findByMap(params)); + return pages; + } + + /** + * 通过对象查询分页 + * @param entity + * @return + */ + public Pager findByEntity(T entity){ + /** + * 执行分页 + */ + Integer pageSize = SystemContext.getPageSize(); + Integer pageOffset = SystemContext.getPageOffset(); + if(pageOffset==null||pageOffset<0) pageOffset = 0; + if(pageSize==null||pageSize<0) pageSize = 15; + String order = SystemContext.getOrder(); + String sort = SystemContext.getSort(); + Integer pageNum = null; + if(pageOffset == 0){ + pageNum = 1; + }else{ + pageNum = pageOffset/pageSize+1; + } + PageHelper.startPage(pageNum, pageSize); + Pager pages = new Pager(this.getBaseDao().findByEntity(entity)); + return pages; + } + + + /** + * 批量新增 + */ + public void insertBatch(List list) { + this.getBaseDao().insertBatch(list); + } + + /** + * 批量删除 + */ + public void updateBatch(List list) { + this.getBaseDao().updateBatch(list); + } + + //=====================自定义sql========================================= + + /** + * 查询一个对象返回map + * @param sql + * @return + */ + public Map getBySql(String sql) { + + return this.getBaseDao().getBySqlReturnMap(sql); + } + + /** + * 查询一个对象返回实体类 + * @param sql + * @return + */ + public T getBySqlReturnEntity(String sql) { + return this.getBaseDao().getBySqlReturnEntity(sql); + } + + /** + * 查询列表返回map + * @param sql + * @return + */ + public List> listBySqlReturnMap(String sql) { + return this.getBaseDao().listBySqlReturnMap(sql); + } + + + /** + * 查询列表返回实体 + * @param sql + * @return + */ + public List listBySqlReturnEntity(String sql) { + return this.getBaseDao().listBySqlReturnEntity(sql); + } + + /** + * 查询分页 + * @param sql + * @return + */ + public Pager findBySqlRerturnEntity(String sql) { + /** + * 执行分页 + */ + Integer pageSize = SystemContext.getPageSize(); + Integer pageOffset = SystemContext.getPageOffset(); + if(pageOffset==null||pageOffset<0) pageOffset = 0; + if(pageSize==null||pageSize<0) pageSize = 15; + String order = SystemContext.getOrder(); + String sort = SystemContext.getSort(); + Integer pageNum = null; + if(pageOffset == 0){ + pageNum = 1; + }else{ + pageNum = pageOffset/pageSize+1; + } + PageHelper.startPage(pageNum, pageSize); + Pager pages = new Pager(this.getBaseDao().findBySqlRerturnEntity(sql)); + return pages; + } + + + /** + * 通过sql修改 + * @param sql + */ + public void updateBysql(String sql) { + this.getBaseDao().updateBysql(sql); + } + + /** + * 通过sql删除 + * @param sql + */ + public void deleteBySql(String sql) { + this.getBaseDao().deleteBySql(sql); + } + + //判断空 + public boolean isEmpty(String str) { + return (null == str) || (str.trim().length() <= 0); + } + + public boolean isEmpty(Character cha) { + return (null == cha) || cha.equals(' '); + } + + public boolean isEmpty(Object obj) { + return (null == obj); + } + + public boolean isEmpty(Object[] objs) { + return (null == objs) || (objs.length <= 0); + } + + public boolean isEmpty(Collection obj) { + return (null == obj) || obj.isEmpty(); + } + + public boolean isEmpty(Set set) { + return (null == set) || set.isEmpty(); + } + + public boolean isEmpty(Serializable obj) { + return null == obj; + } + + public boolean isEmpty(Map map) { + return (null == map) || map.isEmpty(); + } +} diff --git a/源码/src/main/java/com/kwxy/hyt/controller/BjController.java b/源码/src/main/java/com/kwxy/hyt/controller/BjController.java new file mode 100644 index 0000000..3bcc434 --- /dev/null +++ b/源码/src/main/java/com/kwxy/hyt/controller/BjController.java @@ -0,0 +1,180 @@ +package com.kwxy.hyt.controller; +import java.io.File; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.multipart.commons.CommonsMultipartFile; + +import com.alibaba.fastjson.JSONObject; +import com.kwxy.hyt.base.BaseController; +import com.kwxy.hyt.po.*; +import com.kwxy.hyt.utils.Pager; +import java.util.*; + +import com.kwxy.hyt.po.*; +import com.kwxy.hyt.mapper.*; +import com.kwxy.hyt.service.*; + +/** + * @ClassName: + * @Description: + * @author - - admin + * @date - 2018年10月27日 09时48分23秒 + */ + + +@Controller +@RequestMapping("/bj") +public class BjController extends BaseController { + + + /** + * 依赖注入 start dao/service/=== + */ + @Autowired + private BjService bjService; + + // --------------------------------------- 华丽分割线 ------------------------------ + /** + * 分页查询 返回list对象(通过对By Sql) + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/findBySql") + public String findBySql(Bj bj, Model model, HttpServletRequest request, HttpServletResponse response) { + //分页查询 + String sql = "SELECT * FROM bj WHERE isDelete = 0 "; + if(!isEmpty(bj.getName())){ + sql += " and name like '%"+bj.getName()+"%'"; + } + if(!isEmpty(bj.getZy())){ + sql += " and zy like '%"+bj.getZy()+"%'"; + } + if(!isEmpty(bj.getIsDelete())){ + sql += " and isDelete like '%"+bj.getIsDelete()+"%'"; + } + sql += " ORDER BY ID DESC "; + Pager pagers = bjService.findBySqlRerturnEntity(sql); + model.addAttribute("pagers", pagers); + //存储查询条件 + model.addAttribute("obj", bj); + return "bj/bj"; + } + + + /** + * 分页查询 返回list对象(通过Map) + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/findByMap") + public String findByMap(Bj bj, Model model, HttpServletRequest request, HttpServletResponse response) { + //通过map查询 + Map params = new HashMap(); + if(!isEmpty(bj.getName())){ + params.put("name", bj.getName()); + } + if(!isEmpty(bj.getZy())){ + params.put("zy", bj.getZy()); + } + if(!isEmpty(bj.getIsDelete())){ + params.put("isDelete", bj.getIsDelete()); + } + //分页查询 + Pager pagers = bjService.findByMap(params); + model.addAttribute("pagers", pagers); + //存储查询条件 + model.addAttribute("obj", bj); + return "bj/bj"; + } + + /**********************************【增删改】******************************************************/ + + /** + * 跳至添加页面 + * @return + */ + @RequestMapping(value = "/add") + public String add() { + return "bj/add"; + } + + /** + * 跳至详情页面 + * @return + */ + @RequestMapping(value = "/view") + public String view(Integer id,Model model) { + Bj obj = bjService.load(id); + model.addAttribute("obj",obj); + return "bj/view"; + } + + /** + * 添加执行 + * @return + */ + @RequestMapping(value = "/exAdd") + public String exAdd(Bj bj, Model model, HttpServletRequest request, HttpServletResponse response) { + bj.setIsDelete(0); + bjService.insert(bj); + return "redirect:/bj/findBySql.action"; + } + + + /** + * 跳至修改页面 + * @return + */ + @RequestMapping(value = "/update") + public String update(Integer id,Model model) { + Bj obj = bjService.load(id); + model.addAttribute("obj",obj); + return "bj/update"; + } + + /** + * 添加修改 + * @return + */ + @RequestMapping(value = "/exUpdate") + public String exUpdate(Bj bj, Model model, HttpServletRequest request, HttpServletResponse response) { + //1.通过实体类修改,可以多传修改条件 + bjService.updateById(bj); + //2.通过主键id修改 + //bjService.updateById(bj); + return "redirect:/bj/findBySql.action"; + } + + /** + * 删除通过主键 + * @return + */ + @RequestMapping(value = "/delete") + public String delete(Integer id, Model model, HttpServletRequest request, HttpServletResponse response) { + Bj load = bjService.load(id); + load.setIsDelete(1); + bjService.updateById(load); + return "redirect:/bj/findBySql.action"; + } + + + +} diff --git a/源码/src/main/java/com/kwxy/hyt/controller/FdyController.java b/源码/src/main/java/com/kwxy/hyt/controller/FdyController.java new file mode 100644 index 0000000..d255848 --- /dev/null +++ b/源码/src/main/java/com/kwxy/hyt/controller/FdyController.java @@ -0,0 +1,239 @@ +package com.kwxy.hyt.controller; +import java.io.File; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.multipart.commons.CommonsMultipartFile; + +import com.alibaba.fastjson.JSONObject; +import com.kwxy.hyt.base.BaseController; +import com.kwxy.hyt.po.*; +import com.kwxy.hyt.utils.Pager; +import java.util.*; + +import com.kwxy.hyt.po.*; +import com.kwxy.hyt.mapper.*; +import com.kwxy.hyt.service.*; + +/** + * @ClassName: + * @Description: + * @author - - admin + * @date - 2018年10月27日 09时48分23秒 + */ + + +@Controller +@RequestMapping("/fdy") +public class FdyController extends BaseController { + + + /** + * 依赖注入 start dao/service/=== + */ + @Autowired + private FdyService fdyService; + + @Autowired + private BjService bjService; + + + // --------------------------------------- 华丽分割线 ------------------------------ + + /** + * 分页查询 返回list对象(通过对By Sql) + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/findBySql") + public String findBySql(Fdy fdy, Model model, HttpServletRequest request, HttpServletResponse response) { + //分页查询 + String sql = "SELECT * FROM fdy WHERE isDelete = 0 "; + if(!isEmpty(fdy.getUsername())){ + sql += " and username like '%"+fdy.getUsername()+"%'"; + } + if(!isEmpty(fdy.getPassword())){ + sql += " and password like '%"+fdy.getPassword()+"%'"; + } + if(!isEmpty(fdy.getCode())){ + sql += " and code like '%"+fdy.getCode()+"%'"; + } + if(!isEmpty(fdy.getSex())){ + sql += " and sex like '%"+fdy.getSex()+"%'"; + } + if(!isEmpty(fdy.getBjId())){ + sql += " and bjId like '%"+fdy.getBjId()+"%'"; + } + sql += " ORDER BY ID DESC "; + Pager pagers = fdyService.findBySqlRerturnEntity(sql); + model.addAttribute("pagers", pagers); + //存储查询条件 + model.addAttribute("obj", fdy); + return "fdy/fdy"; + } + + + /** + * 分页查询 返回list对象(通过Map) + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/findByMap") + public String findByMap(Fdy fdy, Model model, HttpServletRequest request, HttpServletResponse response) { + //通过map查询 + Map params = new HashMap(); + if(!isEmpty(fdy.getUsername())){ + params.put("username", fdy.getUsername()); + } + if(!isEmpty(fdy.getPassword())){ + params.put("password", fdy.getPassword()); + } + if(!isEmpty(fdy.getCode())){ + params.put("code", fdy.getCode()); + } + if(!isEmpty(fdy.getSex())){ + params.put("sex", fdy.getSex()); + } + if(!isEmpty(fdy.getBjId())){ + params.put("bjId", fdy.getBjId()); + } + //分页查询 + Pager pagers = fdyService.findByMap(params); + model.addAttribute("pagers", pagers); + //存储查询条件 + model.addAttribute("obj", fdy); + return "fdy/fdy"; + } + + /**********************************【增删改】******************************************************/ + + /** + * 跳至添加页面 + * @return + */ + @RequestMapping(value = "/add") + public String add(Model model) { + // 查询班级列表 + Bj b = new Bj(); + b.setIsDelete(0); + List listAllByEntity = bjService.listAllByEntity(b); + model.addAttribute("bjs", listAllByEntity); + return "fdy/add"; + } + + /** + * 跳至详情页面 + * @return + */ + @RequestMapping(value = "/view") + public String view(Integer id,Model model) { + Fdy obj = fdyService.load(id); + model.addAttribute("obj",obj); + return "fdy/view"; + } + + @RequestMapping(value = "/pass") + public String pass(Integer id,HttpServletRequest request,Model model) { + Object attribute = request.getSession().getAttribute("userId"); + + if (attribute == null){ + return "redirect:/login/uLogin"; + } + Integer userId = Integer.valueOf(attribute.toString()); + Fdy obj = fdyService.load(userId); + model.addAttribute("obj",obj); + return "fdy/pass"; + } + + + @RequestMapping("/upass") + @ResponseBody + public String upass(HttpServletRequest request,String password){ + Object attribute = request.getSession().getAttribute("userId"); + JSONObject j = new JSONObject(); + if (attribute == null){ + j.put("res", 0); + return j.toString(); + } + Integer userId = Integer.valueOf(attribute.toString()); + Fdy byId = fdyService.getById(userId); + byId.setPassword(password); + fdyService.updateById(byId); + j.put("res", 1); + return j.toString(); + + } + + /** + * 添加执行 + * @return + */ + @RequestMapping(value = "/exAdd") + public String exAdd(Fdy fdy, Model model, HttpServletRequest request, HttpServletResponse response) { + fdy.setIsDelete(0); + fdyService.insert(fdy); + return "redirect:/fdy/findBySql.action"; + } + + + /** + * 跳至修改页面 + * @return + */ + @RequestMapping(value = "/update") + public String update(Integer id,Model model) { + Bj b = new Bj(); + b.setIsDelete(0); + List listAllByEntity = bjService.listAllByEntity(b); + model.addAttribute("bjs", listAllByEntity); + + Fdy obj = fdyService.load(id); + model.addAttribute("obj",obj); + return "fdy/update"; + } + + /** + * 添加修改 + * @return + */ + @RequestMapping(value = "/exUpdate") + public String exUpdate(Fdy fdy, Model model, HttpServletRequest request, HttpServletResponse response) { + //1.通过实体类修改,可以多传修改条件 + fdyService.updateById(fdy); + //2.通过主键id修改 + //fdyService.updateById(fdy); + return "redirect:/fdy/findBySql.action"; + } + + /** + * 删除通过主键 + * @return + */ + @RequestMapping(value = "/delete") + public String delete(Integer id, Model model, HttpServletRequest request, HttpServletResponse response) { + Fdy load = fdyService.load(id); + load.setIsDelete(1); + fdyService.updateById(load); + return "redirect:/fdy/findBySql.action"; + } + + + +} diff --git a/源码/src/main/java/com/kwxy/hyt/controller/LoginController.java b/源码/src/main/java/com/kwxy/hyt/controller/LoginController.java new file mode 100644 index 0000000..60daf5b --- /dev/null +++ b/源码/src/main/java/com/kwxy/hyt/controller/LoginController.java @@ -0,0 +1,196 @@ +package com.kwxy.hyt.controller; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.RequestMapping; + +import com.kwxy.hyt.base.BaseController; +import com.kwxy.hyt.po.Fdy; +import com.kwxy.hyt.po.Manage; +import com.kwxy.hyt.po.Student; +import com.kwxy.hyt.po.Teacher; +import com.kwxy.hyt.service.FdyService; +import com.kwxy.hyt.service.ManageService; +import com.kwxy.hyt.service.StudentService; +import com.kwxy.hyt.service.TeacherService; + +@Controller +@RequestMapping("/login") +public class LoginController extends BaseController{ + + @Autowired + private ManageService manageService; + @Autowired + private FdyService fdyService; + @Autowired + private TeacherService teacherService; + @Autowired + private StudentService studentService; + + /** + * 跳转登陆 管理员 + * @return + */ + @RequestMapping("/mLogin") + public String login(){ + return "login/mLogin"; + } + + /** + * 除了管理员意外的登陆 + * @return + */ + @RequestMapping("/uLogin") + public String uLogin(){ + return "login/login"; + } + + @RequestMapping("/message") + public String message(Integer type,Model model){ + if (type == 1){ + model.addAttribute("mess", "该辅导员并没有负责的班级。"); + } + return "login/message"; + } + + + /** + * 管理员退出 + * @param request + * @return + */ + @RequestMapping("/mtuichu") + public String mtuichu(HttpServletRequest request){ + //request.getSession().invalidate(); + return "login/mLogin"; + } + + /** + * 欢迎页 + * @return + */ + @RequestMapping("/welcome") + private String welcome(){ + return "login/welcome"; + } + + /** + * 管理员登陆 + * @param manage + * @param request + * @param response + * @return + */ + @RequestMapping("/toMlogin") + public String toLogin(Manage manage, HttpServletRequest request, HttpServletResponse response){ + Manage byEntity = manageService.getByEntity(manage); + if(byEntity == null){ + return "redirect:/login/mtuichu"; + }else{ + request.getSession().setAttribute("role", 1); + request.getSession().setAttribute("username", byEntity.getUsername()); + request.getSession().setAttribute("userId", byEntity.getId()); + } + return "login/index"; + } + + + /** + * 除了管理员意外的登陆 + * @param code + * @param password + * @param role + * @param request + * @param response + * @return + */ + @RequestMapping("/tologin") + public String toLogin(String code,String password,Integer role, HttpServletRequest request, HttpServletResponse response){ + + // 4 学生,3 任课教师 ,2辅导员 + + if (role == 4){ + Student s = new Student(); + s.setIsDelete(0); + s.setCode(code); + s.setPassword(password); + Student byEntity = studentService.getByEntity(s); + if(byEntity == null){ + return "redirect:/login/uLogin.action"; + }else{ + request.getSession().setAttribute("role",role); + request.getSession().setAttribute("username", byEntity.getUsername()); + request.getSession().setAttribute("userId", byEntity.getId()); + } + } + if (role == 3){ + Teacher s = new Teacher(); + s.setIsDelete(0); + s.setCode(code); + s.setPassword(password); + Teacher byEntity = teacherService.getByEntity(s); + if(byEntity == null){ + return "redirect:/login/uLogin.action"; + }else{ + request.getSession().setAttribute("role",role); + request.getSession().setAttribute("username", byEntity.getUsername()); + request.getSession().setAttribute("userId", byEntity.getId()); + } + } + if (role == 2){ + Fdy s = new Fdy(); + s.setCode(code); + s.setPassword(password); + Fdy byEntity = fdyService.getByEntity(s); + if(byEntity == null){ + return "redirect:/login/uLogin.action"; + }else{ + request.getSession().setAttribute("role",role); + request.getSession().setAttribute("username", byEntity.getUsername()); + request.getSession().setAttribute("userId", byEntity.getId()); + } + + } + return "login/index"; + } + + /** + * 退出 + * @param request + * @param response + * @return + */ + @RequestMapping("/tuichu") + public String tuichu( HttpServletRequest request, HttpServletResponse response){ + HttpSession session = request.getSession(); + session.invalidate(); + return "login/uLogin"; + } + + /* + * 其他角色退出 + */ + @RequestMapping("/uTui") + public String uTui( HttpServletRequest request, HttpServletResponse response){ + HttpSession session = request.getSession(); + session.invalidate(); + return "redirect:/login/uLogin"; + } + + + @RequestMapping("/head") + private String head(){ + return "inc/head"; + } + + @RequestMapping("/left") + private String left(){ + return "inc/left"; + } + +} diff --git a/源码/src/main/java/com/kwxy/hyt/controller/ManageController.java b/源码/src/main/java/com/kwxy/hyt/controller/ManageController.java new file mode 100644 index 0000000..ede6a54 --- /dev/null +++ b/源码/src/main/java/com/kwxy/hyt/controller/ManageController.java @@ -0,0 +1,526 @@ +package com.kwxy.hyt.controller; +import java.io.File; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.multipart.commons.CommonsMultipartFile; + +import com.alibaba.fastjson.JSONObject; +import com.kwxy.hyt.base.BaseController; +import com.kwxy.hyt.po.*; +import com.kwxy.hyt.utils.Pager; +import java.util.*; + +import com.kwxy.hyt.po.*; +import com.kwxy.hyt.mapper.*; +import com.kwxy.hyt.service.*; + +/** + * @ClassName: + * @Description: + * @author - - admin + * @date - 2018年10月27日 09时48分24秒 + */ + + +@Controller +@RequestMapping("/manage") +public class ManageController extends BaseController { + + + /** + * 依赖注入 start dao/service/=== + */ + @Autowired + private ManageService manageService; + + // --------------------------------------- 华丽分割线 ------------------------------ + + /*********************************查询列表【不分页】***********************************************/ + + /** + * 【不分页 => 查询列表 => 无条件】 + * @Title: listAll + * @Description: TODO(这里用一句话描述这个方法的作用) + * @param @return 设定文件 + * @author + * @return String 返回类型 + * @throws + */ + @RequestMapping(value = "/listAll") + public String listAll(Manage manage, Model model, HttpServletRequest request, HttpServletResponse response){ + List listAll = manageService.listAll(); + model.addAttribute("list", listAll); + return "manage/manage"; + } + + /** + * 【不分页=》查询列表=>有条件】 + * @Title: listByEntity + * @Description: TODO(这里用一句话描述这个方法的作用) + * @param @return 设定文件 + * @author + * @return String 返回类型 + * @throws + */ + @RequestMapping(value = "/listByEntity") + public String listByEntity(Manage manage, Model model, HttpServletRequest request, HttpServletResponse response){ + List listAll = manageService.listAllByEntity(manage); + model.addAttribute("list", listAll); + return "manage/manage"; + } + + /** + * 【不分页=》查询列表=>有条件】 + * @Title: listByMap + * @Description: TODO(这里用一句话描述这个方法的作用) + * @param @return 设定文件 + * @author + * @return String 返回类型 + * @throws + */ + @RequestMapping(value = "/listByMap") + public String listByMap(Manage manage, Model model, HttpServletRequest request, HttpServletResponse response){ + //通过map查询 + Map params = new HashMap(); + if(!isEmpty(manage.getUsername())){ + params.put("username", manage.getUsername()); + } + if(!isEmpty(manage.getPassword())){ + params.put("password", manage.getPassword()); + } + List listAll = manageService.listByMap(params); + model.addAttribute("list", listAll); + return "manage/manage"; + } + + + /*********************************查询列表【分页】***********************************************/ + + + + /** + * 分页查询 返回list对象(通过对象) + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/findByObj") + public String findByObj(Manage manage, Model model, HttpServletRequest request, HttpServletResponse response) { + //分页查询 + Pager pagers = manageService.findByEntity(manage); + model.addAttribute("pagers", pagers); + //存储查询条件 + model.addAttribute("obj", manage); + return "manage/manage"; + } + + /** + * 分页查询 返回list对象(通过对By Sql) + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/findBySql") + public String findBySql(Manage manage, Model model, HttpServletRequest request, HttpServletResponse response) { + //分页查询 + String sql = "SELECT * FROM manage WHERE 1=1 "; + if(!isEmpty(manage.getUsername())){ + sql += " and username like '%"+manage.getUsername()+"%'"; + } + if(!isEmpty(manage.getPassword())){ + sql += " and password like '%"+manage.getPassword()+"%'"; + } + sql += " ORDER BY ID DESC "; + Pager pagers = manageService.findBySqlRerturnEntity(sql); + model.addAttribute("pagers", pagers); + //存储查询条件 + model.addAttribute("obj", manage); + return "manage/manage"; + } + + + /** + * 分页查询 返回list对象(通过Map) + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/findByMap") + public String findByMap(Manage manage, Model model, HttpServletRequest request, HttpServletResponse response) { + //通过map查询 + Map params = new HashMap(); + if(!isEmpty(manage.getUsername())){ + params.put("username", manage.getUsername()); + } + if(!isEmpty(manage.getPassword())){ + params.put("password", manage.getPassword()); + } + //分页查询 + Pager pagers = manageService.findByMap(params); + model.addAttribute("pagers", pagers); + //存储查询条件 + model.addAttribute("obj", manage); + return "manage/manage"; + } + + /**********************************【增删改】******************************************************/ + + /** + * 跳至添加页面 + * @return + */ + @RequestMapping(value = "/add") + public String add() { + return "manage/add"; + } + + /** + * 跳至详情页面 + * @return + */ + @RequestMapping(value = "/view") + public String view(Integer id,Model model) { + Manage obj = manageService.load(id); + model.addAttribute("obj",obj); + return "manage/view"; + } + + /** + * 添加执行 + * @return + */ + @RequestMapping(value = "/exAdd") + public String exAdd(Manage manage, Model model, HttpServletRequest request, HttpServletResponse response) { + manageService.insert(manage); + return "redirect:/manage/findBySql.action"; + } + + + /** + * 跳至修改页面 + * @return + */ + @RequestMapping(value = "/update") + public String update(Integer id,Model model) { + Manage obj = manageService.load(id); + model.addAttribute("obj",obj); + return "manage/update"; + } + + /** + * 添加修改 + * @return + */ + @RequestMapping(value = "/exUpdate") + public String exUpdate(Manage manage, Model model, HttpServletRequest request, HttpServletResponse response) { + //1.通过实体类修改,可以多传修改条件 + manageService.updateById(manage); + //2.通过主键id修改 + //manageService.updateById(manage); + return "redirect:/manage/findBySql.action"; + } + + /** + * 删除通过主键 + * @return + */ + @RequestMapping(value = "/delete") + public String delete(Integer id, Model model, HttpServletRequest request, HttpServletResponse response) { + ///1.通过主键删除 + manageService.deleteById(id); + /*以下是多种删除方式*/ +// //2.通过实体条件删除 +// manageService.deleteByEntity(manage); +// //3.通过参数删除 +// //通过map查询 +// Map params = new HashMap(); +// +// if(!isEmpty(manage.getUsername())){ +// params.put("username", manage.getUsername()); +// } +// +// if(!isEmpty(manage.getPassword())){ +// params.put("password", manage.getPassword()); +// } +// +// manageService.deleteByMap(params); +// //4.状态删除 +// Manage load = manageService.getById(manage.getId()) +// load.setIsDelete(1); +// manageService.update(load); + //5.状态删除 + //Manage load = manageService.load(id); + //load.setIsDelete(1); + //manageService.updateById(load); + return "redirect:/manage/findBySql.action"; + } + + // --------------------------------------- 华丽分割线 ------------------------------ + // --------------------------------------- 【下面是ajax操作的方法。】 ------------------------------ + + /*********************************查询列表【不分页】***********************************************/ + + /** + * 【不分页 => 查询列表 => 无条件】 + * @Title: listAll + * @Description: TODO(这里用一句话描述这个方法的作用) + * @param @return 设定文件 + * @author + * @return String 返回类型 + * @throws + */ + @RequestMapping(value = "/listAllJson", method = RequestMethod.POST) + @ResponseBody + public String listAllJson(Manage manage, HttpServletRequest request, HttpServletResponse response){ + List listAll = manageService.listAll(); + JSONObject jsonObject = new JSONObject(); + jsonObject.put("list", listAll); + jsonObject.put("obj", manage); + return jsonObject.toString(); + } + + /** + * 【不分页=》查询列表=>有条件】 + * @Title: listByEntity + * @Description: TODO(这里用一句话描述这个方法的作用) + * @param @return 设定文件 + * @author + * @return String 返回类型 + * @throws + */ + @RequestMapping(value = "/listByEntityJson", method = RequestMethod.POST) + @ResponseBody + public String listByEntityJson(Manage manage, HttpServletRequest request, HttpServletResponse response){ + List listAll = manageService.listAllByEntity(manage); + JSONObject jsonObject = new JSONObject(); + jsonObject.put("list", listAll); + jsonObject.put("obj", manage); + return jsonObject.toString(); + } + + /** + * 【不分页=》查询列表=>有条件】 + * @Title: listByMap + * @Description: TODO(这里用一句话描述这个方法的作用) + * @param @return 设定文件 + * @author + * @return String 返回类型 + * @throws + */ + @RequestMapping(value = "/listByMapJson", method = RequestMethod.POST) + @ResponseBody + public String listByMapJson(Manage manage,HttpServletRequest request, HttpServletResponse response){ + //通过map查询 + Map params = new HashMap(); + if(!isEmpty(manage.getUsername())){ + params.put("username", manage.getUsername()); + } + if(!isEmpty(manage.getPassword())){ + params.put("password", manage.getPassword()); + } + List listAll = manageService.listByMap(params); + JSONObject jsonObject = new JSONObject(); + jsonObject.put("list", listAll); + jsonObject.put("obj", manage); + return jsonObject.toString(); + } + + + /** + * 分页查询 返回list json(通过对象) + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/findByObjJson", method = RequestMethod.POST) + @ResponseBody + public String findByObjByEntityJson(Manage manage, HttpServletRequest request, HttpServletResponse response) { + //分页查询 + Pager pagers = manageService.findByEntity(manage); + JSONObject jsonObject = new JSONObject(); + jsonObject.put("pagers", pagers); + jsonObject.put("obj", manage); + return jsonObject.toString(); + } + + + /** + * 分页查询 返回list json(通过Map) + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/findByMapJson", method = RequestMethod.POST) + @ResponseBody + public String findByMapJson(Manage manage,HttpServletRequest request, HttpServletResponse response) { + //通过map查询 + Map params = new HashMap(); + if(!isEmpty(manage.getUsername())){ + params.put("username", manage.getUsername()); + } + if(!isEmpty(manage.getPassword())){ + params.put("password", manage.getPassword()); + } + //分页查询 + Pager pagers = manageService.findByMap(params); + JSONObject jsonObject = new JSONObject(); + jsonObject.put("pagers", pagers); + jsonObject.put("obj", manage); + return jsonObject.toString(); + } + + + /** + * ajax 添加 + * @param + * @return + */ + @RequestMapping(value = "/exAddJson", method = RequestMethod.POST) + @ResponseBody + public String exAddJson(Manage manage, Model model, HttpServletRequest request, HttpServletResponse response) { + manageService.insert(manage); + JSONObject jsonObject = new JSONObject(); + jsonObject.put("message", "添加成功"); + return jsonObject.toString(); + } + + + /** + * ajax 修改 + * @param + * @return + */ + @RequestMapping(value = "/exUpdate.json", method = RequestMethod.POST) + @ResponseBody + public String exUpdateJson(Manage manage, Model model, HttpServletRequest request, HttpServletResponse response) { + //1.通过实体类修改,可以多传修改条件 + manageService.updateById(manage); + //2.通过主键id修改 + //manageService.updateById(manage); + JSONObject jsonObject = new JSONObject(); + jsonObject.put("message", "修改成功"); + return jsonObject.toString(); + } + + /** + * ajax 删除 + * @return + */ + @RequestMapping(value = "/delete.json", method = RequestMethod.POST) + @ResponseBody + public String exDeleteJson(Integer id, Model model, HttpServletRequest request, HttpServletResponse response) { + ///1.通过主键删除 + manageService.deleteById(id); + /*以下是多种删除方式*/ +// //2.通过实体条件删除 +// manageService.deleteByEntity(manage); +// //3.通过参数删除 +// //通过map查询 +// Map params = new HashMap(); +// +// if(!isEmpty(manage.getUsername())){ +// params.put("username", manage.getUsername()); +// } +// +// if(!isEmpty(manage.getPassword())){ +// params.put("password", manage.getPassword()); +// } +// +// manageService.deleteByMap(params); +// //4.状态删除 +// Manage load = manageService.getById(manage.getId()) +// load.setIsDelete(1); +// manageService.updateById(load); + //5.状态删除 + //Manage load = manageService.load(id); + //load.setIsDelete(1); + //manageService.updateById(load); + JSONObject jsonObject = new JSONObject(); + jsonObject.put("message", "删除成功"); + return jsonObject.toString(); + } + /** + * 单文件上传 + * @param file + * @param request + * @param model + * @return + */ + @RequestMapping(value = "/saveFile") + public String saveFile(@RequestParam(value = "file", required = false) MultipartFile file, HttpServletRequest request, Model model) { + + System.out.println("开始"); + String path = request.getSession().getServletContext().getRealPath("/upload"); + String fileName = file.getOriginalFilename(); + System.out.println(path); + File targetFile = new File(path, fileName); + if(!targetFile.exists()){ + targetFile.mkdirs(); + } + //保存 + try { + file.transferTo(targetFile); + } catch (Exception e) { + e.printStackTrace(); + } + + return ""; + } + + + /** + * springMvc多文件上传 + * @param files + * @param id + * @return + */ + @RequestMapping(value = "/saveFiles") + public String saveFiles(@RequestParam("file") CommonsMultipartFile[] files,Integer id,HttpServletRequest request){ + for(int i = 0;i" + files[i].getOriginalFilename()); + if(!files[i].isEmpty()){ + int pre = (int) System.currentTimeMillis(); + try { + //拿到输出流,同时重命名上传的文件 + String filePath = request.getRealPath("/upload"); + File f=new File(filePath); + if(!f.exists()){ + f.mkdirs(); + } + String fileNmae=new Date().getTime() + files[i].getOriginalFilename(); + File file=new File(filePath+"/"+pre + files[i].getOriginalFilename()); + if(!file.exists()){ + file.createNewFile(); + } + files[i].transferTo(file); + } catch (Exception e) { + e.printStackTrace(); + System.out.println("上传出错"); + } + } + } + return ""; + } + // --------------------------------------- 华丽分割线 ------------------------------ + + +} diff --git a/源码/src/main/java/com/kwxy/hyt/controller/QjController.java b/源码/src/main/java/com/kwxy/hyt/controller/QjController.java new file mode 100644 index 0000000..5b8c382 --- /dev/null +++ b/源码/src/main/java/com/kwxy/hyt/controller/QjController.java @@ -0,0 +1,326 @@ +package com.kwxy.hyt.controller; +import java.io.File; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.multipart.commons.CommonsMultipartFile; + +import com.alibaba.fastjson.JSONObject; +import com.kwxy.hyt.base.BaseController; +import com.kwxy.hyt.po.*; +import com.kwxy.hyt.utils.Pager; +import java.util.*; + +import com.kwxy.hyt.po.*; +import com.kwxy.hyt.mapper.*; +import com.kwxy.hyt.service.*; + +/** + * @ClassName: + * @Description: + * @author - - admin + * @date - 2018年10月27日 09时48分24秒 + */ + + +@Controller +@RequestMapping("/qj") +public class QjController extends BaseController { + + + /** + * 依赖注入 start dao/service/=== + */ + @Autowired + private QjService qjService; + + @Autowired + private StudentService studentService; + + @Autowired + private FdyService fdyService; + + /** + * 分页查询 返回list对象(通过对By Sql) + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/findBySql") + public String findBySql(Qj qj, Model model, HttpServletRequest request, HttpServletResponse response) { + + Object attribute = request.getSession().getAttribute("userId"); + + if (attribute == null){ + return "redirect:/login/uLogin"; + } + Integer userId = Integer.valueOf(attribute.toString()); + + + //分页查询 + String sql = "SELECT * FROM qj WHERE fdyId = "+userId; + if(!isEmpty(qj.getBjId())){ + sql += " and bjId like '%"+qj.getBjId()+"%'"; + } + if(!isEmpty(qj.getStudentId())){ + sql += " and studentId like '%"+qj.getStudentId()+"%'"; + } + if(!isEmpty(qj.getFdyId())){ + sql += " and fdyId like '%"+qj.getFdyId()+"%'"; + } + if(!isEmpty(qj.getStartTime())){ + sql += " and startTime like '%"+qj.getStartTime()+"%'"; + } + if(!isEmpty(qj.getEndTime())){ + sql += " and endTime like '%"+qj.getEndTime()+"%'"; + } + if(!isEmpty(qj.getStatus())){ + sql += " and status like '%"+qj.getStatus()+"%'"; + } + sql += " ORDER BY ID DESC "; + Pager pagers = qjService.findBySqlRerturnEntity(sql); + model.addAttribute("pagers", pagers); + //存储查询条件 + model.addAttribute("obj", qj); + return "qj/qj"; + } + + //findBySqlSign + @RequestMapping(value = "/findBySqlSign") + public String findBySqlSign(Qj qj, Model model, HttpServletRequest request, HttpServletResponse response) { + + //分页查询 + String sql = "SELECT * FROM qj WHERE bjId = "+qj.getBjId(); + if(!isEmpty(qj.getBjId())){ + sql += " and bjId like '%"+qj.getBjId()+"%'"; + } + if(!isEmpty(qj.getStudentId())){ + sql += " and studentId like '%"+qj.getStudentId()+"%'"; + } + if(!isEmpty(qj.getFdyId())){ + sql += " and fdyId like '%"+qj.getFdyId()+"%'"; + } + if(!isEmpty(qj.getStartTime())){ + sql += " and startTime like '%"+qj.getStartTime()+"%'"; + } + if(!isEmpty(qj.getEndTime())){ + sql += " and endTime like '%"+qj.getEndTime()+"%'"; + } + if(!isEmpty(qj.getStatus())){ + sql += " and status like '%"+qj.getStatus()+"%'"; + } + sql += " ORDER BY ID DESC "; + Pager pagers = qjService.findBySqlRerturnEntity(sql); + model.addAttribute("pagers", pagers); + //存储查询条件 + model.addAttribute("obj", qj); + model.addAttribute("bjId", qj.getBjId()); + return "qj/qjSign"; + } + + + /** + * 我的请假 + * @param qj + * @param model + * @param request + * @param response + * @return + */ + //myqj + //findBySqlSign + @RequestMapping(value = "/myqj") + public String myqj(Qj qj, Model model, HttpServletRequest request, HttpServletResponse response) { + + //分页查询 + + Object attribute = request.getSession().getAttribute("userId"); + + if (attribute == null){ + return "redirect:/login/uLogin"; + } + Integer userId = Integer.valueOf(attribute.toString()); + + String sql = "SELECT * FROM qj WHERE studentId = "+userId; + + if(!isEmpty(qj.getBjId())){ + sql += " and bjId like '%"+qj.getBjId()+"%'"; + } + if(!isEmpty(qj.getStudentId())){ + sql += " and studentId like '%"+qj.getStudentId()+"%'"; + } + if(!isEmpty(qj.getFdyId())){ + sql += " and fdyId like '%"+qj.getFdyId()+"%'"; + } + if(!isEmpty(qj.getStartTime())){ + sql += " and startTime like '%"+qj.getStartTime()+"%'"; + } + if(!isEmpty(qj.getEndTime())){ + sql += " and endTime like '%"+qj.getEndTime()+"%'"; + } + if(!isEmpty(qj.getStatus())){ + sql += " and status like '%"+qj.getStatus()+"%'"; + } + sql += " ORDER BY ID DESC "; + Pager pagers = qjService.findBySqlRerturnEntity(sql); + model.addAttribute("pagers", pagers); + //存储查询条件 + model.addAttribute("obj", qj); + return "qj/myqj"; + } + + /** + * 分页查询 返回list对象(通过Map) + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/findByMap") + public String findByMap(Qj qj, Model model, HttpServletRequest request, HttpServletResponse response) { + //通过map查询 + Map params = new HashMap(); + if(!isEmpty(qj.getBjId())){ + params.put("bjId", qj.getBjId()); + } + if(!isEmpty(qj.getStudentId())){ + params.put("studentId", qj.getStudentId()); + } + if(!isEmpty(qj.getFdyId())){ + params.put("fdyId", qj.getFdyId()); + } + if(!isEmpty(qj.getStartTime())){ + params.put("startTime", qj.getStartTime()); + } + if(!isEmpty(qj.getEndTime())){ + params.put("endTime", qj.getEndTime()); + } + if(!isEmpty(qj.getStatus())){ + params.put("status", qj.getStatus()); + } + //分页查询 + Pager pagers = qjService.findByMap(params); + model.addAttribute("pagers", pagers); + //存储查询条件 + model.addAttribute("obj", qj); + return "qj/qj"; + } + + /**********************************【增删改】******************************************************/ + + /** + * 跳至添加页面 + * @return + */ + @RequestMapping(value = "/add") + public String add() { + return "qj/add"; + } + + @RequestMapping(value = "/myadd") + public String myadd() { + return "qj/myadd"; + } + + /** + * 跳至详情页面 + * @return + */ + @RequestMapping(value = "/view") + public String view(Integer id,Model model) { + Qj obj = qjService.load(id); + model.addAttribute("obj",obj); + return "qj/view"; + } + + /** + * 添加执行 + * @return + */ + @RequestMapping(value = "/exAdd") + public String exAdd(Qj qj, Model model, HttpServletRequest request, HttpServletResponse response) { + + Object attribute = request.getSession().getAttribute("userId"); + + if (attribute == null){ + return "redirect:/login/uLogin"; + } + Integer userId = Integer.valueOf(attribute.toString()); + qj.setStatus(0); + + Student byId = studentService.getById(userId); + Integer bjId = byId.getBjId(); + Fdy f = new Fdy(); + f.setBjId(bjId); + List listAllByEntity = fdyService.listAllByEntity(f); + + qj.setBjId(bjId); + qj.setFdyId(listAllByEntity.get(0).getId()); + qj.setStudentId(userId); + + qjService.insert(qj); + return "redirect:/qj/myqj.action"; + } + + + /** + * 跳至修改页面 + * @return + */ + @RequestMapping(value = "/update") + public String update(Integer id,Model model) { + Qj obj = qjService.load(id); + model.addAttribute("obj",obj); + return "qj/update"; + } + + /** + * 添加修改 + * @return + */ + @RequestMapping(value = "/exUpdate") + public String exUpdate(Qj qj, Model model, HttpServletRequest request, HttpServletResponse response) { + //1.通过实体类修改,可以多传修改条件 + qjService.updateById(qj); + //2.通过主键id修改 + //qjService.updateById(qj); + return "redirect:/qj/myqj.action"; + } + + @RequestMapping(value = "/sp") + public String sp(Qj qj, Model model, HttpServletRequest request, HttpServletResponse response) { + //1.通过实体类修改,可以多传修改条件 + Qj byId = qjService.getById(qj.getId()); + byId.setStatus(qj.getStatus()); + byId.setContent(qj.getContent()); + qjService.updateById(byId); + return "redirect:/qj/findBySql.action"; + } + + /** + * 删除通过主键 + * @return + */ + @RequestMapping(value = "/delete") + public String delete(Integer id, Model model, HttpServletRequest request, HttpServletResponse response) { + ///1.通过主键删除 + qjService.deleteById(id); + return "redirect:/qj/myqj.action"; + } + + +} diff --git a/源码/src/main/java/com/kwxy/hyt/controller/RecordController.java b/源码/src/main/java/com/kwxy/hyt/controller/RecordController.java new file mode 100644 index 0000000..b8cb951 --- /dev/null +++ b/源码/src/main/java/com/kwxy/hyt/controller/RecordController.java @@ -0,0 +1,422 @@ +package com.kwxy.hyt.controller; +import java.io.File; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.util.CollectionUtils; +import org.springframework.util.StringUtils; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.multipart.commons.CommonsMultipartFile; + +import com.alibaba.fastjson.JSONObject; +import com.kwxy.hyt.base.BaseController; +import com.kwxy.hyt.po.*; +import com.kwxy.hyt.utils.Pager; +import java.util.*; + +import com.kwxy.hyt.po.*; +import com.kwxy.hyt.mapper.*; +import com.kwxy.hyt.service.*; + +/** + * @ClassName: + * @Description: + * @author - - admin + * @date - 2018年10月27日 09时48分24秒 + */ + + +@Controller +@RequestMapping("/record") +public class RecordController extends BaseController { + @Autowired + private SignService signService; + + /** + * 依赖注入 start dao/service/=== + */ + @Autowired + private RecordService recordService; + + // --------------------------------------- 华丽分割线 ------------------------------ + + /** + * 分页查询 返回list对象(通过对By Sql) + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/findBySql") + public String findBySql(Record record, Model model, HttpServletRequest request, HttpServletResponse response) { + //分页查询 + String sql = "SELECT * FROM record WHERE signId="+record.getSignId(); + if(!isEmpty(record.getSignId())){ + sql += " and signId like '%"+record.getSignId()+"%'"; + } + if(!isEmpty(record.getStudentId())){ + sql += " and studentId like '%"+record.getStudentId()+"%'"; + } + if(!isEmpty(record.getIp())){ + sql += " and ip like '%"+record.getIp()+"%'"; + } + if(!isEmpty(record.getCreateTime())){ + sql += " and createTime like '%"+record.getCreateTime()+"%'"; + } + if(!isEmpty(record.getStatus())){ + sql += " and status like '%"+record.getStatus()+"%'"; + } + sql += " ORDER BY ID DESC "; + Pager pagers = recordService.findBySqlRerturnEntity(sql); + model.addAttribute("pagers", pagers); + //存储查询条件 + model.addAttribute("obj", record); + model.addAttribute("signId", record.getSignId()); + return "record/record"; + } + + /** + * 辅导员查看签到记录 + * @param record + * @param model + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/fdyRecord") + public String fdyRecord(Record record, Model model, HttpServletRequest request, HttpServletResponse response) { + //分页查询 + String sql = "SELECT * FROM record WHERE signId="+record.getSignId(); + if(!isEmpty(record.getSignId())){ + sql += " and signId like '%"+record.getSignId()+"%'"; + } + if(!isEmpty(record.getStudentId())){ + sql += " and studentId like '%"+record.getStudentId()+"%'"; + } + if(!isEmpty(record.getIp())){ + sql += " and ip like '%"+record.getIp()+"%'"; + } + if(!isEmpty(record.getCreateTime())){ + sql += " and createTime like '%"+record.getCreateTime()+"%'"; + } + if(!isEmpty(record.getStatus())){ + sql += " and status like '%"+record.getStatus()+"%'"; + } + sql += " ORDER BY ID DESC "; + Pager pagers = recordService.findBySqlRerturnEntity(sql); + model.addAttribute("pagers", pagers); + //存储查询条件 + model.addAttribute("obj", record); + model.addAttribute("signId", record.getSignId()); + return "record/fdyRecord"; + } + + + //mysign + /** + * 查询学生自己可以签到列表 + * @param record + * @param model + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/mysign") + public String mysign(Record record, Model model, HttpServletRequest request, HttpServletResponse response) { + + Object attribute = request.getSession().getAttribute("userId"); + + if (attribute == null){ + return "redirect:/login/uLogin"; + } + Integer userId = Integer.valueOf(attribute.toString()); + + + //分页查询 + String sql = "SELECT * FROM record WHERE studentId="+userId; + if(!isEmpty(record.getSignId())){ + sql += " and signId like '%"+record.getSignId()+"%'"; + } + if(!isEmpty(record.getStudentId())){ + sql += " and studentId like '%"+record.getStudentId()+"%'"; + } + if(!isEmpty(record.getIp())){ + sql += " and ip like '%"+record.getIp()+"%'"; + } + if(!isEmpty(record.getCreateTime())){ + sql += " and createTime like '%"+record.getCreateTime()+"%'"; + } + if(!isEmpty(record.getStatus())){ + sql += " and status like '%"+record.getStatus()+"%'"; + } + sql += " ORDER BY ID DESC "; + Pager pagers = recordService.findBySqlRerturnEntity(sql); + model.addAttribute("pagers", pagers); + //存储查询条件 + model.addAttribute("obj", record); + model.addAttribute("signId", record.getSignId()); + return "record/mysign"; + } + + /** + * 分页查询 返回list对象(通过Map) + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/findByMap") + public String findByMap(Record record, Model model, HttpServletRequest request, HttpServletResponse response) { + //通过map查询 + Map params = new HashMap(); + if(!isEmpty(record.getSignId())){ + params.put("signId", record.getSignId()); + } + if(!isEmpty(record.getStudentId())){ + params.put("studentId", record.getStudentId()); + } + if(!isEmpty(record.getIp())){ + params.put("ip", record.getIp()); + } + if(!isEmpty(record.getCreateTime())){ + params.put("createTime", record.getCreateTime()); + } + if(!isEmpty(record.getStatus())){ + params.put("status", record.getStatus()); + } + //分页查询 + Pager pagers = recordService.findByMap(params); + model.addAttribute("pagers", pagers); + //存储查询条件 + model.addAttribute("obj", record); + return "record/record"; + } + + /**********************************【增删改】******************************************************/ + + /** + * 跳至添加页面 + * @return + */ + @RequestMapping(value = "/add") + public String add() { + return "record/add"; + } + + /** + * 跳至详情页面 + * @return + */ + @RequestMapping(value = "/view") + public String view(Integer id,Model model) { + Record obj = recordService.load(id); + model.addAttribute("obj",obj); + return "record/view"; + } + + /** + * 添加执行 + * @return + */ + @RequestMapping(value = "/exAdd") + @ResponseBody + public String exAdd(Record record, Model model, HttpServletRequest request, HttpServletResponse response) { + String ipAdrress = getIp(request); + Record obj = recordService.load(record.getId()); + + JSONObject j = new JSONObject(); + //查看是否有ip冲突 0 未签到 1 已签到 2 请假 + Record r = new Record(); + r.setSignId(obj.getSignId()); + r.setIp(ipAdrress); + + Integer status = obj.getSign().getStatus(); + if (status == 1){ + j.put("res",3); + return j.toString(); + } + + if (obj.getStatus() == 2){ + j.put("res", 2); + return j.toString(); + } + List listAllByEntity = recordService.listAllByEntity(r); + + if (!CollectionUtils.isEmpty(listAllByEntity)){ + j.put("res", 0); + return j.toString(); + }else{ + obj.setCreateTime(new Date()); + obj.setIp(ipAdrress); + obj.setStatus(1); + j.put("res", 1); + recordService.updateById(obj); + return j.toString(); + } + + + } + + private static String getIpAdrress(HttpServletRequest request) { + String Xip = request.getHeader("X-Real-IP"); + String XFor = request.getHeader("X-Forwarded-For"); + if(!StringUtils.isEmpty(XFor) && !"unKnown".equalsIgnoreCase(XFor)){ + //多次反向代理后会有多个ip值,第一个ip才是真实ip + int index = XFor.indexOf(","); + if(index != -1){ + return XFor.substring(0,index); + }else{ + return XFor; + } + } + XFor = Xip; + if(!StringUtils.isEmpty(XFor) && !"unKnown".equalsIgnoreCase(XFor)){ + return XFor; + } + if (!StringUtils.isEmpty(XFor) || "unknown".equalsIgnoreCase(XFor)) { + XFor = request.getHeader("Proxy-Client-IP"); + } + if (!StringUtils.isEmpty(XFor) || "unknown".equalsIgnoreCase(XFor)) { + XFor = request.getHeader("WL-Proxy-Client-IP"); + } + if (!StringUtils.isEmpty(XFor) || "unknown".equalsIgnoreCase(XFor)) { + XFor = request.getHeader("HTTP_CLIENT_IP"); + } + if (!StringUtils.isEmpty(XFor) || "unknown".equalsIgnoreCase(XFor)) { + XFor = request.getHeader("HTTP_X_FORWARDED_FOR"); + } + if (!StringUtils.isEmpty(XFor) || "unknown".equalsIgnoreCase(XFor)) { + XFor = request.getRemoteAddr(); + } + return XFor; + } + + private String getIp(HttpServletRequest request){ + String ip = request.getHeader("X-Forwarded-For"); + if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { + if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { + ip = request.getHeader("Proxy-Client-IP"); + } + if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { + ip = request.getHeader("WL-Proxy-Client-IP"); + } + if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { + ip = request.getHeader("HTTP_CLIENT_IP"); + } + if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { + ip = request.getHeader("HTTP_X_FORWARDED_FOR"); + } + if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { + ip = request.getRemoteAddr(); + } + } else if (ip.length() > 15) { + String[] ips = ip.split(","); + for (int index = 0; index < ips.length; index++) { + String strIp = ips[index]; + if (!("unknown".equalsIgnoreCase(strIp))) { + ip = strIp; + break; + } + } + } + return ip; + } + + /** + * 跳至修改页面 + * @return + */ + @RequestMapping(value = "/update") + public String update(Integer id,Model model) { + Record obj = recordService.load(id); + model.addAttribute("obj",obj); + return "record/update"; + } + + /** + * 添加修改 + * @return + */ + + @RequestMapping(value = "/setQd") + public String setQd(Record record, Model model, HttpServletRequest request, HttpServletResponse response) { + Record obj = recordService.load(record.getId()); + //1.通过实体类修改,可以多传修改条件 + obj.setStatus(2); + recordService.updateById(obj); + //2.通过主键id修改 + //recordService.updateById(record); + return "redirect:/record/findBySql.action?signId="+obj.getSignId(); + } + + + @RequestMapping(value = "/exUpdate") + public String exUpdate(Record record, Model model, HttpServletRequest request, HttpServletResponse response) { + //1.通过实体类修改,可以多传修改条件 + recordService.updateById(record); + //2.通过主键id修改 + //recordService.updateById(record); + return "redirect:/record/findBySql.action"; + } + + /** + * 删除通过主键 + * @return + */ + @RequestMapping(value = "/delete") + public String delete(Integer id, Model model, HttpServletRequest request, HttpServletResponse response) { + ///1.通过主键删除 + recordService.deleteById(id); + /*以下是多种删除方式*/ +// //2.通过实体条件删除 +// recordService.deleteByEntity(record); +// //3.通过参数删除 +// //通过map查询 +// Map params = new HashMap(); +// +// if(!isEmpty(record.getSignId())){ +// params.put("signId", record.getSignId()); +// } +// +// if(!isEmpty(record.getStudentId())){ +// params.put("studentId", record.getStudentId()); +// } +// +// if(!isEmpty(record.getIp())){ +// params.put("ip", record.getIp()); +// } +// +// if(!isEmpty(record.getCreateTime())){ +// params.put("createTime", record.getCreateTime()); +// } +// +// if(!isEmpty(record.getStatus())){ +// params.put("status", record.getStatus()); +// } +// +// recordService.deleteByMap(params); +// //4.状态删除 +// Record load = recordService.getById(record.getId()) +// load.setIsDelete(1); +// recordService.update(load); + //5.状态删除 + //Record load = recordService.load(id); + //load.setIsDelete(1); + //recordService.updateById(load); + return "redirect:/record/findBySql.action"; + } + + +} diff --git a/源码/src/main/java/com/kwxy/hyt/controller/SignController.java b/源码/src/main/java/com/kwxy/hyt/controller/SignController.java new file mode 100644 index 0000000..7fbaa7e --- /dev/null +++ b/源码/src/main/java/com/kwxy/hyt/controller/SignController.java @@ -0,0 +1,338 @@ +package com.kwxy.hyt.controller; +import java.io.File; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.util.CollectionUtils; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.multipart.commons.CommonsMultipartFile; + +import com.alibaba.fastjson.JSONObject; +import com.kwxy.hyt.base.BaseController; +import com.kwxy.hyt.po.*; +import com.kwxy.hyt.utils.Pager; +import java.util.*; + +import com.kwxy.hyt.po.*; +import com.kwxy.hyt.mapper.*; +import com.kwxy.hyt.service.*; + +/** + * @ClassName: + * @Description: + * @author - - admin + * @date - 2018年10月27日 09时48分24秒 + */ + + +@Controller +@RequestMapping("/sign") +public class SignController extends BaseController { + + /** + * 依赖注入 start dao/service/=== + */ + @Autowired + private RecordService recordService; + + @Autowired + private SignService signService; + + + @Autowired + private TeacherBjService teacherBjService; + + @Autowired + private FdyService fdyService; + + @Autowired + private StudentService studentService; + + /** + * 教师查看自己所教学的班级 + * mybj + */ + + @RequestMapping(value = "/mybj") + public String mybj(Sign sign, Model model, HttpServletRequest request, HttpServletResponse response) { + + Object attribute = request.getSession().getAttribute("userId"); + + if (attribute == null){ + return "redirect:/login/uLogin"; + } + Integer userId = Integer.valueOf(attribute.toString()); + TeacherBj b = new TeacherBj(); + b.setTeacherId(userId); + List listAllByEntity = teacherBjService.listAllByEntity(b); + model.addAttribute("bjs", listAllByEntity); + return "sign/mybj"; + } + + @RequestMapping(value = "/mybj2") + public String mybj2(Sign sign, Model model, HttpServletRequest request, HttpServletResponse response) { + + Object attribute = request.getSession().getAttribute("userId"); + + if (attribute == null){ + return "redirect:/login/uLogin"; + } + Integer userId = Integer.valueOf(attribute.toString()); + TeacherBj b = new TeacherBj(); + b.setTeacherId(userId); + List listAllByEntity = teacherBjService.listAllByEntity(b); + model.addAttribute("bjs", listAllByEntity); + return "sign/mybj2"; + } + + + //${ctx}/sign/mySign.do?bjId=${data.bjId} + + @RequestMapping(value = "/findBySql") + public String findBySql(Sign sign, Model model, HttpServletRequest request, HttpServletResponse response) { + //分页查询 + Object attribute = request.getSession().getAttribute("userId"); + + if (attribute == null){ + return "redirect:/login/uLogin"; + } + Integer userId = Integer.valueOf(attribute.toString()); + + String sql = "SELECT * FROM sign WHERE bjId= "+sign.getBjId() + " and teacherId="+userId; + if(!isEmpty(sign.getBjId())){ + sql += " and bjId like '%"+sign.getBjId()+"%'"; + } + if(!isEmpty(sign.getTeacherId())){ + sql += " and teacherId like '%"+sign.getTeacherId()+"%'"; + } + if(!isEmpty(sign.getName())){ + sql += " and name like '%"+sign.getName()+"%'"; + } + if(!isEmpty(sign.getStatus())){ + sql += " and status like '%"+sign.getStatus()+"%'"; + } + if(!isEmpty(sign.getFdyId())){ + sql += " and fdyId like '%"+sign.getFdyId()+"%'"; + } + sql += " ORDER BY ID DESC "; + Pager pagers = signService.findBySqlRerturnEntity(sql); + model.addAttribute("pagers", pagers); + //存储查询条件 + model.addAttribute("obj", sign); + model.addAttribute("bjId", sign.getBjId()); + return "sign/sign"; + } + + /** + * 辅导员列表 + * @param sign + * @param model + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/fdySign") + public String fdySign(Sign sign, Model model, HttpServletRequest request, HttpServletResponse response) { + //分页查询 + Object attribute = request.getSession().getAttribute("userId"); + + if (attribute == null){ + return "redirect:/login/uLogin"; + } + Integer userId = Integer.valueOf(attribute.toString()); + + String sql = "SELECT * FROM sign WHERE fdyId= "+userId; + + if(!isEmpty(sign.getBjId())){ + sql += " and bjId like '%"+sign.getBjId()+"%'"; + } + if(!isEmpty(sign.getTeacherId())){ + sql += " and teacherId like '%"+sign.getTeacherId()+"%'"; + } + if(!isEmpty(sign.getName())){ + sql += " and name like '%"+sign.getName()+"%'"; + } + if(!isEmpty(sign.getStatus())){ + sql += " and status like '%"+sign.getStatus()+"%'"; + } + if(!isEmpty(sign.getFdyId())){ + sql += " and fdyId like '%"+sign.getFdyId()+"%'"; + } + sql += " ORDER BY ID DESC "; + Pager pagers = signService.findBySqlRerturnEntity(sql); + model.addAttribute("pagers", pagers); + //存储查询条件 + model.addAttribute("obj", sign); + return "sign/fdySign"; + } + + + + + /** + * 分页查询 返回list对象(通过Map) + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/findByMap") + public String findByMap(Sign sign, Model model, HttpServletRequest request, HttpServletResponse response) { + //通过map查询 + Map params = new HashMap(); + if(!isEmpty(sign.getBjId())){ + params.put("bjId", sign.getBjId()); + } + if(!isEmpty(sign.getTeacherId())){ + params.put("teacherId", sign.getTeacherId()); + } + if(!isEmpty(sign.getName())){ + params.put("name", sign.getName()); + } + if(!isEmpty(sign.getStatus())){ + params.put("status", sign.getStatus()); + } + if(!isEmpty(sign.getFdyId())){ + params.put("fdyId", sign.getFdyId()); + } + //分页查询 + Pager pagers = signService.findByMap(params); + model.addAttribute("pagers", pagers); + //存储查询条件 + model.addAttribute("obj", sign); + return "sign/sign"; + } + + /**********************************【增删改】******************************************************/ + + /** + * 跳至添加页面 + * @return + */ + @RequestMapping(value = "/add") + public String add(Integer bjId,Model model) { + model.addAttribute("bjId", bjId); + return "sign/add"; + } + + /** + * 跳至详情页面 + * @return + */ + @RequestMapping(value = "/view") + public String view(Integer id,Model model) { + Sign obj = signService.load(id); + model.addAttribute("obj",obj); + return "sign/view"; + } + + /** + * 添加执行 + * @return + */ + @RequestMapping(value = "/exAdd") + public String exAdd(Sign sign, Model model, HttpServletRequest request, HttpServletResponse response) { + Object attribute = request.getSession().getAttribute("userId"); + + if (attribute == null){ + return "redirect:/login/uLogin"; + } + Integer userId = Integer.valueOf(attribute.toString()); + sign.setTeacherId(userId); + sign.setStatus(0); + signService.insert(sign); + //查询学生,插入记录表 + Student s = new Student(); + s.setBjId(sign.getBjId()); + s.setIsDelete(0); + List listAllByEntity = studentService.listAllByEntity(s); + if (!CollectionUtils.isEmpty(listAllByEntity)){ + + for (Student ss : listAllByEntity){ + Record re = new Record(); + // re.setCreateTime(new Date()); + re.setSignId(sign.getId()); + //0 未签到 1 已签到 2 请假 + re.setStatus(0); + re.setStudentId(ss.getId()); + recordService.insert(re); + } + } + return "redirect:/sign/findBySql.action?bjId="+sign.getBjId(); + } + + + /** + * 跳至修改页面 + * @return + */ + @RequestMapping(value = "/update") + public String update(Integer id,Model model) { + Sign obj = signService.load(id); + model.addAttribute("obj",obj); + return "sign/update"; + } + + /** + * 添加修改 + * @return + */ + @RequestMapping(value = "/sp") + public String sp(Sign sign, Model model, HttpServletRequest request, HttpServletResponse response) { + //1.通过实体类修改,可以多传修改条件 + Sign obj = signService.load(sign.getId()); + + if (sign.getStatus() == 2){ + Fdy f = new Fdy(); + f.setBjId(obj.getBjId()); + Fdy byEntity = null; + try { + byEntity = fdyService.listAllByEntity(f).get(0); + obj.setFdyId(byEntity.getId()); + obj.setStatus(sign.getStatus()); + signService.updateById(obj); + } catch (Exception e) { + + } + + } + + + //2.通过主键id修改 + //signService.updateById(sign); + return "redirect:/sign/findBySql.action?bjId="+obj.getBjId(); + } + + @RequestMapping(value = "/exUpdate") + public String exUpdate(Sign sign, Model model, HttpServletRequest request, HttpServletResponse response) { + Sign obj = signService.load(sign.getId()); + signService.updateById(sign); + return "redirect:/sign/findBySql?bjId="+obj.getBjId(); + } + + /** + * 删除通过主键 + * @return + */ + @RequestMapping(value = "/delete") + public String delete(Integer id, Model model, HttpServletRequest request, HttpServletResponse response) { + Sign obj = signService.load(id); + ///1.通过主键删除 + signService.deleteById(id); + return "redirect:/sign/findBySql?bjId="+obj.getBjId(); + } + + +} diff --git a/源码/src/main/java/com/kwxy/hyt/controller/StudentController.java b/源码/src/main/java/com/kwxy/hyt/controller/StudentController.java new file mode 100644 index 0000000..8379b49 --- /dev/null +++ b/源码/src/main/java/com/kwxy/hyt/controller/StudentController.java @@ -0,0 +1,254 @@ +package com.kwxy.hyt.controller; +import java.io.File; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.multipart.commons.CommonsMultipartFile; + +import com.alibaba.fastjson.JSONObject; +import com.kwxy.hyt.base.BaseController; +import com.kwxy.hyt.po.*; +import com.kwxy.hyt.utils.Pager; +import java.util.*; + +import com.kwxy.hyt.po.*; +import com.kwxy.hyt.mapper.*; +import com.kwxy.hyt.service.*; + +/** + * @ClassName: + * @Description: + * @author - - admin + * @date - 2018年10月27日 09时48分24秒 + */ + + +@Controller +@RequestMapping("/student") +public class StudentController extends BaseController { + + @Autowired + private BjService bjService; + /** + * 依赖注入 start dao/service/=== + */ + @Autowired + private StudentService studentService; + + @Autowired + private FdyService fdyService; + + @Autowired + private RecordService recordService; + + // --------------------------------------- 华丽分割线 ------------------------------ + + + /** + * 分页查询 返回list对象(通过对By Sql) + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/findBySql") + public String findBySql(Student student, Model model, HttpServletRequest request, HttpServletResponse response) { + + Object attribute = request.getSession().getAttribute("userId"); + + if (attribute == null){ + return "redirect:/login/uLogin"; + } + Integer userId = Integer.valueOf(attribute.toString()); + Fdy byId = fdyService.getById(userId); + if (byId== null || byId.getBjId() == null){ + return "redirect:/login/message?type=1"; + } + //分页查询 + String sql = "SELECT * FROM student WHERE isDelete = 0 and bjId = "+ byId.getBjId(); + if(!isEmpty(student.getCode())){ + sql += " and code like '%"+student.getCode()+"%'"; + } + if(!isEmpty(student.getUsername())){ + sql += " and username like '%"+student.getUsername()+"%'"; + } + if(!isEmpty(student.getPassword())){ + sql += " and password like '%"+student.getPassword()+"%'"; + } + if(!isEmpty(student.getBjId())){ + sql += " and bjId like '%"+student.getBjId()+"%'"; + } + if(!isEmpty(student.getIsDelete())){ + sql += " and isDelete like '%"+student.getIsDelete()+"%'"; + } + sql += " ORDER BY ID DESC "; + Pager pagers = studentService.findBySqlRerturnEntity(sql); + model.addAttribute("pagers", pagers); + //存储查询条件 + model.addAttribute("obj", student); + return "student/student"; + } + + @RequestMapping(value = "/pass") + public String pass(Integer id,HttpServletRequest request,Model model) { + Object attribute = request.getSession().getAttribute("userId"); + + if (attribute == null){ + return "redirect:/login/uLogin"; + } + Integer userId = Integer.valueOf(attribute.toString()); + Student obj = studentService.load(userId); + model.addAttribute("obj",obj); + return "student/pass"; + } + + + @RequestMapping("/upass") + @ResponseBody + public String upass(HttpServletRequest request,String password){ + Object attribute = request.getSession().getAttribute("userId"); + JSONObject j = new JSONObject(); + if (attribute == null){ + j.put("res", 0); + return j.toString(); + } + Integer userId = Integer.valueOf(attribute.toString()); + Student byId = studentService.getById(userId); + byId.setPassword(password); + studentService.updateById(byId); + j.put("res", 1); + return j.toString(); + + } + + /** + * 分页查询 返回list对象(通过Map) + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/findByMap") + public String findByMap(Student student, Model model, HttpServletRequest request, HttpServletResponse response) { + //通过map查询 + Map params = new HashMap(); + if(!isEmpty(student.getCode())){ + params.put("code", student.getCode()); + } + if(!isEmpty(student.getUsername())){ + params.put("username", student.getUsername()); + } + if(!isEmpty(student.getPassword())){ + params.put("password", student.getPassword()); + } + if(!isEmpty(student.getBjId())){ + params.put("bjId", student.getBjId()); + } + if(!isEmpty(student.getIsDelete())){ + params.put("isDelete", student.getIsDelete()); + } + //分页查询 + Pager pagers = studentService.findByMap(params); + model.addAttribute("pagers", pagers); + //存储查询条件 + model.addAttribute("obj", student); + return "student/student"; + } + + /**********************************【增删改】******************************************************/ + + /** + * 跳至添加页面 + * @return + */ + @RequestMapping(value = "/add") + public String add() { + return "student/add"; + } + + /** + * 跳至详情页面 + * @return + */ + @RequestMapping(value = "/view") + public String view(Integer id,Model model) { + Student obj = studentService.load(id); + model.addAttribute("obj",obj); + return "student/view"; + } + + /** + * 添加执行 + * @return + */ + @RequestMapping(value = "/exAdd") + public String exAdd(Student student, Model model, HttpServletRequest request, HttpServletResponse response) { + + Object attribute = request.getSession().getAttribute("userId"); + + if (attribute == null){ + return "redirect:/login/uLogin"; + } + Integer userId = Integer.valueOf(attribute.toString()); + Fdy byId = fdyService.getById(userId); + if (byId== null || byId.getBjId() == null){ + return "redirect:/login/message?type=1"; + } + student.setBjId(byId.getBjId()); + student.setIsDelete(0); + studentService.insert(student); + return "redirect:/student/findBySql.action"; + } + + + /** + * 跳至修改页面 + * @return + */ + @RequestMapping(value = "/update") + public String update(Integer id,Model model) { + Student obj = studentService.load(id); + model.addAttribute("obj",obj); + return "student/update"; + } + + /** + * 添加修改 + * @return + */ + @RequestMapping(value = "/exUpdate") + public String exUpdate(Student student, Model model, HttpServletRequest request, HttpServletResponse response) { + //1.通过实体类修改,可以多传修改条件 + studentService.updateById(student); + //2.通过主键id修改 + //studentService.updateById(student); + return "redirect:/student/findBySql.action"; + } + + /** + * 删除通过主键 + * @return + */ + @RequestMapping(value = "/delete") + public String delete(Integer id, Model model, HttpServletRequest request, HttpServletResponse response) { + Student load = studentService.load(id); + load.setIsDelete(1); + studentService.updateById(load); + return "redirect:/student/findBySql.action"; + } + + +} diff --git a/源码/src/main/java/com/kwxy/hyt/controller/TeacherBjController.java b/源码/src/main/java/com/kwxy/hyt/controller/TeacherBjController.java new file mode 100644 index 0000000..ba8362a --- /dev/null +++ b/源码/src/main/java/com/kwxy/hyt/controller/TeacherBjController.java @@ -0,0 +1,526 @@ +package com.kwxy.hyt.controller; +import java.io.File; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.multipart.commons.CommonsMultipartFile; + +import com.alibaba.fastjson.JSONObject; +import com.kwxy.hyt.base.BaseController; +import com.kwxy.hyt.po.*; +import com.kwxy.hyt.utils.Pager; +import java.util.*; + +import com.kwxy.hyt.po.*; +import com.kwxy.hyt.mapper.*; +import com.kwxy.hyt.service.*; + +/** + * @ClassName: + * @Description: + * @author - - admin + * @date - 2018年10月27日 09时48分24秒 + */ + + +@Controller +@RequestMapping("/teacherBj") +public class TeacherBjController extends BaseController { + + + /** + * 依赖注入 start dao/service/=== + */ + @Autowired + private TeacherBjService teacherBjService; + + // --------------------------------------- 华丽分割线 ------------------------------ + + /*********************************查询列表【不分页】***********************************************/ + + /** + * 【不分页 => 查询列表 => 无条件】 + * @Title: listAll + * @Description: TODO(这里用一句话描述这个方法的作用) + * @param @return 设定文件 + * @author + * @return String 返回类型 + * @throws + */ + @RequestMapping(value = "/listAll") + public String listAll(TeacherBj teacherBj, Model model, HttpServletRequest request, HttpServletResponse response){ + List listAll = teacherBjService.listAll(); + model.addAttribute("list", listAll); + return "teacherBj/teacherBj"; + } + + /** + * 【不分页=》查询列表=>有条件】 + * @Title: listByEntity + * @Description: TODO(这里用一句话描述这个方法的作用) + * @param @return 设定文件 + * @author + * @return String 返回类型 + * @throws + */ + @RequestMapping(value = "/listByEntity") + public String listByEntity(TeacherBj teacherBj, Model model, HttpServletRequest request, HttpServletResponse response){ + List listAll = teacherBjService.listAllByEntity(teacherBj); + model.addAttribute("list", listAll); + return "teacherBj/teacherBj"; + } + + /** + * 【不分页=》查询列表=>有条件】 + * @Title: listByMap + * @Description: TODO(这里用一句话描述这个方法的作用) + * @param @return 设定文件 + * @author + * @return String 返回类型 + * @throws + */ + @RequestMapping(value = "/listByMap") + public String listByMap(TeacherBj teacherBj, Model model, HttpServletRequest request, HttpServletResponse response){ + //通过map查询 + Map params = new HashMap(); + if(!isEmpty(teacherBj.getTeacherId())){ + params.put("teacherId", teacherBj.getTeacherId()); + } + if(!isEmpty(teacherBj.getBjId())){ + params.put("bjId", teacherBj.getBjId()); + } + List listAll = teacherBjService.listByMap(params); + model.addAttribute("list", listAll); + return "teacherBj/teacherBj"; + } + + + /*********************************查询列表【分页】***********************************************/ + + + + /** + * 分页查询 返回list对象(通过对象) + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/findByObj") + public String findByObj(TeacherBj teacherBj, Model model, HttpServletRequest request, HttpServletResponse response) { + //分页查询 + Pager pagers = teacherBjService.findByEntity(teacherBj); + model.addAttribute("pagers", pagers); + //存储查询条件 + model.addAttribute("obj", teacherBj); + return "teacherBj/teacherBj"; + } + + /** + * 分页查询 返回list对象(通过对By Sql) + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/findBySql") + public String findBySql(TeacherBj teacherBj, Model model, HttpServletRequest request, HttpServletResponse response) { + //分页查询 + String sql = "SELECT * FROM teacherBj WHERE 1=1 "; + if(!isEmpty(teacherBj.getTeacherId())){ + sql += " and teacherId like '%"+teacherBj.getTeacherId()+"%'"; + } + if(!isEmpty(teacherBj.getBjId())){ + sql += " and bjId like '%"+teacherBj.getBjId()+"%'"; + } + sql += " ORDER BY ID DESC "; + Pager pagers = teacherBjService.findBySqlRerturnEntity(sql); + model.addAttribute("pagers", pagers); + //存储查询条件 + model.addAttribute("obj", teacherBj); + return "teacherBj/teacherBj"; + } + + + /** + * 分页查询 返回list对象(通过Map) + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/findByMap") + public String findByMap(TeacherBj teacherBj, Model model, HttpServletRequest request, HttpServletResponse response) { + //通过map查询 + Map params = new HashMap(); + if(!isEmpty(teacherBj.getTeacherId())){ + params.put("teacherId", teacherBj.getTeacherId()); + } + if(!isEmpty(teacherBj.getBjId())){ + params.put("bjId", teacherBj.getBjId()); + } + //分页查询 + Pager pagers = teacherBjService.findByMap(params); + model.addAttribute("pagers", pagers); + //存储查询条件 + model.addAttribute("obj", teacherBj); + return "teacherBj/teacherBj"; + } + + /**********************************【增删改】******************************************************/ + + /** + * 跳至添加页面 + * @return + */ + @RequestMapping(value = "/add") + public String add() { + return "teacherBj/add"; + } + + /** + * 跳至详情页面 + * @return + */ + @RequestMapping(value = "/view") + public String view(Integer id,Model model) { + TeacherBj obj = teacherBjService.load(id); + model.addAttribute("obj",obj); + return "teacherBj/view"; + } + + /** + * 添加执行 + * @return + */ + @RequestMapping(value = "/exAdd") + public String exAdd(TeacherBj teacherBj, Model model, HttpServletRequest request, HttpServletResponse response) { + teacherBjService.insert(teacherBj); + return "redirect:/teacherBj/findBySql.action"; + } + + + /** + * 跳至修改页面 + * @return + */ + @RequestMapping(value = "/update") + public String update(Integer id,Model model) { + TeacherBj obj = teacherBjService.load(id); + model.addAttribute("obj",obj); + return "teacherBj/update"; + } + + /** + * 添加修改 + * @return + */ + @RequestMapping(value = "/exUpdate") + public String exUpdate(TeacherBj teacherBj, Model model, HttpServletRequest request, HttpServletResponse response) { + //1.通过实体类修改,可以多传修改条件 + teacherBjService.updateById(teacherBj); + //2.通过主键id修改 + //teacherBjService.updateById(teacherBj); + return "redirect:/teacherBj/findBySql.action"; + } + + /** + * 删除通过主键 + * @return + */ + @RequestMapping(value = "/delete") + public String delete(Integer id, Model model, HttpServletRequest request, HttpServletResponse response) { + ///1.通过主键删除 + teacherBjService.deleteById(id); + /*以下是多种删除方式*/ +// //2.通过实体条件删除 +// teacherBjService.deleteByEntity(teacherBj); +// //3.通过参数删除 +// //通过map查询 +// Map params = new HashMap(); +// +// if(!isEmpty(teacherBj.getTeacherId())){ +// params.put("teacherId", teacherBj.getTeacherId()); +// } +// +// if(!isEmpty(teacherBj.getBjId())){ +// params.put("bjId", teacherBj.getBjId()); +// } +// +// teacherBjService.deleteByMap(params); +// //4.状态删除 +// TeacherBj load = teacherBjService.getById(teacherBj.getId()) +// load.setIsDelete(1); +// teacherBjService.update(load); + //5.状态删除 + //TeacherBj load = teacherBjService.load(id); + //load.setIsDelete(1); + //teacherBjService.updateById(load); + return "redirect:/teacherBj/findBySql.action"; + } + + // --------------------------------------- 华丽分割线 ------------------------------ + // --------------------------------------- 【下面是ajax操作的方法。】 ------------------------------ + + /*********************************查询列表【不分页】***********************************************/ + + /** + * 【不分页 => 查询列表 => 无条件】 + * @Title: listAll + * @Description: TODO(这里用一句话描述这个方法的作用) + * @param @return 设定文件 + * @author + * @return String 返回类型 + * @throws + */ + @RequestMapping(value = "/listAllJson", method = RequestMethod.POST) + @ResponseBody + public String listAllJson(TeacherBj teacherBj, HttpServletRequest request, HttpServletResponse response){ + List listAll = teacherBjService.listAll(); + JSONObject jsonObject = new JSONObject(); + jsonObject.put("list", listAll); + jsonObject.put("obj", teacherBj); + return jsonObject.toString(); + } + + /** + * 【不分页=》查询列表=>有条件】 + * @Title: listByEntity + * @Description: TODO(这里用一句话描述这个方法的作用) + * @param @return 设定文件 + * @author + * @return String 返回类型 + * @throws + */ + @RequestMapping(value = "/listByEntityJson", method = RequestMethod.POST) + @ResponseBody + public String listByEntityJson(TeacherBj teacherBj, HttpServletRequest request, HttpServletResponse response){ + List listAll = teacherBjService.listAllByEntity(teacherBj); + JSONObject jsonObject = new JSONObject(); + jsonObject.put("list", listAll); + jsonObject.put("obj", teacherBj); + return jsonObject.toString(); + } + + /** + * 【不分页=》查询列表=>有条件】 + * @Title: listByMap + * @Description: TODO(这里用一句话描述这个方法的作用) + * @param @return 设定文件 + * @author + * @return String 返回类型 + * @throws + */ + @RequestMapping(value = "/listByMapJson", method = RequestMethod.POST) + @ResponseBody + public String listByMapJson(TeacherBj teacherBj,HttpServletRequest request, HttpServletResponse response){ + //通过map查询 + Map params = new HashMap(); + if(!isEmpty(teacherBj.getTeacherId())){ + params.put("teacherId", teacherBj.getTeacherId()); + } + if(!isEmpty(teacherBj.getBjId())){ + params.put("bjId", teacherBj.getBjId()); + } + List listAll = teacherBjService.listByMap(params); + JSONObject jsonObject = new JSONObject(); + jsonObject.put("list", listAll); + jsonObject.put("obj", teacherBj); + return jsonObject.toString(); + } + + + /** + * 分页查询 返回list json(通过对象) + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/findByObjJson", method = RequestMethod.POST) + @ResponseBody + public String findByObjByEntityJson(TeacherBj teacherBj, HttpServletRequest request, HttpServletResponse response) { + //分页查询 + Pager pagers = teacherBjService.findByEntity(teacherBj); + JSONObject jsonObject = new JSONObject(); + jsonObject.put("pagers", pagers); + jsonObject.put("obj", teacherBj); + return jsonObject.toString(); + } + + + /** + * 分页查询 返回list json(通过Map) + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/findByMapJson", method = RequestMethod.POST) + @ResponseBody + public String findByMapJson(TeacherBj teacherBj,HttpServletRequest request, HttpServletResponse response) { + //通过map查询 + Map params = new HashMap(); + if(!isEmpty(teacherBj.getTeacherId())){ + params.put("teacherId", teacherBj.getTeacherId()); + } + if(!isEmpty(teacherBj.getBjId())){ + params.put("bjId", teacherBj.getBjId()); + } + //分页查询 + Pager pagers = teacherBjService.findByMap(params); + JSONObject jsonObject = new JSONObject(); + jsonObject.put("pagers", pagers); + jsonObject.put("obj", teacherBj); + return jsonObject.toString(); + } + + + /** + * ajax 添加 + * @param + * @return + */ + @RequestMapping(value = "/exAddJson", method = RequestMethod.POST) + @ResponseBody + public String exAddJson(TeacherBj teacherBj, Model model, HttpServletRequest request, HttpServletResponse response) { + teacherBjService.insert(teacherBj); + JSONObject jsonObject = new JSONObject(); + jsonObject.put("message", "添加成功"); + return jsonObject.toString(); + } + + + /** + * ajax 修改 + * @param + * @return + */ + @RequestMapping(value = "/exUpdate.json", method = RequestMethod.POST) + @ResponseBody + public String exUpdateJson(TeacherBj teacherBj, Model model, HttpServletRequest request, HttpServletResponse response) { + //1.通过实体类修改,可以多传修改条件 + teacherBjService.updateById(teacherBj); + //2.通过主键id修改 + //teacherBjService.updateById(teacherBj); + JSONObject jsonObject = new JSONObject(); + jsonObject.put("message", "修改成功"); + return jsonObject.toString(); + } + + /** + * ajax 删除 + * @return + */ + @RequestMapping(value = "/delete.json", method = RequestMethod.POST) + @ResponseBody + public String exDeleteJson(Integer id, Model model, HttpServletRequest request, HttpServletResponse response) { + ///1.通过主键删除 + teacherBjService.deleteById(id); + /*以下是多种删除方式*/ +// //2.通过实体条件删除 +// teacherBjService.deleteByEntity(teacherBj); +// //3.通过参数删除 +// //通过map查询 +// Map params = new HashMap(); +// +// if(!isEmpty(teacherBj.getTeacherId())){ +// params.put("teacherId", teacherBj.getTeacherId()); +// } +// +// if(!isEmpty(teacherBj.getBjId())){ +// params.put("bjId", teacherBj.getBjId()); +// } +// +// teacherBjService.deleteByMap(params); +// //4.状态删除 +// TeacherBj load = teacherBjService.getById(teacherBj.getId()) +// load.setIsDelete(1); +// teacherBjService.updateById(load); + //5.状态删除 + //TeacherBj load = teacherBjService.load(id); + //load.setIsDelete(1); + //teacherBjService.updateById(load); + JSONObject jsonObject = new JSONObject(); + jsonObject.put("message", "删除成功"); + return jsonObject.toString(); + } + /** + * 单文件上传 + * @param file + * @param request + * @param model + * @return + */ + @RequestMapping(value = "/saveFile") + public String saveFile(@RequestParam(value = "file", required = false) MultipartFile file, HttpServletRequest request, Model model) { + + System.out.println("开始"); + String path = request.getSession().getServletContext().getRealPath("/upload"); + String fileName = file.getOriginalFilename(); + System.out.println(path); + File targetFile = new File(path, fileName); + if(!targetFile.exists()){ + targetFile.mkdirs(); + } + //保存 + try { + file.transferTo(targetFile); + } catch (Exception e) { + e.printStackTrace(); + } + + return ""; + } + + + /** + * springMvc多文件上传 + * @param files + * @param id + * @return + */ + @RequestMapping(value = "/saveFiles") + public String saveFiles(@RequestParam("file") CommonsMultipartFile[] files,Integer id,HttpServletRequest request){ + for(int i = 0;i" + files[i].getOriginalFilename()); + if(!files[i].isEmpty()){ + int pre = (int) System.currentTimeMillis(); + try { + //拿到输出流,同时重命名上传的文件 + String filePath = request.getRealPath("/upload"); + File f=new File(filePath); + if(!f.exists()){ + f.mkdirs(); + } + String fileNmae=new Date().getTime() + files[i].getOriginalFilename(); + File file=new File(filePath+"/"+pre + files[i].getOriginalFilename()); + if(!file.exists()){ + file.createNewFile(); + } + files[i].transferTo(file); + } catch (Exception e) { + e.printStackTrace(); + System.out.println("上传出错"); + } + } + } + return ""; + } + // --------------------------------------- 华丽分割线 ------------------------------ + + +} diff --git a/源码/src/main/java/com/kwxy/hyt/controller/TeacherController.java b/源码/src/main/java/com/kwxy/hyt/controller/TeacherController.java new file mode 100644 index 0000000..1aa6b81 --- /dev/null +++ b/源码/src/main/java/com/kwxy/hyt/controller/TeacherController.java @@ -0,0 +1,312 @@ +package com.kwxy.hyt.controller; +import java.io.File; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.util.CollectionUtils; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.multipart.commons.CommonsMultipartFile; + +import com.alibaba.fastjson.JSONObject; +import com.kwxy.hyt.base.BaseController; +import com.kwxy.hyt.po.*; +import com.kwxy.hyt.utils.Pager; +import java.util.*; + +import com.kwxy.hyt.po.*; +import com.kwxy.hyt.mapper.*; +import com.kwxy.hyt.service.*; + +/** + * @ClassName: + * @Description: + * @author - - admin + * @date - 2018年10月27日 09时48分24秒 + */ + + +@Controller +@RequestMapping("/teacher") +public class TeacherController extends BaseController { + + + /** + * 依赖注入 start dao/service/=== + */ + @Autowired + private TeacherService teacherService; + + @Autowired + private BjService bjService; + + @Autowired + private TeacherBjService teacherBjService; + + + // --------------------------------------- 华丽分割线 ------------------------------ + + + + + /** + * 分页查询 返回list对象(通过对象) + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/findByObj") + public String findByObj(Teacher teacher, Model model, HttpServletRequest request, HttpServletResponse response) { + //分页查询 + Pager pagers = teacherService.findByEntity(teacher); + model.addAttribute("pagers", pagers); + //存储查询条件 + model.addAttribute("obj", teacher); + return "teacher/teacher"; + } + + /** + * 分页查询 返回list对象(通过对By Sql) + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/findBySql") + public String findBySql(Teacher teacher, Model model, HttpServletRequest request, HttpServletResponse response) { + //分页查询 + String sql = "SELECT * FROM teacher WHERE isDelete = 0 "; + if(!isEmpty(teacher.getCode())){ + sql += " and code like '%"+teacher.getCode()+"%'"; + } + if(!isEmpty(teacher.getUsername())){ + sql += " and username like '%"+teacher.getUsername()+"%'"; + } + if(!isEmpty(teacher.getPassword())){ + sql += " and password like '%"+teacher.getPassword()+"%'"; + } + if(!isEmpty(teacher.getKc())){ + sql += " and kc like '%"+teacher.getKc()+"%'"; + } + if(!isEmpty(teacher.getIsDelete())){ + sql += " and isDelete like '%"+teacher.getIsDelete()+"%'"; + } + sql += " ORDER BY ID DESC "; + Pager pagers = teacherService.findBySqlRerturnEntity(sql); + model.addAttribute("pagers", pagers); + //存储查询条件 + model.addAttribute("obj", teacher); + return "teacher/teacher"; + } + + + /** + * 分页查询 返回list对象(通过Map) + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/findByMap") + public String findByMap(Teacher teacher, Model model, HttpServletRequest request, HttpServletResponse response) { + //通过map查询 + Map params = new HashMap(); + if(!isEmpty(teacher.getCode())){ + params.put("code", teacher.getCode()); + } + if(!isEmpty(teacher.getUsername())){ + params.put("username", teacher.getUsername()); + } + if(!isEmpty(teacher.getPassword())){ + params.put("password", teacher.getPassword()); + } + if(!isEmpty(teacher.getKc())){ + params.put("kc", teacher.getKc()); + } + if(!isEmpty(teacher.getIsDelete())){ + params.put("isDelete", teacher.getIsDelete()); + } + //分页查询 + Pager pagers = teacherService.findByMap(params); + model.addAttribute("pagers", pagers); + //存储查询条件 + model.addAttribute("obj", teacher); + return "teacher/teacher"; + } + + /**********************************【增删改】******************************************************/ + + /** + * 跳至添加页面 + * @return + */ + @RequestMapping(value = "/add") + public String add(Model model) { + // 查询班级列表 + Bj b = new Bj(); + b.setIsDelete(0); + List listAllByEntity = bjService.listAllByEntity(b); + model.addAttribute("bjs", listAllByEntity); + return "teacher/add"; + } + + @RequestMapping(value = "/pass") + public String pass(Integer id,HttpServletRequest request,Model model) { + Object attribute = request.getSession().getAttribute("userId"); + + if (attribute == null){ + return "redirect:/login/uLogin"; + } + Integer userId = Integer.valueOf(attribute.toString()); + Teacher obj = teacherService.load(userId); + model.addAttribute("obj",obj); + return "teacher/pass"; + } + + + @RequestMapping("/upass") + @ResponseBody + public String upass(HttpServletRequest request,String password){ + Object attribute = request.getSession().getAttribute("userId"); + JSONObject j = new JSONObject(); + if (attribute == null){ + j.put("res", 0); + return j.toString(); + } + Integer userId = Integer.valueOf(attribute.toString()); + Teacher byId = teacherService.getById(userId); + byId.setPassword(password); + teacherService.updateById(byId); + j.put("res", 1); + return j.toString(); + + } + + /** + * 跳至详情页面 + * @return + */ + @RequestMapping(value = "/view") + public String view(Integer id,Model model) { + Teacher obj = teacherService.load(id); + model.addAttribute("obj",obj); + return "teacher/view"; + } + + /** + * 添加执行 + * @return + */ + @RequestMapping(value = "/exAdd") + public String exAdd(Teacher teacher,@RequestParam(value = "ids") Integer[] ids, Model model, HttpServletRequest request, HttpServletResponse response) { + + if (ids != null && ids.length > 0){ + teacher.setIsDelete(0); + teacherService.insert(teacher); + for (Integer bId : ids){ + TeacherBj tb = new TeacherBj(); + tb.setBjId(bId); + tb.setTeacherId(teacher.getId()); + teacherBjService.insert(tb); + } + } + + + return "redirect:/teacher/findBySql.action"; + } + + + /** + * 跳至修改页面 + * @return + */ + @RequestMapping(value = "/update") + public String update(Integer id,Model model) { + Teacher obj = teacherService.load(id); + // 查询班级列表 + Bj b = new Bj(); + b.setIsDelete(0); + List listAllByEntity = bjService.listAllByEntity(b); + //查看教师已经选中的 + TeacherBj t = new TeacherBj(); + t.setTeacherId(id); + List select = teacherBjService.listAllByEntity(t); + + List ids = new ArrayList(); + + if (!CollectionUtils.isEmpty(select)){ + for (TeacherBj b2 : select){ + ids.add(b2.getBjId()); + } + } + + if (!CollectionUtils.isEmpty(listAllByEntity)){ + + for (Bj bj : listAllByEntity){ + + if (!CollectionUtils.isEmpty(ids) && ids.contains(bj.getId())){ + bj.setIsCheck(1); + }else{ + bj.setIsCheck(0); + } + } + } + + + model.addAttribute("bjs", listAllByEntity); + model.addAttribute("obj",obj); + return "teacher/update"; + } + + /** + * 添加修改 + * @return + */ + @RequestMapping(value = "/exUpdate") + public String exUpdate(Teacher teacher,@RequestParam(value = "ids") Integer[] ids, Model model, HttpServletRequest request, HttpServletResponse response) { + teacherService.updateById(teacher); + if (ids != null && ids.length > 0){ + teacher.setIsDelete(0); + //删除 + TeacherBj t = new TeacherBj(); + t.setTeacherId(teacher.getId()); + teacherBjService.deleteByEntity(t); + for (Integer bId : ids){ + TeacherBj tb = new TeacherBj(); + tb.setBjId(bId); + tb.setTeacherId(teacher.getId()); + teacherBjService.insert(tb); + } + } + return "redirect:/teacher/findBySql.action"; + } + + /** + * 删除通过主键 + * @return + */ + @RequestMapping(value = "/delete") + public String delete(Integer id, Model model, HttpServletRequest request, HttpServletResponse response) { + Teacher load = teacherService.load(id); + TeacherBj t = new TeacherBj(); + t.setTeacherId(id); + teacherBjService.deleteByEntity(t); + load.setIsDelete(1); + teacherService.updateById(load); + return "redirect:/teacher/findBySql.action"; + } + + +} diff --git a/源码/src/main/java/com/kwxy/hyt/filter/SystemContextFilter.java b/源码/src/main/java/com/kwxy/hyt/filter/SystemContextFilter.java new file mode 100644 index 0000000..c105abb --- /dev/null +++ b/源码/src/main/java/com/kwxy/hyt/filter/SystemContextFilter.java @@ -0,0 +1,56 @@ +package com.kwxy.hyt.filter; + +import java.io.IOException; + +import javax.servlet.Filter; +import javax.servlet.FilterChain; +import javax.servlet.FilterConfig; +import javax.servlet.ServletException; +import javax.servlet.ServletRequest; +import javax.servlet.ServletResponse; +import javax.servlet.http.HttpServletRequest; + +import com.kwxy.hyt.utils.SystemContext; + + + + + +public class SystemContextFilter implements Filter{ + private Integer pageSize; + + public void destroy() { + + } + + public void doFilter(ServletRequest req, ServletResponse resp, + FilterChain chain) throws IOException, ServletException { + Integer offset = 0; + try { + offset = Integer.parseInt(req.getParameter("pager.offset")); + } catch (NumberFormatException e) {} + try { + SystemContext.setOrder(req.getParameter("order")); + SystemContext.setSort(req.getParameter("sort")); + SystemContext.setPageOffset(offset); + SystemContext.setPageSize(pageSize); + SystemContext.setRealPath(((HttpServletRequest)req).getSession().getServletContext().getRealPath("/")); + chain.doFilter(req,resp); + } finally { + SystemContext.removeOrder(); + SystemContext.removeSort(); + SystemContext.removePageOffset(); + SystemContext.removePageSize(); + SystemContext.removeRealPath(); + } + } + + public void init(FilterConfig cfg) throws ServletException { + try { + pageSize = Integer.parseInt(cfg.getInitParameter("pageSize")); + } catch (NumberFormatException e) { + pageSize = 15; + } + } + +} diff --git a/源码/src/main/java/com/kwxy/hyt/mapper/BjMapper.java b/源码/src/main/java/com/kwxy/hyt/mapper/BjMapper.java new file mode 100644 index 0000000..2ed8e2d --- /dev/null +++ b/源码/src/main/java/com/kwxy/hyt/mapper/BjMapper.java @@ -0,0 +1,27 @@ +package com.kwxy.hyt.mapper; +/** + * @ClassName: + * @Description: + * @author administrator + * @date - 2018年10月27日 09时48分23秒 + */ +import com.kwxy.hyt.base.BaseDao; +import com.kwxy.hyt.po.*; +import com.kwxy.hyt.utils.Pager; +import java.util.*; + +import com.kwxy.hyt.po.*; +import com.kwxy.hyt.mapper.*; +import com.kwxy.hyt.service.*; + +/** + * @ClassName: + * @Description: + * @author - - admin + * @date - 2018年10月27日 09时48分23秒 + */ + + +public interface BjMapper extends BaseDao{ + +} diff --git a/源码/src/main/java/com/kwxy/hyt/mapper/BjMapper.xml b/源码/src/main/java/com/kwxy/hyt/mapper/BjMapper.xml new file mode 100644 index 0000000..e03ac88 --- /dev/null +++ b/源码/src/main/java/com/kwxy/hyt/mapper/BjMapper.xml @@ -0,0 +1,343 @@ + + + + + + + + + + + + + + + + + id, + name, + zy, + isDelete + + + + + #{id} , + #{name} , + #{zy} , + #{isDelete} + + + + + + name = #{name} , + + + zy = #{zy} , + + + isDelete = #{isDelete} + + + + + + + and id =#{id} + + + and name =#{name} + + + and zy =#{zy} + + + and isDelete =#{isDelete} + + + + + + + + + + + + INSERT INTO bj ( + + ) VALUES ( + + ) + + + + + + + delete from bj where id=#{id} + + + + + + delete from bj + WHERE 1=1 + + + + + + + delete from bj + WHERE 1=1 + + + + + + + + UPDATE bj + + + + WHERE 1=1 + + + + + + UPDATE bj + + + + WHERE 1=1 + and id=#{id} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + INSERT INTO bj ( + + ) VALUES + + ( + + #{item.name} , + #{item.zy} , + #{item.isDelete} + + ) + + + + + + + + UPDATE + bj + + + name = #{item.name}, + + + zy = #{item.zy}, + + + isDelete = #{item.isDelete} + + + WHERE + 1=1 + + + + + + + + + + + + + + + + + + + + + + + ${sql} + + + + ${sql} + + + + diff --git a/源码/src/main/java/com/kwxy/hyt/mapper/FdyMapper.java b/源码/src/main/java/com/kwxy/hyt/mapper/FdyMapper.java new file mode 100644 index 0000000..d7410a7 --- /dev/null +++ b/源码/src/main/java/com/kwxy/hyt/mapper/FdyMapper.java @@ -0,0 +1,27 @@ +package com.kwxy.hyt.mapper; +/** + * @ClassName: + * @Description: + * @author administrator + * @date - 2018年10月27日 09时48分23秒 + */ +import com.kwxy.hyt.base.BaseDao; +import com.kwxy.hyt.po.*; +import com.kwxy.hyt.utils.Pager; +import java.util.*; + +import com.kwxy.hyt.po.*; +import com.kwxy.hyt.mapper.*; +import com.kwxy.hyt.service.*; + +/** + * @ClassName: + * @Description: + * @author - - admin + * @date - 2018年10月27日 09时48分23秒 + */ + + +public interface FdyMapper extends BaseDao{ + +} diff --git a/源码/src/main/java/com/kwxy/hyt/mapper/FdyMapper.xml b/源码/src/main/java/com/kwxy/hyt/mapper/FdyMapper.xml new file mode 100644 index 0000000..38e2501 --- /dev/null +++ b/源码/src/main/java/com/kwxy/hyt/mapper/FdyMapper.xml @@ -0,0 +1,379 @@ + + + + + + + + + + + + + + + + + + + + + id, + username, + password, + code, + sex, + bjId, + isDelete + + + + + #{id} , + #{username} , + #{password} , + #{code} , + #{sex} , + #{bjId} , + #{isDelete} + + + + + + username = #{username} , + + + password = #{password} , + + + code = #{code} , + + + sex = #{sex} , + + + bjId = #{bjId} , + + + isDelete = #{isDelete} + + + + + + + and id =#{id} + + + and username =#{username} + + + and password =#{password} + + + and code =#{code} + + + and sex =#{sex} + + + and bjId =#{bjId} + + + and isDelete =#{isDelete} + + + + + + + + + + + + INSERT INTO fdy ( + + ) VALUES ( + + ) + + + + + + + delete from fdy where id=#{id} + + + + + + delete from fdy + WHERE 1=1 + + + + + + + delete from fdy + WHERE 1=1 + + + + + + + + UPDATE fdy + + + + WHERE 1=1 + + + + + + UPDATE fdy + + + + WHERE 1=1 + and id=#{id} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + INSERT INTO fdy ( + + ) VALUES + + ( + + #{item.username} , + #{item.password} , + #{item.code} , + #{item.sex} , + #{item.bjId} + + ) + + + + + + + + UPDATE + fdy + + + username = #{item.username}, + + + password = #{item.password}, + + + code = #{item.code}, + + + sex = #{item.sex}, + + + bjId = #{item.bjId} + + + WHERE + 1=1 + + + + + + + + + + + + + + + + + + + + + + + ${sql} + + + + ${sql} + + + + diff --git a/源码/src/main/java/com/kwxy/hyt/mapper/ManageMapper.java b/源码/src/main/java/com/kwxy/hyt/mapper/ManageMapper.java new file mode 100644 index 0000000..e22725b --- /dev/null +++ b/源码/src/main/java/com/kwxy/hyt/mapper/ManageMapper.java @@ -0,0 +1,27 @@ +package com.kwxy.hyt.mapper; +/** + * @ClassName: + * @Description: + * @author administrator + * @date - 2018年10月27日 09时48分24秒 + */ +import com.kwxy.hyt.base.BaseDao; +import com.kwxy.hyt.po.*; +import com.kwxy.hyt.utils.Pager; +import java.util.*; + +import com.kwxy.hyt.po.*; +import com.kwxy.hyt.mapper.*; +import com.kwxy.hyt.service.*; + +/** + * @ClassName: + * @Description: + * @author - - admin + * @date - 2018年10月27日 09时48分24秒 + */ + + +public interface ManageMapper extends BaseDao{ + +} diff --git a/源码/src/main/java/com/kwxy/hyt/mapper/ManageMapper.xml b/源码/src/main/java/com/kwxy/hyt/mapper/ManageMapper.xml new file mode 100644 index 0000000..7c489fd --- /dev/null +++ b/源码/src/main/java/com/kwxy/hyt/mapper/ManageMapper.xml @@ -0,0 +1,330 @@ + + + + + + + + + + + + + + + + id, + username, + password + + + + + #{id} , + #{username} , + #{password} + + + + + + username = #{username} , + + + password = #{password} + + + + + + + and id =#{id} + + + and username =#{username} + + + and password =#{password} + + + + + + + + + + + + INSERT INTO manage ( + + ) VALUES ( + + ) + + + + + + + delete from manage where id=#{id} + + + + + + delete from manage + WHERE 1=1 + + + + + + + delete from manage + WHERE 1=1 + + + + + + + + UPDATE manage + + + + WHERE 1=1 + + + + + + UPDATE manage + + + + WHERE 1=1 + and id=#{id} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + INSERT INTO manage ( + + ) VALUES + + ( + + #{item.username} , + #{item.password} + + ) + + + + + + + + UPDATE + manage + + + username = #{item.username}, + + + password = #{item.password} + + + WHERE + 1=1 + + + + + + + + + + + + + + + + + + + + + + + ${sql} + + + + ${sql} + + + + diff --git a/源码/src/main/java/com/kwxy/hyt/mapper/QjMapper.java b/源码/src/main/java/com/kwxy/hyt/mapper/QjMapper.java new file mode 100644 index 0000000..d43a2e4 --- /dev/null +++ b/源码/src/main/java/com/kwxy/hyt/mapper/QjMapper.java @@ -0,0 +1,27 @@ +package com.kwxy.hyt.mapper; +/** + * @ClassName: + * @Description: + * @author administrator + * @date - 2018年10月27日 09时48分24秒 + */ +import com.kwxy.hyt.base.BaseDao; +import com.kwxy.hyt.po.*; +import com.kwxy.hyt.utils.Pager; +import java.util.*; + +import com.kwxy.hyt.po.*; +import com.kwxy.hyt.mapper.*; +import com.kwxy.hyt.service.*; + +/** + * @ClassName: + * @Description: + * @author - - admin + * @date - 2018年10月27日 09时48分24秒 + */ + + +public interface QjMapper extends BaseDao{ + +} diff --git a/源码/src/main/java/com/kwxy/hyt/mapper/QjMapper.xml b/源码/src/main/java/com/kwxy/hyt/mapper/QjMapper.xml new file mode 100644 index 0000000..9f38985 --- /dev/null +++ b/源码/src/main/java/com/kwxy/hyt/mapper/QjMapper.xml @@ -0,0 +1,405 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + id, + bjId, + studentId, + fdyId, + startTime, + endTime, + status, + reason, + content + + + + + #{id} , + #{bjId} , + #{studentId} , + #{fdyId} , + #{startTime} , + #{endTime} , + #{status} , + #{reason} , + #{content} + + + + + + bjId = #{bjId} , + + + studentId = #{studentId} , + + + fdyId = #{fdyId} , + + + startTime = #{startTime} , + + + endTime = #{endTime} , + + + status = #{status} , + + + reason = #{reason} , + + + content = #{content} + + + + + + + and id =#{id} + + + and bjId =#{bjId} + + + and studentId =#{studentId} + + + and fdyId =#{fdyId} + + + and startTime =#{startTime} + + + and endTime =#{endTime} + + + and status =#{status} + + + and reason = #{reason} + + + and content = #{content} + + + + + + + + + + + + INSERT INTO qj ( + + ) VALUES ( + + ) + + + + + + + delete from qj where id=#{id} + + + + + + delete from qj + WHERE 1=1 + + + + + + + delete from qj + WHERE 1=1 + + + + + + + + UPDATE qj + + + + WHERE 1=1 + + + + + + UPDATE qj + + + + WHERE 1=1 + and id=#{id} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + INSERT INTO qj ( + + ) VALUES + + ( + + #{item.bjId} , + #{item.studentId} , + #{item.fdyId} , + #{item.startTime} , + #{item.endTime} , + #{item.status} + + ) + + + + + + + + UPDATE + qj + + + bjId = #{item.bjId}, + + + studentId = #{item.studentId}, + + + fdyId = #{item.fdyId}, + + + startTime = #{item.startTime}, + + + endTime = #{item.endTime}, + + + status = #{item.status} + + + WHERE + 1=1 + + + + + + + + + + + + + + + + + + + + + + + ${sql} + + + + ${sql} + + + + diff --git a/源码/src/main/java/com/kwxy/hyt/mapper/RecordMapper.java b/源码/src/main/java/com/kwxy/hyt/mapper/RecordMapper.java new file mode 100644 index 0000000..614d132 --- /dev/null +++ b/源码/src/main/java/com/kwxy/hyt/mapper/RecordMapper.java @@ -0,0 +1,27 @@ +package com.kwxy.hyt.mapper; +/** + * @ClassName: + * @Description: + * @author administrator + * @date - 2018年10月27日 09时48分24秒 + */ +import com.kwxy.hyt.base.BaseDao; +import com.kwxy.hyt.po.*; +import com.kwxy.hyt.utils.Pager; +import java.util.*; + +import com.kwxy.hyt.po.*; +import com.kwxy.hyt.mapper.*; +import com.kwxy.hyt.service.*; + +/** + * @ClassName: + * @Description: + * @author - - admin + * @date - 2018年10月27日 09时48分24秒 + */ + + +public interface RecordMapper extends BaseDao{ + +} diff --git a/源码/src/main/java/com/kwxy/hyt/mapper/RecordMapper.xml b/源码/src/main/java/com/kwxy/hyt/mapper/RecordMapper.xml new file mode 100644 index 0000000..e98cc2d --- /dev/null +++ b/源码/src/main/java/com/kwxy/hyt/mapper/RecordMapper.xml @@ -0,0 +1,371 @@ + + + + + + + + + + + + + + + + + + + + + id, + signId, + studentId, + ip, + createTime, + status + + + + + #{id} , + #{signId} , + #{studentId} , + #{ip} , + #{createTime} , + #{status} + + + + + + signId = #{signId} , + + + studentId = #{studentId} , + + + ip = #{ip} , + + + createTime = #{createTime} , + + + status = #{status} + + + + + + + and id =#{id} + + + and signId =#{signId} + + + and studentId =#{studentId} + + + and ip =#{ip} + + + and createTime =#{createTime} + + + and status =#{status} + + + + + + + + + + + + INSERT INTO record ( + + ) VALUES ( + + ) + + + + + + + delete from record where id=#{id} + + + + + + delete from record + WHERE 1=1 + + + + + + + delete from record + WHERE 1=1 + + + + + + + + UPDATE record + + + + WHERE 1=1 + + + + + + UPDATE record + + + + WHERE 1=1 + and id=#{id} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + INSERT INTO record ( + + ) VALUES + + ( + + #{item.signId} , + #{item.studentId} , + #{item.ip} , + #{item.createTime} , + #{item.status} + + ) + + + + + + + + UPDATE + record + + + signId = #{item.signId}, + + + studentId = #{item.studentId}, + + + ip = #{item.ip}, + + + createTime = #{item.createTime}, + + + status = #{item.status} + + + WHERE + 1=1 + + + + + + + + + + + + + + + + + + + + + + + ${sql} + + + + ${sql} + + + + diff --git a/源码/src/main/java/com/kwxy/hyt/mapper/SignMapper.java b/源码/src/main/java/com/kwxy/hyt/mapper/SignMapper.java new file mode 100644 index 0000000..a80cd4f --- /dev/null +++ b/源码/src/main/java/com/kwxy/hyt/mapper/SignMapper.java @@ -0,0 +1,27 @@ +package com.kwxy.hyt.mapper; +/** + * @ClassName: + * @Description: + * @author administrator + * @date - 2018年10月27日 09时48分24秒 + */ +import com.kwxy.hyt.base.BaseDao; +import com.kwxy.hyt.po.*; +import com.kwxy.hyt.utils.Pager; +import java.util.*; + +import com.kwxy.hyt.po.*; +import com.kwxy.hyt.mapper.*; +import com.kwxy.hyt.service.*; + +/** + * @ClassName: + * @Description: + * @author - - admin + * @date - 2018年10月27日 09时48分24秒 + */ + + +public interface SignMapper extends BaseDao{ + +} diff --git a/源码/src/main/java/com/kwxy/hyt/mapper/SignMapper.xml b/源码/src/main/java/com/kwxy/hyt/mapper/SignMapper.xml new file mode 100644 index 0000000..d956445 --- /dev/null +++ b/源码/src/main/java/com/kwxy/hyt/mapper/SignMapper.xml @@ -0,0 +1,373 @@ + + + + + + + + + + + + + + + + + + + + + + + id, + bjId, + teacherId, + name, + status, + fdyId + + + + + #{id} , + #{bjId} , + #{teacherId} , + #{name} , + #{status} , + #{fdyId} + + + + + + bjId = #{bjId} , + + + teacherId = #{teacherId} , + + + name = #{name} , + + + status = #{status} , + + + fdyId = #{fdyId} + + + + + + + and id =#{id} + + + and bjId =#{bjId} + + + and teacherId =#{teacherId} + + + and name =#{name} + + + and status =#{status} + + + and fdyId =#{fdyId} + + + + + + + + + + + + INSERT INTO sign ( + + ) VALUES ( + + ) + + + + + + + delete from sign where id=#{id} + + + + + + delete from sign + WHERE 1=1 + + + + + + + delete from sign + WHERE 1=1 + + + + + + + + UPDATE sign + + + + WHERE 1=1 + + + + + + UPDATE sign + + + + WHERE 1=1 + and id=#{id} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + INSERT INTO sign ( + + ) VALUES + + ( + + #{item.bjId} , + #{item.teacherId} , + #{item.name} , + #{item.status} , + #{item.fdyId} + + ) + + + + + + + + UPDATE + sign + + + bjId = #{item.bjId}, + + + teacherId = #{item.teacherId}, + + + name = #{item.name}, + + + status = #{item.status}, + + + fdyId = #{item.fdyId} + + + WHERE + 1=1 + + + + + + + + + + + + + + + + + + + + + + + ${sql} + + + + ${sql} + + + + diff --git a/源码/src/main/java/com/kwxy/hyt/mapper/StudentMapper.java b/源码/src/main/java/com/kwxy/hyt/mapper/StudentMapper.java new file mode 100644 index 0000000..7dd8909 --- /dev/null +++ b/源码/src/main/java/com/kwxy/hyt/mapper/StudentMapper.java @@ -0,0 +1,27 @@ +package com.kwxy.hyt.mapper; +/** + * @ClassName: + * @Description: + * @author administrator + * @date - 2018年10月27日 09时48分24秒 + */ +import com.kwxy.hyt.base.BaseDao; +import com.kwxy.hyt.po.*; +import com.kwxy.hyt.utils.Pager; +import java.util.*; + +import com.kwxy.hyt.po.*; +import com.kwxy.hyt.mapper.*; +import com.kwxy.hyt.service.*; + +/** + * @ClassName: + * @Description: + * @author - - admin + * @date - 2018年10月27日 09时48分24秒 + */ + + +public interface StudentMapper extends BaseDao{ + +} diff --git a/源码/src/main/java/com/kwxy/hyt/mapper/StudentMapper.xml b/源码/src/main/java/com/kwxy/hyt/mapper/StudentMapper.xml new file mode 100644 index 0000000..a07e132 --- /dev/null +++ b/源码/src/main/java/com/kwxy/hyt/mapper/StudentMapper.xml @@ -0,0 +1,370 @@ + + + + + + + + + + + + + + + + + + + + id, + code, + username, + password, + bjId, + isDelete + + + + + #{id} , + #{code} , + #{username} , + #{password} , + #{bjId} , + #{isDelete} + + + + + + code = #{code} , + + + username = #{username} , + + + password = #{password} , + + + bjId = #{bjId} , + + + isDelete = #{isDelete} + + + + + + + and id =#{id} + + + and code =#{code} + + + and username =#{username} + + + and password =#{password} + + + and bjId =#{bjId} + + + and isDelete =#{isDelete} + + + + + + + + + + + + INSERT INTO student ( + + ) VALUES ( + + ) + + + + + + + delete from student where id=#{id} + + + + + + delete from student + WHERE 1=1 + + + + + + + delete from student + WHERE 1=1 + + + + + + + + UPDATE student + + + + WHERE 1=1 + + + + + + UPDATE student + + + + WHERE 1=1 + and id=#{id} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + INSERT INTO student ( + + ) VALUES + + ( + + #{item.code} , + #{item.username} , + #{item.password} , + #{item.bjId} , + #{item.isDelete} + + ) + + + + + + + + UPDATE + student + + + code = #{item.code}, + + + username = #{item.username}, + + + password = #{item.password}, + + + bjId = #{item.bjId}, + + + isDelete = #{item.isDelete} + + + WHERE + 1=1 + + + + + + + + + + + + + + + + + + + + + + + ${sql} + + + + ${sql} + + + + diff --git a/源码/src/main/java/com/kwxy/hyt/mapper/TeacherBjMapper.java b/源码/src/main/java/com/kwxy/hyt/mapper/TeacherBjMapper.java new file mode 100644 index 0000000..525d431 --- /dev/null +++ b/源码/src/main/java/com/kwxy/hyt/mapper/TeacherBjMapper.java @@ -0,0 +1,27 @@ +package com.kwxy.hyt.mapper; +/** + * @ClassName: + * @Description: + * @author administrator + * @date - 2018年10月27日 09时48分24秒 + */ +import com.kwxy.hyt.base.BaseDao; +import com.kwxy.hyt.po.*; +import com.kwxy.hyt.utils.Pager; +import java.util.*; + +import com.kwxy.hyt.po.*; +import com.kwxy.hyt.mapper.*; +import com.kwxy.hyt.service.*; + +/** + * @ClassName: + * @Description: + * @author - - admin + * @date - 2018年10月27日 09时48分24秒 + */ + + +public interface TeacherBjMapper extends BaseDao{ + +} diff --git a/源码/src/main/java/com/kwxy/hyt/mapper/TeacherBjMapper.xml b/源码/src/main/java/com/kwxy/hyt/mapper/TeacherBjMapper.xml new file mode 100644 index 0000000..bafb13e --- /dev/null +++ b/源码/src/main/java/com/kwxy/hyt/mapper/TeacherBjMapper.xml @@ -0,0 +1,332 @@ + + + + + + + + + + + + + + + + + + id, + teacherId, + bjId + + + + + #{id} , + #{teacherId} , + #{bjId} + + + + + + teacherId = #{teacherId} , + + + bjId = #{bjId} + + + + + + + and id =#{id} + + + and teacherId =#{teacherId} + + + and bjId =#{bjId} + + + + + + + + + + + + INSERT INTO teacher_bj ( + + ) VALUES ( + + ) + + + + + + + delete from teacher_bj where id=#{id} + + + + + + delete from teacher_bj + WHERE 1=1 + + + + + + + delete from teacher_bj + WHERE 1=1 + + + + + + + + UPDATE teacher_bj + + + + WHERE 1=1 + + + + + + UPDATE teacher_bj + + + + WHERE 1=1 + and id=#{id} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + INSERT INTO teacher_bj ( + + ) VALUES + + ( + + #{item.teacherId} , + #{item.bjId} + + ) + + + + + + + + UPDATE + teacher_bj + + + teacherId = #{item.teacherId}, + + + bjId = #{item.bjId} + + + WHERE + 1=1 + + + + + + + + + + + + + + + + + + + + + + + ${sql} + + + + ${sql} + + + + diff --git a/源码/src/main/java/com/kwxy/hyt/mapper/TeacherMapper.java b/源码/src/main/java/com/kwxy/hyt/mapper/TeacherMapper.java new file mode 100644 index 0000000..9f25cc2 --- /dev/null +++ b/源码/src/main/java/com/kwxy/hyt/mapper/TeacherMapper.java @@ -0,0 +1,27 @@ +package com.kwxy.hyt.mapper; +/** + * @ClassName: + * @Description: + * @author administrator + * @date - 2018年10月27日 09时48分24秒 + */ +import com.kwxy.hyt.base.BaseDao; +import com.kwxy.hyt.po.*; +import com.kwxy.hyt.utils.Pager; +import java.util.*; + +import com.kwxy.hyt.po.*; +import com.kwxy.hyt.mapper.*; +import com.kwxy.hyt.service.*; + +/** + * @ClassName: + * @Description: + * @author - - admin + * @date - 2018年10月27日 09时48分24秒 + */ + + +public interface TeacherMapper extends BaseDao{ + +} diff --git a/源码/src/main/java/com/kwxy/hyt/mapper/TeacherMapper.xml b/源码/src/main/java/com/kwxy/hyt/mapper/TeacherMapper.xml new file mode 100644 index 0000000..a332eb2 --- /dev/null +++ b/源码/src/main/java/com/kwxy/hyt/mapper/TeacherMapper.xml @@ -0,0 +1,369 @@ + + + + + + + + + + + + + + + + + + + id, + code, + username, + password, + kc, + isDelete + + + + + #{id} , + #{code} , + #{username} , + #{password} , + #{kc} , + #{isDelete} + + + + + + code = #{code} , + + + username = #{username} , + + + password = #{password} , + + + kc = #{kc} , + + + isDelete = #{isDelete} + + + + + + + and id =#{id} + + + and code =#{code} + + + and username =#{username} + + + and password =#{password} + + + and kc =#{kc} + + + and isDelete =#{isDelete} + + + + + + + + + + + + INSERT INTO teacher ( + + ) VALUES ( + + ) + + + + + + + delete from teacher where id=#{id} + + + + + + delete from teacher + WHERE 1=1 + + + + + + + delete from teacher + WHERE 1=1 + + + + + + + + UPDATE teacher + + + + WHERE 1=1 + + + + + + UPDATE teacher + + + + WHERE 1=1 + and id=#{id} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + INSERT INTO teacher ( + + ) VALUES + + ( + + #{item.code} , + #{item.username} , + #{item.password} , + #{item.kc} , + #{item.isDelete} + + ) + + + + + + + + UPDATE + teacher + + + code = #{item.code}, + + + username = #{item.username}, + + + password = #{item.password}, + + + kc = #{item.kc}, + + + isDelete = #{item.isDelete} + + + WHERE + 1=1 + + + + + + + + + + + + + + + + + + + + + + + ${sql} + + + + ${sql} + + + + diff --git a/源码/src/main/java/com/kwxy/hyt/po/Bj.java b/源码/src/main/java/com/kwxy/hyt/po/Bj.java new file mode 100644 index 0000000..85282c1 --- /dev/null +++ b/源码/src/main/java/com/kwxy/hyt/po/Bj.java @@ -0,0 +1,100 @@ +package com.kwxy.hyt.po; +import java.util.*; +import java.io.Serializable; + +/** + * @ClassName: + * @Description: + * @author administrator + * @date - 2018年10月27日 09时48分23秒 + */ +public class Bj implements Serializable { + private static final long serialVersionUID = 3148176768559230877L; + + + /** + * @Fields Id : id + * + * */ + private Integer id; + /** + * @Fields Name : name + * + * */ + private String name; + /** + * @Fields Zy : 专业 + * + * */ + private String zy; + + + private Integer isCheck; + + /** + * @Fields IsDelete : 是否删除 0 否 1 是 + * + * */ + private Integer isDelete; + + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public String getZy() { + return this.zy; + } + + public void setZy(String zy) { + this.zy = zy; + } + + public Integer getIsDelete() { + return this.isDelete; + } + + public void setIsDelete(Integer isDelete) { + this.isDelete = isDelete; + } + + + public Bj() { + + } + + public Bj(Integer id ,String name ,String zy ,Integer isDelete ){ + super(); + this.id=id; + this.name=name; + this.zy=zy; + this.isDelete=isDelete; + } + + @Override + public String toString() { + return "Bj [id="+ id + ",name="+ name + ",zy="+ zy + ",isDelete="+ isDelete + "]"; + } + + public Integer getIsCheck() { + return isCheck; + } + + public void setIsCheck(Integer isCheck) { + this.isCheck = isCheck; + } + + +} + diff --git a/源码/src/main/java/com/kwxy/hyt/po/Fdy.java b/源码/src/main/java/com/kwxy/hyt/po/Fdy.java new file mode 100644 index 0000000..ac2029a --- /dev/null +++ b/源码/src/main/java/com/kwxy/hyt/po/Fdy.java @@ -0,0 +1,136 @@ +package com.kwxy.hyt.po; +import java.util.*; +import java.io.Serializable; + +/** + * @ClassName: + * @Description: + * @author administrator + * @date - 2018年10月27日 09时48分23秒 + */ +public class Fdy implements Serializable { + private static final long serialVersionUID = 3148176768559230877L; + + + /** + * @Fields Id : id + * + * */ + private Integer id; + /** + * @Fields Username : username + * + * */ + private String username; + /** + * @Fields Password : password + * + * */ + private String password; + /** + * @Fields Code : code + * + * */ + private String code; + /** + * @Fields Sex : sex + * + * */ + private String sex; + /** + * @Fields BjId : 班级id + * + * */ + private Integer bjId; + + private Bj bj; + + private Integer isDelete; + + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getUsername() { + return this.username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return this.password; + } + + public void setPassword(String password) { + this.password = password; + } + + public String getCode() { + return this.code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getSex() { + return this.sex; + } + + public void setSex(String sex) { + this.sex = sex; + } + + public Integer getBjId() { + return this.bjId; + } + + public void setBjId(Integer bjId) { + this.bjId = bjId; + } + + + public Fdy() { + + } + + public Fdy(Integer id ,String username ,String password ,String code ,String sex ,Integer bjId ){ + super(); + this.id=id; + this.username=username; + this.password=password; + this.code=code; + this.sex=sex; + this.bjId=bjId; + } + + @Override + public String toString() { + return "Fdy [id="+ id + ",username="+ username + ",password="+ password + ",code="+ code + ",sex="+ sex + ",bjId="+ bjId + "]"; + } + + public Integer getIsDelete() { + return isDelete; + } + + public void setIsDelete(Integer isDelete) { + this.isDelete = isDelete; + } + + public Bj getBj() { + return bj; + } + + public void setBj(Bj bj) { + this.bj = bj; + } + + +} + diff --git a/源码/src/main/java/com/kwxy/hyt/po/Manage.java b/源码/src/main/java/com/kwxy/hyt/po/Manage.java new file mode 100644 index 0000000..0236940 --- /dev/null +++ b/源码/src/main/java/com/kwxy/hyt/po/Manage.java @@ -0,0 +1,74 @@ +package com.kwxy.hyt.po; +import java.util.*; +import java.io.Serializable; + +/** + * @ClassName: + * @Description: + * @author administrator + * @date - 2018年10月27日 09时48分24秒 + */ +public class Manage implements Serializable { + private static final long serialVersionUID = 3148176768559230877L; + + + /** + * @Fields Id : id + * + * */ + private Integer id; + /** + * @Fields Username : username + * + * */ + private String username; + /** + * @Fields Password : password + * + * */ + private String password; + + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getUsername() { + return this.username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return this.password; + } + + public void setPassword(String password) { + this.password = password; + } + + + public Manage() { + + } + + public Manage(Integer id ,String username ,String password ){ + super(); + this.id=id; + this.username=username; + this.password=password; + } + + @Override + public String toString() { + return "Manage [id="+ id + ",username="+ username + ",password="+ password + "]"; + } + + +} + diff --git a/源码/src/main/java/com/kwxy/hyt/po/Qj.java b/源码/src/main/java/com/kwxy/hyt/po/Qj.java new file mode 100644 index 0000000..724fdde --- /dev/null +++ b/源码/src/main/java/com/kwxy/hyt/po/Qj.java @@ -0,0 +1,182 @@ +package com.kwxy.hyt.po; +import java.util.*; +import java.io.Serializable; + +/** + * @ClassName: + * @Description: + * @author administrator + * @date - 2018年10月27日 09时48分24秒 + */ +public class Qj implements Serializable { + private static final long serialVersionUID = 3148176768559230877L; + + + /** + * @Fields Id : id + * + * */ + private Integer id; + /** + * @Fields BjId : bjId + * + * */ + private Integer bjId; + /** + * @Fields StudentId : studentId + * + * */ + private Integer studentId; + + private Student student; + + private Bj bj; + /** + * @Fields FdyId : fdyId + * + * */ + private Integer fdyId; + + private Fdy fdy; + + + /** + * @Fields StartTime : startTime + * + * */ + private String startTime; + /** + * @Fields EndTime : endTime + * + * */ + private String endTime; + /** + * @Fields Status : 是否通过 0 待审核 1 通过 2 不通过 + * + * */ + private Integer status; + + private String reason; + + private String content; + + public String getReason() { + return reason; + } + + public void setReason(String reason) { + this.reason = reason; + } + + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } + + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getBjId() { + return this.bjId; + } + + public void setBjId(Integer bjId) { + this.bjId = bjId; + } + + public Integer getStudentId() { + return this.studentId; + } + + public void setStudentId(Integer studentId) { + this.studentId = studentId; + } + + public Integer getFdyId() { + return this.fdyId; + } + + public void setFdyId(Integer fdyId) { + this.fdyId = fdyId; + } + + public String getStartTime() { + return this.startTime; + } + + public void setStartTime(String startTime) { + this.startTime = startTime; + } + + public String getEndTime() { + return this.endTime; + } + + public void setEndTime(String endTime) { + this.endTime = endTime; + } + + public Integer getStatus() { + return this.status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + + public Qj() { + + } + + public Qj(Integer id ,Integer bjId ,Integer studentId ,Integer fdyId ,String startTime ,String endTime ,Integer status ){ + super(); + this.id=id; + this.bjId=bjId; + this.studentId=studentId; + this.fdyId=fdyId; + this.startTime=startTime; + this.endTime=endTime; + this.status=status; + } + + @Override + public String toString() { + return "Qj [id="+ id + ",bjId="+ bjId + ",studentId="+ studentId + ",fdyId="+ fdyId + ",startTime="+ startTime + ",endTime="+ endTime + ",status="+ status + "]"; + } + + public Student getStudent() { + return student; + } + + public void setStudent(Student student) { + this.student = student; + } + + public Bj getBj() { + return bj; + } + + public void setBj(Bj bj) { + this.bj = bj; + } + + public Fdy getFdy() { + return fdy; + } + + public void setFdy(Fdy fdy) { + this.fdy = fdy; + } + + +} + diff --git a/源码/src/main/java/com/kwxy/hyt/po/Record.java b/源码/src/main/java/com/kwxy/hyt/po/Record.java new file mode 100644 index 0000000..1063291 --- /dev/null +++ b/源码/src/main/java/com/kwxy/hyt/po/Record.java @@ -0,0 +1,136 @@ +package com.kwxy.hyt.po; +import java.util.*; +import java.io.Serializable; + +/** + * @ClassName: + * @Description: + * @author administrator + * @date - 2018年10月27日 09时48分24秒 + */ +public class Record implements Serializable { + private static final long serialVersionUID = 3148176768559230877L; + + + /** + * @Fields Id : id + * + * */ + private Integer id; + /** + * @Fields SignId : signId + * + * */ + private Integer signId; + + private Sign sign; + + private Student student; + + /** + * @Fields StudentId : studentId + * + * */ + private Integer studentId; + /** + * @Fields Ip : ip + * + * */ + private String ip; + /** + * @Fields CreateTime : createTime + * + * */ + private java.util.Date createTime; + /** + * @Fields Status : 0 未签到 1 已签到 2 请假 + * + * */ + private Integer status; + + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getSignId() { + return this.signId; + } + + public void setSignId(Integer signId) { + this.signId = signId; + } + + public Integer getStudentId() { + return this.studentId; + } + + public void setStudentId(Integer studentId) { + this.studentId = studentId; + } + + public String getIp() { + return this.ip; + } + + public void setIp(String ip) { + this.ip = ip; + } + + public java.util.Date getCreateTime() { + return this.createTime; + } + + public void setCreateTime(java.util.Date createTime) { + this.createTime = createTime; + } + + public Integer getStatus() { + return this.status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + + public Record() { + + } + + public Record(Integer id ,Integer signId ,Integer studentId ,String ip ,java.util.Date createTime ,Integer status ){ + super(); + this.id=id; + this.signId=signId; + this.studentId=studentId; + this.ip=ip; + this.createTime=createTime; + this.status=status; + } + + @Override + public String toString() { + return "Record [id="+ id + ",signId="+ signId + ",studentId="+ studentId + ",ip="+ ip + ",createTime="+ createTime + ",status="+ status + "]"; + } + + public Sign getSign() { + return sign; + } + + public void setSign(Sign sign) { + this.sign = sign; + } + + public Student getStudent() { + return student; + } + + public void setStudent(Student student) { + this.student = student; + } + +} + diff --git a/源码/src/main/java/com/kwxy/hyt/po/Sign.java b/源码/src/main/java/com/kwxy/hyt/po/Sign.java new file mode 100644 index 0000000..10b5720 --- /dev/null +++ b/源码/src/main/java/com/kwxy/hyt/po/Sign.java @@ -0,0 +1,147 @@ +package com.kwxy.hyt.po; +import java.util.*; +import java.io.Serializable; + +/** + * @ClassName: + * @Description: + * @author administrator + * @date - 2018年10月27日 09时48分24秒 + */ +public class Sign implements Serializable { + private static final long serialVersionUID = 3148176768559230877L; + + + /** + * @Fields Id : id + * + * */ + private Integer id; + /** + * @Fields BjId : bjId + * + * */ + private Integer bjId; + /** + * @Fields TeacherId : teacherId + * + * */ + private Integer teacherId; + /** + * @Fields Name : 0 新建 1 结束 2 上报 + * + * */ + private String name; + /** + * @Fields Status : status + * + * */ + private Integer status; + /** + * @Fields FdyId : fdyId + * + * */ + private Integer fdyId; + + private Teacher teacher; + + private Fdy fdy; + + private Bj bj; + + + public Bj getBj() { + return bj; + } + + public void setBj(Bj bj) { + this.bj = bj; + } + + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getBjId() { + return this.bjId; + } + + public void setBjId(Integer bjId) { + this.bjId = bjId; + } + + public Integer getTeacherId() { + return this.teacherId; + } + + public void setTeacherId(Integer teacherId) { + this.teacherId = teacherId; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public Integer getStatus() { + return this.status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public Integer getFdyId() { + return this.fdyId; + } + + public void setFdyId(Integer fdyId) { + this.fdyId = fdyId; + } + + + public Sign() { + + } + + public Sign(Integer id ,Integer bjId ,Integer teacherId ,String name ,Integer status ,Integer fdyId ){ + super(); + this.id=id; + this.bjId=bjId; + this.teacherId=teacherId; + this.name=name; + this.status=status; + this.fdyId=fdyId; + } + + @Override + public String toString() { + return "Sign [id="+ id + ",bjId="+ bjId + ",teacherId="+ teacherId + ",name="+ name + ",status="+ status + ",fdyId="+ fdyId + "]"; + } + + public Teacher getTeacher() { + return teacher; + } + + public void setTeacher(Teacher teacher) { + this.teacher = teacher; + } + + public Fdy getFdy() { + return fdy; + } + + public void setFdy(Fdy fdy) { + this.fdy = fdy; + } + + +} + diff --git a/源码/src/main/java/com/kwxy/hyt/po/Student.java b/源码/src/main/java/com/kwxy/hyt/po/Student.java new file mode 100644 index 0000000..cc2543a --- /dev/null +++ b/源码/src/main/java/com/kwxy/hyt/po/Student.java @@ -0,0 +1,127 @@ +package com.kwxy.hyt.po; +import java.util.*; +import java.io.Serializable; + +/** + * @ClassName: + * @Description: + * @author administrator + * @date - 2018年10月27日 09时48分24秒 + */ +public class Student implements Serializable { + private static final long serialVersionUID = 3148176768559230877L; + + + /** + * @Fields Id : id + * + * */ + private Integer id; + /** + * @Fields Code : code + * + * */ + private String code; + /** + * @Fields Username : username + * + * */ + private String username; + /** + * @Fields Password : password + * + * */ + private String password; + /** + * @Fields BjId : bjId + * + * */ + private Integer bjId; + + private Bj bj; + + /** + * @Fields IsDelete : isDelete + * + * */ + private Integer isDelete; + + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getCode() { + return this.code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getUsername() { + return this.username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return this.password; + } + + public void setPassword(String password) { + this.password = password; + } + + public Integer getBjId() { + return this.bjId; + } + + public void setBjId(Integer bjId) { + this.bjId = bjId; + } + + public Integer getIsDelete() { + return this.isDelete; + } + + public void setIsDelete(Integer isDelete) { + this.isDelete = isDelete; + } + + + public Student() { + + } + + public Student(Integer id ,String code ,String username ,String password ,Integer bjId ,Integer isDelete ){ + super(); + this.id=id; + this.code=code; + this.username=username; + this.password=password; + this.bjId=bjId; + this.isDelete=isDelete; + } + + @Override + public String toString() { + return "Student [id="+ id + ",code="+ code + ",username="+ username + ",password="+ password + ",bjId="+ bjId + ",isDelete="+ isDelete + "]"; + } + + public Bj getBj() { + return bj; + } + + public void setBj(Bj bj) { + this.bj = bj; + } + + +} + diff --git a/源码/src/main/java/com/kwxy/hyt/po/Teacher.java b/源码/src/main/java/com/kwxy/hyt/po/Teacher.java new file mode 100644 index 0000000..2aa50af --- /dev/null +++ b/源码/src/main/java/com/kwxy/hyt/po/Teacher.java @@ -0,0 +1,116 @@ +package com.kwxy.hyt.po; +import java.util.*; +import java.io.Serializable; + +/** + * @ClassName: + * @Description: + * @author administrator + * @date - 2018年10月27日 09时48分24秒 + */ +public class Teacher implements Serializable { + private static final long serialVersionUID = 3148176768559230877L; + + + /** + * @Fields Id : id + * + * */ + private Integer id; + /** + * @Fields Code : code + * + * */ + private String code; + /** + * @Fields Username : username + * + * */ + private String username; + /** + * @Fields Password : password + * + * */ + private String password; + /** + * @Fields Kc : 课程名 + * + * */ + private String kc; + /** + * @Fields IsDelete : isDelete + * + * */ + private Integer isDelete; + + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getCode() { + return this.code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getUsername() { + return this.username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return this.password; + } + + public void setPassword(String password) { + this.password = password; + } + + public String getKc() { + return this.kc; + } + + public void setKc(String kc) { + this.kc = kc; + } + + public Integer getIsDelete() { + return this.isDelete; + } + + public void setIsDelete(Integer isDelete) { + this.isDelete = isDelete; + } + + + public Teacher() { + + } + + public Teacher(Integer id ,String code ,String username ,String password ,String kc ,Integer isDelete ){ + super(); + this.id=id; + this.code=code; + this.username=username; + this.password=password; + this.kc=kc; + this.isDelete=isDelete; + } + + @Override + public String toString() { + return "Teacher [id="+ id + ",code="+ code + ",username="+ username + ",password="+ password + ",kc="+ kc + ",isDelete="+ isDelete + "]"; + } + + +} + diff --git a/源码/src/main/java/com/kwxy/hyt/po/TeacherBj.java b/源码/src/main/java/com/kwxy/hyt/po/TeacherBj.java new file mode 100644 index 0000000..d3253e7 --- /dev/null +++ b/源码/src/main/java/com/kwxy/hyt/po/TeacherBj.java @@ -0,0 +1,94 @@ +package com.kwxy.hyt.po; +import java.util.*; +import java.io.Serializable; + +/** + * @ClassName: + * @Description: + * @author administrator + * @date - 2018年10月27日 09时48分24秒 + */ +public class TeacherBj implements Serializable { + private static final long serialVersionUID = 3148176768559230877L; + + + /** + * @Fields Id : id + * + * */ + private Integer id; + /** + * @Fields TeacherId : teacherId + * + * */ + private Integer teacherId; + /** + * @Fields BjId : bjId + * + * */ + private Integer bjId; + + private Bj bj; + + private Teacher teacher; + + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getTeacherId() { + return this.teacherId; + } + + public void setTeacherId(Integer teacherId) { + this.teacherId = teacherId; + } + + public Integer getBjId() { + return this.bjId; + } + + public void setBjId(Integer bjId) { + this.bjId = bjId; + } + + + public TeacherBj() { + + } + + public TeacherBj(Integer id ,Integer teacherId ,Integer bjId ){ + super(); + this.id=id; + this.teacherId=teacherId; + this.bjId=bjId; + } + + @Override + public String toString() { + return "TeacherBj [id="+ id + ",teacherId="+ teacherId + ",bjId="+ bjId + "]"; + } + + public Bj getBj() { + return bj; + } + + public void setBj(Bj bj) { + this.bj = bj; + } + + public Teacher getTeacher() { + return teacher; + } + + public void setTeacher(Teacher teacher) { + this.teacher = teacher; + } + + +} + diff --git a/源码/src/main/java/com/kwxy/hyt/service/BjService.java b/源码/src/main/java/com/kwxy/hyt/service/BjService.java new file mode 100644 index 0000000..1d0609e --- /dev/null +++ b/源码/src/main/java/com/kwxy/hyt/service/BjService.java @@ -0,0 +1,19 @@ +package com.kwxy.hyt.service; +import com.kwxy.hyt.base.BaseService; +import com.kwxy.hyt.po.*; +import java.util.*; + +import com.kwxy.hyt.po.*; +import com.kwxy.hyt.mapper.*; +import com.kwxy.hyt.service.*; + +/** + * @ClassName: + * @Description: + * @author - - admin + * @date - 2018年10月27日 09时48分23秒 + */ +public interface BjService extends BaseService{ + + +} diff --git a/源码/src/main/java/com/kwxy/hyt/service/FdyService.java b/源码/src/main/java/com/kwxy/hyt/service/FdyService.java new file mode 100644 index 0000000..bdc2e92 --- /dev/null +++ b/源码/src/main/java/com/kwxy/hyt/service/FdyService.java @@ -0,0 +1,19 @@ +package com.kwxy.hyt.service; +import com.kwxy.hyt.base.BaseService; +import com.kwxy.hyt.po.*; +import java.util.*; + +import com.kwxy.hyt.po.*; +import com.kwxy.hyt.mapper.*; +import com.kwxy.hyt.service.*; + +/** + * @ClassName: + * @Description: + * @author - - admin + * @date - 2018年10月27日 09时48分23秒 + */ +public interface FdyService extends BaseService{ + + +} diff --git a/源码/src/main/java/com/kwxy/hyt/service/ManageService.java b/源码/src/main/java/com/kwxy/hyt/service/ManageService.java new file mode 100644 index 0000000..e4f457b --- /dev/null +++ b/源码/src/main/java/com/kwxy/hyt/service/ManageService.java @@ -0,0 +1,19 @@ +package com.kwxy.hyt.service; +import com.kwxy.hyt.base.BaseService; +import com.kwxy.hyt.po.*; +import java.util.*; + +import com.kwxy.hyt.po.*; +import com.kwxy.hyt.mapper.*; +import com.kwxy.hyt.service.*; + +/** + * @ClassName: + * @Description: + * @author - - admin + * @date - 2018年10月27日 09时48分24秒 + */ +public interface ManageService extends BaseService{ + + +} diff --git a/源码/src/main/java/com/kwxy/hyt/service/QjService.java b/源码/src/main/java/com/kwxy/hyt/service/QjService.java new file mode 100644 index 0000000..df59e40 --- /dev/null +++ b/源码/src/main/java/com/kwxy/hyt/service/QjService.java @@ -0,0 +1,19 @@ +package com.kwxy.hyt.service; +import com.kwxy.hyt.base.BaseService; +import com.kwxy.hyt.po.*; +import java.util.*; + +import com.kwxy.hyt.po.*; +import com.kwxy.hyt.mapper.*; +import com.kwxy.hyt.service.*; + +/** + * @ClassName: + * @Description: + * @author - - admin + * @date - 2018年10月27日 09时48分24秒 + */ +public interface QjService extends BaseService{ + + +} diff --git a/源码/src/main/java/com/kwxy/hyt/service/RecordService.java b/源码/src/main/java/com/kwxy/hyt/service/RecordService.java new file mode 100644 index 0000000..9982902 --- /dev/null +++ b/源码/src/main/java/com/kwxy/hyt/service/RecordService.java @@ -0,0 +1,19 @@ +package com.kwxy.hyt.service; +import com.kwxy.hyt.base.BaseService; +import com.kwxy.hyt.po.*; +import java.util.*; + +import com.kwxy.hyt.po.*; +import com.kwxy.hyt.mapper.*; +import com.kwxy.hyt.service.*; + +/** + * @ClassName: + * @Description: + * @author - - admin + * @date - 2018年10月27日 09时48分24秒 + */ +public interface RecordService extends BaseService{ + + +} diff --git a/源码/src/main/java/com/kwxy/hyt/service/SignService.java b/源码/src/main/java/com/kwxy/hyt/service/SignService.java new file mode 100644 index 0000000..ed536fd --- /dev/null +++ b/源码/src/main/java/com/kwxy/hyt/service/SignService.java @@ -0,0 +1,19 @@ +package com.kwxy.hyt.service; +import com.kwxy.hyt.base.BaseService; +import com.kwxy.hyt.po.*; +import java.util.*; + +import com.kwxy.hyt.po.*; +import com.kwxy.hyt.mapper.*; +import com.kwxy.hyt.service.*; + +/** + * @ClassName: + * @Description: + * @author - - admin + * @date - 2018年10月27日 09时48分24秒 + */ +public interface SignService extends BaseService{ + + +} diff --git a/源码/src/main/java/com/kwxy/hyt/service/StudentService.java b/源码/src/main/java/com/kwxy/hyt/service/StudentService.java new file mode 100644 index 0000000..aecd387 --- /dev/null +++ b/源码/src/main/java/com/kwxy/hyt/service/StudentService.java @@ -0,0 +1,19 @@ +package com.kwxy.hyt.service; +import com.kwxy.hyt.base.BaseService; +import com.kwxy.hyt.po.*; +import java.util.*; + +import com.kwxy.hyt.po.*; +import com.kwxy.hyt.mapper.*; +import com.kwxy.hyt.service.*; + +/** + * @ClassName: + * @Description: + * @author - - admin + * @date - 2018年10月27日 09时48分24秒 + */ +public interface StudentService extends BaseService{ + + +} diff --git a/源码/src/main/java/com/kwxy/hyt/service/TeacherBjService.java b/源码/src/main/java/com/kwxy/hyt/service/TeacherBjService.java new file mode 100644 index 0000000..eab9115 --- /dev/null +++ b/源码/src/main/java/com/kwxy/hyt/service/TeacherBjService.java @@ -0,0 +1,19 @@ +package com.kwxy.hyt.service; +import com.kwxy.hyt.base.BaseService; +import com.kwxy.hyt.po.*; +import java.util.*; + +import com.kwxy.hyt.po.*; +import com.kwxy.hyt.mapper.*; +import com.kwxy.hyt.service.*; + +/** + * @ClassName: + * @Description: + * @author - - admin + * @date - 2018年10月27日 09时48分24秒 + */ +public interface TeacherBjService extends BaseService{ + + +} diff --git a/源码/src/main/java/com/kwxy/hyt/service/TeacherService.java b/源码/src/main/java/com/kwxy/hyt/service/TeacherService.java new file mode 100644 index 0000000..d50e4f0 --- /dev/null +++ b/源码/src/main/java/com/kwxy/hyt/service/TeacherService.java @@ -0,0 +1,19 @@ +package com.kwxy.hyt.service; +import com.kwxy.hyt.base.BaseService; +import com.kwxy.hyt.po.*; +import java.util.*; + +import com.kwxy.hyt.po.*; +import com.kwxy.hyt.mapper.*; +import com.kwxy.hyt.service.*; + +/** + * @ClassName: + * @Description: + * @author - - admin + * @date - 2018年10月27日 09时48分24秒 + */ +public interface TeacherService extends BaseService{ + + +} diff --git a/源码/src/main/java/com/kwxy/hyt/service/impl/BjServiceImpl.java b/源码/src/main/java/com/kwxy/hyt/service/impl/BjServiceImpl.java new file mode 100644 index 0000000..6be16fd --- /dev/null +++ b/源码/src/main/java/com/kwxy/hyt/service/impl/BjServiceImpl.java @@ -0,0 +1,39 @@ +/** + * @ClassName: + * @Description: + * @author administrator + * @date - 2018年10月27日 09时48分23秒 + */ +package com.kwxy.hyt.service.impl; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; +import com.kwxy.hyt.base.*; +import com.kwxy.hyt.po.*; +import com.kwxy.hyt.service.BjService; +import java.util.*; + +import com.kwxy.hyt.po.*; +import com.kwxy.hyt.mapper.*; +import com.kwxy.hyt.service.*; + +/** + * @ClassName: + * @Description: + * @author - - admin + * @date - 2018年10月27日 09时48分23秒 + */ + +@Service +public class BjServiceImpl extends BaseServiceImpl implements BjService{ + + + @Autowired + private BjMapper bjMapper; + @Override + public BaseDao getBaseDao() { + return bjMapper; + } + +} diff --git a/源码/src/main/java/com/kwxy/hyt/service/impl/FdyServiceImpl.java b/源码/src/main/java/com/kwxy/hyt/service/impl/FdyServiceImpl.java new file mode 100644 index 0000000..43e52f3 --- /dev/null +++ b/源码/src/main/java/com/kwxy/hyt/service/impl/FdyServiceImpl.java @@ -0,0 +1,39 @@ +/** + * @ClassName: + * @Description: + * @author administrator + * @date - 2018年10月27日 09时48分23秒 + */ +package com.kwxy.hyt.service.impl; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; +import com.kwxy.hyt.base.*; +import com.kwxy.hyt.po.*; +import com.kwxy.hyt.service.FdyService; +import java.util.*; + +import com.kwxy.hyt.po.*; +import com.kwxy.hyt.mapper.*; +import com.kwxy.hyt.service.*; + +/** + * @ClassName: + * @Description: + * @author - - admin + * @date - 2018年10月27日 09时48分23秒 + */ + +@Service +public class FdyServiceImpl extends BaseServiceImpl implements FdyService{ + + + @Autowired + private FdyMapper fdyMapper; + @Override + public BaseDao getBaseDao() { + return fdyMapper; + } + +} diff --git a/源码/src/main/java/com/kwxy/hyt/service/impl/ManageServiceImpl.java b/源码/src/main/java/com/kwxy/hyt/service/impl/ManageServiceImpl.java new file mode 100644 index 0000000..7b4d88f --- /dev/null +++ b/源码/src/main/java/com/kwxy/hyt/service/impl/ManageServiceImpl.java @@ -0,0 +1,39 @@ +/** + * @ClassName: + * @Description: + * @author administrator + * @date - 2018年10月27日 09时48分24秒 + */ +package com.kwxy.hyt.service.impl; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; +import com.kwxy.hyt.base.*; +import com.kwxy.hyt.po.*; +import com.kwxy.hyt.service.ManageService; +import java.util.*; + +import com.kwxy.hyt.po.*; +import com.kwxy.hyt.mapper.*; +import com.kwxy.hyt.service.*; + +/** + * @ClassName: + * @Description: + * @author - - admin + * @date - 2018年10月27日 09时48分24秒 + */ + +@Service +public class ManageServiceImpl extends BaseServiceImpl implements ManageService{ + + + @Autowired + private ManageMapper manageMapper; + @Override + public BaseDao getBaseDao() { + return manageMapper; + } + +} diff --git a/源码/src/main/java/com/kwxy/hyt/service/impl/QjServiceImpl.java b/源码/src/main/java/com/kwxy/hyt/service/impl/QjServiceImpl.java new file mode 100644 index 0000000..0535deb --- /dev/null +++ b/源码/src/main/java/com/kwxy/hyt/service/impl/QjServiceImpl.java @@ -0,0 +1,39 @@ +/** + * @ClassName: + * @Description: + * @author administrator + * @date - 2018年10月27日 09时48分24秒 + */ +package com.kwxy.hyt.service.impl; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; +import com.kwxy.hyt.base.*; +import com.kwxy.hyt.po.*; +import com.kwxy.hyt.service.QjService; +import java.util.*; + +import com.kwxy.hyt.po.*; +import com.kwxy.hyt.mapper.*; +import com.kwxy.hyt.service.*; + +/** + * @ClassName: + * @Description: + * @author - - admin + * @date - 2018年10月27日 09时48分24秒 + */ + +@Service +public class QjServiceImpl extends BaseServiceImpl implements QjService{ + + + @Autowired + private QjMapper qjMapper; + @Override + public BaseDao getBaseDao() { + return qjMapper; + } + +} diff --git a/源码/src/main/java/com/kwxy/hyt/service/impl/RecordServiceImpl.java b/源码/src/main/java/com/kwxy/hyt/service/impl/RecordServiceImpl.java new file mode 100644 index 0000000..a4e8774 --- /dev/null +++ b/源码/src/main/java/com/kwxy/hyt/service/impl/RecordServiceImpl.java @@ -0,0 +1,39 @@ +/** + * @ClassName: + * @Description: + * @author administrator + * @date - 2018年10月27日 09时48分24秒 + */ +package com.kwxy.hyt.service.impl; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; +import com.kwxy.hyt.base.*; +import com.kwxy.hyt.po.*; +import com.kwxy.hyt.service.RecordService; +import java.util.*; + +import com.kwxy.hyt.po.*; +import com.kwxy.hyt.mapper.*; +import com.kwxy.hyt.service.*; + +/** + * @ClassName: + * @Description: + * @author - - admin + * @date - 2018年10月27日 09时48分24秒 + */ + +@Service +public class RecordServiceImpl extends BaseServiceImpl implements RecordService{ + + + @Autowired + private RecordMapper recordMapper; + @Override + public BaseDao getBaseDao() { + return recordMapper; + } + +} diff --git a/源码/src/main/java/com/kwxy/hyt/service/impl/SignServiceImpl.java b/源码/src/main/java/com/kwxy/hyt/service/impl/SignServiceImpl.java new file mode 100644 index 0000000..abebedf --- /dev/null +++ b/源码/src/main/java/com/kwxy/hyt/service/impl/SignServiceImpl.java @@ -0,0 +1,39 @@ +/** + * @ClassName: + * @Description: + * @author administrator + * @date - 2018年10月27日 09时48分24秒 + */ +package com.kwxy.hyt.service.impl; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; +import com.kwxy.hyt.base.*; +import com.kwxy.hyt.po.*; +import com.kwxy.hyt.service.SignService; +import java.util.*; + +import com.kwxy.hyt.po.*; +import com.kwxy.hyt.mapper.*; +import com.kwxy.hyt.service.*; + +/** + * @ClassName: + * @Description: + * @author - - admin + * @date - 2018年10月27日 09时48分24秒 + */ + +@Service +public class SignServiceImpl extends BaseServiceImpl implements SignService{ + + + @Autowired + private SignMapper signMapper; + @Override + public BaseDao getBaseDao() { + return signMapper; + } + +} diff --git a/源码/src/main/java/com/kwxy/hyt/service/impl/StudentServiceImpl.java b/源码/src/main/java/com/kwxy/hyt/service/impl/StudentServiceImpl.java new file mode 100644 index 0000000..f7c7096 --- /dev/null +++ b/源码/src/main/java/com/kwxy/hyt/service/impl/StudentServiceImpl.java @@ -0,0 +1,39 @@ +/** + * @ClassName: + * @Description: + * @author administrator + * @date - 2018年10月27日 09时48分24秒 + */ +package com.kwxy.hyt.service.impl; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; +import com.kwxy.hyt.base.*; +import com.kwxy.hyt.po.*; +import com.kwxy.hyt.service.StudentService; +import java.util.*; + +import com.kwxy.hyt.po.*; +import com.kwxy.hyt.mapper.*; +import com.kwxy.hyt.service.*; + +/** + * @ClassName: + * @Description: + * @author - - admin + * @date - 2018年10月27日 09时48分24秒 + */ + +@Service +public class StudentServiceImpl extends BaseServiceImpl implements StudentService{ + + + @Autowired + private StudentMapper studentMapper; + @Override + public BaseDao getBaseDao() { + return studentMapper; + } + +} diff --git a/源码/src/main/java/com/kwxy/hyt/service/impl/TeacherBjServiceImpl.java b/源码/src/main/java/com/kwxy/hyt/service/impl/TeacherBjServiceImpl.java new file mode 100644 index 0000000..4ae8cef --- /dev/null +++ b/源码/src/main/java/com/kwxy/hyt/service/impl/TeacherBjServiceImpl.java @@ -0,0 +1,39 @@ +/** + * @ClassName: + * @Description: + * @author administrator + * @date - 2018年10月27日 09时48分24秒 + */ +package com.kwxy.hyt.service.impl; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; +import com.kwxy.hyt.base.*; +import com.kwxy.hyt.po.*; +import com.kwxy.hyt.service.TeacherBjService; +import java.util.*; + +import com.kwxy.hyt.po.*; +import com.kwxy.hyt.mapper.*; +import com.kwxy.hyt.service.*; + +/** + * @ClassName: + * @Description: + * @author - - admin + * @date - 2018年10月27日 09时48分24秒 + */ + +@Service +public class TeacherBjServiceImpl extends BaseServiceImpl implements TeacherBjService{ + + + @Autowired + private TeacherBjMapper teacherBjMapper; + @Override + public BaseDao getBaseDao() { + return teacherBjMapper; + } + +} diff --git a/源码/src/main/java/com/kwxy/hyt/service/impl/TeacherServiceImpl.java b/源码/src/main/java/com/kwxy/hyt/service/impl/TeacherServiceImpl.java new file mode 100644 index 0000000..47cb4d1 --- /dev/null +++ b/源码/src/main/java/com/kwxy/hyt/service/impl/TeacherServiceImpl.java @@ -0,0 +1,39 @@ +/** + * @ClassName: + * @Description: + * @author administrator + * @date - 2018年10月27日 09时48分24秒 + */ +package com.kwxy.hyt.service.impl; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; +import com.kwxy.hyt.base.*; +import com.kwxy.hyt.po.*; +import com.kwxy.hyt.service.TeacherService; +import java.util.*; + +import com.kwxy.hyt.po.*; +import com.kwxy.hyt.mapper.*; +import com.kwxy.hyt.service.*; + +/** + * @ClassName: + * @Description: + * @author - - admin + * @date - 2018年10月27日 09时48分24秒 + */ + +@Service +public class TeacherServiceImpl extends BaseServiceImpl implements TeacherService{ + + + @Autowired + private TeacherMapper teacherMapper; + @Override + public BaseDao getBaseDao() { + return teacherMapper; + } + +} diff --git a/源码/src/main/java/com/kwxy/hyt/utils/DateUtil.java b/源码/src/main/java/com/kwxy/hyt/utils/DateUtil.java new file mode 100644 index 0000000..9346a09 --- /dev/null +++ b/源码/src/main/java/com/kwxy/hyt/utils/DateUtil.java @@ -0,0 +1,579 @@ +package com.kwxy.hyt.utils; + +import java.sql.Timestamp; +import java.text.DateFormat; +import java.text.ParseException; +import java.text.ParsePosition; +import java.text.SimpleDateFormat; +import java.util.Calendar; +import java.util.Date; +import java.util.GregorianCalendar; + +/** + * 日期格式化类 + */ +public class DateUtil extends java.util.Date { + private static final long serialVersionUID = 1L; + + private static final DateFormat datetimeFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + private static final DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); + private static final String strFormat1 = "yyyy-MM-dd HH:mm"; + + /** + M 年中的月份 Month July; Jul; 07 + w 年中的周数 Number 27 + W 月份中的周数 Number 2 + D 年中的天数 Number 189 + d 月份中的天数 Number 10 + F 月份中的星期 Number 2 + E 星期中的天数 Text Tuesday; Tue + a Am/pm 标记 Text PM + H 一天中的小时数(0-23) Number 0 + k 一天中的小时数(1-24) Number 24 + K am/pm 中的小时数(0-11) Number 0 + h am/pm 中的小时数(1-12) Number 12 + m 小时中的分钟数 Number 30 + s 分钟中的秒数 Number 55 + S 毫秒数 Number 978 + z 时区 General time zone Pacific Standard Time; PST; GMT-08:00 + Z 时区 RFC 822 time zone -0800 + */ + + /** + * 构造函数 + */ + public DateUtil() { + super(getSystemDate().getTime().getTime()); + } + + /** + * 当前时间 + * + * @return 时间Timestamp + */ + public java.sql.Timestamp parseTime() { + return new java.sql.Timestamp(this.getTime()); + } + + /** + * 将Date类型转换为字符串 yyyy-MM-dd HH:mm:ss + * + * @param Date + * @return String + */ + public static String format(Date date) { + return format(date, null); + } + + /** + * 将Date类型转换为字符串 + * + * @param Date + * @param pattern 字符串格式 + * @return String + */ + public static String format(Date date, String pattern) { + if (date == null) { + return ""; + + } else if (pattern == null || pattern.equals("") || pattern.equals("null")) { + return datetimeFormat.format(date); + + } else { + return new SimpleDateFormat(pattern).format(date); + } + } + + /** + * 将Date类型转换为字符串 yyyy-MM-dd + * + * @param Date + * @return String + */ + public static String formatDate(Date date) { + if (date == null) { + return ""; + } + return dateFormat.format(date); + } + + /** + * 将字符串转换为Date类型 + * + * @param sDate yyyy-MM-dd HH:mm:ss + * @return + */ + public static Date convert(String sDate) { + + try { + if (sDate != null) { + if (sDate.length() == 10) { + return dateFormat.parse(sDate); + } else if (sDate.length() == 19) { + return datetimeFormat.parse(sDate); + } + } + } catch (ParseException pe) { + } + return convert(sDate, null); + } + + /** + * 将字符串转换为Date类型 + * + * @param sDate + * @param pattern 格式 + * @return + */ + public static Date convert(String sDate, String pattern) { + Date date = null; + try { + if (sDate == null || sDate.equals("") || sDate.equals("null")) { + return null; + + } else if (pattern == null || pattern.equals("") || pattern.equals("null")) { + return datetimeFormat.parse(sDate); + + } else { + return new SimpleDateFormat(pattern).parse(sDate); + } + } catch (ParseException pe) { + } + return date; + } + + /** + * String转换为Date + * + * @param sDate 日期"yyyy-MM-dd" + * @return 日期Date + */ + public static Date convertDate(String dateStr) { + return convert(dateStr, "yyyy-MM-dd"); + } + + /** + * String转换为Timestamp + * + * @param sDate 日期 "yyyy-MM-dd" / "yyyy-MM-dd HH:mm:ss" + * @return 日期Timestamp + */ + public static Timestamp convertTimestamp(String sDate) { + if (sDate.length() == 10) { + sDate = sDate + " 00:00:00"; + } + if (sDate.length() == 16) { + sDate = sDate + ":00"; + } + return Timestamp.valueOf(sDate); + } + + /** + * Date转换为Timestamp + */ + public static Timestamp convert(Date date) { + return new Timestamp(date.getTime()); + } + + /** + * 取当前日期(yyyy-mm-dd) + * + * @return 时间Timestamp + */ + public static String getTodayDate() { + return formatDate(new Date()); + } + + /** + * 取当前日期(yyyy-mm-dd hh:mm:ss) + * + * @return 时间Timestamp + */ + public static String getTodayDateTime() { + return format(new Date()); + } + + /** + * 取得n分钟后的时间 + * + * @param date 日期 + * @param afterMins + * @return 时间Timestamp + */ + public static Date getAfterMinute(Date date, long afterMins) { + if (date == null) + date = new Date(); + + long longTime = date.getTime() + afterMins * 60 * 1000; + + return new Date(longTime); + } + + + /** + * add by yinshengming start 2016-4-7 + * 取得n秒后的时间 + * + * @param date 日期 + * @param afterMins + * @return 时间Timestamp + */ + public static Date getAfterSecond(Date date, long afterMins) { + if (date == null) + date = new Date(); + + long longTime = date.getTime() + afterMins * 1000; + + return new Date(longTime); + } + // public static void main(String[] arg) { + // System.err.println(format((new Date()))); + // System.err.println(format(getAfterMinute(new Date(), 3))); + // } + + /** + * 取得指定日期几天后的日期 + * + * @param date 日期 + * @param afterDays 天数 + * @return 日期 + */ + public static Date getAfterDay(Date date, int afterDays) { + if (date == null) + date = new Date(); + + GregorianCalendar cal = new GregorianCalendar(); + cal.setTime(date); + cal.add(java.util.Calendar.DATE, afterDays); + return cal.getTime(); + } + + /** + * 取得指定日期几天后的日期 + * + * @param sDate 日期 yyyy-MM-dd + * @param afterDays 天数 + * @return 日期 + */ + public static String getAfterDay(String sDate, int afterDays) { + Date date = convertDate(sDate); + + date = getAfterDay(date, afterDays); + return formatDate(date); + } + + /** + * 取得指定日期几天前的日期 + * + * @param date 日期 + * @param beforeDays 天数(大于0) + * @return 日期 + */ + public static Date getBeforeDay(Date date, int beforeDays) { + if (date == null) + date = new Date(); + + GregorianCalendar cal = new GregorianCalendar(); + cal.setTime(date); + cal.add(java.util.Calendar.DATE, 0 - Math.abs(beforeDays)); + return cal.getTime(); + } + + /** + * 取得指定日期几天前的日期 + * + * @param sDate 日期 yyyy-MM-dd + * @param beforeDays 天数(大于0) + * @return 日期 + */ + public static String getBeforeDay(String sDate, int beforeDays) { + Date date = convertDate(sDate); + + date = getBeforeDay(date, beforeDays); + return formatDate(date); + } + + /** + * 获得几个月后的日期 + * + * @param date 日期 + * @param afterMonth 月数 + * @return 日期Date + */ + public static Date getAfterMonth(Date date, int afterMonth) { + if (date == null) + date = new Date(); + + GregorianCalendar cal = new GregorianCalendar(); + cal.setTime(date); + + cal.add(java.util.Calendar.MONTH, afterMonth); + return cal.getTime(); + } + + /** + * 获得几个月后的日期 + * + * @param sDate 日期 + * @param afterMonth 月数 + * @return 日期"yyyy-MM-dd" + */ + public static String getAfterMonth(String sDate, int afterMonth) { + Date date = convertDate(sDate); + + date = getAfterMonth(date, afterMonth); + return formatDate(date); + } + + /** + * 获得几年后的日期 + * + * @param date 日期 + * @param afterYear 年数 + * @return 日期Date + */ + public static Date getAfterYear(Date date, int afterYear) { + if (date == null) + date = new Date(); + + GregorianCalendar cal = new GregorianCalendar(); + cal.setTime(date); + + cal.add(java.util.Calendar.YEAR, afterYear); + return cal.getTime(); + } + + /** + * 获得几年后的日期 + * + * @param date 日期 + * @param afterYear 年数 + * @return 日期Date + */ + public static String getAfterYear(String sDate, int afterYear) { + Date date = convertDate(sDate); + + date = getAfterYear(date, afterYear); + return formatDate(date); + } + + /** + * 取得月份第一天日期 + * + * @param sDate(yyyy-mm-dd) : 如为Null,默认取当前系统时间 + * @return yyyy-mm-dd + */ + public static String getMonthFirstDay(String sDate) { + Date date = null; + if (sDate != null && sDate.length() > 0) { + date = convertDate(sDate); + } + Calendar gc = Calendar.getInstance(); + if (date != null) { + gc.setTime(date); + } + gc.set(Calendar.DATE, 1); + + return formatDate(gc.getTime()); + } + + /** + * 取得月份最后一天日期 + * + * @param sDate(yyyy-mm-dd) : 如为Null,默认取当前系统时间 + * @return yyyy-mm-dd + */ + public static String getMonthLastDay(String sDate) { + Date date = null; + + if (sDate != null && sDate.length() > 0) { + date = convertDate(sDate); + } + Calendar gc = Calendar.getInstance(); + if (date != null) { + gc.setTime(date); + } + gc.add(Calendar.MONTH, 1); + gc.add(Calendar.DATE, -gc.get(Calendar.DAY_OF_MONTH)); + + return formatDate(gc.getTime()); + } + + /** + * 取得日期,星期几 + * + * @param dateTime : dateTime + * @return "星期日","星期一","星期二","星期三","星期四","星期五","星期六" + */ + public static String getWeekDayName(String dateTime) throws ParseException { + + String dayNames[] = { "星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六" }; + Date d = convertDate(dateTime); + Calendar cal = Calendar.getInstance(); + cal.setTime(d); + int day = cal.get(Calendar.DAY_OF_WEEK); + String week_day_name = dayNames[day - 1]; + return week_day_name; + } + + /** + * 传入的日期格式是否是yyyy-MM-dd + * + * @param in 被检查的日期 + * @return 是指定的日期格式:true,否则:false + */ + public static boolean isFormatDate(String in) { + return isFormatDate(in, "yyyy-MM-dd"); + } + + /** + * 传入的日期格式是否是指定的日期格式 + * + * @param in 被检查的日期 + * @param format 指定的日期格式 + * @return 是指定的日期格式:true,否则:false + */ + private static boolean isFormatDate(String in, String format) { + if (format != null & format.length() > 0) { + return false; + } + + final SimpleDateFormat sdFormat = new SimpleDateFormat(format); + Date dateCompare = null; + String sDate = ""; + + try { + dateCompare = sdFormat.parse(in, new ParsePosition(0)); + sDate = sdFormat.format(dateCompare); + } catch (final Exception e) { + return false; + } + + if (dateCompare == null) { + return false; + } else { + return sDate.equals(in); + } + } + + /** + * 比较两个日期先后 + * + * @param date1 : yyyy-MM-dd + * @param date1 : yyyy-MM-dd + * @return date1 > date2 : true, else : false + */ + public static boolean compareDate(String date1, String date2) { + if (isFormatDate(date1, "yyyy-MM-dd") && isFormatDate(date2, "yyyy-MM-dd")) { + if (date1.compareTo(date2) > 0) { + return false; + } else { + return true; + } + } else { + return false; + } + } + + /** + * 取当前系统时间 + * + * @return 时间Calendar + */ + public static Calendar getSystemDate() { + return Calendar.getInstance(); + } + + /** + * 转换类型 + * + * @param sDate 日期"yyyy-MM-dd HH:mm" + * @return 日期Date + * @throws Exception + */ + public static java.util.Date convertDate1(String sDate) throws Exception { + SimpleDateFormat sFormat1 = new SimpleDateFormat(strFormat1); + return sFormat1.parse(sDate); + } + + /** + * 取得输入时间n分钟前的时间 + * + * @param date 日期 + * @param lminute + * @return 时间Timestamp + */ + public static Timestamp gettimebefore(java.util.Date date, long lminute) { + + long lngTime = date.getTime() - lminute * 60 * 1000; + + return new Timestamp(lngTime); + + } + + /** + * 取得日期,星期几 + * + * @param dateTime + * : dateTime + * @return "周日","周一","周二","周三","周四","周五","周六" + */ + public static String getWeekDays(Date dateTime){ + String dayNames[] = { "周日", "周一", "周二", "周三", "周四", "周五", "周六" }; + + int day = getWeekDay(dateTime); + String week_day_name = dayNames[day - 1]; + return week_day_name; + } + /** + * 取得日期,星期几 + * + * @param dateTime + * : dateTime + * @return "周日","周一","周二","周三","周四","周五","周六" + */ + public static String getWeekOfDate(Date dateTime){ + String dayNames[] = {"星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"}; + + int day = getWeekDay(dateTime); + String week_day_name = dayNames[day - 1]; + return week_day_name; + } + + /** + * 取得日期是星期的第几天 + * + * @param dateTime + * : dateTime + * @return :1: "星期日",2:"星期一", 3:"星期二",,4:"星期三", 5:"星期四", 6:"星期五", 7:"星期六" + */ + public static int getWeekDay(Date dateTime) { + + Calendar cal = Calendar.getInstance(); + cal.setTime(dateTime); + return cal.get(Calendar.DAY_OF_WEEK); + } + /** + * 求2个日期之间的天数 + * + * @param StartDay 开始日期 + * @param endDay 结束日期 + * @param IncludeEndFlag 是否把结束当天算在内,Y:是,N:否 + * @return + * @throws Exception + */ + public static long DayCountBetweenDays(String StartDay, String endDay, + String IncludeEndFlag) throws Exception { + long DAY = 24L * 60L * 60L * 1000L; + long countBetweenDay = 0; + SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd"); + Date d1 = df.parse(StartDay); + Date d2 = df.parse(endDay); + countBetweenDay = (d2.getTime() - d1.getTime()) / DAY; + if (IncludeEndFlag == "Y") { + countBetweenDay++; + } + return countBetweenDay; + + } +} diff --git a/源码/src/main/java/com/kwxy/hyt/utils/HttpConstants.java b/源码/src/main/java/com/kwxy/hyt/utils/HttpConstants.java new file mode 100644 index 0000000..00da5f8 --- /dev/null +++ b/源码/src/main/java/com/kwxy/hyt/utils/HttpConstants.java @@ -0,0 +1,27 @@ +package com.kwxy.hyt.utils; + +public class HttpConstants { + + public static final String SYSTEM_ERROR_MSG = "系统错误"; + + public static final String REQUEST_PARAMS_NULL = "请求参数为空"; + + public static final String SERVICE_RESPONSE_NULL = "服务端返回结果为空"; + + // 服务端返回成功的标志 + public static final String SERVICE_RESPONSE_SUCCESS_CODE = "AMS00000"; + + // 服务端返回结果的标志 + public static final String SERVICE_RESPONSE_RESULT_FLAG = "returnCode"; + + // 服务端返回结果失败的标志 + public static final String SERVICE_RESPONSE_RESULT_MSG = "errorMsg"; + + // 返回给前段页面成功或失败的标志 + public static final String RESPONSE_RESULT_FLAG_ISERROR = "isError"; + + // 执行删除操作 + public static final String OPERATION_TYPE_DELETE = "D"; + + +} diff --git a/源码/src/main/java/com/kwxy/hyt/utils/JsonUtil.java b/源码/src/main/java/com/kwxy/hyt/utils/JsonUtil.java new file mode 100644 index 0000000..3917dfe --- /dev/null +++ b/源码/src/main/java/com/kwxy/hyt/utils/JsonUtil.java @@ -0,0 +1,109 @@ +package com.kwxy.hyt.utils; +import java.io.IOException; +import java.util.List; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.serializer.SerializeConfig; +import com.alibaba.fastjson.serializer.SerializerFeature; +import com.alibaba.fastjson.serializer.SimpleDateFormatSerializer; + +@SuppressWarnings("unused") +public class JsonUtil { + + private static final String[] DATE_FORMAT = { "yyyy-MM-dd HH:mm:ss" }; + + private static SerializeConfig config = new SerializeConfig(); + static { + String dateFormat = "yyyy-MM-dd HH:mm:ss"; + config.put(java.util.Date.class, new SimpleDateFormatSerializer(dateFormat)); + } + + public static String toJson(Object obj) { + String json = null; + + try { + if (obj != null) { + json = JSON.toJSONString(obj, SerializerFeature.WriteDateUseDateFormat); + } + } catch (Exception e) { + e.printStackTrace(); + } + return json; + } + + public static T toBean(String json, Class clazz) { + T bean = null; + + try { + if (json != null) { + bean = JSON.parseObject(json, clazz); + } + } catch (Exception e) { + e.printStackTrace(); + } + return bean; + } + + public static List toBeanList(String json, Class clazz) { + List beanList = null; + + try { + if (json != null) { + beanList = JSON.parseArray(json, clazz); + } + } catch (Exception e) { + e.printStackTrace(); + } + return beanList; + } + + @SuppressWarnings({ "rawtypes", "unchecked" }) + public static void main(String[] args) throws IOException { + +// { +// +// Map map = new HashMap(); +// map.put("total", 0); +// map.put("rows", new Object[0]); +// map.put("sessionStatus", 0); +// map.put("null", null); +// map.put("date", new Date()); +// map.put("time", new Timestamp(System.currentTimeMillis())); +// +// String json = toJson(map); +// System.out.println(json); +// +// Map toMap = toBean(json, Map.class); +// System.out.println(toMap); +// } + +// { +// List heatInfoList = new ArrayList(); +// +// HeatInfoVO heatInfoVO = new HeatInfoVO(); +// heatInfoVO.setErrMsg("err"); +// heatInfoList.add(heatInfoVO); +// +// List heatInfoDetailList = new ArrayList(); +// +// for (int i = 0; i < 3; i++) { +// HeatInfoDetailVO heatInfoDetailVO = new HeatInfoDetailVO(); +// heatInfoDetailVO.setAreaType("type" + i); +// heatInfoDetailList.add(heatInfoDetailVO); +// } +// +// heatInfoVO.setHeatInfoDetailList(heatInfoDetailList); +// +// String json = JsonUtil.toJson(heatInfoList); +// System.out.println(json); +// +// List heatInfoList2 = JsonUtil.toBeanList(json, HeatInfoVO.class); +// System.out.println(heatInfoList2.get(0).getErrMsg()); +// System.out.println(heatInfoList2.get(0).getHeatInfoDetailList().get(0).getAreaType()); +// System.out.println(JsonUtil.toJson(heatInfoList2)); +// +// } + + + } +} \ No newline at end of file diff --git a/源码/src/main/java/com/kwxy/hyt/utils/Pager.java b/源码/src/main/java/com/kwxy/hyt/utils/Pager.java new file mode 100644 index 0000000..4d73dd9 --- /dev/null +++ b/源码/src/main/java/com/kwxy/hyt/utils/Pager.java @@ -0,0 +1,73 @@ +package com.kwxy.hyt.utils; +import java.util.List; + +import com.github.pagehelper.Page; + + +/** + * 分页对象 + * @author Administrator + * + * @param + */ +public class Pager { + /** + * 分页的大小 + */ + private int size; + /** + * 分页的起始页 + */ + private int offset; + /** + * 总记录数 + */ + private long total; + /** + * 分页的数据 + */ + private List datas; + + public int getSize() { + return size; + } + public void setSize(int size) { + this.size = size; + } + public int getOffset() { + return offset; + } + public void setOffset(int offset) { + this.offset = offset; + } + public long getTotal() { + return total; + } + public void setTotal(long total) { + this.total = total; + } + public List getDatas() { + return datas; + } + public void setDatas(List datas) { + this.datas = datas; + } + /** + * 构造方法里面求数据 + * @param datas + */ + public Pager(List datas) { + if(datas instanceof Page){ + Page page = (Page)datas; + setOffset(page.getPageNum()); + setSize(page.getPageSize()); + setTotal(page.getTotal()); + setDatas(datas); + } + + } + public Pager() { + } + + +} diff --git a/源码/src/main/java/com/kwxy/hyt/utils/SystemContext.java b/源码/src/main/java/com/kwxy/hyt/utils/SystemContext.java new file mode 100644 index 0000000..78ec20b --- /dev/null +++ b/源码/src/main/java/com/kwxy/hyt/utils/SystemContext.java @@ -0,0 +1,80 @@ +package com.kwxy.hyt.utils; +/** + * 用来传递列表对象的ThreadLocal数据 + * @author Administrator + * + */ +public class SystemContext { + /** + * 分页大小 + */ + private static ThreadLocal pageSize = new ThreadLocal(); + /** + * 分页的起始页 + */ + private static ThreadLocal pageOffset = new ThreadLocal(); + /** + * 列表的排序字段 + */ + private static ThreadLocal sort = new ThreadLocal(); + /** + * 列表的排序方式 + */ + private static ThreadLocal order = new ThreadLocal(); + + private static ThreadLocal realPath = new ThreadLocal(); + + + + public static String getRealPath() { + return realPath.get(); + } + public static void setRealPath(String _realPath) { + SystemContext.realPath.set(_realPath); + } + public static Integer getPageSize() { + return pageSize.get(); + } + public static void setPageSize(Integer _pageSize) { + pageSize.set(_pageSize); + } + public static Integer getPageOffset() { + return pageOffset.get(); + } + public static void setPageOffset(Integer _pageOffset) { + pageOffset.set(_pageOffset); + } + public static String getSort() { + return sort.get(); + } + public static void setSort(String _sort) { + SystemContext.sort.set(_sort); + } + public static String getOrder() { + return order.get(); + } + public static void setOrder(String _order) { + SystemContext.order.set(_order); + } + + public static void removePageSize() { + pageSize.remove(); + } + + public static void removePageOffset() { + pageOffset.remove(); + } + + public static void removeSort() { + sort.remove(); + } + + public static void removeOrder() { + order.remove(); + } + + public static void removeRealPath() { + realPath.remove(); + } + +} diff --git a/源码/src/main/java/com/kwxy/hyt/utils/UUIDUtils.java b/源码/src/main/java/com/kwxy/hyt/utils/UUIDUtils.java new file mode 100644 index 0000000..9b5e5bb --- /dev/null +++ b/源码/src/main/java/com/kwxy/hyt/utils/UUIDUtils.java @@ -0,0 +1,99 @@ +package com.kwxy.hyt.utils; + + + + + +import java.math.BigInteger; +import java.security.SecureRandom; +import java.util.Random; +import java.util.UUID; +import java.util.concurrent.locks.ReentrantLock; + +/** + * Helper for creating random and Type 1 (time-based) UUIDs. + * + * @author xuan.chen + */ +public class UUIDUtils { + + private static boolean IS_THREADLOCALRANDOM_AVAILABLE = false; + private static Random random; + private static final long leastSigBits; + private static final ReentrantLock lock = new ReentrantLock(); + private static long lastTime; + + static { + try { + IS_THREADLOCALRANDOM_AVAILABLE = null != UUIDUtils.class.getClassLoader().loadClass( + "java.util.concurrent.ThreadLocalRandom"); + } catch (ClassNotFoundException e) { + } + + byte[] seed = new SecureRandom().generateSeed(8); + leastSigBits = new BigInteger(seed).longValue(); + if (!IS_THREADLOCALRANDOM_AVAILABLE) { + random = new Random(leastSigBits); + } + } + + private UUIDUtils() { + } + + /** + * Create a new random UUID. + * + * @return the new UUID + */ + public static String random() { + byte[] randomBytes = new byte[16]; + if (IS_THREADLOCALRANDOM_AVAILABLE) { + java.util.concurrent.ThreadLocalRandom.current().nextBytes(randomBytes); + } else { + random.nextBytes(randomBytes); + } + + long mostSigBits = 0; + for (int i = 0; i < 8; i++) { + mostSigBits = (mostSigBits << 8) | (randomBytes[i] & 0xff); + } + long leastSigBits = 0; + for (int i = 8; i < 16; i++) { + leastSigBits = (leastSigBits << 8) | (randomBytes[i] & 0xff); + } + + return new UUID(mostSigBits, leastSigBits).toString().replaceAll("-", ""); + } + + /** + * Create a new time-based UUID. + * + * @return the new UUID + */ + public static String create() { + long timeMillis = (System.currentTimeMillis() * 10000) + 0x01B21DD213814000L; + + lock.lock(); + try { + if (timeMillis > lastTime) { + lastTime = timeMillis; + } else { + timeMillis = ++lastTime; + } + } finally { + lock.unlock(); + } + + // time low + long mostSigBits = timeMillis << 32; + + // time mid + mostSigBits |= (timeMillis & 0xFFFF00000000L) >> 16; + + // time hi and version + mostSigBits |= 0x1000 | ((timeMillis >> 48) & 0x0FFF); // version 1 + + return new UUID(mostSigBits, leastSigBits).toString().replaceAll("-", ""); + } + +} diff --git a/源码/src/main/resources/db.properties b/源码/src/main/resources/db.properties new file mode 100644 index 0000000..657c6c7 --- /dev/null +++ b/源码/src/main/resources/db.properties @@ -0,0 +1,6 @@ +jdbc.driver=com.mysql.jdbc.Driver +jdbc.url=jdbc:mysql://127.0.0.1:3306/ssm_xsktsign?useUnicode=true&characterEncoding=utf-8&allowPublicKeyRetrieval=true +jdbc.username=root +jdbc.password=123456 + + diff --git a/源码/src/main/resources/log4j.properties b/源码/src/main/resources/log4j.properties new file mode 100644 index 0000000..041a464 --- /dev/null +++ b/源码/src/main/resources/log4j.properties @@ -0,0 +1,10 @@ +log4j.rootLogger=DEBUG, Console +#Console +log4j.appender.Console=org.apache.log4j.ConsoleAppender +log4j.appender.Console.layout=org.apache.log4j.PatternLayout +log4j.appender.Console.layout.ConversionPattern=%d [%t] %-5p [%c] - %m%n +log4j.logger.java.sql.ResultSet=INFO +log4j.logger.org.apache=INFO +log4j.logger.java.sql.Connection=DEBUG +log4j.logger.java.sql.Statement=DEBUG +log4j.logger.java.sql.PreparedStatement=DEBUG \ No newline at end of file diff --git a/源码/src/main/resources/mybatis/sqlMapConfig.xml b/源码/src/main/resources/mybatis/sqlMapConfig.xml new file mode 100644 index 0000000..8cccb93 --- /dev/null +++ b/源码/src/main/resources/mybatis/sqlMapConfig.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/源码/src/main/resources/spring/applicationContext-dao.xml b/源码/src/main/resources/spring/applicationContext-dao.xml new file mode 100644 index 0000000..6cd31ac --- /dev/null +++ b/源码/src/main/resources/spring/applicationContext-dao.xml @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/源码/src/main/resources/spring/applicationContext-service.xml b/源码/src/main/resources/spring/applicationContext-service.xml new file mode 100644 index 0000000..4324c91 --- /dev/null +++ b/源码/src/main/resources/spring/applicationContext-service.xml @@ -0,0 +1,18 @@ + + + + + \ No newline at end of file diff --git a/源码/src/main/resources/spring/applicationContext-transaction.xml b/源码/src/main/resources/spring/applicationContext-transaction.xml new file mode 100644 index 0000000..ce340e7 --- /dev/null +++ b/源码/src/main/resources/spring/applicationContext-transaction.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/源码/src/main/resources/spring/springmvc.xml b/源码/src/main/resources/spring/springmvc.xml new file mode 100644 index 0000000..29b80ed --- /dev/null +++ b/源码/src/main/resources/spring/springmvc.xml @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + application/json;charset=UTF-8 + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/源码/src/main/webapp/META-INF/MANIFEST.MF b/源码/src/main/webapp/META-INF/MANIFEST.MF new file mode 100644 index 0000000..254272e --- /dev/null +++ b/源码/src/main/webapp/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: + diff --git a/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/base/BaseController.class b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/base/BaseController.class new file mode 100644 index 0000000..0873a32 Binary files /dev/null and b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/base/BaseController.class differ diff --git a/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/base/BaseDao.class b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/base/BaseDao.class new file mode 100644 index 0000000..a063c4f Binary files /dev/null and b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/base/BaseDao.class differ diff --git a/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/base/BaseService.class b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/base/BaseService.class new file mode 100644 index 0000000..c0b1d7a Binary files /dev/null and b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/base/BaseService.class differ diff --git a/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/base/BaseServiceImpl.class b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/base/BaseServiceImpl.class new file mode 100644 index 0000000..ae2a307 Binary files /dev/null and b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/base/BaseServiceImpl.class differ diff --git a/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/controller/BjController.class b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/controller/BjController.class new file mode 100644 index 0000000..30843f1 Binary files /dev/null and b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/controller/BjController.class differ diff --git a/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/controller/FdyController.class b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/controller/FdyController.class new file mode 100644 index 0000000..83d99e0 Binary files /dev/null and b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/controller/FdyController.class differ diff --git a/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/controller/LoginController.class b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/controller/LoginController.class new file mode 100644 index 0000000..273befd Binary files /dev/null and b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/controller/LoginController.class differ diff --git a/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/controller/ManageController.class b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/controller/ManageController.class new file mode 100644 index 0000000..d876439 Binary files /dev/null and b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/controller/ManageController.class differ diff --git a/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/controller/QjController.class b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/controller/QjController.class new file mode 100644 index 0000000..7fba256 Binary files /dev/null and b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/controller/QjController.class differ diff --git a/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/controller/RecordController.class b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/controller/RecordController.class new file mode 100644 index 0000000..d98b170 Binary files /dev/null and b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/controller/RecordController.class differ diff --git a/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/controller/SignController.class b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/controller/SignController.class new file mode 100644 index 0000000..d558e2e Binary files /dev/null and b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/controller/SignController.class differ diff --git a/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/controller/StudentController.class b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/controller/StudentController.class new file mode 100644 index 0000000..61e8c75 Binary files /dev/null and b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/controller/StudentController.class differ diff --git a/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/controller/TeacherBjController.class b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/controller/TeacherBjController.class new file mode 100644 index 0000000..a2c9602 Binary files /dev/null and b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/controller/TeacherBjController.class differ diff --git a/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/controller/TeacherController.class b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/controller/TeacherController.class new file mode 100644 index 0000000..edc1bd7 Binary files /dev/null and b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/controller/TeacherController.class differ diff --git a/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/filter/SystemContextFilter.class b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/filter/SystemContextFilter.class new file mode 100644 index 0000000..baec5c6 Binary files /dev/null and b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/filter/SystemContextFilter.class differ diff --git a/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/mapper/BjMapper.class b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/mapper/BjMapper.class new file mode 100644 index 0000000..6106556 Binary files /dev/null and b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/mapper/BjMapper.class differ diff --git a/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/mapper/BjMapper.xml b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/mapper/BjMapper.xml new file mode 100644 index 0000000..e03ac88 --- /dev/null +++ b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/mapper/BjMapper.xml @@ -0,0 +1,343 @@ + + + + + + + + + + + + + + + + + id, + name, + zy, + isDelete + + + + + #{id} , + #{name} , + #{zy} , + #{isDelete} + + + + + + name = #{name} , + + + zy = #{zy} , + + + isDelete = #{isDelete} + + + + + + + and id =#{id} + + + and name =#{name} + + + and zy =#{zy} + + + and isDelete =#{isDelete} + + + + + + + + + + + + INSERT INTO bj ( + + ) VALUES ( + + ) + + + + + + + delete from bj where id=#{id} + + + + + + delete from bj + WHERE 1=1 + + + + + + + delete from bj + WHERE 1=1 + + + + + + + + UPDATE bj + + + + WHERE 1=1 + + + + + + UPDATE bj + + + + WHERE 1=1 + and id=#{id} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + INSERT INTO bj ( + + ) VALUES + + ( + + #{item.name} , + #{item.zy} , + #{item.isDelete} + + ) + + + + + + + + UPDATE + bj + + + name = #{item.name}, + + + zy = #{item.zy}, + + + isDelete = #{item.isDelete} + + + WHERE + 1=1 + + + + + + + + + + + + + + + + + + + + + + + ${sql} + + + + ${sql} + + + + diff --git a/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/mapper/FdyMapper.class b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/mapper/FdyMapper.class new file mode 100644 index 0000000..92b3d9a Binary files /dev/null and b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/mapper/FdyMapper.class differ diff --git a/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/mapper/FdyMapper.xml b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/mapper/FdyMapper.xml new file mode 100644 index 0000000..38e2501 --- /dev/null +++ b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/mapper/FdyMapper.xml @@ -0,0 +1,379 @@ + + + + + + + + + + + + + + + + + + + + + id, + username, + password, + code, + sex, + bjId, + isDelete + + + + + #{id} , + #{username} , + #{password} , + #{code} , + #{sex} , + #{bjId} , + #{isDelete} + + + + + + username = #{username} , + + + password = #{password} , + + + code = #{code} , + + + sex = #{sex} , + + + bjId = #{bjId} , + + + isDelete = #{isDelete} + + + + + + + and id =#{id} + + + and username =#{username} + + + and password =#{password} + + + and code =#{code} + + + and sex =#{sex} + + + and bjId =#{bjId} + + + and isDelete =#{isDelete} + + + + + + + + + + + + INSERT INTO fdy ( + + ) VALUES ( + + ) + + + + + + + delete from fdy where id=#{id} + + + + + + delete from fdy + WHERE 1=1 + + + + + + + delete from fdy + WHERE 1=1 + + + + + + + + UPDATE fdy + + + + WHERE 1=1 + + + + + + UPDATE fdy + + + + WHERE 1=1 + and id=#{id} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + INSERT INTO fdy ( + + ) VALUES + + ( + + #{item.username} , + #{item.password} , + #{item.code} , + #{item.sex} , + #{item.bjId} + + ) + + + + + + + + UPDATE + fdy + + + username = #{item.username}, + + + password = #{item.password}, + + + code = #{item.code}, + + + sex = #{item.sex}, + + + bjId = #{item.bjId} + + + WHERE + 1=1 + + + + + + + + + + + + + + + + + + + + + + + ${sql} + + + + ${sql} + + + + diff --git a/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/mapper/ManageMapper.class b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/mapper/ManageMapper.class new file mode 100644 index 0000000..438138b Binary files /dev/null and b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/mapper/ManageMapper.class differ diff --git a/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/mapper/ManageMapper.xml b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/mapper/ManageMapper.xml new file mode 100644 index 0000000..7c489fd --- /dev/null +++ b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/mapper/ManageMapper.xml @@ -0,0 +1,330 @@ + + + + + + + + + + + + + + + + id, + username, + password + + + + + #{id} , + #{username} , + #{password} + + + + + + username = #{username} , + + + password = #{password} + + + + + + + and id =#{id} + + + and username =#{username} + + + and password =#{password} + + + + + + + + + + + + INSERT INTO manage ( + + ) VALUES ( + + ) + + + + + + + delete from manage where id=#{id} + + + + + + delete from manage + WHERE 1=1 + + + + + + + delete from manage + WHERE 1=1 + + + + + + + + UPDATE manage + + + + WHERE 1=1 + + + + + + UPDATE manage + + + + WHERE 1=1 + and id=#{id} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + INSERT INTO manage ( + + ) VALUES + + ( + + #{item.username} , + #{item.password} + + ) + + + + + + + + UPDATE + manage + + + username = #{item.username}, + + + password = #{item.password} + + + WHERE + 1=1 + + + + + + + + + + + + + + + + + + + + + + + ${sql} + + + + ${sql} + + + + diff --git a/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/mapper/QjMapper.class b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/mapper/QjMapper.class new file mode 100644 index 0000000..cdaf116 Binary files /dev/null and b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/mapper/QjMapper.class differ diff --git a/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/mapper/QjMapper.xml b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/mapper/QjMapper.xml new file mode 100644 index 0000000..9f38985 --- /dev/null +++ b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/mapper/QjMapper.xml @@ -0,0 +1,405 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + id, + bjId, + studentId, + fdyId, + startTime, + endTime, + status, + reason, + content + + + + + #{id} , + #{bjId} , + #{studentId} , + #{fdyId} , + #{startTime} , + #{endTime} , + #{status} , + #{reason} , + #{content} + + + + + + bjId = #{bjId} , + + + studentId = #{studentId} , + + + fdyId = #{fdyId} , + + + startTime = #{startTime} , + + + endTime = #{endTime} , + + + status = #{status} , + + + reason = #{reason} , + + + content = #{content} + + + + + + + and id =#{id} + + + and bjId =#{bjId} + + + and studentId =#{studentId} + + + and fdyId =#{fdyId} + + + and startTime =#{startTime} + + + and endTime =#{endTime} + + + and status =#{status} + + + and reason = #{reason} + + + and content = #{content} + + + + + + + + + + + + INSERT INTO qj ( + + ) VALUES ( + + ) + + + + + + + delete from qj where id=#{id} + + + + + + delete from qj + WHERE 1=1 + + + + + + + delete from qj + WHERE 1=1 + + + + + + + + UPDATE qj + + + + WHERE 1=1 + + + + + + UPDATE qj + + + + WHERE 1=1 + and id=#{id} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + INSERT INTO qj ( + + ) VALUES + + ( + + #{item.bjId} , + #{item.studentId} , + #{item.fdyId} , + #{item.startTime} , + #{item.endTime} , + #{item.status} + + ) + + + + + + + + UPDATE + qj + + + bjId = #{item.bjId}, + + + studentId = #{item.studentId}, + + + fdyId = #{item.fdyId}, + + + startTime = #{item.startTime}, + + + endTime = #{item.endTime}, + + + status = #{item.status} + + + WHERE + 1=1 + + + + + + + + + + + + + + + + + + + + + + + ${sql} + + + + ${sql} + + + + diff --git a/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/mapper/RecordMapper.class b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/mapper/RecordMapper.class new file mode 100644 index 0000000..c12a5f8 Binary files /dev/null and b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/mapper/RecordMapper.class differ diff --git a/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/mapper/RecordMapper.xml b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/mapper/RecordMapper.xml new file mode 100644 index 0000000..e98cc2d --- /dev/null +++ b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/mapper/RecordMapper.xml @@ -0,0 +1,371 @@ + + + + + + + + + + + + + + + + + + + + + id, + signId, + studentId, + ip, + createTime, + status + + + + + #{id} , + #{signId} , + #{studentId} , + #{ip} , + #{createTime} , + #{status} + + + + + + signId = #{signId} , + + + studentId = #{studentId} , + + + ip = #{ip} , + + + createTime = #{createTime} , + + + status = #{status} + + + + + + + and id =#{id} + + + and signId =#{signId} + + + and studentId =#{studentId} + + + and ip =#{ip} + + + and createTime =#{createTime} + + + and status =#{status} + + + + + + + + + + + + INSERT INTO record ( + + ) VALUES ( + + ) + + + + + + + delete from record where id=#{id} + + + + + + delete from record + WHERE 1=1 + + + + + + + delete from record + WHERE 1=1 + + + + + + + + UPDATE record + + + + WHERE 1=1 + + + + + + UPDATE record + + + + WHERE 1=1 + and id=#{id} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + INSERT INTO record ( + + ) VALUES + + ( + + #{item.signId} , + #{item.studentId} , + #{item.ip} , + #{item.createTime} , + #{item.status} + + ) + + + + + + + + UPDATE + record + + + signId = #{item.signId}, + + + studentId = #{item.studentId}, + + + ip = #{item.ip}, + + + createTime = #{item.createTime}, + + + status = #{item.status} + + + WHERE + 1=1 + + + + + + + + + + + + + + + + + + + + + + + ${sql} + + + + ${sql} + + + + diff --git a/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/mapper/SignMapper.class b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/mapper/SignMapper.class new file mode 100644 index 0000000..7ff8e4d Binary files /dev/null and b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/mapper/SignMapper.class differ diff --git a/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/mapper/SignMapper.xml b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/mapper/SignMapper.xml new file mode 100644 index 0000000..d956445 --- /dev/null +++ b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/mapper/SignMapper.xml @@ -0,0 +1,373 @@ + + + + + + + + + + + + + + + + + + + + + + + id, + bjId, + teacherId, + name, + status, + fdyId + + + + + #{id} , + #{bjId} , + #{teacherId} , + #{name} , + #{status} , + #{fdyId} + + + + + + bjId = #{bjId} , + + + teacherId = #{teacherId} , + + + name = #{name} , + + + status = #{status} , + + + fdyId = #{fdyId} + + + + + + + and id =#{id} + + + and bjId =#{bjId} + + + and teacherId =#{teacherId} + + + and name =#{name} + + + and status =#{status} + + + and fdyId =#{fdyId} + + + + + + + + + + + + INSERT INTO sign ( + + ) VALUES ( + + ) + + + + + + + delete from sign where id=#{id} + + + + + + delete from sign + WHERE 1=1 + + + + + + + delete from sign + WHERE 1=1 + + + + + + + + UPDATE sign + + + + WHERE 1=1 + + + + + + UPDATE sign + + + + WHERE 1=1 + and id=#{id} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + INSERT INTO sign ( + + ) VALUES + + ( + + #{item.bjId} , + #{item.teacherId} , + #{item.name} , + #{item.status} , + #{item.fdyId} + + ) + + + + + + + + UPDATE + sign + + + bjId = #{item.bjId}, + + + teacherId = #{item.teacherId}, + + + name = #{item.name}, + + + status = #{item.status}, + + + fdyId = #{item.fdyId} + + + WHERE + 1=1 + + + + + + + + + + + + + + + + + + + + + + + ${sql} + + + + ${sql} + + + + diff --git a/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/mapper/StudentMapper.class b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/mapper/StudentMapper.class new file mode 100644 index 0000000..0c4cd05 Binary files /dev/null and b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/mapper/StudentMapper.class differ diff --git a/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/mapper/StudentMapper.xml b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/mapper/StudentMapper.xml new file mode 100644 index 0000000..a07e132 --- /dev/null +++ b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/mapper/StudentMapper.xml @@ -0,0 +1,370 @@ + + + + + + + + + + + + + + + + + + + + id, + code, + username, + password, + bjId, + isDelete + + + + + #{id} , + #{code} , + #{username} , + #{password} , + #{bjId} , + #{isDelete} + + + + + + code = #{code} , + + + username = #{username} , + + + password = #{password} , + + + bjId = #{bjId} , + + + isDelete = #{isDelete} + + + + + + + and id =#{id} + + + and code =#{code} + + + and username =#{username} + + + and password =#{password} + + + and bjId =#{bjId} + + + and isDelete =#{isDelete} + + + + + + + + + + + + INSERT INTO student ( + + ) VALUES ( + + ) + + + + + + + delete from student where id=#{id} + + + + + + delete from student + WHERE 1=1 + + + + + + + delete from student + WHERE 1=1 + + + + + + + + UPDATE student + + + + WHERE 1=1 + + + + + + UPDATE student + + + + WHERE 1=1 + and id=#{id} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + INSERT INTO student ( + + ) VALUES + + ( + + #{item.code} , + #{item.username} , + #{item.password} , + #{item.bjId} , + #{item.isDelete} + + ) + + + + + + + + UPDATE + student + + + code = #{item.code}, + + + username = #{item.username}, + + + password = #{item.password}, + + + bjId = #{item.bjId}, + + + isDelete = #{item.isDelete} + + + WHERE + 1=1 + + + + + + + + + + + + + + + + + + + + + + + ${sql} + + + + ${sql} + + + + diff --git a/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/mapper/TeacherBjMapper.class b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/mapper/TeacherBjMapper.class new file mode 100644 index 0000000..3125b73 Binary files /dev/null and b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/mapper/TeacherBjMapper.class differ diff --git a/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/mapper/TeacherBjMapper.xml b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/mapper/TeacherBjMapper.xml new file mode 100644 index 0000000..bafb13e --- /dev/null +++ b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/mapper/TeacherBjMapper.xml @@ -0,0 +1,332 @@ + + + + + + + + + + + + + + + + + + id, + teacherId, + bjId + + + + + #{id} , + #{teacherId} , + #{bjId} + + + + + + teacherId = #{teacherId} , + + + bjId = #{bjId} + + + + + + + and id =#{id} + + + and teacherId =#{teacherId} + + + and bjId =#{bjId} + + + + + + + + + + + + INSERT INTO teacher_bj ( + + ) VALUES ( + + ) + + + + + + + delete from teacher_bj where id=#{id} + + + + + + delete from teacher_bj + WHERE 1=1 + + + + + + + delete from teacher_bj + WHERE 1=1 + + + + + + + + UPDATE teacher_bj + + + + WHERE 1=1 + + + + + + UPDATE teacher_bj + + + + WHERE 1=1 + and id=#{id} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + INSERT INTO teacher_bj ( + + ) VALUES + + ( + + #{item.teacherId} , + #{item.bjId} + + ) + + + + + + + + UPDATE + teacher_bj + + + teacherId = #{item.teacherId}, + + + bjId = #{item.bjId} + + + WHERE + 1=1 + + + + + + + + + + + + + + + + + + + + + + + ${sql} + + + + ${sql} + + + + diff --git a/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/mapper/TeacherMapper.class b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/mapper/TeacherMapper.class new file mode 100644 index 0000000..bbe5668 Binary files /dev/null and b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/mapper/TeacherMapper.class differ diff --git a/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/mapper/TeacherMapper.xml b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/mapper/TeacherMapper.xml new file mode 100644 index 0000000..a332eb2 --- /dev/null +++ b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/mapper/TeacherMapper.xml @@ -0,0 +1,369 @@ + + + + + + + + + + + + + + + + + + + id, + code, + username, + password, + kc, + isDelete + + + + + #{id} , + #{code} , + #{username} , + #{password} , + #{kc} , + #{isDelete} + + + + + + code = #{code} , + + + username = #{username} , + + + password = #{password} , + + + kc = #{kc} , + + + isDelete = #{isDelete} + + + + + + + and id =#{id} + + + and code =#{code} + + + and username =#{username} + + + and password =#{password} + + + and kc =#{kc} + + + and isDelete =#{isDelete} + + + + + + + + + + + + INSERT INTO teacher ( + + ) VALUES ( + + ) + + + + + + + delete from teacher where id=#{id} + + + + + + delete from teacher + WHERE 1=1 + + + + + + + delete from teacher + WHERE 1=1 + + + + + + + + UPDATE teacher + + + + WHERE 1=1 + + + + + + UPDATE teacher + + + + WHERE 1=1 + and id=#{id} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + INSERT INTO teacher ( + + ) VALUES + + ( + + #{item.code} , + #{item.username} , + #{item.password} , + #{item.kc} , + #{item.isDelete} + + ) + + + + + + + + UPDATE + teacher + + + code = #{item.code}, + + + username = #{item.username}, + + + password = #{item.password}, + + + kc = #{item.kc}, + + + isDelete = #{item.isDelete} + + + WHERE + 1=1 + + + + + + + + + + + + + + + + + + + + + + + ${sql} + + + + ${sql} + + + + diff --git a/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/po/Bj.class b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/po/Bj.class new file mode 100644 index 0000000..73a88c5 Binary files /dev/null and b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/po/Bj.class differ diff --git a/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/po/Fdy.class b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/po/Fdy.class new file mode 100644 index 0000000..a9a4e05 Binary files /dev/null and b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/po/Fdy.class differ diff --git a/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/po/Manage.class b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/po/Manage.class new file mode 100644 index 0000000..857e5e9 Binary files /dev/null and b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/po/Manage.class differ diff --git a/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/po/Qj.class b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/po/Qj.class new file mode 100644 index 0000000..7cfab42 Binary files /dev/null and b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/po/Qj.class differ diff --git a/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/po/Record.class b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/po/Record.class new file mode 100644 index 0000000..6c71730 Binary files /dev/null and b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/po/Record.class differ diff --git a/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/po/Sign.class b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/po/Sign.class new file mode 100644 index 0000000..26ba34d Binary files /dev/null and b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/po/Sign.class differ diff --git a/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/po/Student.class b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/po/Student.class new file mode 100644 index 0000000..f6aa431 Binary files /dev/null and b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/po/Student.class differ diff --git a/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/po/Teacher.class b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/po/Teacher.class new file mode 100644 index 0000000..cd24122 Binary files /dev/null and b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/po/Teacher.class differ diff --git a/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/po/TeacherBj.class b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/po/TeacherBj.class new file mode 100644 index 0000000..90cd233 Binary files /dev/null and b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/po/TeacherBj.class differ diff --git a/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/service/BjService.class b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/service/BjService.class new file mode 100644 index 0000000..5781a7a Binary files /dev/null and b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/service/BjService.class differ diff --git a/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/service/FdyService.class b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/service/FdyService.class new file mode 100644 index 0000000..b6e2362 Binary files /dev/null and b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/service/FdyService.class differ diff --git a/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/service/ManageService.class b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/service/ManageService.class new file mode 100644 index 0000000..540c409 Binary files /dev/null and b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/service/ManageService.class differ diff --git a/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/service/QjService.class b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/service/QjService.class new file mode 100644 index 0000000..75bf79a Binary files /dev/null and b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/service/QjService.class differ diff --git a/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/service/RecordService.class b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/service/RecordService.class new file mode 100644 index 0000000..33746b6 Binary files /dev/null and b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/service/RecordService.class differ diff --git a/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/service/SignService.class b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/service/SignService.class new file mode 100644 index 0000000..1f4aa3d Binary files /dev/null and b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/service/SignService.class differ diff --git a/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/service/StudentService.class b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/service/StudentService.class new file mode 100644 index 0000000..1bf246b Binary files /dev/null and b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/service/StudentService.class differ diff --git a/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/service/TeacherBjService.class b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/service/TeacherBjService.class new file mode 100644 index 0000000..b23ba87 Binary files /dev/null and b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/service/TeacherBjService.class differ diff --git a/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/service/TeacherService.class b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/service/TeacherService.class new file mode 100644 index 0000000..60e63e1 Binary files /dev/null and b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/service/TeacherService.class differ diff --git a/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/service/impl/BjServiceImpl.class b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/service/impl/BjServiceImpl.class new file mode 100644 index 0000000..8a77f58 Binary files /dev/null and b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/service/impl/BjServiceImpl.class differ diff --git a/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/service/impl/FdyServiceImpl.class b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/service/impl/FdyServiceImpl.class new file mode 100644 index 0000000..ae5be59 Binary files /dev/null and b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/service/impl/FdyServiceImpl.class differ diff --git a/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/service/impl/ManageServiceImpl.class b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/service/impl/ManageServiceImpl.class new file mode 100644 index 0000000..aab1e94 Binary files /dev/null and b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/service/impl/ManageServiceImpl.class differ diff --git a/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/service/impl/QjServiceImpl.class b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/service/impl/QjServiceImpl.class new file mode 100644 index 0000000..d6fb75c Binary files /dev/null and b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/service/impl/QjServiceImpl.class differ diff --git a/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/service/impl/RecordServiceImpl.class b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/service/impl/RecordServiceImpl.class new file mode 100644 index 0000000..fc0774a Binary files /dev/null and b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/service/impl/RecordServiceImpl.class differ diff --git a/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/service/impl/SignServiceImpl.class b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/service/impl/SignServiceImpl.class new file mode 100644 index 0000000..f1bd074 Binary files /dev/null and b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/service/impl/SignServiceImpl.class differ diff --git a/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/service/impl/StudentServiceImpl.class b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/service/impl/StudentServiceImpl.class new file mode 100644 index 0000000..e8c649d Binary files /dev/null and b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/service/impl/StudentServiceImpl.class differ diff --git a/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/service/impl/TeacherBjServiceImpl.class b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/service/impl/TeacherBjServiceImpl.class new file mode 100644 index 0000000..5dea170 Binary files /dev/null and b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/service/impl/TeacherBjServiceImpl.class differ diff --git a/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/service/impl/TeacherServiceImpl.class b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/service/impl/TeacherServiceImpl.class new file mode 100644 index 0000000..9052afd Binary files /dev/null and b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/service/impl/TeacherServiceImpl.class differ diff --git a/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/utils/DateUtil.class b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/utils/DateUtil.class new file mode 100644 index 0000000..9cf4035 Binary files /dev/null and b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/utils/DateUtil.class differ diff --git a/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/utils/HttpConstants.class b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/utils/HttpConstants.class new file mode 100644 index 0000000..17bc328 Binary files /dev/null and b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/utils/HttpConstants.class differ diff --git a/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/utils/JsonUtil.class b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/utils/JsonUtil.class new file mode 100644 index 0000000..05a2081 Binary files /dev/null and b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/utils/JsonUtil.class differ diff --git a/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/utils/Pager.class b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/utils/Pager.class new file mode 100644 index 0000000..501bb9e Binary files /dev/null and b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/utils/Pager.class differ diff --git a/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/utils/SystemContext.class b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/utils/SystemContext.class new file mode 100644 index 0000000..a2d8193 Binary files /dev/null and b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/utils/SystemContext.class differ diff --git a/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/utils/UUIDUtils.class b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/utils/UUIDUtils.class new file mode 100644 index 0000000..13d2652 Binary files /dev/null and b/源码/src/main/webapp/WEB-INF/classes/com/kwxy/hyt/utils/UUIDUtils.class differ diff --git a/源码/src/main/webapp/WEB-INF/classes/db.properties b/源码/src/main/webapp/WEB-INF/classes/db.properties new file mode 100644 index 0000000..657c6c7 --- /dev/null +++ b/源码/src/main/webapp/WEB-INF/classes/db.properties @@ -0,0 +1,6 @@ +jdbc.driver=com.mysql.jdbc.Driver +jdbc.url=jdbc:mysql://127.0.0.1:3306/ssm_xsktsign?useUnicode=true&characterEncoding=utf-8&allowPublicKeyRetrieval=true +jdbc.username=root +jdbc.password=123456 + + diff --git a/源码/src/main/webapp/WEB-INF/classes/log4j.properties b/源码/src/main/webapp/WEB-INF/classes/log4j.properties new file mode 100644 index 0000000..041a464 --- /dev/null +++ b/源码/src/main/webapp/WEB-INF/classes/log4j.properties @@ -0,0 +1,10 @@ +log4j.rootLogger=DEBUG, Console +#Console +log4j.appender.Console=org.apache.log4j.ConsoleAppender +log4j.appender.Console.layout=org.apache.log4j.PatternLayout +log4j.appender.Console.layout.ConversionPattern=%d [%t] %-5p [%c] - %m%n +log4j.logger.java.sql.ResultSet=INFO +log4j.logger.org.apache=INFO +log4j.logger.java.sql.Connection=DEBUG +log4j.logger.java.sql.Statement=DEBUG +log4j.logger.java.sql.PreparedStatement=DEBUG \ No newline at end of file diff --git a/源码/src/main/webapp/WEB-INF/classes/mybatis/sqlMapConfig.xml b/源码/src/main/webapp/WEB-INF/classes/mybatis/sqlMapConfig.xml new file mode 100644 index 0000000..8cccb93 --- /dev/null +++ b/源码/src/main/webapp/WEB-INF/classes/mybatis/sqlMapConfig.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/源码/src/main/webapp/WEB-INF/classes/spring/applicationContext-dao.xml b/源码/src/main/webapp/WEB-INF/classes/spring/applicationContext-dao.xml new file mode 100644 index 0000000..6cd31ac --- /dev/null +++ b/源码/src/main/webapp/WEB-INF/classes/spring/applicationContext-dao.xml @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/源码/src/main/webapp/WEB-INF/classes/spring/applicationContext-service.xml b/源码/src/main/webapp/WEB-INF/classes/spring/applicationContext-service.xml new file mode 100644 index 0000000..4324c91 --- /dev/null +++ b/源码/src/main/webapp/WEB-INF/classes/spring/applicationContext-service.xml @@ -0,0 +1,18 @@ + + + + + \ No newline at end of file diff --git a/源码/src/main/webapp/WEB-INF/classes/spring/applicationContext-transaction.xml b/源码/src/main/webapp/WEB-INF/classes/spring/applicationContext-transaction.xml new file mode 100644 index 0000000..ce340e7 --- /dev/null +++ b/源码/src/main/webapp/WEB-INF/classes/spring/applicationContext-transaction.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/源码/src/main/webapp/WEB-INF/classes/spring/springmvc.xml b/源码/src/main/webapp/WEB-INF/classes/spring/springmvc.xml new file mode 100644 index 0000000..29b80ed --- /dev/null +++ b/源码/src/main/webapp/WEB-INF/classes/spring/springmvc.xml @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + application/json;charset=UTF-8 + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/源码/src/main/webapp/WEB-INF/jsp/bj/add.jsp b/源码/src/main/webapp/WEB-INF/jsp/bj/add.jsp new file mode 100644 index 0000000..7486f90 --- /dev/null +++ b/源码/src/main/webapp/WEB-INF/jsp/bj/add.jsp @@ -0,0 +1,115 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@include file="/common/taglibs.jsp"%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ +
+
+
+
+
+ + + + + + + + + + + + + + + + + diff --git a/源码/src/main/webapp/WEB-INF/jsp/bj/bj.jsp b/源码/src/main/webapp/WEB-INF/jsp/bj/bj.jsp new file mode 100644 index 0000000..9863a4b --- /dev/null +++ b/源码/src/main/webapp/WEB-INF/jsp/bj/bj.jsp @@ -0,0 +1,141 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@include file="/common/taglibs.jsp"%> + + + + + + + + + + + + + + + + + + +管理员列表 + + +
+
+
+ + +
+
+
+
+ + + 添加 + +
+ + + 共${pagers.total}记录,共${pageNumber}页, + + 当前第${curPage}页 + + + 首页 + + + 上一页 + + + + + + [${pageNumber }] + + + ${pageNumber} + + + + + + 下一页 + + + + + 尾页 + + + 尾页 + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + +
列表
编号名称专业操作
${data.id}${data.name}${data.zy} + +
+
+
+ + + + + + + + + diff --git a/源码/src/main/webapp/WEB-INF/jsp/bj/update.jsp b/源码/src/main/webapp/WEB-INF/jsp/bj/update.jsp new file mode 100644 index 0000000..0945ea3 --- /dev/null +++ b/源码/src/main/webapp/WEB-INF/jsp/bj/update.jsp @@ -0,0 +1,118 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@include file="/common/taglibs.jsp"%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + +
+ +
+ +
+
+
+ +
+ +
+
+
+
+ +
+
+
+
+
+ + + + + + + + + + + + + + + + + diff --git a/源码/src/main/webapp/WEB-INF/jsp/fdy/add.jsp b/源码/src/main/webapp/WEB-INF/jsp/fdy/add.jsp new file mode 100644 index 0000000..41b9f8e --- /dev/null +++ b/源码/src/main/webapp/WEB-INF/jsp/fdy/add.jsp @@ -0,0 +1,153 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@include file="/common/taglibs.jsp"%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+ +
+ + +
+
+
+ +
+ + +
+
+ + +
+
+ +
+
+
+
+
+ + + + + + + + + + + + + + + + + diff --git a/源码/src/main/webapp/WEB-INF/jsp/fdy/fdy.jsp b/源码/src/main/webapp/WEB-INF/jsp/fdy/fdy.jsp new file mode 100644 index 0000000..96a1d94 --- /dev/null +++ b/源码/src/main/webapp/WEB-INF/jsp/fdy/fdy.jsp @@ -0,0 +1,153 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@include file="/common/taglibs.jsp"%> + + + + + + + + + + + + + + + + + + +管理员列表 + + +
+
+
+ + +
+
+
+
+ + + 添加 + +
+ + + 共${pagers.total}记录,共${pageNumber}页, + + 当前第${curPage}页 + + + 首页 + + + 上一页 + + + + + + [${pageNumber }] + + + ${pageNumber} + + + + + + 下一页 + + + + + 尾页 + + + 尾页 + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
列表
编号工号姓名性别负责班级操作
${data.id}${data.code}${data.username}${data.sex}${data.bj.name} + +
+
+
+ + + + + + + + + diff --git a/源码/src/main/webapp/WEB-INF/jsp/fdy/pass.jsp b/源码/src/main/webapp/WEB-INF/jsp/fdy/pass.jsp new file mode 100644 index 0000000..4c68e78 --- /dev/null +++ b/源码/src/main/webapp/WEB-INF/jsp/fdy/pass.jsp @@ -0,0 +1,164 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@include file="/common/taglibs.jsp"%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ + + + +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ + + + + +
+
+ +
+
+
+
+
+ + + + + + + + + + + + + + + + + + diff --git a/源码/src/main/webapp/WEB-INF/jsp/fdy/update.jsp b/源码/src/main/webapp/WEB-INF/jsp/fdy/update.jsp new file mode 100644 index 0000000..3a671b0 --- /dev/null +++ b/源码/src/main/webapp/WEB-INF/jsp/fdy/update.jsp @@ -0,0 +1,157 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@include file="/common/taglibs.jsp"%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ + + + +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+ +
+ + +
+
+
+ +
+ + +
+
+ + +
+
+ +
+
+
+
+
+ + + + + + + + + + + + + + + + + diff --git a/源码/src/main/webapp/WEB-INF/jsp/login/index.jsp b/源码/src/main/webapp/WEB-INF/jsp/login/index.jsp new file mode 100644 index 0000000..2db474f --- /dev/null +++ b/源码/src/main/webapp/WEB-INF/jsp/login/index.jsp @@ -0,0 +1,268 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@include file="/common/taglibs.jsp"%> + + + + + + + + + + +首页 + + + + +
+ +
+
+ + +
+
+
+ + + + + + + + diff --git a/源码/src/main/webapp/WEB-INF/jsp/login/login.jsp b/源码/src/main/webapp/WEB-INF/jsp/login/login.jsp new file mode 100644 index 0000000..b1329d9 --- /dev/null +++ b/源码/src/main/webapp/WEB-INF/jsp/login/login.jsp @@ -0,0 +1,91 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@include file="/common/taglibs.jsp"%> + + + + + + + + + + + + + +后台登陆 + + + + +
考勤管理系统
+
考勤管理系统
+
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+ +
+
+
+
+ + + + + diff --git a/源码/src/main/webapp/WEB-INF/jsp/login/mLogin.jsp b/源码/src/main/webapp/WEB-INF/jsp/login/mLogin.jsp new file mode 100644 index 0000000..563be5c --- /dev/null +++ b/源码/src/main/webapp/WEB-INF/jsp/login/mLogin.jsp @@ -0,0 +1,83 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@include file="/common/taglibs.jsp"%> + + + + + + + + + + + + + +后台登陆 + + + + +
考勤管理系统
+
考勤管理系统
+
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+
+
+ + + + diff --git a/源码/src/main/webapp/WEB-INF/jsp/login/message.jsp b/源码/src/main/webapp/WEB-INF/jsp/login/message.jsp new file mode 100644 index 0000000..a06408d --- /dev/null +++ b/源码/src/main/webapp/WEB-INF/jsp/login/message.jsp @@ -0,0 +1,64 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@include file="/common/taglibs.jsp"%> + + + + + 后台管理系统 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+  

${mess}

+

+

+ <%--

部门管理

+

人员管理

+

考勤记录

--%> +
+ diff --git a/源码/src/main/webapp/WEB-INF/jsp/login/welcome.jsp b/源码/src/main/webapp/WEB-INF/jsp/login/welcome.jsp new file mode 100644 index 0000000..8b0594f --- /dev/null +++ b/源码/src/main/webapp/WEB-INF/jsp/login/welcome.jsp @@ -0,0 +1,64 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@include file="/common/taglibs.jsp"%> + + + + + 后台管理系统 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+  

欢迎使用课堂考勤管理系统

+

+

+ <%--

部门管理

+

人员管理

+

考勤记录

--%> +
+ diff --git a/源码/src/main/webapp/WEB-INF/jsp/qj/add.jsp b/源码/src/main/webapp/WEB-INF/jsp/qj/add.jsp new file mode 100644 index 0000000..7486f90 --- /dev/null +++ b/源码/src/main/webapp/WEB-INF/jsp/qj/add.jsp @@ -0,0 +1,115 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@include file="/common/taglibs.jsp"%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ +
+
+
+
+
+ + + + + + + + + + + + + + + + + diff --git a/源码/src/main/webapp/WEB-INF/jsp/qj/myadd.jsp b/源码/src/main/webapp/WEB-INF/jsp/qj/myadd.jsp new file mode 100644 index 0000000..579242c --- /dev/null +++ b/源码/src/main/webapp/WEB-INF/jsp/qj/myadd.jsp @@ -0,0 +1,155 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@include file="/common/taglibs.jsp"%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ + + + +
+ +
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +

0/200

+
+
+ + + + + +
+
+ +
+
+
+
+
+ + + + + + + + + + + + + diff --git a/源码/src/main/webapp/WEB-INF/jsp/qj/myqj.jsp b/源码/src/main/webapp/WEB-INF/jsp/qj/myqj.jsp new file mode 100644 index 0000000..e857b4d --- /dev/null +++ b/源码/src/main/webapp/WEB-INF/jsp/qj/myqj.jsp @@ -0,0 +1,161 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@include file="/common/taglibs.jsp"%> + + + + + + + + + + + + + + + + + + +管理员列表 + + +
+
+
+
+
+ + + 添加 + +
+ + + 共${pagers.total}记录,共${pageNumber}页, + + 当前第${curPage}页 + + + 首页 + + + 上一页 + + + + + + [${pageNumber }] + + + ${pageNumber} + + + + + + 下一页 + + + + + 尾页 + + + 尾页 + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
列表
编号班级姓名开始时间结束时间状态操作
${data.id}${data.bj.name}${data.student.username}${data.startTime}${data.endTime} + 待审核 + 通过 + 不通过 + + + + + + +
+
+
+ + + + + + + + + diff --git a/源码/src/main/webapp/WEB-INF/jsp/qj/qj.jsp b/源码/src/main/webapp/WEB-INF/jsp/qj/qj.jsp new file mode 100644 index 0000000..b8b5aa1 --- /dev/null +++ b/源码/src/main/webapp/WEB-INF/jsp/qj/qj.jsp @@ -0,0 +1,165 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@include file="/common/taglibs.jsp"%> + + + + + + + + + + + + + + + + + + +管理员列表 + + +
+
+ +
+
+
+ + <%-- + 添加 --%> + +
+ + + 共${pagers.total}记录,共${pageNumber}页, + + 当前第${curPage}页 + + + 首页 + + + 上一页 + + + + + + [${pageNumber }] + + + ${pageNumber} + + + + + + 下一页 + + + + + 尾页 + + + 尾页 + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
列表
编号班级姓名开始时间结束时间状态操作
${data.id}${data.bj.name}${data.student.username}${data.startTime}${data.endTime} + 待审核 + 通过 + 不通过 + + + + + + +
+
+
+ + + + + + + + + diff --git a/源码/src/main/webapp/WEB-INF/jsp/qj/qjSign.jsp b/源码/src/main/webapp/WEB-INF/jsp/qj/qjSign.jsp new file mode 100644 index 0000000..8c6f9b6 --- /dev/null +++ b/源码/src/main/webapp/WEB-INF/jsp/qj/qjSign.jsp @@ -0,0 +1,160 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@include file="/common/taglibs.jsp"%> + + + + + + + + + + + + + + + + + + +管理员列表 + + +
+
+ +
+
+
+ + <%-- + 添加 --%> + +
+ + + + 共${pagers.total}记录,共${pageNumber}页, + + 当前第${curPage}页 + + + 首页 + + + 上一页 + + + + + + [${pageNumber }] + + + ${pageNumber} + + + + + + 下一页 + + + + + 尾页 + + + 尾页 + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
列表
编号班级姓名开始时间结束时间状态
${data.id}${data.bj.name}${data.student.username}${data.startTime}${data.endTime} + 待审核 + 通过 + 不通过 +
+
+
+ + + + + + + + + diff --git a/源码/src/main/webapp/WEB-INF/jsp/qj/update.jsp b/源码/src/main/webapp/WEB-INF/jsp/qj/update.jsp new file mode 100644 index 0000000..873cffe --- /dev/null +++ b/源码/src/main/webapp/WEB-INF/jsp/qj/update.jsp @@ -0,0 +1,155 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@include file="/common/taglibs.jsp"%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ + + + +
+ +
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +

0/200

+
+
+ + + + + +
+
+ +
+
+
+
+
+ + + + + + + + + + + + + diff --git a/源码/src/main/webapp/WEB-INF/jsp/qj/view.jsp b/源码/src/main/webapp/WEB-INF/jsp/qj/view.jsp new file mode 100644 index 0000000..66f9be2 --- /dev/null +++ b/源码/src/main/webapp/WEB-INF/jsp/qj/view.jsp @@ -0,0 +1,174 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@include file="/common/taglibs.jsp"%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ + + + +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +

0/200

+
+
+ +
+ +
+ +

0/200

+
+
+
+ +
+ + +
+
+ + +
+
+ +
+
+
+
+
+ + + + + + + + + + + + + + + + + diff --git a/源码/src/main/webapp/WEB-INF/jsp/record/fdyRecord.jsp b/源码/src/main/webapp/WEB-INF/jsp/record/fdyRecord.jsp new file mode 100644 index 0000000..46df19f --- /dev/null +++ b/源码/src/main/webapp/WEB-INF/jsp/record/fdyRecord.jsp @@ -0,0 +1,162 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@include file="/common/taglibs.jsp"%> + + + + + + + + + + + + + + + + + + +管理员列表 + + +
+ <%--
+ +
+ + +
+
--%> +
+
+ <%-- + + 添加 --%> + +
+ + + + 共${pagers.total}记录,共${pageNumber}页, + + 当前第${curPage}页 + + + 首页 + + + 上一页 + + + + + + [${pageNumber }] + + + ${pageNumber} + + + + + + 下一页 + + + + + 尾页 + + + 尾页 + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
列表
编号姓名班级教师ip签到时间签到名称状态
${data.id}${data.student.username}${data.sign.bj.name}${data.sign.teacher.username}${data.ip}${data.sign.name} + 缺勤 + 已签到 + 已请假 +
+
+
+ + + + + + + + + diff --git a/源码/src/main/webapp/WEB-INF/jsp/record/mysign.jsp b/源码/src/main/webapp/WEB-INF/jsp/record/mysign.jsp new file mode 100644 index 0000000..0a81fa0 --- /dev/null +++ b/源码/src/main/webapp/WEB-INF/jsp/record/mysign.jsp @@ -0,0 +1,186 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@include file="/common/taglibs.jsp"%> + + + + + + + + + + + + + + + + + + +管理员列表 + + +
+ <%--
+ +
+ + +
+
--%> +
+
+ <%-- + + 添加 --%> + +
+ + + 共${pagers.total}记录,共${pageNumber}页, + + 当前第${curPage}页 + + + 首页 + + + 上一页 + + + + + + [${pageNumber }] + + + ${pageNumber} + + + + + + 下一页 + + + + + 尾页 + + + 尾页 + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
列表
编号姓名签到名称状态操作
${data.id}${data.student.username}${data.sign.name} + 缺勤 + 已签到 + 已请假 + + + + 签到 + + 查看签到明细 + +
+
+
+ + + + + + + + + diff --git a/源码/src/main/webapp/WEB-INF/jsp/record/record.jsp b/源码/src/main/webapp/WEB-INF/jsp/record/record.jsp new file mode 100644 index 0000000..b84b26f --- /dev/null +++ b/源码/src/main/webapp/WEB-INF/jsp/record/record.jsp @@ -0,0 +1,168 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@include file="/common/taglibs.jsp"%> + + + + + + + + + + + + + + + + + + +管理员列表 + + +
+ <%--
+ +
+ + +
+
--%> +
+
+ <%-- + + 添加 --%> + +
+ + + + 共${pagers.total}记录,共${pageNumber}页, + + 当前第${curPage}页 + + + 首页 + + + 上一页 + + + + + + [${pageNumber }] + + + ${pageNumber} + + + + + + 下一页 + + + + + 尾页 + + + 尾页 + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
列表
编号姓名班级教师ip签到时间签到名称状态操作
${data.id}${data.student.username}${data.sign.bj.name}${data.sign.teacher.username}${data.ip}${data.sign.name} + 缺勤 + 已签到 + 已请假 + + + + 设置为已请假 + + +
+
+
+ + + + + + + + + diff --git a/源码/src/main/webapp/WEB-INF/jsp/record/view.jsp b/源码/src/main/webapp/WEB-INF/jsp/record/view.jsp new file mode 100644 index 0000000..367f62f --- /dev/null +++ b/源码/src/main/webapp/WEB-INF/jsp/record/view.jsp @@ -0,0 +1,109 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@include file="/common/taglibs.jsp"%> + + + + + + + + + + + + + + + + + + +管理员列表 + + +
+ <%--
+ +
+ + +
+
--%> +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
列表
编号姓名班级教师ip签到时间签到名称状态
${obj.id}${obj.student.username}${obj.sign.bj.name}${obj.sign.teacher.username}${obj.ip}${obj.sign.name} + 缺勤 + 已签到 + 已请假 +
+
+
+ + + + + + + + + diff --git a/源码/src/main/webapp/WEB-INF/jsp/sign/add.jsp b/源码/src/main/webapp/WEB-INF/jsp/sign/add.jsp new file mode 100644 index 0000000..12e6b9a --- /dev/null +++ b/源码/src/main/webapp/WEB-INF/jsp/sign/add.jsp @@ -0,0 +1,110 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@include file="/common/taglibs.jsp"%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+ +
+ +
+
+
+
+ +
+
+
+
+
+ + + + + + + + + + + + + + + + + diff --git a/源码/src/main/webapp/WEB-INF/jsp/sign/fdySign.jsp b/源码/src/main/webapp/WEB-INF/jsp/sign/fdySign.jsp new file mode 100644 index 0000000..1e2c1be --- /dev/null +++ b/源码/src/main/webapp/WEB-INF/jsp/sign/fdySign.jsp @@ -0,0 +1,156 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@include file="/common/taglibs.jsp"%> + + + + + + + + + + + + + + + + + + +管理员列表 + + +
+
+ +
+ + +
+
+
+
+ <%-- + + 添加 + --%> +
+ + + + 共${pagers.total}记录,共${pageNumber}页, + + 当前第${curPage}页 + + + 首页 + + + 上一页 + + + + + + [${pageNumber }] + + + ${pageNumber} + + + + + + 下一页 + + + + + 尾页 + + + 尾页 + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
列表
编号班级名称操作
${data.id}${data.bj.name}${data.name} + + + 查看签到记录 +
+
+
+ + + + + + + + + diff --git a/源码/src/main/webapp/WEB-INF/jsp/sign/mybj.jsp b/源码/src/main/webapp/WEB-INF/jsp/sign/mybj.jsp new file mode 100644 index 0000000..6f40d32 --- /dev/null +++ b/源码/src/main/webapp/WEB-INF/jsp/sign/mybj.jsp @@ -0,0 +1,111 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@include file="/common/taglibs.jsp"%> + + + + + + + + + + + + + + + + + + +管理员列表 + + +
+
+ +
+
+
+ + <%-- + 添加 --%> + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
列表
编号班级教师操作
${data.id}${data.bj.name}${data.teacher.username} + +
+
+
+ + + + + + + + + diff --git a/源码/src/main/webapp/WEB-INF/jsp/sign/mybj2.jsp b/源码/src/main/webapp/WEB-INF/jsp/sign/mybj2.jsp new file mode 100644 index 0000000..3667b46 --- /dev/null +++ b/源码/src/main/webapp/WEB-INF/jsp/sign/mybj2.jsp @@ -0,0 +1,112 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@include file="/common/taglibs.jsp"%> + + + + + + + + + + + + + + + + + + +管理员列表 + + +
+
+ +
+
+
+ + <%-- + 添加 --%> + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
列表
编号班级教师操作
${data.id}${data.bj.name}${data.teacher.username} + + 查看请假 +
+
+
+ + + + + + + + + diff --git a/源码/src/main/webapp/WEB-INF/jsp/sign/sign.jsp b/源码/src/main/webapp/WEB-INF/jsp/sign/sign.jsp new file mode 100644 index 0000000..a3a80f3 --- /dev/null +++ b/源码/src/main/webapp/WEB-INF/jsp/sign/sign.jsp @@ -0,0 +1,177 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@include file="/common/taglibs.jsp"%> + + + + + + + + + + + + + + + + + + +管理员列表 + + +
+
+ +
+ + +
+
+
+
+ + + 添加 + +
+ + + + 共${pagers.total}记录,共${pageNumber}页, + + 当前第${curPage}页 + + + 首页 + + + 上一页 + + + + + + [${pageNumber }] + + + ${pageNumber} + + + + + + 下一页 + + + + + 尾页 + + + 尾页 + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
列表
编号班级名称状态操作
${data.id}${data.bj.name}${data.name} + 进行中 + 已结束 + 已上报 + + + + + + + 结束签到 + + + 上报 + + + + + + + 上报 + + + 查看签到记录 + +
+
+
+ + + + + + + + + diff --git a/源码/src/main/webapp/WEB-INF/jsp/sign/update.jsp b/源码/src/main/webapp/WEB-INF/jsp/sign/update.jsp new file mode 100644 index 0000000..4c9ded5 --- /dev/null +++ b/源码/src/main/webapp/WEB-INF/jsp/sign/update.jsp @@ -0,0 +1,110 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@include file="/common/taglibs.jsp"%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+ +
+ +
+
+
+
+ +
+
+
+
+
+ + + + + + + + + + + + + + + + + diff --git a/源码/src/main/webapp/WEB-INF/jsp/student/add.jsp b/源码/src/main/webapp/WEB-INF/jsp/student/add.jsp new file mode 100644 index 0000000..08ea0d6 --- /dev/null +++ b/源码/src/main/webapp/WEB-INF/jsp/student/add.jsp @@ -0,0 +1,129 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@include file="/common/taglibs.jsp"%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+
+ +
+
+
+
+
+ + + + + + + + + + + + + + + + + diff --git a/源码/src/main/webapp/WEB-INF/jsp/student/pass.jsp b/源码/src/main/webapp/WEB-INF/jsp/student/pass.jsp new file mode 100644 index 0000000..ee9892e --- /dev/null +++ b/源码/src/main/webapp/WEB-INF/jsp/student/pass.jsp @@ -0,0 +1,164 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@include file="/common/taglibs.jsp"%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ + + + +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ + + + + +
+
+ +
+
+
+
+
+ + + + + + + + + + + + + + + + + + diff --git a/源码/src/main/webapp/WEB-INF/jsp/student/student.jsp b/源码/src/main/webapp/WEB-INF/jsp/student/student.jsp new file mode 100644 index 0000000..f4179b4 --- /dev/null +++ b/源码/src/main/webapp/WEB-INF/jsp/student/student.jsp @@ -0,0 +1,150 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@include file="/common/taglibs.jsp"%> + + + + + + + + + + + + + + + + + + +管理员列表 + + +
+
+
+ + +
+
+
+
+ + + 添加 + +
+ + + 共${pagers.total}记录,共${pageNumber}页, + + 当前第${curPage}页 + + + 首页 + + + 上一页 + + + + + + [${pageNumber }] + + + ${pageNumber} + + + + + + 下一页 + + + + + 尾页 + + + 尾页 + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
列表
编号学号姓名班级操作
${data.id}${data.code}${data.username}${data.bj.name} + +
+
+
+ + + + + + + + + diff --git a/源码/src/main/webapp/WEB-INF/jsp/student/update.jsp b/源码/src/main/webapp/WEB-INF/jsp/student/update.jsp new file mode 100644 index 0000000..4319ad3 --- /dev/null +++ b/源码/src/main/webapp/WEB-INF/jsp/student/update.jsp @@ -0,0 +1,133 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@include file="/common/taglibs.jsp"%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ + + + +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+
+ +
+
+
+
+
+ + + + + + + + + + + + + + + + + diff --git a/源码/src/main/webapp/WEB-INF/jsp/teacher/add.jsp b/源码/src/main/webapp/WEB-INF/jsp/teacher/add.jsp new file mode 100644 index 0000000..4ae48f3 --- /dev/null +++ b/源码/src/main/webapp/WEB-INF/jsp/teacher/add.jsp @@ -0,0 +1,163 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@include file="/common/taglibs.jsp"%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+
+
+
+ +
+
+
+
+ + + + +
+
+
+
+
+
+ + + + +
+
+ +
+
+
+
+
+ + + + + + + + + + + + + + + + + diff --git a/源码/src/main/webapp/WEB-INF/jsp/teacher/pass.jsp b/源码/src/main/webapp/WEB-INF/jsp/teacher/pass.jsp new file mode 100644 index 0000000..ab6e359 --- /dev/null +++ b/源码/src/main/webapp/WEB-INF/jsp/teacher/pass.jsp @@ -0,0 +1,164 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@include file="/common/taglibs.jsp"%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ + + + +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ + + + + +
+
+ +
+
+
+
+
+ + + + + + + + + + + + + + + + + + diff --git a/源码/src/main/webapp/WEB-INF/jsp/teacher/teacher.jsp b/源码/src/main/webapp/WEB-INF/jsp/teacher/teacher.jsp new file mode 100644 index 0000000..4fab955 --- /dev/null +++ b/源码/src/main/webapp/WEB-INF/jsp/teacher/teacher.jsp @@ -0,0 +1,150 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@include file="/common/taglibs.jsp"%> + + + + + + + + + + + + + + + + + + +管理员列表 + + +
+
+
+ + +
+
+
+
+ + + 添加 + +
+ + + 共${pagers.total}记录,共${pageNumber}页, + + 当前第${curPage}页 + + + 首页 + + + 上一页 + + + + + + [${pageNumber }] + + + ${pageNumber} + + + + + + 下一页 + + + + + 尾页 + + + 尾页 + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
列表
编号工号姓名课程操作
${data.id}${data.code}${data.username}${data.kc} + +
+
+
+ + + + + + + + + diff --git a/源码/src/main/webapp/WEB-INF/jsp/teacher/update.jsp b/源码/src/main/webapp/WEB-INF/jsp/teacher/update.jsp new file mode 100644 index 0000000..123f7e8 --- /dev/null +++ b/源码/src/main/webapp/WEB-INF/jsp/teacher/update.jsp @@ -0,0 +1,165 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@include file="/common/taglibs.jsp"%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ + + +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+
+
+
+ +
+
+
+
+ + + + +
+
+
+
+
+
+ + + + +
+
+ +
+
+
+
+
+ + + + + + + + + + + + + + + + + diff --git a/源码/src/main/webapp/WEB-INF/lib/commons-codec-1.9.jar b/源码/src/main/webapp/WEB-INF/lib/commons-codec-1.9.jar new file mode 100644 index 0000000..ef35f1c Binary files /dev/null and b/源码/src/main/webapp/WEB-INF/lib/commons-codec-1.9.jar differ diff --git a/源码/src/main/webapp/WEB-INF/lib/httpclient-4.2.5.jar b/源码/src/main/webapp/WEB-INF/lib/httpclient-4.2.5.jar new file mode 100644 index 0000000..5310588 Binary files /dev/null and b/源码/src/main/webapp/WEB-INF/lib/httpclient-4.2.5.jar differ diff --git a/源码/src/main/webapp/WEB-INF/lib/httpcore-4.2.4.jar b/源码/src/main/webapp/WEB-INF/lib/httpcore-4.2.4.jar new file mode 100644 index 0000000..9f45bd9 Binary files /dev/null and b/源码/src/main/webapp/WEB-INF/lib/httpcore-4.2.4.jar differ diff --git a/源码/src/main/webapp/WEB-INF/lib/json.jar b/源码/src/main/webapp/WEB-INF/lib/json.jar new file mode 100644 index 0000000..ed0bc93 Binary files /dev/null and b/源码/src/main/webapp/WEB-INF/lib/json.jar differ diff --git a/源码/src/main/webapp/WEB-INF/lib/ojdbc6.jar b/源码/src/main/webapp/WEB-INF/lib/ojdbc6.jar new file mode 100644 index 0000000..d20359e Binary files /dev/null and b/源码/src/main/webapp/WEB-INF/lib/ojdbc6.jar differ diff --git a/源码/src/main/webapp/WEB-INF/lib/ueditor-1.1.2.jar b/源码/src/main/webapp/WEB-INF/lib/ueditor-1.1.2.jar new file mode 100644 index 0000000..4819fe0 Binary files /dev/null and b/源码/src/main/webapp/WEB-INF/lib/ueditor-1.1.2.jar differ diff --git a/源码/src/main/webapp/WEB-INF/tlds/c.tld b/源码/src/main/webapp/WEB-INF/tlds/c.tld new file mode 100644 index 0000000..8c447f5 --- /dev/null +++ b/源码/src/main/webapp/WEB-INF/tlds/c.tld @@ -0,0 +1,572 @@ + + + + + JSTL 1.1 core library + JSTL core + 1.1 + c + http://java.sun.com/jsp/jstl/core + + + + Provides core validation features for JSTL tags. + + + org.apache.taglibs.standard.tlv.JstlCoreTLV + + + + + + Catches any Throwable that occurs in its body and optionally + exposes it. + + catch + org.apache.taglibs.standard.tag.common.core.CatchTag + JSP + + +Name of the exported scoped variable for the +exception thrown from a nested action. The type of the +scoped variable is the type of the exception thrown. + + var + false + false + + + + + + Simple conditional tag that establishes a context for + mutually exclusive conditional operations, marked by + <when> and <otherwise> + + choose + org.apache.taglibs.standard.tag.common.core.ChooseTag + JSP + + + + + Simple conditional tag, which evalutes its body if the + supplied condition is true and optionally exposes a Boolean + scripting variable representing the evaluation of this condition + + if + org.apache.taglibs.standard.tag.rt.core.IfTag + JSP + + +The test condition that determines whether or +not the body content should be processed. + + test + true + true + boolean + + + +Name of the exported scoped variable for the +resulting value of the test condition. The type +of the scoped variable is Boolean. + + var + false + false + + + +Scope for var. + + scope + false + false + + + + + + Retrieves an absolute or relative URL and exposes its contents + to either the page, a String in 'var', or a Reader in 'varReader'. + + import + org.apache.taglibs.standard.tag.rt.core.ImportTag + org.apache.taglibs.standard.tei.ImportTEI + JSP + + +The URL of the resource to import. + + url + true + true + + + +Name of the exported scoped variable for the +resource's content. The type of the scoped +variable is String. + + var + false + false + + + +Scope for var. + + scope + false + false + + + +Name of the exported scoped variable for the +resource's content. The type of the scoped +variable is Reader. + + varReader + false + false + + + +Name of the context when accessing a relative +URL resource that belongs to a foreign +context. + + context + false + true + + + +Character encoding of the content at the input +resource. + + charEncoding + false + true + + + + + + The basic iteration tag, accepting many different + collection types and supporting subsetting and other + functionality + + forEach + org.apache.taglibs.standard.tag.rt.core.ForEachTag + org.apache.taglibs.standard.tei.ForEachTEI + JSP + + +Collection of items to iterate over. + + items + false + true + java.lang.Object + + java.lang.Object + + + + +If items specified: +Iteration begins at the item located at the +specified index. First item of the collection has +index 0. +If items not specified: +Iteration begins with index set at the value +specified. + + begin + false + true + int + + + +If items specified: +Iteration ends at the item located at the +specified index (inclusive). +If items not specified: +Iteration ends when index reaches the value +specified. + + end + false + true + int + + + +Iteration will only process every step items of +the collection, starting with the first one. + + step + false + true + int + + + +Name of the exported scoped variable for the +current item of the iteration. This scoped +variable has nested visibility. Its type depends +on the object of the underlying collection. + + var + false + false + + + +Name of the exported scoped variable for the +status of the iteration. Object exported is of type +javax.servlet.jsp.jstl.core.LoopTagStatus. This scoped variable has nested +visibility. + + varStatus + false + false + + + + + + Iterates over tokens, separated by the supplied delimeters + + forTokens + org.apache.taglibs.standard.tag.rt.core.ForTokensTag + JSP + + +String of tokens to iterate over. + + items + true + true + java.lang.String + + java.lang.String + + + + +The set of delimiters (the characters that +separate the tokens in the string). + + delims + true + true + java.lang.String + + + +Iteration begins at the token located at the +specified index. First token has index 0. + + begin + false + true + int + + + +Iteration ends at the token located at the +specified index (inclusive). + + end + false + true + int + + + +Iteration will only process every step tokens +of the string, starting with the first one. + + step + false + true + int + + + +Name of the exported scoped variable for the +current item of the iteration. This scoped +variable has nested visibility. + + var + false + false + + + +Name of the exported scoped variable for the +status of the iteration. Object exported is of +type +javax.servlet.jsp.jstl.core.LoopTag +Status. This scoped variable has nested +visibility. + + varStatus + false + false + + + + + + Like <%= ... >, but for expressions. + + out + org.apache.taglibs.standard.tag.rt.core.OutTag + JSP + + +Expression to be evaluated. + + value + true + true + + + +Default value if the resulting value is null. + + default + false + true + + + +Determines whether characters <,>,&,'," in the +resulting string should be converted to their +corresponding character entity codes. Default value is +true. + + escapeXml + false + true + + + + + + + Subtag of <choose> that follows <when> tags + and runs only if all of the prior conditions evaluated to + 'false' + + otherwise + org.apache.taglibs.standard.tag.common.core.OtherwiseTag + JSP + + + + + Adds a parameter to a containing 'import' tag's URL. + + param + org.apache.taglibs.standard.tag.rt.core.ParamTag + JSP + + +Name of the query string parameter. + + name + true + true + + + +Value of the parameter. + + value + false + true + + + + + + Redirects to a new URL. + + redirect + org.apache.taglibs.standard.tag.rt.core.RedirectTag + JSP + + +The URL of the resource to redirect to. + + url + false + true + + + +Name of the context when redirecting to a relative URL +resource that belongs to a foreign context. + + context + false + true + + + + + + Removes a scoped variable (from a particular scope, if specified). + + remove + org.apache.taglibs.standard.tag.common.core.RemoveTag + empty + + +Name of the scoped variable to be removed. + + var + true + false + + + +Scope for var. + + scope + false + false + + + + + + Sets the result of an expression evaluation in a 'scope' + + set + org.apache.taglibs.standard.tag.rt.core.SetTag + JSP + + +Name of the exported scoped variable to hold the value +specified in the action. The type of the scoped variable is +whatever type the value expression evaluates to. + + var + false + false + + + +Expression to be evaluated. + + value + false + true + + java.lang.Object + + + + +Target object whose property will be set. Must evaluate to +a JavaBeans object with setter property property, or to a +java.util.Map object. + + target + false + true + + + +Name of the property to be set in the target object. + + property + false + true + + + +Scope for var. + + scope + false + false + + + + + + Creates a URL with optional query parameters. + + url + org.apache.taglibs.standard.tag.rt.core.UrlTag + JSP + + +Name of the exported scoped variable for the +processed url. The type of the scoped variable is +String. + + var + false + false + + + +Scope for var. + + scope + false + false + + + +URL to be processed. + + value + false + true + + + +Name of the context when specifying a relative URL +resource that belongs to a foreign context. + + context + false + true + + + + + + Subtag of <choose> that includes its body if its + condition evalutes to 'true' + + when + org.apache.taglibs.standard.tag.rt.core.WhenTag + JSP + + +The test condition that determines whether or not the +body content should be processed. + + test + true + true + boolean + + + + diff --git a/源码/src/main/webapp/WEB-INF/tlds/fmt.tld b/源码/src/main/webapp/WEB-INF/tlds/fmt.tld new file mode 100644 index 0000000..3b9a54a --- /dev/null +++ b/源码/src/main/webapp/WEB-INF/tlds/fmt.tld @@ -0,0 +1,671 @@ + + + + + JSTL 1.1 i18n-capable formatting library + JSTL fmt + 1.1 + fmt + http://java.sun.com/jsp/jstl/fmt + + + + Provides core validation features for JSTL tags. + + + org.apache.taglibs.standard.tlv.JstlFmtTLV + + + + + + Sets the request character encoding + + requestEncoding + org.apache.taglibs.standard.tag.rt.fmt.RequestEncodingTag + empty + + +Name of character encoding to be applied when +decoding request parameters. + + value + false + true + + + + + + Stores the given locale in the locale configuration variable + + setLocale + org.apache.taglibs.standard.tag.rt.fmt.SetLocaleTag + empty + + +A String value is interpreted as the +printable representation of a locale, which +must contain a two-letter (lower-case) +language code (as defined by ISO-639), +and may contain a two-letter (upper-case) +country code (as defined by ISO-3166). +Language and country codes must be +separated by hyphen (-) or underscore +(_). + + value + true + true + + + +Vendor- or browser-specific variant. +See the java.util.Locale javadocs for +more information on variants. + + variant + false + true + + + +Scope of the locale configuration variable. + + scope + false + false + + + + + + Specifies the time zone for any time formatting or parsing actions + nested in its body + + timeZone + org.apache.taglibs.standard.tag.rt.fmt.TimeZoneTag + JSP + + +The time zone. A String value is interpreted as +a time zone ID. This may be one of the time zone +IDs supported by the Java platform (such as +"America/Los_Angeles") or a custom time zone +ID (such as "GMT-8"). See +java.util.TimeZone for more information on +supported time zone formats. + + value + true + true + + + + + + Stores the given time zone in the time zone configuration variable + + setTimeZone + org.apache.taglibs.standard.tag.rt.fmt.SetTimeZoneTag + empty + + +The time zone. A String value is interpreted as +a time zone ID. This may be one of the time zone +IDs supported by the Java platform (such as +"America/Los_Angeles") or a custom time zone +ID (such as "GMT-8"). See java.util.TimeZone for +more information on supported time zone +formats. + + value + true + true + + + +Name of the exported scoped variable which +stores the time zone of type +java.util.TimeZone. + + var + false + false + + + +Scope of var or the time zone configuration +variable. + + scope + false + false + + + + + + Loads a resource bundle to be used by its tag body + + bundle + org.apache.taglibs.standard.tag.rt.fmt.BundleTag + JSP + + +Resource bundle base name. This is the bundle's +fully-qualified resource name, which has the same +form as a fully-qualified class name, that is, it uses +"." as the package component separator and does not +have any file type (such as ".class" or ".properties") +suffix. + + basename + true + true + + + +Prefix to be prepended to the value of the message +key of any nested <fmt:message> action. + + prefix + false + true + + + + + + Loads a resource bundle and stores it in the named scoped variable or + the bundle configuration variable + + setBundle + org.apache.taglibs.standard.tag.rt.fmt.SetBundleTag + empty + + +Resource bundle base name. This is the bundle's +fully-qualified resource name, which has the same +form as a fully-qualified class name, that is, it uses +"." as the package component separator and does not +have any file type (such as ".class" or ".properties") +suffix. + + basename + true + true + + + +Name of the exported scoped variable which stores +the i18n localization context of type +javax.servlet.jsp.jstl.fmt.LocalizationC +ontext. + + var + false + false + + + +Scope of var or the localization context +configuration variable. + + scope + false + false + + + + + + Maps key to localized message and performs parametric replacement + + message + org.apache.taglibs.standard.tag.rt.fmt.MessageTag + JSP + + +Message key to be looked up. + + key + false + true + + + +Localization context in whose resource +bundle the message key is looked up. + + bundle + false + true + + + +Name of the exported scoped variable +which stores the localized message. + + var + false + false + + + +Scope of var. + + scope + false + false + + + + + + Supplies an argument for parametric replacement to a containing + <message> tag + + param + org.apache.taglibs.standard.tag.rt.fmt.ParamTag + JSP + + +Argument used for parametric replacement. + + value + false + true + + + + + + Formats a numeric value as a number, currency, or percentage + + formatNumber + org.apache.taglibs.standard.tag.rt.fmt.FormatNumberTag + JSP + + +Numeric value to be formatted. + + value + false + true + + + +Specifies whether the value is to be +formatted as number, currency, or +percentage. + + type + false + true + + + +Custom formatting pattern. + + pattern + false + true + + + +ISO 4217 currency code. Applied only +when formatting currencies (i.e. if type is +equal to "currency"); ignored otherwise. + + currencyCode + false + true + + + +Currency symbol. Applied only when +formatting currencies (i.e. if type is equal +to "currency"); ignored otherwise. + + currencySymbol + false + true + + + +Specifies whether the formatted output +will contain any grouping separators. + + groupingUsed + false + true + + + +Maximum number of digits in the integer +portion of the formatted output. + + maxIntegerDigits + false + true + + + +Minimum number of digits in the integer +portion of the formatted output. + + minIntegerDigits + false + true + + + +Maximum number of digits in the +fractional portion of the formatted output. + + maxFractionDigits + false + true + + + +Minimum number of digits in the +fractional portion of the formatted output. + + minFractionDigits + false + true + + + +Name of the exported scoped variable +which stores the formatted result as a +String. + + var + false + false + + + +Scope of var. + + scope + false + false + + + + + + Parses the string representation of a number, currency, or percentage + + parseNumber + org.apache.taglibs.standard.tag.rt.fmt.ParseNumberTag + JSP + + +String to be parsed. + + value + false + true + + + +Specifies whether the string in the value +attribute should be parsed as a number, +currency, or percentage. + + type + false + true + + + +Custom formatting pattern that determines +how the string in the value attribute is to be +parsed. + + pattern + false + true + + + +Locale whose default formatting pattern (for +numbers, currencies, or percentages, +respectively) is to be used during the parse +operation, or to which the pattern specified +via the pattern attribute (if present) is +applied. + + parseLocale + false + true + + + +Specifies whether just the integer portion of +the given value should be parsed. + + integerOnly + false + true + + + +Name of the exported scoped variable which +stores the parsed result (of type +java.lang.Number). + + var + false + false + + + +Scope of var. + + scope + false + false + + + + + + Formats a date and/or time using the supplied styles and pattern + + formatDate + org.apache.taglibs.standard.tag.rt.fmt.FormatDateTag + empty + + +Date and/or time to be formatted. + + value + true + true + + + +Specifies whether the time, the date, or both +the time and date components of the given +date are to be formatted. + + type + false + true + + + +Predefined formatting style for dates. Follows +the semantics defined in class +java.text.DateFormat. Applied only +when formatting a date or both a date and +time (i.e. if type is missing or is equal to +"date" or "both"); ignored otherwise. + + dateStyle + false + true + + + +Predefined formatting style for times. Follows +the semantics defined in class +java.text.DateFormat. Applied only +when formatting a time or both a date and +time (i.e. if type is equal to "time" or "both"); +ignored otherwise. + + timeStyle + false + true + + + +Custom formatting style for dates and times. + + pattern + false + true + + + +Time zone in which to represent the formatted +time. + + timeZone + false + true + + + +Name of the exported scoped variable which +stores the formatted result as a String. + + var + false + false + + + +Scope of var. + + scope + false + false + + + + + + Parses the string representation of a date and/or time + + parseDate + org.apache.taglibs.standard.tag.rt.fmt.ParseDateTag + JSP + + +Date string to be parsed. + + value + false + true + + + +Specifies whether the date string in the +value attribute is supposed to contain a +time, a date, or both. + + type + false + true + + + +Predefined formatting style for days +which determines how the date +component of the date string is to be +parsed. Applied only when formatting a +date or both a date and time (i.e. if type +is missing or is equal to "date" or "both"); +ignored otherwise. + + dateStyle + false + true + + + +Predefined formatting styles for times +which determines how the time +component in the date string is to be +parsed. Applied only when formatting a +time or both a date and time (i.e. if type +is equal to "time" or "both"); ignored +otherwise. + + timeStyle + false + true + + + +Custom formatting pattern which +determines how the date string is to be +parsed. + + pattern + false + true + + + +Time zone in which to interpret any time +information in the date string. + + timeZone + false + true + + + +Locale whose predefined formatting styles +for dates and times are to be used during +the parse operation, or to which the +pattern specified via the pattern +attribute (if present) is applied. + + parseLocale + false + true + + + +Name of the exported scoped variable in +which the parsing result (of type +java.util.Date) is stored. + + var + false + false + + + +Scope of var. + + scope + false + false + + + + diff --git a/源码/src/main/webapp/WEB-INF/tlds/fn.tld b/源码/src/main/webapp/WEB-INF/tlds/fn.tld new file mode 100644 index 0000000..12d4ca8 --- /dev/null +++ b/源码/src/main/webapp/WEB-INF/tlds/fn.tld @@ -0,0 +1,207 @@ + + + + + JSTL 1.1 functions library + JSTL functions + 1.1 + fn + http://java.sun.com/jsp/jstl/functions + + + + Tests if an input string contains the specified substring. + + contains + org.apache.taglibs.standard.functions.Functions + boolean contains(java.lang.String, java.lang.String) + + <c:if test="${fn:contains(name, searchString)}"> + + + + + + Tests if an input string contains the specified substring in a case insensitive way. + + containsIgnoreCase + org.apache.taglibs.standard.functions.Functions + boolean containsIgnoreCase(java.lang.String, java.lang.String) + + <c:if test="${fn:containsIgnoreCase(name, searchString)}"> + + + + + + Tests if an input string ends with the specified suffix. + + endsWith + org.apache.taglibs.standard.functions.Functions + boolean endsWith(java.lang.String, java.lang.String) + + <c:if test="${fn:endsWith(filename, ".txt")}"> + + + + + + Escapes characters that could be interpreted as XML markup. + + escapeXml + org.apache.taglibs.standard.functions.Functions + java.lang.String escapeXml(java.lang.String) + + ${fn:escapeXml(param:info)} + + + + + + Returns the index withing a string of the first occurrence of a specified substring. + + indexOf + org.apache.taglibs.standard.functions.Functions + int indexOf(java.lang.String, java.lang.String) + + ${fn:indexOf(name, "-")} + + + + + + Joins all elements of an array into a string. + + join + org.apache.taglibs.standard.functions.Functions + java.lang.String join(java.lang.String[], java.lang.String) + + ${fn:join(array, ";")} + + + + + + Returns the number of items in a collection, or the number of characters in a string. + + length + org.apache.taglibs.standard.functions.Functions + int length(java.lang.Object) + + You have ${fn:length(shoppingCart.products)} in your shopping cart. + + + + + + Returns a string resulting from replacing in an input string all occurrences + of a "before" string into an "after" substring. + + replace + org.apache.taglibs.standard.functions.Functions + java.lang.String replace(java.lang.String, java.lang.String, java.lang.String) + + ${fn:replace(text, "-", "•")} + + + + + + Splits a string into an array of substrings. + + split + org.apache.taglibs.standard.functions.Functions + java.lang.String[] split(java.lang.String, java.lang.String) + + ${fn:split(customerNames, ";")} + + + + + + Tests if an input string starts with the specified prefix. + + startsWith + org.apache.taglibs.standard.functions.Functions + boolean startsWith(java.lang.String, java.lang.String) + + <c:if test="${fn:startsWith(product.id, "100-")}"> + + + + + + Returns a subset of a string. + + substring + org.apache.taglibs.standard.functions.Functions + java.lang.String substring(java.lang.String, int, int) + + P.O. Box: ${fn:substring(zip, 6, -1)} + + + + + + Returns a subset of a string following a specific substring. + + substringAfter + org.apache.taglibs.standard.functions.Functions + java.lang.String substringAfter(java.lang.String, java.lang.String) + + P.O. Box: ${fn:substringAfter(zip, "-")} + + + + + + Returns a subset of a string before a specific substring. + + substringBefore + org.apache.taglibs.standard.functions.Functions + java.lang.String substringBefore(java.lang.String, java.lang.String) + + Zip (without P.O. Box): ${fn:substringBefore(zip, "-")} + + + + + + Converts all of the characters of a string to lower case. + + toLowerCase + org.apache.taglibs.standard.functions.Functions + java.lang.String toLowerCase(java.lang.String) + + Product name: ${fn.toLowerCase(product.name)} + + + + + + Converts all of the characters of a string to upper case. + + toUpperCase + org.apache.taglibs.standard.functions.Functions + java.lang.String toUpperCase(java.lang.String) + + Product name: ${fn.UpperCase(product.name)} + + + + + + Removes white spaces from both ends of a string. + + trim + org.apache.taglibs.standard.functions.Functions + java.lang.String trim(java.lang.String) + + Name: ${fn.trim(name)} + + + + diff --git a/源码/src/main/webapp/WEB-INF/tlds/pager-taglib.tld b/源码/src/main/webapp/WEB-INF/tlds/pager-taglib.tld new file mode 100644 index 0000000..db0a696 --- /dev/null +++ b/源码/src/main/webapp/WEB-INF/tlds/pager-taglib.tld @@ -0,0 +1,276 @@ + + + + + 1.0 + 1.1 + pg + http://jsptags.com/tags/navigation/pager + + The Pager Tag Library is the easy and flexible way to implement paging of + large data sets in JavaServer Pages (JSP). It can emulate all currently + known paging styles with minimal effort. It also includes re-usable index + styles that emulate the search result navigators of popular web sites + such as Google[sm], AltaVista® and Yahoo!. The Pager Tag Library does most + of the work for you by dynamically organizing your data set into pages and + generating a browsable index with virtually any look desired. + + + + pager + com.jsptags.navigation.pager.PagerTag + com.jsptags.navigation.pager.PagerTagExtraInfo + JSP + + id + false + true + + + url + false + true + + + items + false + true + + + maxItems + false + true + + + maxPageItems + false + true + + + maxIndexPages + false + true + + + isOffset + false + true + + + index + false + true + + + export + false + true + + + scope + false + true + + + + + param + com.jsptags.navigation.pager.ParamTag + empty + + id + false + true + + + name + true + true + + + value + false + true + + + + + item + com.jsptags.navigation.pager.ItemTag + JSP + + id + false + true + + + + + index + com.jsptags.navigation.pager.IndexTag + com.jsptags.navigation.pager.IndexTagExtraInfo + JSP + + id + false + true + + + export + false + false + + + + + first + com.jsptags.navigation.pager.FirstTag + com.jsptags.navigation.pager.JumpTagExtraInfo + JSP + + id + false + true + + + export + false + false + + + unless + false + true + + + + + prev + com.jsptags.navigation.pager.PrevTag + com.jsptags.navigation.pager.PageTagExtraInfo + JSP + + id + false + true + + + export + false + false + + + ifnull + false + true + + + + + page + com.jsptags.navigation.pager.PageTag + com.jsptags.navigation.pager.JumpTagExtraInfo + JSP + + id + false + true + + + export + false + false + + + + + pages + com.jsptags.navigation.pager.PagesTag + com.jsptags.navigation.pager.PageTagExtraInfo + JSP + + id + false + true + + + export + false + false + + + + + next + com.jsptags.navigation.pager.NextTag + com.jsptags.navigation.pager.PageTagExtraInfo + JSP + + id + false + true + + + export + false + false + + + ifnull + false + true + + + + + last + com.jsptags.navigation.pager.LastTag + com.jsptags.navigation.pager.JumpTagExtraInfo + JSP + + id + false + true + + + export + false + false + + + unless + false + true + + + + + skip + com.jsptags.navigation.pager.SkipTag + com.jsptags.navigation.pager.PageTagExtraInfo + JSP + + id + false + true + + + export + false + false + + + ifnull + false + true + + + pages + true + true + + + + diff --git a/源码/src/main/webapp/WEB-INF/web.xml b/源码/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000..9bd2719 --- /dev/null +++ b/源码/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,58 @@ + + + + + index.jsp + + + contextConfigLocation + /WEB-INF/classes/spring/applicationContext-*.xml + + + org.springframework.web.context.ContextLoaderListener + + + characterEncodingFilter + org.springframework.web.filter.CharacterEncodingFilter + + encoding + UTF-8 + + + forceEncoding + true + + + + characterEncodingFilter + /* + + + + + springmvc + org.springframework.web.servlet.DispatcherServlet + + contextConfigLocation + classpath:spring/springmvc.xml + + + + springmvc + / + + + + + SystemContextFilter + com.kwxy.hyt.filter.SystemContextFilter + + pageSize + 15 + + + + SystemContextFilter + /* + + \ No newline at end of file diff --git a/源码/src/main/webapp/common/footer.jsp b/源码/src/main/webapp/common/footer.jsp new file mode 100644 index 0000000..5a7b6dc --- /dev/null +++ b/源码/src/main/webapp/common/footer.jsp @@ -0,0 +1,68 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@include file="/common/taglibs.jsp"%> +
+ + +
+ +
+
+ × +
+

咨询反馈

+
+ +
+
+ +
+
+ 确认 +
+
+
+
+ + + \ No newline at end of file diff --git a/源码/src/main/webapp/common/menu.jsp b/源码/src/main/webapp/common/menu.jsp new file mode 100644 index 0000000..927675c --- /dev/null +++ b/源码/src/main/webapp/common/menu.jsp @@ -0,0 +1,20 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@include file="/common/taglibs.jsp"%> + \ No newline at end of file diff --git a/源码/src/main/webapp/common/taglibs.jsp b/源码/src/main/webapp/common/taglibs.jsp new file mode 100644 index 0000000..42875a8 --- /dev/null +++ b/源码/src/main/webapp/common/taglibs.jsp @@ -0,0 +1,8 @@ +<%@ taglib prefix="c" uri="/WEB-INF/tlds/c.tld" %> +<%@ taglib prefix="fn" uri="/WEB-INF/tlds/fn.tld" %> +<%@ taglib prefix="fmt" uri="/WEB-INF/tlds/fmt.tld" %> +<%@ taglib prefix="pg" uri="/WEB-INF/tlds/pager-taglib.tld" %> + + diff --git a/源码/src/main/webapp/common/top.jsp b/源码/src/main/webapp/common/top.jsp new file mode 100644 index 0000000..dda38ff --- /dev/null +++ b/源码/src/main/webapp/common/top.jsp @@ -0,0 +1,19 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@include file="/common/taglibs.jsp"%> +
+
+ +
+ +
+
+
\ No newline at end of file diff --git a/源码/src/main/webapp/common/ufooter.jsp b/源码/src/main/webapp/common/ufooter.jsp new file mode 100644 index 0000000..203fe1d --- /dev/null +++ b/源码/src/main/webapp/common/ufooter.jsp @@ -0,0 +1,81 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@include file="/common/taglibs.jsp"%> + +
+ + +
+ \ No newline at end of file diff --git a/源码/src/main/webapp/common/utop.jsp b/源码/src/main/webapp/common/utop.jsp new file mode 100644 index 0000000..905f1cd --- /dev/null +++ b/源码/src/main/webapp/common/utop.jsp @@ -0,0 +1,64 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@include file="/common/taglibs.jsp"%> + +
+
+
+ +
+
+ + + + + + + + + + + + + +
+
+
+
+
+ +
+
+
+
+ +
商品
+
+ + +
+
+
+
+
+
+
+ + \ No newline at end of file diff --git a/源码/src/main/webapp/index.jsp b/源码/src/main/webapp/index.jsp new file mode 100644 index 0000000..6acf4e2 --- /dev/null +++ b/源码/src/main/webapp/index.jsp @@ -0,0 +1,20 @@ +<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> +<%@include file="/common/taglibs.jsp"%> +<% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + + + My JSP 'index.jsp' starting page + + + + + + + + diff --git a/源码/src/main/webapp/js/jquery-1.4.4.min.js b/源码/src/main/webapp/js/jquery-1.4.4.min.js new file mode 100644 index 0000000..8f3ca2e --- /dev/null +++ b/源码/src/main/webapp/js/jquery-1.4.4.min.js @@ -0,0 +1,167 @@ +/*! + * 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;kd)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(;K0))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
a";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="";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="
";c.support.shrinkWrapBlocks=r.offsetWidth!==2}r.innerHTML="
t
";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-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=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=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-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;h0?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;p0){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;i0};k.find=function(g,i,n){var m;if(!g)return[];for(var p=0,q=o.order.length;p":function(g,i){var n,m=typeof i==="string",p=0,q=g.length;if(m&&!/\W/.test(i))for(i=i.toLowerCase();p=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 in[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=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";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="";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="

";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="
";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;n0)for(var h=d;h0},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-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-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=/\s]+\/)>/g,P={option:[1, +""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_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
","
"];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>");try{for(var b=0,d=this.length;b0||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;f0?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>");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]===""&&!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>/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("
").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=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-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); diff --git a/源码/src/main/webapp/resource/assets/css/bui-min.css b/源码/src/main/webapp/resource/assets/css/bui-min.css new file mode 100644 index 0000000..6341126 --- /dev/null +++ b/源码/src/main/webapp/resource/assets/css/bui-min.css @@ -0,0 +1 @@ +.clearfix{*zoom:1;}.clearfix:before,.clearfix:after{display:table;content:"";}.clearfix:after{clear:both;}.hide-text{overflow:hidden;text-indent:100%;white-space:nowrap;}.input-block-level{display:block;width:100%;min-height:28px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;}.bui-menu{list-style:none;margin:0;}.bui-menu .bui-menu-item{cursor:pointer;}.bui-side-menu{height:100%;text-align:left;overflow-y:auto;overflow-x:hidden;padding:0 3px;}.bui-side-menu .bui-menu-title,.bui-side-menu .bui-menu-title s,.bui-side-menu .menu-second a,.bui-side-menu .menu-second em{background:url("http://img04.taobaocdn.com/tps/i4/T1GgTxXm4qXXaGyjny-500-188.png") -9999px -9999px no-repeat;}.bui-side-menu a{color:#5c637b;outline:none;}.bui-side-menu a:hover{color:#414da7;text-decoration:none;}.bui-side-menu a:active{color:#5c637b;}.bui-side-menu .bui-menu-item-collapsed .bui-menu{display:none;}.bui-side-menu .bui-menu-item-collapsed .bui-menu-title s{background-position:0 -30px;}.bui-side-menu .menu-second{padding-top:1px;outline:0;}.bui-side-menu .menu-second .bui-menu{margin-top:5px;}.bui-side-menu .menu-second .bui-menu-item{outline:0;line-height:20px;}.bui-side-menu .menu-second .bui-menu-item a{height:20px;text-indent:24px;overflow:hidden;margin-bottom:5px;display:block;}.bui-side-menu .menu-second .bui-menu-item a em{display:block;margin:0 1px;font-style:normal;text-align:left;overflow:hidden;height:19px;line-height:22px;cursor:pointer;_line-height:20px;}.bui-side-menu .menu-second .bui-menu-item-selected a{color:#fff;background-position:0 -130px;}.bui-side-menu .menu-second .bui-menu-item-selected a em{background-position:right -100px;}.bui-side-menu .bui-menu-title-text{float:left;overflow:hidden;height:14px;line-height:14px;display:block;_margin-top:-2px;}.bui-side-menu .bui-menu-title{margin:0 1px;background-position:0 15px;height:17px;color:#636775;font-weight:bold;overflow:hidden;line-height:25px;vertical-align:middle;padding:8px 0 5px 5px;}.bui-side-menu .bui-menu-title s{width:10px;height:10px;overflow:hidden;display:block;float:left;margin-right:5px;margin-top:1px;background-position:0 -71px;}.bui-pop-menu{border:1px solid #c3c3d6;background-color:#fff;padding:2px 0;}.bui-pop-menu .bui-menu-item{padding:3px 15px;}.bui-pop-menu .bui-menu-item-hover{background-color:#36c;color:#fff;}.bui-context-menu{position:absolute;border:1px solid #c3c3d6;background-color:#e8e9ef;padding:2px;z-index:1100;background:url("http://img04.taobaocdn.com/tps/i4/T1J_T4XjRfXXaZ8J6X-2-340.gif") repeat-y 28px 0 #e8e9ef;}.bui-context-menu .bui-menu-item{white-space:nowrap;overflow:hidden;position:relative;padding:0;}.bui-context-menu .bui-menu-item .x-caret{position:absolute;right:10px;top:10px;}.bui-context-menu .bui-menu-item-sparator{border-top:1px solid #c3c3d6;height:1px;background-color:white;margin-left:27px;}.bui-context-menu .bui-menu-item-link{cursor:default;display:block;*zoom:1;width:134px;height:24px;margin:1px;padding:0 2px;text-decoration:none;border:1px solid transparent;_border-color:tomato;_filter:chroma(color=#ff6347);}.bui-context-menu .bui-menu-item-icon{display:inline-block;*display:inline;*zoom:1;width:16px;height:16px;margin:0 11px 0 2px;border:0 solid white;}.bui-context-menu .bui-menu-item-hover{background-color:#e8e9ef;}.bui-context-menu .bui-menu-item-open .bui-menu-item-link,.bui-context-menu .bui-menu-item-hover .bui-menu-item-link{background-color:#E0E6FC;border:1px solid #A9B9F5;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;cursor:pointer;overflow:hidden;}.bui-context-menu .bui-menu-item-text{color:#333;font-size:11px;_font-size:12px;line-height:20px;*zoom:1;}.bui-context-menu .bui-menu-item-disabled{outline:none;}.bui-context-menu .bui-menu-item-disabled .bui-menu-item-text{color:#999;}.bui-context-menu .bui-menu-item-disabled .bui-menu-item-icon{opacity:.5;filter:alpha(opacity=50);}.button-tabs .bui-tab-item-selected{color:#fff;font-weight:bold;background-color:#6c8ffc;background-image:-moz-linear-gradient(top,#6c9dfc,#6c79fc);background-image:-ms-linear-gradient(top,#6c9dfc,#6c79fc);background-image:-webkit-gradient(linear,0 0,0 100%,from(#6c9dfc),to(#6c79fc));background-image:-webkit-linear-gradient(top,#6c9dfc,#6c79fc);background-image:-o-linear-gradient(top,#6c9dfc,#6c79fc);background-image:linear-gradient(top,#6c9dfc,#6c79fc);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#6c9dfc',endColorstr='#6c79fc',GradientType=0);border-color:#6c79fc #6c79fc #2135fa;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);border:1px solid #5984de;}.button-tabs .bui-tab-item-selected:hover,.button-tabs .bui-tab-item-selected:active,.button-tabs .bui-tab-item-selected.active,.button-tabs .bui-tab-item-selected.disabled{background-color:#6c79fc;}.button-tabs .bui-tab-item-selected[disabled]{background-color:#6c79fc;}.button-tabs .bui-tab-item-selected:active,.button-tabs .bui-tab-item-selected.active{background-color:#3a4bfb \9;}.nav-tabs .bui-tab-item{border:1px solid #c3c3d6;border-bottom-color:transparent;margin-bottom:-1px;margin-right:3px;}.nav-tabs .bui-tab-item-text,.nav-tabs a{padding:5px 15px;background-color:#eee;position:relative;display:inline-block;*display:inline;*zoom:1;}.nav-tabs .bui-tab-item-selected{background-color:#fff;-webkit-border-radius:2px 2px 0 0;-moz-border-radius:2px 2px 0 0;border-radius:2px 2px 0 0;}.nav-tabs .bui-tab-item-selected .bui-tab-item-text,.nav-tabs .bui-tab-item-selected a{background-color:#fff;position:relative;border-bottom:-1px;z-index:10;}.link-tabs .bui-tab-item-selected a{color:#36c;}.tab-nav-bar,.tab-nav-arrow,.tab-nav-wrapper,.tab-nav-inner,.bui-nav-tab-item,.tab-item-close{background:url("http://img03.taobaocdn.com/tps/i3/T1SLHBXaXmXXXF.Nbe-140-120.gif") -9999px -9999px no-repeat;}.tab-nav-bar{position:relative;width:100%;z-index:1;overflow:hidden;height:21px;background-position:0 20px;background-repeat:repeat-x;}.tab-content-container{width:100%;}.tab-content-container iframe{border:none;}.tab-content{height:100%;}.tab-nav-arrow{display:block;position:absolute;text-decoration:none;overflow:hidden;width:13px;height:13px;text-indent:-99px;top:4px;}.arrow-left{background-position:0 -60px;left:5px;}.arrow-left-active .arrow-left{background-position:-40px -60px;cursor:pointer;}.arrow-right{background-position:-20px -60px;right:5px;}.arrow-right-active .arrow-right{background-position:-100px -60px;cursor:pointer;}.tab-nav-wrapper{margin:0 23px;background-position:0 -100px;background-repeat:repeat-x;}.tab-nav-inner{background-position:0 20px;background-repeat:repeat-x;background-color:#e2eaf4;margin:0 2px;overflow:hidden;position:relative;}.tab-nav-list{position:relative;left:0;padding:0;margin:0;*zoom:1;}.tab-nav-list:before,.tab-nav-list:after{display:table;content:"";}.tab-nav-list:after{clear:both;}.bui-nav-tab-item{background-position:0 -4px;color:#263e74;float:left;width:87px;height:21px;margin-right:-12px;position:relative;cursor:pointer;padding:0 33px 0 20px;z-index:1;overflow:hidden;}.tab-item-title{cursor:pointer;}.tab-nav-actived{background-position:0 -29px;z-index:2;}.tab-item-close{display:block;position:absolute;text-decoration:none;overflow:hidden;cursor:pointer;width:13px;height:13px;text-indent:-99px;top:4px;right:17px;background-position:0 -80px;}.tab-item-close:hover{background-position:-20px -80px;}.bui-select-list{border:1px solid #c3c3d6;background-color:#fff;overflow:auto;}.bui-select-list .bui-list-item{padding:2px 4px 2px 8px;-webkit-user-select:none;-moz-user-select:none;-o-user-select:none;user-select:none;cursor:pointer;border:1px solid #fff;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;margin:1px;padding-left:8px;*zoom:1;}.bui-select-list .bui-list-item-hover{background:#dee5ff;border:1px solid #ccd7ff;}.bui-select-list .bui-list-item-selected{background:#ccd7ff;border:1px solid #99afff;}.bui-select-list .bui-list-item-disabled{background:none;color:#ccc;cursor:default;}.bui-select-list .bui-list-item-disabled a{color:#ccc;cursor:default;}.bui-select-list .bui-list-item-disabled a:hover{text-decoration:none;}.bui-select{display:inline-block;*display:inline;*zoom:1;}.bui-select .bui-select-input{_border:1px solid #c3c3d6;border-right:none;vertical-align:middle;outline:none;_height:22px;_padding:1px 4px;width:118px;}.bui-select .x-icon{vertical-align:middle;cursor:pointer;height:20px;width:20px;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}.bui-select .x-caret{vertical-align:middle;}.bui-overlay{position:absolute;left:-9999px;top:-9999px;}.bui-dialog{background-color:#fff;border:1px solid #c3c3d6;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;-webkit-box-shadow:inset 0 0 0 1px #fff;-moz-box-shadow:inset 0 0 0 1px #fff;box-shadow:inset 0 0 0 1px #fff;position:absolute;background-color:#e8e9ef;z-index:1070;}.bui-picker{z-index:1200;}.bui-dialog .bui-contentbox{background-color:#e8e9ef;margin:1px;}.bui-dialog .bui-stdmod-header{height:22px;line-height:22px;font-size:12px;font-weight:bold;padding-left:4px;color:#333;cursor:move;-webkit-user-select:none;-moz-user-select:none;-o-user-select:none;user-select:none;}.bui-dialog .bui-stdmod-body{background-color:#fff;border:1px solid #c3c3d6;margin:0 4px;padding:20px;}.bui-dialog .bui-stdmod-footer{margin:4px 0;text-align:center;-webkit-user-select:none;-moz-user-select:none;-o-user-select:none;user-select:none;}.bui-dialog .bui-stdmod-footer .button{margin-right:15px;vertical-align:baseline;}.bui-dialog .bui-stdmod-footer .button:last-child{margin-right:0;}.bui-dialog a.bui-ext-close{position:absolute;right:6px;top:4px;width:16px;height:16px;text-decoration:none;outline:none;overflow:hidden;cursor:pointer;text-decoration:none;z-index:1;}.bui-dialog .bui-ext-close-x{display:block;font-size:17px;*font-size:16px;height:14px;width:14px;line-height:14px;cursor:pointer;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;}.bui-message{padding-bottom:10px;}.bui-message .bui-stdmod-body{padding:0 35px 20px;background-color:transparent;border:none;}.bui-message .bui-stdmod-body .x-icon{float:left;}.bui-message .bui-message-content{margin:5px 0 0 40px;line-height:24px;font-weight:bold;font-size:14px;}.bui-message .bui-message-content p{font-weight:normal;}.bui-pagingbar button,.bui-pagingbar .bui-bar-item-button,.bui-pagingbar .bui-pb-page{background:url("http://img03.taobaocdn.com/tps/i3/T1k1v5XhNdXXb0_tkB-191-450.gif") no-repeat -999px -999px transparent;overflow:hidden;}.bui-pagingbar button{height:16px;width:16px;margin:0;text-indent:-100px;*text-indent:0;*font-size:0;border:none;overfow:hidden;}.bui-pagingbar .bui-button-disabled{opacity:1;filter:alpha(opacity=100);}.bui-pagingbar .bui-pb-first button{background-position:3px 2px;}.bui-pagingbar .bui-pb-first .bui-button-disabled{background-position:3px -18px;}.bui-pagingbar .bui-pb-prev button{background-position:-57px 2px;}.bui-pagingbar .bui-pb-prev .bui-button-disabled{background-position:-57px -18px;}.bui-pagingbar .bui-pb-next button{background-position:-37px 2px;}.bui-pagingbar .bui-pb-next .bui-button-disabled{background-position:-37px -18px;}.bui-pagingbar .bui-pb-last button{background-position:-17px 2px;}.bui-pagingbar .bui-pb-last .bui-button-disabled{background-position:-17px -18px;}.bui-pagingbar .bui-bar-item{outline:none;margin:0 2px;vertical-align:middle;}.bui-pagingbar .bui-bar-item-button{padding:1px;}.bui-pagingbar .bui-bar-item-button-hover{background-position:-130px 2px;}.bui-pagingbar .bui-bar-item-button-disabled{background-position:-999px -999px;}.bui-pagingbar .bui-pb-page{color:#9d261d;font:11px tahoma,arial,verdana,sans-serif;height:14px;margin:0;width:20px;vertical-align:baseline;*vertical-align:middle;background-color:white;padding:0 2px;}.bui-pagingbar .bui-bar-item-text{vertical-align:middle;}.bui-pagingbar .bui-pb-skip{background-position:-999px -999px;}.bui-pagingbar .bui-pb-skip button{text-indent:0;background-position:-80px -20px;height:20px;font-size:11px;width:41px;}.bui-pagingbar .bui-pb-skip button:hover{background-position:-150px -20px;}.bui-pagingbar .bui-bar-item-separator{margin:0 5px;}.pagination .bui-bar-item{float:left;margin:0;}.pagination .disabled{_background-color:#fff;}.pagination .disabled a:hover{text-decoration:none;}.bar-btn-add,.bar-btn-del,.bar-btn-edit,.bar-btn-close,.bar-btn-import,.bar-btn-export,.bar-btn-save,.bar-btn-create,.bui-bar-item-separator{background:url("http://img03.taobaocdn.com/tps/i3/T1k1v5XhNdXXb0_tkB-191-450.gif") no-repeat -999px -999px transparent;}.bui-bar-item-separator{height:14px;margin:0 3px 0 2px;width:2px;background-position:-80px 0;vertical-align:middle;}.bui-grid-button-bar{float:left;}.bui-grid-button-bar .bui-bar-item{margin-right:10px;}.bui-grid-button-bar .bar-btn-add,.bui-grid-button-bar .bar-btn-edit,.bui-grid-button-bar .bar-btn-del,.bui-grid-button-bar .bar-btn-close,.bui-grid-button-bar .bar-btn-import,.bui-grid-button-bar .bar-btn-export,.bui-grid-button-bar .bar-btn-save,.bui-grid-button-bar .bar-btn-create{padding-left:18px;}.bui-grid-button-bar .bar-btn-edit{background-position:2px -307px;}.bui-grid-button-bar .bar-btn-add{background-position:-48px -137px;}.bui-grid-button-bar .bar-btn-del{background-position:2px -247px;}.bui-grid-button-bar .bar-btn-close{background-position:-48px -157px;}.bui-grid-button-bar .bar-btn-import{background-position:2px -187px;}.bui-grid-button-bar .bar-btn-export{background-position:2px -217px;}.bui-grid-button-bar .bar-btn-save{background-position:2px -277px;}.bui-grid-button-bar .bar-btn-create{background-position:2px -307px;}.bui-grid-button-bar .button-small [class^="icon-"]{margin:-2px 2px 0 -5px;}.bui-grid-table .sort-asc .bui-grid-sort-icon,.bui-grid-table .sort-desc .bui-grid-sort-icon,.bui-grid-table .bui-grid-hd-menu-trigger,.bui-grid-table .bui-grid-cascade-icon{background-image:url("http://img03.taobaocdn.com/tps/i3/T1k1v5XhNdXXb0_tkB-191-450.gif");background-repeat:no-repeat;}.bui-simple-grid .bui-grid-table{border:1px solid #ddd;}.bui-grid-header{border-top:1px solid #ddd;height:25px;}.bui-grid-body,.bui-grid-height .bui-grid-body .bui-grid-table{border-bottom:1px solid #ddd;}.bui-grid-body,.bui-grid-header{border-right:1px solid #ddd;border-left:1px solid #ddd;}.bui-grid-header{overflow:hidden;*position:relative;}.bui-grid-header .table{margin:0;}.bui-grid-header .bui-grid-table{*position:absolute;*top:0;*left:0;*z-index:100;}.bui-grid-table{width:100%;table-layout:fixed;border-collapse:separate;}.bui-grid,.bui-simple-grid{background-color:#fff;}.bui-grid th.left,.bui-simple-grid th.left,.bui-grid td.left,.bui-simple-grid td.left{text-align:left;}.bui-grid th.right,.bui-simple-grid th.right,.bui-grid td.right,.bui-simple-grid td.right{text-align:right;}.bui-grid th.center,.bui-simple-grid th.center,.bui-grid td.center,.bui-simple-grid td.center{text-align:center;}.bui-grid-border .bui-grid-hd,.bui-grid-border .bui-grid-cell,.bui-grid-border .bui-grid-header-row td{border-left:1px solid #c5c5c5;}.bui-grid-border .bui-grid-cell-empty,.bui-grid-border .bui-grid-hd-empty{border-left:none;}.bui-grid-header-row td,.bui-grid-header-row th{padding:0;margin:0;}th.bui-grid-hd-empty,td.bui-grid-cell-empty{padding:0;margin:0;border-left:none;}.bui-grid-table .bui-grid-hd{border-bottom:1px solid #c5c5c5;text-align:left;cursor:default;}.bui-grid-table tr td:first-child,.bui-grid-table tr th:first-child{border-left-width:0;}.bui-grid-table .bui-grid-hd-inner{background-color:#f4f4f4;background-image:-moz-linear-gradient(top,#fff,#e4e4e4);background-image:-ms-linear-gradient(top,#fff,#e4e4e4);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e4e4e4));background-image:-webkit-linear-gradient(top,#fff,#e4e4e4);background-image:-o-linear-gradient(top,#fff,#e4e4e4);background-image:linear-gradient(top,#fff,#e4e4e4);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff',endColorstr='#e4e4e4',GradientType=0);}.bui-grid-table .bui-grid-hd-inner{height:24px;overflow:hidden;font-weight:normal;background-position:0 0;position:relative;}.bui-grid-table .bui-grid-hd-title{line-height:22px;font-size:12px;padding:0 4px 0 4px;}.bui-grid-table .bui-grid-sort-icon{display:inline-block;*display:inline;*zoom:1;height:15px;width:15px;}.bui-grid-table .bui-grid-hd-menu-trigger{cursor:pointer;display:none;position:absolute;right:0;top:0;width:14px;height:24px;background-position:0 -140px;}.bui-grid-table th.sortable{cursor:pointer;}.bui-grid-table .bui-grid-hd-hover .bui-grid-hd-inner,.bui-grid-table .bui-grid-hd-open .bui-grid-hd-inner{background-color:#e0e6fc;background-image:-moz-linear-gradient(top,#e0e6fc,#e0e6fc);background-image:-ms-linear-gradient(top,#e0e6fc,#e0e6fc);background-image:-webkit-gradient(linear,0 0,0 100%,from(#e0e6fc),to(#e0e6fc));background-image:-webkit-linear-gradient(top,#e0e6fc,#e0e6fc);background-image:-o-linear-gradient(top,#e0e6fc,#e0e6fc);background-image:linear-gradient(top,#e0e6fc,#e0e6fc);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#e0e6fc',endColorstr='#e0e6fc',GradientType=0);}.bui-grid-table .bui-grid-hd-hover .bui-grid-hd-menu-trigger,.bui-grid-table .bui-grid-hd-open .bui-grid-hd-menu-trigger{display:block;}.bui-grid-table .sort-asc .bui-grid-sort-icon{background-position:5px -52px;}.bui-grid-table .sort-asc:hover .bui-grid-sort-icon{background-position:5px -92px;}.bui-grid-table .sort-desc .bui-grid-sort-icon{background-position:5px -72px;}.bui-grid-table .sort-desc:hover .bui-grid-sort-icon{background-position:5px -112px;}.bui-grid-table .grid-header-checked-column,.bui-grid-table .bui-grid-row-checked-column{text-align:center;width:30px;vertical-align:middle;border-left-width:0;}.bui-grid-table .grid-header-checked-column .bui-grid-hd-inner,.bui-grid-table .bui-grid-row-checked-column .bui-grid-cell-inner{width:30px;}.bui-grid-table .bui-grid-cell{overflow:hidden;border-top:1px solid #ededed;position:relative;}.bui-grid-table .bui-grid-cell-empty{border-top:1px solid #ededed;}.bui-grid-table .bui-grid-body .bui-grid-row-first td{border-top:none;}.bui-grid-table .bui-grid-body .bui-grid-table{border-bottom:1px solid #ededed;}.bui-grid-table .bui-grid-header-row .bui-grid-cell-empty{line-height:0;border:none;}.bui-grid-table .bui-grid-cell-inner{padding:2px 0;position:relative;overflow:hidden;}.bui-grid-table .bui-grid-cell-text{padding:0 4px;display:block;min-height:20px;min-width:25px;_height:20px;}.bui-grid-table .bui-grid-error-cell .bui-grid-cell-text{padding-right:20px;}.bui-grid-table .bui-grid-error-cell{position:relative;}.bui-grid-table .bui-grid-cell,.bui-grid-table .bui-grid-cell-empty{word-break:break-all;word-wrap:break-word;}.bui-grid-table .grid-command{color:#36c;cursor:pointer;display:inline-block;margin-right:5px;}.bui-grid-table .grid-command:hover{color:#f60;}.bui-grid-table .grid-command.disable{color:#ccc;}td.bui-grid-cell-empty{height:0;line-height:0;}.bui-grid-height .bui-grid-body{overflow-x:auto;overflow-y:scroll;position:relative;}.bui-grid-strip .bui-grid-row-odd{background-color:#fff;}.bui-grid-strip .bui-grid-row-even{background-color:#fafafa;}.bui-simple-grid .bui-grid-table .bui-grid-row-hover,.bui-grid .bui-grid-table .bui-grid-row-hover{background-color:#dee5ff;}.bui-simple-grid .bui-grid-table .bui-grid-row-selected,.bui-grid .bui-grid-table .bui-grid-row-selected{background-color:#ccd7ff;}.bui-grid .bui-pagingbar{float:right;margin-top:3px;}.bui-grid-tbar,.bui-grid-bbar{*zoom:1;}.bui-grid-tbar:before,.bui-grid-bbar:before,.bui-grid-tbar:after,.bui-grid-bbar:after{display:table;content:"";}.bui-grid-tbar:after,.bui-grid-bbar:after{clear:both;}.bui-grid-tbar{height:34px;line-height:34px;}.bui-grid-bbar{background-color:#f4f4f4;background-image:-moz-linear-gradient(top,#fff,#e4e4e4);background-image:-ms-linear-gradient(top,#fff,#e4e4e4);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e4e4e4));background-image:-webkit-linear-gradient(top,#fff,#e4e4e4);background-image:-o-linear-gradient(top,#fff,#e4e4e4);background-image:linear-gradient(top,#fff,#e4e4e4);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff',endColorstr='#e4e4e4',GradientType=0);border:1px solid #ddd;border-top:none;}.bui-grid-radio-container,.bui-grid-checkBox-container{text-align:center;}.bui-grid .x-grid-checkbox{background:url("http://img04.taobaocdn.com/tps/i4/T1YTNJFadfXXX6DYsb-100-100.gif") no-repeat 0 3px transparent;width:13px;height:20px;display:inline-block;*display:inline;*zoom:1;}.x-grid-checkbox:hover{background-position:-16px 3px;}.bui-grid-row-selected .x-grid-checkbox,.checked .x-grid-checkbox{background-position:0 -18px;}.bui-grid-row-disabled .x-grid-checkbox{background-position:-48px 3px;}.bui-grid-row-selected.bui-grid-row-disabled .x-grid-checkbox{background-position:-48px -18px;}.bui-grid-cascade{vertical-align:middle;}.bui-grid-cascade-icon{cursor:pointer;display:inline-block;*display:inline;*zoom:1;height:10px;width:10px;background-position:0 -440px;}.bui-grid-cascade-expand .bui-grid-cascade-icon{background-position:-30px -440px;}.bui-grid-cascade-collapse{display:none;}.grid-column-menu .bui-menu-item-selected .icon{background-position:-144px -72px;}.bui-grid-cell-error{position:absolute;right:10px;top:6px;}.bui-grid-header .table{height:auto;}.bui-grid-summary-row{font-weight:bold;}.bui-grid-summary-row:first-child td{border-top:1px solid #c5c5c5;}.lp-ext-mask,.lp-el-mask,.bui-ext-mask{height:100%;left:0;opacity:.25;filter:alpha(opacity=25);position:absolute;top:0;width:100%;z-index:1040;background-color:#333;}.x-masked SELECT{_visibility:hidden;}.x-masked .bui-dialog SELECT{_visibility:visible;}.x-masked-relative{position:relative!important;}.lp-el-mask-msg,.bui-ext-mask-msg{background:none repeat-x scroll 0 -16px #e8e9ef;border:1px solid #c3c3d6;left:0;padding:2px;position:absolute;top:0;z-index:1050;}.lp-el-mask-msg div{border:1px solid;cursor:wait;padding:5px 10px;background-color:#fff;border-color:#c3c3d6;color:#333;}.x-mask-loading div{background:none no-repeat scroll 5px 5px #fff;line-height:16px;padding:5px 10px 5px 25px;background-image:url("http://img01.taobaocdn.com/tps/i1/T1BHtLFbFdXXaHNz_X-16-16.gif");}.node-info-container,.node-title-container{position:absolute;}.node-info-container{border:1px dashed #c3c3d6;padding:5px;line-height:14px;font-size:11px;z-index:10;opacity:.9;filter:alpha(opacity=90);background-color:#fff;}.node-info-container li{line-height:14px;}.node-info-container .bui-caret{position:absolute;top:-7px;*top:-12px;left:2px;}.node-info-container .table{border:1px solid #c3c3d6;border-left:0;border-bottom:0;border-collapse:separate;border-spacing:0;}.node-info-container .table td,.node-info-container .table th{border-left:1px solid #c3c3d6;border-bottom:1px solid #c3c3d6;}.node-info-container-selected{z-index:11;}.node-pos-top .bui-caret{top:auto;left:auto;bottom:-7px;left:2px;}input.bui-form-field-error,textarea.bui-form-field-error,.bui-form-field-error input[type="text"]{border:1px dotted red;}.x-field-error{margin-left:5px;}.x-field-error .x-field-error-text{padding-left:5px;color:#fe0000;}.bui-form-field-disabled.calendar{background-color:#ebebe4;}.bui-form-tip-container{position:relative;}.bui-form-tip{padding-left:5px;color:#999;}.bui-form-tip .tip-text{margin-left:5px;*white-space:nowrap;}.bui-form-tip .icon{opacity:.5;filter:alpha(opacity=50);}.calendar{background:url("http://img04.taobaocdn.com/tps/i4/T1kBv5XbRbXXb.nqL4-200-300.gif") no-repeat right -130px #fff;}.bui-calendar{border:1px solid #c3c3d6;background-color:#fff;position:relative;}.x-datepicker-arrow .icon{margin-top:2px;*overflow:hidden;}.x-datepicker-arrow .icon-caret-right{margin-left:2px;}.x-datepicker-header{position:relative;height:26px;line-height:26px;background-color:#36c;}.x-datepicker-month{text-align:center;}.month-text-container{display:inline-block;*display:inline;*zoom:1;cursor:pointer;font-weight:bold;color:#fff;}.month-text-container .bui-caret{border-top-color:#fff;margin-left:5px;}.x-datepicker-arrow{line-height:14px;text-align:center;display:inline-block;cursor:pointer;}.x-datepicker-prev,.x-datepicker-next{position:absolute;top:5px;width:14px;height:14px;border:1px solid #3340cc;}.x-datepicker-prev{left:5px;}.x-datepicker-next{right:5px;}.bui-calendar-panel{outline:none;}table.x-datepicker-inner{width:100%;table-layout:fixed;}.x-datepicker-inner,.x-datepicker-inner td,.x-datepicker-inner th{border-collapse:separate;}table.x-datepicker-inner tr{height:20px;}table.x-datepicker-inner th{width:25px;height:19px;padding:0;color:#333;font:normal 10px tahoma,arial,verdana,sans-serif;text-align:right;background-color:#f4f4f4;background-image:-moz-linear-gradient(top,#fff,#e4e4e4);background-image:-ms-linear-gradient(top,#fff,#e4e4e4);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e4e4e4));background-image:-webkit-linear-gradient(top,#fff,#e4e4e4);background-image:-o-linear-gradient(top,#fff,#e4e4e4);background-image:linear-gradient(top,#fff,#e4e4e4);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff',endColorstr='#e4e4e4',GradientType=0);border-bottom:1px solid #c3c3d6;cursor:default;}table.x-datepicker-inner th span{display:block;padding-right:7px;}.x-datepicker-date{border:1px solid;height:17px;border-color:white;text-align:right;padding:0;}.x-datepicker-date a{outline:none;padding-right:4px;display:block;zoom:1;font:normal 11px tahoma,arial,verdana,sans-serif;color:#333;text-decoration:none;text-align:right;border:1px solid #fff;}.x-datepicker-prevday a,.x-datepicker-nextday a,.x-datepicker-disabled a{text-decoration:none!important;color:#aaa;}.x-datepicker-date a:hover{text-decoration:none!important;color:#333;background-color:#dee5ff;border:1px solid #ccd7ff;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}.x-datepicker-today a{border:1px solid;color:#36c;border:1px solid #99afff;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}.x-datepicker-active{cursor:pointer;color:#333;}.x-datepicker-disabled a:hover{color:#aaa;border-color:#fff;background:none;}.x-datepicker-selected a{background:repeat-x left top;background-color:#ccd7ff;border:1px solid #99afff;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}input.x-datepicker-time{width:15px;height:15px;cursor:pointer;}.x-datepicker-second{margin-right:5px;}.bui-calendar-footer,.x-monthpicker-footer{height:30px;line-height:30px;border-top:1px solid #c3c3d6;text-align:center;background-color:#f4f4f4;background-image:-moz-linear-gradient(top,#fff,#e4e4e4);background-image:-ms-linear-gradient(top,#fff,#e4e4e4);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e4e4e4));background-image:-webkit-linear-gradient(top,#fff,#e4e4e4);background-image:-o-linear-gradient(top,#fff,#e4e4e4);background-image:linear-gradient(top,#fff,#e4e4e4);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff',endColorstr='#e4e4e4',GradientType=0);}.bui-calendar-footer .button,.x-monthpicker-footer .button{margin-right:10px;}.bui-calendar-footer button.last,.x-monthpicker-footer button.last{margin-right:0;}.bui-calendar-footer .bui-bar-item-button,.x-monthpicker-footer .bui-bar-item-button{*margin-top:4px;}.bui-monthpicker,.x-monthpicker{border:1px solid #c3c3d6;position:absolute;background-color:#fff;top:0;left:0;}.bui-calendar .bui-monthpicker{top:-1px;left:-1px;}.x-monthpicker-yearnav .icon{margin-top:2px;*margin-left:2px;*overflow:hidden;}.x-monthpicker-months,.x-monthpicker-years{height:167px;width:88px;}.x-monthpicker-months{float:left;border-right:1px solid #c3c3d6;width:87px;}.x-monthpicker-years{margin-left:88px;}.x-monthpicker-item,.x-timepicker .bui-list-item{float:left;margin:4px 0 5px 0;font:normal 11px tahoma,arial,verdana,sans-serif;text-align:center;vertical-align:middle;height:18px;width:43px;border:0 none;}.x-monthpicker-item a,.x-timepicker .bui-list-item a{display:block;margin:0 2px;text-decoration:none;color:#333;border:1px solid white;line-height:17px;}.x-monthpicker-item-selected a,.x-timepicker .bui-list-item-selected a{background-color:#ccd7ff;border:1px solid #99afff;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}.x-monthpicker-item-hover a,.x-timepicker .bui-list-item-hover a{color:black;background-color:#dee5ff;border:1px solid #ccd7ff;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}.x-monthpicker-yearnav{height:28px;}.x-monthpicker-yearnav .x-icon{margin:6px 12px 5px 13px;cursor:pointer;opacity:.7;filter:alpha(opacity=70);}.x-monthpicker-yearnav .x-icon:hover{opacity:.8;filter:alpha(opacity=80);}.x-timepicker{width:180px;background-color:#fff;border:1px solid #c3c3d6;border-bottom-color:#c3c3d6;}.x-timepicker ul{*zoom:1;}.x-timepicker ul:before,.x-timepicker ul:after{display:table;content:"";}.x-timepicker ul:after{clear:both;}.x-timepicker .bui-list-item{height:15px;width:20px;}.x-editor-tips{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;border:1px solid #e5a098;background-color:#fff;padding:4px;}.bui-record-editor{padding:3px 0 3px 3px;border:1px solid #c3c3d6;background-color:white;}.bui-record-editor .button{*margin-top:5px;}.bui-record-editor .bui-bar{width:150px;position:absolute;left:40%;background-color:white;border:1px solid #c3c3d6;border-top:none;border-radius:0 0 3px 3px;bottom:-37px;}.bui-record-editor .bui-form-field{padding-right:3px;}.bui-record-editor .x-form-text{background-color:#fff;display:inline-block;height:18px;padding:1px 4px;border:1px solid #c3c3d6;}.bui-tree-list{border:1px solid #c3c3d6;overflow:auto;background-color:#fff;}.bui-tree-list ul{overflow:hidden;}.bui-tree-item{height:20px;cursor:pointer;}.bui-tree-item-hover{background-color:#dee5ff;}.bui-tree-item-selected{background-color:#ccd7ff;}.bui-tree-item-disabled{color:#ccc;}.x-tree-icon{display:inline-block;*display:inline;*zoom:1;vertical-align:top;height:20px;width:16px;}.x-tree-elbow-expander,.x-tree-elbow-dir,.x-tree-elbow-leaf,.x-tree-elbow-line,.x-tree-elbow,.x-tree-elbow-expander-end,.x-tree-elbow-end{background:url("http://img04.taobaocdn.com/tps/i4/T1rbpNFaJXXXbylH7R-80-100.gif") no-repeat -999px -999px transparent;}.x-tree-icon-checkbox{background:url("http://img04.taobaocdn.com/tps/i4/T1YTNJFadfXXX6DYsb-100-100.gif") no-repeat 0 0 transparent;}.x-tree-elbow-expander{background-position:0 0;}.bui-tree-item-expanded .x-tree-elbow-expander{background-position:-16px 0;}.x-tree-elbow-expander:hover{background-position:-32px 0;}.bui-tree-item-expanded .x-tree-elbow-expander:hover{background-position:-48px 0;}.x-tree-elbow-dir,.x-tree-elbow-leaf{margin:2px 3px 0 0;}.x-tree-elbow-dir{background-position:0 -80px;}.bui-tree-item-expanded .x-tree-elbow-dir{background-position:-20px -80px;}.x-tree-elbow-leaf{background-position:-40px -80px;}.x-tree-show-line .x-tree-elbow{background-position:0 -20px;}.x-tree-show-line .x-tree-elbow-end{background-position:-20px -20px;}.x-tree-show-line .x-tree-elbow-line{background-position:-40px -20px;}.x-tree-show-line .x-tree-elbow-expander,.x-tree-show-line .x-tree-elbow-expander:hover{background-position:-60px -40px;}.x-tree-show-line .x-tree-elbow-expander-end{background-position:-20px -40px;}.x-tree-show-line .bui-tree-item-expanded .x-tree-elbow-expander{background-position:-40px -40px;}.x-tree-show-line .bui-tree-item-expanded .x-tree-elbow-expander-end{background-position:0 -40px;}.bui-tree-list .bui-tree-item-loading .x-tree-elbow-expander{background:url("http://img01.taobaocdn.com/tps/i1/T1BHtLFbFdXXaHNz_X-16-16.gif") no-repeat 0 0 transparent;}.bui-tree-item-checked{font-style:italic;}.x-tree-icon-checkbox:hover{background-position:-16px 0;}.bui-tree-item-checked .x-tree-icon-checkbox{background-position:0 -20px;}.bui-tree-item-checked .x-tree-icon-checkbox:hover{background-position:-16px -20px;}.bui-tree-item-partial-checked .x-tree-icon-checkbox{background-position:0 -40px;}.bui-tree-item-partial-checked .x-tree-icon-checkbox:hover{background-position:-16px -40px;}.bui-tree-item-disabled .x-tree-icon-checkbox{background-position:-48px 0;}.bui-tree-item-checked.bui-tree-item-disabled .x-tree-icon-checkbox{background-position:-48px -20px;}.x-align-arrow,.x-align-arrow-inner{border:6px solid transparent;_border-color:tomato;_filter:chroma(color=#ff6347);position:absolute;}.x-align-top .x-align-arrow,.x-align-top-left .x-align-arrow,.x-align-top-right .x-align-arrow{border-top:8px solid #c3c3d6;bottom:-15px;}.x-align-top .x-align-arrow-inner,.x-align-top-left .x-align-arrow-inner,.x-align-top-right .x-align-arrow-inner{border-top:8px solid #fff;top:-9px;left:-6px;}.x-align-top .x-align-arrow,.x-align-bottom .x-align-arrow{left:50%;}.x-align-top-left .x-align-arrow,.x-align-bottom-left .x-align-arrow{left:10px;}.x-align-top-right .x-align-arrow,.x-align-bottom-right .x-align-arrow{right:10px;}.x-align-right .x-align-arrow{border-right:8px solid #c3c3d6;top:50%;left:-15px;}.x-align-right .x-align-arrow-inner{border-right:8px solid #fff;top:-6px;left:-4px;}.x-align-left .x-align-arrow{border-left:8px solid #c3c3d6;top:50%;right:-15px;}.x-align-left .x-align-arrow-inner{border-left:8px solid #fff;top:-6px;left:-9px;}.x-align-bottom .x-align-arrow,.x-align-bottom-left .x-align-arrow,.x-align-bottom-right .x-align-arrow{border-bottom:8px solid #c3c3d6;top:-15px;}.x-align-bottom .x-align-arrow-inner,.x-align-bottom-left .x-align-arrow-inner,.x-align-bottom-right .x-align-arrow-inner{border-bottom:8px solid #fff;top:-5px;left:-6px;}.tips[class^="x-align-top"] .x-align-arrow,.tips[class*=" x-align-top"] .x-align-arrow{border-top-color:#e5e5e5;}.tips[class^="x-align-top"] .x-align-arrow-inner,.tips[class*=" x-align-top"] .x-align-arrow-inner{border-top-color:#fafafa;}.tips.x-align-right .x-align-arrow{border-right-color:#e5e5e5;}.tips.x-align-right .x-align-arrow-inner{border-right-color:#fafafa;}.tips.x-align-left .x-align-arrow{border-left-color:#e5e5e5;}.tips.x-align-left .x-align-arrow-inner{border-left-color:#fafafa;}.tips[class^="x-align-bottom"] .x-align-arrow,.tips[class*=" x-align-bottom"] .x-align-arrow{border-bottom-color:#e5e5e5;}.tips[class^="x-align-bottom"] .x-align-arrow-inner,.tips[class*=" x-align-bottom"] .x-align-arrow-inner{border-bottom-color:#fafafa;}.tips-success[class^="x-align-top"] .x-align-arrow,.tips-success[class*=" x-align-top"] .x-align-arrow{border-top-color:#aae77f;}.tips-success[class^="x-align-top"] .x-align-arrow-inner,.tips-success[class*=" x-align-top"] .x-align-arrow-inner{border-top-color:#f0ffe5;}.tips-success.x-align-right .x-align-arrow{border-right-color:#aae77f;}.tips-success.x-align-right .x-align-arrow-inner{border-right-color:#f0ffe5;}.tips-success.x-align-left .x-align-arrow{border-left-color:#aae77f;}.tips-success.x-align-left .x-align-arrow-inner{border-left-color:#f0ffe5;}.tips-success[class^="x-align-bottom"] .x-align-arrow,.tips-success[class*=" x-align-bottom"] .x-align-arrow{border-bottom-color:#aae77f;}.tips-success[class^="x-align-bottom"] .x-align-arrow-inner,.tips-success[class*=" x-align-bottom"] .x-align-arrow-inner{border-bottom-color:#f0ffe5;}.tips-warning[class^="x-align-top"] .x-align-arrow,.tips-warning[class*=" x-align-top"] .x-align-arrow{border-top-color:#ffb2b2;}.tips-warning[class^="x-align-top"] .x-align-arrow-inner,.tips-warning[class*=" x-align-top"] .x-align-arrow-inner{border-top-color:#fff3f3;}.tips-warning.x-align-right .x-align-arrow{border-right-color:#ffb2b2;}.tips-warning.x-align-right .x-align-arrow-inner{border-right-color:#fff3f3;}.tips-warning.x-align-left .x-align-arrow{border-left-color:#ffb2b2;}.tips-warning.x-align-left .x-align-arrow-inner{border-left-color:#fff3f3;}.tips-warning[class^="x-align-bottom"] .x-align-arrow,.tips-warning[class*=" x-align-bottom"] .x-align-arrow{border-bottom-color:#ffb2b2;}.tips-warning[class^="x-align-bottom"] .x-align-arrow-inner,.tips-warning[class*=" x-align-bottom"] .x-align-arrow-inner{border-bottom-color:#fff3f3;}.tips-info[class^="x-align-top"] .x-align-arrow,.tips-info[class*=" x-align-top"] .x-align-arrow{border-top-color:#acd5ff;}.tips-info[class^="x-align-top"] .x-align-arrow-inner,.tips-info[class*=" x-align-top"] .x-align-arrow-inner{border-top-color:#e6f2ff;}.tips-info.x-align-right .x-align-arrow{border-right-color:#acd5ff;}.tips-info.x-align-right .x-align-arrow-inner{border-right-color:#e6f2ff;}.tips-info.x-align-left .x-align-arrow{border-left-color:#acd5ff;}.tips-info.x-align-left .x-align-arrow-inner{border-left-color:#e6f2ff;}.tips-info[class^="x-align-bottom"] .x-align-arrow,.tips-info[class*=" x-align-bottom"] .x-align-arrow{border-bottom-color:#acd5ff;}.tips-info[class^="x-align-bottom"] .x-align-arrow-inner,.tips-info[class*=" x-align-bottom"] .x-align-arrow-inner{border-bottom-color:#e6f2ff;}.tips-notice[class^="x-align-top"] .x-align-arrow,.tips-notice[class*=" x-align-top"] .x-align-arrow{border-top-color:#ffcc7f;}.tips-notice[class^="x-align-top"] .x-align-arrow-inner,.tips-notice[class*=" x-align-top"] .x-align-arrow-inner{border-top-color:#ffffe5;}.tips-notice.x-align-right .x-align-arrow{border-right-color:#ffcc7f;}.tips-notice.x-align-right .x-align-arrow-inner{border-right-color:#ffffe5;}.tips-notice.x-align-left .x-align-arrow{border-left-color:#ffcc7f;}.tips-notice.x-align-left .x-align-arrow-inner{border-left-color:#ffffe5;}.tips-notice[class^="x-align-bottom"] .x-align-arrow,.tips-notice[class*=" x-align-bottom"] .x-align-arrow{border-bottom-color:#ffcc7f;}.tips-notice[class^="x-align-bottom"] .x-align-arrow-inner,.tips-notice[class*=" x-align-bottom"] .x-align-arrow-inner{border-bottom-color:#ffffe5;}.pull-right{float:right;}.pull-left{float:left;}.pull-none{float:none;}.hide{display:none;}.show{display:block;}.invisible{visibility:hidden;}.bordered{border:1px solid #c3c3d6;}.bordered-radius{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}.centered{text-align:center;}.pull-right{float:right;}.pull-left{float:left;}.pull-none{float:none;}.hide{display:none;}.show{display:block;}.invisible{visibility:hidden;}.bui-inline-block{display:inline-block;*display:inline;*zoom:1;}.bui-ext-mask{background-color:#333;opacity:.5;filter:alpha(opacity=50);}.bui-overlay{position:absolute;left:-9999px;top:-9999px;}.bui-clear{*zoom:1;}.bui-clear:before,.bui-clear:after{display:table;content:"";}.bui-clear:after{clear:both;}.bui-hidden{display:none;} \ No newline at end of file diff --git a/源码/src/main/webapp/resource/assets/css/dpl-min.css b/源码/src/main/webapp/resource/assets/css/dpl-min.css new file mode 100644 index 0000000..91f632c --- /dev/null +++ b/源码/src/main/webapp/resource/assets/css/dpl-min.css @@ -0,0 +1 @@ +/*!* LP.DPL * * Copyright 2012 alibaba * Licensed under the Apache License v2.0 * http://www.apache.org/licenses/LICENSE-2.0 * * Remixed by lp-ued team. */ /*!* Bootstrap v2.0.2 * * Copyright 2012 Twitter,Inc * Licensed under the Apache License v2.0 * http://www.apache.org/licenses/LICENSE-2.0 * * Designed and built with all the love in the world @twitter by @mdo and @fat. */ .clearfix{*zoom:1;}.clearfix:before,.clearfix:after{display:table;content:"";}.clearfix:after{clear:both;}.hide-text{overflow:hidden;text-indent:100%;white-space:nowrap;}.input-block-level{display:block;width:100%;min-height:28px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;}body{margin:0;font-family:"SimSun","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;line-height:18px;color:#333;background-color:#fff;}p{margin:9px 0;font-family:"SimSun","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;line-height:18px;}p small{font-size:10px;color:#999;}.lead{margin-bottom:18px;font-size:14px;font-weight:200;line-height:27px;}h1,h2,h3,h4,h5,h6{margin:0;font-family:inherit;font-weight:bold;color:inherit;text-rendering:optimizelegibility;}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{font-weight:normal;color:#999;}h1{font-size:16px;line-height:24px;}h1 small{font-size:14px;}h2{font-size:14px;line-height:21px;}h2 small{font-size:12px;}h3{line-height:18px;font-size:12px;}h3 small{font-size:12px;}h4,h5,h6{line-height:18px;}h4{font-size:12px;}h4 small{font-size:12px;}h5{font-size:12px;}h6{font-size:11px;color:#999;text-transform:uppercase;}.page-header{padding-bottom:17px;margin:18px 0;border-bottom:1px solid #eee;}.page-header h1{line-height:1;}.auxiliary-text{color:#999;}.number-text,.letter-text{font-family:"Tahoma","SimSun";}ul,ol{padding:0;margin:0 0 9px 25px;}ul ul,ul ol,ol ol,ol ul{margin-bottom:0;}ul{list-style:disc;}ol{list-style:decimal;}li{line-height:22px;}ul.unstyled,ol.unstyled{margin-left:0;list-style:none;}dl{margin-bottom:18px;}dt,dd{line-height:18px;}dt{font-weight:bold;line-height:17px;}dd{margin-left:9px;}.dl-horizontal dt{float:left;clear:left;width:120px;text-align:right;}.dl-horizontal dd{margin-left:130px;}hr{margin:18px 0;border:0;border-top:1px solid #eee;border-bottom:1px solid #fff;}strong{font-weight:bold;}em{font-style:italic;}.muted{color:#999;}abbr[title]{border-bottom:1px dotted #ddd;cursor:help;}abbr.initialism{font-size:90%;text-transform:uppercase;}blockquote{padding:0 0 0 15px;margin:0 0 18px;border-left:5px solid #eee;}blockquote p{margin-bottom:0;font-size:16px;font-weight:300;line-height:22.5px;}blockquote small{display:block;line-height:18px;color:#999;}blockquote small:before{content:'\2014 \00A0';}blockquote.pull-right{float:right;padding-left:0;padding-right:15px;border-left:0;border-right:5px solid #eee;}blockquote.pull-right p,blockquote.pull-right small{text-align:right;}q:before,q:after,blockquote:before,blockquote:after{content:"";}address{display:block;margin-bottom:18px;line-height:18px;font-style:normal;}small{font-size:100%;}cite{font-style:normal;}a{color:#36c;text-decoration:none;}a:hover{color:#f60;text-decoration:underline;}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block;}audio,canvas,video{display:inline-block;*display:inline;*zoom:1;}audio:not([controls]){display:none;}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;}a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;}a:hover,a:active{outline:0;}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline;}sup{top:-0.5em;}sub{bottom:-0.25em;}img{height:auto;border:0;-ms-interpolation-mode:bicubic;vertical-align:middle;}ul{list-style:none;margin:0;}button,input,select,textarea{margin:0;font-family:"SimSun","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:100%;}button,input{*overflow:visible;line-height:normal;}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0;}button,input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button;}input[type="search"]{-webkit-appearance:textfield;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;}input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none;}textarea{overflow:auto;vertical-align:top;}em{font-style:normal;}s{text-decoration:none;}.span1,.span2,.span3,.span4,.span5,.span6,.span7,.span8,.span9,.span10,.span11,.span12,.span13,.span14,.span15,.span16,.span17,.span18,.span19,.span20,.span21,.span22,.span23,.span24{_float:left;_margin-left:10px;_display:inline;_zoom:1;}.row{margin-left:-10px;*zoom:1;}.row:before,.row:after{display:table;content:"";}.row:after{clear:both;}[class*="span"]{float:left;margin-left:10px;}.container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:950px;}.span24{width:950px;}.span23{width:910px;}.span22{width:870px;}.span21{width:830px;}.span20{width:790px;}.span19{width:750px;}.span18{width:710px;}.span17{width:670px;}.span16{width:630px;}.span15{width:590px;}.span14{width:550px;}.span13{width:510px;}.span12{width:470px;}.span11{width:430px;}.span10{width:390px;}.span9{width:350px;}.span8{width:310px;}.span7{width:270px;}.span6{width:230px;}.span5{width:190px;}.span4{width:150px;}.span3{width:110px;}.span2{width:70px;}.span1{width:30px;}.offset24{margin-left:970px;}.offset23{margin-left:930px;}.offset22{margin-left:890px;}.offset21{margin-left:850px;}.offset20{margin-left:810px;}.offset19{margin-left:770px;}.offset18{margin-left:730px;}.offset17{margin-left:690px;}.offset16{margin-left:650px;}.offset15{margin-left:610px;}.offset14{margin-left:570px;}.offset13{margin-left:530px;}.offset12{margin-left:490px;}.offset11{margin-left:450px;}.offset10{margin-left:410px;}.offset9{margin-left:370px;}.offset8{margin-left:330px;}.offset7{margin-left:290px;}.offset6{margin-left:250px;}.offset5{margin-left:210px;}.offset4{margin-left:170px;}.offset3{margin-left:130px;}.offset2{margin-left:90px;}.offset1{margin-left:50px;}.row-fluid{width:100%;*zoom:1;}.row-fluid:before,.row-fluid:after{display:table;content:"";}.row-fluid:after{clear:both;}.row-fluid>[class*="span"]{float:left;margin-left:1.0526315789%;}.row-fluid>[class*="span"]:first-child{margin-left:0;}.row-fluid .span24{width:99.9999999979%;}.row-fluid .span23{width:95.7894736822%;}.row-fluid .span22{width:91.57894736649999%;}.row-fluid .span21{width:87.3684210508%;}.row-fluid .span20{width:83.1578947351%;}.row-fluid .span19{width:78.9473684194%;}.row-fluid .span18{width:74.7368421037%;}.row-fluid .span17{width:70.526315788%;}.row-fluid .span16{width:66.3157894723%;}.row-fluid .span15{width:62.105263156599996%;}.row-fluid .span14{width:57.8947368409%;}.row-fluid .span13{width:53.6842105252%;}.row-fluid .span12{width:49.4736842095%;}.row-fluid .span11{width:45.2631578938%;}.row-fluid .span10{width:41.0526315781%;}.row-fluid .span9{width:36.8421052624%;}.row-fluid .span8{width:32.6315789467%;}.row-fluid .span7{width:28.421052631000002%;}.row-fluid .span6{width:24.2105263153%;}.row-fluid .span5{width:19.9999999996%;}.row-fluid .span4{width:15.789473683899999%;}.row-fluid .span3{width:11.5789473682%;}.row-fluid .span2{width:7.3684210525%;}.row-fluid .span1{width:3.1578947368%;}[class*="span"]>[class*="span"]:first-child{margin-left:0;}.row-fluid{_margin-left:-10px;}.span-first{margin-left:0;}.span-width{margin-left:0;float:none;}.container{margin-left:auto;margin-right:auto;*zoom:1;}.container:before,.container:after{display:table;content:"";}.container:after{clear:both;}.container-fluid{padding-left:10px;padding-right:10px;*zoom:1;}.container-fluid:before,.container-fluid:after{display:table;content:"";}.container-fluid:after{clear:both;}.label{display:inline-block;*display:inline;*zoom:1;padding:1px 4px 2px;font-size:10.152px;font-weight:bold;line-height:15px;color:#fff;vertical-align:middle;white-space:nowrap;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#999;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}.label:hover{color:#fff;text-decoration:none;}.label-important{background-color:#fe0000;}.label-important:hover{background-color:#cb0000;}.label-warning{background-color:#f89406;}.label-warning:hover{background-color:#c67605;}.label-success{background-color:#468847;}.label-success:hover{background-color:#356635;}.label-info{background-color:#3a87ad;}.label-info:hover{background-color:#2d6987;}.label-inverse{background-color:#333;}.label-inverse:hover{background-color:#1a1a1a;}.badge{padding:1px 9px 2px;font-size:11.100000000000001px;font-weight:bold;white-space:nowrap;color:#fff;background-color:#999;-webkit-border-radius:9px;-moz-border-radius:9px;border-radius:9px;}.badge:hover{color:#fff;text-decoration:none;cursor:pointer;}.badge-error{background-color:#fe0000;}.badge-error:hover{background-color:#cb0000;}.badge-warning{background-color:#f89406;}.badge-warning:hover{background-color:#c67605;}.badge-success{background-color:#468847;}.badge-success:hover{background-color:#356635;}.badge-info{background-color:#3a87ad;}.badge-info:hover{background-color:#2d6987;}.badge-inverse{background-color:#333;}.badge-inverse:hover{background-color:#1a1a1a;}.x-icon{display:inline-block;*display:inline;*zoom:1;font-size:20px;font-weight:bold;font-family:"Arial";text-align:center;height:22px;width:22px;line-height:22px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;text-shadow:0 -1px 0 rgba(0,0,0,0.25);border:1px solid transparent;*position:relative;cursor:inherit;}.x-icon i{vertical-align:baseline;*position:absolute;*top:4px;*left:2px;}.x-icon-normal{text-shadow:none;color:#9ca0b1;background-color:#f5f5f5;background-image:-moz-linear-gradient(top,#fff,#e6e6e6);background-image:-ms-linear-gradient(top,#fff,#e6e6e6);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));background-image:-webkit-linear-gradient(top,#fff,#e6e6e6);background-image:-o-linear-gradient(top,#fff,#e6e6e6);background-image:linear-gradient(top,#fff,#e6e6e6);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff',endColorstr='#e6e6e6',GradientType=0);border-color:#e6e6e6 #e6e6e6 #c0c0c0;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);border:1px solid #b3b3b3;}.x-icon-normal:hover,.x-icon-normal:active,.x-icon-normal.active,.x-icon-normal.disabled{background-color:#e6e6e6;}.x-icon-normal[disabled]{background-color:#e6e6e6;}.x-icon-normal:active,.x-icon-normal.active{background-color:#cdcdcd \9;}.x-icon-small{font-size:17px;*font-size:15px;height:14px;width:14px;line-height:14px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;}.x-icon-small i{*position:absolute;*top:0;*left:0;}.x-icon-mini{font-size:14px;*font-size:12px;height:12px;width:12px;line-height:12px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;}.x-icon-mini i{*position:absolute;*top:0;*left:0;}.x-icon-disable{background-color:#f7f7f7;background-image:-moz-linear-gradient(top,#fff,#ececec);background-image:-ms-linear-gradient(top,#fff,#ececec);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#ececec));background-image:-webkit-linear-gradient(top,#fff,#ececec);background-image:-o-linear-gradient(top,#fff,#ececec);background-image:linear-gradient(top,#fff,#ececec);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff',endColorstr='#ececec',GradientType=0);border-color:#ececec #ececec #c6c6c6;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);color:#d5d5d5;border:1px solid #dfdfdf;}.x-icon-disable:hover,.x-icon-disable:active,.x-icon-disable.active,.x-icon-disable.disabled{background-color:#ececec;}.x-icon-disable[disabled]{background-color:#ececec;}.x-icon-disable:active,.x-icon-disable.active{background-color:#d3d3d3 \9;}.x-icon-hover,.x-icon-normal:hover{background-color:#f2f2f2;background-image:-moz-linear-gradient(top,#fff,#dedede);background-image:-ms-linear-gradient(top,#fff,#dedede);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#dedede));background-image:-webkit-linear-gradient(top,#fff,#dedede);background-image:-o-linear-gradient(top,#fff,#dedede);background-image:linear-gradient(top,#fff,#dedede);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff',endColorstr='#dedede',GradientType=0);border-color:#dedede #dedede #b8b8b8;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);color:#73787d;border:1px solid #a6a6c1;}.x-icon-hover:hover,.x-icon-normal:hover:hover,.x-icon-hover:active,.x-icon-normal:hover:active,.x-icon-hover.active,.x-icon-normal:hover.active,.x-icon-hover.disabled,.x-icon-normal:hover.disabled{background-color:#dedede;}.x-icon-hover[disabled],.x-icon-normal:hover[disabled]{background-color:#dedede;}.x-icon-hover:active,.x-icon-normal:hover:active,.x-icon-hover.active,.x-icon-normal:hover.active{background-color:#c5c5c5 \9;}.x-icon-success{color:#fff;background-color:#5bb75b;background-image:-moz-linear-gradient(top,#62c462,#51a351);background-image:-ms-linear-gradient(top,#62c462,#51a351);background-image:-webkit-gradient(linear,0 0,0 100%,from(#62c462),to(#51a351));background-image:-webkit-linear-gradient(top,#62c462,#51a351);background-image:-o-linear-gradient(top,#62c462,#51a351);background-image:linear-gradient(top,#62c462,#51a351);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462',endColorstr='#51a351',GradientType=0);border-color:#51a351 #51a351 #387038;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);}.x-icon-success:hover,.x-icon-success:active,.x-icon-success.active,.x-icon-success.disabled{background-color:#51a351;}.x-icon-success[disabled]{background-color:#51a351;}.x-icon-success:active,.x-icon-success.active{background-color:#408140 \9;}.x-icon-warning{color:#fff;background-color:#faa732;background-image:-moz-linear-gradient(top,#fbb450,#f89406);background-image:-ms-linear-gradient(top,#fbb450,#f89406);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fbb450),to(#f89406));background-image:-webkit-linear-gradient(top,#fbb450,#f89406);background-image:-o-linear-gradient(top,#fbb450,#f89406);background-image:linear-gradient(top,#fbb450,#f89406);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fbb450',endColorstr='#f89406',GradientType=0);border-color:#f89406 #f89406 #ad6704;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);}.x-icon-warning:hover,.x-icon-warning:active,.x-icon-warning.active,.x-icon-warning.disabled{background-color:#f89406;}.x-icon-warning[disabled]{background-color:#f89406;}.x-icon-warning:active,.x-icon-warning.active{background-color:#c67605 \9;}.x-icon-error{color:#fff;background-color:#da4f49;background-image:-moz-linear-gradient(top,#ee5f5b,#bd362f);background-image:-ms-linear-gradient(top,#ee5f5b,#bd362f);background-image:-webkit-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#bd362f));background-image:-webkit-linear-gradient(top,#ee5f5b,#bd362f);background-image:-o-linear-gradient(top,#ee5f5b,#bd362f);background-image:linear-gradient(top,#ee5f5b,#bd362f);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b',endColorstr='#bd362f',GradientType=0);border-color:#bd362f #bd362f #802420;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);}.x-icon-error:hover,.x-icon-error:active,.x-icon-error.active,.x-icon-error.disabled{background-color:#bd362f;}.x-icon-error[disabled]{background-color:#bd362f;}.x-icon-error:active,.x-icon-error.active{background-color:#942a25 \9;}.x-icon-info,.x-icon-question{color:#fff;background-color:#0087e8;background-image:-moz-linear-gradient(top,#0096e8,#0071e7);background-image:-ms-linear-gradient(top,#0096e8,#0071e7);background-image:-webkit-gradient(linear,0 0,0 100%,from(#0096e8),to(#0071e7));background-image:-webkit-linear-gradient(top,#0096e8,#0071e7);background-image:-o-linear-gradient(top,#0096e8,#0071e7);background-image:linear-gradient(top,#0096e8,#0071e7);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0096e8',endColorstr='#0071e7',GradientType=0);border-color:#0071e7 #0071e7 #004c9b;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);}.x-icon-info:hover,.x-icon-question:hover,.x-icon-info:active,.x-icon-question:active,.x-icon-info.active,.x-icon-question.active,.x-icon-info.disabled,.x-icon-question.disabled{background-color:#0071e7;}.x-icon-info[disabled],.x-icon-question[disabled]{background-color:#0071e7;}.x-icon-info:active,.x-icon-question:active,.x-icon-info.active,.x-icon-question.active{background-color:#0058b4 \9;}.x-caret{display:inline-block;*display:inline;*zoom:1;width:0;height:0;border:4px solid transparent;line-height:0;_border-color:tomato;_filter:chroma(color=#ff6347);}.x-caret-down{border-top:4px solid #000;border-bottom:0;}.x-caret-up{border-top:0;border-bottom:4px solid #000;*border-width:5px;}.x-caret-left{border-left:4px solid #000;border-right:0;*border-width:5px;}.x-caret-right{border-right:4px solid #000;border-left:0;*border-width:5px;}.x-caret-left-top{border-top:none;border-right:none;border-left:6px solid #000;border-width:6px;}.x-caret-right-top{border-top:none;border-right:6px solid #000;border-left:none;border-width:6px;}.button .x-caret{vertical-align:middle;margin-left:3px;}.icon-caret{width:8px;height:8px;display:inline-block;}.icon{display:inline-block;*display:inline;*zoom:1;width:14px;height:14px;line-height:14px;vertical-align:text-top;background-image:url("http://img04.taobaocdn.com/tps/i4/T1SMojXedaXXXCL3TD-469-300.png");background-position:14px 14px;background-repeat:no-repeat;*margin-right:.3em;}.icon:last-child{*margin-left:0;}.icon-mini{width:12px;height:12px;line-height:12px;}.icon-caret{width:8px;height:8px;display:inline-block;}[class^="icon-"],[class*=" icon-"]{display:inline-block;*display:inline;*zoom:1;width:14px;height:14px;line-height:14px;vertical-align:text-top;background-image:url("http://img04.taobaocdn.com/tps/i4/T1SMojXedaXXXCL3TD-469-300.png");background-position:14px 14px;background-repeat:no-repeat;*margin-right:.3em;}[class^="icon-"]:last-child,[class*=" icon-"]:last-child{*margin-left:0;}[class^="icon-mini"],[class*=" icon-mini"]{width:12px;height:12px;line-height:12px;}[class^="icon-caret"],[class*=" icon-caret"]{width:8px;height:8px;display:inline-block;width:8px;height:8px;display:inline-block;}.icon-white{background-image:url("http://img01.taobaocdn.com/tps/i1/T1qXIiXgXgXXXCL3TD-469-300.png");}.icon-glass{background-position:0 0;}.icon-music{background-position:-24px 0;}.icon-search{background-position:-48px 0;}.icon-envelope{background-position:-72px 0;}.icon-heart{background-position:-96px 0;}.icon-star{background-position:-120px 0;}.icon-star-empty{background-position:-144px 0;}.icon-user{background-position:-168px 0;}.icon-film{background-position:-192px 0;}.icon-th-large{background-position:-216px 0;}.icon-th{background-position:-240px 0;}.icon-th-list{background-position:-264px 0;}.icon-ok{background-position:-288px 0;}.icon-remove{background-position:-312px 0;}.icon-zoom-in{background-position:-336px 0;}.icon-zoom-out{background-position:-360px 0;}.icon-off{background-position:-384px 0;}.icon-signal{background-position:-408px 0;}.icon-cog{background-position:-432px 0;}.icon-trash{background-position:-456px 0;}.icon-home{background-position:0 -24px;}.icon-file{background-position:-24px -24px;}.icon-time{background-position:-48px -24px;}.icon-road{background-position:-72px -24px;}.icon-download-alt{background-position:-96px -24px;}.icon-download{background-position:-120px -24px;}.icon-upload{background-position:-144px -24px;}.icon-inbox{background-position:-168px -24px;}.icon-play-circle{background-position:-192px -24px;}.icon-repeat{background-position:-216px -24px;}.icon-refresh{background-position:-240px -24px;}.icon-list-alt{background-position:-264px -24px;}.icon-lock{background-position:-287px -24px;}.icon-flag{background-position:-312px -24px;}.icon-headphones{background-position:-336px -24px;}.icon-volume-off{background-position:-360px -24px;}.icon-volume-down{background-position:-384px -24px;}.icon-volume-up{background-position:-408px -24px;}.icon-qrcode{background-position:-432px -24px;}.icon-barcode{background-position:-456px -24px;}.icon-tag{background-position:0 -48px;}.icon-tags{background-position:-25px -48px;}.icon-book{background-position:-48px -48px;}.icon-bookmark{background-position:-72px -48px;}.icon-print{background-position:-96px -48px;}.icon-camera{background-position:-120px -48px;}.icon-font{background-position:-144px -48px;}.icon-bold{background-position:-167px -48px;}.icon-italic{background-position:-192px -48px;}.icon-text-height{background-position:-216px -48px;}.icon-text-width{background-position:-240px -48px;}.icon-align-left{background-position:-264px -48px;}.icon-align-center{background-position:-288px -48px;}.icon-align-right{background-position:-312px -48px;}.icon-align-justify{background-position:-336px -48px;}.icon-list{background-position:-360px -48px;}.icon-indent-left{background-position:-384px -48px;}.icon-indent-right{background-position:-408px -48px;}.icon-facetime-video{background-position:-432px -48px;}.icon-picture{background-position:-456px -48px;}.icon-pencil{background-position:0 -72px;}.icon-map-marker{background-position:-24px -72px;}.icon-adjust{background-position:-48px -72px;}.icon-tint{background-position:-72px -72px;}.icon-edit{background-position:-96px -72px;}.icon-share{background-position:-120px -72px;}.icon-check{background-position:-144px -72px;}.icon-move{background-position:-168px -72px;}.icon-step-backward{background-position:-192px -72px;}.icon-fast-backward{background-position:-216px -72px;}.icon-backward{background-position:-240px -72px;}.icon-play{background-position:-264px -72px;}.icon-pause{background-position:-288px -72px;}.icon-stop{background-position:-312px -72px;}.icon-forward{background-position:-336px -72px;}.icon-fast-forward{background-position:-360px -72px;}.icon-step-forward{background-position:-384px -72px;}.icon-eject{background-position:-408px -72px;}.icon-chevron-left{background-position:-432px -72px;}.icon-chevron-right{background-position:-456px -72px;}.icon-plus-sign{background-position:0 -96px;}.icon-minus-sign{background-position:-24px -96px;}.icon-remove-sign{background-position:-48px -96px;}.icon-ok-sign{background-position:-72px -96px;}.icon-question-sign{background-position:-96px -96px;}.icon-info-sign{background-position:-120px -96px;}.icon-screenshot{background-position:-144px -96px;}.icon-remove-circle{background-position:-168px -96px;}.icon-ok-circle{background-position:-192px -96px;}.icon-ban-circle{background-position:-216px -96px;}.icon-arrow-left{background-position:-240px -96px;}.icon-arrow-right{background-position:-264px -96px;}.icon-arrow-up{background-position:-289px -96px;}.icon-arrow-down{background-position:-312px -96px;}.icon-share-alt{background-position:-336px -96px;}.icon-resize-full{background-position:-360px -96px;}.icon-resize-small{background-position:-384px -96px;}.icon-plus{background-position:-408px -96px;}.icon-minus{background-position:-433px -96px;}.icon-asterisk{background-position:-456px -96px;}.icon-exclamation-sign{background-position:0 -120px;}.icon-gift{background-position:-24px -120px;}.icon-leaf{background-position:-48px -120px;}.icon-fire{background-position:-72px -120px;}.icon-eye-open{background-position:-96px -120px;}.icon-eye-close{background-position:-120px -120px;}.icon-warning-sign{background-position:-144px -120px;}.icon-plane{background-position:-168px -120px;}.icon-calendar{background-position:-192px -120px;}.icon-random{background-position:-216px -120px;}.icon-comment{background-position:-240px -120px;}.icon-magnet{background-position:-264px -120px;}.icon-chevron-up{background-position:-288px -120px;}.icon-chevron-down{background-position:-313px -119px;}.icon-retweet{background-position:-336px -120px;}.icon-shopping-cart{background-position:-360px -120px;}.icon-folder-close{background-position:-384px -120px;}.icon-folder-open{background-position:-408px -120px;}.icon-resize-vertical{background-position:-432px -119px;}.icon-resize-horizontal{background-position:-456px -118px;}.icon-hdd{background-position:0 -144px;}.icon-bullhorn{background-position:-24px -144px;}.icon-bell{background-position:-48px -144px;}.icon-certificate{background-position:-72px -144px;}.icon-thumbs-up{background-position:-96px -144px;}.icon-thumbs-down{background-position:-120px -144px;}.icon-hand-right{background-position:-144px -144px;}.icon-hand-left{background-position:-168px -144px;}.icon-hand-up{background-position:-192px -144px;}.icon-hand-down{background-position:-216px -144px;}.icon-circle-arrow-right{background-position:-240px -144px;}.icon-circle-arrow-left{background-position:-264px -144px;}.icon-circle-arrow-up{background-position:-288px -144px;}.icon-circle-arrow-down{background-position:-312px -144px;}.icon-globe{background-position:-336px -144px;}.icon-wrench{background-position:-360px -144px;}.icon-tasks{background-position:-384px -144px;}.icon-filter{background-position:-408px -144px;}.icon-briefcase{background-position:-432px -144px;}.icon-fullscreen{background-position:-456px -144px;}.icon-warning{background-position:0 -168px;}.icon-info{background-position:-24px -168px;}.icon-question{background-position:-48px -168px;}.icon-warning-mini{background-position:-1px -188px;}.icon-info-mini{background-position:-25px -188px;}.icon-ok-mini{background-position:-49px -188px;}.icon-remove-mini{background-position:-73px -188px;}.icon-plus-mini{background-position:-97px -188px;}.icon-minus-mini{background-position:-120px -189px;}.icon-caret-up{background-position:-1px -209px;}.icon-caret-down{background-position:-1px -218px;}.icon-caret-left{background-position:-1px -227px;}.icon-caret-right{background-position:-1px -235px;}.icon-caret-left-top{background-position:-1px -244px;}.icon-caret-right-top{background-position:-1px -253px;}.icon-caret-left-down{background-position:-1px -273px;}.icon-caret-right-down{background-position:-1px -264px;}.breadcrumb{padding:7px 14px;margin:0 0 18px;list-style:none;background-color:#fbfbfb;background-image:-moz-linear-gradient(top,#fff,#f5f5f5);background-image:-ms-linear-gradient(top,#fff,#f5f5f5);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#f5f5f5));background-image:-webkit-linear-gradient(top,#fff,#f5f5f5);background-image:-o-linear-gradient(top,#fff,#f5f5f5);background-image:linear-gradient(top,#fff,#f5f5f5);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff',endColorstr='#f5f5f5',GradientType=0);border:1px solid #ddd;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 0 #fff;-moz-box-shadow:inset 0 1px 0 #fff;box-shadow:inset 0 1px 0 #fff;}.breadcrumb li{display:inline-block;*display:inline;*zoom:1;text-shadow:0 1px 0 #fff;}.breadcrumb .divider{padding:0 5px;color:#999;}.breadcrumb .active a{color:#333;}table{border-collapse:collapse;border-spacing:0;background-color:transparent;}.table{width:100%;margin-bottom:9px;border-collapse:separate;border-spacing:0;}.table th,.table td{padding:9px;line-height:18px;text-align:left;vertical-align:top;border-top:1px solid #ddd;}.table th{font-weight:bold;}.table thead tr{vertical-align:bottom;}.table colgroup+thead tr:first-child th,.table colgroup+thead tr:first-child td,.table thead:first-child tr:first-child th,.table thead:first-child tr:first-child td{border-top:0;}.table tbody+tbody{border-top:2px solid #ddd;}.table-head-bordered thead tr{vertical-align:bottom;background-color:#fbfbfb;background-image:-moz-linear-gradient(top,#fff,#f4f4f4);background-image:-ms-linear-gradient(top,#fff,#f4f4f4);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#f4f4f4));background-image:-webkit-linear-gradient(top,#fff,#f4f4f4);background-image:-o-linear-gradient(top,#fff,#f4f4f4);background-image:linear-gradient(top,#fff,#f4f4f4);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff',endColorstr='#f4f4f4',GradientType=0);}.table-head-bordered colgroup+thead tr:first-child th,.table-head-bordered colgroup+thead tr:first-child td,.table-head-bordered thead:first-child tr:first-child th,.table-head-bordered thead:first-child tr:first-child td{border-top:1px solid #ddd;}.table-head-bordered thead:first-child tr th:first-child,.table-head-bordered thead tr td:first-child{border-left:1px solid #ddd;}.table-head-bordered thead tr:first-child th:first-child{-webkit-border-top-left-radius:4px;-moz-border-top-left-radius:4px;border-top-left-radius:4px;}.table-head-bordered thead tr:last-child th:first-child{-webkit-border-bottom-left-radius:4px;-moz-border-bottom-left-radius:4px;border-bottom-left-radius:4px;}.table-head-bordered thead tr th:last-child,.table-head-bordered thead tr td:last-child{border-right:1px solid #ddd;}.table-head-bordered thead tr:first-child th:last-child{-webkit-border-top-right-radius:4px;-moz-border-top-right-radius:4px;border-top-right-radius:4px;}.table-head-bordered thead tr:last-child th:last-child{-webkit-border-bottom-right-radius:4px;-moz-border-bottom-right-radius:4px;border-bottom-right-radius:4px;}.table-head-bordered thead tr:last-child th{border-bottom:1px solid #ddd;}.table-head-bordered tbody tr:first-child td{border-top:0;}.table-condensed th,.table-condensed td{padding:4px 5px;}.table-bordered{border:1px solid #ddd;border-left:0;border-collapse:separate;*border-collapse:collapsed;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}.table-bordered thead tr{background-color:#f4f4f4;background-image:-moz-linear-gradient(top,#f8f8f8,#eee);background-image:-ms-linear-gradient(top,#f8f8f8,#eee);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f8f8f8),to(#eee));background-image:-webkit-linear-gradient(top,#f8f8f8,#eee);background-image:-o-linear-gradient(top,#f8f8f8,#eee);background-image:linear-gradient(top,#f8f8f8,#eee);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f8f8f8',endColorstr='#eeeeee',GradientType=0);}.table-bordered thead tr th:last-child,.table-bordered thead tr td:last-child{border-right:none;}.table-bordered th,.table-bordered td{border-left:1px solid #ddd;}.table-bordered thead th,.table-bordered thead td{padding-top:0;padding-bottom:0;height:38px;line-height:38px;}.table-bordered thead:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child td{border-top:0;}.table-bordered thead:first-child tr:first-child th:first-child,.table-bordered tbody:first-child tr:first-child td:first-child{-webkit-border-radius:3px 0 0 0;-moz-border-radius:3px 0 0 0;border-radius:3px 0 0 0;}.table-bordered thead:first-child tr:first-child th:last-child,.table-bordered tbody:first-child tr:first-child td:last-child{-webkit-border-radius:0 3px 0 0;-moz-border-radius:0 3px 0 0;border-radius:0 3px 0 0;}.table-bordered thead:last-child tr:last-child th:first-child,.table-bordered tbody:last-child tr:last-child td:first-child{-webkit-border-radius:0 0 0 3px;-moz-border-radius:0 0 0 3px;border-radius:0 0 0 3px;}.table-bordered thead:last-child tr:last-child th:last-child,.table-bordered tbody:last-child tr:last-child td:last-child{-webkit-border-radius:0 0 3px 0;-moz-border-radius:0 0 3px 0;border-radius:0 0 3px 0;}.table-striped tbody tr:nth-child(odd) td,.table-striped tbody tr:nth-child(odd) th{background-color:#f2f2f2;}.table tbody tr:hover td,.table tbody tr:hover th{background-color:#f0f0f0;}table .span1{float:none;width:14px;margin-left:0;}table .span2{float:none;width:54px;margin-left:0;}table .span3{float:none;width:94px;margin-left:0;}table .span4{float:none;width:134px;margin-left:0;}table .span5{float:none;width:174px;margin-left:0;}table .span6{float:none;width:214px;margin-left:0;}table .span7{float:none;width:254px;margin-left:0;}table .span8{float:none;width:294px;margin-left:0;}table .span9{float:none;width:334px;margin-left:0;}table .span10{float:none;width:374px;margin-left:0;}table .span11{float:none;width:414px;margin-left:0;}table .span12{float:none;width:454px;margin-left:0;}table .span13{float:none;width:494px;margin-left:0;}table .span14{float:none;width:534px;margin-left:0;}table .span15{float:none;width:574px;margin-left:0;}table .span16{float:none;width:614px;margin-left:0;}table .span17{float:none;width:654px;margin-left:0;}table .span18{float:none;width:694px;margin-left:0;}table .span19{float:none;width:734px;margin-left:0;}table .span20{float:none;width:774px;margin-left:0;}table .span21{float:none;width:814px;margin-left:0;}table .span22{float:none;width:854px;margin-left:0;}table .span23{float:none;width:894px;margin-left:0;}table .span24{float:none;width:934px;margin-left:0;}.panel{border:1px solid #c3c3d6;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}.panel .panel-header{padding:9px;line-height:18px;background-color:#f4f4f4;background-image:-moz-linear-gradient(top,#f8f8f8,#eee);background-image:-ms-linear-gradient(top,#f8f8f8,#eee);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f8f8f8),to(#eee));background-image:-webkit-linear-gradient(top,#f8f8f8,#eee);background-image:-o-linear-gradient(top,#f8f8f8,#eee);background-image:linear-gradient(top,#f8f8f8,#eee);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f8f8f8',endColorstr='#eeeeee',GradientType=0);}.panel .panel-body{padding:9px;}.panel-small .panel-header{padding:2px;}.panel-small .panel-body{padding:0;}.panel-head-borded{border:none;}.panel-head-borded .panel-header{-webkit-border-radius:3px 3px 0 0;-moz-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0;border:1px solid #c3c3d6;border-bottom:none;}.panel-head-borded .panel-body{padding:0;}.form-page,.search-page,.detail-page{padding:25px 0 0 20px;}.search-grid-container{margin-top:5px;}select,textarea{width:140px;border:1px solid #c3c3d6;}select{width:150px;}.control-text{width:140px;display:inline-block;height:18px;padding:1px 4px;border:1px solid #c3c3d6;height:18px;}label.control-text,span.control-text{width:auto;height:auto;border:none;padding:0;display:inline;vertical-align:middle;}input[type="text"],input[type="password"],input[type="email"]{width:140px;height:18px;}input,textarea,.uneditable-input{margin-left:0;}input.span24,textarea.span24,.uneditable-input.span24{width:940px;}input.span23,textarea.span23,.uneditable-input.span23{width:900px;}input.span22,textarea.span22,.uneditable-input.span22{width:860px;}input.span21,textarea.span21,.uneditable-input.span21{width:820px;}input.span20,textarea.span20,.uneditable-input.span20{width:780px;}input.span19,textarea.span19,.uneditable-input.span19{width:740px;}input.span18,textarea.span18,.uneditable-input.span18{width:700px;}input.span17,textarea.span17,.uneditable-input.span17{width:660px;}input.span16,textarea.span16,.uneditable-input.span16{width:620px;}input.span15,textarea.span15,.uneditable-input.span15{width:580px;}input.span14,textarea.span14,.uneditable-input.span14{width:540px;}input.span13,textarea.span13,.uneditable-input.span13{width:500px;}input.span12,textarea.span12,.uneditable-input.span12{width:460px;}input.span11,textarea.span11,.uneditable-input.span11{width:420px;}input.span10,textarea.span10,.uneditable-input.span10{width:380px;}input.span9,textarea.span9,.uneditable-input.span9{width:340px;}input.span8,textarea.span8,.uneditable-input.span8{width:300px;}input.span7,textarea.span7,.uneditable-input.span7{width:260px;}input.span6,textarea.span6,.uneditable-input.span6{width:220px;}input.span5,textarea.span5,.uneditable-input.span5{width:180px;}input.span4,textarea.span4,.uneditable-input.span4{width:140px;}input.span3,textarea.span3,.uneditable-input.span3{width:100px;}input.span2,textarea.span2,.uneditable-input.span2{width:60px;}input.span1,textarea.span1,.uneditable-input.span1{width:20px;}input[type="text"],input[type="password"],textarea,select{display:inline-block;height:18px;padding:1px 4px;border:1px solid #c3c3d6;}select{height:22px;padding:0;}textarea{height:54px;}input,select,textarea,select{font-family:"SimSun","Helvetica Neue",Helvetica,Arial,sans-serif;line-height:18px;}input.input-normal,select.input-normal,textarea.input-normal,select.input-normal{width:140px;}input.input-small,select.input-small,textarea.input-small,select.input-small{width:80px;}input.input-large,select.input-large,textarea.input-large,select.input-large{width:300px;}input.calendar{width:80px;}input.calendar-time{width:140px;}.checkbox input,.radio input{vertical-align:middle;margin-right:5px;margin-top:-4px;}fieldset{padding:0;margin:0;border:0;}legend{display:block;width:100%;padding:0;margin-bottom:18px;font-size:14px;line-height:40px;border:0;border-bottom:1px solid #c3c3d6;}.form-vertical label{display:block;margin-bottom:5px;}.form-horizontal .control-group{*zoom:1;}.form-horizontal .control-group:before,.form-horizontal .control-group:after{display:table;content:"";}.form-horizontal .control-group:after{clear:both;}.form-horizontal .control-label{float:left;text-align:right;line-height:22px;display:inline-block;*display:inline;*zoom:1;width:110px;}.form-horizontal .control-label s{color:red;padding-right:5px;text-decoration:none;}.form-horizontal .control-label-small{width:70px;}.form-horizontal .control-label-auto{width:auto;}.form-horizontal .controls{margin-left:10px;float:left;display:inline;*zoom:1;height:40px;}.form-horizontal input[class*="span"],.form-horizontal select[class*="span"]{float:none;margin:0;}.form-horizontal .control-row1{height:22px;}.form-horizontal .control-row2{height:40px;}.form-horizontal .control-row3{height:58px;}.form-horizontal .control-row4{height:76px;}.form-horizontal .control-row-auto{height:auto;padding-bottom:18px;}.form-horizontal .control-row-auto .well{margin-bottom:0;}.form-horizontal .valid-text{display:block;}.form-horizontal .valid-text .x-icon{margin-right:5px;}.form-horizontal .valid-text em{font-style:normal;}.form-horizontal .valid-text em{line-height:16px;line-height:16px;background-color:transparent;font-style:normal;color:red;}.form-horizontal .form-link{margin-left:20px;vertical-align:bottom;}.form-horizontal fieldset{border:none;padding:0;}.form-horizontal .detail-row{margin-bottom:5px;}.valid-text .label{font-weight:normal;color:red;vertical-align:baseline;text-shadow:none;background-color:transparent;}.form-panel{background-color:#eee;margin-bottom:18px;border:1px solid #ddd;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}.form-panel input,.form-panel select{width:100px;}.form-panel .panel-title{background-color:#e8e9ef;padding:0 15px;height:36px;line-height:36px;-webkit-border-radius:3px 3px 0 0;-moz-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0;border-bottom:1px solid #ddd;}.form-panel .panel-title label{font-weight:bold;}.form-panel .panel-content{padding:7px 12px;}.form-panel .panel-content li{height:36px;line-height:36px;}.actions-bar{padding:19px 20px 20px;margin-top:20px;margin-bottom:20px;background-color:#e8e9ef;border-top:1px solid #c3c3d6;}.actions-bar-small{padding:10px;margin-top:10px;margin-bottom:10px;}.form-links{border-bottom:2px solid #c3c3d6;margin-bottom:18px;}.form-links .nav-tabs{margin:0 5px;background-color:#e8e9ef;-webkit-border-radius:2px 2px 0 0;-moz-border-radius:2px 2px 0 0;border-radius:2px 2px 0 0;}.form-links .nav-tabs .active,.form-links .nav-tabs .active a{background-color:#c3c3d6;color:#fff;}form.form-horizontal{padding-left:0;padding-right:0;*padding:0;border:none;}.show-grid .controls{text-align:left;line-height:20px;}form h2,form h3{margin-bottom:20px;}.form-horizontal hr{margin-top:0;margin-bottom:18px;}.button{display:inline-block;*display:inline;*zoom:1;padding:4px 15px;margin-bottom:0;font-size:14px;line-height:18px;font-weight:bold;color:#333;text-align:center;text-shadow:0 1px 1px rgba(255,255,255,0.75);background-color:#f4f4f4;background-image:-moz-linear-gradient(top,#fff,#e4e4e4);background-image:-ms-linear-gradient(top,#fff,#e4e4e4);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e4e4e4));background-image:-webkit-linear-gradient(top,#fff,#e4e4e4);background-image:-o-linear-gradient(top,#fff,#e4e4e4);background-image:linear-gradient(top,#fff,#e4e4e4);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff',endColorstr='#e4e4e4',GradientType=0);border-color:#e4e4e4 #e4e4e4 #bebebe;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);border:1px solid #ccc;border-bottom-color:#b3b3b3;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);cursor:pointer;*margin-left:.3em;}.button:hover,.button:active,.button.active,.button.disabled{background-color:#e4e4e4;}.button[disabled]{background-color:#e4e4e4;}.button:active,.button.active{background-color:#cbcbcb \9;}.button:first-child{*margin-left:0;}.button:hover,.button-hover{color:#333;text-decoration:none;background-color:#e6e6e6;background-position:0 -15px;-webkit-transition:background-position .1s linear;-moz-transition:background-position .1s linear;-ms-transition:background-position .1s linear;-o-transition:background-position .1s linear;transition:background-position .1s linear;}.button:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;}.button.active,.button-checked,.button:active{background-image:none;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);background-color:#e6e6e6;background-color:#d9d9d9 \9;outline:0;}.button-disabled,.button[disabled]{cursor:default;outline-width:0;background-image:none;background-color:#e6e6e6;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;}.button-large{padding:7px 20px;font-size:14px;line-height:normal;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}.button-large [class^="icon-"]{margin-top:1px;}.button-small{padding:2px 10px;font-size:12px;font-weight:normal;line-height:16px;}.button-mini{padding:1px 6px;font-weight:normal;font-size:10px;line-height:14px;}.button-primary,.button-primary:hover,.button-warning,.button-warning:hover,.button-danger,.button-danger:hover,.button-success,.button-success:hover,.button-info,.button-info:hover,.button-inverse,.button-inverse:hover{text-shadow:0 -1px 0 rgba(0,0,0,0.25);color:#fff;}.button-primary.active,.button-warning.active,.button-danger.active,.button-success.active,.button-info.active,.button-inverse.active{color:rgba(255,255,255,0.75);}.button-primary{background-color:#3357cc;background-image:-moz-linear-gradient(top,#36c,#3340cc);background-image:-ms-linear-gradient(top,#36c,#3340cc);background-image:-webkit-gradient(linear,0 0,0 100%,from(#36c),to(#3340cc));background-image:-webkit-linear-gradient(top,#36c,#3340cc);background-image:-o-linear-gradient(top,#36c,#3340cc);background-image:linear-gradient(top,#36c,#3340cc);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#3366cc',endColorstr='#3340cc',GradientType=0);border-color:#3340cc #3340cc #242d8f;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);}.button-primary:hover,.button-primary:active,.button-primary.active,.button-primary.disabled{background-color:#3340cc;}.button-primary[disabled]{background-color:#3340cc;}.button-primary:active,.button-primary.active{background-color:#2933a3 \9;}.button-warning{background-color:#faa732;background-image:-moz-linear-gradient(top,#fbb450,#f89406);background-image:-ms-linear-gradient(top,#fbb450,#f89406);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fbb450),to(#f89406));background-image:-webkit-linear-gradient(top,#fbb450,#f89406);background-image:-o-linear-gradient(top,#fbb450,#f89406);background-image:linear-gradient(top,#fbb450,#f89406);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fbb450',endColorstr='#f89406',GradientType=0);border-color:#f89406 #f89406 #ad6704;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);}.button-warning:hover,.button-warning:active,.button-warning.active,.button-warning.disabled{background-color:#f89406;}.button-warning[disabled]{background-color:#f89406;}.button-warning:active,.button-warning.active{background-color:#c67605 \9;}.button-danger{background-color:#da4f49;background-image:-moz-linear-gradient(top,#ee5f5b,#bd362f);background-image:-ms-linear-gradient(top,#ee5f5b,#bd362f);background-image:-webkit-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#bd362f));background-image:-webkit-linear-gradient(top,#ee5f5b,#bd362f);background-image:-o-linear-gradient(top,#ee5f5b,#bd362f);background-image:linear-gradient(top,#ee5f5b,#bd362f);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b',endColorstr='#bd362f',GradientType=0);border-color:#bd362f #bd362f #802420;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);}.button-danger:hover,.button-danger:active,.button-danger.active,.button-danger.disabled{background-color:#bd362f;}.button-danger[disabled]{background-color:#bd362f;}.button-danger:active,.button-danger.active{background-color:#942a25 \9;}.button-success{background-color:#5bb75b;background-image:-moz-linear-gradient(top,#62c462,#51a351);background-image:-ms-linear-gradient(top,#62c462,#51a351);background-image:-webkit-gradient(linear,0 0,0 100%,from(#62c462),to(#51a351));background-image:-webkit-linear-gradient(top,#62c462,#51a351);background-image:-o-linear-gradient(top,#62c462,#51a351);background-image:linear-gradient(top,#62c462,#51a351);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462',endColorstr='#51a351',GradientType=0);border-color:#51a351 #51a351 #387038;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);}.button-success:hover,.button-success:active,.button-success.active,.button-success.disabled{background-color:#51a351;}.button-success[disabled]{background-color:#51a351;}.button-success:active,.button-success.active{background-color:#408140 \9;}.button-info{background-color:#49afcd;background-image:-moz-linear-gradient(top,#5bc0de,#2f96b4);background-image:-ms-linear-gradient(top,#5bc0de,#2f96b4);background-image:-webkit-gradient(linear,0 0,0 100%,from(#5bc0de),to(#2f96b4));background-image:-webkit-linear-gradient(top,#5bc0de,#2f96b4);background-image:-o-linear-gradient(top,#5bc0de,#2f96b4);background-image:linear-gradient(top,#5bc0de,#2f96b4);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#5bc0de',endColorstr='#2f96b4',GradientType=0);border-color:#2f96b4 #2f96b4 #1f6377;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);}.button-info:hover,.button-info:active,.button-info.active,.button-info.disabled{background-color:#2f96b4;}.button-info[disabled]{background-color:#2f96b4;}.button-info:active,.button-info.active{background-color:#24748c \9;}.button-inverse{background-color:#414141;background-image:-moz-linear-gradient(top,#555,#222);background-image:-ms-linear-gradient(top,#555,#222);background-image:-webkit-gradient(linear,0 0,0 100%,from(#555),to(#222));background-image:-webkit-linear-gradient(top,#555,#222);background-image:-o-linear-gradient(top,#555,#222);background-image:linear-gradient(top,#555,#222);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#555555',endColorstr='#222222',GradientType=0);border-color:#222 #222222 #000;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);}.button-inverse:hover,.button-inverse:active,.button-inverse.active,.button-inverse.disabled{background-color:#222;}.button-inverse[disabled]{background-color:#222;}.button-inverse:active,.button-inverse.active{background-color:#080808 \9;}.ie-button{*padding-top:1px;*padding-bottom:1px;}.ie-button::-moz-focus-inner{padding:0;border:0;}.ie-button.button-large{*padding-top:6px;*padding-bottom:6px;}.ie-button.button-small{*padding-top:1px;*padding-bottom:1px;}.ie-button.button-mini{*padding-top:1px;*padding-bottom:1px;}button.button{*padding-top:1px;*padding-bottom:1px;}button.button::-moz-focus-inner{padding:0;border:0;}button.button.button-large{*padding-top:6px;*padding-bottom:6px;}button.button.button-small{*padding-top:1px;*padding-bottom:1px;}button.button.button-mini{*padding-top:1px;*padding-bottom:1px;}input[type="submit"].button{*padding-top:1px;*padding-bottom:1px;}input[type="submit"].button::-moz-focus-inner{padding:0;border:0;}input[type="submit"].button.button-large{*padding-top:6px;*padding-bottom:6px;}input[type="submit"].button.button-small{*padding-top:1px;*padding-bottom:1px;}input[type="submit"].button.button-mini{*padding-top:1px;*padding-bottom:1px;}.button-group{position:relative;*zoom:1;*margin-left:.3em;}.button-group:before,.button-group:after{display:table;content:"";}.button-group:after{clear:both;}.button-group:first-child{*margin-left:0;}.button-group+.button-group{margin-left:5px;}.button-toolbar{margin-top:9px;margin-bottom:9px;}.button-toolbar .button-group{display:inline-block;*display:inline;*zoom:1;}.button-group .button{position:relative;float:left;margin-left:-1px;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}.button-group-focused{outline:none;}.button-group .button:first-child{margin-left:0;-webkit-border-top-left-radius:4px;-moz-border-top-left-radius:4px;border-top-left-radius:4px;-webkit-border-bottom-left-radius:4px;-moz-border-bottom-left-radius:4px;border-bottom-left-radius:4px;}.button-group .button:last-child,.button-group .dropdown-toggle{-webkit-border-top-right-radius:4px;-moz-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;-moz-border-bottom-right-radius:4px;border-bottom-right-radius:4px;}.button-group .button.large:first-child{margin-left:0;-webkit-border-top-left-radius:6px;-moz-border-top-left-radius:6px;border-top-left-radius:6px;-webkit-border-bottom-left-radius:6px;-moz-border-bottom-left-radius:6px;border-bottom-left-radius:6px;}.button-group .button.large:last-child,.button-group .large.dropdown-toggle{-webkit-border-top-right-radius:6px;-moz-border-top-right-radius:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;-moz-border-bottom-right-radius:6px;border-bottom-right-radius:6px;}.button-group .button:hover,.button-group .button:focus,.button-group .button:active,.button-group .button.active{z-index:2;}.button-group .dropdown-toggle:active,.button-group.open .dropdown-toggle{outline:0;}.button-group .dropdown-toggle{padding-left:8px;padding-right:8px;-webkit-box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);*padding-top:3px;*padding-bottom:3px;}.button-group .button-mini.dropdown-toggle{padding-left:5px;padding-right:5px;*padding-top:1px;*padding-bottom:1px;}.button-group .button-small.dropdown-toggle{*padding-top:4px;*padding-bottom:4px;}.button-group .button-large.dropdown-toggle{padding-left:12px;padding-right:12px;}.button-group.open{*z-index:1000;}.button-group.open .dropdown-menu{display:block;margin-top:1px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;}.button-group.open .dropdown-toggle{background-image:none;-webkit-box-shadow:inset 0 1px 6px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 6px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 1px 6px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);}.button .ks-menu-button-dropdown{margin-top:7px;margin-left:0;}.button:hover .ks-menu-button-dropdown,.open.button-group .ks-menu-button-dropdown{opacity:1;filter:alpha(opacity=100);}.button-mini .ks-menu-button-dropdown{margin-top:5px;}.button-small .ks-menu-button-dropdown{margin-top:6px;}.button-large .ks-menu-button-dropdown{margin-top:6px;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #000;}.button-primary .ks-menu-button-dropdown,.button-warning .ks-menu-button-dropdown,.button-danger .ks-menu-button-dropdown,.button-info .ks-menu-button-dropdown,.button-success .ks-menu-button-dropdown,.button-inverse .ks-menu-button-dropdown{border-top-color:#fff;border-bottom-color:#fff;opacity:.75;filter:alpha(opacity=75);}.pagination{height:36px;}.pagination ul{display:inline-block;*display:inline;*zoom:1;margin-left:0;margin-bottom:0;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:0 1px 2px rgba(0,0,0,0.05);box-shadow:0 1px 2px rgba(0,0,0,0.05);}.pagination li{display:inline;}.pagination a{float:left;padding:0 14px;line-height:34px;text-decoration:none;border:1px solid #ddd;border-left-width:0;}.pagination a:hover,.pagination .active a{background-color:#f5f5f5;}.pagination .active a{color:#999;cursor:default;}.pagination .disabled span,.pagination .disabled a,.pagination .disabled a:hover{color:#999;background-color:transparent;cursor:default;}.pagination li:first-child a{border-left-width:1px;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;}.pagination li:last-child a{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;}.pagination-centered{text-align:center;}.pagination-right{text-align:right;}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0;}to{background-position:0 0;}}@-moz-keyframes progress-bar-stripes{from{background-position:40px 0;}to{background-position:0 0;}}@-ms-keyframes progress-bar-stripes{from{background-position:40px 0;}to{background-position:0 0;}}@-o-keyframes progress-bar-stripes{from{background-position:0 0;}to{background-position:40px 0;}}@keyframes progress-bar-stripes{from{background-position:40px 0;}to{background-position:0 0;}}.progress{overflow:hidden;height:18px;margin-bottom:18px;background-color:#f7f7f7;background-image:-moz-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:-ms-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f5f5f5),to(#f9f9f9));background-image:-webkit-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:-o-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:linear-gradient(top,#f5f5f5,#f9f9f9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f5f5f5',endColorstr='#f9f9f9',GradientType=0);-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}.progress .bar{width:0;height:100%;color:#fff;float:left;font-size:12px;text-align:center;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#0e90d2;background-image:-moz-linear-gradient(top,#149bdf,#0480be);background-image:-ms-linear-gradient(top,#149bdf,#0480be);background-image:-webkit-gradient(linear,0 0,0 100%,from(#149bdf),to(#0480be));background-image:-webkit-linear-gradient(top,#149bdf,#0480be);background-image:-o-linear-gradient(top,#149bdf,#0480be);background-image:linear-gradient(top,#149bdf,#0480be);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#149bdf',endColorstr='#0480be',GradientType=0);-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);-moz-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;-webkit-transition:width .6s ease;-moz-transition:width .6s ease;-ms-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease;}.progress .bar+.bar{-webkit-box-shadow:inset 1px 0 0 rgba(0,0,0,.15),inset 0 -1px 0 rgba(0,0,0,.15);-moz-box-shadow:inset 1px 0 0 rgba(0,0,0,.15),inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 1px 0 0 rgba(0,0,0,.15),inset 0 -1px 0 rgba(0,0,0,.15);}.progress-striped .bar{background-color:#149bdf;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-ms-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;-moz-background-size:40px 40px;-o-background-size:40px 40px;background-size:40px 40px;}.progress.active .bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-moz-animation:progress-bar-stripes 2s linear infinite;-ms-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite;}.progress-danger .bar,.progress .bar-danger{background-color:#dd514c;background-image:-moz-linear-gradient(top,#ee5f5b,#c43c35);background-image:-ms-linear-gradient(top,#ee5f5b,#c43c35);background-image:-webkit-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#c43c35));background-image:-webkit-linear-gradient(top,#ee5f5b,#c43c35);background-image:-o-linear-gradient(top,#ee5f5b,#c43c35);background-image:linear-gradient(top,#ee5f5b,#c43c35);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b',endColorstr='#c43c35',GradientType=0);}.progress-danger.progress-striped .bar,.progress-striped .bar-danger{background-color:#ee5f5b;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-ms-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);}.progress-success .bar,.progress .bar-success{background-color:#5eb95e;background-image:-moz-linear-gradient(top,#62c462,#57a957);background-image:-ms-linear-gradient(top,#62c462,#57a957);background-image:-webkit-gradient(linear,0 0,0 100%,from(#62c462),to(#57a957));background-image:-webkit-linear-gradient(top,#62c462,#57a957);background-image:-o-linear-gradient(top,#62c462,#57a957);background-image:linear-gradient(top,#62c462,#57a957);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462',endColorstr='#57a957',GradientType=0);}.progress-success.progress-striped .bar,.progress-striped .bar-success{background-color:#62c462;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-ms-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);}.progress-info .bar,.progress .bar-info{background-color:#4bb1cf;background-image:-moz-linear-gradient(top,#5bc0de,#339bb9);background-image:-ms-linear-gradient(top,#5bc0de,#339bb9);background-image:-webkit-gradient(linear,0 0,0 100%,from(#5bc0de),to(#339bb9));background-image:-webkit-linear-gradient(top,#5bc0de,#339bb9);background-image:-o-linear-gradient(top,#5bc0de,#339bb9);background-image:linear-gradient(top,#5bc0de,#339bb9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#5bc0de',endColorstr='#339bb9',GradientType=0);}.progress-info.progress-striped .bar,.progress-striped .bar-info{background-color:#5bc0de;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-ms-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);}.progress-warning .bar,.progress .bar-warning{background-color:#faa732;background-image:-moz-linear-gradient(top,#fbb450,#f89406);background-image:-ms-linear-gradient(top,#fbb450,#f89406);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fbb450),to(#f89406));background-image:-webkit-linear-gradient(top,#fbb450,#f89406);background-image:-o-linear-gradient(top,#fbb450,#f89406);background-image:linear-gradient(top,#fbb450,#f89406);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fbb450',endColorstr='#f89406',GradientType=0);}.progress-warning.progress-striped .bar,.progress-striped .bar-warning{background-color:#fbb450;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-ms-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);}.toolbar{height:36px;font-weight:normal;}.toolbar li,.toolbar .toolbar-item{line-height:36px;display:inline-block;*display:inline;*zoom:1;}.toolbar li+li,.toolbar .toolbar-item+.toolbar-item{margin-left:5px;*margin-left:10px;}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #eee;border:1px solid rgba(0,0,0,0.05);-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,0.15);}.well-large{padding:24px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;}.well-small{padding:9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}.well-simple{padding:19px 0;*padding:0;border:none;margin-bottom:20px;}.button-tabs .tab-item,.nav-tabs .tab-item,.link-tabs .tab-item,.button-tabs li,.nav-tabs li,.link-tabs li{display:inline-block;*display:inline;*zoom:1;font-size:12px;cursor:pointer;line-height:18px;color:#333;}.button-tabs{margin-bottom:10px;}.button-tabs .tab-item,.button-tabs li{padding:1px 15px;margin-right:5px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}.button-tabs .tab-item-hover,.button-tabs .tab-item:hover,.button-tabs li:hover{background-color:#dadada;}.button-tabs .tab-item-active,.button-tabs .active{color:#fff;font-weight:bold;background-color:#6c8ffc;background-image:-moz-linear-gradient(top,#6c9dfc,#6c79fc);background-image:-ms-linear-gradient(top,#6c9dfc,#6c79fc);background-image:-webkit-gradient(linear,0 0,0 100%,from(#6c9dfc),to(#6c79fc));background-image:-webkit-linear-gradient(top,#6c9dfc,#6c79fc);background-image:-o-linear-gradient(top,#6c9dfc,#6c79fc);background-image:linear-gradient(top,#6c9dfc,#6c79fc);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#6c9dfc',endColorstr='#6c79fc',GradientType=0);border-color:#6c79fc #6c79fc #2135fa;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);border:1px solid #5984de;}.button-tabs .tab-item-active:hover,.button-tabs .active:hover,.button-tabs .tab-item-active:active,.button-tabs .active:active,.button-tabs .tab-item-active.active,.button-tabs .active.active,.button-tabs .tab-item-active.disabled,.button-tabs .active.disabled{background-color:#6c79fc;}.button-tabs .tab-item-active[disabled],.button-tabs .active[disabled]{background-color:#6c79fc;}.button-tabs .tab-item-active:active,.button-tabs .active:active,.button-tabs .tab-item-active.active,.button-tabs .active.active{background-color:#3a4bfb \9;}.nav-tabs .tab-item{border:1px solid #c3c3d6;}.nav-tabs .tab-item,.nav-tabs li{border-bottom-color:transparent;margin-bottom:-1px;margin-right:3px;}.nav-tabs .tab-item-text,.nav-tabs a{padding:5px 15px;background-color:#eee;position:relative;display:inline-block;*display:inline;*zoom:1;}.nav-tabs a{background-color:transparent;}.nav-tabs .tab-item-active,.nav-tabs .active{background-color:#fff;-webkit-border-radius:3px 3px 0 0;-moz-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0;}.nav-tabs .tab-item-active .tab-item-text,.nav-tabs .active .tab-item-text,.nav-tabs .tab-item-active a,.nav-tabs .active a{background-color:#fff;position:relative;border-bottom:-1px;z-index:10;}.nav-tabs li.active{border:1px solid #c3c3d6;border-bottom-color:transparent;}.link-tabs .tab-item,.link-tabs li{display:inline-block;*display:inline;*zoom:1;padding:3px 5px;}.link-tabs .tab-item a,.link-tabs li a{color:#333;}.link-tabs .tab-item a:hover,.link-tabs li a:hover{color:#36c;}.link-tabs .tab-item-active a,.link-tabs .active a{color:#36c;}.flow-steps{overflow:hidden;padding-bottom:20px;}.flow-steps ol,.flow-steps ul{list-style:none;margin:0;}.flow-steps .num3 li{width:301px;}.flow-steps .num4 li{width:222px;}.flow-steps .num5 li{width:175px;}.flow-steps .num6 li{width:143px;}.flow-steps li{float:left;background:#e8e9ef url("http://img02.taobaocdn.com/tps/i2/T1rPjKXXJrXXXVYvLb-15-188.png") no-repeat 100% 0;height:23px;line-height:23px;text-align:center;color:#666;padding-right:15px;overflow:hidden;}.flow-steps li span{display:block;}.flow-steps li.first{-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;}.flow-steps li.last{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;background-position:-9999px -9999px;}.flow-steps .current{background-color:#36c;background-position:100% 0;color:#fff;}.flow-steps .current-prev{background-color:#e8e9ef;background-position:100% -23px;color:#666;}.flow-steps li.done{background-color:#e8e9ef;background-position:100% -46px;color:#666;}.detail-row{margin-bottom:20px;}.detail-page h2{margin-top:20px;margin-bottom:20px;}.detail-page h3{margin-bottom:20px;}.detail-page .detail-link{margin-left:20px;vertical-align:bottom;}.detail-page .detail-actions{margin-left:10px;}.detail-section-icon{margin-left:10px;display:inline-block;height:15px;width:15px;border:1px solid #adbce2;margin-bottom:-4px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;background-color:#e4ecf6;background-image:-moz-linear-gradient(top,#f4f8f4,#cddaf8);background-image:-ms-linear-gradient(top,#f4f8f4,#cddaf8);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f4f8f4),to(#cddaf8));background-image:-webkit-linear-gradient(top,#f4f8f4,#cddaf8);background-image:-o-linear-gradient(top,#f4f8f4,#cddaf8);background-image:linear-gradient(top,#f4f8f4,#cddaf8);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f4f8f4',endColorstr='#cddaf8',GradientType=0);border-color:#cddaf8 #cddaf8 #8aa8ef;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);cursor:pointer;position:relative;}.detail-section-icon:hover,.detail-section-icon:active,.detail-section-icon.active,.detail-section-icon.disabled{background-color:#cddaf8;}.detail-section-icon[disabled]{background-color:#cddaf8;}.detail-section-icon:active,.detail-section-icon.active{background-color:#a0b9f2 \9;}.detail-section-icon:hover .arrow{border-top-color:#475a85;border-bottom-color:#475a85;}.detail-section-icon .arrow{border:5px solid #5970a6;border-left-color:transparent;border-right-color:transparent;height:0;width:0;display:inline-block;*display:inline;*zoom:1;line-height:0;_border-color:tomato;_filter:chroma(color=#ff6347);position:absolute;top:5px;left:2px;}.detail-section-icon .expand{border-bottom:none;*border-width:4px;border-top-color:#5970a6;}.detail-section-icon .collapse{border-top:none;border-bottom-color:#5970a6;}.pull-right{float:right;}.pull-left{float:left;}.pull-none{float:none;}.hide{display:none;}.show{display:block;}.invisible{visibility:hidden;}.bordered{border:1px solid #c3c3d6;}.bordered-radius{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}.centered{text-align:center;}.tips{padding:12px;border:1px solid;border-color:#e5e5e5;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;background-color:#fafafa;}.tips-small{padding:3px;}.tips-warning{border-color:#ffb2b2;background-color:#fff3f3;}.tips-notice{border-color:#ffcc7f;background-color:#ffffe5;}.tips-info{border-color:#acd5ff;background-color:#e6f2ff;}.tips .x-icon{float:left;}.tips .tips-content{line-height:18px;color:#333;margin-left:31px;}.tips-small .tips-content{margin-left:21px;}.tips-success{border-color:#aae77f;background-color:#f0ffe5;}.tips-no-icon .tips-content{margin-left:3px;}.tips h2{padding:0;line-height:24px;}.tips p{margin:5px 0 0;} \ No newline at end of file diff --git a/源码/src/main/webapp/resource/assets/css/main-min.css b/源码/src/main/webapp/resource/assets/css/main-min.css new file mode 100644 index 0000000..506354f --- /dev/null +++ b/源码/src/main/webapp/resource/assets/css/main-min.css @@ -0,0 +1 @@ +.clearfix{*zoom:1;}.clearfix:before,.clearfix:after{display:table;content:"";}.clearfix:after{clear:both;}.hide-text{overflow:hidden;text-indent:100%;white-space:nowrap;}.input-block-level{display:block;width:100%;min-height:28px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;}.pull-right{float:right;}.pull-left{float:left;}.hide{display:none;}.show{display:block;}.invisible{visibility:hidden;}.ks-inline-block{display:inline-block;*display:inline;*zoom:1;}.ks-ext-mask{background-color:#333;opacity:.5;filter:Alpha(opacity=50);}.ks-clear{*zoom:1;}.ks-clear:before,.ks-clear:after{display:table;content:"";}.ks-clear:after{clear:both;}.ks-hidden{display:none;}html{*overflow:hidden;}body{overflow:hidden;background-color:white;}iframe{border:none;padding:none;}.header,.dl-main-nav{background:url('../img/main-nav-bg.png') repeat-x 0 0 #204077;}.header{background-color:#1B3160;height:30px;width:100%;overflow:hidden;}.dl-title{float:left;color:#c1d5ec;font-family:"Microsoft YaHei";margin-left:12px;font-size:18px;line-height:36px;}.dl-title a{color:#c1d5ec;}.dl-log{color:#C1D5EC;float:right;padding:10px 16px 0 0;}.dl-log-user{font-style:bold;}.dl-log-quit{color:#c1d5ec;padding-left:8px;}.content{width:100%;}.dl-main-nav{height:40px;background-position:center -30px;overflow:hidden;position:relative;}.dl-main-nav .nav-list{border-bottom:1px solid #FFF;overflow:hidden;border-width:0;}.nav-item{overflow:hidden;font-size:14px;color:white;position:relative;width:130px;padding:6px 0 0 8px;cursor:pointer;}.nav-list .nav-item{float:left;color:#D4D4D4;}.nav-item-inner,.dl4-hide-list .dl-hover{background:url('../img/icon1.png') no-repeat 0 0 transparent;}.nav-list .dl-hover{background-position:0x -50px;}.dl4-hide-list .dl-hover{background-position:8px -40px;}.nav-item-inner{padding:4px 0 0 31px;height:30px;border:1px solid transparent;_border:none;}.nav-item-mask{display:none;width:128px;height:25px;position:absolute;background-color:white;top:8px;opacity:.15;filter:alpha(opacity=15);-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;border:1px solid #333;}.dl-hide-list{position:absolute;width:160px;overflow:hidden;z-index:10;border:1px solid #C3C3D6;border-top:none;padding:10px 0 0;background-color:#E8E9EE;}.dl-hide-list .nav-item{float:none;padding:0;width:158px;border:1px solid white;border-width:0 1px;}.dl-hide-list .dl-item-inner{background-color:#E8E9EE;font-size:12px;color:#666;height:23px;margin:0 5px;}.dl-hide-list .nav-item:last-child{-webkit-border-radius:0 0 2px 2px;-moz-border-radius:0 0 2px 4px;border-radius:0 0 2px 2px;padding-bottom:10px;border-bottom:1px solid white;}.dl-hide-list .dl-last{padding-top:6px;background-color:transparent;}.dl-hide-list .dl-last{display:none;}.dl-hide-list .nav-item-inner{background-color:#E8E9EE;font-size:12px;color:#666;height:23px;margin:0 5px;}.dl-hide-list .nav-item:hover .nav-item-inner{background-color:#e0e6fc;border:1px solid #a9b9f5;border-radius:2px;}.nav-list .dl-hover .nav-item-mask,.nav-list .dl-last .nav-item-mask{display:block;}.nav-list .dl-selected .nav-item-inner{-webkit-border-radius:2px 2px 0 0;-moz-border-radius:2px 2px 0 0;border-radius:2px 2px 0 0;border:1px solid #FFF;background-color:#E8E9EE;color:#43478e;font-weight:bold;height:30px;}.nav-list .dl-selected .nav-item-mask{display:none;}.dl4-hide-list .nav-permission,.dl-selected .nav-permission{background-position:4px -124px;}.nav-permission{background-position:4px -174px;}.dl4-hide-list .nav-storage,.dl-selected .nav-storage{background-position:-444px -127px;}.nav-storage{background-position:-444px -176px;}.dl-selected .nav-inventory,.dl4-hide-list .nav-inventory{background-position:-443px -324px;}.nav-inventory{background-position:-444px -375px;}.dl-selected .nav-user,.dl4-hide-list .nav-user{background-position:-144px -224px;}.nav-user{background-position:-144px -274px;}.dl-selected .nav-order,.dl4-hide-list .nav-order{background-position:-144px -126px;}.nav-order{background-position:-144px -176px;}.dl-selected .nav-product,.dl4-hide-list .nav-product{background-position:-444px -427px;}.nav-product{background-position:-444px -477px;}.dl-selected .nav-supplier,.dl4-hide-list .nav-supplier{background-position:-594px -427px;}.nav-supplier{background-position:-594px -476px;}.dl-selected .nav-cost,.dl4-hide-list .nav-cost{background-position:-294px -324px;}.nav-cost{background-position:-294px -374px;}.dl-selected .nav-monitor,.dl4-hide-list .nav-monitor{background-position:-144px -324px;}.nav-monitor{background-position:-144px -374px;}.dl-selected .nav-gather,.dl4-hide-list .nav-gather{background-position:4px -224px;}.nav-gather{background-position:4px -274px;}.dl-selected .nav-distribution,.dl4-hide-list .nav-distribution{background-position:-444px -224px;}.nav-distribution{background-position:-444px -274px;}.dl-selected .nav-goods,.dl4-hide-list .nav-goods{background-position:-594px -124px;}.nav-goods{background-position:-594px -174px;}.dl-selected .nav-register,.dl4-hide-list .nav-register{background-position:-594px -224px;}.nav-register{background-position:-594px -274px;}.dl-selected .nav-marketing,.dl4-hide-list .nav-marketing{background-position:4px -324px;}.nav-marketing{background-position:4px -374px;}.dl-selected .nav-package,.dl4-hide-list .nav-package{background-position:-594px -324px;}.nav-package{background-position:-594px -374px;}.dl-selected .nav-home,.dl4-hide-list .nav-home{background-position:4px -424px;}.nav-home{background-position:4px -474px;}.dl-selected .nav-product-certified,.dl4-hide-list .nav-product-certified{background-position:4px -524px;}.nav-product-certified{background-position:4px -574px;}.dl-selected .nav-quality-certified,.dl4-hide-list .nav-quality-certified{background-position:-144px -524px;}.nav-quality-certified{background-position:-144px -574px;}.dl-selected .nav-supplier-certified,.dl4-hide-list .nav-supplier-certified{background-position:-294px -524px;}.nav-supplier-certified{background-position:-294px -574px;}.dl-selected .nav-certification,.dl4-hide-list .nav-certification{background-position:-444px -524px;}.nav-certification{background-position:-444px -574px;}.dl-selected .nav-sample,.dl4-hide-list .nav-sample{background-position:-594px -524px;}.nav-sample{background-position:-594px -575px;}.dl-selected .nav-supplychain,.dl4-hide-list .nav-supplychain{background-position:-747px -125px;}.nav-supplychain{background-position:-747px -178px;}.dl-inform{width:135px;float:right;padding-top:10px;cursor:pointer;display:none;}.dl-hide-current{margin-left:5px;}.dl-selected .dl-hide-current{background-image:url('../img/icon2.png');}.dl-tab-content{width:100%;height:100%;}.dl-tab-item{width:100%;}.dl-tab-item-inner{width:100%;height:430px;}.dl-second-nav,.dl-second-tree,.dl-inner-tab{height:100%;}.dl-second-tree{width:150px;float:left;}.dl-second-nav{float:left;width:150px;position:relative;padding-top:5px;background-color:#E8E9EE;}.dl-inner-tab .dl-tab-nav{background-color:#E8E9EE;}.dl-second-nav .menu-container{background-color:transparent;}.dl-collapse .dl-second-nav{width:10px;}.dl-collapse .dl-second-tree{width:3px;}.dl-collapse .menu-container{display:none;}.dl-inner-tab{margin-left:150px;}.dl-collapse .dl-inner-tab{margin-left:10px;}.dl-second-slib-con{position:absolute;top:0;right:-6px;height:100%;width:7px;overflow:hidden;}.dl-second-slib{position:absolute;height:100%;width:6px;cursor:pointer;top:25px;border-left:1px solid #C3C3D6;border-radius:2px;background:url('../img/left-slib.gif') no-repeat 0 center transparent;}.dl-collapse .dl-second-slib{background-position:-6px center;}.dl-inner-tab .bui-nav-tab{padding-top:5px;}.dl-inner-tab .bui-nav-tab,.dl-inner-tab .tab-nav-inner{background-color:#E8E9EE;}.dl-inner-tab .tab-content-container{background-color:#fff;} diff --git a/源码/src/main/webapp/resource/assets/css/main.css b/源码/src/main/webapp/resource/assets/css/main.css new file mode 100644 index 0000000..7eb3724 --- /dev/null +++ b/源码/src/main/webapp/resource/assets/css/main.css @@ -0,0 +1,524 @@ +.clearfix { + *zoom: 1; +} +.clearfix:before, +.clearfix:after { + display: table; + content: ""; +} +.clearfix:after { + clear: both; +} +.hide-text { + overflow: hidden; + text-indent: 100%; + white-space: nowrap; +} +.input-block-level { + display: block; + width: 100%; + min-height: 28px; + /* Make inputs at least the height of their button counterpart */ + + /* Makes inputs behave like true block-level elements */ + + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + -ms-box-sizing: border-box; + box-sizing: border-box; +} +.pull-right { + float: right; +} +.pull-left { + float: left; +} +.hide { + display: none; +} +.show { + display: block; +} +.invisible { + visibility: hidden; +} +/* inline block */ +.ks-inline-block { + display: inline-block; + *display: inline; + *zoom: 1; +} +.ks-ext-mask { + background-color: #333333; + opacity: 0.5; + filter:Alpha(opacity=50); +} +.ks-clear { + *zoom: 1; +} +.ks-clear:before, +.ks-clear:after { + display: table; + content: ""; +} +.ks-clear:after { + clear: both; +} +.ks-hidden { + display: none; +} +html { + *overflow: hidden; +} +body { + overflow: hidden; + background-color: white; +} +iframe { + border: none; + padding: none; +} +.header,.dl-main-nav{ + background: url('../img/main-nav-bg.png') repeat-x 0 0 #204077; +} +.header { + background-color: #1B3160; + height: 30px; + width: 100%; + overflow: hidden; +} +.dl-title { + float: left; + color: #c1d5ec; + font-family: "Microsoft YaHei"; + margin-left: 12px; + font-size: 18px; + line-height: 36px; +} +.dl-title a{ + color:#c1d5ec; +} +.dl-log { + color: #C1D5EC; + float: right; + padding: 10px 16px 0 0; +} +.dl-log-user { + font-style: bold; +} +.dl-log-quit { + color: #c1d5ec; + padding-left: 8px; +} +.content { + width: 100%; +} +.dl-main-nav { + height: 40px; + background-position: center -30px; + overflow: hidden; + position: relative; +} +.dl-main-nav .nav-list { + border-bottom: 1px solid #FFF; + overflow: hidden; + border-width: 0; +} +.nav-item { + overflow: hidden; + font-size: 14px; + color: white; + position: relative; + width: 130px; + padding: 6px 0 0 8px; + cursor: pointer; +} +.nav-list .nav-item { + float: left; + color: #D4D4D4; +} + +.nav-item-inner,.dl4-hide-list .dl-hover{ + background:url('../img/icon1.png') no-repeat 0 0 transparent; +} + +.nav-list .dl-hover{ + background-position:0x -50px; +} +.dl4-hide-list .dl-hover{ + background-position:8px -40px; +} + +.nav-item-inner{ + padding: 4px 0 0 31px; + height: 30px; + border:1px solid transparent; + _border:none; +} + +.nav-item-mask { + display: none; + width: 128px; + height: 25px; + position: absolute; + background-color: white; + top: 8px; + opacity: .15; + filter: alpha(opacity=15); + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + border-radius: 2px; + border: 1px solid #333; +} +.dl-hide-list { + position:absolute; + width: 160px; + overflow: hidden; + z-index:10; + border:1px solid #C3C3D6; + border-top:none; + padding:10px 0 0; + background-color:#E8E9EE; +} +.dl-hide-list .nav-item { + float:none; + padding:0; + width:158px; + + border: 1px solid white; + border-width: 0 1px; +} + +.dl-hide-list .dl-item-inner{ + background-color:#E8E9EE; + font-size:12px; + color:#666; + height:23px; + margin: 0 5px; +} + +.dl-hide-list .nav-item:last-child{ + -webkit-border-radius: 0 0 2px 2px ; + -moz-border-radius: 0 0 2px 4px; + border-radius: 0 0 2px 2px; + padding-bottom:10px; + border-bottom: 1px solid white; +} +.dl-hide-list .dl-last{ + padding-top:6px; + background-color:transparent; + +} + +.dl-hide-list .dl-last{ + display:none; +} +.dl-hide-list .nav-item-inner{ + background-color: #E8E9EE; + font-size: 12px; + color: #666; + height: 23px; + margin: 0 5px; +} + +.dl-hide-list .nav-item:hover .nav-item-inner{ + background-color: #e0e6fc; + border: 1px solid #a9b9f5; + border-radius: 2px; +} + +.nav-list .dl-hover .nav-item-mask,.nav-list .dl-last .nav-item-mask{ + display:block; +} +.nav-list .dl-selected .nav-item-inner{ + -webkit-border-radius: 2px 2px 0 0; + -moz-border-radius: 2px 2px 0 0; + border-radius: 2px 2px 0 0; + border:1px solid #FFF; + background-color:#E8E9EE; + color:#43478e; + font-weight:bold; + height:30px; +} + +.nav-list .dl-selected .nav-item-mask{ + display:none; +} +/**一级类目**/ + +/** 权限 **/ +.dl4-hide-list .nav-permission,.dl-selected .nav-permission{ + background-position:4px -124px; +} + +.nav-permission{ + background-position:4px -174px; +} + +/**仓库**/ +.dl4-hide-list .nav-storage,.dl-selected .nav-storage{ + background-position:-444px -127px; +} +.nav-storage{ + background-position:-444px -176px; +} + +/**库存**/ +.dl-selected .nav-inventory,.dl4-hide-list .nav-inventory{ + background-position:-443px -324px; +} +.nav-inventory{ + background-position:-444px -375px; +} + +/**用户**/ +.dl-selected .nav-user,.dl4-hide-list .nav-user{ + background-position:-144px -224px; +} +.nav-user{ + background-position:-144px -274px; +} + + +/**订单**/ +.dl-selected .nav-order,.dl4-hide-list .nav-order{ + background-position:-144px -126px; +} +.nav-order{ + background-position:-144px -176px; +} + +/**商品**/ +.dl-selected .nav-product,.dl4-hide-list .nav-product{ + background-position:-444px -427px; +} +.nav-product{ + background-position:-444px -477px; +} +/**供应商,商家**/ +.dl-selected .nav-supplier, .dl4-hide-list .nav-supplier{ + background-position:-594px -427px; +} +.nav-supplier{ + background-position:-594px -476px; +} + +/**费用**/ +.dl-selected .nav-cost,.dl4-hide-list .nav-cost{ + background-position:-294px -324px; +} +.nav-cost{ + background-position:-294px -374px; +} + +/**监控**/ +.dl-selected .nav-monitor,.dl4-hide-list .nav-monitor{ + background-position:-144px -324px; +} +.nav-monitor{ + background-position:-144px -374px; +} +/**聚划算**/ +.dl-selected .nav-gather,.dl4-hide-list .nav-gather{ + background-position:4px -224px; +} +.nav-gather{ + background-position:4px -274px; +} +/**铺货**/ +.dl-selected .nav-distribution,.dl4-hide-list .nav-distribution{ + background-position:-444px -224px; +} +.nav-distribution{ + background-position:-444px -274px; +} + +/**货品**/ +.dl-selected .nav-goods,.dl4-hide-list .nav-goods{ + background-position:-594px -124px; +} + +.nav-goods{ + background-position:-594px -174px; +} + +/**报名**/ +.dl-selected .nav-register,.dl4-hide-list .nav-register{ + background-position:-594px -224px; +} +.nav-register{ + background-position:-594px -274px; +} + +/**营销看板**/ +.dl-selected .nav-marketing,.dl4-hide-list .nav-marketing{ + background-position:4px -324px; +} +.nav-marketing{ + background-position:4px -374px; +} + +/**包裹**/ +.dl-selected .nav-package,.dl4-hide-list .nav-package{ + background-position:-594px -324px; +} +.nav-package{ + background-position:-594px -374px; +} + +/**首页**/ +.dl-selected .nav-home,.dl4-hide-list .nav-home{ + background-position:4px -424px; +} +.nav-home{ + background-position:4px -474px; +} + +/**商品认证**/ +.dl-selected .nav-product-certified,.dl4-hide-list .nav-product-certified{ + background-position:4px -524px; +} +.nav-product-certified{ + background-position:4px -574px; +} + +/**QC认证**/ +.dl-selected .nav-quality-certified,.dl4-hide-list .nav-quality-certified{ + background-position:-144px -524px; +} +.nav-quality-certified{ + background-position:-144px -574px; +} + +/**商家认证**/ +.dl-selected .nav-supplier-certified,.dl4-hide-list .nav-supplier-certified{ + background-position:-294px -524px; +} +.nav-supplier-certified{ + background-position:-294px -574px; +} + +/**认证公司**/ +.dl-selected .nav-certification,.dl4-hide-list .nav-certification{ + background-position:-444px -524px; +} +.nav-certification{ + background-position:-444px -574px; +} + +/**样品**/ +.dl-selected .nav-sample,.dl4-hide-list .nav-sample{ + background-position:-594px -524px; +} +.nav-sample{ + background-position:-594px -575px; +} + +/**供应链**/ +.dl-selected .nav-supplychain,.dl4-hide-list .nav-supplychain{ + background-position:-747px -125px; +} +.nav-supplychain{ + background-position:-747px -178px; +} +.dl-inform { + width: 135px; + float: right; + padding-top: 10px; + cursor: pointer; + display: none; +} + +.dl-hide-current { + margin-left:5px; +} + +.dl-selected .dl-hide-current { + background-image: url('../img/icon2.png'); +} + +.dl-tab-content { + width: 100%; + height: 100%; +} +.dl-tab-item { + width: 100%; +} +.dl-tab-item-inner { + width: 100%; + height: 430px; +} +.dl-second-nav, +.dl-second-tree, +.dl-inner-tab { + height: 100%; +} +.dl-second-tree { + width: 150px; + float: left; +} +.dl-second-nav { + float: left; + width: 150px; + position:relative; + padding-top: 5px; + background-color:#E8E9EE; +} +.dl-inner-tab .dl-tab-nav { + background-color: #E8E9EE; +} +.dl-second-nav .menu-container{ + background-color:transparent; +} + +.dl-collapse .dl-second-nav { + width: 10px; +} +.dl-collapse .dl-second-tree { + width: 3px; +} +.dl-collapse .menu-container { + display: none; +} +.dl-inner-tab { + margin-left: 150px; + +} +.dl-collapse .dl-inner-tab { + margin-left: 10px; +} + +.dl-second-slib-con { + position: absolute; + top: 0; + right: -6px; + height: 100%; + width: 7px; + overflow: hidden; +} + +/** tab 样式 **/ +.dl-second-slib { + position: absolute; + height: 100%; + width: 6px; + cursor: pointer; + top: 25px; + border-left: 1px solid #C3C3D6; + border-radius: 2px; + background: url('../img/left-slib.gif') no-repeat 0 center transparent; +} +.dl-collapse .dl-second-slib { + background-position: -6px center; +} + +.dl-inner-tab .bui-nav-tab{ + padding-top:5px; +} +.dl-inner-tab .bui-nav-tab,.dl-inner-tab .tab-nav-inner{ + background-color: #E8E9EE; +} + +.dl-inner-tab .tab-content-container{ + background-color: #fff; +} \ No newline at end of file diff --git a/源码/src/main/webapp/resource/assets/css/page-min.css b/源码/src/main/webapp/resource/assets/css/page-min.css new file mode 100644 index 0000000..b08fa3f --- /dev/null +++ b/源码/src/main/webapp/resource/assets/css/page-min.css @@ -0,0 +1 @@ +.container{margin-left:0;margin-top:0;width:auto;padding:20px 20px 0 20px;}.detail-page,.form-page,.search-page{padding:0;} diff --git a/源码/src/main/webapp/resource/assets/css/page.css b/源码/src/main/webapp/resource/assets/css/page.css new file mode 100644 index 0000000..8920c77 --- /dev/null +++ b/源码/src/main/webapp/resource/assets/css/page.css @@ -0,0 +1,13 @@ + +.container { + margin-left: 0px; + margin-top: 0px; + width: auto; + padding: 20px 20px 0px 20px; +} + +.detail-page,.form-page,.search-page{ + padding:0; +} + + diff --git a/源码/src/main/webapp/resource/assets/css/prettify.css b/源码/src/main/webapp/resource/assets/css/prettify.css new file mode 100644 index 0000000..e430a4c --- /dev/null +++ b/源码/src/main/webapp/resource/assets/css/prettify.css @@ -0,0 +1,31 @@ +.com { color: #93a1a1; } +.lit { color: #195f91; } +.pun, .opn, .clo { color: #93a1a1; } +.fun { color: #dc322f; } +.str, .atv { color: #D14; } +.kwd, .linenums .tag { color: #1e347b; } +.typ, .atn, .dec, .var { color: teal; } +.pln { color: #48484c; } + +.prettyprint { + padding: 8px; + background-color: #f7f7f9; + border: 1px solid #e1e1e8; + margin-top:8px; +} +.prettyprint.linenums { + -webkit-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0; + -moz-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0; + box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0; +} + +/* Specify class=linenums on a pre to get line numbering */ +ol.linenums { + margin: 0 0 0 33px; /* IE indents via margin-left */ +} +ol.linenums li { + padding-left: 12px; + color: #bebec5; + line-height: 18px; + text-shadow: 0 1px 0 #fff; +} \ No newline at end of file diff --git a/源码/src/main/webapp/resource/assets/img/hide_list.png b/源码/src/main/webapp/resource/assets/img/hide_list.png new file mode 100644 index 0000000..2ee48bf Binary files /dev/null and b/源码/src/main/webapp/resource/assets/img/hide_list.png differ diff --git a/源码/src/main/webapp/resource/assets/img/icon1.png b/源码/src/main/webapp/resource/assets/img/icon1.png new file mode 100644 index 0000000..2e602b0 Binary files /dev/null and b/源码/src/main/webapp/resource/assets/img/icon1.png differ diff --git a/源码/src/main/webapp/resource/assets/img/icon2.png b/源码/src/main/webapp/resource/assets/img/icon2.png new file mode 100644 index 0000000..67e8e3a Binary files /dev/null and b/源码/src/main/webapp/resource/assets/img/icon2.png differ diff --git a/源码/src/main/webapp/resource/assets/img/left-slib.gif b/源码/src/main/webapp/resource/assets/img/left-slib.gif new file mode 100644 index 0000000..1f2dee1 Binary files /dev/null and b/源码/src/main/webapp/resource/assets/img/left-slib.gif differ diff --git a/源码/src/main/webapp/resource/assets/img/main-nav-bg.png b/源码/src/main/webapp/resource/assets/img/main-nav-bg.png new file mode 100644 index 0000000..1a2bcf7 Binary files /dev/null and b/源码/src/main/webapp/resource/assets/img/main-nav-bg.png differ diff --git a/源码/src/main/webapp/resource/assets/img/main-nav-bg1.png b/源码/src/main/webapp/resource/assets/img/main-nav-bg1.png new file mode 100644 index 0000000..f17d0c1 Binary files /dev/null and b/源码/src/main/webapp/resource/assets/img/main-nav-bg1.png differ diff --git a/源码/src/main/webapp/resource/assets/img/main-nav-bg2.png b/源码/src/main/webapp/resource/assets/img/main-nav-bg2.png new file mode 100644 index 0000000..f381fe8 Binary files /dev/null and b/源码/src/main/webapp/resource/assets/img/main-nav-bg2.png differ diff --git a/源码/src/main/webapp/resource/assets/img/menu.jpg b/源码/src/main/webapp/resource/assets/img/menu.jpg new file mode 100644 index 0000000..b371e21 Binary files /dev/null and b/源码/src/main/webapp/resource/assets/img/menu.jpg differ diff --git a/源码/src/main/webapp/resource/assets/img/nav.jpg b/源码/src/main/webapp/resource/assets/img/nav.jpg new file mode 100644 index 0000000..4730696 Binary files /dev/null and b/源码/src/main/webapp/resource/assets/img/nav.jpg differ diff --git a/源码/src/main/webapp/resource/assets/img/nav_selected.png b/源码/src/main/webapp/resource/assets/img/nav_selected.png new file mode 100644 index 0000000..456b4a7 Binary files /dev/null and b/源码/src/main/webapp/resource/assets/img/nav_selected.png differ diff --git a/源码/src/main/webapp/resource/assets/img/resource.jpg b/源码/src/main/webapp/resource/assets/img/resource.jpg new file mode 100644 index 0000000..30d3382 Binary files /dev/null and b/源码/src/main/webapp/resource/assets/img/resource.jpg differ diff --git a/源码/src/main/webapp/resource/assets/img/top.png b/源码/src/main/webapp/resource/assets/img/top.png new file mode 100644 index 0000000..1f78b96 Binary files /dev/null and b/源码/src/main/webapp/resource/assets/img/top.png differ diff --git a/源码/src/main/webapp/resource/assets/js/bui-min.js b/源码/src/main/webapp/resource/assets/js/bui-min.js new file mode 100644 index 0000000..e77dc9b --- /dev/null +++ b/源码/src/main/webapp/resource/assets/js/bui-min.js @@ -0,0 +1,13 @@ +/** + * @preserve SeaJS - A Module Loader for the Web + * v1.3.0 | seajs.org | MIT Licensed + *//** + * Base namespace for the framework. + */this.seajs={_seajs:this.seajs},seajs.version="1.3.0",seajs._util={},seajs._config={debug:"%DEBUG%",preload:[]},function(e){var t=Object.prototype.toString,n=Array.prototype;e.isString=function(e){return t.call(e)==="[object String]"},e.isFunction=function(e){return t.call(e)==="[object Function]"},e.isRegExp=function(e){return t.call(e)==="[object RegExp]"},e.isObject=function(e){return e===Object(e)},e.isArray=Array.isArray||function(e){return t.call(e)==="[object Array]"},e.indexOf=n.indexOf?function(e,t){return e.indexOf(t)}:function(e,t){for(var n=0;n0&&(e=e.replace(":80/","/")),e)}function l(e){if(e.charAt(0)==="#")return e.substring(1);var n=t.alias;if(n&&y(e)){var r=e.split("/"),i=r[0];n.hasOwnProperty(i)&&(r[0]=n[i],e=r.join("/"))}return e}function h(n){var r=t.map||[];if(!r.length)return n;var i=n;for(var s=0;s-1||e.isRegExp(f)&&f.test(i))i=i.replace(f,o[1])}else e.isFunction(o)&&(i=o(i))}return v(i)||(i=a(u(E)+i)),i!==n&&(c[i]=n),i}function p(e){return c[e]||e}function d(e,n){if(!e)return"";e=l(e),n||(n=E);var r;return v(e)?r=e:m(e)?(e.indexOf("./")===0&&(e=e.substring(2)),r=u(n)+e):g(e)?r=n.match(o)[1]+e:r=t.base+"/"+e,f(r)}function v(e){return e.indexOf("://")>0||e.indexOf("//")===0}function m(e){return e.indexOf("./")===0||e.indexOf("../")===0}function g(e){return e.charAt(0)==="/"&&e.charAt(1)!=="/"}function y(e){var t=e.charAt(0);return e.indexOf("://")===-1&&t!=="."&&t!=="/"}function b(e){return e.charAt(0)!=="/"&&(e="/"+e),e}var r=/.*(?=\/.*$)/,i=/([^:\/])\/\/+/g,s=/\.(?:css|js)$/,o=/^(.*?\w)(?:\/|$)/,c={},w=n.location,E=w.protocol+"//"+w.host+b(w.pathname);E.indexOf("\\")>0&&(E=E.replace(/\\/g,"/")),e.dirname=u,e.realpath=a,e.normalize=f,e.parseAlias=l,e.parseMap=h,e.unParseMap=p,e.id2Uri=d,e.isAbsolute=v,e.isRoot=g,e.isTopLevel=y,e.pageUri=E}(seajs._util,seajs._config,this),function(e,t){function f(e,t){e.nodeName==="SCRIPT"?l(e,t):c(e,t)}function l(e,n){e.onload=e.onerror=e.onreadystatechange=function(){o.test(e.readyState)&&(e.onload=e.onerror=e.onreadystatechange=null,e.parentNode&&!t.debug&&r.removeChild(e),e=undefined,n())}}function c(t,n){v||m?(e.log("Start poll to fetch css"),setTimeout(function(){h(t,n)},1)):t.onload=t.onerror=function(){t.onload=t.onerror=null,t=undefined,n()}}function h(e,t){var n;if(v)e.sheet&&(n=!0);else if(e.sheet)try{e.sheet.cssRules&&(n=!0)}catch(r){r.name==="NS_ERROR_DOM_SECURITY_ERR"&&(n=!0)}setTimeout(function(){n?t():h(e,t)},1)}function p(){}var n=document,r=n.head||n.getElementsByTagName("head")[0]||n.documentElement,i=r.getElementsByTagName("base")[0],s=/\.css(?:\?|$)/i,o=/loaded|complete|undefined/,u,a;e.fetch=function(t,n,o){var a=s.test(t),l=document.createElement(a?"link":"script");if(o){var c=e.isFunction(o)?o(t):o;c&&(l.charset=c)}f(l,n||p),a?(l.rel="stylesheet",l.href=t):(l.async="async",l.src=t),u=l,i?r.insertBefore(l,i):r.appendChild(l),u=null},e.getCurrentScript=function(){if(u)return u;if(a&&a.readyState==="interactive")return a;var e=r.getElementsByTagName("script");for(var t=0;t0&&!("onload"in document.createElement("link"))}(seajs._util,seajs._config,this),function(e){function n(e){return e.replace(/^\s*\/\*[\s\S]*?\*\/\s*$/mg,"").replace(/^\s*\/\/.*$/mg,"")}var t=/(?:^|[^.$])\brequire\s*\(\s*(["'])([^"'\s\)]+)\1\s*\)/g;e.parseDependencies=function(r){var i=[],s;r=n(r),t.lastIndex=0;while(s=t.exec(r))s[2]&&i.push(s[2]);return e.unique(i)}}(seajs._util),function(e,t,n){function u(e,t){this.uri=e,this.status=t||0}function d(e,n){return t.isString(e)?u._resolve(e,n):t.map(e,function(e){return d(e,n)})}function v(e,i){var s=t.parseMap(e);if(f[s]){r[e]=r[s],i();return}if(a[s]){l[s].push(i);return}a[s]=!0,l[s]=[i],u._fetch(s,function(){f[s]=!0;var n=r[e];n.status===o.FETCHING&&(n.status=o.FETCHED),c&&(u._save(e,c),c=null),h&&n.status===o.FETCHED&&(r[e]=h,h.realUri=e),h=null,a[s]&&delete a[s];var i=l[s];i&&(delete l[s],t.forEach(i,function(e){e()}))},n.charset)}function m(e,n){var i=r[e]||(r[e]=new u(e));return i.status "),n)}function x(e,n){var r=e.concat(n);return r.length>t.unique(r).length}function T(e){var t=n.preload.slice();n.preload=[],t.length?N._use(t,e):e()}var r={},i={},s=[],o={FETCHING:1,FETCHED:2,SAVED:3,READY:4,COMPILING:5,COMPILED:6};u.prototype._use=function(e,n){t.isString(e)&&(e=[e]);var i=d(e,this.uri);this._load(i,function(){T(function(){var e=t.map(i,function(e){return e?r[e]._compile():null});n&&n.apply(null,e)})})},u.prototype._load=function(e,n){function l(e){(e||{}).status=o.SAVED){var n=w(t);n.length?u.prototype._load(n,function(){l(t)}):l(t)}else l()}var t=r[e]||(r[e]=new u(e,o.FETCHING));t.status>=o.FETCHED?n():v(e,n)})(i[f])},u.prototype._compile=function(){function n(t){var n=d(t,e.uri),i=r[n];return i?i.status===o.COMPILING?i.exports:(i.parent=e,i._compile()):null}var e=this;if(e.status===o.COMPILED)return e.exports;if(e.status-1||t.isRegExp(e)&&e.test(i)){var s=r[i];s.exports&&n.push(s.exports)}}),n},u._modify=function(t,n){var s=d(t),u=r[s];return u&&u.status===o.COMPILED?g(n,u):(i[s]||(i[s]=[]),i[s].push(n)),e},u.STATUS=o,u._resolve=t.id2Uri,u._fetch=t.fetch,u._save=m;var a={},f={},l={},c=null,h=null,p=[],N=new u(t.pageUri,o.COMPILED);e.use=function(t,n){return T(function(){N._use(t,n)}),e},e.define=u._define,e.cache=u.cache=r,e.find=u._find,e.modify=u._modify,u.fetchedList=f,e.pluginSDK={Module:u,util:t,config:n}}(seajs,seajs._util,seajs._config),function(e,t,n){function l(){n.debug&&(e.debug=!!n.debug)}function c(e){if(e.indexOf("??")===-1)return e;var n=e.split("??"),r=n[0],i=t.filter(n[1].split(","),function(e){return e.indexOf("sea.js")!==-1});return r+i[0]}function h(e,n,r){e&&e!==n&&t.log("The alias config is conflicted:","key =",'"'+r+'"',"previous =",'"'+e+'"',"current =",'"'+n+'"',"warn")}var r="seajs-ts=",i=r+t.now(),s=document.getElementById("seajsnode");if(!s){var o=document.getElementsByTagName("script");s=o[o.length-1]}var u=s&&t.getScriptAbsoluteSrc(s)||t.pageUri,a=t.dirname(c(u));t.loaderDir=a;var f=a.match(/^(.+\/)seajs\/[\.\d]+(?:-dev)?\/$/);f&&(a=f[1]),n.base=a,n.main=s&&s.getAttribute("data-main"),n.charset="utf-8",e.config=function(s){for(var o in s){if(!s.hasOwnProperty(o))continue;var u=n[o],a=s[o];if(u&&o==="alias"){for(var f in a)if(a.hasOwnProperty(f)){var c=u[f],p=a[f];/^\d+\.\d+\.\d+$/.test(p)&&(p=f+"/"+p+"/"+f),h(c,p,f),u[f]=p}}else!u||o!=="map"&&o!=="preload"?n[o]=a:(t.isString(a)&&(a=[a]),t.forEach(a,function(e){e&&u.push(e)}))}var d=n.base;return d&&!t.isAbsolute(d)&&(n.base=t.id2Uri((t.isRoot(d)?"":"./")+d+"/")),n.debug===2&&(n.debug=1,e.config({map:[[/^.*$/,function(e){return e.indexOf(r)===-1&&(e+=(e.indexOf("?")===-1?"?":"&")+i),e}]]})),l(),this},l()}(seajs,seajs._util,seajs._config),function(e,t,n){function r(){var e=[],r=n.location.search;return r=r.replace(/(seajs-\w+)(&|$)/g,"$1=1$2"),r+=" "+document.cookie,r.replace(/seajs-(\w+)=[1-9]/g,function(t,n){e.push(n)}),t.unique(e)}e.log=t.log,e.importStyle=t.importStyle,e.config({alias:{seajs:t.loaderDir}}),t.forEach(r(),function(t){e.use("seajs/plugin-"+t),t==="debug"&&(e._use=e.use,e._useArgs=[],e.use=function(){return e._useArgs.push(arguments),e})})}(seajs,seajs._util,this),function(e,t,n){var r=e._seajs;if(r&&!r.args){n.seajs=e._seajs;return}n.define=e.define,t.main&&e.use(t.main),function(t){if(t){var n={0:"config",1:"use",2:"define"};for(var r=0;ro+r?!1:ns+i?!1:!0},isInVerticalView:function(e){var t=BUI.viewportHeight(),n=BUI.scrollTop();return en+t?!1:!0},isInHorizontalView:function(e){var t=BUI.viewportWidth(),n=BUI.scrollLeft();return en+t?!1:!0},viewportWidth:function(){return $(window).width()},viewportHeight:function(){return $(window).height()},scrollLeft:function(){return $(window).scrollLeft()},scrollTop:function(){return $(window).scrollTop()},docWidth:function(){var e=document.documentElement||document.body;return $(e).width()},docHeight:function(){var e=document.documentElement||document.body;return $(e).height()},each:function(e,t){if(!e)return;$.each(e,function(e,n){return t(n,e)})},wrapBehavior:function(e,t){return e["__bui_wrap_"+t]=function(n){e.get("disabled")||e[t](n)}},getWrapBehavior:function(e,t){return e["__bui_wrap_"+t]}});var u=BUI.FormHelper={serializeToObject:function(e){var t=$(e).serializeArray(),n={};return BUI.each(t,function(e){var t=e.name;n[t]?(BUI.isArray(n[t])||(n[t]=[n[t]]),n[t].push(e.value)):n[t]=e.value}),n},setFields:function(e,t){for(var n in t)t.hasOwnProperty(n)&&BUI.FormHelper.setField(e,n,t[n])},clear:function(e){var t=$.makeArray(e.elements);BUI.each(t,function(e){e.type==="checkbox"||e.type==="radio"?$(e).attr("checked",!1):$(e).val(""),$(e).change()})},setField:function(e,t,n){var r=e.elements[t];BUI.isArray(r)?BUI.each(r,function(e){e.type==="checkbox"?(e.value===n||BUI.Array.indexOf(e.value,n)!==-1)&&$(e).attr("checked",!0):e.type==="radio"&&e.value===n?$(e).attr("checked",!0):$(e).val(n)}):$(r).val(n)},getField:function(e,t){return BUI.FormHelper.serializeToObject(e)[t]}};return BUI}),define("bui/array",["bui/util"],function(e){var t=e("bui/util");return t.Array={peek:function(e){return e[e.length-1]},indexOf:function(e,t,n){var r=n==null?0:n<0?Math.max(0,t.length+n):n;for(var i=r;i=0},each:t.each,equals:function(e,t){if(e==t)return!0;if(!e||!t)return!1;if(e.length!=t.length)return!1;var n=!0;for(var r=0;r=0;t--)delete e[t];e.length=0},remove:function(e,n){var r=t.Array.indexOf(n,e),i;return(i=r>=0)&&t.Array.removeAt(e,r),i},removeAt:function(e,n){return t.Array.splice(e,n,1).length==1},slice:function(e,t,n){return arguments.length<=2?Array.prototype.slice.call(e,t):Array.prototype.slice.call(e,t,n)},splice:function(e,n,r,i){return Array.prototype.splice.apply(e,t.Array.slice(arguments,1))}},t.Array}),define("bui/observable",["bui/util"],function(e){function r(){return new n}var t=e("bui/util"),n=function(){this._init()};t.augment(n,{_functions:null,_init:function(){var e=this;e._functions=[]},add:function(e){this._functions.push(e)},remove:function(e){var n=this._functions;index=t.Array.indexOf(e,n),index>=0&&n.splice(index,1)},empty:function(){var e=this._functions.length;this._functions.splice(0,e)},fireWith:function(e,n){var r=this,i;return t.each(r._functions,function(t){i=t.apply(e,n);if(i===!1)return!1}),i}});var i=function(e){this._events=[],this._eventMap={},this._bubblesEvents=[],this._initEvents(e)};return t.augment(i,{_events:[],_eventMap:{},_bubblesEvents:[],_bubbleTarget:null,_getCallbacks:function(e){var t=this,n=t._eventMap;return n[e]},_initEvents:function(e){var t=this,n=null;if(!e)return;n=e.listeners||{},e.handler&&(n.click=e.handler);if(n)for(var r in n)n.hasOwnProperty(r)&&t.on(r,n[r])},_isBubbles:function(e){return t.Array.indexOf(e,this._bubblesEvents)>=0},addTarget:function(e){this._bubbleTarget=e},addEvents:function(e){function o(e){t.Array.indexOf(e,i)===-1&&(s[e]=r(),i.push(e))}var n=this,i=n._events,s=n._eventMap;t.isArray(e)?$.each(e,function(e,t){o(t)}):o(e)},clearListeners:function(){var e=this,t=e._eventMap;for(var n in t)t.hasOwnProperty(n)&&t[n].empty()},fire:function(e,t){var n=this,r=n._getCallbacks(e),i=$.makeArray(arguments),s;t||(t={},i.push(t)),t.target||(t.target=n),r&&(s=r.fireWith(n,Array.prototype.slice.call(i,1)));if(n._isBubbles(e)){var o=n._bubbleTarget;o&&o.fire&&o.fire(e,t)}return s},on:function(e,n){var r=e.split(" "),i=this,s=null;return r.length>1?t.each(r,function(e){i.on(e,n)}):(s=i._getCallbacks(e),s?s.add(n):(i.addEvents(e),i.on(e,n))),i},off:function(e,t){if(!e&&!t)return this.clearListeners(),this;var n=this,r=n._getCallbacks(e);return r&&r.remove(t),n},publish:function(e,n){var r=this,i=r._bubblesEvents;if(n.bubbles)t.Array.indexOf(e,i)===-1&&i.push(e);else{var s=t.Array.indexOf(e,i);s!==-1&&i.splice(s,1)}}}),i}),define("bui/ua",function(){function e(e){var t=0;return parseFloat(e.replace(/\./g,function(){return t++===0?".":""}))}var t=$.UA||function(){var t=$.browser,n=e(t.version),r={ie:t.msie&&n,webkit:t.webkit&&n,opera:t.opera&&n,mozilla:t.mozilla&&n};return r}();return t}),define("bui/json",["bui/ua"],function(e){function i(e){return e<10?"0"+e:e}function c(e){return o.lastIndex=0,o.test(e)?'"'+e.replace(o,function(e){var t=f[e];return typeof t=="string"?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function h(e,t){var n,r,i,s,o=u,f,p=t[e];p&&typeof p=="object"&&typeof p.toJSON=="function"&&(p=p.toJSON(e)),typeof l=="function"&&(p=l.call(t,e,p));switch(typeof p){case"string":return c(p);case"number":return isFinite(p)?String(p):"null";case"boolean":case"null":return String(p);case"object":if(!p)return"null";u+=a,f=[];if(Object.prototype.toString.apply(p)==="[object Array]"){s=p.length;for(n=0;n99?Math.round(g/10):g,undefined),t:d<12?"a":"p",tt:d<12?"am":"pm",T:d<12?"A":"P",TT:d<12?"AM":"PM",Z:a?"UTC":(String(o).match(t)||[""]).pop().replace(n,""),o:(y>0?"-":"+")+r(Math.floor(Math.abs(y)/60)*100+Math.abs(y)%60,4),S:["th","st","nd","rd"][l%10>3?0:(l%100-l%10!==10)*l%10]};return u.replace(e,function(e){return e in b?b[e]:e.slice(1,e.length-1)})}}(),i={add:function(e,t,r){return n(e,t,r)},addHour:function(e,t){return n("h",e,t)},addMinute:function(e,t){return n("n",e,t)},addSecond:function(e,t){return n("s",e,t)},addDay:function(e,t){return n("d",e,t)},addWeek:function(e,t){return n("w",e,t)},addMonths:function(e,t){return n("m",e,t)},addYear:function(e,t){return n("y",e,t)},isDateEquals:function(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()},isEquals:function(e,t){return e==t?!0:!e||!t?!1:!e.getTime||!t.getTime?!1:e.getTime()==t.getTime()},isDateString:function(t){return e.test(t)},format:function(e,t,n){return r(e,t,n)},parse:function(e,n){return t(e,n)},today:function(){var e=new Date;return new Date(e.getFullYear(),e.getMonth(),e.getDate())},getDate:function(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate())}};return i}),define("bui/base",["bui/observable"],function(e){function r(e,t,n){var r=e[t]||{};return n&&(e[t]=r),r}function i(e,t){return BUI.isString(t)?e[t]:t}function s(e,t,n,r,i){var s=n;return e.fire(t+BUI.ucfirst(n)+"Change",{attrName:s,prevVal:r,newVal:i})}function o(e,t,n,r,i){r=r||{};var o,u,a;return a=e.get(t),!$.isPlainObject(n)&&!BUI.isArray(n)&&a===n?undefined:!r.silent&&!1===s(e,"before",t,a,n)?!1:(o=e._set(t,n,r),o===!1?o:(r.silent||(n=e.getAttrVals()[t],s(e,"after",t,a,n)),e))}var t={},n=e("bui/observable"),u=function(e){var t=this,r=t.constructor,i=[];n.apply(this,arguments);while(r)i.push(r),r=r.superclass?r.superclass.constructor:null;for(var s=i.length-1;s>=0;s--)t.addAttrs(i[s].ATTRS,!0);t._initAttrs(e)};return u.INVALID=t,BUI.extend(u,n),BUI.augment(u,{addAttr:function(e,t,n){var r=this,i=r.getAttrs(),s=BUI.cloneObject(t);return i[e]?n&&BUI.mix(!0,i[e],s):i[e]=s,r},addAttrs:function(e,t,n){var r=this;return e?(typeof t=="boolean"&&(n=t,t=null),BUI.each(e,function(e,t){r.addAttr(t,e,n)}),t&&r.set(t),r):r},hasAttr:function(e){return e&&this.getAttrs().hasOwnProperty(e)},getAttrs:function(){return r(this,"__attrs",!0)},getAttrVals:function(){return r(this,"__attrVals",!0)},get:function(e){var t=this,n=t.hasAttr(e),s=t.getAttrVals(),o,u,a;return o=r(t.getAttrs(),e),u=o.getter,a=e in s?s[e]:t._getDefAttrVal(e),u&&(u=i(t,u))&&(a=u.call(t,a,e)),a},clearAttrVals:function(){this.__attrVals={}},removeAttr:function(e){var t=this;return t.hasAttr(e)&&(delete t.getAttrs()[e],delete t.getAttrVals()[e]),t},set:function(e,t,n){var r=this;if($.isPlainObject(e)){n=t;var i=Object(e),s=[];for(e in i)i.hasOwnProperty(e)&&o(r,e,i[e],n);return r}return o(r,e,t,n)},setInternal:function(e,t,n){return this._set(e,t,n)},_getDefAttrVal:function(e){var t=this,n=t.getAttrs(),s=r(n,e),o=s.valueFn,u;return o&&(o=i(t,o))&&(u=o.call(t),u!==undefined&&(s.value=u),delete s.valueFn,n[e]=s),s.value},_set:function(e,n,s){var o=this,u,a=r(o.getAttrs(),e,!0),f=a.setter;f&&(f=i(o,f))&&(u=f.call(o,n,e));if(u===t)return!1;u!==undefined&&(n=u),o.getAttrVals()[e]=n},_initAttrs:function(e){var t=this;if(e)for(var n in e)e.hasOwnProperty(n)&&t._set(n,e[n])}}),u}),define("bui/component",["bui/component/manage","bui/component/uibase","bui/component/view","bui/component/controller"],function(e){function n(e,n){var r,i;return e&&(i=e.xclass)&&(n&&!e.prefixCls&&(e.prefixCls=n.get("prefixCls")),r=t.Manager.getConstructorByXClass(i),r||BUI.error("can not find class by xclass desc : "+i),e=new r(e)),e}var t={};return BUI.mix(t,{Manager:e("bui/component/manage"),UIBase:e("bui/component/uibase"),View:e("bui/component/view"),Controller:e("bui/component/controller")}),t.create=n,t}),define("bui/component/manage",function(e){function n(e){var n=e.split(/\s+/),r=-1,i,s=null;for(var o=0;or&&(r=i,s=u.constructor)}return s}function r(e){for(var n in t){var r=t[n];if(r.constructor==e)return n}return 0}function i(e,n){BUI.isFunction(n)?t[e]={constructor:n,priority:0}:(n.priority=n.priority||0,t[e]=n)}function s(e){var t=$.trim(e).split(/\s+/);for(var n=0;n=0;f--)i[f]&&i[f].call(e)}function f(e){var t=e.constructor,n,r,i;while(t){t.prototype.hasOwnProperty("destructor")&&t.prototype.destructor.apply(e);if(n=t.mixins)for(i=n.length-1;i>=0;i--)r=n[i]&&n[i].prototype.__destructor,r&&r.apply(e);t=t.superclass&&t.superclass.constructor}}function l(e){if(!e)return;BUI.each(e,function(t,n){BUI.isFunction(t)&&(e[n]=new t)})}function c(e,t,n){if(!t)return;BUI.each(t,function(t,r){t[n]&&t[n](e)})}function h(e){var t=e.getAttrs(),r,s;for(r in t)t.hasOwnProperty(r)&&(s=n+i(r),e[s]&&function(t,n){e.on("after"+i(t)+"Change",function(t){t.target===e&&e[n](t.newVal,t)})}(r,s))}function p(e){var t,r,s=e.getAttrs();for(var o in s)if(s.hasOwnProperty(o)){var u=n+i(o);(r=e[u])&&s[o].sync!==!1&&(t=e.get(o))!==undefined&&r.call(e,t)}}var t=e("bui/component/manage"),n="_uiSet",r="ATTRS",i=BUI.ucfirst,s=$.noop,o=e("bui/base"),d=function(e){var t=this,n;o.apply(t,arguments),t.setInternal("userConfig",e),u(t,e);var r,i,s=t.get("plugins"),a=t.get("listeners");l(s);var f=t.get("xclass");f&&(t.__xclass=f),c(t,s,"initializer"),e&&e.autoRender&&t.render()};return d.ATTRS={userConfig:{},autoRender:{value:!1},listeners:{value:{}},plugins:{value:[]},rendered:{value:!1},xclass:{valueFn:function(){return t.getXClassByConstructor(this.constructor)}}},BUI.extend(d,o),BUI.augment(d,{create:function(){var e=this;return e.get("created")||(e.fire("beforeCreateDom"),a(e,"createDom","__createDom"),e._set("created",!0),e.fire("afterCreateDom"),c(e,e.get("plugins"),"createDom")),e},render:function(){var e=this;if(!e.get("rendered")){var t=e.get("plugins");e.create(undefined),e.fire("beforeRenderUI"),a(e,"renderUI","__renderUI"),e.fire("afterRenderUI"),c(e,t,"renderUI"),e.fire("beforeBindUI"),h(e),a(e,"bindUI","__bindUI"),e.fire("afterBindUI"),c(e,t,"bindUI"),e.fire("beforeSyncUI"),p(e),a(e,"syncUI","__syncUI"),e.fire("afterSyncUI"),c(e,t,"syncUI"),e._set("rendered",!0)}return e},createDom:s,renderUI:s,bindUI:s,syncUI:s,destroy:function(){var e=this;return e.fire("beforeDestroy"),c(e,e.get("plugins"),"destructor"),f(e),e.fire("afterDestroy"),e.off(),e.clearAttrVals(),e.destroyed=!0,e}}),BUI.mix(d,{define:function(e,t,n,r){function i(){d.apply(this,arguments)}return $.isPlainObject(t)&&(r=n,n=t,t=[]),BUI.extend(i,e,n,r),BUI.mixin(i,t),i},extend:function v(e,n,r){var i=$.makeArray(arguments),s,o=i[i.length-1];i.unshift(this),o.xclass&&(i.pop(),i.push(o.xclass)),s=d.define.apply(d,i);if(o.xclass){var u=o.priority||(this.priority?this.priority+1:1);t.setConstructorByXClass(o.xclass,{constructor:s,priority:u}),s.__xclass=o.xclass,s.priority=u,s.toString=function(){return o.xclass}}return s.extend=v,s}}),d}),define("bui/component/uibase/align",["bui/ua"],function(e){function i(e){var t=e.ownerDocument,n=t.body,r,i=$(e).css("position"),s=i=="fixed"||i=="absolute";if(!s)return e.nodeName.toLowerCase()=="html"?null:e.parentNode;for(r=e.parentNode;r&&r!=n;r=r.parentNode){i=$(r).css("position");if(i!="static")return r}return null}function s(e){var n={left:0,right:Infinity,top:0,bottom:Infinity},s,o,u,a,f=e.ownerDocument,l=f.body,c=f.documentElement;for(s=e;s=i(s);)if((!t.ie||s.clientWidth!=0)&&s!=l&&s!=c&&$(s).css("overflow")!="visible"){var h=$(s).offset();h.left+=s.clientLeft,h.top+=s.clientTop,n.top=Math.max(n.top,h.top),n.right=Math.min(n.right,h.left+s.clientWidth),n.bottom=Math.min(n.bottom,h.top+s.clientHeight),n.left=Math.max(n.left,h.left)}return o=$(r).scrollLeft(),u=$(r).scrollTop(),n.left=Math.max(n.left,o),n.top=Math.max(n.top,u),a={width:BUI.viewportWidth(),height:BUI.viewportHeight()},n.right=Math.min(n.right,o+a.width),n.bottom=Math.min(n.bottom,u+a.height),n.top>=0&&n.left>=0&&n.bottom>n.top&&n.right>n.left?n:null}function o(e,t,n,r){var i,s,o,u;return i={left:e.left,top:e.top},o=d(t,n[0]),u=d(e,n[1]),s=[u.left-o.left,u.top-o.top],{left:i.left-s[0]+ +r[0],top:i.top-s[1]+ +r[1]}}function u(e,t,n){return e.leftn.right}function a(e,t,n){return e.topn.bottom}function f(e,t,n,r){var i=BUI.cloneObject(e),s={width:t.width,height:t.height};return r.adjustX&&i.left=n.left&&i.left+s.width>n.right&&(s.width-=i.left+s.width-n.right),r.adjustX&&i.left+s.width>n.right&&(i.left=Math.max(n.right-s.width,n.left)),r.adjustY&&i.top=n.top&&i.top+s.height>n.bottom&&(s.height-=i.top+s.height-n.bottom),r.adjustY&&i.top+s.height>n.bottom&&(i.top=Math.max(n.bottom-s.height,n.top)),BUI.mix(i,s)}function l(e,t,n){var r=[];return $.each(e,function(e,i){r.push(i.replace(t,function(e){return n[e]}))}),r}function c(e,t){return e[t]=-e[t],e}function h(){}function p(e){var t,n,r;return e.length&&!$.isWindow(e[0])?(t=e.offset(),n=e.outerWidth(),r=e.outerHeight()):(t={left:BUI.scrollLeft(),top:BUI.scrollTop()},n=BUI.viewportWidth(),r=BUI.viewportHeight()),t.width=n,t.height=r,t}function d(e,t){var n=t.charAt(0),r=t.charAt(1),i=e.width,s=e.height,o,u;return o=e.left,u=e.top,n==="c"?u+=s/2:n==="b"&&(u+=s),r==="c"?o+=i/2:r==="r"&&(o+=i),{left:o,top:u}}function v(e){var t=e.attr("class"),r=new RegExp("s?"+n+"[a-z]{2}-[a-z]{2}","ig"),i=r.exec(t);i&&e.removeClass(i.join(" "))}var t=e("bui/ua"),n="x-align-",r=window;return h.__getOffsetParent=i,h.__getVisibleRectForElement=s,h.ATTRS={align:{value:{}}},h.prototype={_uiSetAlign:function(e,t){var r="",i,s;e&&e.points&&(this.align(e.node,e.points,e.offset,e.overflow),this.set("cachePosition",null),i=this.get("el"),v(i),s=e.points.join("-"),r=n+s,i.addClass(r))},align:function(e,t,n,i){e=$(e||r),n=n&&[].concat(n)||[0,0],i=i||{};var h=this,d=h.get("el"),v=0,m=s(d[0]),g=p(d),y=p(e),b=o(g,y,t,n),w=BUI.merge(g,b);if(m&&(i.adjustX||i.adjustY)){u(b,g,m)&&(v=1,t=l(t,/[lr]/ig,{l:"r",r:"l"}),n=c(n,0)),a(b,g,m)&&(v=1,t=l(t,/[tb]/ig,{t:"b",b:"t"}),n=c(n,1)),v&&(b=o(g,y,t,n),BUI.mix(w,b));var E={};E.adjustX=i.adjustX&&u(b,g,m),E.adjustY=i.adjustY&&a(b,g,m);if(E.adjustX||E.adjustY)w=f(b,g,m,E)}return w.left!=g.left&&(h.setInternal("x",null),h.get("view").setInternal("x",null),h.set("x",w.left)),w.top!=g.top&&(h.setInternal("y",null),h.get("view").setInternal("y",null),h.set("y",w.top)),w.width!=g.width&&d.width(d.width()+w.width-g.width),w.height!=g.height&&d.height(d.height()+w.height-g.height),h},center:function(e){var t=this;return t.set("align",{node:e,points:["cc","cc"],offset:[0,0]}),t}},h}),define("bui/component/uibase/autoshow",function(){function e(){}return e.ATTRS={trigger:{},delegateTigger:{value:!1},autoAlign:{value:!0},curTrigger:{},triggerCallback:{value:function(e){}},triggerEvent:{value:"click"},triggerHideEvent:{},events:{value:{triggerchange:!1}}},e.prototype={__createDom:function(){this._setTrigger()},_setTrigger:function(){function u(t){var n=e.get("curTrigger"),i=s?$(t.currentTarget):$(this),o=e.get("align");if(!n||n[0]!=i[0])e.set("curTrigger",i),e.fire("triggerchange",{prevTrigger:n,curTrigger:i});e.get("autoAlign")&&(o.node=i),e.set("align",o),e.show(),r&&r(t)}function a(t){var n=t.toElement||t.relatedTarget;(!n||!e.containsElement(n))&&e.hide()}var e=this,t=e.get("triggerEvent"),n=e.get("triggerHideEvent"),r=e.get("triggerCallback"),i=e.get("trigger"),s=e.get("delegateTigger"),o=$(i);t&&(s&&BUI.isString(i)?$(document).delegate(i,t,u):o.on(t,u)),n&&(s&&BUI.isString(i)?$(document).delegate(i,n,a):o.on(n,a))},__renderUI:function(){var e=this,t=e.get("align");t&&!t.node&&(t.node=e.get("render")||e.get("trigger"))}},e}),define("bui/component/uibase/autohide",function(){function n(e,t){var n=e.get("hideExceptNode");return n&&n.length?$.contains(n[0],t):!1}function r(){}var e=BUI.wrapBehavior,t=BUI.getWrapBehavior;return r.ATTRS={autoHideType:{value:"click"},autoHide:{value:!1},hideExceptNode:{},events:{value:{autohide:!1}}},r.prototype={__bindUI:function(){var e=this;e.on("afterVisibleChange",function(t){var n=t.newVal;e.get("autoHide")&&(n?e._bindHideEvent():e._clearHideEvent())})},handleMoveOuter:function(e){var t=this,r=e.toElement||e.relatedTarget;!t.containsElement(r)&&!n(t,r)&&t.fire("autohide")!==!1&&t.hide()},handleDocumentClick:function(e){var t=this,r=e.target;!t.containsElement(r)&&!n(t,r)&&t.fire("autohide")!==!1&&t.hide()},_bindHideEvent:function(){var t=this,n=t.get("curTrigger"),r=t.get("autoHideType");r==="click"?$(document).on("mousedown",e(t,"handleDocumentClick")):(t.get("el").on("mouseleave",e(t,"handleMoveOuter")),n&&$(n).on("mouseleave",e(t,"handleMoveOuter")))},_clearHideEvent:function(){var e=this,n=e.get("curTrigger"),r=e.get("autoHideType");r==="click"?$(document).off("mousedown",t(e,"handleDocumentClick")):(e.get("el").off("mouseleave",t(e,"handleMoveOuter")),n&&$(n).off("mouseleave",t(e,"handleMoveOuter")))}},r}),define("bui/component/uibase/close",function(){function t(e){return $(e.get("closeTpl"))}function n(){}function r(){}var e=BUI.prefix+"ext-";n.ATTRS={closeTpl:{value:''+'\u5173\u95ed<'+"/span>"+"<"+"/a>"},closable:{value:!0},closeBtn:{}},n.prototype={_uiSetClosable:function(e){var n=this,r=n.get("closeBtn");e?(r||n.setInternal("closeBtn",r=t(n)),r.appendTo(n.get("el"),undefined)):r&&r.remove()}};var i="hide";r.ATTRS={closeTpl:{view:!0},closable:{view:1},closeBtn:{view:1},closeAction:{value:i}};var s={hide:i,destroy:"destroy"};return r.prototype={_uiSetClosable:function(e){var t=this;e&&!t.__bindCloseEvent&&(t.__bindCloseEvent=1,t.get("closeBtn").on("click",function(e){t.fire("closeclick",{domTarget:e.target})!==!1&&t.close(),e.preventDefault()}))},__destructor:function(){var e=this.get("closeBtn");e&&e.detach()},close:function(){var e=this,t=s[e.get("closeAction")||i];e.fire("closing",{action:t})!==!1&&(e[t](),e.fire("closed",{action:t}))}},r.View=n,r}),define("bui/component/uibase/drag",function(){function r(){var e=$(n).css("opacity",0).prependTo("body");return e}var e=BUI.guid("drag"),t=function(){};t.ATTRS={dragNode:{},draging:{setter:function(e){if(e===!0)return{}},value:null},constraint:{},dragBackEl:{getter:function(){return $("#"+e)}}};var n='';return t.prototype={__bindUI:function(){function r(n){var r=e.get("draging");r&&(n.preventDefault(),e._dragMoveTo(n.pageX,n.pageY,r,t))}function i(t){if(t.which==1){e.set("draging",!1);var n=e.get("dragBackEl");n&&n.hide(),o()}}function s(){$(document).on("mousemove",r),$(document).on("mouseup",i)}function o(){$(document).off("mousemove",r),$(document).off("mouseup",i)}var e=this,t=e.get("constraint"),n=e.get("dragNode");if(!n)return;n.on("mousedown",function(t){t.which==1&&(t.preventDefault(),e.set("draging",{elX:e.get("x"),elY:e.get("y"),startX:t.pageX,startY:t.pageY}),s())})},_dragMoveTo:function(e,t,n,i){var s=this,o=s.get("dragBackEl"),n=n||s.get("draging"),u=n.startX-e,a=n.startY-t;o.length||(o=r()),o.css({cursor:"move",display:"block"}),s.set("xy",[s._getConstrainX(n.elX-u,i),s._getConstrainY(n.elY-a,i)])},_getConstrainX:function(e,t){var n=this,r=n.get("el").outerWidth(),i=e+r,s=n.get("x");if(t){var o=t.offset();return o.left>=e?o.left:o.left+t.width()e?o.top:o.top+t.height()'+(r?'':"")+"
").prependTo("body");return t.on("mousedown",function(e){e.preventDefault()}),t}function a(){}function f(){}var t=e("bui/ua"),n={},r=t.ie==6;return a.ATTRS={maskShared:{value:!0}},a.prototype={_maskExtShow:function(){var e=this,t,r=i(e),s=n[r],o=e.get("maskShared"),a=e.get("maskNode");a||(o?s?a=s.node:(a=u(r),s=n[r]={num:0,node:a}):a=u(r),e.setInternal("maskNode",a)),(t=e.get("zIndex"))&&a.css("z-index",t-1),o&&s.num++,(!o||s.num==1)&&a.show()},_maskExtHide:function(){var e=this,t=i(e),r=n[t],s=e.get("maskShared"),o=e.get("maskNode");s&&r?(r.num=Math.max(r.num-1,0),r.num==0&&o.hide()):o&&o.hide()},__destructor:function(){var e=this,t=e.get("maskShared"),n=e.get("maskNode");e.get("maskNode")&&(t?e.get("visible")&&e._maskExtHide():n.remove())}},f.ATTRS={mask:{value:!1},maskNode:{view:1},maskShared:{view:1}},f.prototype={__bindUI:function(){var e=this,t=e.get("view"),n=t._maskExtShow,r=t._maskExtHide;e.get("mask")&&(e.on("show",function(){t._maskExtShow()}),e.on("hide",function(){t._maskExtHide()}))}},f=f,f.View=a,f}),define("bui/component/uibase/position",function(){function e(){}function t(){}return e.ATTRS={x:{valueFn:function(){var e=this;return e.get("el")&&e.get("el").offset().left}},y:{valueFn:function(){var e=this;return e.get("el")&&e.get("el").offset().top}},zIndex:{},visibleMode:{value:"visibility"}},e.prototype={__createDom:function(){this.get("el").addClass(BUI.prefix+"ext-position")},_uiSetZIndex:function(e){this.get("el").css("z-index",e)},_uiSetX:function(e){e!=null&&this.get("el").offset({left:e})},_uiSetY:function(e){e!=null&&this.get("el").offset({top:e})},_uiSetLeft:function(e){e!=null&&this.get("el").css({left:e})},_uiSetTop:function(e){e!=null&&this.get("el").css({top:e})}},t.ATTRS={x:{view:1},y:{view:1},left:{view:1},top:{view:1},xy:{setter:function(e){var t=this,n=$.makeArray(e);return n.length&&(n[0]&&t.set("x",n[0]),n[1]&&t.set("y",n[1])),e},getter:function(){return[this.get("x"),this.get("y")]}},zIndex:{view:1},visible:{view:!0,value:!0}},t.prototype={move:function(e,t){var n=this;return BUI.isArray(e)&&(t=e[1],e=e[0]),n.set("xy",[e,t]),n},_uiSetX:function(e){if(e!=null){var t=this,n=t.get("el");t.setInternal("left",n.position().left),e!=-999&&this.set("cachePosition",null)}},_uiSetY:function(e){if(e!=null){var t=this,n=t.get("el");t.setInternal("top",n.position().top),e!=-999&&this.set("cachePosition",null)}},_uiSetLeft:function(e){var t=this,n=t.get("el");e!=null&&t.setInternal("x",n.offset().left)},_uiSetTop:function(e){var t=this,n=t.get("el");e!=null&&t.setInternal("y",n.offset().top)}},t.View=e,t}),define("bui/component/uibase/listitem",function(){function e(){}function t(){}return e.ATTRS={selected:{}},e.prototype={_uiSetSelected:function(e){var t=this,n=t.getStatusCls("selected"),r=t.get("el");e?r.addClass(n):r.removeClass(n)}},t.ATTRS={selectable:{value:!0},selected:{view:!0,sync:!1,value:!1}},t.prototype={},t.View=e,t}),define("bui/component/uibase/stdmod",function(){function t(){}function n(t,n){var r=t.get("contentEl"),i=t.get(n);i||(i=$('
"+"
"),i.appendTo(r),t.setInternal(n,i))}function r(e,t,n){t=e.get(t),BUI.isString(n)?t.html(n):t.html("").append(n)}function i(){}var e=BUI.prefix+"stdmod-";return t.ATTRS={header:{},body:{},footer:{},bodyStyle:{},footerStyle:{},headerStyle:{},headerContent:{},bodyContent:{},footerContent:{}},t.PARSER={header:function(t){return t.one("."+e+"header")},body:function(t){return t.one("."+e+"body")},footer:function(t){return t.one("."+e+"footer")}},t.prototype={__createDom:function(){n(this,"header"),n(this,"body"),n(this,"footer")},_uiSetBodyStyle:function(e){this.get("body").css(e)},_uiSetHeaderStyle:function(e){this.get("header").css(e)},_uiSetFooterStyle:function(e){this.get("footer").css(e)},_uiSetBodyContent:function(e){r(this,"body",e)},_uiSetHeaderContent:function(e){r(this,"header",e)},_uiSetFooterContent:function(e){r(this,"footer",e)}},i.ATTRS={header:{view:1},body:{view:1},footer:{view:1},bodyStyle:{view:1},footerStyle:{view:1},headerStyle:{view:1},headerContent:{view:1},bodyContent:{view:1},footerContent:{view:1}},i.View=t,i}),define("bui/component/uibase/decorate",["bui/array","bui/json","bui/component/manage"],function(e){function s(e,t){if(t[e])return!0;var n=new RegExp("^"+i);return e!==FIELD_CFG&&n.test(e)?!0:!1}function o(e){var t=[],n=e.constructor;while(n)t.push(n),n=n.superclass&&n.superclass.constructor;return t}function u(e){return e=$.trim(e),regx.test(e)&&(e=n.looseParse(e)),e}function a(e,t){var n=e.userConfig||{};for(var r in t)r in n||e.setInternal(r,t[r])}function f(e,t){var n=this,r,i,s=n.userConfig||{};for(r in t)r in s||(i=t[r],BUI.isFunction(i)?n.setInternal(r,i.call(n,e)):typeof i=="string"?n.setInternal(r,e.find(i)):BUI.isArray(i)&&i[0]&&n.setInternal(r,e.find(i[0])))}function l(e,t){var n=e.constructor,r,i,s;s=o(e);for(r=s.length-1;r>=0;r--)n=s[r],(i=n[PARSER])&&f.call(e,t,i)}function c(e){var t=e,n=t.get("srcNode"),r,i;n&&(n=$(n),t.setInternal("el",n),t.setInternal("srcNode",n),r=t.get("userConfig"),i=t.getDecorateConfig(n),a(e,i),t.get("isDecorateChild")&&t.decorateInternal&&t.decorateInternal(n),l(e,n))}function h(){c(this)}var t=e("bui/array"),n=e("bui/json"),r=BUI.prefix,i="data-";return FIELD_CFG=i+"cfg",PARSER="PARSER",Manager=e("bui/component/manage"),regx=/^[\{\[]/,h.ATTRS={srcNode:{view:!0},isDecorateChild:{value:!1},decorateCfgFields:{value:{id:!0,name:!0,value:!0,title:!0}}},h.prototype={getDecorateConfig:function(e){if(!e.length)return null;var t=this,n=e[0],r=n.attributes,o=t.get("decorateCfgFields"),a={};return BUI.each(r,function(e){var t=e.nodeName;try{if(t===FIELD_CFG){var n=u(e.nodeValue);BUI.mix(a,n)}else s(t,o)&&(t=t.replace(i,""),a[t]=u(e.nodeValue))}catch(r){BUI.log("parse field error,the attribute is:"+t)}}),a},getDecorateElments:function(){var e=this,t=e.get("el"),n=e.get("contentContainer");return n?t.find(n).children():t.children()},decorateInternal:function(e){var t=this;t.decorateChildren(e)},findXClassByNode:function(e,t){var n=this,i=e.attr("class")||"",s=n.get("defaultChildClass");i=i.replace(new RegExp("\\b"+r,"ig"),"");var o=Manager.getConstructorByXClass(i)||Manager.getConstructorByXClass(s);return!o&&!t&&(BUI.log(e),BUI.error("can not find ui "+i+" from this markup")),Manager.getXClassByConstructor(o)},decorateChildrenInternal:function(e,t){var n=this,r=n.get("children");r.push({xclass:e,srcNode:t})},decorateChildren:function(e){var t=this,n=t.getDecorateElments();BUI.each(n,function(e){var n=t.findXClassByNode($(e));t.decorateChildrenInternal(n,$(e))})}},h}),define("bui/component/uibase/tpl",function(){function e(){}function t(){}return e.ATTRS={tpl:{}},e.prototype={__renderUI:function(){var e=this,t=e.get("childContainer"),n;t&&(n=e.get("el").find(t),n.length&&e.set("contentEl",n))},getTpl:function(e){var t=this,n=t.get("tpl"),r=t.get("tplRender");return e=e||t.getAttrVals(),r?r(e):n?BUI.substitute(n,e):""},setTplContent:function(e){var t=this,n=t.get("el"),r=t.get("content"),i=t.getTpl(e);!r&&i&&(n.empty(),n.html(i))}},t.ATTRS={tpl:{view:!0,sync:!1},tplRender:{view:!0,value:null},childContainer:{view:!0}},t.prototype={__renderUI:function(){this.get("srcNode")||this.setTplContent()},setTplContent:function(){var e=this,t=e.getAttrVals();e.get("view").setTplContent(t)},_uiSetTpl:function(){this.setTplContent()}},t.View=e,t}),define("bui/component/uibase/collapseable",function(){var e=function(){};e.ATTRS={collapsed:{}},e.prototype={_uiSetCollapsed:function(e){var t=this,n=t.getStatusCls("collapsed"),r=t.get("el");e?r.addClass(n):r.removeClass(n)}};var t=function(){};return t.ATTRS={collapseable:{value:!1},collapsed:{view:!0,value:!1},events:{value:{expanded:!0,collapsed:!0}}},t.prototype={_uiSetCollapsed:function(e){var t=this;e?t.fire("collapsed"):t.fire("expanded")}},t.View=e,t}),define("bui/component/uibase/selection",function(){var e="single",t=function(){};return t.ATTRS={selectedEvent:{value:"click"},events:{value:{selectedchange:!1,beforeselectedchange:!1,itemselected:!1,itemunselected:!1}},idField:{value:"id"},multipleSelect:{value:!1}},t.prototype={clearSelection:function(){var e=this,t=e.getSelection();BUI.each(t,function(t){e.clearSelected(t)})},getSelection:function(){},getSelected:function(){return this.getSelection()[0]},getSelectedValue:function(){var e=this,t=e.get("idField"),n=e.getSelected();return e.getValueByField(n,t)},getSelectionValues:function(){var e=this,t=e.get("idField"),n=e.getSelection();return $.map(n,function(n){return e.getValueByField(n,t)})},getSelectionText:function(){var e=this,t=e.getSelection();return $.map(t,function(t){return e.getItemText(t)})},clearSelected:function(e){var t=this;e=e||t.getSelected(),e&&t.setItemSelected(e,!1)},getSelectedText:function(){var e=this,t=e.getSelected();return e.getItemText(t)},setSelection:function(e){var t=this;e=BUI.isArray(e)?e:[e],BUI.each(e,function(e){t.setSelected(e)})},setSelected:function(e){var t=this,n=t.get("multipleSelect");if(!n){var r=t.getSelected();e!=r&&t.clearSelected(r)}t.setItemSelected(e,!0)},isItemSelected:function(e){},setItemSelected:function(e,t){var n=this,r;if(e){r=n.isItemSelected(e);if(r==t)return}n.fire("beforeselectedchange")!==!1&&n.setItemSelectedStatus(e,t)},setItemSelectedStatus:function(e,t){},setAllSelection:function(){},setSelectedByField:function(e,t){t||(t=e,e=this.get("idField"));var n=this,r=n.findItemByField(e,t);n.setSelected(r)},setSelectionByField:function(e,t){t||(t=e,e=this.get("idField"));var n=this;BUI.each(t,function(t){n.setSelectedByField(e,t)})},afterSelected:function(e,t,n){var r=this;t?(r.fire("itemselected",{item:e,domTarget:n}),r.fire("selectedchange",{item:e,domTarget:n,selected:t})):(r.fire("itemunselected",{item:e,domTarget:n}),r.get("multipleSelect")&&r.fire("selectedchange",{item:e,domTarget:n,selected:t}))}},t}),define("bui/component/uibase/list",["bui/component/uibase/selection"],function(e){function r(e){e.selected&&(e.selected=!1),e.set&&e.set("selected",!1)}function i(e,t){var n=t.isController?t.getAttrVals():t,r=e.get("itemTpl"),i=e.get("itemStatusCls"),o=e.get("itemTplRender");r&&!n.tpl&&s(t,"tpl",r),o&&!n.tplRender&&s(t,"tplRender",o);if(i){var u=n.statusCls||t.isController?t.get("statusCls"):{};BUI.each(i,function(e,t){e&&!u[t]&&(u[t]=e)}),s(t,"statusCls",u)}}function s(e,t,n){e.isController?e.set(t,n):e[t]=n}var t=e("bui/component/uibase/selection"),n=function(){};n.ATTRS={items:{view:!0},idField:{value:"id"},itemTpl:{view:!0},itemTplRender:{view:!0},itemStatusCls:{view:!0,value:{}},events:{value:{itemclick:!0}}},n.prototype={getItemCount:function(){return this.getItems().length},getValueByField:function(e,t){},getItems:function(){},getFirstItem:function(){return this.getItemAt(0)},getLastItem:function(){return this.getItemAt(this.getItemCount()-1)},getItemAt:function(e){return this.getItems()[e]||null},getItem:function(e){var t=this.get("idField");return this.findItemByField(t,e)},indexOfItem:function(e){return BUI.Array.indexOf(e,this.getItems())},addItems:function(e){var t=this;BUI.each(e,function(e){t.addItem(e)})},addItemsAt:function(e,t){var n=this;BUI.each(e,function(e,r){n.addItemAt(e,t+r)})},updateItem:function(e){},addItem:function(e){return this.addItemAt(e,this.getItemCount())},addItemAt:function(e,t){},findItemByField:function(e,t){},getItemText:function(e){},clearItems:function(){var e=this,t=e.getItems();t.splice(0),e.clearControl()},removeItem:function(e){},removeItems:function(e){var t=this;BUI.each(e,function(e){t.removeItem(e)})},removeItemAt:function(e){this.removeItem(this.getItemAt(e))},clearControl:function(){}};var o=function(){this.__init()};return o.ATTRS=BUI.merge(!0,n.ATTRS,t.ATTRS,{items:{sync:!1},autoInitItems:{value:!0},defaultLoaderCfg:{value:{property:"children",dataType:"json"}}}),BUI.augment(o,n,t,{__init:function(){var e=this,t=e.get("items");t&&e.get("autoInitItems")&&e.addItems(t),e.on("beforeRenderUI",function(){e._beforeRenderUI()})},_uiSetItems:function(e){var t=this;t.clearControl(),t.addItems(e)},_beforeRenderUI:function(){var e=this,t=e.get("children"),n=e.get("items");BUI.each(t,function(t){i(e,t)})},__bindUI:function(){var e=this,t=e.get("selectedEvent");e.on(t,function(t){var n=t.target;n.get("selectable")&&(n.get("selected")?e.get("multipleSelect")&&e.clearSelected(n):e.setSelected(n))}),e.on("click",function(t){t.target!==e&&e.fire("itemclick",{item:t.target,domTarget:t.domTarget,domEvent:t})}),e.on("beforeAddChild",function(t){i(e,t.child)}),e.on("beforeRemoveChild",function(t){var n=t.child,r=n.get("selected");r&&(e.get("multipleSelect")?e.clearSelected(n):e.setSelected(null)),n.set("selected",!1)})},clearControl:function(){this.removeChildren(!0)},getItems:function(){return this.get("children")},updateItem:function(e){var t=this,n=t.get("idField"),r=t.findItemByField(n,e[n]);return r&&r.setTplContent(),r},removeItem:function(e){var t=this,n=t.get("idField");e instanceof BUI.Component.Controller||(e=t.findItemByField(n,e[n])),this.removeChild(e,!0)},addItemAt:function(e,t){return this.addChild(e,t)},findItemByField:function(e,t,n){n=n||this;var r=this,i=n.get("children"),s=null;return $(i).each(function(n,i){i.get(e)==t?s=i:i.get("children").length&&(s=r.findItemByField(e,t,i));if(s)return!1}),s},getItemText:function(e){return e.get("el").text()},getValueByField:function(e,t){return e&&e.get(t)},setItemSelectedStatus:function(e,t){var n=this,r=t?"addClass":"removeClass",i=null;e&&(e.set("selected",t),i=e.get("el")),n.afterSelected(e,t,i)},isItemSelected:function(e){return e?e.get("selected"):!1},setAllSelection:function(){var e=this,t=e.getItems();e.setSelection(t)},getSelection:function(){var e=this,t=e.getItems(),n=[];return BUI.each(t,function(t){e.isItemSelected(t)&&n.push(t)}),n}}),n.ChildList=o,n}),define("bui/component/uibase/childcfg",function(e){var t=function(e){this._init()};return t.ATTRS={defaultChildCfg:{}},t.prototype={_init:function(){var e=this,t=e.get("defaultChildCfg");t&&e.on("beforeAddChild",function(e){var n=e.child;$.isPlainObject(n)&&BUI.each(t,function(e,t){n[t]||(n[t]=e)})})}},t}),define("bui/component/uibase/depends",["bui/component/manage"],function(e){function r(e){var n=t.exec(e),r=n[1],i=n[2],s=o(r);return{source:s,eventType:i}}function i(e,t,n){var i=r(t),s=i.source,o=i.eventType,u;return s&&n&&o&&(BUI.isFunction(n)?u=n:BUI.isArray(n)&&(u=function(){BUI.each(n,function(t){e[t]&&e[t]()})})),u?(i.callbak=u,s.on(o,u),i):null}function s(e){var t=e.source,n=e.eventType,r=e.callbak;t.off(n,r)}function o(e){var t=n.getComponent(e);return t||(t=$("#"+e),t.length||(t=null)),t}function u(){}var t=/^#(.*):(.*)$/,n=e("bui/component/manage");return u.ATTRS={depends:{value:{}},dependencesMap:{value:{}}},u.prototype={__syncUI:function(){this.initDependences()},initDependences:function(){var e=this,t=e.get("depends");BUI.each(t,function(t,n){e.addDependence(n,t)})},addDependence:function(e,t){var n=this,r=n.get("dependencesMap"),s;n.removeDependence(e),s=i(n,e,t),s&&(r[e]=s)},removeDependence:function(e){var t=this,n=t.get("dependencesMap"),r=n[e];r&&(s(r),delete n[e])},clearDependences:function(){var e=this,t=e.get("dependencesMap");BUI.each(t,function(e,t){s(e)}),e.set("dependencesMap",{})},__destructor:function(){this.clearDependences()}},u}),define("bui/component/uibase/bindable",function(){function e(){}return e.ATTRS={store:{},loadMask:{value:!1}},BUI.augment(e,{__bindUI:function(){var e=this,t=e.get("store"),n=e.get("loadMask");if(!t)return;t.on("beforeload",function(t){e.onBeforeLoad(t),n&&n.show&&n.show()}),t.on("load",function(t){e.onLoad(t),n&&n.hide&&n.hide()}),t.on("exception",function(t){e.onException(t),n&&n.hide&&n.hide()}),t.on("add",function(t){e.onAdd(t)}),t.on("remove",function(t){e.onRemove(t)}),t.on("update",function(t){e.onUpdate(t)}),t.on("localsort",function(t){e.onLocalSort(t)})},__syncUI:function(){var e=this,t=e.get("store");if(!t)return;t.hasData()&&e.onLoad()},onBeforeLoad:function(e){},onLoad:function(e){},onException:function(e){},onAdd:function(e){},onRemove:function(e){},onUpdate:function(e){},onLocalSort:function(e){}}),e}),define("bui/component/view",["bui/component/manage","bui/component/uibase"],function(e){var t=window,n=e("bui/component/manage"),r=e("bui/component/uibase"),i=document,s=r.extend([r.TplView],{getComponentCssClassWithState:function(e){var t=this,n=t.get("ksComponentCss");return e=e||"",t.getCssClassWithPrefix(n.split(/\s+/).join(e+" ")+e)},getCssClassWithPrefix:n.getCssClassWithPrefix,getKeyEventTarget:function(){return this.get("el")},getContentElement:function(){return this.get("contentEl")||this.get("el")},getStatusCls:function(e){var t=this,n=t.get("statusCls"),r=n[e];return r||(r=t.getComponentCssClassWithState("-"+e)),r},renderUI:function(){var e=this;if(!e.get("srcNode")){var t=e.get("render"),n=e.get("el"),r=e.get("elBefore");r?n.insertBefore(r,undefined):t?n.appendTo(t,undefined):n.appendTo(i.body,undefined)}},createDom:function(){var e=this,t=e.get("contentEl"),n=e.get("el");e.get("srcNode")||(n=$("<"+e.get("elTagName")+">"),t&&n.append(t),e.setInternal("el",n)),n.addClass(e.getComponentCssClassWithState()),t||e.setInternal("contentEl",n)},_uiSetHighlighted:function(e){var t=this,n=t.getStatusCls("hover"),r=t.get("el");r[e?"addClass":"removeClass"](n)},_uiSetDisabled:function(e){var t=this,n=t.getStatusCls("disabled"),r=t.get("el");r[e?"addClass":"removeClass"](n).attr("aria-disabled",e),e&&t.get("highlighted")&&t.set("highlighted",!1),t.get("focusable")&&t.getKeyEventTarget().attr("tabIndex",e?-1:0)},_uiSetActive:function(e){var t=this,n=t.getStatusCls("active");t.get("el")[e?"addClass":"removeClass"](n).attr("aria-pressed",!!e)},_uiSetFocused:function(e){var t=this,n=t.get("el"),r=t.getStatusCls("focused");n[e?"addClass":"removeClass"](r)},_uiSetElAttrs:function(e){this.get("el").attr(e)},_uiSetElCls:function(e){this.get("el").addClass(e)},_uiSetElStyle:function(e){this.get("el").css(e)},_uiSetWidth:function(e){this.get("el").width(e)},_uiSetHeight:function(e){var t=this;t.get("el").height(e)},_uiSetContent:function(e){var t=this,n;if(!t.get("srcNode")||!!t.get("rendered"))n=t.get("contentEl"),typeof e=="string"?n.html(e):e&&n.empty().append(e)},_uiSetVisible:function(e){var t=this,n=t.get("el"),r=t.get("visibleMode");r==="visibility"?n.css("visibility",e?"visible":"hidden"):n.css("display",e?"":"none")},destructor:function(){var e=this.get("el");e&&e.remove()}},{xclass:"view",priority:0});return s.ATTRS={el:{setter:function(e){return $(e)}},elCls:{},elStyle:{},width:{},height:{},statusCls:{value:{}},elTagName:{value:"div"},elAttrs:{},content:{},elBefore:{},render:{},visible:{value:!0},visibleMode:{value:"display"},cachePosition:{},contentEl:{valueFn:function(){return this.get("el")}},prefixCls:{value:BUI.prefix},focusable:{value:!0},focused:{},active:{},disabled:{},highlighted:{}},s}),define("bui/component/loader",["bui/util"],function(e){"use strict";var t=e("bui/util"),n=e("bui/base"),r=function(e){r.superclass.constructor.call(this,e),this._init()};return r.ATTRS={url:{},target:{},hasLoad:{value:!1},autoLoad:{},lazyLoad:{},property:{},renderer:{value:function(e){return e}},loadMask:{value:!1},dataType:{value:"text"},ajaxOptions:{value:{method:"get",cache:!1}},params:{},appendParams:{},lastParams:{value:{}},callback:{},failure:{}},t.extend(r,n),t.augment(r,{isLoader:!0,_init:function(){var e=this,t=e.get("autoLoad"),n=e.get("params");e._initMask(),t?e.load(n):(e._initParams(),e._initLazyLoad())},_initLazyLoad:function(){var e=this,t=e.get("target"),n=e.get("lazyLoad");t&&n&&n.event&&t.on(n.event,function(){(!e.get("hasLoad")||n.repeat)&&e.load()})},_initMask:function(){var e=this,n=e.get("target"),r=e.get("loadMask");n&&r&&t.use("bui/mask",function(i){var s=$.isPlainObject(r)?r:{};r=new i.LoadMask +(t.mix({el:n.get("el")},s)),e.set("loadMask",r)})},_initParams:function(){var e=this,n=e.get("lastParams"),r=e.get("params");t.mix(n,r)},load:function(e){var n=this,r=n.get("url"),i=n.get("ajaxOptions"),s=n.get("lastParams"),o=n.get("appendParams");t.mix(!0,s,o,e),e=t.cloneObject(s);if(!r)return;n.onBeforeLoad(),n.set("hasLoad",!0),$.ajax(t.mix({dataType:n.get("dataType"),data:e,url:r,success:function(t){n.onload(t,e)},error:function(t,r,i){n.onException({jqXHR:t,textStatus:r,errorThrown:i},e)}},i))},onBeforeLoad:function(){var e=this,t=e.get("loadMask");t&&t.show&&t.show()},onload:function(e,t){var n=this,r=n.get("loadMask"),i=n.get("property"),s=n.get("callback"),o=n.get("renderer"),u=n.get("target");u.set(i,o.call(n,e)),r&&r.hide&&r.hide(),s&&s.call(this,e,t)},onException:function(e,t){var n=this,r=n.get("failure");r&&r.call(this,e,t)}}),r}),define("bui/component/controller",["bui/component/uibase","bui/component/manage","bui/component/view","bui/component/loader"],function(e){"use strict";function u(e){return function(t){var n=this;if(n===t.target){var r=t.newVal,i=n.get("view");i&&i.set(e,r)}}}function a(e){return function(t){var n=this,r=n.get("view");return t===undefined?r.get(e):t}}function f(e,t,n){e.create();var r=e.getContentElement(),i=e.get("defaultChildClass");return!t.xclass&&!(t instanceof p)&&(t.xtype?t.xclass=i+"-"+t.xtype:t.xclass=i),t=BUI.Component.create(t,e),t.setInternal("parent",e),t.set("render",r),t.set("elBefore",n),t.create(undefined),t}function l(e){var t,n,r,i={},s,o=e.get("xview");t=e.getAttrs();for(r in t)t.hasOwnProperty(r)&&(n=t[r],n.view&&((s=e.get(r))!==undefined&&(i[r]=s),e.on("after"+BUI.ucfirst(r)+"Change",u(r)),n.getter=a(r)));return delete i.autoRender,i.ksComponentCss=c(e),new o(i)}function c(e){var t=e.constructor,r,i=[];while(t&&t!==p)r=n.getXClassByConstructor(t),r&&i.push(r),t=t.superclass&&t.superclass.constructor;return i.join(" ")}function h(e,t){var n=e.relatedTarget;return n&&(n===t[0]||$.contains(t,n))}var t=e("bui/component/uibase"),n=e("bui/component/manage"),r=e("bui/component/view"),i=e("bui/component/loader"),s=BUI.wrapBehavior,o=BUI.getWrapBehavior,p=t.extend([t.Decorate,t.Tpl,t.ChildCfg,t.KeyNav,t.Depends],{isController:!0,getCssClassWithPrefix:n.getCssClassWithPrefix,initializer:function(){var e=this;e.get("id")||e.set("id",e.getNextUniqueId()),n.addComponent(e.get("id"),e),e.setInternal("view",l(e))},getNextUniqueId:function(){var e=this,t=n.getXClassByConstructor(e.constructor);return BUI.guid(t)},createDom:function(){var e=this,t=e.get("view");t.create(undefined)},renderUI:function(){var e=this,t=e.get("loader");e.get("view").render(),e._initChildren(),t&&e.setInternal("loader",t)},_initChildren:function(e){var t=this,n,e,r;e=e||t.get("children").concat(),t.get("children").length=0;for(n=0;nt?1:e===t?0:-1}},sortField:{},sortDirection:{value:"ASC"},sortInfo:{getter:function(){var e=this,t=e.get("sortField");return{field:t,direction:e.get("sortDirection")}},setter:function(e){var t=this;t.set("sortField",e.field),t.set("sortDirection",e.direction)}}},BUI.augment(n,{compare:function(t,n,r,i){var s=this,o;return r=r||s.get("sortField"),i=i||s.get("sortDirection"),!r||!i?1:(o=i===e?1:-1,s.get("compareFunction")(t[r],n[r])*o)},getSortData:function(){},sortData:function(e,t,n){var r=this,n=n||r.getSortData();return BUI.isArray(e)&&(n=e,e=null),e=e||r.get("sortField"),t=t||r.get("sortDirection"),r.set("sortField",e),r.set("sortDirection",t),!e||!t?n:(n.sort(function(n,i){return r.compare(n,i,e,t)}),n)}}),n}),define("bui/data/proxy",["bui/data/sortable"],function(e){var t=e("bui/data/sortable"),n=function(e){n.superclass.constructor.call(this,e)};n.ATTRS={},BUI.extend(n,BUI.Base),BUI.augment(n,{_read:function(e,t){},read:function(e,t,n){var r=this;n=n||r,r._read(e,function(e){t.call(n,e)})},update:function(e,t,n){}});var r=function(e){r.superclass.constructor.call(this,e)};r.ATTRS=BUI.mix(!0,n.ATTRS,{limitParam:{value:"limit"},startParam:{value:"start"},pageIndexParam:{value:"pageIndex"},dataType:{value:"json"},method:{value:"GET"},cache:{value:!1},url:{}}),BUI.extend(r,n),BUI.augment(r,{_processParams:function(e){var t=this,n=["start","limit","pageIndex"];BUI.each(n,function(n){var r=t.get(n+"Param");r!==n&&(e[r]=e[n],delete e[n])})},_read:function(e,t){var n=this;e=BUI.cloneObject(e),n._processParams(e),$.ajax({url:n.get("url"),type:n.get("method"),dataType:n.get("dataType"),data:e,cache:n.get("cache"),success:function(e){t(e)},error:function(e,n,r){var i={exception:{status:n,errorThrown:r,jqXHR:e}};t(i)}})}});var i=function(e){i.superclass.constructor.call(this,e)};return BUI.extend(i,n),BUI.mixin(i,[t]),BUI.augment(i,{_read:function(e,t){var n=this,r=e.pageable,i=e.start,s=e.sortField,o=e.sortDirection,u=e.limit,a=n.get("data"),f=[];n.sortData(s,o),u?(f=a.slice(i,i+u),t({rows:f,results:a.length})):(f=a.slice(i),t(f))}}),n.Ajax=r,n.Memery=i,n}),define("bui/data/abstractstore",["bui/common","bui/data/proxy"],function(e){function r(e){r.superclass.constructor.call(this,e),this._init()}var t=e("bui/common"),n=e("bui/data/proxy");return r.ATTRS={autoLoad:{value:!1},lastParams:{value:{}},params:{},proxy:{value:{}},url:{},events:{value:["acceptchanges","load","beforeload","beforeProcessLoad","add","exception","remove","update","localsort"]},data:{setter:function(e){var t=this,n=t.get("proxy");n.set?n.set("data",e):n.data=e,t.set("autoLoad",!0)}}},t.extend(r,t.Base),t.augment(r,{isStore:!0,_init:function(){var e=this;e.beforeInit(),e._initParams(),e._initProxy(),e._initData()},beforeInit:function(){},_initData:function(){var e=this,t=e.get("autoLoad");t&&e.load()},_initParams:function(){var e=this,n=e.get("lastParams"),r=e.get("params");t.mix(n,r)},_initProxy:function(){var e=this,t=e.get("url"),r=e.get("proxy");r instanceof n||(t&&(r.url=t),r.type==="ajax"||r.url?r=new n.Ajax(r):r=new n.Memery(r),e.set("proxy",r))},load:function(e,n){var r=this,i=r.get("proxy"),s=r.get("lastParams");t.mix(!0,s,r.getAppendParams(),e),r.fire("beforeload",{params:s}),e=t.cloneObject(s),i.read(s,function(t){r.onLoad(t,e),n&&n(t,e)},r)},onLoad:function(e,t){var n=this,r=n.processLoad(e,t);r&&n.afterProcessLoad(e,t)},processLoad:function(e,t){var n=this,r=n.get("hasErrorProperty");return n.fire("beforeProcessLoad",e),e[r]||e.exception?(n.onException(e),!1):!0},afterProcessLoad:function(e,t){},onException:function(e){var t=this,n=t.get("errorProperty"),r={};e.exception?(r.type="exception",r[n]=e.exception):(r.type="error",r[n]=e[n]),t.fire("exception",r)},hasData:function(){},getAppendParams:function(){return{}}}),r}),define("bui/data/node",["bui/common"],function(e){function n(e,n){var r={};return n?(t.each(e,function(e,t){var i=n[t]||t;r[i]=e}),r.record=e):r=e,r}function r(e,r){var i=this;e=n(e,r),t.mix(this,e)}var t=e("bui/common");return t.augment(r,{root:!1,leaf:!1,text:"",id:null,loaded:!1,path:null,parent:null,level:0,record:null,children:null,isNode:!0}),r}),define("bui/data/treestore",["bui/common","bui/data/node","bui/data/abstractstore","bui/data/proxy"],function(e){function s(e){s.superclass.constructor.call(this,e)}var t=e("bui/common"),n=e("bui/data/node"),r=e("bui/data/proxy"),i=e("bui/data/abstractstore");return s.ATTRS={root:{},map:{},dataProperty:{value:"nodes"},events:{value:["add","update","remove","load"]}},t.extend(s,i),t.augment(s,{beforeInit:function(){this.initRoot()},_initData:function(){var e=this,t=e.get("autoLoad"),n=e.get("root");t&&!n.children&&(params=n.id?{id:n.id}:{},e.load(params))},initRoot:function(){var e=this,t=e.get("map"),r=e.get("root");r||(r={}),r.isNode||(r=new n(r,t)),r.path=[r.id],r.level=0,r.children&&e.setChildren(r,r.children),e.set("root",r)},add:function(e,t,n){var r=this;return e=r._add(e,t,n),r.fire("add",{node:e,index:n}),e},_add:function(e,r,i){r=r||this.get("root");var s=this,o=s.get("map"),u=r.children,a=e.children||[];return a.length==0&&e.leaf==null&&(e.leaf=!0),r&&(r.leaf=!1),e.isNode||(e=new n(e,o)),e.parent=r,e.level=r.level+1,e.path=r.path.concat(e.id),i=i==null?r.children.length:i,t.Array.addAt(u,e,i),s.setChildren(e,a),e},remove:function(e){var n=e.parent||_self.get("root"),r=t.Array.indexOf(e,n.children);return t.Array.remove(n.children,e),n.children.length===0&&(n.leaf=!0),this.fire("remove",{node:e,index:r}),e.parent=null,e},update:function(e){this.fire("update",{node:e})},getResult:function(){return this.get("root").children},setResult:function(e){var t=this,n=t.get("proxy"),i=t.get("root");n instanceof r.Memery?(t.set("data",e),t.load({id:i.id})):t.setChildren(i,e)},setChildren:function(e,n){var r=this;e.children=[];if(!n.length)return;t.each(n,function(t){r._add(t,e)})},findNode:function(e,n,r){var i=this;r=r==null?!0:r;if(!n){var s=i.get("root");return s.id===e?s:i.findNode(e,s)}var o=n.children,u=null;return t.each(o,function(t){t.id===e?u=t:r&&(u=i.findNode(e,t));if(u)return!1}),u},findNodesBy:function(e,n){var r=this,i,s=[];return n||(n=r.get("root")),t.each(n.children,function(t){e(t)&&s.push(t),s=s.concat(r.findNodesBy(e,t))}),s},findNodeByPath:function(e){if(!e)return null;var t=this,n=t.get("root"),r=e.split(","),i,s,o=r[0];if(!o)return null;n.id==o?i=n:i=t.findNode(o,n,!1);if(!i)return;for(s=1;s=0&&i(n,t)}function o(e,t){return BUI.Array.indexOf(e,t)!==-1}var t=e("bui/data/proxy"),n=e("bui/data/abstractstore"),r=e("bui/data/sortable"),u=function(e){u.superclass.constructor.call(this,e)};return u.ATTRS={currentPage:{value:0},deletedRecords:{value:[]},errorProperty:{value:"error"},hasErrorProperty:{value:"hasError"},matchFunction:{value:function(e,t){return e==t}},modifiedRecords:{value:[]},newRecords:{value:[]},remoteSort:{value:!1},resultMap:{value:{}},root:{value:"rows"},rowCount:{value:0},totalProperty:{value:"results"},start:{value:0},pageSize:{}},BUI.extend(u,n),BUI.mixin(u,[r]),BUI.augment(u,{add:function(e,t,n){var r=this,i=r.getCount();r.addAt(e,i,t,n)},addAt:function(e,t,n,r){var i=this;r=r||i._getDefaultMatch(),BUI.isArray(e)||(e=[e]),$.each(e,function(e,o){if(!n||!i.contains(o,r))i._addRecord(o,e+t),i.get("newRecords").push(o),s(o,i.get("deletedRecords")),s(o,i.get("modifiedRecords"))})},contains:function(e,t){return this.findIndexBy(e,t)!==-1},find:function(e,t){var n=this,r=null,i=n.getResult();return $.each(i,function(n,i){if(i[e]===t)return r=i,!1}),r},findAll:function(e,t){var n=this,r=[],i=n.getResult();return $.each(i,function(n,i){i[e]===t&&r.push(i)}),r},findByIndex:function(e){return this.getResult()[e]},findIndexBy:function(e,t){var n=this,r=-1,i=n.getResult();return t=t||n._getDefaultMatch(),e===null||e===undefined?-1:($.each(i,function(n,i){if(t(e,i))return r=n,!1}),r)},findNextRecord:function(e){var t=this,n=t.findIndexBy(e);if(n>=0)return t.findByIndex(n+1);return},getCount:function(){return this.getResult().length},getTotalCount:function(){var e=this,t=e.get("resultMap"),n=e.get("totalProperty");return t[n]||0},getResult:function(){var e=this,t=e.get("resultMap"),n=e.get("root");return t[n]},hasData:function(){return this.getCount()!==0},setResult:function(e){var n=this,r=n.get("proxy");r instanceof t.Memery?(n.set("data",e),n.load({start:0})):n._setResult(e)},remove:function(e,t){var n=this,r=[];t=t||n._getDefaultMatch(),BUI.isArray(e)||(e=[e]),$.each(e,function(e,r){var e=n.findIndexBy(r,t),u=i(e,n.getResult());!o(u,n.get("newRecords"))&&!o(u,n.get("deletedRecords"))&&n.get("deletedRecords").push(u),s(u,n.get("newRecords")),s(u,n.get("modifiedRecords")),n.fire("remove",{record:u})})},sort:function(e,t){var n=this,r=n.get("remoteSort");r?(n.set("sortField",e),n.set("sortDirection",t),n.load(n.get("sortInfo"))):n._localSort(e,t)},sum:function(e,t){var n=this,r=t||n.getResult(),i=0;return BUI.each(r,function(t){var n=t[e];isNaN(n)||(i+=parseFloat(n))}),i},setValue:function(e,t,n){var r=e,i=this;r[t]=n,!o(r,i.get("newRecords"))&&!o(r,i.get("modifiedRecords"))&&i.get("modifiedRecords").push(r),i.fire("update",{record:r,field:t,value:n})},update:function(e,t){var n=e,r=this,i=null,s=null;t&&(i=r._getDefaultMatch(),s=r.findIndexBy(e,i),s>=0&&(n=r.getResult()[s])),n=BUI.mix(n,e),!o(n,r.get("newRecords"))&&!o(n,r.get("modifiedRecords"))&&r.get("modifiedRecords").push(n),r.fire("update",{record:n})},_addRecord:function(e,t){var n=this.getResult();t==undefined&&(t=n.length),n.splice(t,0,e),this.fire("add",{record:e,index:t})},_clearChanges:function(){var e=this;e.get("newRecords").splice(0),e.get("modifiedRecords").splice(0),e.get("deletedRecords").splice(0)},_getDefaultMatch:function(){return this.get("matchFunction")},_getPageParams:function(){var e=this,t=e.get("sortInfo"),n=e.get("start"),r=e.get("pageSize"),i=e.get("pageIndex")||(r?n/r:0);return params={start:n,limit:r,pageIndex:i},e.get("remoteSort")&&BUI.mix(params,t),params},getAppendParams:function(){return this._getPageParams()},beforeInit:function(){this._setResult([])},_localSort:function(e,t){var n=this;n._sortData(e,t),n.fire("localsort")},_sortData:function(e,t,n){var r=this;n=n||r.getResult(),r.sortData(e,t,n)},afterProcessLoad:function(e,t){var n=this,r=n.get("root"),i=t.start,s=t.limit,o=n.get("totalProperty");BUI.isArray(e)?n._setResult(e):n._setResult(e[r],e[o]),n.set("start",i),s&&n.set("pageIndex",i/s),n.get("remoteSort")||n._sortData(),n.fire("load",{params:t})},_setResult:function(e,t){var n=this,r=n.get("resultMap");t=t||e.length,r[n.get("root")]=e,r[n.get("totalProperty")]=t,n._clearChanges()}}),u}),define("bui/overlay",["bui/common","bui/overlay/overlay","bui/overlay/dialog","bui/overlay/message"],function(e){var t=e("bui/common"),n=t.namespace("Overlay");return t.mix(n,{Overlay:e("bui/overlay/overlay"),Dialog:e("bui/overlay/dialog"),Message:e("bui/overlay/message")}),t.mix(n,{OverlayView:n.Overlay.View,DialogView:n.Dialog.View}),t.Message=t.Overlay.Message,n}),define("bui/overlay/overlay",["bui/common"],function(e){var t=e("bui/common"),n=t.Component,r="x-align-arrow",i=n.UIBase,s=n.View.extend([i.PositionView,i.CloseView]),o=n.Controller.extend([i.Position,i.Align,i.Close,i.AutoShow,i.AutoHide],{renderUI:function(){var e=this,t=e.get("el"),n=e.get("arrowContainer"),r=n?t.one(n):t;e.get("showArrow")&&$(e.get("arrowTpl")).appendTo(r)},show:function(){function u(){e.set("visible",!0),t.callback&&t.callback.call(e)}var e=this,t=e.get("effect"),n=e.get("el"),r=e.get("visibleMode"),i=t.effect,s=t.duration;if(r==="visibility"){o.superclass.show.call(e),t.callback&&t.callback.call(e);return}e.get("rendered")||(e.set("visible",!0),e.render(),e.set("visible",!1),n=e.get("el"));switch(i){case"linear":n.show(s,u);break;case"fade":n.fadeIn(s,u);break;case"slide":n.slideDown(s,u);break;default:u()}},hide:function(){function s(){e.set("visible",!1),t.callback&&t.callback.call(e)}var e=this,t=e.get("effect"),n=e.get("el"),r=t.effect,i=t.duration;if(e.get("visibleMode")==="visibility"){s();return}switch(r){case"linear":n.hide(i,s);break;case"fade":n.fadeOut(i,s);break;case"slide":n.slideUp(i,s);break;default:s()}}},{ATTRS:{effect:{value:{effect:"none",duration:0,callback:null}},closable:{value:!1},showArrow:{value:!1},arrowContainer:{view:!0},arrowTpl:{value:''},visibleMode:{value:"visibility"},visible:{value:!1},xview:{value:s}}},{xclass:"overlay"});return o.View=s,o}),define("bui/overlay/dialog",["bui/overlay/overlay"],function(e){var t=e("bui/overlay/overlay"),n=BUI.Component.UIBase,r="header-title",i=BUI.prefix,s=20,o=t.View.extend([n.StdModView,n.MaskView],{_uiSetTitle:function(e){var t=this,n=t.get("el");n.find("."+r).html(e)},_uiSetContentId:function(e){var t=this,n=t.get("body"),r=$("#"+e).children();r.appendTo(n)},_uiSetHeight:function(e){var t=this,n=e,r=t.get("header"),i=t.get("body"),o=t.get("footer");n-=r.outerHeight()+o.outerHeight(),n-=s*2,i.height(n)},_removeContent:function(){var e=this,t=e.get("body"),n=e.get("contentId");n?t.children().appendTo($("#"+n)):t.children().remove()}},{xclass:"dialog-view"}),u=t.extend([n.StdMod,n.Mask,n.Drag],{show:function(){var e=this;u.superclass.show.call(this),e.center()},bindUI:function(){var e=this;e.on("closeclick",function(){return e.onCancel()})},onCancel:function(){var e=this,t=e.get("cancel");return t.call(this)},_uiSetButtons:function(e){var t=this,n=t.get("footer");n.children().remove(),BUI.each(e,function(e){t._createButton(e,n)})},_createButton:function(e,t){var n=this,r='",i=$(r).appendTo(t);i.on("click",function(){e.handler.call(n,n,this)})},destructor:function(){var e=this,t=e.get("contentId"),n=e.get("body"),r=e.get("closeAction");r=="destroy"&&(e.hide(),t&&n.children().appendTo("#"+t))}},{ATTRS:{closeTpl:{view:!0,value:'
\u00d7'},buttons:{value:[{text:"\u786e\u5b9a",elCls:"button button-primary",handler:function(){var e=this,t=e.get("success");t&&t.call(e)}},{text:"\u53d6\u6d88",elCls:"button button-primary",handler:function(e,t){this.onCancel()!==!1&&this.close()}}]},contentId:{view:!0},success:{value:function(){this.close()}},cancel:{value:function(){}},dragNode:{valueFn:function(){return this.get("header")}},defaultLoaderCfg:{valueFn:function(){var e=this;return{property:"bodyContent",autoLoad:!1,lazyLoad:{event:"show"},loadMask:{el:e.get("body")}}}},title:{view:!0,value:""},mask:{value:!0},maskShared:{value:!1},headerContent:{value:'
\u6807\u9898
'},footerContent:{},closable:{value:!0},xview:{value:o}}},{xclass:"dialog"});return u.View=o,u}),define("bui/overlay/message",["bui/overlay/dialog"],function(e){function o(e,t){return function(n,r,i){BUI.isString(r)&&(i=r,r=null),i=i||t,r=r||f,u({buttons:e,icon:i,msg:n,success:r})}}function u(e){s.set(e),s.show()}function a(){var e=this,t=e.get("success");t&&(t.call(e),e.hide())}function f(){this.hide()}var t=e("bui/overlay/dialog"),n=BUI.prefix,r={info:"i",error:"\u00d7",success:'',question:"?",warning:"!"},i=t.extend({renderUI:function(){this._setContent()},bindUI:function(){var e=this,t=e.get("body");e.on("afterVisibleChange",function(n){if(n.newVal&&BUI.UA.ie<8){var r=t.outerWidth();BUI.UA.ie==6&&(r=r>350?350:r),e.get("header").width(r-20),e.get("footer").width(r)}})},_setContent:function(){var e=this,t=e.get("body"),n=BUI.substitute(e.get("contentTpl"),{msg:e.get("msg"),iconTpl:e.get("iconTpl")});t.empty(),$(n).appendTo(t)},_uiSetIcon:function(e){if(!this.get("rendered"))return;this._setContent()},_uiSetMsg:function(e){if(!this.get("rendered"))return;this._setContent()}},{ATTRS:{icon:{},msg:{},iconTpl:{getter:function(){var e=this,t=e.get("icon");return'
'+r[t]+"
"}},contentTpl:{value:'{iconTpl}
{msg}
'}}},{xclass:"message",priority:0}),s=new i({icon:"info",title:""}),l=o([{text:"\u786e\u5b9a",elCls:"button button-primary",handler:a}],"info"),c=o([{text:"\u786e\u5b9a",elCls:"button button-primary",handler:a},{text:"\u53d6\u6d88",elCls:"button button-primary",handler:f}],"question");return i.Alert=l,i.Confirm=c,i.Show=u,i}),function(){var e="bui/list/";define("bui/list",["bui/common",e+"list",e+"listitem",e+"simplelist",e+"listbox"],function(t){var n=t("bui/common"),r=n.namespace("List");return n.mix(r,{List:t(e+"list"),ListItem:t(e+"listitem"),SimpleList:t(e+"simplelist"),Listbox:t(e+"listbox")}),n.mix(r,{ListItemView:r.ListItem.View,SimpleListView:r.SimpleList.View}),r})}(),define("bui/list/domlist",["bui/common"],function(e){"use strict";function s(e,t){var n=t,r=n.get("itemCls"),i=n.get("itemStatusCls");return i&&i[e]?i[e]:r+"-"+e}function u(e,n){var i=e.attributes,o=n.get("itemStatusFields"),u={};return t.each(i,function(e){var t=e.nodeName;t.indexOf(r)!==-1&&(t=t.replace(r,""),u[t]=e.nodeValue)}),u.text=$(e).text(),t.each(o,function(t,r){var i=s(r,n);$(e).hasClass(i)&&(u[t]=!0)}),u}var t=e("bui/common"),n=t.Component.UIBase.Selection,r="data-",i=t.Component.UIBase.List,o=function(){};o.ATTRS={items:{}},o.prototype={clearControl:function(){var e=this,t=e.getItemContainer(),n=e.get("itemCls");t.find("."+n).remove()},addItem:function(e,t){return this._createItem(e,t)},getItems:function(){var e=this,n=e.getAllElements(),r=[];return t.each(n,function(t){r.push(e.getItemByElement(t))}),r},updateItem:function(e){var n=this,r=n.getItems(),i=t.Array.indexOf(e,r),s=null,o;return i>=0&&(s=n.findElement(e),o=n.getItemTpl(e,i),s&&$(s).html($(o).html())),s},removeItem:function(e,t){t=t||this.findElement(e),$(t).remove()},getItemContainer:function(){return this.get("itemContainer")||this.get("el")},getItemTpl:function(e,n){var r=this,i=r.get("itemTplRender"),s=r.get("itemTpl");return i?i(e,n):t.substitute(s,e)},_createItem:function(e,t){var n=this,r=n.getItemContainer(),i=n.get("itemCls"),s=n.get("dataField"),o=n.getItemTpl(e,t),u=$(o);if(t!==undefined){var a=r.find("."+i)[t];a?u.insertBefore(a):u.appendTo(r)}else u.appendTo(r);return u.addClass(i),u.data(s,e),u},getItemStatusCls:function(e){return s(e,this)},setItemStatusCls:function(e,t,n){var r=this,i=r.getItemStatusCls(e),s=n?"addClass":"removeClass";t&&$(t)[s](i)},hasStatus:function(e,t){var n=this,r=n.getItemStatusCls(e);return $(t).hasClass(r)},setItemSelected:function(e,t,n){var r=this;n=n||r.findElement(e),r.setItemStatusCls("selected",n,t)},getAllElements:function(){var e=this,t=e.get("itemCls"),n=e.get("el");return n.find("."+t)},getItemByElement:function(e){var t=this,n=t.get("dataField");return $(e).data(n)},getFirstElementByStatus:function(e){var t=this,n=t.getItemStatusCls(e),r=t.get("el");return r.find("."+n)[0]},getElementsByStatus:function(e){var t=this,n=t.getItemStatusCls(e),r=t.get("el");return r.find("."+n)},getSelectedElements:function(){var e=this,t=e.getItemStatusCls("selected"),n=e.get("el");return n.find("."+t)},findElement:function(e){var n=this,r=n.getAllElements(),i=null;return t.each(r,function(t){if(n.getItemByElement(t)==e)return i=t,!1}),i},isElementSelected:function(e){var t=this,n=t.getItemStatusCls("selected");return e&&$(e).hasClass(n)}};var a=function(){};return a.ATTRS=t.merge(!0,i.ATTRS,n.ATTRS,{dataField:{view:!0,value:"data-item"},itemContainer:{view:!0},itemStatusFields:{value:{}},itemCls:{view:!0},textGetter:{},defaultLoaderCfg:{value:{property:"items",dataType:"json"}},events:{value:{itemrendered:!0,itemremoved:!0,itemupdated:!0,itemsshow:!1,beforeitemsshow:!1,itemsclear:!1,beforeitemsclear:!1}}}),a.PARSER={items:function(e){var n=this,r=[],i=n.get("itemCls"),s=n.get("dataField"),o=e.find("."+i);return t.each(o,function(e){var t=u(e,n);r.push(t),$(e).data(s,t)}),r}},t.augment(a,i,n,{_uiSetItems:function(e){var t=this;if(t.get("srcNode")&&!t.get("rendered"))return;this.setItems(e)},__bindUI:function(){function i(t,n){var r=e.get("multipleSelect"),i;i=e.isItemSelected(t,n),i?r&&e.setItemSelected(t,!1,n):(r||e.clearSelected(),e.setItemSelected(t,!0,n))}var e=this,t=e.get("selectedEvent"),n=e.get("itemCls"),r=e.get("view").getItemContainer();r.delegate("."+n,"click",function(n){var r=$(n.currentTarget),s=e.getItemByElement(r);if(e.isItemDisabled(s,r))return;var o=e.fire("itemclick",{item:s,element:r[0],domTarget:n.target});o!==!1&&t=="click"&&i(s,r)}),t!=="click"&&r.delegate("."+n,t,function(t){var n=$(t.currentTarget),r=e.getItemByElement(n);if(e.isItemDisabled(r,n))return;i(r,n)}),r.delegate("."+n,"dblclick",function(t){var n=$(t.currentTarget),r=e.getItemByElement(n);if(e.isItemDisabled(r,n))return;e.fire("itemdblclick",{item:r,element:n[0],domTarget:t.target})}),e.on("itemrendered itemupdated",function(t){var n=t.item,r=t.element;e._syncItemStatus(n,r)})},getValueByField:function(e,t){return e&&e[t]},_syncItemStatus:function(e,n){var r=this,i=r.get("itemStatusFields");t.each(i,function(t,i){r.get("view").setItemStatusCls(i,n,e[t])}) +},getStatusValue:function(e,t){var n=this,r=n.get("itemStatusFields"),i=r[t];return e[i]},getCount:function(){var e=this.getItems();return e?e.length:0},getStatusField:function(e){var t=this,n=t.get("itemStatusFields");return n[e]},setStatusValue:function(e,t,n){var r=this,i=r.get("itemStatusFields"),s=i[t];s&&(e[s]=n)},getItemText:function(e){var t=this,n=t.get("textGetter");return e?n?n(e):$(t.findElement(e)).text():""},removeItem:function(e){var n=this,r=n.get("items"),i=n.findElement(e),s;s=t.Array.indexOf(e,r),s!==-1&&r.splice(s,1),n.get("view").removeItem(e,i),n.fire("itemremoved",{item:e,domTarget:$(i)[0],element:i})},addItemAt:function(e,t){var n=this,r=n.get("items");return t===undefined&&(t=r.length),r.splice(t,0,e),n.addItemToView(e,t),e},addItemToView:function(e,t){var n=this,r=n.get("view").addItem(e,t);n.fire("itemrendered",{item:e,domTarget:$(r)[0],element:r})},updateItem:function(e){var t=this,n=t.get("view").updateItem(e);t.fire("itemupdated",{item:e,domTarget:$(n)[0],element:n})},setItems:function(e){var n=this;n.clearControl(),n.fire("beforeitemsshow"),t.each(e,function(e,t){n.addItemToView(e,t)}),n.fire("itemsshow")},getItems:function(){return this.get("items")},getItemByElement:function(e){return this.get("view").getItemByElement(e)},getSelected:function(){var e=this,t=e.get("view").getFirstElementByStatus("selected");return e.getItemByElement(t)||null},getItemsByStatus:function(e){var n=this,r=n.get("view").getElementsByStatus(e),i=[];return t.each(r,function(e){i.push(n.getItemByElement(e))}),i},findElement:function(e){var n=this;return t.isString(e)&&(e=n.getItem(e)),this.get("view").findElement(e)},findItemByField:function(e,n){var r=this,i=r.get("items"),s=null;return t.each(i,function(t){if(t[e]===n)return s=t,!1}),s},setItemSelectedStatus:function(e,t,n){var r=this;n=n||r.findElement(e),r.setItemStatus(e,"selected",t,n)},setAllSelection:function(){var e=this,t=e.getItems();e.setSelection(t)},isItemSelected:function(e,t){var n=this;return t=t||n.findElement(e),n.get("view").isElementSelected(t)},isItemDisabled:function(e,t){return this.hasStatus(e,"disabled",t)},setItemDisabled:function(e,t){var n=this;n.setItemStatus(e,"disabled",t)},getSelection:function(){var e=this,n=e.get("view").getSelectedElements(),r=[];return t.each(n,function(t){r.push(e.getItemByElement(t))}),r},clearControl:function(){this.fire("beforeitemsclear"),this.get("view").clearControl(),this.fire("itemsclear")},hasStatus:function(e,t,n){if(!e)return!1;var r=this;return n=n||r.findElement(e),r.get("view").hasStatus(t,n)},setItemStatus:function(e,t,n,r){var i=this;e&&(r=r||i.findElement(e));if(!i.isItemDisabled(e,r)||t==="disabled")e&&(t==="disabled"&&n&&i.clearItemStatus(e),i.setStatusValue(e,t,n),i.get("view").setItemStatusCls(t,r,n),i.fire("itemstatuschange",{item:e,status:t,value:n,element:r})),t==="selected"&&i.afterSelected(e,n,r)},clearItemStatus:function(e,n,r){var i=this,s=i.get("itemStatusFields");r=r||i.findElement(e),n?i.setItemStatus(e,n,!1,r):(t.each(s,function(t,n){i.setItemStatus(e,n,!1,r)}),s.selected||i.setItemSelected(e,!1),i.setItemStatus(e,"hover",!1))}}),a.View=o,a}),define("bui/list/keynav",function(){"use strict";var e=function(){};return e.ATTRS={highlightedStatus:{value:"hover"}},BUI.augment(e,{setHighlighted:function(e,t){if(this.hasStatus(e,"hover",t))return;var n=this,r=n.get("highlightedStatus"),i=n._getHighLightedElement(),s=i?n.getItemByElement(i):null;s!==e&&(s&&this.setItemStatus(s,r,!1,i),this.setItemStatus(e,r,!0,t))},_getHighLightedElement:function(){var e=this,t=e.get("highlightedStatus"),n=e.get("view").getFirstElementByStatus(t);return n},getHighlighted:function(){var e=this,t=e.get("highlightedStatus"),n=e.get("view").getFirstElementByStatus(t);return e.getItemByElement(n)||null},getColumnCount:function(){var e=this,t=e.getFirstItem(),n=e.findElement(t),r=$(n);return n?parseInt(r.parent().width()/r.outerWidth(),10):1},getRowCount:function(e){var t=this;return e=e||t.getColumnCount(),(this.getCount()+e-1)/e},_getNextItem:function(e,t,n){var r=this,i=r._getCurrentIndex(),s=r.getCount(),o=e?1:-1,u;return i===-1?e?r.getFirstItem():r.getLastItem():(e||(t*=o),u=(i+t+n)%n,u>s-1&&(e?u-=s-1:u+=t),r.getItemAt(u))},_getLeftItem:function(){var e=this,t=e.getCount(),n=e.getColumnCount();return!t||n<=1?null:e._getNextItem(!1,1,t)},_getCurrentItem:function(){return this.getHighlighted()},_getCurrentIndex:function(){var e=this,t=e._getCurrentItem();return this.indexOfItem(t)},_getRightItem:function(){var e=this,t=e.getCount(),n=e.getColumnCount();return!t||n<=1?null:this._getNextItem(!0,1,t)},_getDownItem:function(){var e=this,t=e.getColumnCount(),n=e.getRowCount(t);return n<=1?null:this._getNextItem(!0,t,t*n)},_getUpperItem:function(){var e=this,t=e.getColumnCount(),n=e.getRowCount(t);return n<=1?null:this._getNextItem(!1,t,t*n)},handleNavUp:function(e){var t=this,n=t._getUpperItem();t.setHighlighted(n)},handleNavDown:function(e){this.setHighlighted(this._getDownItem())},handleNavLeft:function(e){this.setHighlighted(this._getLeftItem())},handleNavRight:function(e){this.setHighlighted(this._getRightItem())},handleNavEnter:function(e){var t=this,n=t._getCurrentItem();n&&t.setSelected(n)},handleNavEsc:function(e){this.setHighlighted(null)},handleNavTab:function(e){this.setHighlighted(this._getRightItem())}}),e}),define("bui/list/simplelist",["bui/common","bui/list/domlist","bui/list/keynav"],function(e){var t=e("bui/common"),n=t.Component.UIBase,r=e("bui/list/domlist"),i=e("bui/list/keynav"),s=t.prefix+"list-item",o=t.Component.View.extend([r.View],{setElementHover:function(e,t){var n=this;n.setItemStatusCls("hover",e,t)}},{ATTRS:{itemContainer:{valueFn:function(){return this.get("el").find(this.get("listSelector"))}}}},{xclass:"simple-list-view"}),u=t.Component.Controller.extend([r,n.Bindable,i],{bindUI:function(){var e=this,t=e.get("itemCls"),n=e.get("view").getItemContainer();n.delegate("."+t,"mouseover",function(t){var n=t.currentTarget,r=e.getItemByElement(n);if(e.isItemDisabled(t.item,t.currentTarget))return;e.get("highlightedStatus")==="hover"?e.setHighlighted(r,n):e.setItemStatus(r,"hover",!0,n)}).delegate("."+t,"mouseout",function(t){var n=$(t.currentTarget);e.get("view").setElementHover(n,!1)})},onAdd:function(e){var t=this,n=e.record;t.addItemToView(n,e.index)},onRemove:function(e){var t=this,n=e.record;t.removeItem(n)},onUpdate:function(e){this.updateItem(e.record)},onLocalSort:function(e){this.onLoad(e)},onLoad:function(){var e=this,t=e.get("store"),n=t.getResult();e.set("items",n)}},{ATTRS:{items:{view:!0,value:[]},itemCls:{view:!0,value:s},idField:{value:"value"},listSelector:{view:!0,value:"ul"},itemTpl:{view:!0,value:'
  • {text}
  • '},tpl:{value:"
      "},xview:{value:o}}},{xclass:"simple-list",prority:0});return u.View=o,u}),define("bui/list/listbox",["bui/list/simplelist"],function(e){var t=e("bui/list/simplelist"),n=t.extend({bindUI:function(){var e=this;e.on("selectedchange",function(e){var t=e.item,n=$(e.domTarget),r=n.find("input");t&&r.attr("checked",e.selected)})}},{ATTRS:{itemTpl:{value:'
    • {text}
    • '},multipleSelect:{value:!0}}},{xclass:"listbox"});return n}),define("bui/list/listitem",function(e){var t=BUI.Component,n=t.UIBase,r=t.View.extend([n.ListItemView],{}),i=t.Controller.extend([n.ListItem],{},{ATTRS:{elTagName:{view:!0,value:"li"},xview:{value:r},tpl:{view:!0,value:"{text}"}}},{xclass:"list-item"});return i.View=r,i}),define("bui/list/list",function(e){var t=BUI.Component,n=t.UIBase,r=t.Controller.extend([n.ChildList],{},{ATTRS:{elTagName:{view:!0,value:"ul"},idField:{value:"id"},defaultChildClass:{value:"list-item"}}},{xclass:"list"});return r}),define("bui/picker",["bui/common","bui/picker/picker","bui/picker/listpicker"],function(e){var t=e("bui/common"),n=t.namespace("Picker");return t.mix(n,{Picker:e("bui/picker/picker"),ListPicker:e("bui/picker/listpicker")}),n}),define("bui/picker/picker",["bui/overlay"],function(e){var t=e("bui/overlay").Overlay,n=t.extend({bindUI:function(){var e=this,t=e.get("innerControl"),n=e.get("hideEvent"),r=$(e.get("trigger"));r.on(e.get("triggerEvent"),function(t){if(e.get("autoSetValue")){var n=e.get("valueField")||e.get("textField")||this,r=$(n).val();e.setSelectedValue(r)}}),t.on(e.get("changeEvent"),function(t){var n=e.get("curTrigger"),r=e.get("textField")||n,i=e.get("valueField"),s=e.getSelectedValue(),o=!1;if(r){var u=e.getSelectedText(),a=$(r).val();u!=a&&($(r).val(u),o=!0)}if(i){var f=$(i).val();i!=f&&($(i).val(s),o=!0)}o&&e.onChange(u,s,t)}),n&&t.on(e.get("hideEvent"),function(){var t=e.get("curTrigger");try{t&&t.focus()}catch(n){BUI.log(n)}e.hide()})},setSelectedValue:function(e){},getSelectedValue:function(){},getSelectedText:function(){},onChange:function(e,t,n){var r=this,i=r.get("curTrigger");r.fire("selectedchange",{value:t,text:e,curTrigger:i})},_uiSetValueField:function(e){var t=this;e&&t.setSelectedValue($(e).val())},_getTextField:function(){var e=this;return e.get("textField")||e.get("curTrigger")}},{ATTRS:{innerControl:{getter:function(){return this.get("children")[0]}},triggerEvent:{value:"click"},autoSetValue:{value:!0},changeEvent:{value:"selectedchange"},autoHide:{value:!0},hideEvent:{value:"itemclick"},textField:{},align:{value:{points:["bl","tl"],offset:[0,0]}},valueField:{}}},{xclass:"picker"});return n}),define("bui/picker/listpicker",["bui/picker/picker","bui/list"],function(e){var t=e("bui/list"),n=e("bui/picker/picker"),r=n.extend({initializer:function(){var e=this,t=e.get("children"),n=e.get("list");n||t.push({})},setSelectedValue:function(e){e=e?e.toString():"";var t=this,n=t.get("list"),r=t.getSelectedValue();e!==r&&n.getCount()&&(n.get("multipleSelect")&&n.clearSelection(),n.setSelectionByField(e.split(",")))},onChange:function(e,t,n){var r=this,i=r.get("curTrigger");r.fire("selectedchange",{value:t,text:e,curTrigger:i,item:n.item})},getSelectedValue:function(){return this.get("list").getSelectionValues().join(",")},getSelectedText:function(){return this.get("list").getSelectionText().join(",")}},{ATTRS:{defaultChildClass:{value:"simple-list"},list:{getter:function(){return this.get("children")[0]}}}},{xclass:"list-picker"});return r}),function(){var e="bui/form/";define("bui/form",["bui/common",e+"fieldcontainer",e+"form",e+"row",e+"fieldgroup",e+"horizontal",e+"rules",e+"field",e+"fieldgroup"],function(t){var n=t("bui/common"),r=n.namespace("Form"),i=t(e+"tips");return n.mix(r,{Tips:i,TipItem:i.Item,FieldContainer:t(e+"fieldcontainer"),Form:t(e+"form"),Row:t(e+"row"),Group:t(e+"fieldgroup"),HForm:t(e+"horizontal"),Rules:t(e+"rules"),Field:t(e+"field"),FieldGroup:t(e+"fieldgroup")}),r})}(),define("bui/form/tips",["bui/common","bui/overlay"],function(e){var t=e("bui/common"),n=t.prefix,r=e("bui/overlay").Overlay,i="data-tip",s=n+"form-tip-container",o=r.extend({initializer:function(){var e=this,t=e.get("render");if(!t){var n=$(e.get("trigger")).parent();e.set("render",n)}},renderUI:function(){var e=this;e.resetVisible()},resetVisible:function(){var e=this,t=$(e.get("trigger"));t.val()?e.set("visible",!1):(e.set("align",{node:$(e.get("trigger")),points:["cl","cl"]}),e.set("visible",!0))},bindUI:function(){var e=this,t=$(e.get("trigger"));e.get("el").on("click",function(){e.hide(),t.focus()}),t.on("click focus",function(){e.hide()}),t.on("blur",function(){e.resetVisible()})}},{ATTRS:{trigger:{},text:{},iconCls:{},tpl:{value:'{text}'}}},{xclass:"form-tip"}),u=function(e){if(this.constructor!==u)return new u(e);u.superclass.constructor.call(this,e),this._init()};return u.ATTRS={form:{},items:{value:[]}},t.extend(u,t.Base),t.augment(u,{_init:function(){var e=this,n=$(e.get("form"));n.length&&(t.each($.makeArray(n[0].elements),function(t){var n=$(t).attr(i);n&&e._initFormElement(t,$.parseJSON(n))}),n.addClass(s))},_initFormElement:function(e,t){t&&(t.trigger=e);var n=this,r=n.get("items"),i=new o(t);r.push(i)},getItem:function(e){var n=this,r=n.get("items"),i=null;return t.each(r,function(t){if($(t.get("trigger")).attr("name")===e)return i=t,!1}),i},resetVisible:function(){var e=this,n=e.get("items");t.each(n,function(e){e.resetVisible()})},render:function(){var e=this,n=e.get("items");t.each(n,function(e){e.render()})},destroy:function(){var e=this,n=e.get(n);t.each(n,function(e){e.destroy()})}}),u.Item=o,u}),define("bui/form/basefield",["bui/common","bui/form/tips","bui/form/valid","bui/form/remote"],function(e){var t=e("bui/common"),n=t.Component,r=e("bui/form/tips").Item,i=e("bui/form/valid"),s=e("bui/form/remote"),o=t.prefix+"form-field-error",u="data-error",a=n.View.extend([s.View,i.View],{renderUI:function(){var e=this,t=e.get("control");if(!t){var n=e.get("controlTpl"),r=e.getControlContainer();if(n){var t=$(n).appendTo(r);e.set("control",t)}}else e.set("controlContainer",t.parent())},clearErrors:function(){var e=this,t=e.get("msgEl");t&&(t.remove(),e.set("msgEl",null)),e.get("el").removeClass(o)},showError:function(e,n){var r=this,i=r.get("control"),s=t.substitute(n,{error:e}),u=$(s);u.appendTo(i.parent()),r.set("msgEl",u),r.get("el").addClass(o)},getControlContainer:function(){var e=this,n=e.get("el"),r=e.get("controlContainer");return r?t.isString(r)?n.find(r):r:n},getLoadingContainer:function(){return this.getControlContainer()},_uiSetName:function(e){var t=this;t.get("control").attr("name",e)}},{ATTRS:{error:{},controlContainer:{},msgEl:{},control:{}}}),f=n.Controller.extend([s,i],{initializer:function(){var e=this;e.on("afterRenderUI",function(){var t=e.get("tip");t&&(t.trigger=e.getTipTigger(),t.autoRender=!0,t=new r(t),e.set("tip",t))})},bindUI:function(){var e=this,t=e.get("validEvent"),n=e.get("changeEvent"),r=e.getInnerControl();r.is("select")&&(t="change"),r.on(t,function(){var t=e.getControlValue(r);e.validControl(t)}),r.on("focus",function(){if(!e.get("hasValid")){var t=e.getControlValue(r);e.validControl(t)}}),e.on(n,function(){e.onValid()}),e.on("remotecomplete",function(t){e._setError(t.error)})},onValid:function(){var e=this,t=e.getControlValue();t=e.parseValue(t),e.isCurrentValue(t)||(e.setInternal("value",t),e.onChange())},onChange:function(){this.fire("change")},isCurrentValue:function(e){return e==this.get("value")},_clearError:function(){this.set("error",null),this.get("view").clearErrors()},_setError:function(e){this.set("error",e),this.showErrors()},getControlValue:function(e){var t=this;return e=e||t.getInnerControl(),e.val()},getControlContainer:function(){return this.get("view").getControlContainer()},getRemoteParams:function(){var e=this,t={};return t[e.get("name")]=e.get("value"),t},setControlValue:function(e){var t=this,n=t.getInnerControl();n.val(e)},parseValue:function(e){return e},valid:function(){var e=this;e.validControl()},validControl:function(e){var t=this,n;return e=e||t.getControlValue(),preError=t.get("error"),n=t.getValidError(e),t.setInternal("hasValid",!0),n?(t._setError(n),t.fire("error",{msg:n,value:e}),preError!==n&&t.fire("validchange",{valid:!1})):(t._clearError(),t.fire("valid"),preError&&t.fire("validchange",{valid:!0})),!n},focus:function(){this.getInnerControl().focus()},change:function(){var e=this.getInnerControl();e.change()},blur:function(){this.getInnerControl().blur()},isValid:function(){var e=this;return e.get("hasValid")||e.validControl(),!e.get("error")},getError:function(){return this.get("error")},getErrors:function(){var e=this.getError();return e?[e]:[]},clearErrors:function(){var e=this;e._clearError(),e.getControlValue()!=e.get("value")&&e.setControlValue(e.get("value"))},getInnerControl:function(){return this.get("view").get("control")},getTipTigger:function(){return this.getInnerControl()},destructor:function(){var e=this,t=e.get("tip");t&&t.destroy&&t.destroy()},setInnerWidth:function(e){var t=this,n=t.getInnerControl(),r=n.outerWidth()-n.width();n.width(e-r)},_resetTip:function(){var e=this,t=e.get("tip");t&&t.resetVisible()},resetTip:function(){this._resetTip()},_uiSetValue:function(e){var t=this;t.setControlValue(e),t.get("rendered")&&(t.validControl(),t.onChange()),t._resetTip()},_uiSetDisabled:function(e){var t=this,n=t.getInnerControl();n.attr("disabled",e),t.get("rendered")&&(e&&t.clearErrors(),e||t.valid())},_uiSetWidth:function(e){var t=this;e!=null&&t.get("forceFit")&&t.setInnerWidth(e)}},{ATTRS:{hasValid:{value:!1},forceFit:{value:!1},tip:{},changeEvent:{value:"valid"},validEvent:{value:"keyup change"},name:{view:!0},showError:{view:!0,value:!0},value:{view:!0},label:{},controlContainer:{view:!0},control:{view:!0},controlTpl:{view:!0,value:''},events:{value:{error:!1,valid:!1,change:!0,validchange:!0}},tpl:{value:""},xview:{value:a}},PARSER:{control:function(e){var t=e.find("input,select,textarea");return t.length?t:e},disabled:function(e){return!!e.attr("disabled")},value:function(e){var t=this,n="select,input,textarea",r=t.get("value");return r||(e.is(n)?r=e.val():r=e.find(n).val()),r},name:function(e){var t=this,n="select,input,textarea",r=t.get("name");return r||(e.is(n)?r=e.attr("name"):r=e.find(n).attr("name")),r}}},{xclass:"form-field"});return f.View=a,f}),define("bui/form/textfield",["bui/form/basefield"],function(e){var t=e("bui/form/basefield"),n=t.extend({},{xclass:"form-field-text"});return n}),define("bui/form/numberfield",["bui/form/basefield"],function(e){var t=e("bui/form/basefield"),n=t.extend({parseValue:function(e){if(e==""||e==null)return null;if(BUI.isNumber(e))return e;var t=this,n=t.get("allowDecimals");return e=e.replace(/\,/g,""),n?parseFloat(parseFloat(e).toFixed(t.get("decimalPrecision"))):parseInt(e)},_uiSetMax:function(e){this.addRule("max",e)},_uiSetMin:function(e){this.addRule("min",e)}},{ATTRS:{max:{},min:{},decorateCfgFields:{value:{min:!0,max:!0}},validEvent:{value:"keyup change"},defaultRules:{value:{number:!0}},allowDecimals:{value:!0},decimalPrecision:{value:2},step:{value:1}}},{xclass:"form-field-number"});return n}),define("bui/form/hiddenfield",["bui/form/basefield"],function(e){var t=e("bui/form/basefield"),n=t.extend({},{ATTRS:{controlTpl:{value:''},tpl:{value:""}}},{xclass:"form-field-hidden"});return n}),define("bui/form/readonlyfield",["bui/form/basefield"],function(e){var t=e("bui/form/basefield"),n=t.extend({},{ATTRS:{controlTpl:{value:''}}},{xclass:"form-field-readonly"});return n}),define("bui/form/selectfield",["bui/common","bui/form/basefield"],function(e){function r(e,n,r){e.children().remove();var s=r.get("emptyText");s&&i("",s,e),t.each(n,function(t){i(t.value,t.text,e)})}function i(e,t,n){var r='";$(r).appendTo(n)}var t=e("bui/common"),n=e("bui/form/basefield"),s=n.extend({renderUI:function(){var e=this,t=e.getInnerControl(),n=e.get("select");if(e.get("srcNode")&&t.is("select"))return;$.isPlainObject(n)&&e._initSelect(n)},_initSelect:function(e){var n=this,r=n.get("items");t.use("bui/select",function(t){e.render=n.getControlContainer(),e.valueField=n.getInnerControl(),e.autoRender=!0,e=new t.Select(e),n.set("select",e),n.set("isCreate",!0),n.get("children").push(e),e.on("change",function(t){var r=e.getSelectedValue();n.set("value",r)})})},setItems:function(e){var n=this,i=n.get("select");if($.isPlainObject(e)){var s=[];t.each(e,function(e,t){s.push({value:t,text:e})}),e=s}var o=n.getInnerControl();o.is("select")&&(r(o,e,n),n.setControlValue(n.get("value")),n.getControlValue()||n.setInternal("value","")),i&&(i.set?i.set("items",e):i.items=e)},setControlValue:function(e){var t=this,n=t.get("select"),r=t.getInnerControl();r.val(e),n&&n.set&&n.getSelectedValue()!==e&&n.setSelectedValue(e)},getTipTigger:function(){var e=this,t=e.get("select");return t&&t.rendered?t.get("el").find("input"):e.get("el")},_uiSetItems:function(e){e&&this.setItems(e)},setInnerWidth:function(e){var t=this,n=t.getInnerControl(),r=t.get("select"),i=n.outerWidth()-n.width();n.width(e-i),r&&r.set&&r.set("width",e)}},{ATTRS:{items:{},controlTpl:{value:''},showBlank:{value:!0},emptyText:{value:"\u8bf7\u9009\u62e9"},select:{value:{}}},PARSER:{emptyText:function(e){if(!this.get("showBlank"))return"";var t=e.find("option"),n=this.get("emptyText");return t.length&&(n=$(t[0]).text()),n}}},{xclass:"form-field-select"});return s}),define("bui/form/datefield",["bui/common","bui/form/basefield","bui/calendar"],function(e){var t=e("bui/common"),n=e("bui/form/basefield"),r=t.Date,i=e("bui/calendar").DatePicker,s=n.extend({renderUI:function(){var e=this,t=e.get("datePicker");$.isPlainObject(t)&&(t.trigger=e.getInnerControl(),t.autoRender=!0,t=new i(t),e.set("datePicker",t),e.set("isCreatePicker",!0),e.get("children").push(t)),t.get("showTime")&&e.getInnerControl().addClass("calendar-time")},bindUI:function(){var e=this,t=e.get("datePicker");t.on("selectedchange",function(t){var n=t.curTrigger;n[0]==e.getInnerControl()[0]&&e.set("value",t.value)})},setControlValue:function(e){var n=this,i=n.getInnerControl();t.isDate(e)&&(e=r.format(e,n._getFormatMask())),i.val(e)},_getFormatMask:function(){var e=this,t=e.get("datePicker");return t.get("showTime")?"yyyy-mm-dd HH:MM:ss":"yyyy-mm-dd"},parseValue:function(e){return t.isNumber(e)?new Date(e):r.parse(e)},isCurrentValue:function(e){return r.isEquals(e,this.get("value"))},_uiSetMax:function(e){this.addRule("max",e);var t=this,n=t.get("datePicker");n&&n.set&&n.set("maxDate",e)},_uiSetMin:function(e){this.addRule("min",e);var t=this,n=t.get("datePicker");n&&n.set&&n.set("minDate",e)}},{ATTRS:{controlTpl:{value:''},defaultRules:{value:{date:!0}},max:{},min:{},value:{setter:function(e){return t.isNumber(e)?new Date(e):e}},datePicker:{value:{}},isCreatePicker:{value:!0}},PARSER:{datePicker:function(e){return e.hasClass("calendar-time")?{showTime:!0}:{}}}},{xclass:"form-field-date"});return s}),define("bui/form/checkfield",["bui/form/basefield"],function(e){var t=e("bui/form/basefield"),n=t.extend({onValid:function(){var e=this,t=e._getControlChecked();e.setInternal("checked",t),e.fire("change"),t?e.fire("checked"):e.fire("unchecked")},_setControlChecked:function(e){var t=this,n=t.getInnerControl();n.attr("checked",!!e)},_getControlChecked:function(){var e=this,t=e.getInnerControl();return!!t.attr("checked")},_uiSetValue:function(e){},_uiSetChecked:function(e){var t=this;t._setControlChecked(e),t.get("rendered")&&t.onValid()}},{ATTRS:{validEvent:{value:"click"},checked:{value:!1},events:{value:{checked:!1,unchecked:!1}}},PARSER:{checked:function(e){return!!e.attr("checked")}}},{xclass:"form-check-field"});return n}),define("bui/form/checkboxfield",["bui/form/checkfield"],function(e){var t=e("bui/form/checkfield"),n=t.extend({},{ATTRS:{controlTpl:{view:!0,value:''},controlContainer:{value:".checkbox"},tpl:{value:''}}},{xclass:"form-field-checkbox"});return n}),define("bui/form/radiofield",["bui/form/checkfield"],function(e){var t=e("bui/form/checkfield"),n=t.extend({bindUI:function(){var e=this,t=e.get("parent"),n=e.get("name");t&&e.getInnerControl().on("click",function(r){var i=t.getFields(n);BUI.each(i,function(t){t!=e&&t.set("checked",!1)})})}},{ATTRS:{controlTpl:{view:!0,value:''},controlContainer:{value:".radio"},tpl:{value:''}}},{xclass:"form-field-radio"});return n}),define("bui/form/plainfield",["bui/form/basefield"],function(e){var t=e("bui/form/basefield"),n=t.View.extend({_uiSetValue:function(e){var t=this,n=t.get("textEl"),r=t.getControlContainer(),i=t.get("renderer"),s=i?i(e):e,o=t.get("width"),u=0,a;n&&n.remove(),s=s||" ",a=BUI.substitute(t.get("textTpl"),{text:s}),n=$(a).appendTo(r),u=n.outerWidth()-n.width(),n.width(o-u),t.set("textEl",n)}},{ATTRS:{textEl:{},value:{}}},{xclass:"form-field-plain-view"}),r=t.extend({},{ATTRS:{controlTpl:{value:''},textTpl:{view:!0,value:'{text}'},renderer:{view:!0,value:function(e){return e}},tpl:{value:""},xview:{value:n}}},{xclass:"form-field-plain"});return r}),define("bui/form/listfield",["bui/common","bui/form/basefield","bui/list"],function(e){var t=e("bui/common"),n=e("bui/list"),r=e("bui/form/basefield"),n=r.extend({initializer:function(){var e=this;e._initList()},_getList:function(){var e=this,t=e.get("children");return t[0]},bindUI:function(){var e=this,t=e._getList();t&&t.on("selectedchange",function(){var n=e._getListValue(t);e.set("value",n)})},_getListValue:function(e){var t=this;return e=e||t._getList(),e.getSelectionValues().join(",")},setControlValue:function(e){var t=this,n=t.getInnerControl(),r=t._getList();n.val(e),t._getListValue(r)!==e&&r.getCount()&&(r.get("multipleSelect")&&r.clearSelection(),r.setSelectionByField(e.split(",")))},syncUI:function(){this.set("list",this._getList())},_initList:function(){var e=this,t=e.get("children"),n=e.get("list")||{};if(t[0])return;$.isPlainObject(n)&&(n.xclass=n.xclass||"simple-list"),t.push(n)},setItems:function(e){var t=this,n=t.get("value"),r=t._getList();r.set("items",e),r.setSelectionByField(n.split(","))},_uiSetItems:function(e){e&&this.setItems(e)}},{ATTRS:{controlTpl:{value:''},items:{setter:function(e){if($.isPlainObject(e)){var n=[];t.each(e,function(e,t){n.push({value:t,text:e})}),e=n}return e}},list:{}}},{xclass:"form-field-list"});return n}),function(){var e="bui/form/";define(e+"field",["bui/common",e+"textfield",e+"datefield",e+"selectfield",e+"hiddenfield",e+"numberfield",e+"checkfield",e+"radiofield",e+"checkboxfield",e+"plainfield"],function(t){var n=t("bui/common"),r=t(e+"basefield");return n.mix(r,{Text:t(e+"textfield"),Date:t(e+"datefield"),Select:t(e+"selectfield"),Hidden:t(e+"hiddenfield"),Number:t(e+"numberfield"),Check:t(e+"checkfield"),Radio:t(e+"radiofield"),Checkbox:t(e+"checkboxfield"),Plain:t(e+"plainfield"),List:t(e+"listfield")}),r})}(),define("bui/form/valid",["bui/common","bui/form/rules"],function(e){var t=e("bui/common"),n=e("bui/form/rules"),r=function(){};r.prototype={getErrorsContainer:function(){var e=this,n=e.get("errorContainer");return n?t.isString(n)?e.get("el").find(n):n:e.getContentElement()},showErrors:function(e){var n=this,r=n.getErrorsContainer(),i=n.get("errorTpl");n.clearErrors();if(!n.get("showError"))return;if(n.get("showOneError")){e&&e.length&&n.showError(e[0],i,r);return}t.each(e,function(e){e&&n.showError(e,i,r)})},showError:function(e,t,n){},clearErrors:function(){}};var i=function(){};return i.ATTRS={defaultRules:{value:{}},defaultMessages:{value:{}},rules:{value:{}},messages:{value:{}},validator:{},errorContainer:{view:!0},errorTpl:{view:!0,value:'!'},showError:{view:!0,value:!0},showOneError:{},error:{}},i.prototype={isValid:function(){},valid:function(){},validControl:function(){},validRules:function(e,t){var r=this,i=r._getValidMessages(),s=null;for(var o in e)if(e.hasOwnProperty(o)){var u=e[o];s=n.valid(o,t,u,i[o],r);if(s)break}return s},_getValidMessages:function(){var e=this,n=e.get("defaultMessages"),r=e.get("messages");return t.merge(n,r)},getValidError:function(e){var t=this,n=t.get("validator"),r=null;return r=t.validRules(t.get("defaultRules"),e)||t.validRules(t.get("rules"),e),r||(t.parseValue&&(e=t.parseValue(e)),r=n?n.call(this,e):""),r},getErrors:function(){},showErrors:function(e){var t=this,e=e||t.getErrors();t.get("view").showErrors(e)},clearErrors:function(){var e=this,n=e.get("children");t.each(n,function(e){e.clearErrors&&e.clearErrors()}),e.set("error",null),e.get("view").clearErrors()},addRule:function(e,t,n){var r=this,i=r.get("rules"),s=r.get("messages");i[e]=t,n&&(s[e]=n)},addRules:function(e,n){var r=this;t.each(e,function(e,t){var i=n?n[t]:null;r.addRule(t,e,i)})},removeRule:function(e){var t=this,n=t.get("rules");delete n[e]},clearRules:function(){var e=this;e.set("rules",{})}},i.View=r,i}),define("bui/form/groupvalid",["bui/form/valid"],function(e){function r(){}function i(){}var t="x-form-error",n=e("bui/form/valid");return BUI.augment(r,n.View,{showError:function(e,n,r){var i=BUI.substitute(n,{error:e}),s=$(i);s.appendTo(r),s.addClass(t)},clearErrors:function(){var e=this,n=e.getErrorsContainer();n.children("."+t).remove()}}),i.ATTRS=ATTRS=BUI.merge(!0,n.ATTRS,{events:{value:{validchange:!0,change:!0}}}),BUI.augment(i,n,{__bindUI:function(){var e=this,t="validchange change";e.on(t,function(t){var n=t.target;if(n!=this&&e.get("showError")){var r=e.isChildrenValid();r&&(e.validControl(e.getRecord()),r=e.isSelfValid()),r?e.clearErrors():e.showErrors()}})},isValid:function(){var e=this,t=e.isChildrenValid();return t&&e.isSelfValid()},valid:function(){var e=this,t=e.get("children");BUI.each(t,function(e){e.valid()})},isChildrenValid:function(){var e=this,t=e.get("children"),n=!0;return BUI.each(t,function(e){if(!e.isValid())return n=!1,!1}),n},isSelfValid:function(){return!this.get("error")},validControl:function(e){var t=this,n=t.getValidError(e);t.set("error",n)},getErrors:function(){var e=this,t=e.get("children"),n=e.get("showChildError"),r=null,i=[];return n&&BUI.each(t,function(e){e.getErrors&&(i=i.concat(e.getErrors()))}),e.isChildrenValid()&&(r=e.get("error"),r&&i.push(r)),i},_uiSetErrorTpl:function(e){var t=this,n=t.get("children");BUI.each(n,function(t){t.set("errorTpl",e)})}}),i.View=r,i}),define("bui/form/fieldcontainer",["bui/common","bui/form/field","bui/form/groupvalid"],function(e){function f(e){return e.is(a)}function l(e,n){if(e!=n){if(f(e))return[e];var r=e.attr("class");if(r&&(r.indexOf(u)!==-1||r.indexOf(o)!==-1))return[e]}var i=[],s=e.children();return t.each(s,function(e){i=i.concat(l($(e),n))}),i}var t=e("bui/common"),n=e("bui/form/field"),r=e("bui/form/groupvalid"),i=t.prefix,s="form-field",o=i+s,u=i+"form-group",a="input,select,textarea",c=t.Component.View.extend([r.View]),h=t.Component.Controller.extend([r],{syncUI:function(){var e=this,n=e.getFields(),r=e.get("validators");t.each(n,function(e){var t=e.get("name");r[t]&&e.set("validator",r[t])}),t.each(r,function(t,n){if(n.indexOf("#")==0){var r=n.replace("#",""),i=e.getChild(r,!0);i&&i.set("validator",t)}})},getDecorateElments:function(){var e=this,t=e.get("el"),n=l(t,t);return n},findXClassByNode:function(e,n){return e.attr("type")==="checkbox"?s+"-checkbox":e.attr("type")==="radio"?s+"-radio":e.attr("type")==="number"?s+"-number":e.hasClass("calendar")?s+"-date":e[0].tagName=="SELECT"?s+"-select":f(e)?s:t.Component.Controller.prototype.findXClassByNode.call(this,e,n)},getRecord:function(){var e=this,n={},r=e.getFields();return t.each(r,function(r){var i=r.get("name"),s=e._getFieldValue(r);if(!n[i])n[i]=s;else if(t.isArray(n[i])&&s!=null)n[i].push(s);else if(s!=null){var o=[n[i]];o.push(s),n[i]=o}}),n},getFields:function(e){var r=this,i=[],s=r.get("children");return t.each(s,function(t){t instanceof n?(!e||t.get("name")==e)&&i.push(t):t.getFields&&(i=i.concat(t.getFields(e)))}),i},getField:function(e){var n=this,r=n.getFields(),i=null;return t.each(r,function(t){if(t.get("name")===e)return i=t,!1}),i},getFieldAt:function(e){return this.getFields()[e]},setFieldValue:function(e,n){var r=this,i=r.getFields(e);t.each(i,function(e){r._setFieldValue(e,n)})},_setFieldValue:function(e,r){if(e.get("disabled"))return;if(e instanceof n.Check){var i=e.get("value");r&&(i===r||t.isArray(r)&&t.Array.contains(i,r))?e.set("checked",!0):e.set("checked",!1)}else r==null&&(r=""),e.set("value",r)},getFieldValue:function(e){var n=this,r=n.getFields(e),i=[];return t.each(r,function(e){var t=n._getFieldValue(e);t&&i.push(t)}),i.length===0?null:i.length===1?i[0]:i},_getFieldValue:function(e){return e instanceof n.Check&&!e.get("checked")?null:e.get("value")},clearFields:function(){this.clearErrors(),this.setRecord({})},setRecord:function(e){var n=this,r=n.getFields();t.each(r,function(t){var r=t.get("name");n._setFieldValue(t,e[r])})},updateRecord:function(e){var n=this,r=n.getFields();t.each(r,function(t){var r=t.get("name");e.hasOwnProperty(r)&&n._setFieldValue(t,e[r])})},focus:function(){var e=this,t=e.getFields(),n=t[0];n&&n.focus()},_uiSetDisabled:function(e){var n=this,r=n.get("children");t.each(r,function(t){t.set("disabled",e)})}},{ATTRS:{record:{setter:function(e){this.setRecord(e)},getter:function(){return this.getRecord()}},validators:{value:{}},defaultLoaderCfg:{value:{property:"children",dataType:"json"}},disabled:{sync:!1},isDecorateChild:{value:!0},xview:{value:c}}},{xclass:"form-field-container"});return h.View=c,h}),define("bui/form/group/base",["bui/common","bui/form/fieldcontainer"],function(e){var t=e("bui/common"),n=e +("bui/form/fieldcontainer"),r=n.extend({},{ATTRS:{label:{view:!0},defaultChildClass:{value:"form-field"}}},{xclass:"form-group"});return r}),define("bui/form/group/range",["bui/form/group/base"],function(e){function n(e,t,n){var r=e.get("allowEqual");return r?n<=t:n=u?e._setFieldsEnable(r,!1):e._setFieldsEnable(r,!0)})},_setFieldsEnable:function(e,t){var n=this,r=n.getFields(e);BUI.each(r,function(e){t?e.enable():e.get("checked")||e.disable()})},_uiSetRange:function(e){this.addRule("checkRange",e)}},{ATTRS:{range:{setter:function(e){if(BUI.isString(e)||BUI.isNumber(e))e=[parseInt(e)];return e}}}},{xclass:"form-group-check"});return r}),define("bui/form/group/select",["bui/form/group/base","bui/data"],function(e){function i(e){var t=[];return BUI.each(e,function(e){t.push({text:e.text,value:e.id})}),t}var t=e("bui/form/group/base"),n=e("bui/data"),r=BUI.Component.UIBase.Bindable,s=t.extend([r],{initializer:function(){var e=this,t=e.get("url"),r=e.get("store")||e._getStore();r.isStore||(r.autoLoad=!0,t&&(r.url=t),r=new n.TreeStore(r),e.set("store",r))},bindUI:function(){var e=this;e.on("change",function(t){var n=t.target;if(n!=e){var r=n,i=r.get("value"),s=e._getFieldIndex(r)+1;e._valueChange(i,s)}})},onLoad:function(e){var t=this,n=e?e.node:t.get("store").get("root");t._setFieldItems(n.level,n.children)},_getStore:function(){var e=this,t=e.get("type");return t&&o[t]?o[t]:{}},_valueChange:function(e,t){var n=this,r=n.get("store");if(e){var i=r.findNode(e);if(!i)return;r.isLoaded(i)?n._setFieldItems(t,i.children):r.loadNode(i)}else n._setFieldItems(t,[])},_setFieldItems:function(e,t){var n=this,r=n.getFieldAt(e),s=i(t);r&&(r.setItems(s),n._valueChange(r.get("value"),e+1))},_getFieldIndex:function(e){var t=this,n=t.getFields();return BUI.Array.indexOf(e,n)}},{ATTRS:{type:{},store:{}}},{xclass:"form-group-select"}),o={};return s.addType=function(e,t){o[e]=t},s.addType("city",{proxy:{url:"http://lp.taobao.com/go/rgn/citydistrictdata.php",dataType:"jsonp"},map:{isleaf:"leaf",value:"text"}}),s}),define("bui/form/fieldgroup",["bui/common","bui/form/group/base","bui/form/group/range","bui/form/group/check","bui/form/group/select"],function(e){var t=e("bui/common"),n=e("bui/form/group/base");return t.mix(n,{Range:e("bui/form/group/range"),Check:e("bui/form/group/check"),Select:e("bui/form/group/select")}),n}),define("bui/form/form",["bui/common","bui/toolbar","bui/form/fieldcontainer"],function(e){var t=e("bui/common"),n=e("bui/toolbar").Bar,r=e("bui/form/fieldcontainer"),i=t.Component,s=r.View.extend({_uiSetMethod:function(e){this.get("el").attr("method",e)},_uiSetAction:function(e){this.get("el").attr("action",e)}},{ATTRS:{method:{},action:{}}},{xclass:"form-view"}),o=r.extend({renderUI:function(){var e=this,r=e.get("buttonBar"),i;$.isPlainObject(r)&&e.get("buttons")&&(i=t.merge(e.getDefaultButtonBarCfg(),r),r=new n(i),e.set("buttonBar",r))},bindUI:function(){var e=this,t=e.get("el");t.on("submit",function(t){e.valid(),(!e.isValid()||e.onBeforeSubmit()===!1)&&t.preventDefault()})},getDefaultButtonBarCfg:function(){var e=this,t=e.get("buttons");return{autoRender:!0,elCls:"toolbar",render:e.get("el"),items:t,defaultChildClass:"bar-item-button"}},submit:function(e){var t=this;t.valid();if(t.isValid()){if(t.onBeforeSubmit()==0)return;e||t.get("el")[0].submit()}},serializeToObject:function(){return t.FormHelper.serializeToObject(this.get("el")[0])},onBeforeSubmit:function(){return this.fire("beforesubmit")},reset:function(){var e=this,t=e.get("initRecord");e.setRecord(t)},resetTips:function(){var e=this,n=e.getFields();t.each(n,function(e){e.resetTip()})},destructor:function(){var e=this,t=e.get("buttonBar");t&&t.destroy&&t.destroy()},_uiSetInitRecord:function(e){this.setRecord(e)}},{ATTRS:{action:{view:!0,value:""},allowTextSelection:{value:!0},events:{value:{beforesubmit:!1}},method:{view:!0,value:"get"},decorateCfgFields:{value:{method:!0,action:!0}},defaultChildClass:{value:"form-field"},elTagName:{value:"form"},buttons:{},buttonBar:{value:{}},childContainer:{value:".x-form-fields"},initRecord:{},showError:{value:!1},xview:{value:s},tpl:{value:'
      '}}},{xclass:"form"});return o.View=s,o}),define("bui/form/horizontal",["bui/common","bui/form/form"],function(e){var t=e("bui/common"),n=e("bui/form/form"),r=n.extend({getDefaultButtonBarCfg:function(){var e=this,t=e.get("buttons");return{autoRender:!0,elCls:"actions-bar toolbar row",tpl:'
      ',childContainer:".form-actions",render:e.get("el"),items:t,defaultChildClass:"bar-item-button"}}},{ATTRS:{defaultChildClass:{value:"form-row"},errorTpl:{value:'!{error}'},elCls:{value:"form-horizontal"}},PARSER:{}},{xclass:"form-horizontal"});return r}),define("bui/form/row",["bui/common","bui/form/fieldcontainer"],function(e){var t=e("bui/common"),n=e("bui/form/fieldcontainer"),r=n.extend({},{ATTRS:{elCls:{value:"row"},defaultChildCfg:{value:{tpl:'
      ',childContainer:".controls",showOneError:!0,controlContainer:".controls",elCls:"control-group span8",errorTpl:'!{error}'}},defaultChildClass:{value:"form-field-text"}}},{xclass:"form-row"});return r}),define("bui/form/rule",["bui/common"],function(e){function r(e,t,n,r,i){var o=e,u=o.get("validator"),a=s(e,n,r),f=!0;return t=t==null?"":t,u.call(o,t,n,a,i)}function i(e){if(e==null)return{};if($.isPlainObject(e))return e;var n=e,r={};if(t.isArray(e)){for(var i=0;in)return!1}else{var i=t[0],s=t[1];if(i>n||sn(t))return r}}),l=s.add({name:"length",msg:"\u8f93\u5165\u503c\u957f\u5ea6\u4e3a{0}\uff01",validator:function(e,t,n){if(e!=null){e=$.trim(e.toString());if(t!=e.length)return n}}}),c=s.add({name:"minlength",msg:"\u8f93\u5165\u503c\u957f\u5ea6\u4e0d\u5c0f\u4e8e{0}\uff01",validator:function(e,t,n){if(e!=null){e=$.trim(e.toString());var r=e.length;if(rt)return n}}}),p=s.add({name:"regexp",msg:"\u8f93\u5165\u503c\u4e0d\u7b26\u5408{0}\uff01",validator:function(e,t,n){if(t)return t.test(e)?undefined:n}}),d=s.add({name:"email",msg:"\u4e0d\u662f\u6709\u6548\u7684\u90ae\u7bb1\u5730\u5740\uff01",validator:function(e,t,n){e=$.trim(e);if(e)return/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(e)?undefined:n}}),v=s.add({name:"date",msg:"\u4e0d\u662f\u6709\u6548\u7684\u65e5\u671f\uff01",validator:function(e,t,n){if(BUI.isNumber(e))return;if(BUI.isDate(e))return;e=$.trim(e);if(e)return BUI.Date.isDateString(e)?undefined:n}}),m=s.add({name:"minDate",msg:"\u8f93\u5165\u65e5\u671f\u4e0d\u80fd\u5c0f\u4e8e{0}\uff01",validator:function(e,t,n){if(e){var i=r(e);if(i&&ir(t))return n}}}),y=s.add({name:"number",msg:"\u4e0d\u662f\u6709\u6548\u7684\u6570\u5b57\uff01",validator:function(e,t,n){if(BUI.isNumber(e))return;return e=e.replace(/\,/g,""),isNaN(e)?n:undefined}}),S=s.add({name:"dateRange",msg:"\u7ed3\u675f\u65e5\u671f\u4e0d\u80fd\u5c0f\u4e8e\u8d77\u59cb\u65e5\u671f\uff01",validator:E}),x=s.add({name:"numberRange",msg:"\u7ed3\u675f\u6570\u5b57\u4e0d\u80fd\u5c0f\u4e8e\u5f00\u59cb\u6570\u5b57\uff01",validator:E}),C=s.add({name:"checkRange",msg:"\u5fc5\u987b\u9009\u4e2d{0}\u9879\uff01",validator:function(e,t,n,r){var i=T(r),s,o=t;if(i&&o){s=e[i];if(!N(s,o))return n}return null}});return s}),define("bui/form/remote",["bui/common"],function(e){var t=e("bui/common"),n=function(){};n.ATTRS={isLoading:{},loadingEl:{}},n.prototype={getLoadingContainer:function(){},_setLoading:function(){var e=this,t=e.get("loadingEl"),n=e.get("loadingTpl");t||(t=$(n).appendTo(e.getLoadingContainer()),e.setInternal("loadingEl",t))},_clearLoading:function(){var e=this,t=e.get("loadingEl");t&&(t.remove(),e.setInternal("loadingEl",null))},_uiSetIsLoading:function(e){var t=this;e?t._setLoading():t._clearLoading()}};var r=function(){};return r.ATTRS={defaultRemote:{value:{method:"GET",cache:!0,callback:function(e){return e}}},remoteDaly:{value:500},loadingTpl:{view:!0,value:'loading'},isLoading:{view:!0,value:!1},remote:{setter:function(e){return t.isString(e)&&(e={url:e}),e}},remoteHandler:{},events:{value:{remotecomplete:!1,remotestart:!1}}},r.prototype={__bindUI:function(){var e=this;e.on("change",function(t){if(e.get("remote")&&e.isValid()){var n=e.getRemoteParams();e._startRemote(n)}}),e.on("error",function(t){e.get("remote")&&e._cancelRemote()})},_startRemote:function(e){function i(){t._remoteValid(e,n),t.set("isLoading",!0)}var t=this,n=t.get("remoteHandler"),r=t.get("remoteDaly");n&&t._cancelRemote(n),n=setTimeout(i,r),t.setInternal("remoteHandler",n)},_remoteValid:function(e,n){function u(e,t){n==r.get("remoteHandler")&&(r.fire("remotecomplete",{error:e,data:t}),r.set("isLoading",!1),r.setInternal("remoteHandler",null))}var r=this,i=r.get("remote"),s=r.get("defaultRemote"),o=t.merge(s,i,{data:e});o.success=function(e){var t=o.callback,n=t(e);u(n,e)},o.error=function(e,t,n){u(n)},r.fire("remotestart",{data:e}),$.ajax(o)},getRemoteParams:function(){},_cancelRemote:function(e){var t=this;e=e||t.get("remoteHandler"),e&&(clearTimeout(e),t.setInternal("remoteHandler",null)),t.set("isLoading",!1)}},r.View=n,r}),define("bui/select",["bui/common","bui/select/select","bui/select/combox","bui/select/suggest"],function(e){var t=e("bui/common"),n=t.namespace("Select");return t.mix(n,{Select:e("bui/select/select"),Combox:e("bui/select/combox"),Suggest:e("bui/select/suggest")}),n}),define("bui/select/select",["bui/common","bui/picker"],function(e){"use strict";function i(e){if($.isPlainObject(e)){var n=[];return t.each(e,function(e,t){n.push({value:t,text:e})}),n}var r=[];return t.each(e,function(e,n){t.isString(e)?r.push({value:e,text:e}):r.push(e)}),r}var t=e("bui/common"),n=e("bui/picker").ListPicker,r=t.prefix,s=t.Component,o=n,u=r+"select-input",a=s.Controller.extend({initializer:function(){var e=this,t=e.get("multipleSelect"),n,s=e.get("picker");s?e.get("valueField")&&s.set("valueField",e.get("valueField")):(n=t?"listbox":"simple-list",s=new o({children:[{xclass:n,elCls:r+"select-list",store:e.get("store"),items:i(e.get("items"))}],valueField:e.get("valueField")}),e.set("picker",s)),t&&s.set("hideEvent","")},renderUI:function(){var e=this,t=e.get("picker"),n=e.get("el"),r=n.find("."+e.get("inputCls"));t.set("trigger",n),t.set("triggerEvent",e.get("triggerEvent")),t.set("autoSetValue",e.get("autoSetValue")),t.set("textField",r),e.get("forceFit")&&t.set("width",n.outerWidth()),t.render()},bindUI:function(){var e=this,t=e.get("picker"),n=t.get("list"),r=n.get("store");t.on("selectedchange",function(t){e.fire("change",{text:t.text,value:t.value,item:t.item})}),n.on("itemsshow",function(){e._syncValue()})},containsElement:function(e){var t=this,n=t.get("picker");return s.Controller.prototype.containsElement.call(this,e)||n.containsElement(e)},_uiSetItems:function(e){if(!e)return;var t=this,n=t.get("picker"),r=n.get("list");r.set("items",i(e)),t._syncValue()},_syncValue:function(){var e=this,t=e.get("picker"),n=e.get("valueField");n&&t.setSelectedValue($(n).val())},_uiSetName:function(e){var t=this,n=t._getTextEl();e&&n.attr("name",e)},_uiSetWidth:function(e){var t=this;if(e!=null){var n=t._getTextEl(),r=t.get("el").find(".x-icon"),i=n.outerWidth()-n.width(),s=t.get("picker"),o=e-r.outerWidth()-i;n.width(o),t.get("forceFit")&&s.set("width",e)}},_getTextEl:function(){var e=this,t=e.get("el");return t.find("."+e.get("inputCls"))},destructor:function(){var e=this,t=e.get("picker");t&&t.destroy()},_getList:function(){var e=this,t=e.get("picker"),n=t.get("list");return n},getSelectedValue:function(){return this.get("picker").getSelectedValue()},setSelectedValue:function(e){var t=this,n=t.get("picker");n.setSelectedValue(e)},getSelectedText:function(){return this.get("picker").getSelectedText()}},{ATTRS:{picker:{},valueField:{},store:{},focusable:{value:!0},multipleSelect:{value:!1},name:{},items:{sync:!1},inputCls:{value:u},forceFit:{value:!0},events:{value:{change:!1}},tpl:{view:!0,value:''},triggerEvent:{value:"click"}}},{xclass:"select"});return a}),define("bui/select/combox",["bui/common","bui/select/select"],function(e){function i(e,t,n){var r=n.get("list"),i=n.getSelectedText();i&&$(e).val(i)}var t=e("bui/common"),n=e("bui/select/select"),r=t.prefix+"combox-input",s=n.extend({renderUI:function(){var e=this,t=e.get("picker");t.get("getFunction",i)},_uiSetItems:function(e){var n=this;for(var r=0;r'},inputCls:{value:r}}},{xclass:"combox"});return s}),define("bui/select/suggest",["bui/common","bui/select/combox"],function(e){"use strict";var t=e("bui/common"),n=e("bui/select/combox"),r=200,i="",s=n.extend({bindUI:function(){var e=this,t=e.get("el").find("input"),n=e.get("triggerEvent")==="keyup"?"keyup":"keyup click";t.on(n,function(){e._start()})},_start:function(){var e=this;e._timer=e.later(function(){e._updateContent()},r)},_updateContent:function(){var e=this,t=e.get("data"),n=e.get("el").find("input"),r;if(!t&&n.val()===e.get("query"))return;e.set("query",n.val()),r=n.val();if(!t&&!r)return;var i=e.get("cacheable"),s=e.get("url"),o=e.get("data");if(i&&s){var u=e.get("dataCache");u[r]!==undefined?e._handleResponse(u[r]):e._requestData()}else s?e._requestData():o&&e._handleResponse(o,!0)},_getStore:function(){var e=this,t=e.get("picker"),n=t.get("list");if(n)return n.get("store")},_requestData:function(){var e=this,t=e.get("el").find("input"),n=e.get("callback"),r=e.get("store"),i={};i[t.attr("name")]=t.val(),r?(i.start=0,r.load(i,n)):$.ajax({url:e.get("url"),type:"post",dataType:e.get("dataType"),data:i,success:function(t){e._handleResponse(t),n&&n(t)}})},_handleResponse:function(e,t){var n=this,r=t?n._getFilterItems(e):e;n.set("items",r),n.get("cacheable")&&(n.get("dataCache")[n.get("query")]=r)},_getItemText:function(e){var t=this,n=t.get("picker"),r=n.get("list");return r?r.getItemText(e):""},_getFilterItems:function(e){function u(e,n){t.isString(n)?r.push(e):r.push(n)}var n=this,r=[],i=n.get("el").find("input"),s=i.val(),o=n.get("data");return e=e||[],t.each(e,function(e){var r=t.isString(e)?e:n._getItemText(e);o?r.indexOf($.trim(s))!==-1&&u(r,e):u(r,e)}),r},later:function(e,t,n){t=t||0;var r=n?setInterval(e,t):setTimeout(e,t);return{id:r,interval:n,cancel:function(){this.interval?clearInterval(r):clearTimeout(r)}}}},{ATTRS:{data:{value:null},query:{value:i},cacheable:{value:!1},dataCache:{value:{}},dataType:{value:"jsonp"},url:{},callback:{},triggerEvent:{valueFn:function(){return this.get("data")?"click":"keyup"}},autoSetValue:{value:!1}}},{xclass:"suggest"});return s}),define("bui/mask",["bui/common","bui/mask/mask","bui/mask/loadmask"],function(e){var t=e("bui/common"),n=e("bui/mask/mask");return n.LoadMask=e("bui/mask/loadmask"),n}),define("bui/mask/mask",["bui/common"],function(e){var t=e("bui/common"),n=t.namespace("Mask"),r=t.UA,i=t.prefix+"ext-mask",s=i+"-msg";return t.mix(n,{maskElement:function(e,n,o){var u=$(e),a=$("."+i,u),f=null,l=null,c=null,h=null;if(!a.length){a=$('
      ').appendTo(u),u.addClass("x-masked-relative x-masked"),r.ie===6&&a.height(u.height());if(n){f=['
      ',n,"
      "].join(""),l=$(f).appendTo(u),o&&l.addClass(o);try{c=(u.height()-l.height())/2,h=(u.width()-l.width())/2,l.css({left:h,top:c})}catch(p){t.log("mask error occurred")}}}return a},unmaskElement:function(e){var t=$(e),n=t.children("."+s),r=t.children("."+i);n&&n.remove(),r&&r.remove(),t.removeClass("x-masked-relative x-masked")}}),n}),define("bui/mask/loadmask",["bui/mask/mask"],function(e){function n(e){var t=this;n.superclass.constructor.call(t,e)}var t=e("bui/mask/mask");return BUI.extend(n,BUI.Base),n.ATTRS={el:{},msg:{value:"Loading..."},msgCls:{value:"x-mask-loading"},disabled:{value:!1}},BUI.augment(n,{disable:function(){this.set("disabled",!0)},onLoad:function(){t.unmaskElement(this.get("el"))},onBeforeLoad:function(){var e=this;e.get("disabled")||t.maskElement(e.get("el"),e.get("msg"),this.get("msgCls"))},show:function(){this.onBeforeLoad()},hide:function(){this.onLoad()},destroy:function(){this.hide(),this.clearAttrVals(),this.off()}}),n}),define("bui/menu",["bui/common","bui/menu/menu","bui/menu/menuitem","bui/memu/contextmenu","bui/menu/popmenu","bui/menu/sidemenu"],function(e){var t=e("bui/common"),n=t.namespace("Menu");return t.mix(n,{Menu:e("bui/menu/menu"),MenuItem:e("bui/menu/menuitem"),ContextMenu:e("bui/memu/contextmenu"),PopMenu:e("bui/menu/popmenu"),SideMenu:e("bui/menu/sidemenu")}),n.ContextMenuItem=n.ContextMenu.Item,n}),define("bui/menu/menuitem",["bui/common"],function(e){var t=e("bui/common"),n=t.Component,r=n.UIBase,i=t.prefix,s=i+"menu-item-open",o="x-caret",u=i+"menu-item-collapsed",a="data-id",f=n.View.extend([r.ListItemView,r.CollapseableView],{_uiSetOpen:function(e){var t=this,n=t.getStatusCls("open");e?t.get("el").addClass(n):t.get("el").removeClass(n)}},{ATTRS:{}},{xclass:"menu-item-view"}),l=n.Controller.extend([r.ListItem,r.Collapseable],{renderUI:function(){var e=this,n=e.get("el"),r=e.get("id"),i=null;r||(r=t.guid("menu-item"),e.set("id",r)),n.attr(a,r)},handleMouseEnter:function(e){var t=this;this.get("subMenu")&&this.set("open",!0),l.superclass.handleMouseEnter.call(this,e)},handleMouseLeave:function(e){var t=this,n=t.get("subMenu"),r=e.toElement;r&&n&&n.containsElement(r)?t.set("open",!0):t.set("open",!1),l.superclass.handleMouseLeave.call(this,e)},containsElement:function(e){var t=this,n,r=l.superclass.containsElement.call(t,e);return r||(n=t.get("subMenu"),r=n&&n.containsElement(e)),r},_uiSetOpen:function(e){var t=this,n=t.get("subMenu"),r=t.get("subMenuAlign");if(n)if(e)r.node=t.get("el"),n.set("align",r),n.show();else{var i=n.get("align");(!i||i.node==t.get("el"))&&n.hide()}},_uiSetSubMenu:function(e){if(e){var t=this,n=t.get("el"),r=t.get("parent");e.get("parentMenu")||(e.set("parentMenu",r),r.get("autoHide")&&e.set("autoHide",!1)),$(t.get("arrowTpl")).appendTo(n)}},destructor:function(){var e=this,t=e.get("subMenu");t&&t.destroy()}},{ATTRS:{elTagName:{value:"li"},xview:{value:f},open:{view:!0,value:!1},subMenu:{view:!0},subMenuAlign:{valueFn:function(e){return{points:["tr","tl"],offset:[-5,0]}}},arrowTpl:{value:''},events:{value:{afterOpenChange:!0}}}},{xclass:"menu-item",priority:0}),c=l.extend({},{ATTRS:{focusable:{value:!1},selectable:{value:!1},handleMouseEvents:{value:!1}}},{xclass:"menu-item-sparator"});return l.View=f,l.Separator=c,l}),define("bui/menu/menu",["bui/common"],function(e){var t=e("bui/common"),n=t.Component,r=n.UIBase,i=n.Controller.extend([r.ChildList],{bindUI:function(){var e=this;e.on("click",function(t){var n=t.target,r=e.get("multipleSelect");e!=n&&!r&&e.get("clickHide")&&!n.get("subMenu")&&e.getTopAutoHideMenu().hide()}),e.on("afterOpenChange",function(n){var r=n.target,i=n.newVal,s=e.get("children");i&&t.each(s,function(e){e!==r&&e.get("open")&&e.set("open",!1)})}),e.on("afterVisibleChange",function(t){var n=t.newVal,r=e.get("parentMenu");e._clearOpen()})},getTopAutoHideMenu:function(){var e=this,t=e.get("parentMenu"),n;return t&&t.get("autoHide")?t.getTopAutoHideMenu():e.get("autoHide")?e:null},_clearOpen:function(){var e=this,n=e.get("children");t.each(n,function(e){e.set&&e.set("open",!1)})},findItemById:function(e){return this.findItemByField("id",e)},_uiSetSelectedItem:function(e){e&&_self.setSelected(e)}},{ATTRS:{elTagName:{view:!0,value:"ul"},idField:{value:"id"},defaultChildClass:{value:"menu-item"},selectedItem:{},parentMenu:{}}},{xclass:"menu",priority:0});return i}),define("bui/menu/popmenu",["bui/common","bui/menu/menu"],function(e){var t=e("bui/common"),n=t.Component.UIBase,r=e("bui/menu/menu"),i=t.Component.View.extend([n.PositionView],{}),s=r.extend([n.Position,n.Align,n.AutoShow,,n.AutoHide],{},{ATTRS:{clickHide:{value:!0},align:{value:{points:["bl","tl"],offset:[0,0]}},visibleMode:{value:"visibility"},autoHide:{value:!0},visible:{value:!1},xview:{value:i}}},{xclass:"pop-menu"});return s}),define("bui/memu/contextmenu",["bui/common","bui/menu/menuitem","bui/menu/popmenu"],function(e){var t=e("bui/common"),n=e("bui/menu/menuitem"),r=e("bui/menu/popmenu"),i=t.prefix,s=i+"menu-item-link",o=i+"menu-item-icon",u=t.Component,a=u.UIBase,f=n.extend({bindUI:function(){var e=this;e.get("el").delegate("."+s,"click",function(e){e.preventDefault()})},_uiSetIconCls:function(e,t){var n=this,r=t.prevVal,i=n.get("el").find("."+o);i.removeClass(r),i.addClass(e)}},{ATTRS:{text:{veiw:!0,value:""},iconCls:{sync:!1,value:""},tpl:{value:' {text}'}}},{xclass:"context-menu-item"}),l=r.extend({},{ATTRS:{defaultChildClass:{value:"context-menu-item"},align:{value:null}}},{xclass:"context-menu"});return l.Item=f,l}),define("bui/menu/sidemenu",["bui/common","bui/menu/menu"],function(e){var t=e("bui/common"),n=e("bui/menu/menu"),r=t.Component,i=t.prefix+"menu-title",s="menu-leaf",o=n.extend({initializer:function(){var e=this,n=e.get("items"),r=e.get("children");t.each(n,function(t){var n=e._initMenuCfg(t);r.push(n)})},bindUI:function(){var e=this,n=e.get("children");t.each(n,function(e){var t=e.get("children")[0];t&&t.publish("click",{bubbles:1})}),e.get("el").delegate("a","click",function(e){e.preventDefault()}),e.on("itemclick",function(t){var n=t.item,r=$(t.domTarget).closest("."+i);if(r.length){var o=n.get("collapsed");n.set("collapsed",!o)}else n.get("el").hasClass(s)&&(e.fire("menuclick",{item:n}),e.clearSelection(),e.setSelected(n))})},getItems:function(){var e=this,n=[],r=e.get("children");return t.each(r,function(e){var t=e.get("children")[0];n=n.concat(t.get("children"))}),n},_initMenuCfg:function(e){var n=this,r=e.items,s=[],o={xclass:"menu-item",elCls:"menu-second",collapsed:e.collapsed,selectable:!1,children:[{xclass:"menu",children:s}],content:'
      '+e.text+"
      "};return t.each(r,function(e){var t=n._initSubMenuCfg(e);s.push(t)}),o},_initSubMenuCfg:function(e){var n=this,r={xclass:"menu-item",elCls:"menu-leaf",tpl:'{text}'};return t.mix(r,e)}},{ATTRS:{autoInitItems:{value:!1},events:{value:{menuclick:!1}}}},{xclass:"side-menu"});return o}),define("bui/tab",["bui/common","bui/tab/tab","bui/tab/tabitem","bui/tab/navtabitem","bui/tab/navtab","bui/tab/tabpanel","bui/tab/tabpanelitem"],function(e){var t=e("bui/common"),n=t.namespace("Tab");return t.mix(n,{Tab:e("bui/tab/tab"),TabItem:e("bui/tab/tabitem"),NavTabItem:e("bui/tab/navtabitem"),NavTab:e("bui/tab/navtab"),TabPanel:e("bui/tab/tabpanel"),TabPanelItem:e("bui/tab/tabpanelitem")}),n}),define("bui/tab/navtabitem",["bui/common"],function(e){var t=e("bui/common"),n=t.Component,r="tab-item-title",i="tab-item-close",s="tab-nav-actived",o="tab-content",u=n.View.extend({renderUI:function(){var e=this,t=e.get("tabContentContainer"),n=e.get("tabContentTpl");if(t){var r=$(n).appendTo(t);e.set("tabContentEl",r)}},_uiSetHref:function(e){this._setHref(e)},_setHref:function(e){var t=this,n=t.get("tabContentEl");e=e||t.get("href"),n&&$("iframe",n).attr("src",e)},resetHref:function(){this._setHref()},_uiSetTitle:function(e){var t=this,n=t.get("el");n.attr("title",e),$("."+r,n).text(e)},_uiSetActived:function(e){var t=this,n=t.get("el");t.setTabContentVisible(e),e?n.addClass(s):n.removeClass(s)},destructor:function(){var e=this,t=e.get("tabContentEl");t&&t.remove()},setTabContentVisible:function(e){var t=this,n=t.get("tabContentEl");n&&(e?n.show():n.hide())}},{ATTRS:{tabContentContainer:{},tabContentEl:{},title:{},href:{}}}),a=n.Controller.extend({createDom:function(){var e=this,t=e.get("parent");t&&e.set("tabContentContainer",t.getTabContentContainer())},bindUI:function(){var e=this,t=e.get("el"),n=e.get("events");t.on("click",function(t){var n=$(t.target);n.hasClass(i)&&e.fire("closing")!==!1&&e.close()})},handleDblClick:function(e){var t=this;t.fire("closing")!==!1&&t.close(),t.fire("dblclick",{domTarget:e.target,domEvent:e})},handleContextMenu:function(e){e.preventDefault(),this.fire("showmenu",{position:{x:e.pageX,y:e.pageY}})},setTitle:function(e){this.set("title",e)},close:function(){this.fire("closed")},reload:function(){this.get("view").resetHref()},show:function(){var e=this;e.get("el").show(500,function(){e.set("visible",!0)})},hide:function(e){var t=this;this.get("el").hide(500,function(){t.set("visible",!1),e&&e()})},_uiSetActived:function(e){var t=this,n=t.get("parent");n&&e&&n._setItemActived(t)},_uiSetCloseable:function(e){var t=this,n=t.get("el"),r=n.find("."+i);e?r.show():r.hide()}},{ATTRS:{elTagName:{value:"li"},actived:{view:!0,value:!1},closeable:{value:!0},allowTextSelection:{view:!1,value:!1},events:{value:{click:!0,closing:!0,closed:!0,showmenu:!0,afterVisibleChange:!0}},tabContentContainer:{view:!0},tabContentTpl:{view:!0,value:''},href:{view:!0,value:""},visible:{view:!0,value:!0},title:{view:!0,value:""},tpl:{view:!0,value:''},xview:{value:u}}},{xclass:"nav-tab-item",priority:0});return a.View=u,a}),define("bui/tab/navtab",["bui/common","bui/menu"],function(e){var t=e("bui/common"),n=e("bui/menu"),r=t.Component,i="tab-nav-list",s="arrow-left",o="arrow-right",u="m_close",a=140,f=r.View.extend({renderUI:function(){var e=this,t=e.get("el"),n=null;n=t.find("."+i),e.setInternal("listEl",n)},getContentElement:function(){return this.get("listEl")},getTabContentContainer:function(){return this.get("el").find(".tab-content-container")},_uiSetHeight:function(e){var t=this,n=t.get("el"),r=n.find(".tab-nav-bar"),i=t.getTabContentContainer();e&&i.height(e-r.height()),n.height(e)}},{},{xclass:"nav-tab-view",priority:0}),l=r.Controller.extend({addTab:function(e,n){var r=this,i=e.id||t.guid("tab-item"),s=r.getItemById(i);if(s){var o=!1;e.href&&s.get("href")!=e.href&&(s.set("href",e.href),o=!0),r._setItemActived(s),n&&!o&&s.reload()}else e=t.mix({id:i,visible:!1,actived:!0,xclass:"nav-tab-item"},e),s=r.addChild(e),s.show(),r._resetItemList();return s},getTabContentContainer:function(){return this.get("view").getTabContentContainer()},bindUI:function(){var e=this;e._bindScrollEvent(),e.on("click",function(t){var n=t.target;n!=e&&(e._setItemActived(n),e.fire("itemclick",{item:n}))}),e.on("closed",function(t){var n=t.target;e._closeItem(n)}),e.on("showmenu",function(t){e._showMenu(t.target,t.position)}),e.on("afterVisibleChange",function(t){var n=t.target;n.get("actived")&&e._scrollToItem(n)})},_bindScrollEvent:function(){var e=this,t=e.get("el");t.find(".arrow-left").on("click",function(){t.hasClass(s+"-active")&&e._scrollLeft()}),t.find(".arrow-right").on("click",function(){t.hasClass(o+"-active")&&e._scrllRight()})},_showMenu:function(e,t){var n=this,r=n._getMenu(),i=e.get("closeable"),s;n.set("showMenuItem",e),r.set("xy",[t.x,t.y]),r.show(),s=r.getItem(u),s&&s.set("disabled",!i)},setActived:function(e){var t=this,n=t.getItemById(e);t._setItemActived(n)},getActivedItem:function(){var e=this,n=e.get("children"),r=null;return t.each(n,function(e){if(e.get("actived"))return r=e,!1}),r},getItemById:function(e){var n=this,r=n.get("children"),i=null;return t.each(r,function(t){if(t.get("id")===e)return i=t,!1}),i},_getMenu:function(){var e=this;return e.get("menu")||e._initMenu()},_initMenu:function(){var e=this,t=new n.ContextMenu({children:[{xclass:"context-menu-item",iconCls:"icon icon-refresh",text:"\u5237\u65b0",listeners:{click:function(){var t=e.get("showMenuItem");t&&t.reload()}}},{id:u,xclass:"context-menu-item",iconCls:"icon icon-remove",text:"\u5173\u95ed",listeners:{click:function(){var t=e.get("showMenuItem");t&&t.close()}}},{xclass:"context-menu-item",iconCls:"icon icon-remove-sign",text:"\u5173\u95ed\u5176\u4ed6",listeners:{click:function(){var t=e.get("showMenuItem");t&&e.closeOther(t)}}},{xclass:"context-menu-item",iconCls:"icon icon-remove-sign",text:"\u5173\u95ed\u6240\u6709",listeners:{click:function(){e.closeAll()}}}]});return e.set("menu",t),t},_closeItem:function(e){var t=this,n=t._getIndex(e),r=t.getActivedItem(),i=t._getItemByIndex(n-1),s=t._getItemByIndex(n+1);e.hide(function(){t.removeChild(e,!0),t._resetItemList(),r===e?i?t._setItemActived(i):t._setItemActived(s):t._scrollToItem(r)})},closeAll:function(){var e=this,n=e.get("children");t.each(n,function(e){e.close()})},closeOther:function(e){var n=this,r=n.get("children");t.each(r,function(t){e!==t&&t.close()})},_getItemByIndex:function(e){var t=this,n=t.get("children");return n[e]},_getIndex:function(e){var n=this,r=n.get("children");return t.Array.indexOf(e,r)},_resetItemList:function(){var e=this,t=e.get("children"),n=e.getContentElement(),r=t.length*a;n.width(r)},_scrollToItem:function(e){var t=this,n=t.getContentElement(),r=n.position(),i=t._getDistanceToEnd(e,n,r),s=t._getDistanceToBegin(e,r);if(n.width()0)t._scrollTo(n,r.left+i*-1);else if(r.left<0){var o=t._getLastDistance(n,r),u=0;o<0&&(u=r.left-o,u=u<0?u:0,t._scrollTo(n,u))}},_getDistanceToBegin:function(e,t){var n=e.get("el").position();return n.left+t.left},_getDistanceToEnd:function(e,t,n){var r=this,t=t||r.getContentElement(),i=t.parent().width(),n=n||t.position(),s=r._getDistanceToBegin(e,n),o=s+a-i;return o},_getLastDistance:function(e,t){var n=this,r=n.get("children"),i=r[r.length-1];return i?n._getDistanceToEnd(i,e,t):0},_scrollTo:function(e,t,n){var r=this;e.animate({left:t},500,function(){r._setArrowStatus(e)})},_scrollLeft:function(){var e=this,t=e.getContentElement(),n=t.position(),r=e._getLastDistance(t,n),i;r>0&&(i=r>a?a:r,e._scrollTo(t,n.left-i))},_scrllRight:function(){var e=this,t=e.getContentElement(),n=t.position(),r;n.left<0&&(r=n.left+a,r=r<0?r:0,e._scrollTo(t,r))},_setArrowStatus:function(e,t){e=e||this.getContentElement();var n=this,r=n.get("el"),i=t||e.position(),u=n._getLastDistance(e,t);i.left<0?r.addClass(o+"-active"):r.removeClass(o+"-active"),u>0?r.addClass(s+"-active"):r.removeClass(s+"-active")},_setItemActived +:function(e){var t=this,n=t.getActivedItem();if(e===n)return;n&&n.set("actived",!1),e&&(e.get("actived")||e.set("actived",!0),e.get("visible")&&t._scrollToItem(e),t.fire("activeChange",{item:e}))}},{ATTRS:{defaultChildClass:{value:"nav-tab-item"},menu:{},tpl:{view:!0,value:'
        '+"
        "+'
        '},xview:{value:f},events:{value:{itemclick:!1}}}},{xclass:"nav-tab",priority:0});return l}),define("bui/tab/tabitem",["bui/common"],function(e){var t=e("bui/common"),n=t.Component,r=n.UIBase,i=n.View.extend([r.ListItemView],{},{xclass:"tab-item-view"}),s=n.Controller.extend([r.ListItem],{},{ATTRS:{elTagName:{view:!0,value:"li"},xview:{value:i},tpl:{view:!0,value:'{text}'}}},{xclass:"tab-item"});return s.View=i,s}),define("bui/tab/tab",["bui/common"],function(e){var t=e("bui/common"),n=t.Component,r=n.UIBase,i=n.Controller.extend([r.ChildList],{},{ATTRS:{elTagName:{view:!0,value:"ul"},defaultChildClass:{value:"tab-item"}}},{xclass:"tab"});return i}),define("bui/tab/tabpanelitem",["bui/common","bui/tab/tabitem"],function(e){var t=e("bui/common"),n=e("bui/tab/tabitem"),r=t.Component,i=n.View.extend({},{xclass:"tab-panel-item-view"}),s=n.extend({renderUI:function(){var e=this,t=e.get("selected");e._setPanelVisible(t)},_setPanelVisible:function(e){var t=this,n=t.get("panel"),r=e?"show":"hide";n&&$(n)[r]()},_uiSetSelected:function(e){this._setPanelVisible(e)},destructor:function(){var e=this,t=e.get("panel");t&&e.get("panelDestroyable")&&$(t).remove()},_uiSetPanelContent:function(e){var t=this,n=t.get("panel");$(n).html(e)}},{ATTRS:{panel:{},panelContent:{},defaultLoaderCfg:{valueFn:function(){var e=this;return{property:"panelContent",autoLoad:!1,lazyLoad:{event:"afterSelectedChange"},loadMask:{el:e.get("panel")}}}},panelDestroyable:{value:!0},xview:{value:i}}},{xclass:"tab-panel-item"});return s.View=i,s}),define("bui/tab/tabpanel",["bui/common","bui/tab/tab"],function(e){var t=e("bui/common"),n=e("bui/tab/tab"),r=n.extend({initializer:function(){var e=this,n=e.get("children"),r=$(e.get("panelContainer")),i=e.get("panelCls"),s=i?r.find("."+s):r.children();t.each(n,function(e,t){e.set?e.set("panel",s[t]):e.panel=s[t]})}},{ATTRS:{defaultChildClass:{value:"tab-panel-item"},panelContainer:{},panelCls:{}}},{xclass:"tab-panel"});return r}),define("bui/toolbar",["bui/common","bui/toolbar/baritem","bui/toolbar/bar","bui/toolbar/pagingbar","bui/toolbar/numberpagingbar"],function(e){var t=e("bui/common"),n=t.namespace("Toolbar");return t.mix(n,{BarItem:e("bui/toolbar/baritem"),Bar:e("bui/toolbar/bar"),PagingBar:e("bui/toolbar/pagingbar"),NumberPagingBar:e("bui/toolbar/numberpagingbar")}),n}),define("bui/toolbar/baritem",function(){var e=BUI.prefix,t=BUI.Component,n=t.UIBase,r=t.View.extend([n.ListItemView]),i=t.Controller.extend([n.ListItem],{renderUI:function(){var t=this.get("el");t.addClass(e+"inline-block"),t.attr("id")||t.attr("id",this.get("id"))}},{ATTRS:{elTagName:{view:!0,value:"li"},selectable:{value:!1},focusable:{value:!1},xview:{value:r}}},{xclass:"bar-item",priority:1}),s=i.extend({_uiSetDisabled:function(t){var n=this,r=n.get("el"),i=t?"addClass":"removeClass";r.find("button").attr("disabled",t)[i](e+"button-disabled")},_uiSetChecked:function(t){var n=this,r=n.get("el"),i=t?"addClass":"removeClass";r.find("button")[i](e+"button-checked")},_uiSetText:function(e){var t=this,n=t.get("el");n.find("button").text(e)},_uiSetbtnCls:function(e){var t=this,n=t.get("el");n.find("button").addClass(e)}},{ATTRS:{checked:{value:!1},tpl:{view:!0,value:''},btnCls:{sync:!1},text:{sync:!1,value:""}}},{xclass:"bar-item-button",priority:2}),o=i.extend({renderUI:function(){var e=this.get("el");e.attr("role","separator")}},{xclass:"bar-item-separator",priority:2}),u=i.extend({},{ATTRS:{width:{view:!0,value:2}}},{xclass:"bar-item-spacer",priority:2}),a=i.extend({_uiSetText:function(e){var t=this,n=t.get("el");n.html(e)}},{ATTRS:{text:{value:""}}},{xclass:"bar-item-text",priority:2});return i.types={button:s,separator:o,spacer:u,text:a},i}),define("bui/toolbar/bar",function(){var e=BUI.Component,t=e.UIBase,n=e.View.extend({renderUI:function(){var e=this.get("el");e.attr("role","toolbar"),e.attr("id")||e.attr("id",BUI.guid("bar"))}}),r=e.Controller.extend([t.ChildList],{getItem:function(e){return this.getChild(e)}},{ATTRS:{elTagName:{view:!0,value:"ul"},defaultChildClass:{value:"bar-item"},focusable:{value:!1},xview:{value:n}}},{xclass:"bar",priority:1});return r}),define("bui/toolbar/pagingbar",["bui/toolbar/bar"],function(e){var t=e("bui/toolbar/bar"),n=BUI.Component,r=n.UIBase.Bindable,i=BUI.prefix,s="first",o="prev",u="next",a="last",f="skip",l="totalPage",c="curPage",h="totalCount",p=t.extend([r],{initializer:function(){var e=this,t=e.get("children"),n=e.get("items"),r=e.get("store");if(!n||n.length)n=e._getItems(),BUI.each(n,function(e){t.push(e)});r&&r.get("pageSize")&&e.set("pageSize",r.get("pageSize"))},bindUI:function(){var e=this;e._bindButtonEvent()},jumpToPage:function(e){if(e<=0||e>this.get("totalPage"))return;var t=this,n=t.get("store"),r=t.get("pageSize"),i=e-1,s=i*r,o=t.fire("beforepagechange",{from:t.get("curPage"),to:e});n&&o!==!1&&n.load({start:s,limit:r,pageIndex:i})},_afterStoreLoad:function(e,t){var n=this,r=n.get("pageSize"),i=0,s,o,u,a;i=e.get("start"),o=e.getTotalCount(),s=o-i>r?i+e.getCount():o,a=parseInt((o+r-1)/r,10),a=a>0?a:1,u=parseInt(i/r,10)+1,n.set("start",i),n.set("end",s),n.set("totalCount",o),n.set("curPage",u),n.set("totalPage",a),n._setAllButtonsState(),n._setNumberPages()},_bindButtonEvent:function(){function n(){var t=parseInt(e._getCurrentPageValue(),10);e._isPageAllowRedirect(t)?e.jumpToPage(t):e._setCurrentPageValue(e.get("curPage"))}var e=this;e._bindButtonItemEvent(s,function(){e.jumpToPage(1)}),e._bindButtonItemEvent(o,function(){e.jumpToPage(e.get("curPage")-1)}),e._bindButtonItemEvent(u,function(){e.jumpToPage(e.get("curPage")+1)}),e._bindButtonItemEvent(a,function(){e.jumpToPage(e.get("totalPage"))}),e._bindButtonItemEvent(f,function(){n()});var t=e.getItem(c);t&&t.get("el").on("keyup",function(e){e.stopPropagation(),e.keyCode===13&&n()})},_bindButtonItemEvent:function(e,t){var n=this,r=n.getItem(e);r&&r.on("click",t)},onLoad:function(e){var t=this,n=t.get("store");t._afterStoreLoad(n,e)},_getItems:function(){var e=this,t=e.get("items");return t&&t.length?t:(t=[],t.push(e._getButtonItem(s)),t.push(e._getButtonItem(o)),t.push(e._getSeparator()),t.push(e._getTextItem(l)),t.push(e._getTextItem(c)),t.push(e._getButtonItem(f)),t.push(e._getSeparator()),t.push(e._getButtonItem(u)),t.push(e._getButtonItem(a)),t.push(e._getSeparator()),t.push(e._getTextItem(h)),t)},_getButtonItem:function(e){var t=this;return{id:e,xclass:"bar-item-button",text:t.get(e+"Text"),disabled:!0,elCls:t.get(e+"Cls")}},_getSeparator:function(){return{xclass:"bar-item-separator"}},_getTextItem:function(e){var t=this;return{id:e,xclass:"bar-item-text",text:t._getTextItemTpl(e)}},_getTextItemTpl:function(e){var t=this,n={};return n[e]=t.get(e),BUI.substitute(this.get(e+"Tpl"),n)},_isPageAllowRedirect:function(e){var t=this;return e&&e>0&&e<=t.get("totalPage")&&e!==t.get("curPage")},_setAllButtonsState:function(){var e=this,t=e.get("store");t&&e._setButtonsState([o,u,s,a,f],!0),e.get("curPage")===1&&e._setButtonsState([o,s],!1),e.get("curPage")===e.get("totalPage")&&e._setButtonsState([u,a],!1)},_setButtonsState:function(e,t){var n=this,r=n.get("children");BUI.each(r,function(n){BUI.Array.indexOf(n.get("id"),e)!==-1&&n.set("disabled",!t)})},_setNumberPages:function(){var e=this,t=e.getItem(l),n=e.getItem(h);t&&t.set("content",e._getTextItemTpl(l)),e._setCurrentPageValue(e.get(c)),n&&n.set("content",e._getTextItemTpl(h))},_getCurrentPageValue:function(e){var t=this;e=e||t.getItem(c);var n=e.get("el").find("input");return n.val()},_setCurrentPageValue:function(e,t){var n=this;t=t||n.getItem(c);var r=t.get("el").find("input");r.val(e)}},{ATTRS:{firstText:{value:"\u9996 \u9875"},firstCls:{value:i+"pb-first"},prevText:{value:"\u4e0a\u4e00\u9875"},prevCls:{value:i+"pb-prev"},nextText:{value:"\u4e0b\u4e00\u9875"},nextCls:{value:i+"pb-next"},lastText:{value:"\u672b \u9875"},lastCls:{value:i+"pb-last"},skipText:{value:"\u786e\u5b9a"},skipCls:{value:i+"pb-skip"},totalPageTpl:{value:"\u5171 {totalPage} \u9875"},curPageTpl:{value:'\u7b2c \u9875'},totalCountTpl:{value:"\u5171{totalCount}\u6761\u8bb0\u5f55"},curPage:{value:0},totalPage:{value:0},totalCount:{value:0},pageSize:{value:30},store:{}},ID_FIRST:s,ID_PREV:o,ID_NEXT:u,ID_LAST:a,ID_SKIP:f,ID_TOTAL_PAGE:l,ID_CURRENT_PAGE:c,ID_TOTAL_COUNT:h},{xclass:"pagingbar",priority:2});return p}),define("bui/toolbar/numberpagingbar",["bui/toolbar/pagingbar"],function(e){var t=BUI.Component,n=e("bui/toolbar/pagingbar"),r=BUI.prefix,i="numberContainer",s=r+"button-number",o=n.extend({_getItems:function(){var e=this,t=e.get("items");return t?t:(t=[],t.push(e._getButtonItem(n.ID_PREV)),t.push(e._getButtonItem(n.ID_NEXT)),t)},_getButtonItem:function(e){var t=this;return{id:e,content:''+t.get(e+"Text")+"",disabled:!0}},_bindButtonEvent:function(){var e=this,t=e.get("numberButtonCls");e.constructor.superclass._bindButtonEvent.call(this),e.get("el").delegate("a","click",function(e){e.preventDefault()}),e.on("click",function(n){var r=n.target;if(r&&r.get("el").hasClass(t)){var i=r.get("id");e.jumpToPage(i)}})},_setNumberPages:function(){var e=this;e._setNumberButtons()},_setNumberButtons:function(){var e=this,t=e.get("curPage"),n=e.get("totalPage"),r=e._getNumberItems(t,n),i;e._clearNumberButtons(),BUI.each(r,function(t){e._appendNumberButton(t)}),i=e.getItem(t),i&&i.set("selected",!0)},_appendNumberButton:function(e){var t=this,n=t.getItemCount(),r=t.addItemAt(e,n-1)},_clearNumberButtons:function(){var e=this,t=e.getItems(),n=e.getItemCount();while(n>2)e.removeItemAt(n-2),n=e.getItemCount()},_getNumberItems:function(e,t){function u(e,t){for(var i=e;i<=t;i++)r.push(n._getNumberItem(i))}function a(){r.push(n._getEllipsisItem())}var n=this,r=[],i=n.get("maxLimitCount"),s=n.get("showRangeCount"),o;if(ti?l:i:t;f>1&&(u(1,1),f>2&&a()),o=c,u(f,c)}return o{id}'},prevText:{value:"<<"},nextText:{value:">>"},maxLimitCount:{value:4},showRangeCount:{value:1},numberButtonCls:{value:s},ellipsisTpl:{value:'...'}}},{xclass:"pagingbar-number",priority:3});return o}),define("bui/progressbar",["bui/common","bui/progressbar/base","bui/progressbar/load"],function(e){var t=e("bui/common"),n=t.namespace("ProgressBar");return t.mix(n,{Base:e("bui/progressbar/base"),Load:e("bui/progressbar/load")}),n}),define("bui/progressbar/base",["bui/common"],function(e){var t=e("bui/common"),n=t.Component.View.extend({_uiSetPercent:function(e){var n=this,r=n.get("el").children();t.isArray(e)||(e=[e]),t.each(r,function(t,n){$(t).width(e[n]+"%")})}},{ATTRS:{percent:{}}}),r=t.Component.Controller.extend({},{ATTRS:{percent:{view:!0,value:0},tpl:{value:'
        '},xview:{value:n}}},{xclass:"progress-bar"});return r}),define("bui/progressbar/load",["bui/progressbar/base"],function(e){var t=e("bui/progressbar/base"),n=0,r=1,i=2,s=t.extend({bindUI:function(){var e=this;e.on("afterPercentChange",function(t){if(e.isLoading()){var n=e.get("percent");n==100&&e.onCompleted(),e.onChange()}})},start:function(){var e=this;e.isLoading()||e.onstart()},complete:function(){var e=this;clearTimeout(e.get("t")),e.set("percent",100)},cancel:function(){var e=this;clearTimeout(e.get("t")),e.get("percent")&&e.set("percent",0),e.set("status",n)},onstart:function(){var e=this,t=e.get("cfg");e.set("percent",0),e.set("status",r),e.fire("start",t),e._startLoad()},onChange:function(){var e=this;e.fire("loadchange")},onCompleted:function(){var e=this;e.set("status",i),e.fire("completed")},isLoading:function(){return this.get("status")===r},isCompleted:function(){return this.get("status")===i},_startLoad:function(){var e=this,t=e.get("ajaxCfg"),n=e.get("interval"),r;t.success=function(i){var s=i.percent;e.set("percent",s),s<100&&e.isLoading()&&(r=setTimeout(function(){$.ajax(t)},n),e.set("t",r))},$.ajax(t)}},{ATTRS:{status:{value:0},ajaxCfg:{},interval:{value:500},events:{value:["start","loadchange","completed"]}}},{xclass:"progress-bar-load"});return s}),define("bui/calendar",["bui/common","bui/calendar/calendar","bui/calendar/monthpicker","bui/calendar/datepicker"],function(e){var t=e("bui/common"),n=t.namespace("Calendar");return t.mix(n,{Calendar:e("bui/calendar/calendar"),MonthPicker:e("bui/calendar/monthpicker"),DatePicker:e("bui/calendar/datepicker")}),n}),define("bui/calendar/monthpicker",["bui/common","bui/overlay","bui/list","bui/toolbar"],function(e){function v(){return $.map(d,function(e,t){return{text:e,value:t}})}var t=e("bui/common"),n=t.Component,r=e("bui/overlay").Overlay,i=e("bui/list").SimpleList,s=e("bui/toolbar"),o=t.prefix,u="x-monthpicker-month",a="data-month",f="data-year",l="x-monthpicker-year",c="x-monthpicker-yearnav",h="x-monthpicker-selected",p="x-monthpicker-item",d=["\u4e00\u6708","\u4e8c\u6708","\u4e09\u6708","\u56db\u6708","\u4e94\u6708","\u516d\u6708","\u4e03\u6708","\u516b\u6708","\u4e5d\u6708","\u5341\u6708","\u5341\u4e00\u6708","\u5341\u4e8c\u6708"],m=i.extend({bindUI:function(){var e=this;e.get("el").delegate("a","click",function(e){e.preventDefault()}).delegate("."+u,"dblclick",function(){e.fire("dblclick")})}},{ATTRS:{itemTpl:{view:!0,value:'
      • {text}
      • '},itemCls:{value:p},items:{view:!0,value:v()},elCls:{view:!0,value:"x-monthpicker-months"}}},{xclass:"calendar-month-panel"}),g=i.extend({bindUI:function(){var e=this,t=e.get("el");t.delegate("a","click",function(e){e.preventDefault()}),t.delegate("."+l,"dblclick",function(){e.fire("dblclick")}),t.delegate(".x-icon","click",function(t){var n=$(t.currentTarget);n.hasClass(c+"-prev")?e._prevPage():n.hasClass(c+"-next")&&e._nextPage()}),e.on("itemselected",function(t){t.item&&e.setInternal("year",t.item.value)})},_prevPage:function(){var e=this,t=e.get("start"),n=e.get("yearCount");e.set("start",t-n)},_nextPage:function(){var e=this,t=e.get("start"),n=e.get("yearCount");e.set("start",t+n)},_uiSetStart:function(){var e=this;e._setYearsContent()},_uiSetYear:function(e){var t=this,n=t.findItemByField("value",e);n?t.setSelectedByField(e):t.set("start",e)},_setYearsContent:function(){var e=this,t=e.get("year"),n=e.get("start"),r=e.get("yearCount"),i=[];for(var s=n;s{text}'},tpl:{view:!0,value:'
        '+''+''+"
        "+"
          "}}},{xclass:"calendar-year-panel"}),y=r.extend({initializer:function(){var e=this,t=e.get("children"),n=new m,r=new g,i=e._createFooter();t.push(n),t.push(r),t.push(i),e.set("yearPanel",r),e.set("monthPanel",n)},bindUI:function(){var e=this;e.get("monthPanel").on("itemselected",function(t){t.item&&e.setInternal("month",t.item.value)}).on("dblclick",function(){e._successCall()}),e.get("yearPanel").on("itemselected",function(t){t.item&&e.setInternal("year",t.item.value)}).on("dblclick",function(){e._successCall()})},_successCall:function(){var e=this,t=e.get("success");t&&t.call(e)},_createFooter:function(){var e=this;return new s.Bar({elCls:o+"clear x-monthpicker-footer",children:[{xclass:"bar-item-button",text:"\u786e\u5b9a",btnCls:"button button-small button-primary",handler:function(){e._successCall()}},{xclass:"bar-item-button",text:"\u53d6\u6d88",btnCls:"button button-small last",handler:function(){var t=e.get("cancel");t&&t.call(e)}}]})},_uiSetYear:function(e){this.get("yearPanel").set("year",e)},_uiSetMonth:function(e){this.get("monthPanel").setSelectedByField(e)}},{ATTRS:{footer:{},align:{value:{}},year:{},success:{value:function(){}},cancel:{value:function(){}},width:{value:180},month:{},yearPanel:{},monthPanel:{}}},{xclass:"monthpicker"});return y}),define("bui/calendar/header",["bui/common"],function(e){var t=e("bui/common"),n=t.prefix,r=t.Component,i="year-text",s="month-text",o="x-datepicker-arrow",u="x-datepicker-prev",a="x-datepicker-next",f=r.Controller.extend({bindUI:function(){var e=this,t=e.get("el");t.delegate("."+o,"click",function(t){t.preventDefault();var n=$(t.currentTarget);n.hasClass(a)?e.nextMonth():n.hasClass(u)&&e.prevMonth()}),t.delegate(".x-datepicker-month","click",function(){e.fire("headerclick")})},setMonth:function(e,t){var n=this,r=n.get("year"),i=n.get("month");if(e!==r||t!==i)n.set("year",e),n.set("month",t),n.fire("monthchange",{year:e,month:t})},nextMonth:function(){var e=this,t=new Date(e.get("year"),e.get("month")+1);e.setMonth(t.getFullYear(),t.getMonth())},prevMonth:function(){var e=this,t=new Date(e.get("year"),e.get("month")-1);e.setMonth(t.getFullYear(),t.getMonth())},_uiSetYear:function(e){var t=this;t.get("el").find("."+i).text(e)},_uiSetMonth:function(e){var t=this;t.get("el").find("."+s).text(e+1)}},{ATTRS:{year:{sync:!1},month:{sync:!1,setter:function(e){this.set("monthText",e+1)}},monthText:{},tpl:{view:!0,value:'
          '+'
          '+'
          '+'{year}\u5e74 {monthText}\u6708'+''+"
          "+"
          "+'
          '},elCls:{view:!0,value:"x-datepicker-header"},events:{value:{monthchange:!0}}}},{xclass:"calendar-header"});return f}),define("bui/calendar/panel",["bui/common"],function(e){var t=e("bui/common"),n=t.Component,r=t.Date,i="x-datepicker-date",s="x-datepicker-today",o="x-datepicker-disabled",u="x-datepicker-active",a="data-date",f="isoDate",l="x-datepicker-selected",c=6,h={deactive:"prevday",active:"active",disabled:"disabled"},p=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],d=n.View.extend({renderUI:function(){this.updatePanel()},updatePanel:function(){var e=this,t=e.get("el"),n=t.find("tbody"),r=e._getPanelInnerTpl();n.empty(),$(r).appendTo(n)},_getPanelInnerTpl:function(){var e=this,t=e._getFirstDate(),n=[];for(var i=0;in?!1:!0},_clearSelectedDate:function(){var e=this;e.get("el").find("."+l).removeClass(l)},_findDateElement:function(e){var t=this,n=r.format(e,f),s=t.get("el").find("."+i),o=null;return n&&s.each(function(e,t){if($(t).attr("title")===n)return o=$(t),!1}),o},_setSelectedDate:function(e){var t=this,n=t._findDateElement(e);t._clearSelectedDate(),n&&n.addClass(l)}},{ATTRS:{}}),v=n.Controller.extend({initializer:function(){var e=this,t=new Date;e.get("year")||e.set("year",t.getFullYear()),e.get("month")||e.set("month",t.getMonth())},bindUI:function(){var e=this,t=e.get("el");t.delegate("."+i,"click",function(e){e.preventDefault()}),t.delegate("."+o,"mouseup",function(e){e.stopPropagation()})},performActionInternal:function(e){var t=this,n=$(e.target).closest("."+i);if(n){var s=n.attr("title");s&&(s=r.parse(s),t.get("view")._isInRange(s)&&t.set("selected",s))}},setMonth:function(e,t){var n=this,r=n.get("year"),i=n.get("month");if(e!==r||t!==i)n.set("year",e),n.set("month",t),n.get("view").updatePanel()},_uiSetSelected:function(e,t){var n=this;t&&t.prevVal&&r.isDateEquals(e,t.prevVal)||(n.setMonth(e.getFullYear(),e.getMonth()),n.get("view")._setSelectedDate(e),n.fire("selectedchange",{date:e}))},_uiSetMaxDate:function(e){e&&this.get("view").updatePanel()},_uiSetMinDate:function(e){e&&this.get("view").updatePanel()}},{ATTRS:{year:{view:!0},month:{view:!0},selected:{},focusable:{value:!0},dayTpl:{view:!0,value:'
          '},events:{value:{click:!1,selectedchange:!1}},maxDate:{view:!0,setter:function(e){if(e)return t.isString(e)?r.parse(e):e}},minDate:{view:!0,setter:function(e){if(e)return t.isString(e)?r.parse(e):e}},weekTpl:{view:!0,value:"{daysTpl}"},tpl:{view:!0,value:'
          {dateNumber}
          \u65e5\u4e00\u4e8c\u4e09\u56db\u4e94\u516d
          '},xview:{value:d}}},{xclass:"calendar-panel",priority:0});return v}),define("bui/calendar/calendar",["bui/picker","bui/calendar/monthpicker","bui/calendar/header","bui/calendar/panel","bui/toolbar"],function(e){function v(){var e=new Date;return new Date(e.getFullYear(),e.getMonth(),e.getDate())}function m(e){return e<10?"0"+e:e.toString()}function g(e){var t=[];for(var n=0;n{text}'}],autoAlign:!1,align:{node:e.get("el"),points:["bl","bl"],offset:[0,-30]},trigger:e.get("el").find("."+r)});return t.render(),e._initTimePickerEvent(t),t},_initTimePickerEvent:function(e){var t=this,e=t.get("timepicker");if(!e)return;e.get("el").delegate("a","click",function(e){e.preventDefault()}),e.on("triggerchange",function(t){var n=t.curTrigger;n.hasClass(i)?e.get("list").set("items",g(24)):e.get("list").set("items",g(60))}),e.on("selectedchange",function(e){var n=e.curTrigger,r=e.value;n.hasClass(i)?t.setInternal("hour",r):n.hasClass(s)?t.setInternal("minute",r):t.setInternal("second",r)})},_setYearMonth:function(e,t){var n=this,r=n.get("selectedDate"),i=r.getDate();(e!==r.getFullYear()||t!==r.getMonth())&&n.set("selectedDate",new Date(e,t,i))},_createMonthPicker:function(){var e=this;return new f({effect:{effect:"slide",duration:300},visibleMode:"display",success:function(){var t=this;e._setYearMonth(t.get("year"),t.get("month")),t.hide()},cancel:function(){this.hide()}})},_createFooter:function(){var e=this,t=this.get("showTime"),r=[];return t?(r.push({content:e.get("timeTpl")}),r.push({xclass:"bar-item-button",text:"\u786e\u5b9a",btnCls:"button button-small button-primary",listeners:{click:function(){e.fire("accept")}}})):r.push({xclass:"bar-item-button",text:"\u4eca\u5929",btnCls:"button button-small",listeners:{click:function(){var t=v();e.set("selectedDate",t),e.fire("accept")}}}),new h.Bar({elCls:n+"calendar-footer",children:r})},_uiSetSelectedDate:function(e){var t=this,n=e.getFullYear(),r=e.getMonth();t.get("header").setMonth(n,r),t.get("panel").set("selected",e),t.fire("datechange",{date:e})},_uiSetHour:function(e){b(this,i,e)},_uiSetMinute:function(e){b(this,s,e)},_uiSetSecond:function(e){b(this,o,e)},_uiSetMaxDate:function(e){var t=this;t.get("panel").set("maxDate",e)},_uiSetMinDate:function(e){var t=this;t.get("panel").set("minDate",e)}},{ATTRS:{header:{},panel:{},maxDate:{},minDate:{},monthPicker:{},timepicker:{},width:{value:180},events:{value:{click:!1,accept:!1,datechange:!1,monthchange:!1}},showTime:{value:!1},timeTpl:{value:'::'},selectedDate:{value:v()},hour:{value:(new Date).getHours()},minute:{value:(new Date).getMinutes()},second:{value:0}}},{xclass:"calendar",priority:0});return w}),define("bui/calendar/datepicker",["bui/common","bui/picker","bui/calendar/calendar"],function(e){var t=e("bui/common"),n=e("bui/picker").Picker,r=e("bui/calendar/calendar"),i=t.Date,s=n.extend({initializer:function(){var e=this,t=e.get("children"),n=new r({showTime:e.get("showTime")});t.push(n),e.set("calendar",n)},setSelectedValue:function(e){var t=this,n=this.get("calendar"),r=i.parse(e);r=r||new Date((new Date).setSeconds(0)),n.set("selectedDate",i.getDate(r)),t.get("showTime")&&(n.set("hour",r.getHours()),n.set("minute",r.getMinutes()),n.set("second",r.getSeconds()))},getSelectedValue:function(){var e=this,t=e.get("calendar"),n=i.getDate(t.get("selectedDate"));return e.get("showTime")&&(n=i.addHour(t.get("hour"),n),n=i.addMinute(t.get("minute"),n),n=i.addSecond(t.get("second"),n)),n},getSelectedText:function(){return i.format(this.getSelectedValue(),this._getFormatType())},_getFormatType:function(){return this.get("showTime")?"yyyy-mm-dd HH:MM:ss":"yyyy-mm-dd"},_uiSetMaxDate:function(e){var t=this;t.get("calendar").set("maxDate",e)},_uiSetMinDate:function(e){var t=this;t.get("calendar").set("minDate",e)}},{ATTRS:{showTime:{value:!1},maxDate:{},minDate:{},changeEvent:{value:"accept"},hideEvent:{value:"accept"},calendar:{}}},{xclass:"datepicker",priority:0});return s}),define("bui/editor",["bui/common","bui/form","bui/editor/editor","bui/editor/record","bui/editor/dialog"],function(e){var t=e("bui/common"),n=e("bui/form"),r=t.namespace("Editor");return t.mix(r,{Editor:e("bui/editor/editor"),RecordEditor:e("bui/editor/record"),DialogEditor:e("bui/editor/dialog")}),r}),define("bui/editor/mixin",function(e){function t(e){var t=e,n=t.get("controlCfgField"),r=t.get(n),i=t.addChild(r);t.setInternal(n,i)}var n=function(){t(this)};return n.ATTRS={acceptEvent:{value:"autohide"},preventHide:{value:!0},changeSourceEvent:{value:"show triggerchange"},ignoreInputFields:{value:!1},innerValueField:{},emptyValue:{},controlCfgField:{},autoUpdate:{value:!0},events:{value:{accept:!1,cancel:!1}}},n.prototype={__bindUI:function(){var e=this,t=e.get("acceptEvent"),n=e.get("changeSourceEvent");t&&e.on(t,function(){if(e.accept())return;if(e.get("preventHide"))return!1;e.cancel()}),n&&e.on(n,function(){e.setValue(e.getSourceValue()),e.get("visible")&&e.focus()})},getInnerControl:function(){var e=this,t=e.get("children");return t[0]},setValue:function(e){var t=this,n=t.getInnerControl();t.set("editValue",e),t.clearControlValue(),n.set(t.get("innerValueField"),e),e||t.valid()},getValue:function(){var e=this,t=e.getInnerControl();return t.get(e.get("innerValueField"))},isValid:function(){var e=this,t=e.getInnerControl();return t.isValid?t.isValid():!0},valid:function(){var e=this,t=e.getInnerControl();t.valid&&t.valid()},getErrors:function(){var e=this,t=e.getInnerControl();return t.getErrors?t.getErrors():[]},isChange:function(){var e=this,t=e.get("editValue"),n=e.getValue();return t!==n},clearValue:function(){this.clearControlValue(),this.clearErrors()},clearControlValue:function(){var e=this,t=e.getInnerControl();t.set(e.get("innerValueField"),e.get("emptyValue"))},clearErrors:function(){var e=this,t=e.getInnerControl();t.clearErrors()},getSourceValue:function(){},updateSource:function(){},handleNavEsc:function(){this.cancel()},handleNavEnter:function(e){var t=e.target;if(t.tagName==="TEXTAREA")return;t.tagName==="BUTTON"&&$(t).trigger("click"),this.accept()},focus:function(){var e=this,t=e.getInnerControl();t.focus&&t.focus()},accept:function(){var e=this,t;e.valid();if(!e.isValid())return!1;t=e.getValue(),e.get("autoUpdate")&&e.updateSource(t);if(e.fire("beforeaccept",{value:t})==0)return;return e.fire("accept",{value:t,editValue:e.get("editValue")}),e.hide(),!0},cancel:function(){this.fire("cancel"),this.clearValue(),this.close()}},n}),define("bui/editor/editor",["bui/common","bui/overlay","bui/editor/mixin"],function(e){var t=e("bui/common"),n=e("bui/overlay").Overlay;CLS_TIPS="x-editor-tips",Mixin=e("bui/editor/mixin");var r=n.extend([Mixin],{bindUI:function(){var e=this,t=e.getInnerControl();e.on("validchange",function(t){!e.isValid()&&e.get("visible")?e._showError(e.getErrors()):e._hideError()}),e.on("hide",function(){e._hideError()}),e.on("show",function(){e.isValid()||e._showError(e.getErrors())})},_initOverlay:function(){var e=this,t=new n({children:[{xclass:"simple-list",itemTpl:'
        • ! {error}
        • '}],elCls:CLS_TIPS,autoRender:!0});return e.set("overlay",t),t},_getErrorList:function(){var e=this,t=e.get("overlay");return t&&t.get("children")[0]},_showError:function(e){var n=this,r=n.get("overlay")||n._initOverlay(),i=n._getErrorList(),s=n.get("errorAlign"),o=t.Array.map(e,function(e){return{error:e}});i.set("items",o),s.node=n.get("el"),r.set("align",s),r.show()},_hideError:function(){var e=this,t=e.get("overlay");t&&t.hide()},getSourceValue:function(){var e=this,t=e.get("curTrigger");return t.text()},updateSource:function(e){var t=this,n=t.get("curTrigger");n&&n.length&&n.text(e)},_uiSetWidth:function(e){var t=this;if(e!=null){var n=t.getInnerControl();n.set&&n.set("width",e)}}},{ATTRS:{innerValueField:{value:"value"},emptyValue:{value:""},autoHide:{value:!0},controlCfgField:{value:"field"},defaultChildCfg:{value:{tpl:"",forceFit:!0,errorTpl:""}},defaultChildClass:{value:"form-field"},align:{value:{points:["tl","tl"]}},errorAlign:{value:{points:["bl","tl"],offset:[0,10]}},overlay:{},field:{value:{}}}},{xclass:"editor"});return r}),define("bui/editor/record",["bui/common","bui/editor/editor"],function(e){var t=e("bui/common"),n=e("bui/editor/editor"),r=n.extend({getSourceValue:function(){return this.get("record")},updateSource:function(e){var n=this,r=n.get("record");t.mix(r,e)},_uiSetRecord:function(e){this.setValue(e)}},{ATTRS:{innerValueField:{value:"record"},acceptEvent:{value:""},emptyValue:{value:{}},autoHide:{value:!1},record:{value:{}},controlCfgField:{value:"form"},form:{value:{}},errorAlign:{value:{points:["tr","tl"],offset:[10,0]}},defaultChildCfg +:{valueFn:function(){var e=this;return{xclass:"form",errorTpl:"",showError:!0,showChildError:!0,defaultChildCfg:{elCls:"bui-inline-block",tpl:"",forceFit:!0},buttons:[{btnCls:"button button-primary",text:"\u786e\u5b9a",handler:function(){e.accept()}},{btnCls:"button",text:"\u53d6\u6d88",handler:function(){e.cancel()}}]}}}}},{xclass:"record-editor"});return r}),define("bui/editor/dialog",["bui/overlay","bui/editor/mixin"],function(e){var t=e("bui/overlay").Dialog,n=e("bui/editor/mixin"),r=t.extend([n],{getSourceValue:function(){return this.get("record")},handleNavEnter:function(e){var t=this,n=t.get("success"),r=e.target;if(r.tagName==="TEXTAREA")return;r.tagName==="BUTTON"&&$(r).trigger("click"),n?n.call(t):this.accept()},cancel:function(){this.onCancel()!==!1&&(this.fire("cancel"),this.clearValue(),this.close())},updateSource:function(e){var t=this,n=t.get("record");BUI.mix(n,e)},_uiSetRecord:function(e){this.setValue(e)}},{ATTRS:{innerValueField:{value:"record"},acceptEvent:{value:""},record:{value:{}},emptyValue:{value:{}},controlCfgField:{value:"form"},changeSourceEvent:{value:""},defaultChildCfg:{value:{xclass:"form-horizontal"}},focusable:{value:!0},success:{value:function(){this.accept()}},form:{value:{}}}},{xclass:"dialog-editor"});return r}),define("bui/grid",["bui/common","bui/grid/simplegrid","bui/grid/grid","bui/grid/column","bui/grid/header","bui/grid/format","bui/grid/plugins"],function(e){var t=e("bui/common"),n=t.namespace("Grid");return t.mix(n,{SimpleGrid:e("bui/grid/simplegrid"),Grid:e("bui/grid/grid"),Column:e("bui/grid/column"),Header:e("bui/grid/header"),Format:e("bui/grid/format"),Plugins:e("bui/grid/plugins")}),n}),define("bui/grid/simplegrid",["bui/common","bui/list"],function(e){var t=e("bui/common"),n=e("bui/list"),r=t.Component,i=r.UIBase,s=t.prefix,o=s+"grid",u=o+"-row",a=s+"grid-row-odd",f=s+"grid-row-even",l=s+"grid-border",c=s+"grid-row-first",h=n.SimpleListView.extend({setColumns:function(e){var n=this,r=n.get("headerRowEl");e=e||n.get("columns"),r.empty(),t.each(e,function(e){n._createColumn(e,r)})},_createColumn:function(e,n){var r=this,i=t.substitute(r.get("columnTpl"),e);$(i).appendTo(n)},getItemTpl:function(e,n){var r=this,i=r.get("columns"),s=r.get("rowTpl"),o=n%2===0?a:f,u=[],l;return t.each(i,function(t){var n=t.dataIndex;u.push(r._getCellTpl(t,n,e))}),s=t.substitute(s,{cellsTpl:u.join(""),oddCls:o}),s},_getCellTpl:function(e,n,r){var i=this,s=e.renderer,o=s?s(r[n],r):r[n],u=i.get("cellTpl");return t.substitute(u,{elCls:e.elCls,text:o})},clearData:function(){var e=this,t=e.get("itemContainer");t.empty()},showData:function(e){var n=this;t.each(e,function(e,t){n._createRow(e,t)})},_uiSetInnerBorder:function(e){var t=this,n=t.get("el");e?n.addClass(l):n.removeClass(l)},_uiSetTableCls:function(e){var t=this,n=t.get("el").find("table");n.attr("class",e)}},{ATTRS:{headerRowEl:{valueFn:function(){var e=this,t=e.get("el").find("thead");return t.children("tr")}},itemContainer:{valueFn:function(){return this.get("el").find("tbody")}},tableCls:{}}},{xclass:"simple-grid-veiw"}),p=t.List.SimpleList.extend({renderUI:function(){this.get("view").setColumns()},bindUI:function(){var e=this,t=e.get("itemCls"),n=t+"-hover",r=e.get("el");r.delegate("."+t,"mouseover",function(e){var t=$(e.currentTarget);t.addClass(n)}).delegate("."+t,"mouseout",function(e){var t=$(e.currentTarget);t.removeClass(n)})},showData:function(e){this.clearData(),this.set("items",e)},clearData:function(){this.get("view").clearData()},_uiSetColumns:function(e){var t=this;t.clearData(),t.get("view").setColumns(e)}},{ATTRS:{itemCls:{view:!0,value:u},tableCls:{view:!0,value:o+"-table"},columns:{view:!0,sync:!1,value:[]},tpl:{view:!0,value:'
          '},innerBorder:{view:!0,value:!0},rowTpl:{view:!0,value:'{cellsTpl}'},cellTpl:{view:!0,value:'
          {text}
          '},columnTpl:{view:!0,value:'
          {title}
          '},events:{value:{}},xview:{value:h}}},{xclass:"simple-grid"});return p.View=h,p}),define("bui/grid/column",["bui/common"],function(e){var t=e("bui/common"),n=t.prefix,r=n+"grid-hd-title",i=n+"grid-hd-open",s="sort-",o="ASC",u="DESC",a=n+"grid-hd-menu-trigger",f="grid-hd-menu-trigger",l=t.Component.View.extend({setTplContent:function(e){var t=this,n=t.get("sortTpl"),i=t.get("triggerTpl"),s=t.get("el"),o;l.superclass.setTplContent.call(t,e),o=s.find("."+r),$(n).insertAfter(o),$(i).insertAfter(o)},_setContent:function(){this.setTplContent()},_uiSetShowMenu:function(e){var t=this,n=t.get("triggerTpl"),i=t.get("el"),s=i.find("."+r);e?$(n).insertAfter(s):i.find("."+a).remove()},_uiSetTitle:function(e){if(!this.get("rendered"))return;this._setContent()},_uiSetDraggable:function(e){if(!this.get("rendered"))return;this._setContent()},_uiSetSortable:function(e){if(!this.get("rendered"))return;this._setContent()},_uiSetTpl:function(e){if(!this.get("rendered"))return;this._setContent()},_uiSetSortState:function(e){var t=this,n=t.get("el"),r=e?"addClass":"removeClass",i=s+"asc",o=s+"desc";n.removeClass(i+" "+o),e==="ASC"?n.addClass(i):e==="DESC"&&n.addClass(o)},_uiSetOpen:function(e){var t=this,n=t.get("el");e?n.addClass(i):n.removeClass(i)}},{ATTRS:{sortTpl:{view:!0,getter:function(){var e=this,t=e.get("sortable");return t?' ':""}},tpl:{}}}),c=t.Component.Controller.extend({_toggleSortState:function(){var e=this,t=e.get("sortState"),n=t?t===o?u:o:o;e.set("sortState",n)},performActionInternal:function(e){var t=this,n=$(e.target),r=t.get("prefixCls");n.hasClass(r+f)||t.get("sortable")&&t._toggleSortState()},_uiSetWidth:function(e){e&&this.set("originWidth",e)}},{ATTRS:{elTagName:{value:"th"},open:{view:!0,value:!1},dataIndex:{view:!0,value:""},draggable:{sync:!1,view:!0,value:!0},editor:{},focusable:{value:!1},fixed:{value:!1},id:{},renderer:{},resizable:{value:!0},sortable:{sync:!1,view:!0,value:!0},sortState:{view:!0,value:null},title:{sync:!1,view:!0,value:" "},width:{value:100},showMenu:{view:!0,value:!1},triggerTpl:{view:!0,value:''},tpl:{sync:!1,view:!0,value:'
          '+'{title}'+"
          "},cellTpl:{value:""},events:{value:{afterWidthChange:!0,afterSortStateChange:!0,afterVisibleChange:!0,click:!0,resize:!0,move:!0}},xview:{value:l}}},{xclass:"grid-hd",priority:1});return c.Empty=c.extend({},{ATTRS:{type:{value:"empty"},sortable:{view:!0,value:!1},width:{view:!0,value:null},tpl:{view:!0,value:'
          '}}},{xclass:"grid-hd-empty",priority:1}),c}),define("bui/grid/header",["bui/common","bui/grid/column"],function(e){var t=e("bui/common"),n=t.prefix,r=t.namespace("Grid"),i=e("bui/grid/column"),s=t.Component.View,o=t.Component.Controller,u=17,a=t.UA,f=s.extend({getContentElement:function(){return this.get("el").find("tr")},scrollTo:function(e){var t=this,n=t.get("el");e.top!==undefined&&n.scrollTop(e.top),e.left!==undefined&&n.scrollLeft(e.left)},_uiSetTableCls:function(e){var t=this,n=t.get("el").find("table");n.attr("class",e)}},{ATTRS:{emptyCellEl:{},tableCls:{}}},{xclass:"header-view"}),l=o.extend({addColumn:function(e,t){var n=this,r=0,i=n.get("columns");return e=n._createColumn(e),t===undefined&&(t=i.length,r=n.get("children").length-1),i.splice(t,0,e),n.addChild(e,r),n.fire("add",{column:e,index:t}),e},removeColumn:function(e){var n=this,r=n.get("columns"),i;return e=t.isNumber(e)?r[e]:e,i=t.Array.indexOf(e,r),r.splice(i,1),n.fire("remove",{column:e,index:i}),n.removeChild(e,!0)},bindUI:function(){var e=this;e._bindColumnsEvent()},initializer:function(){var e=this,t=e.get("children"),n=e.get("columns"),r=e._createEmptyColumn();$.each(n,function(r,i){var s=e._createColumn(i);t[r]=s,n[r]=s}),t.push(r),e.set("emptyColumn",r)},getColumns:function(){return this.get("columns")},getColumnsWidth:function(){var e=this,t=e.getColumns(),n=0;return $.each(t,function(e,t){t.get("visible")&&(n+=t.get("el").outerWidth())}),n},getColumnOriginWidth:function(){var e=this,t=e.getColumns(),n=0;return $.each(t,function(e,t){if(t.get("visible")){var r=t.get("originWidth")||t.get("width");n+=r}}),n},getColumnByIndex:function(e){var t=this,n=t.getColumns(),r=n[e];return r},getColumn:function(e){var t=this,n=t.getColumns(),r=null;return $.each(n,function(t,n){if(e(n))return r=n,!1}),r},getColumnById:function(e){var t=this;return t.getColumn(function(t){return t.get("id")===e})},getColumnIndex:function(e){var n=this,r=n.getColumns();return t.Array.indexOf(e,r)},scrollTo:function(e){this.get("view").scrollTo(e)},_bindColumnsEvent:function(){var e=this;e.on("afterWidthChange",function(t){var n=t.target;n!==e&&e.setTableWidth()}),e.on("afterVisibleChange",function(t){var n=t.target;n!==e&&e.setTableWidth()}),e.on("afterSortStateChange",function(t){var n=t.target,r=e.getColumns(),i=t.newVal;i&&$.each(r,function(e,t){t!==n&&t.set("sortState","")})}),e.on("add",function(){e.setTableWidth()}),e.on("remove",function(){e.setTableWidth()})},_createColumn:function(e){return e instanceof i?e:(e.id||(e.id=t.guid("col")),new i(e))},_createEmptyColumn:function(){return new i.Empty},_isAllowScrollLeft:function(){var e=this,t=e.get("parent");return t&&!!t.get("height")},forceFitColumns:function(){function l(e,t){var n=e.get("el");e.set("width",t,{silent:1}),n.width(t)}var e=this,t=e.getColumns(),n=e.get("width"),r=n,i=e.getColumnOriginWidth(),s=0,o=0,a=null,f=e._isAllowScrollLeft();if(n){f&&(n-=u,r=n);var c=0;$.each(t,function(e,t){t.get("visible")&&t.get("resizable")&&c++;if(t.get("visible")&&!t.get("resizable")){var n=t.get("el").outerWidth();r-=n,i-=n}});var h=Math.floor(r/c),p=r/i;if(p===1)return;$.each(t,function(t,n){if(n.get("visible")&&n.get("resizable")){var r=e._getColumnBorderWith(n,t),i=n.get("originWidth");i||(n.set("originWidth",n.get("width")),i=n.get("width")),h=Math.floor((i+r)*p),l(n,h-r),s+=h,a=n}}),a&&(o=r-s,l(a,a.get("width")+o)),e.fire("forceFitWidth")}},_getColumnBorderWith:function(e,t){var n=e.get("el"),r=Math.round(parseFloat(n.css("border-left-width"))||0)+Math.round(parseFloat(n.css("border-right-width"))||0);return r=a.ie&&a.ie<8?t===0?1:r:r,r},setTableWidth:function(){var e=this,t=e.get("width"),n=0,r=null;if(t=="auto")return;e.get("forceFit")?e.forceFitColumns():e._isAllowScrollLeft()&&(n=e.getColumnsWidth(),r=e.get("emptyColumn"),t'+""+""},tableCls:{view:!0},xview:{value:f},events:{value:{add:!1,remove:!1}}}},{xclass:"grid-header",priority:1});return l}),define("bui/grid/grid",["bui/common","bui/mask","bui/toolbar","bui/list","bui/grid/header","bui/grid/column"],function(e){function f(e){return t.isString(e)?e.indexOf("%")!==-1:!1}function H(e){var n=this;return t.isNumber(e)&&(e-=D),e}var t=e("bui/common"),n=e("bui/mask"),r=t.UA,i=t.Component,s=e("bui/toolbar"),o=e("bui/list"),u=e("bui/grid/header"),a=e("bui/grid/column"),l=t.prefix,c=l+"grid-header-container",h=l+"grid-body",p=l+"grid-width",d=l+"grid-height",v=l+"grid-border",m=l+"grid-tbar",g=l+"grid-bbar",y=l+"grid-button-bar",b=l+"grid-strip",w=l+"grid-row",E=l+"grid-row-odd",x=l+"grid-row-even",T=l+"grid-row-first",N=l+"grid-cell",C=l+"grid-cell-inner",k="grid-td-",L=l+"grid-cell-text",A=l+"grid-cell-empty",O="17",M=l+"hidden",_="data-column-field",D=2,P=1,B=o.SimpleListView.extend({renderUI:function(){var e=this,t=e.get("el"),n=t.find("."+h);e.set("bodyEl",n),e._setTableTpl()},getItemTpl:function(e,n){var r=this,i=r._getColumns(),s=r.get("tbodyEl"),o=r.get("rowTpl"),u=n%2===0?E:x,a=[],f;return $.each(i,function(t,n){var i=n.get("dataIndex");a.push(r._getCellTpl(n,i,e))}),r.get("useEmptyCell")&&a.push(r._getEmptyCellTpl()),o=t.substitute(o,{cellsTpl:a.join(""),oddCls:u}),o},findRow:function(e){var t=this;return $(t.findElement(e))},findCell:function(e,t){var n=k+e;return t.find("."+n)},resetHeaderRow:function(){if(!this.get("useHeaderRow"))return;var e=this,t=e.get("headerRowEl"),n=e.get("tbodyEl");t&&t.remove(),t=e._createHeaderRow(),t.prependTo(n),e.set("headerRowEl",t)},resetColumnsWidth:function(e,t){var n=this,r=n.get("headerRowEl"),i=n.findCell(e.get("id"),r);t=t||e.get("width"),i&&i.width(t),n.setTableWidth()},setTableWidth:function(e){if(!e&&f(this.get("width"))){this.get("tableEl").width("100%");return}var t=this,n=t._getInnerWidth(),i=t.get("height"),s=t.get("tableEl"),o=t.get("forceFit"),u=t.get("headerRowEl");if(!f(e)){e=e||t._getColumnsWidth();if(!n)return;if(n>=e){e=n;if(i){var a=r.ie==6||r.ie==7?O+2:O;e=n-a}}}s.width(e)},setBodyWidth:function(e){var t=this,n=t.get("bodyEl");e=e||t._getInnerWidth(),n.width(e)},setBodyHeight:function(e){var n=this,r=n.get("bodyEl"),i=e,s=r.siblings();t.each(s,function(e){$(e).css("display")!=="none"&&(i-=$(e).outerHeight())}),r.height(i)},setColumnVisible:function(e){var t=this,n=!e.get("visible"),r=e.get("id"),i=t.get("tbodyEl"),s=$("."+k+r,i);n?s.hide():s.show()},updateItem:function(e){var n=this,r=n.getItems(),i=t.Array.indexOf(e,r),s=n._getColumns(),o=null,u;if(i>=0)return o=n.findElement(e),t.each(s,function(t){var r=n.findCell(t.get("id"),$(o)),i=r.find("."+C),s=n._getCellText(t,e);i.html(s)}),o},showEmptyText:function(){var e=this,t=e.get("bodyEl"),n=e.get("emptyDataTpl"),r=e.get("emptyEl");r&&r.remove();var r=$(n).appendTo(t);e.set("emptyEl",r)},clearEmptyText:function(){var e=this,t=e.get("emptyEl");t&&t.remove()},_createHeaderRow:function(){var e=this,n=e._getColumns(),r=e.get("tbodyEl"),i=e.get("headerRowTpl"),s,o=[];return $.each(n,function(t,n){o.push(e._getHeaderCellTpl(n))}),e.get("useEmptyCell")&&o.push(e._getEmptyCellTpl()),i=t.substitute(i,{cellsTpl:o.join("")}),s=$(i).appendTo(r),s},_getColumnsWidth:function(){var e=this,n=e.get("columns"),r=0;return t.each(n,function(e){e.get("visible")&&(r+=e.get("el").outerWidth())}),r},_getColumns:function(){return this.get("columns")},_getCellText:function(e,n){var r=this,i=e.get("dataIndex"),s=e.get("cellTpl")||r.get("cellTextTpl"),o=r._getCellInnerText(e,i,n);return t.substitute(s,{text:o,tips:r._getTips(e,i,n)})},_getCellInnerText:function(e,t,n){try{var r=this,i=e.get("renderer"),s=i?i(n[t],n):n[t];return s==null?"":s}catch(o){throw"column:"+e.get("title")+" fomat error!"}},_getCellTpl:function(e,n,r){var i=this,s=i._getCellText(e,r),o=i.get("cellTpl");return t.substitute(o,{elCls:e.get("elCls"),id:e.get("id"),dataIndex:n,cellText:s,hideCls:e.get("visible")?"":M})},_getEmptyCellTpl:function(){return' '},_getHeaderCellTpl:function(e){var n=this,r=n.get("headerCellTpl");return t.substitute(r,{id:e.get("id"),width:e.get("width"),hideCls:e.get("visible")?"":M})},_getInnerWidth:function(){return H(this.get("width"))},_getTips:function(e,n,r){var i=e.get("showTip"),s="";return i&&(s=r[n],t.isFunction(i)&&(s=i(s,r))),s},_uiSetInnerBorder:function(e){var t=this,n=t.get("el");e?n.addClass(v):n.removeClass(v)},_setTableTpl:function(e){var t=this,n=t.get("bodyEl");e=e||t.get("tableTpl"),$(e).appendTo(n);var r=n.find("table"),i=n.find("tbody");t.set("tableEl",r),t.set("tbodyEl",i),t.set("itemContainer",i),t._setTableCls(t.get("tableCls"))},_uiSetTableCls:function(e){this._setTableCls(e)},_uiSetHeight:function(e){var t=this,n=t.get("bodyEl");t.get("el").height(e),t.get("el").addClass(d)},_uiSetWidth:function(e){var t=this;t.get("el").width(e),t.setBodyWidth(t._getInnerWidth(e)),t.get("el").addClass(p)},_uiSetStripeRows:function(e){var t=this,n=e?"addClass":"removeClass";t.get("el")[n](b)},_setTableCls:function(e){var t=this,n=t.get("tableEl");n.attr("class",e)}},{ATTRS:{tableCls:{},bodyEl:{},tbodyEl:{},headerRowEl:{},tableEl:{},emptyEl:{}}},{xclass:"grid-view"}),j=o.SimpleList.extend({initializer:function(){var e=this,t=e.get("render"),n=e.get("width");n||e.set("width",$(t).width())},createDom:function(){var e=this;e.get("width")&&e.get("el").addClass(p),e.get("height")&&e.get("el").addClass(d),e.get("innerBorder")&&e.get("el").addClass(v)},renderUI:function(){var e=this;e._initHeader(),e._initBars(),e._initLoadMask(),e.get("view").resetHeaderRow()},bindUI:function(){var e=this;e._bindHeaderEvent(),e._bindBodyEvent(),e._bindItemsEvent()},addColumn:function(e,t){var n=this,r=n.get("header");return r?e=r.addColumn(e,t):(e=new a(e),n.get("columns").splice(t,0,e)),e},clearData:function(){this.clearItems()},getRecords:function(){return this.getItems()},findColumn:function(e){var n=this,r=n.get("header");return t.isNumber(e)?r.getColumnByIndex(e):r.getColumnById(e)},findColumnByField:function(e){var t=this,n=t.get("header");return n.getColumn(function(t){return t.get("dataIndex")===e})},findCell:function(e,t){var n=this,r=null;return t instanceof $?r=t:r=n.findRow(t),r?n.get("view").findCell(e,r):null},findRow:function(e){var t=this;return t.get("view").findRow(e)},removeColumn:function(e){var t=this;t.get("header").removeColumn(e)},showData:function(e){var t=this;t.set("items",e)},resetColumns:function(){var e=this,t=e.get("store");e.get("view").resetHeaderRow(),t&&e.onLoad()},_bindScrollEvent:function(){var e=this,t=e.get("el"),n=t.find("."+h),r=e.get("header");n.on("scroll",function(){var t=n.scrollLeft(),i=n.scrollTop();r.scrollTo({left:t,top:i}),e.fire("scroll",{scrollLeft:t,scrollTop:i,bodyWidth:n.width(),bodyHeight:n.height()})})},_bindHeaderEvent:function(){var e=this,t=e.get("header"),n=e.get("view"),r=e.get("store");t.on("afterWidthChange",function(e){var r=e.target;r!==t&&n.resetColumnsWidth(r)}),t.on("afterSortStateChange",function(e){var t=e.target,n=e.newVal;n&&r&&r.sort(t.get("dataIndex"),t.get("sortState"))}),t.on("afterVisibleChange",function(r){var i=r.target;i!==t&&(n.setColumnVisible(i),e.fire("columnvisiblechange",{column:i}))}),t.on("click",function(n){var r=n.target;r!==t&&e.fire("columnclick",{column:r,domTarget:n.domTarget})}),t.on("forceFitWidth",function(){e.get("rendered")&&e.resetColumns()}),t.on("add",function(t){e.get("rendered")&&(e.fire("columnadd",{column:t.column,index:t.index}),e.resetColumns())}),t.on("remove",function(t){e.get("rendered")&&(e.resetColumns(),e.fire("columnremoved",{column:t.column,index:t.index}))})},_bindBodyEvent:function(){var e=this;e._bindScrollEvent()},_bindItemsEvent:function(){function n(e){return{record:e.item,row:e.domTarget,domTarget:e.domTarget}}var e=this,t=e.get("store");e.on("itemsshow",function(){e.fire("aftershow"),e.get("emptyDataTpl")&&(t&&t.getCount()==0?e.get("view").showEmptyText():e.get("view").clearEmptyText())}),e.on("itemsclear",function(){e.fire("clear")}),e.on("itemclick",function(t){var n=t.domTarget,r=t.item,i=$(n).closest("."+N),s=$(n).closest("."+w),o;return i.length&&(o=e.fire("cellclick",{record:r,row:s[0],cell:i[0],field:i.attr(_),domTarget:n,domEvent:t.domEvent})),o===!1?o:e.fire("rowclick",{record:r,row:s[0],domTarget:n})}),e.on("itemunselected",function(t){e.fire("rowunselected",n(t))}),e.on("itemselected",function(t){e.fire("rowselected",n(t))}),e.on("itemrendered",function(t){e.fire("rowcreated",n(t))}),e.on("itemremoved",function(t){e.fire("rowremoved",n(t))}),e.on("itemupdated",function(t){e.fire("rowupdated",n(t))})},_getInnerWidth:function(e){return e=e||this.get("width"),H(e)},_initHeader:function(){var e=this,t=e.get("header"),n=e.get("el").find("."+c);t||(t=(new u({columns:e.get("columns"),tableCls:e.get("tableCls"),forceFit:e.get("forceFit"),width:e._getInnerWidth(),render:n,parent:e})).render(),e.set("header",t))},_initBars:function(){var e=this,t=e.get("bbar"),n=e.get("tbar");e._initBar(t,g,"bbar"),e._initBar(n,m,"tbar")},_initBar:function(e,t,n){var r=this,s=null,o=null;if(e){!e.xclass&&!(e instanceof i.Controller)&&(e.xclass="bar",e.children=e.children||[],e.items&&(e.children.push({xclass:"bar",defaultChildClass:"bar-item-button",elCls:y,children:e.items}),e.items=null),e.pagingBar&&(s=r.get("store"),o={xclass:"pagingbar",store:s,pageSize:s.pageSize},e.pagingBar!==!0&&(o=S.merge(o,e.pagingBar)),e.children.push(o)));if(e.xclass){var u=r.get("el").find("."+t);u.show(),e.render=u,e.elTagName="div",e.autoRender=!0,e=r.addChild(e)}r.set(n,e)}return e},_initLoadMask:function(){var e=this,n=e.get("loadMask");n&&!n.show&&(n=new t.Mask.LoadMask({el:e.get("el")}),e.set("loadMask",n))},_uiSetWidth:function(e){var t=this;t.get("rendered")&&(f(e)?t.get("header").set("width","100%"):t.get("header").set("width",t._getInnerWidth(e))),t.get("view").setTableWidth()},_uiSetForceFit:function(e){var t=this;t.get("header").set("forceFit",e)},_uiSetHeight:function(e,t){var n=this,r=n.get("header");n.get("view").setBodyHeight(e),n.get("rendered")&&(n.get("forceFit")&&!t.prevVal&&(r.forceFitColumns(),n.get("view").setTableWidth()),r.setTableWidth())}},{ATTRS:{header:{},bbar:{},itemCls:{value:w},columns:{view:!0,value:[]},forceFit:{sync:!1,value:!1},emptyDataTpl:{view:!0},headerRowTpl:{view:!0,value:'{cellsTpl}'},headerCellTpl:{view:!0,value:''},rowTpl:{view:!0,value:'{cellsTpl}'},cellTpl:{view:!0,value:''+'
          {cellText}
          '+""},cellTextTpl:{view:!0,value:'{text}'},events:{value:{aftershow:!1,clear:!1,cellclick:!1,columnclick:!1,rowclick:!1,rowcreated:!1,rowremoved:!1,rowselected:!1,rowunselected:!1,scroll:!1}},stripeRows:{view:!0,value:!0},tbar:{},tableCls:{view:!0,sync:!1,value:l+"grid-table"},tableTpl:{view:!0,value:'
          '},tpl:{value:'
          '},innerBorder:{sync:!1,value:!0},useEmptyCell:{view:!0,value:!0},useHeaderRow:{view:!0,value:!0},xview:{value:B}}},{xclass:"grid"});return j}),define("bui/grid/format",function(e){function t(e){return e<10?"0"+e:e}var n={dateRenderer:function(e){if(!e)return"";if(BUI.isString(e))return e;var n=null;try{n=new Date(e)}catch(r){return""}return!n||!n.getFullYear?"":n.getFullYear()+"-"+t(n.getMonth()+1)+"-"+t(n.getDate())},datetimeRenderer:function(e){if(!e)return"";if(BUI.isString(e))return e;var n=null;try{n=new Date(e)}catch(r){return""}return!n||!n.getFullYear?"":n.getFullYear()+"-"+t(n.getMonth()+1)+"-"+t(n.getDate())+" "+t(n.getHours())+":"+t(n.getMinutes())+":"+t(n.getSeconds())},cutTextRenderer:function(e){return function(t){return t=t||"",t.toString().length>e?t.toString().substring(0,e)+"...":t}},enumRenderer:function(e){return function(t){return e[t]||""}},multipleItemsRenderer:function(e){var t=n.enumRenderer(e);return function(e){var n=[];return e?(BUI.isArray(e)||(e=e.toString().split(",")),$.each(e,function(e,r){n.push(t(r))}),n.join(",")):""}},moneyCentRenderer:function(e){return BUI.isString(e)&&(e=parseFloat(e)),$.isNumberic(e)?(e*.01).toFixed(2):e}};return n}),function(){var e="bui/grid/plugins/";define("bui/grid/plugins",["bui/common",e+"selection",e+"cascade",e+"cellediting",e+"rowediting",e+"dialogediting",e+"menu",e+"summary"],function(t){var n=t("bui/common"),r=t(e+"selection"),i={};return n.mix(i,{CheckSelection:r.CheckSelection,RadioSelection:r.RadioSelection,Cascade:t(e+"cascade"),CellEditing:t(e+"cellediting"),RowEditing:t(e+"rowediting"),DialogEditing:t(e+"dialogediting"),GridMenu:t(e+"menu"),Summary:t(e+"summary")}),i})}(),define("bui/grid/plugins/menu",["bui/common","bui/menu"],function(e){var t=e("bui/common"),n=e("bui/menu"),r=t.prefix,i="sort-asc",s="sort-desc",o="column-setting",u="icon-check",a=function(e){a.superclass.constructor.call(this,e)};return t.extend(a,t.Base),a.ATTRS={menu:{},activedColumn:{},triggerCls:{value:r+"grid-hd-menu-trigger"},items:{value:[{id:i,text:"\u5347\u5e8f",iconCls:"icon-arrow-up"},{id:s,text:"\u964d\u5e8f",iconCls:"icon-arrow-down"},{xclass:"menu-item-sparator"},{id:o,text:"\u8bbe\u7f6e\u5217",iconCls:"icon-list-alt"}]}},t.augment(a,{initializer:function(e){var t=this;t.set("grid",e)},renderUI:function(e){var n=this,r=e.get("columns");t.each(r,function(e){n._addShowMenu(e)})},bindUI:function(e){var t=this;e.on("columnadd",function(e){t._addShowMenu(e.column)}),e.on("columnclick",function(e){var n=$(e.domTarget),r=e.column,i;t.set("activedColumn",r),n.hasClass(t.get("triggerCls"))&&(i=t.get("menu")||t._initMenu(),i.set("align",{node:n,points:["bl","tl"],offset:[0,0]}),i.show(),t._afterShow(r,i))})},_addShowMenu:function(e){e.get("fixed")||e.set("showMenu",!0)},_afterShow:function(e,t){var n=this,r=n.get("grid");t=t||n.get("menu"),n._resetSortMenuItems(e,t),n._resetColumnsVisible(t)},_resetColumnsVisible:function(e){var t=this,n=e.findItemById(o),r=n.get("subMenu")||t._initColumnsMenu(n),i=t.get("grid").get("columns");r.removeChildren(!0),$.each(i,function(e,t){if(!t.get("fixed")){var n={xclass:"context-menu-item",text:t.get("title"),column:t,iconCls:"icon"},i=r.addChild(n);t.get("visible")&&i.set("selected",!0)}})},_resetSortMenuItems:function(e,t){var n=t.findItemById(i),r=t.findItemById(s);e.get("sortable")?(n.set("disabled",!1),r.set("disabled",!1)):(n.set("disabled",!0),r.set("disabled",!0))},_initMenu:function(){var e=this,t=e.get("menu"),r;return t||(r=e.get("items"),$.each(r,function(e,t){t.xclass||(t.xclass="context-menu-item")}),t=new n.ContextMenu({children:r,elCls:"grid-menu"}),e._initMenuEvent(t),e.set("menu",t)),t},_initMenuEvent:function(e){var t=this;e.on("itemclick",function(e){var n=e.item,r=n.get("id"),o=t.get("activedColumn");r===i?o.set("sortState","ASC"):r===s&&o.set("sortState","DESC")}),e.on("afterVisibleChange",function(e){var n=e.newVal,r=t.get("activedColumn");n&&r?r.set("open",!0):r.set("open",!1)})},_initColumnsMenu:function(e){var t=new n.ContextMenu({multipleSelect:!0,elCls:"grid-column-menu"});return e.set("subMenu",t),t.on("itemclick",function(e){var t=e.item,n=t.get("column"),r=t.get("selected");r?n.set("visible",!0):n.set("visible",!1)}),t},destructor:function(){var e=this,t=e.get("menu");t&&t.destroy(),e.off(),e.clearAttrVals()}}),a}),define("bui/grid/plugins/cascade",["bui/common"],function(e){var t=e("bui/common"),n=t.prefix,r="",i="data-record",s=n+"grid-cascade",o=s+"-expand",u=s+"-row",a=s+"-cell",f=s+"-collapse",l=function(e){l.superclass.constructor.call(this,e)};return t.extend(l,t.Base),l.ATTRS={width:{value:40},cellInner:{value:''},rowTpl:{value:''},renderer:{},events:["expand","collapse","removed"]},t.augment(l,{initializer:function(e){var t=this,n={title:"",elCls:"center",width:t.get("width"),resizable:!1,fixed:!0,sortable:!1,cellTpl:t.get("cellInner")},r=e.addColumn(n,0);e.set("innerBorder",!1),t.set("grid",e)},bindUI:function(e){var t=this;e.on("cellclick",function(e){var n=$(e.domTarget),r=n.closest("."+s);r.length&&(r.hasClass(o)?t._onCollapse(e.record,e.row,r):t._onExpand(e.record,e.row,r))}),e.on("columnvisiblechange",function(){t._resetColspan()}),e.on("rowremoved",function(e){t.remove(e.record)}),e.on("clear",function(){t.removeAll()})},expandAll:function(){var e=this,t=e.get("grid"),n=t.getRecords();$.each(n,function(t,n){e.expand(n)})},expand:function(e){var t=this,n=t.get("grid"),r=n.findRow(e);r&&t._onExpand(e,r)},collapse:function(e){var t=this,n=t.get("grid"),r=n.findRow(e);r&&t._onCollapse(e,r)},removeAll:function(){var e=this,t=e._getAllCascadeRows();t.each(function(t,n){e._removeCascadeRow(n)})},remove:function(e){var t=this,n=t._findCascadeRow(e);n&&t._removeCascadeRow(n)},collapseAll:function(){var e=this,t=e.get("grid"),n=t.getRecords();$.each(n,function(t,n){e.collapse(n)})},_getRowRecord:function(e){return $(e).data(i)},_removeCascadeRow:function(e){this.fire("removed",{record:$(e).data(i),row:e}),$(e).remove()},_findCascadeRow:function(e){var t=this,n=t._getAllCascadeRows(),r=null;return $.each(n,function(n,i){if(t._getRowRecord(i)===e)return r=i,!1}),r},_getAllCascadeRows:function(){var e=this,t=e.get("grid");return t.get("el").find("."+u)},_getCascadeRow:function(e){var t=$(e).next();return t.hasClass(u)?t:null},_getRowContent:function(e){var t=this,n=t.get("renderer"),r=n?n(e):"";return r},_createCascadeRow:function(e,t){var n=this,r=n.get("rowTpl"),s=n._getRowContent(e),o=$(r).insertAfter(t);return o.find("."+a).append($(s)),o.data(i,e),o},_onExpand:function(e,t,n){var r=this,i=r._getCascadeRow(t),u=r._getColumnCount(t);n=n||$(t).find("."+s),n.addClass(o);if(!i||!i.length)i=r._createCascadeRow(e,t);$(i).removeClass(f),r._setColSpan(i,t),r.fire("expand",{record:e,row:i[0]})},_onCollapse:function(e,t,n){var r=this,i=r._getCascadeRow(t);n=n||$(t).find("."+s),n.removeClass(o);if(i||!i.length)$(i).addClass(f),r.fire("collapse",{record:e,row:i[0]})},_getColumnCount:function(e){return $(e).children().filter(function(){return $(this).css("display")!=="none"}).length},_setColSpan:function(e,t){t=t||$(e).prev();var n=this,r=n._getColumnCount(t);$(e).find("."+a).attr("colspan",r)},_resetColspan:function(){var e=this,t=e._getAllCascadeRows();$.each(t,function(t,n){e._setColSpan(n)})},destructor:function(){var e=this;e.removeAll(),e.off(),e.clearAttrVals()}}),l}),define("bui/grid/plugins/selection",["bui/common"],function(e){function o(e){o.superclass.constructor.call(this,e)}var t=e("bui/common"),n=t.prefix,r=n+"grid-checkBox",i="x-grid-checkbox",s=n+"grid-radio";t.extend(o,t.Base),o.ATTRS={width:{value:40},column:{},cellInner:{value:'
          '}},t.augment(o,{createDom:function(e){var t=this,r={title:"",width:t.get("width"),fixed:!0,resizable:!1,sortable:!1,tpl:'
          '+t.get("cellInner")+"",cellTpl:t.get("cellInner")},i=e.addColumn(r,0);e.set("multipleSelect",!0),t.set("column",i)},bindUI:function(e){var t=this,n=t.get("column"),r=n.get("el"),s=r.find("."+i);s.on("click",function(){var t=r.hasClass("checked");t?(e.clearSelection(),r.removeClass("checked")):(e.setAllSelection(),r.addClass("checked"))}),e.on("rowunselected",function(e){r.removeClass("checked")}),e.on("clear",function(){r.removeClass("checked")})}});var u=function(e){u.superclass.constructor.call(this,e)};t.extend(u,t.Base),u.ATTRS={width:{value:40},column:{},cellInner:{value:'
          '}},t.augment(u,{createDom:function(e){var t=this,n={title:"",width:t.get("width"),resizable:!1,fixed:!0,sortable:!1,cellTpl:t.get("cellInner")},r=e.addColumn(n,0);e.set("multipleSelect",!1),t.set("column",r)},bindUI:function(e){var t=this;e.on("rowselected",function(e){t._setRowChecked(e.row,!0)}),e.on("rowunselected",function(e){t._setRowChecked(e.row,!1)})},_setRowChecked:function(e,t){var n=$(e),r=n.find("."+s);r.attr("checked",t)}});var a={CheckSelection:o,RadioSelection:u};return a}),define("bui/grid/plugins/summary",["bui/common"],function(e){function l(e){return e>0?' ':""}function c(e,t){return''+h(e)+""}function h(e){return'
          '+''+e+""+"
          "}function p(){return' '}var t=e("bui/common"),n=t.prefix,r=n+"grid-row",i=n+"grid-body",s=n+"grid-summary-row",o=n+"grid-cell-inner",u="grid-td-",a=n+"grid-cell-text",f=n+"grid-cell",d=function(e){d.superclass.constructor.call(this,e)};return d.ATTRS={footerTpl:{value:""},footerEl:{},summaryTitle:{value:"\u67e5\u8be2\u5408\u8ba1"},pageSummaryTitle:{value:"\u672c\u9875\u5408\u8ba1"},field:{value:"summary"},pageSummaryField:{value:"pageSummary"},summaryField:{value:"summary"},pageSummary:{},summary:{}},t.extend(d,t.Base),t.augment(d,{initializer:function(e){var t=this;t.set("grid",e)},renderUI:function(e){var t=this,n=e.get("el").find("."+i),r=n.find("table"),s=$(t.get("footerTpl")).appendTo(r);t.set("footerEl",s)},bindUI:function(e){var t=this,n=e.get("store");n&&(n.on("beforeProcessLoad",function(e){t._processSummary(e)}),n.on("add",function(){t.resetPageSummary()}),n.on("remove",function(){t.resetPageSummary()}),n.on("update",function(){t.resetPageSummary()})),e.on("aftershow",function(){t.resetSummary()}),e.get("header").on("afterVisibleChange",function(){t.resetSummary()})},_processSummary:function(e){var t=this,n=t.get("footerEl");n.empty();if(!e)return;var r= +e[t.get("pageSummaryField")],i=e[t.get("summaryField")];t.set("pageSummary",r),t.set("summary",i)},resetPageSummary:function(){var e=this,n=e.get("grid"),r=n.get("columns"),i=e._calculatePageSummary(),s=e.get("pageEl");e.set("pageSummary",i),s&&(t.each(r,function(t){if(t.get("summary")&&t.get("visible")){var n=t.get("id"),r=s.find("."+u+n),o=e._getSummaryCellText(t,i);r.find("."+a).text(o)}}),e._updateFirstRow(s,e.get("pageSummaryTitle")))},resetSummary:function(e,t){var n=this,r=n.get("footerEl"),i=null;r.empty(),e=e||n.get("pageSummary"),e||(e=n._calculatePageSummary(),n.set("pageSummary",e)),t=t||n.get("summary"),i=n._creatSummaryRow(e,n.get("pageSummaryTitle")),n.set("pageEl",i),n._creatSummaryRow(t,n.get("summaryTitle"))},_creatSummaryRow:function(e,t){if(!e)return null;var n=this,r=n.get("footerEl"),i=n._getSummaryTpl(e),s=$(i).appendTo(r);return n._updateFirstRow(s,t),s},_updateFirstRow:function(e,t){var n=e.find("td").first(),r=n.find("."+o);if(r.length){var i=t+": ";text=r.text(),text.indexOf(i)===-1&&(text=i+text),n.html(h(text))}else n.html(h(t+":"))},_getSummaryTpl:function(e){var t=this,n=t.get("grid"),i=n.get("columns"),o=[],u=-1,a=-1,f=null;return $.each(i,function(n,r){if(r.get("visible")){a+=1;if(r.get("summary")){o.push(l(a-u-1));var i=t._getSummaryCellText(r,e),s=c(i,r.get("id"));o.push(s),u=a}}}),u!==a&&o.push(l(a-u)),f=['',o.join(""),p(),""].join(""),f},_getSummaryCellText:function(e,t){var n=this,r=t[e.get("dataIndex")],i=r==null?"":r,s=e.get("renderer"),o=s?s(i,t):i;return o},_calculatePageSummary:function(){var e=this,n=e.get("grid"),r=n.get("store"),i=n.get("columns"),s={};return t.each(i,function(e){if(e.get("summary")){var t=e.get("dataIndex");s[t]=r.sum(t)}}),s}}),d}),define("bui/grid/plugins/editing",function(e){function r(e){r.superclass.constructor.call(this,e)}var t=BUI.prefix+"grid-cell-inner",n=BUI.prefix+"grid-cell-error";return BUI.extend(r,BUI.Base),r.ATTRS={align:{value:{points:["cl","cl"]}},showError:{value:!0},errorTpl:{value:'!'},isInitEditors:{value:!1},record:{},curEditor:{},hasValid:{},editors:{value:[]},triggerCls:{},triggerSelected:{value:!0}},BUI.augment(r,{initializer:function(e){var t=this;t.set("grid",e),t.initEditing(e)},renderUI:function(){var e=this,t=e.get("grid");BUI.use("bui/editor",function(n){e.initEditors(n),e._initGridEvent(t),e.set("isInitEditors",!0)})},initEditing:function(e){},_getCurEditor:function(){return this.get("curEditor")},_initGridEvent:function(e){function r(e,n){t.get("hasValid")&&t.validRecord(e,t.getFields(),$(n))}var t=this,n=e.get("header");e.on("cellclick",function(e){var n=null,r=e.domTarget,i=t.get("triggerCls"),s=t._getCurEditor();s&&s.get("acceptEvent")?(s.accept(),s.hide()):s&&s.cancel(),n=t.getEditor(e.field);if(n&&$(r).closest("."+i).length){t.showEditor(n,e);if(!t.get("triggerSelected"))return!1}}),e.on("rowcreated",function(e){r(e.record,e.row)}),e.on("rowremoved",function(e){t.get("record")==e.record&&t.cancel()}),e.on("rowupdated",function(e){r(e.record,e.row)}),e.on("scroll",function(e){var n=t._getCurEditor();if(n){var r=n.get("align"),i=r.node,s=i.position();s.top<0||s.top>e.bodyHeight?n.hide():(n.set("align",r),n.show())}}),n.on("afterVisibleChange",function(e){if(e.target&&e.target!=n){var r=e.target;t.onColumnVisibleChange(r)}})},initEditors:function(e){var t=this,n=t.get("grid"),r=[],i=n.get("columns");BUI.each(i,function(e){var n=t.getFieldConfig(e);n&&(n.name=e.get("dataIndex"),n.id=e.get("id"),n.validator&&(n.validator=t.wrapValidator(n.validator)),r.push(n))});var s=t.getEditorCfgs(r);BUI.each(s,function(n){t.initEidtor(n,e)})},getFieldConfig:function(e){return e.get("editor")},wrapValidator:function(e){var t=this;return function(n){var r=t.get("record");return e(n,r)}},onColumnVisibleChange:function(e){},getEditorCfgs:function(e){},getEditorConstructor:function(e){return e.Editor},initEidtor:function(e,t){var n=this,r=n.getEditorConstructor(t),i=new r(e);return i.render(),n.get("editors").push(i),n.bindEidtor(i),i},bindEidtor:function(e){var t=this,n=t.get("grid"),r=n.get("store");e.on("accept",function(){var n=t.get("record");t.updateRecord(r,n,e),t.set("curEditor",null)}),e.on("cancel",function(){t.set("curEditor",null)})},getEditor:function(e){},getAlignNode:function(e){},getEditValue:function(e){},showEditor:function(e,t){var n=this,r=n.getEditValue(t),i=n.getAlignNode(t);n.beforeShowEditor(e,t),n.set("record",t.record),e.setValue(r);if(i){var s=n.get("align");s.node=i,e.set("align",s)}e.show(),n.focusEditor(e,t.field),n.set("curEditor",e)},focusEditor:function(e,t){e.focus()},beforeShowEditor:function(e,t){},_createEditOptions:function(e,t){var n=this,r=n.get("grid"),i=r.findRow(e),s=r.findColumnByField(t),o=r.findCell(s.get("id"),i);return{record:e,field:t,cell:o[0],row:i[0]}},valid:function(){var e=this,t=e.get("grid"),n=t.get("store");if(n){var r=n.getResult();BUI.each(r,function(t){e.validRecord(t,e.getFields())})}e.set("hasValid",!0)},isValid:function(){var e=this,t=e.get("grid");return e.get("hasValid")||e.valid(),!t.get("el").find("."+n).length},clearErrors:function(){var e=this,t=e.get("grid");t.get("el").find("."+n).remove()},getFields:function(e){},validRecord:function(e,t,n){var r=this,i=[];r.setInternal("record",e),t=t||r.getFields(),BUI.each(t,function(t){var n=t.get("name"),r=e[n]||"",s=t.getValidError(r);s&&i.push({name:n,error:s,id:t.get("id")})}),r.showRecordError(e,i,n)},showRecordError:function(e,t,n){var r=this,i=r.get("grid");n=n||i.findRow(e),n&&(r._clearRowError(n),BUI.each(t,function(e){var t=i.findCell(e.id,n);r._showCellError(t,e.error)}))},updateRecord:function(e,t,n){},_clearRowError:function(e){e.find("."+n).remove()},_showCellError:function(e,n){var r=this,i=BUI.substitute(r.get("errorTpl"),{error:n}),s=e.find("."+t);$(i).appendTo(s)},edit:function(e,t){var n=this,r=n._createEditOptions(e,t),i=n.getEditor(t);n.showEditor(i,r)},cancel:function(){var e=this,t=e.get("editors");BUI.each(t,function(e){e.get("visible")&&e.cancel()}),e.set("curEditor",null),e.set("record",null)},destructor:function(){var e=this,t=e.get("editors");BUI.each(t,function(e){e.destroy||e.destroy()}),e.off(),e.clearAttrVals()}}),r}),define("bui/grid/plugins/cellediting",["bui/grid/plugins/editing"],function(e){var t=e("bui/grid/plugins/editing"),n=BUI.prefix+"grid-body",r=BUI.prefix+"grid-cell",i=function(e){i.superclass.constructor.call(this,e)};return i.ATTRS={triggerCls:{value:r}},BUI.extend(i,t),BUI.augment(i,{getEditorCfgs:function(e){var t=this,r=t.get("grid"),i=r.get("el").find("."+n),s=[];return BUI.each(e,function(e){s.push({field:e,changeSourceEvent:null,hideExceptNode:i,autoUpdate:!1,preventHide:!1})}),s},getEditor:function(e){if(!e)return null;var t=this,n=t.get("editors"),r=null;return BUI.each(n,function(t){if(t.get("field").get("name")===e)return r=t,!1}),r},beforeShowEditor:function(e,t){var n=this,r=$(t.cell);n.resetWidth(e,r.outerWidth())},resetWidth:function(e,t){e.set("width",t)},updateRecord:function(e,t,n){var r=this,i=n.getValue(),s=n.get("field").get("name"),o=t[s];i=BUI.isDate(i)?i.getTime():i,o!==i&&e.setValue(t,s,i)},getAlignNode:function(e){return $(e.cell)},getFields:function(){var e=[],t=this,n=t.get("editors");return BUI.each(n,function(t){e.push(t.get("field"))}),e},getEditValue:function(e){if(e.record&&e.field){var t=e.record[e.field];return t==null?"":t}return""}}),i}),define("bui/grid/plugins/rowediting",["bui/common","bui/grid/plugins/editing"],function(e){var t=e("bui/common"),n=e("bui/grid/plugins/editing"),r=t.prefix+"grid-row",i=function(e){i.superclass.constructor.call(this,e)};return i.ATTRS={align:{value:{points:["tl","tl"],offset:[-2,0]}},triggerCls:{value:r}},t.extend(i,n),t.augment(i,{getEditorCfgs:function(e){var t=[];return t.push({changeSourceEvent:null,autoUpdate:!1,form:{children:e,buttonBar:{elCls:"centered toolbar"}}}),t},wrapValidator:function(e){var t=this;return function(n){var r=t.get("curEditor"),i=r?r.getValue():t.get("record");if(i)return e(n,i)}},focusEditor:function(e,t){var n=e.get("form"),r=n.getField(t);r&&r.focus()},getFieldConfig:function(e){var t=e.get("editor");if(t)return t;var n={xtype:"plain"};return e.get("dataIndex")&&e.get("renderer")&&(n.renderer=e.get("renderer")),n},updateRecord:function(e,n,r){var i=this,s=r.getValue();t.each(s,function(e,n){t.isDate(e)&&(s[n]=e.getTime())}),t.mix(n,s),e.update(n)},getEditor:function(e){var t=this,n=t.get("editors");return n[0]},onColumnVisibleChange:function(e){var t=this,n=e.get("id"),r=t.getEditor(),i=r.getChild(n,!0);i&&i.set("visible",e.get("visible"))},beforeShowEditor:function(e,n){var r=this,i=r.get("grid"),s=i.get("columns"),o=e.get("form"),u=$(n.row);e.set("width",u.width()),t.each(s,function(e){if(!e.get("visible"))n.set("visible",!1);else{var t=e.get("dataIndex"),n=o.getField(t),r=e.get("el").outerWidth()-n.getAppendWidth();n.set("width",r)}})},getEditValue:function(e){return e.record},getEditorConstructor:function(e){return e.RecordEditor},getAlignNode:function(e){return $(e.row)},getFields:function(){var e=this,t=e.get("editors");return t[0].get("form").get("children")}}),i}),define("bui/grid/plugins/dialogediting",["bui/common"],function(e){function i(e){i.superclass.constructor.call(this,e)}var t=e("bui/common"),n="add",r="edit";return i.ATTRS={record:{},curIndex:{},contentId:{},editor:{},form:{},events:{value:{recordchange:!1}},editType:{}},t.extend(i,t.Base),t.augment(i,{initializer:function(e){var n=this;n.set("grid",e),t.use("bui/editor",function(e){n._initEditor(e)})},bindUI:function(e){var t=this,n=t.get("triggerCls");n&&e.on("cellclick",function(r){var i=$(r.domTarget),s=t.get("editor");if(i.hasClass(n)&&s){t.edit(r.record);if(e.get("multipleSelect"))return!1}})},_initEditor:function(e){var n=this,r=n.get("contentId"),i=$("#"+r).find("form"),s=n.get("editor"),o=t.merge(s,{contentId:r,form:{srcNode:i}});s=new e.DialogEditor(o),n._bindEditor(s),n.set("editor",s),n.set("form",s.get("form"))},_bindEditor:function(e){var t=this;e.on("accept",function(){var n=e.get("form"),r=n.serializeToObject();t.saveRecord(r)})},edit:function(e){var t=this;t.set("editType",r),t.showEditor(e)},add:function(e,t){var r=this;r.set("editType",n),r.set("curIndex",t),r.showEditor(e)},saveRecord:function(e){var r=this,i=r.get("grid"),s=r.get("editType"),o=r.get("curIndex"),u=i.get("store"),a=r.get("record");t.mix(a,e),s==n?o!=null?u.addAt(a,o):u.add(a):u.update(a)},showEditor:function(e){var t=this,n=t.get("editor");n.show(),n.setValue(e),t.set("record",e),t.fire("recordchange",{record:e,editType:t.get("editType")})},cancel:function(){var e=this,t=e.get("editor");t.cancel()},destructor:function(){var e=this,t=e.get("editor");t&&t.destroy(),e.off(),e.clearAttrVals()}}),i}),define("bui/tree",["bui/common","bui/tree/treemixin","bui/tree/treelist"],function(e){var t=e("bui/common"),n=t.namespace("Tree");return t.mix(n,{TreeList:e("bui/tree/treelist"),Mixin:e("bui/tree/treemixin")}),n}),define("bui/tree/treemixin",["bui/common","bui/data"],function(e){function t(e,t){return n.isString(t)&&(t=e.getItem(t)),t}var n=e("bui/common"),r=e("bui/data"),i="expanded",s="loading",o="checked",u="partial-checked",a={NONE:"none",ALL:"all",CUSTOM:"custom",ONLY_LEAF:"onlyLeaf"},f="x-tree-icon",l="x-tree-elbow",c="x-tree-show-line",h=l+"-",p=f+"-wraper",d=h+"line",v=h+"end",m=h+"empty",g=h+"expander",y=f+"-checkbox",b=g+"-end",w=function(){};return w.ATTRS={store:{getter:function(e){if(!e){var t=this,n=new r.TreeStore({root:t.get("root"),data:t.get("nodes")});return t.setInternal("store",n),n}return e}},root:{},nodes:{sync:!1},iconContainer:{},iconWraperTpl:{value:'{icons}'},showLine:{value:!1},iconTpl:{value:''},leafCls:{value:h+"leaf"},dirCls:{value:h+"dir"},checkType:{value:"custom"},checkedField:{valueFn:function(){return this.getStatusField("checked")}},itemStatusFields:{value:{expanded:"expanded",disabled:"disabled",checked:"checked"}},dirSelectable:{value:!0},showRoot:{value:!1},events:{value:{expanded:!1,collapsed:!1,checkchange:!1}},startLevel:{value:1}},n.augment(w,{collapseAll:function(){var e=this,t=e.get("view").getAllElements();n.each(t,function(t){var n=e.getItemByElement(t);n&&e._collapseNode(n,t,!0)})},collapseNode:function(e){var t=this,r;n.isString(e)&&(e=t.findNode(e)),r=t.findElement(e),t._collapseNode(e,r)},expandAll:function(){var e=this,t=e.get("view").getAllElements();n.each(t,function(t){var n=e.getItemByElement(t);e._expandNode(n,t,!0)})},expandNode:function(e,t){var r=this,i;n.isString(e)&&(e=r.findNode(e)),e.parent&&!r.isExpanded(e.parent)&&r.expandNode(e.parent),i=r.findElement(e),r._expandNode(e,i,t)},expandPath:function(e,t,n){if(!e)return;n=n||0;var r=this,i=r.get("store"),s,o,u,a,f=e.split(",");s=r.findNode(f[n]);for(u=n+1;u0&&(s=r.children[t-1],n._updateIcons(s))),n._updateIcons(r)):(u=n._getInsetIndex(e),n.addItemAt(e,u),s=n.get("nodes")[t-1],n._updateIcons(s))},_getInsetIndex:function(e){var t=this,n,r=null;return n=t._getNextItem(e),n?t.indexOfItem(n):t.getItemCount()},_getNextItem:function(e){var t=this,r=e.parent,i,s,o=null;return r?(i=r.children,s=n.Array.indexOf(e,i),o=i[s+1],o||t._getNextItem(r)):null},onAdd:function(e){var t=this,n=e.node,r=e.index;t._addNode(n,r)},_updateNode:function(e){var t=this;t.updateItem(e),t._updateIcons(e)},onUpdate:function(e){var t=this,n=e.node;t._updateNode(n)},_removeNode:function(e,t){var n=this,r=e.parent,i,s;n.collapseNode(e);if(!r)return;n.removeItem(e),n.isExpanded(r)&&(i=r.children.length,i==t&&t!==0&&(s=r.children[t-1],n._updateIcons(s))),n._updateIcons(r),n._resetParentChecked(r)},onRemove:function(e){var t=this,n=e.node,r=e.index;t._removeNode(n,r)},_loadNode:function(e){var t=this;t.expandNode(e),t._updateIcons(e),t.setItemStatus(e,s,!1)},onLoad:function(e){var t=this,n=t.get("store"),r=n.get("root"),i;(!e||e.node==r)&&t._initRoot(),e&&e.node&&t._loadNode(e.node)},_isExpanded:function(e,t){return this.hasStatus(e,i,t)},_getIconsTpl:function(e){var t=this,r=e.level,i=t.get("startLevel"),s=t.get("iconWraperTpl"),o=[],u;for(u=i;ut)r=r.parent,i-=1;return r},_getIcon:function(e){var t=this,r=t.get("iconTpl");return n.substitute(r,{cls:e})},_isLastNode:function(e){if(!e)return!1;if(e==this.get("root"))return!0;var t=this,n=e.parent,r=n?n.children:t.get("nodes"),i;return i=r.length,r[i-1]===e},_initNodes:function(e,t,r){var i=this;n.each(e,function(e){e.level=t,e.leaf==null&&(e.leaf=e.children?!1:!0),r&&!e.parent&&(e.parent=r),i._initChecked(e),e.children&&i._initNodes(e.children,t+1,e)})},_collapseNode:function(e,t,n){var r=this;if(e.leaf)return;r.hasStatus(e,i,t)&&(r.setItemStatus(e,i,!1,t),n?(r._collapseChildren(e,n),r.removeItems(e.children)):r._hideChildrenNodes(e),r.fire("collapsed",{node:e,element:t}))},_hideChildrenNodes:function(e){var t=this,r=e.children;n.each(r,function(e){t.removeItem(e),t._hideChildrenNodes(e)})},_collapseChildren:function(e,t){var r=this,i=e.children;n.each(i,function(e){r.collapseNode(e,t)})},_expandNode:function(e,t,r){var s=this,o=s.get("store");if(e.leaf)return;s.hasStatus(e,i,t)||(o&&!o.isLoaded(e)?s._isLoading(e,t)||o.loadNode(e):t&&(s.setItemStatus(e,i,!0,t),s._showChildren(e),s.fire("expanded",{node:e,element:t}))),n.each(e.children,function(e){(r||s.isExpanded(e))&&s.expandNode(e,r)})},_showChildren:function(e){if(!e||!e.children)return;var t=this,n=t.indexOfItem(e),r=e.children.length,i,s;for(s=r-1;s>=0;s--)i=e.children[s],t.getItem(i)||t.addItemAt(i,n+1)},_isLoading:function(e,t){var n=this;return n.hasStatus(e,s,t)},_resetIcons:function(e,t){var n=this,r=n.get("iconContainer"),i,s=n._getIconsTpl(e);$(t).find("."+p).remove(),i=$(t).find("."+r),r&&i.length?$(s).appendTo(i):$(t).prepend($(s))},_toggleExpand:function(e,t){var n=this;n._isExpanded(e,t)?n._collapseNode(e,t):n._expandNode(e,t)},_updateIcons:function(e){var t=this,r=t.findElement(e);r&&(t._resetIcons(e,r),t._isExpanded(e,r)&&!e.leaf&&n.each(e.children,function(e){t._updateIcons(e)}))},_uiSetShowRoot:function(e){var t=this,n=this.get("showRoot")?0:1;t.set("startLevel",n)},_uiSetNodes:function(e){var t=this,n=t.get("store");n.setResult(e)},_uiSetShowLine:function(e){var t=this,n=t.get("el");e?n.addClass(c):n.removeClass(c)}}),w}),define("bui/tree/treelist",["bui/common","bui/list","bui/tree/treemixin"],function(e){var t=e("bui/common"),n=e("bui/list"),r=e("bui/tree/treemixin"),i=n.SimpleList.extend([r],{},{ATTRS:{itemCls:{value:t.prefix+"tree-item"},itemTpl:{value:"
        • {text}
        • "},idField:{value:"id"}}},{xclass:"tree-list"});return i}),define("bui/tooltip",["bui/common","bui/tooltip/tip","bui/tooltip/tips"],function(e){var t=e("bui/common"),n=t.namespace("Tooltip"),r=e("bui/tooltip/tip"),i=e("bui/tooltip/tips");return t.mix(n,{Tip:r,Tips:i}),n}),define("bui/tooltip/tip",["bui/common","bui/overlay"],function(e){function s(e,t){if(e==="left")return[-1*t,-4];if(e==="right")return[t,-4];if(e.indexOf("top"))return[0,t];if(e.indexOf("bottom"))return[0,-1*t]}var t=e("bui/common"),n=e("bui/overlay"),r="x-align-",i={left:["cl","cr"],right:["cr","cl"],top:["tc","bc"],bottom:["bc","tc"],"top-left":["tl","bl"],"top-right":["tr","br"],"bottom-left":["bl","tl"],"bottom-right":["br","tr"]},o=n.OverlayView.extend({renderUI:function(){},_getTitleContainer:function(){return this.get("el")},_uiSetTitle:function(e){var n=this,r=n.get("titleTpl"),i=n._getTitleContainer(),s=n.get("titleEl"),o;s&&s.remove(),e=e||"",t.isString(e)&&(e={title:e}),o=t.substitute(r,e),s=$(o).appendTo(i),n.set("titleEl",s)},_uiSetAlignType:function(e,t){var n=this;t&&t.prevVal&&n.get("el").removeClass(r+t.prevVal),e&&n.get("el").addClass(r+e)}},{ATTRS:{title:{},titleEl:{},alignType:{}}},{xclass:"tooltip-view"}),u=n.Overlay.extend({_uiSetAlignType:function(e){var t=this,n=t.get("offset"),r=t.get("align")||{},o=i[e];o&&(r.points=o,n&&(r.offset=s(e,n)),t.set("align",r))}},{ATTRS:{delegateTigger:{value:!0},alignType:{view:!0},title:{view:!0},showArrow:{value:!0},arrowContainer:{view:!0},autoHide:{value:!0},autoHideType:{value:"leave"},offset:{value:0},triggerEvent:{value:"mouseover"},titleTpl:{view:!0,value:"{title}"},xview:{value:o}}},{xclass:"tooltip"});return u.View=o,u}),define("bui/tooltip/tips",["bui/common","bui/tooltip/tip"],function(e){function t(e){return/^{.*}$/.test(e)}var n=e("bui/common"),r=e("bui/tooltip/tip"),i=function(e){i.superclass.constructor.call(this,e)};return i.ATTRS={tip:{},defaultAlignType:{}},n.extend(i,n.Base),n.augment(i,{_init:function(){this._initDom(),this._initEvent()},_initDom:function(){var e=this,t=e.get("tip"),n;t&&!t.isController&&(n=t.alignType,t=new r(t),t.render(),e.set("tip",t),n&&e.set("defaultAlignType",n))},_initEvent:function(){var e=this,t=e.get("tip");t.on("triggerchange",function(n){var r=n.curTrigger;e._replaceTitle(r),e._setTitle(r,t)})},_replaceTitle:function(e){var t=e.attr("title");t&&(e.attr("data-title",t),e[0].removeAttribute("title"))},_setTitle:function(e,r){var i=this,s=e.attr("data-title"),o=e.attr("data-align")||i.get("defaultAlignType");t(s)&&(s=n.JSON.looseParse(s)),r.set("title",s),o&&r.set("alignType",o)},render:function(){return this._init(),this}}),i}),BUI.use(["bui/common","bui/data","bui/list","bui/picker","bui/menu","bui/toolbar","bui/progressbar","bui/cookie","bui/form","bui/mask","bui/select","bui/tab","bui/calendar","bui/overlay","bui/editor","bui/grid","bui/tree","bui/tooltip"]); diff --git a/源码/src/main/webapp/resource/assets/js/bui.js b/源码/src/main/webapp/resource/assets/js/bui.js new file mode 100644 index 0000000..d2e98ca --- /dev/null +++ b/源码/src/main/webapp/resource/assets/js/bui.js @@ -0,0 +1,34895 @@ +/** + * @preserve SeaJS - A Module Loader for the Web + * v1.3.0 | seajs.org | MIT Licensed + */ + + +/** + * Base namespace for the framework. + */ +this.seajs = { _seajs: this.seajs } + + +/** + * The version of the framework. It will be replaced with "major.minor.patch" + * when building. + */ +seajs.version = '1.3.0' + + +/** + * The private utilities. Internal use only. + */ +seajs._util = {} + + +/** + * The private configuration data. Internal use only. + */ +seajs._config = { + + /** + * Debug mode. It will be turned off automatically when compressing. + */ + debug: '%DEBUG%', + + /** + * Modules that are needed to load before all other modules. + */ + preload: [] +} + +/** + * The minimal language enhancement + */ +;(function(util) { + + var toString = Object.prototype.toString + var AP = Array.prototype + + + util.isString = function(val) { + return toString.call(val) === '[object String]' + } + + + util.isFunction = function(val) { + return toString.call(val) === '[object Function]' + } + + + util.isRegExp = function(val) { + return toString.call(val) === '[object RegExp]' + } + + + util.isObject = function(val) { + return val === Object(val) + } + + + util.isArray = Array.isArray || function(val) { + return toString.call(val) === '[object Array]' + } + + + util.indexOf = AP.indexOf ? + function(arr, item) { + return arr.indexOf(item) + } : + function(arr, item) { + for (var i = 0; i < arr.length; i++) { + if (arr[i] === item) { + return i + } + } + return -1 + } + + + var forEach = util.forEach = AP.forEach ? + function(arr, fn) { + arr.forEach(fn) + } : + function(arr, fn) { + for (var i = 0; i < arr.length; i++) { + fn(arr[i], i, arr) + } + } + + + util.map = AP.map ? + function(arr, fn) { + return arr.map(fn) + } : + function(arr, fn) { + var ret = [] + forEach(arr, function(item, i, arr) { + ret.push(fn(item, i, arr)) + }) + return ret + } + + + util.filter = AP.filter ? + function(arr, fn) { + return arr.filter(fn) + } : + function(arr, fn) { + var ret = [] + forEach(arr, function(item, i, arr) { + if (fn(item, i, arr)) { + ret.push(item) + } + }) + return ret + } + + + var keys = util.keys = Object.keys || function(o) { + var ret = [] + + for (var p in o) { + if (o.hasOwnProperty(p)) { + ret.push(p) + } + } + + return ret + } + + + util.unique = function(arr) { + var o = {} + + forEach(arr, function(item) { + o[item] = 1 + }) + + return keys(o) + } + + + util.now = Date.now || function() { + return new Date().getTime() + } + +})(seajs._util) + +/** + * The tiny console + */ +;(function(util) { + + /** + * The safe wrapper of console.log/error/... + */ + util.log = function() { + if (typeof console === 'undefined') return + + var args = Array.prototype.slice.call(arguments) + + var type = 'log' + var last = args[args.length - 1] + console[last] && (type = args.pop()) + + // Only show log info in debug mode + if (type === 'log' && !seajs.debug) return + + if (console[type].apply) { + console[type].apply(console, args) + return + } + + // See issue#349 + var length = args.length + if (length === 1) { + console[type](args[0]) + } + else if (length === 2) { + console[type](args[0], args[1]) + } + else if (length === 3) { + console[type](args[0], args[1], args[2]) + } + else { + console[type](args.join(' ')) + } + } + +})(seajs._util) + +/** + * Path utilities + */ +;(function(util, config, global) { + + var DIRNAME_RE = /.*(?=\/.*$)/ + var MULTIPLE_SLASH_RE = /([^:\/])\/\/+/g + var FILE_EXT_RE = /\.(?:css|js)$/ + var ROOT_RE = /^(.*?\w)(?:\/|$)/ + + + /** + * Extracts the directory portion of a path. + * dirname('a/b/c.js') ==> 'a/b/' + * dirname('d.js') ==> './' + * @see http://jsperf.com/regex-vs-split/2 + */ + function dirname(path) { + var s = path.match(DIRNAME_RE) + return (s ? s[0] : '.') + '/' + } + + + /** + * Canonicalizes a path. + * realpath('./a//b/../c') ==> 'a/c' + */ + function realpath(path) { + MULTIPLE_SLASH_RE.lastIndex = 0 + + // 'file:///a//b/c' ==> 'file:///a/b/c' + // 'http://a//b/c' ==> 'http://a/b/c' + if (MULTIPLE_SLASH_RE.test(path)) { + path = path.replace(MULTIPLE_SLASH_RE, '$1\/') + } + + // 'a/b/c', just return. + if (path.indexOf('.') === -1) { + return path + } + + var original = path.split('/') + var ret = [], part + + for (var i = 0; i < original.length; i++) { + part = original[i] + + if (part === '..') { + if (ret.length === 0) { + throw new Error('The path is invalid: ' + path) + } + ret.pop() + } + else if (part !== '.') { + ret.push(part) + } + } + + return ret.join('/') + } + + + /** + * Normalizes an uri. + */ + function normalize(uri) { + uri = realpath(uri) + var lastChar = uri.charAt(uri.length - 1) + + if (lastChar === '/') { + return uri + } + + // Adds the default '.js' extension except that the uri ends with #. + // ref: http://jsperf.com/get-the-last-character + if (lastChar === '#') { + uri = uri.slice(0, -1) + } + else if (uri.indexOf('?') === -1 && !FILE_EXT_RE.test(uri)) { + uri += '.js' + } + + // Remove ':80/' for bug in IE + if (uri.indexOf(':80/') > 0) { + uri = uri.replace(':80/', '/') + } + + return uri + } + + + /** + * Parses alias in the module id. Only parse the first part. + */ + function parseAlias(id) { + // #xxx means xxx is already alias-parsed. + if (id.charAt(0) === '#') { + return id.substring(1) + } + + var alias = config.alias + + // Only top-level id needs to parse alias. + if (alias && isTopLevel(id)) { + var parts = id.split('/') + var first = parts[0] + + if (alias.hasOwnProperty(first)) { + parts[0] = alias[first] + id = parts.join('/') + } + } + + return id + } + + + var mapCache = {} + + /** + * Converts the uri according to the map rules. + */ + function parseMap(uri) { + // map: [[match, replace], ...] + var map = config.map || [] + if (!map.length) return uri + + var ret = uri + + // Apply all matched rules in sequence. + for (var i = 0; i < map.length; i++) { + var rule = map[i] + + if (util.isArray(rule) && rule.length === 2) { + var m = rule[0] + + if (util.isString(m) && ret.indexOf(m) > -1 || + util.isRegExp(m) && m.test(ret)) { + ret = ret.replace(m, rule[1]) + } + } + else if (util.isFunction(rule)) { + ret = rule(ret) + } + } + + if (!isAbsolute(ret)) { + ret = realpath(dirname(pageUri) + ret) + } + + if (ret !== uri) { + mapCache[ret] = uri + } + + return ret + } + + + /** + * Gets the original uri. + */ + function unParseMap(uri) { + return mapCache[uri] || uri + } + + + /** + * Converts id to uri. + */ + function id2Uri(id, refUri) { + if (!id) return '' + + id = parseAlias(id) + refUri || (refUri = pageUri) + + var ret + + // absolute id + if (isAbsolute(id)) { + ret = id + } + // relative id + else if (isRelative(id)) { + // Converts './a' to 'a', to avoid unnecessary loop in realpath. + if (id.indexOf('./') === 0) { + id = id.substring(2) + } + ret = dirname(refUri) + id + } + // root id + else if (isRoot(id)) { + ret = refUri.match(ROOT_RE)[1] + id + } + // top-level id + else { + ret = config.base + '/' + id + } + + return normalize(ret) + } + + + function isAbsolute(id) { + return id.indexOf('://') > 0 || id.indexOf('//') === 0 + } + + + function isRelative(id) { + return id.indexOf('./') === 0 || id.indexOf('../') === 0 + } + + + function isRoot(id) { + return id.charAt(0) === '/' && id.charAt(1) !== '/' + } + + + function isTopLevel(id) { + var c = id.charAt(0) + return id.indexOf('://') === -1 && c !== '.' && c !== '/' + } + + + /** + * Normalizes pathname to start with '/' + * Ref: https://groups.google.com/forum/#!topic/seajs/9R29Inqk1UU + */ + function normalizePathname(pathname) { + if (pathname.charAt(0) !== '/') { + pathname = '/' + pathname + } + return pathname + } + + + var loc = global['location'] + var pageUri = loc.protocol + '//' + loc.host + + normalizePathname(loc.pathname) + + // local file in IE: C:\path\to\xx.js + if (pageUri.indexOf('\\') > 0) { + pageUri = pageUri.replace(/\\/g, '/') + } + + + util.dirname = dirname + util.realpath = realpath + util.normalize = normalize + + util.parseAlias = parseAlias + util.parseMap = parseMap + util.unParseMap = unParseMap + + util.id2Uri = id2Uri + util.isAbsolute = isAbsolute + util.isRoot = isRoot + util.isTopLevel = isTopLevel + + util.pageUri = pageUri + +})(seajs._util, seajs._config, this) + +/** + * Utilities for fetching js and css files + */ +;(function(util, config) { + + var doc = document + var head = doc.head || + doc.getElementsByTagName('head')[0] || + doc.documentElement + + var baseElement = head.getElementsByTagName('base')[0] + + var IS_CSS_RE = /\.css(?:\?|$)/i + var READY_STATE_RE = /loaded|complete|undefined/ + + var currentlyAddingScript + var interactiveScript + + + util.fetch = function(url, callback, charset) { + var isCSS = IS_CSS_RE.test(url) + var node = document.createElement(isCSS ? 'link' : 'script') + + if (charset) { + var cs = util.isFunction(charset) ? charset(url) : charset + cs && (node.charset = cs) + } + + assetOnload(node, callback || noop) + + if (isCSS) { + node.rel = 'stylesheet' + node.href = url + } else { + node.async = 'async' + node.src = url + } + + // For some cache cases in IE 6-9, the script executes IMMEDIATELY after + // the end of the insertBefore execution, so use `currentlyAddingScript` + // to hold current node, for deriving url in `define`. + currentlyAddingScript = node + + // ref: #185 & http://dev.jquery.com/ticket/2709 + baseElement ? + head.insertBefore(node, baseElement) : + head.appendChild(node) + + currentlyAddingScript = null + } + + function assetOnload(node, callback) { + if (node.nodeName === 'SCRIPT') { + scriptOnload(node, callback) + } else { + styleOnload(node, callback) + } + } + + function scriptOnload(node, callback) { + + node.onload = node.onerror = node.onreadystatechange = function() { + if (READY_STATE_RE.test(node.readyState)) { + + // Ensure only run once and handle memory leak in IE + node.onload = node.onerror = node.onreadystatechange = null + + // Remove the script to reduce memory leak + if (node.parentNode && !config.debug) { + head.removeChild(node) + } + + // Dereference the node + node = undefined + + callback() + } + } + + } + + function styleOnload(node, callback) { + + // for Old WebKit and Old Firefox + if (isOldWebKit || isOldFirefox) { + util.log('Start poll to fetch css') + + setTimeout(function() { + poll(node, callback) + }, 1) // Begin after node insertion + } + else { + node.onload = node.onerror = function() { + node.onload = node.onerror = null + node = undefined + callback() + } + } + + } + + function poll(node, callback) { + var isLoaded + + // for WebKit < 536 + if (isOldWebKit) { + if (node['sheet']) { + isLoaded = true + } + } + // for Firefox < 9.0 + else if (node['sheet']) { + try { + if (node['sheet'].cssRules) { + isLoaded = true + } + } catch (ex) { + // The value of `ex.name` is changed from + // 'NS_ERROR_DOM_SECURITY_ERR' to 'SecurityError' since Firefox 13.0 + // But Firefox is less than 9.0 in here, So it is ok to just rely on + // 'NS_ERROR_DOM_SECURITY_ERR' + if (ex.name === 'NS_ERROR_DOM_SECURITY_ERR') { + isLoaded = true + } + } + } + + setTimeout(function() { + if (isLoaded) { + // Place callback in here due to giving time for style rendering. + callback() + } else { + poll(node, callback) + } + }, 1) + } + + function noop() { + } + + + util.getCurrentScript = function() { + if (currentlyAddingScript) { + return currentlyAddingScript + } + + // For IE6-9 browsers, the script onload event may not fire right + // after the the script is evaluated. Kris Zyp found that it + // could query the script nodes and the one that is in "interactive" + // mode indicates the current script. + // Ref: http://goo.gl/JHfFW + if (interactiveScript && + interactiveScript.readyState === 'interactive') { + return interactiveScript + } + + var scripts = head.getElementsByTagName('script') + + for (var i = 0; i < scripts.length; i++) { + var script = scripts[i] + if (script.readyState === 'interactive') { + interactiveScript = script + return script + } + } + } + + util.getScriptAbsoluteSrc = function(node) { + return node.hasAttribute ? // non-IE6/7 + node.src : + // see http://msdn.microsoft.com/en-us/library/ms536429(VS.85).aspx + node.getAttribute('src', 4) + } + + + util.importStyle = function(cssText, id) { + // Don't add multi times + if (id && doc.getElementById(id)) return + + var element = doc.createElement('style') + id && (element.id = id) + + // Adds to DOM first to avoid the css hack invalid + head.appendChild(element) + + // IE + if (element.styleSheet) { + element.styleSheet.cssText = cssText + } + // W3C + else { + element.appendChild(doc.createTextNode(cssText)) + } + } + + + var UA = navigator.userAgent + + // `onload` event is supported in WebKit since 535.23 + // Ref: + // - https://bugs.webkit.org/show_activity.cgi?id=38995 + var isOldWebKit = Number(UA.replace(/.*AppleWebKit\/(\d+)\..*/, '$1')) < 536 + + // `onload/onerror` event is supported since Firefox 9.0 + // Ref: + // - https://bugzilla.mozilla.org/show_bug.cgi?id=185236 + // - https://developer.mozilla.org/en/HTML/Element/link#Stylesheet_load_events + var isOldFirefox = UA.indexOf('Firefox') > 0 && + !('onload' in document.createElement('link')) + + + /** + * References: + * - http://unixpapa.com/js/dyna.html + * - ../test/research/load-js-css/test.html + * - ../test/issues/load-css/test.html + * - http://www.blaze.io/technical/ies-premature-execution-problem/ + */ + +})(seajs._util, seajs._config, this) + +/** + * The parser for dependencies + */ +;(function(util) { + + var REQUIRE_RE = /(?:^|[^.$])\brequire\s*\(\s*(["'])([^"'\s\)]+)\1\s*\)/g + + + util.parseDependencies = function(code) { + // Parse these `requires`: + // var a = require('a'); + // someMethod(require('b')); + // require('c'); + // ... + // Doesn't parse: + // someInstance.require(...); + var ret = [], match + + code = removeComments(code) + REQUIRE_RE.lastIndex = 0 + + while ((match = REQUIRE_RE.exec(code))) { + if (match[2]) { + ret.push(match[2]) + } + } + + return util.unique(ret) + } + + // See: research/remove-comments-safely + function removeComments(code) { + return code + .replace(/^\s*\/\*[\s\S]*?\*\/\s*$/mg, '') // block comments + .replace(/^\s*\/\/.*$/mg, '') // line comments + } + +})(seajs._util) + +/** + * The core of loader + */ +;(function(seajs, util, config) { + + var cachedModules = {} + var cachedModifiers = {} + var compileStack = [] + + var STATUS = { + 'FETCHING': 1, // The module file is fetching now. + 'FETCHED': 2, // The module file has been fetched. + 'SAVED': 3, // The module info has been saved. + 'READY': 4, // All dependencies and self are ready to compile. + 'COMPILING': 5, // The module is in compiling now. + 'COMPILED': 6 // The module is compiled and module.exports is available. + } + + + function Module(uri, status) { + this.uri = uri + this.status = status || 0 + + // this.id is set when saving + // this.dependencies is set when saving + // this.factory is set when saving + // this.exports is set when compiling + // this.parent is set when compiling + // this.require is set when compiling + } + + + Module.prototype._use = function(ids, callback) { + util.isString(ids) && (ids = [ids]) + var uris = resolve(ids, this.uri) + + this._load(uris, function() { + // Loads preload files introduced in modules before compiling. + preload(function() { + var args = util.map(uris, function(uri) { + return uri ? cachedModules[uri]._compile() : null + }) + + if (callback) { + callback.apply(null, args) + } + }) + }) + } + + + Module.prototype._load = function(uris, callback) { + var unLoadedUris = util.filter(uris, function(uri) { + return uri && (!cachedModules[uri] || + cachedModules[uri].status < STATUS.READY) + }) + + var length = unLoadedUris.length + if (length === 0) { + callback() + return + } + + var remain = length + + for (var i = 0; i < length; i++) { + (function(uri) { + var module = cachedModules[uri] || + (cachedModules[uri] = new Module(uri, STATUS.FETCHING)) + + module.status >= STATUS.FETCHED ? onFetched() : fetch(uri, onFetched) + + function onFetched() { + // cachedModules[uri] is changed in un-correspondence case + module = cachedModules[uri] + + if (module.status >= STATUS.SAVED) { + var deps = getPureDependencies(module) + + if (deps.length) { + Module.prototype._load(deps, function() { + cb(module) + }) + } + else { + cb(module) + } + } + // Maybe failed to fetch successfully, such as 404 or non-module. + // In these cases, just call cb function directly. + else { + cb() + } + } + + })(unLoadedUris[i]) + } + + function cb(module) { + (module || {}).status < STATUS.READY && (module.status = STATUS.READY) + --remain === 0 && callback() + } + } + + + Module.prototype._compile = function() { + var module = this + if (module.status === STATUS.COMPILED) { + return module.exports + } + + // Just return null when: + // 1. the module file is 404. + // 2. the module file is not written with valid module format. + // 3. other error cases. + if (module.status < STATUS.SAVED && !hasModifiers(module)) { + return null + } + + module.status = STATUS.COMPILING + + + function require(id) { + var uri = resolve(id, module.uri) + var child = cachedModules[uri] + + // Just return null when uri is invalid. + if (!child) { + return null + } + + // Avoids circular calls. + if (child.status === STATUS.COMPILING) { + return child.exports + } + + child.parent = module + return child._compile() + } + + require.async = function(ids, callback) { + module._use(ids, callback) + } + + require.resolve = function(id) { + return resolve(id, module.uri) + } + + require.cache = cachedModules + + + module.require = require + module.exports = {} + var factory = module.factory + + if (util.isFunction(factory)) { + compileStack.push(module) + runInModuleContext(factory, module) + compileStack.pop() + } + else if (factory !== undefined) { + module.exports = factory + } + + module.status = STATUS.COMPILED + execModifiers(module) + return module.exports + } + + + Module._define = function(id, deps, factory) { + var argsLength = arguments.length + + // define(factory) + if (argsLength === 1) { + factory = id + id = undefined + } + // define(id || deps, factory) + else if (argsLength === 2) { + factory = deps + deps = undefined + + // define(deps, factory) + if (util.isArray(id)) { + deps = id + id = undefined + } + } + + // Parses dependencies. + if (!util.isArray(deps) && util.isFunction(factory)) { + deps = util.parseDependencies(factory.toString()) + } + + var meta = { id: id, dependencies: deps, factory: factory } + var derivedUri + + // Try to derive uri in IE6-9 for anonymous modules. + if (document.attachEvent) { + // Try to get the current script. + var script = util.getCurrentScript() + if (script) { + derivedUri = util.unParseMap(util.getScriptAbsoluteSrc(script)) + } + + if (!derivedUri) { + util.log('Failed to derive URI from interactive script for:', + factory.toString(), 'warn') + + // NOTE: If the id-deriving methods above is failed, then falls back + // to use onload event to get the uri. + } + } + + // Gets uri directly for specific module. + var resolvedUri = id ? resolve(id) : derivedUri + + if (resolvedUri) { + // For IE: + // If the first module in a package is not the cachedModules[derivedUri] + // self, it should assign to the correct module when found. + if (resolvedUri === derivedUri) { + var refModule = cachedModules[derivedUri] + if (refModule && refModule.realUri && + refModule.status === STATUS.SAVED) { + cachedModules[derivedUri] = null + } + } + + var module = Module._save(resolvedUri, meta) + + // For IE: + // Assigns the first module in package to cachedModules[derivedUrl] + if (derivedUri) { + // cachedModules[derivedUri] may be undefined in combo case. + if ((cachedModules[derivedUri] || {}).status === STATUS.FETCHING) { + cachedModules[derivedUri] = module + module.realUri = derivedUri + } + } + else { + firstModuleInPackage || (firstModuleInPackage = module) + } + } + else { + // Saves information for "memoizing" work in the onload event. + anonymousModuleMeta = meta + } + + } + + + Module._getCompilingModule = function() { + return compileStack[compileStack.length - 1] + } + + + Module._find = function(selector) { + var matches = [] + + util.forEach(util.keys(cachedModules), function(uri) { + if (util.isString(selector) && uri.indexOf(selector) > -1 || + util.isRegExp(selector) && selector.test(uri)) { + var module = cachedModules[uri] + module.exports && matches.push(module.exports) + } + }) + + return matches + } + + + Module._modify = function(id, modifier) { + var uri = resolve(id) + var module = cachedModules[uri] + + if (module && module.status === STATUS.COMPILED) { + runInModuleContext(modifier, module) + } + else { + cachedModifiers[uri] || (cachedModifiers[uri] = []) + cachedModifiers[uri].push(modifier) + } + + return seajs + } + + + // For plugin developers + Module.STATUS = STATUS + Module._resolve = util.id2Uri + Module._fetch = util.fetch + Module._save = save + + + // Helpers + // ------- + + var fetchingList = {} + var fetchedList = {} + var callbackList = {} + var anonymousModuleMeta = null + var firstModuleInPackage = null + var circularCheckStack = [] + + function resolve(ids, refUri) { + if (util.isString(ids)) { + return Module._resolve(ids, refUri) + } + + return util.map(ids, function(id) { + return resolve(id, refUri) + }) + } + + function fetch(uri, callback) { + var requestUri = util.parseMap(uri) + + if (fetchedList[requestUri]) { + // See test/issues/debug-using-map + cachedModules[uri] = cachedModules[requestUri] + callback() + return + } + + if (fetchingList[requestUri]) { + callbackList[requestUri].push(callback) + return + } + + fetchingList[requestUri] = true + callbackList[requestUri] = [callback] + + // Fetches it + Module._fetch( + requestUri, + + function() { + fetchedList[requestUri] = true + + // Updates module status + var module = cachedModules[uri] + if (module.status === STATUS.FETCHING) { + module.status = STATUS.FETCHED + } + + // Saves anonymous module meta data + if (anonymousModuleMeta) { + Module._save(uri, anonymousModuleMeta) + anonymousModuleMeta = null + } + + // Assigns the first module in package to cachedModules[uri] + // See: test/issues/un-correspondence + if (firstModuleInPackage && module.status === STATUS.FETCHED) { + cachedModules[uri] = firstModuleInPackage + firstModuleInPackage.realUri = uri + } + firstModuleInPackage = null + + // Clears + if (fetchingList[requestUri]) { + delete fetchingList[requestUri] + } + + // Calls callbackList + var fns = callbackList[requestUri] + if (fns) { + delete callbackList[requestUri] + util.forEach(fns, function(fn) { + fn() + }) + } + + }, + + config.charset + ) + } + + function save(uri, meta) { + var module = cachedModules[uri] || (cachedModules[uri] = new Module(uri)) + + // Don't override already saved module + if (module.status < STATUS.SAVED) { + // Lets anonymous module id equal to its uri + module.id = meta.id || uri + + module.dependencies = resolve( + util.filter(meta.dependencies || [], function(dep) { + return !!dep + }), uri) + + module.factory = meta.factory + + // Updates module status + module.status = STATUS.SAVED + } + + return module + } + + function runInModuleContext(fn, module) { + var ret = fn(module.require, module.exports, module) + if (ret !== undefined) { + module.exports = ret + } + } + + function hasModifiers(module) { + return !!cachedModifiers[module.realUri || module.uri] + } + + function execModifiers(module) { + var uri = module.realUri || module.uri + var modifiers = cachedModifiers[uri] + + if (modifiers) { + util.forEach(modifiers, function(modifier) { + runInModuleContext(modifier, module) + }) + + delete cachedModifiers[uri] + } + } + + function getPureDependencies(module) { + var uri = module.uri + + return util.filter(module.dependencies, function(dep) { + circularCheckStack = [uri] + + var isCircular = isCircularWaiting(cachedModules[dep]) + if (isCircular) { + circularCheckStack.push(uri) + printCircularLog(circularCheckStack) + } + + return !isCircular + }) + } + + function isCircularWaiting(module) { + if (!module || module.status !== STATUS.SAVED) { + return false + } + + circularCheckStack.push(module.uri) + var deps = module.dependencies + + if (deps.length) { + if (isOverlap(deps, circularCheckStack)) { + return true + } + + for (var i = 0; i < deps.length; i++) { + if (isCircularWaiting(cachedModules[deps[i]])) { + return true + } + } + } + + circularCheckStack.pop() + return false + } + + function printCircularLog(stack, type) { + util.log('Found circular dependencies:', stack.join(' --> '), type) + } + + function isOverlap(arrA, arrB) { + var arrC = arrA.concat(arrB) + return arrC.length > util.unique(arrC).length + } + + function preload(callback) { + var preloadMods = config.preload.slice() + config.preload = [] + preloadMods.length ? globalModule._use(preloadMods, callback) : callback() + } + + + // Public API + // ---------- + + var globalModule = new Module(util.pageUri, STATUS.COMPILED) + + seajs.use = function(ids, callback) { + // Loads preload modules before all other modules. + preload(function() { + globalModule._use(ids, callback) + }) + + // Chain + return seajs + } + + + // For normal users + seajs.define = Module._define + seajs.cache = Module.cache = cachedModules + seajs.find = Module._find + seajs.modify = Module._modify + + + // For plugin developers + Module.fetchedList = fetchedList + seajs.pluginSDK = { + Module: Module, + util: util, + config: config + } + +})(seajs, seajs._util, seajs._config) + +/** + * The configuration + */ +;(function(seajs, util, config) { + + var noCachePrefix = 'seajs-ts=' + var noCacheTimeStamp = noCachePrefix + util.now() + + + // Async inserted script + var loaderScript = document.getElementById('seajsnode') + + // Static script + if (!loaderScript) { + var scripts = document.getElementsByTagName('script') + loaderScript = scripts[scripts.length - 1] + } + + var loaderSrc = (loaderScript && util.getScriptAbsoluteSrc(loaderScript)) || + util.pageUri // When sea.js is inline, set base to pageUri. + + var base = util.dirname(getLoaderActualSrc(loaderSrc)) + util.loaderDir = base + + // When src is "http://test.com/libs/seajs/1.0.0/sea.js", redirect base + // to "http://test.com/libs/" + var match = base.match(/^(.+\/)seajs\/[\.\d]+(?:-dev)?\/$/) + if (match) base = match[1] + + config.base = base + config.main = loaderScript && loaderScript.getAttribute('data-main') + config.charset = 'utf-8' + + + /** + * The function to configure the framework + * config({ + * 'base': 'path/to/base', + * 'alias': { + * 'app': 'biz/xx', + * 'jquery': 'jquery-1.5.2', + * 'cart': 'cart?t=20110419' + * }, + * 'map': [ + * ['test.cdn.cn', 'localhost'] + * ], + * preload: [], + * charset: 'utf-8', + * debug: false + * }) + * + */ + seajs.config = function(o) { + for (var k in o) { + if (!o.hasOwnProperty(k)) continue + + var previous = config[k] + var current = o[k] + + if (previous && k === 'alias') { + for (var p in current) { + if (current.hasOwnProperty(p)) { + + var prevValue = previous[p] + var currValue = current[p] + + // Converts {jquery: '1.7.2'} to {jquery: 'jquery/1.7.2/jquery'} + if (/^\d+\.\d+\.\d+$/.test(currValue)) { + currValue = p + '/' + currValue + '/' + p + } + + checkAliasConflict(prevValue, currValue, p) + previous[p] = currValue + + } + } + } + else if (previous && (k === 'map' || k === 'preload')) { + // for config({ preload: 'some-module' }) + if (util.isString(current)) { + current = [current] + } + + util.forEach(current, function(item) { + if (item) { + previous.push(item) + } + }) + } + else { + config[k] = current + } + } + + // Makes sure config.base is an absolute path. + var base = config.base + if (base && !util.isAbsolute(base)) { + config.base = util.id2Uri((util.isRoot(base) ? '' : './') + base + '/') + } + + // Uses map to implement nocache. + if (config.debug === 2) { + config.debug = 1 + seajs.config({ + map: [ + [/^.*$/, function(url) { + if (url.indexOf(noCachePrefix) === -1) { + url += (url.indexOf('?') === -1 ? '?' : '&') + noCacheTimeStamp + } + return url + }] + ] + }) + } + + debugSync() + + return this + } + + + function debugSync() { + if (config.debug) { + // For convenient reference + seajs.debug = !!config.debug + } + } + + debugSync() + + + function getLoaderActualSrc(src) { + if (src.indexOf('??') === -1) { + return src + } + + // Such as: http://cdn.com/??seajs/1.2.0/sea.js,jquery/1.7.2/jquery.js + // Only support nginx combo style rule. If you use other combo rule, please + // explicitly config the base path and the alias for plugins. + var parts = src.split('??') + var root = parts[0] + var paths = util.filter(parts[1].split(','), function(str) { + return str.indexOf('sea.js') !== -1 + }) + + return root + paths[0] + } + + function checkAliasConflict(previous, current, key) { + if (previous && previous !== current) { + util.log('The alias config is conflicted:', + 'key =', '"' + key + '"', + 'previous =', '"' + previous + '"', + 'current =', '"' + current + '"', + 'warn') + } + } + +})(seajs, seajs._util, seajs._config) + +/** + * Prepare for bootstrapping + */ +;(function(seajs, util, global) { + + // The safe and convenient version of console.log + seajs.log = util.log + + + // Creates a stylesheet from a text blob of rules. + seajs.importStyle = util.importStyle + + + // Sets a alias to `sea.js` directory for loading plugins. + seajs.config({ + alias: { seajs: util.loaderDir } + }) + + + // Uses `seajs-xxx` flag to load plugin-xxx. + util.forEach(getStartupPlugins(), function(name) { + seajs.use('seajs/plugin-' + name) + + // Delays `seajs.use` calls to the onload of `mapfile` in debug mode. + if (name === 'debug') { + seajs._use = seajs.use + seajs._useArgs = [] + seajs.use = function() { seajs._useArgs.push(arguments); return seajs } + } + }) + + + // Helpers + // ------- + + function getStartupPlugins() { + var ret = [] + var str = global.location.search + + // Converts `seajs-xxx` to `seajs-xxx=1` + str = str.replace(/(seajs-\w+)(&|$)/g, '$1=1$2') + + // Add cookie string + str += ' ' + document.cookie + + // Excludes seajs-xxx=0 + str.replace(/seajs-(\w+)=[1-9]/g, function(m, name) { + ret.push(name) + }) + + return util.unique(ret) + } + +})(seajs, seajs._util, this) + +/** + * The bootstrap and entrances + */ +;(function(seajs, config, global) { + + var _seajs = seajs._seajs + + // Avoids conflicting when sea.js is loaded multi times. + if (_seajs && !_seajs['args']) { + global.seajs = seajs._seajs + return + } + + + // Assigns to global define. + global.define = seajs.define + + + // Loads the data-main module automatically. + config.main && seajs.use(config.main) + + + // Parses the pre-call of seajs.config/seajs.use/define. + // Ref: test/bootstrap/async-3.html + ;(function(args) { + if (args) { + var hash = { + 0: 'config', + 1: 'use', + 2: 'define' + } + for (var i = 0; i < args.length; i += 2) { + seajs[hash[args[i]]].apply(seajs, args[i + 1]) + } + } + })((_seajs || 0)['args']) + + + // Add define.amd property for clear indicator. + global.define.cmd = {} + + + // Keeps clean! + delete seajs.define + delete seajs._util + delete seajs._config + delete seajs._seajs + +})(seajs, seajs._config, this) + + +var loaderPath = seajs.pluginSDK.util.loaderDir; +seajs.config({ + map : [ + ['.js', '-min.js'] + ], + alias : { + 'bui' : loaderPath + }, + charset: 'utf-8' +}); + +var BUI = BUI || {}; + +BUI.use = seajs.use; + +BUI.config = seajs.config; + +BUI.setDebug = function (debug) { + BUI.debug = debug; + if(debug){ + seajs.config({ + map : [ + ['-min.js', '.js'] + ] + }); + }else{ + seajs.config({ + map : [ + ['.js', '-min.js'] + ] + }); + } +} +define('bui/common',['bui/ua','bui/json','bui/date','bui/array','bui/keycode','bui/observable','bui/observable','bui/base','bui/component'],function(require){ + + var BUI = require('bui/util'); + + BUI.mix(BUI,{ + UA : require('bui/ua'), + JSON : require('bui/json'), + Date : require('bui/date'), + Array : require('bui/array'), + KeyCode : require('bui/keycode'), + Observable : require('bui/observable'), + Base : require('bui/base'), + Component : require('bui/component') + }); + return BUI; +}); +/** + * @class BUI.Util + * \u63a7\u4ef6\u5e93\u7684\u5de5\u5177\u65b9\u6cd5\uff0c\u8fd9\u4e9b\u5de5\u5177\u65b9\u6cd5\u76f4\u63a5\u7ed1\u5b9a\u5230BUI\u5bf9\u8c61\u4e0a + *
          
          + *     BUI.isString(str);
          + *
          + *     BUI.extend(A,B);
          + *
          + *     BUI.mix(A,{a:'a'});
          + * 
          + * @singleton + */ +var BUI = BUI || {}; + +define('bui/util',function(){ + + //\u517c\u5bb9jquery 1.6\u4ee5\u4e0b + (function($){ + if($.fn){ + $.fn.on = $.fn.on || $.fn.bind; + $.fn.off = $.fn.off || $.fn.unbind; + } + + })(jQuery); + + var win = window, + doc = document, + objectPrototype = Object.prototype, + toString = objectPrototype.toString, + ATTRS = 'ATTRS', + PARSER = 'PARSER', + GUID_DEFAULT = 'guid'; + + $.extend(BUI, + { + /** + * \u7248\u672c\u53f7 + * @memberOf BUI + * @type {Number} + */ + version:1.0, + + /** + * \u5b50\u7248\u672c\u53f7 + * @type {String} + */ + subVersion : 2, + + /** + * \u662f\u5426\u4e3a\u51fd\u6570 + * @param {*} fn \u5bf9\u8c61 + * @return {Boolean} \u662f\u5426\u51fd\u6570 + */ + isFunction : function(fn){ + return typeof(fn) === 'function'; + }, + /** + * \u662f\u5426\u6570\u7ec4 + * @method + * @param {*} obj \u662f\u5426\u6570\u7ec4 + * @return {Boolean} \u662f\u5426\u6570\u7ec4 + */ + isArray : ('isArray' in Array) ? Array.isArray : function(value) { + return toString.call(value) === '[object Array]'; + }, + /** + * \u662f\u5426\u65e5\u671f + * @param {*} value \u5bf9\u8c61 + * @return {Boolean} \u662f\u5426\u65e5\u671f + */ + isDate: function(value) { + return toString.call(value) === '[object Date]'; + }, + /** + * \u662f\u5426\u662fjavascript\u5bf9\u8c61 + * @param {Object} value The value to test + * @return {Boolean} + * @method + */ + isObject: (toString.call(null) === '[object Object]') ? + function(value) { + // check ownerDocument here as well to exclude DOM nodes + return value !== null && value !== undefined && toString.call(value) === '[object Object]' && value.ownerDocument === undefined; + } : + function(value) { + return toString.call(value) === '[object Object]'; + }, + /** + * \u5c06\u6307\u5b9a\u7684\u65b9\u6cd5\u6216\u5c5e\u6027\u653e\u5230\u6784\u9020\u51fd\u6570\u7684\u539f\u578b\u94fe\u4e0a\uff0c + * \u51fd\u6570\u652f\u6301\u591a\u4e8e2\u4e2a\u53d8\u91cf\uff0c\u540e\u9762\u7684\u53d8\u91cf\u540cs1\u4e00\u6837\u5c06\u5176\u6210\u5458\u590d\u5236\u5230\u6784\u9020\u51fd\u6570\u7684\u539f\u578b\u94fe\u4e0a\u3002 + * @param {Function} r \u6784\u9020\u51fd\u6570 + * @param {Object} s1 \u5c06s1 \u7684\u6210\u5458\u590d\u5236\u5230\u6784\u9020\u51fd\u6570\u7684\u539f\u578b\u94fe\u4e0a + * @example + * BUI.augment(class1,{ + * method1: function(){ + * + * } + * }); + */ + augment : function(r,s1){ + if(!BUI.isFunction(r)) + { + return r; + } + for (var i = 1; i < arguments.length; i++) { + BUI.mix(r.prototype,arguments[i].prototype || arguments[i]); + }; + return r; + }, + /** + * \u62f7\u8d1d\u5bf9\u8c61 + * @param {Object} obj \u8981\u62f7\u8d1d\u7684\u5bf9\u8c61 + * @return {Object} \u62f7\u8d1d\u751f\u6210\u7684\u5bf9\u8c61 + */ + cloneObject : function(obj){ + var result = BUI.isArray(obj) ? [] : {}; + + return BUI.mix(true,result,obj); + }, + /** + * \u629b\u51fa\u9519\u8bef + */ + error : function(msg){ + if(BUI.debug){ + throw msg; + } + }, + /** + * \u5b9e\u73b0\u7c7b\u7684\u7ee7\u627f\uff0c\u901a\u8fc7\u7236\u7c7b\u751f\u6210\u5b50\u7c7b + * @param {Function} subclass + * @param {Function} superclass \u7236\u7c7b\u6784\u9020\u51fd\u6570 + * @param {Object} overrides \u5b50\u7c7b\u7684\u5c5e\u6027\u6216\u8005\u65b9\u6cd5 + * @return {Function} \u8fd4\u56de\u7684\u5b50\u7c7b\u6784\u9020\u51fd\u6570 + * \u793a\u4f8b: + * @example + * //\u7236\u7c7b + * function base(){ + * + * } + * + * function sub(){ + * + * } + * //\u5b50\u7c7b + * BUI.extend(sub,base,{ + * method : function(){ + * + * } + * }); + * + * //\u6216\u8005 + * var sub = BUI.extend(base,{}); + */ + extend : function(subclass,superclass,overrides, staticOverrides){ + //\u5982\u679c\u53ea\u63d0\u4f9b\u7236\u7c7b\u6784\u9020\u51fd\u6570\uff0c\u5219\u81ea\u52a8\u751f\u6210\u5b50\u7c7b\u6784\u9020\u51fd\u6570 + if(!BUI.isFunction(superclass)) + { + + overrides = superclass; + superclass = subclass; + subclass = function(){}; + } + + var create = Object.create ? + function (proto, c) { + return Object.create(proto, { + constructor: { + value: c + } + }); + } : + function (proto, c) { + function F() { + } + + F.prototype = proto; + + var o = new F(); + o.constructor = c; + return o; + }; + var superObj = create(superclass.prototype,subclass);//new superclass(),//\u5b9e\u4f8b\u5316\u7236\u7c7b\u4f5c\u4e3a\u5b50\u7c7b\u7684prototype + subclass.prototype = BUI.mix(superObj,subclass.prototype); //\u6307\u5b9a\u5b50\u7c7b\u7684prototype + subclass.superclass = create(superclass.prototype,superclass); + BUI.mix(superObj,overrides); + BUI.mix(subclass,staticOverrides); + return subclass; + }, + /** + * \u751f\u6210\u552f\u4e00\u7684Id + * @method + * @param {String} prefix \u524d\u7f00 + * @default 'bui-guid' + * @return {String} \u552f\u4e00\u7684\u7f16\u53f7 + */ + guid : (function(){ + var map = {}; + return function(prefix){ + prefix = prefix || BUI.prefix + GUID_DEFAULT; + if(!map[prefix]){ + map[prefix] = 1; + }else{ + map[prefix] += 1; + } + return prefix + map[prefix]; + }; + })(), + /** + * \u5224\u65ad\u662f\u5426\u662f\u5b57\u7b26\u4e32 + * @return {Boolean} \u662f\u5426\u662f\u5b57\u7b26\u4e32 + */ + isString : function(value){ + return typeof value === 'string'; + }, + /** + * \u5224\u65ad\u662f\u5426\u6570\u5b57\uff0c\u7531\u4e8e$.isNumberic\u65b9\u6cd5\u4f1a\u628a '123'\u8ba4\u4e3a\u6570\u5b57 + * @return {Boolean} \u662f\u5426\u6570\u5b57 + */ + isNumber : function(value){ + return typeof value === 'number'; + }, + /** + * \u63a7\u5236\u53f0\u8f93\u51fa\u65e5\u5fd7 + * @param {Object} obj \u8f93\u51fa\u7684\u6570\u636e + */ + log : function(obj){ + if(BUI.debug && win.console && win.console.log){ + win.console.log(obj); + } + }, + /** + * \u5c06\u591a\u4e2a\u5bf9\u8c61\u7684\u5c5e\u6027\u590d\u5236\u5230\u4e00\u4e2a\u65b0\u7684\u5bf9\u8c61 + */ + merge : function(){ + var args = $.makeArray(arguments); + args.unshift({}); + return BUI.mix.apply(null,args); + + }, + /** + * \u5c01\u88c5 jQuery.extend \u65b9\u6cd5\uff0c\u5c06\u591a\u4e2a\u5bf9\u8c61\u7684\u5c5e\u6027merge\u5230\u7b2c\u4e00\u4e2a\u5bf9\u8c61\u4e2d + * @return {Object} + */ + mix : function(){ + return $.extend.apply(null,arguments); + }, + /** + * \u521b\u9020\u9876\u5c42\u7684\u547d\u540d\u7a7a\u95f4\uff0c\u9644\u52a0\u5230window\u5bf9\u8c61\u4e0a, + * \u5305\u542bnamespace\u65b9\u6cd5 + */ + app : function(name){ + if(!window[name]){ + window[name] = { + namespace :function(nsName){ + return BUI.namespace(nsName,window[name]); + } + }; + } + return window[name]; + }, + /** + * \u5c06\u5176\u4ed6\u7c7b\u4f5c\u4e3amixin\u96c6\u6210\u5230\u6307\u5b9a\u7c7b\u4e0a\u9762 + * @param {Function} c \u6784\u9020\u51fd\u6570 + * @param {Array} mixins \u6269\u5c55\u7c7b + * @param {Array} attrs \u6269\u5c55\u7684\u9759\u6001\u5c5e\u6027\uff0c\u9ed8\u8ba4\u4e3a['ATTRS'] + * @return {Function} \u4f20\u5165\u7684\u6784\u9020\u51fd\u6570 + */ + mixin : function(c,mixins,attrs){ + attrs = attrs || [ATTRS,PARSER]; + var extensions = mixins; + if (extensions) { + c.mixins = extensions; + + var desc = { + // ATTRS: + // HTML_PARSER: + }, constructors = extensions['concat'](c); + + // [ex1,ex2]\uff0c\u6269\u5c55\u7c7b\u540e\u9762\u7684\u4f18\u5148\uff0cex2 \u5b9a\u4e49\u7684\u8986\u76d6 ex1 \u5b9a\u4e49\u7684 + // \u4e3b\u7c7b\u6700\u4f18\u5148 + BUI.each(constructors, function (ext) { + if (ext) { + // \u5408\u5e76 ATTRS/HTML_PARSER \u5230\u4e3b\u7c7b + BUI.each(attrs, function (K) { + if (ext[K]) { + desc[K] = desc[K] || {}; + // \u4e0d\u8986\u76d6\u4e3b\u7c7b\u4e0a\u7684\u5b9a\u4e49\uff0c\u56e0\u4e3a\u7ee7\u627f\u5c42\u6b21\u4e0a\u6269\u5c55\u7c7b\u6bd4\u4e3b\u7c7b\u5c42\u6b21\u9ad8 + // \u4f46\u662f\u503c\u662f\u5bf9\u8c61\u7684\u8bdd\u4f1a\u6df1\u5ea6\u5408\u5e76 + // \u6ce8\u610f\uff1a\u6700\u597d\u503c\u662f\u7b80\u5355\u5bf9\u8c61\uff0c\u81ea\u5b9a\u4e49 new \u51fa\u6765\u7684\u5bf9\u8c61\u5c31\u4f1a\u6709\u95ee\u9898(\u7528 function return \u51fa\u6765)! + BUI.mix(true,desc[K], ext[K]); + } + }); + } + }); + + BUI.each(desc, function (v,k) { + c[k] = v; + }); + + var prototype = {}; + + // \u4e3b\u7c7b\u6700\u4f18\u5148 + BUI.each(constructors, function (ext) { + if (ext) { + var proto = ext.prototype; + // \u5408\u5e76\u529f\u80fd\u4ee3\u7801\u5230\u4e3b\u7c7b\uff0c\u4e0d\u8986\u76d6 + for (var p in proto) { + // \u4e0d\u8986\u76d6\u4e3b\u7c7b\uff0c\u4f46\u662f\u4e3b\u7c7b\u7684\u7236\u7c7b\u8fd8\u662f\u8986\u76d6\u5427 + if (proto.hasOwnProperty(p)) { + prototype[p] = proto[p]; + } + } + } + }); + + BUI.each(prototype, function (v,k) { + c.prototype[k] = v; + }); + } + return c; + }, + /** + * \u751f\u6210\u547d\u540d\u7a7a\u95f4 + * @param {String} name \u547d\u540d\u7a7a\u95f4\u7684\u540d\u79f0 + * @param {Object} baseNS \u5728\u5df2\u6709\u7684\u547d\u540d\u7a7a\u95f4\u4e0a\u521b\u5efa\u547d\u540d\u7a7a\u95f4\uff0c\u9ed8\u8ba4\u201cBUI\u201d + * @return {Object} \u8fd4\u56de\u7684\u547d\u540d\u7a7a\u95f4\u5bf9\u8c61 + * @example + * BUI.namespace("Grid"); // BUI.Grid + */ + namespace : function(name,baseNS){ + baseNS = baseNS || BUI; + if(!name){ + return baseNS; + } + var list = name.split('.'), + //firstNS = win[list[0]], + curNS = baseNS; + + for (var i = 0; i < list.length; i++) { + var nsName = list[i]; + if(!curNS[nsName]){ + curNS[nsName] = {}; + } + curNS = curNS[nsName]; + }; + return curNS; + }, + /** + * BUI \u63a7\u4ef6\u7684\u516c\u7528\u524d\u7f00 + * @type {String} + */ + prefix : 'bui-', + /** + * \u66ff\u6362\u5b57\u7b26\u4e32\u4e2d\u7684\u5b57\u6bb5. + * @param {String} str \u6a21\u7248\u5b57\u7b26\u4e32 + * @param {Object} o json data + * @param {RegExp} [regexp] \u5339\u914d\u5b57\u7b26\u4e32\u7684\u6b63\u5219\u8868\u8fbe\u5f0f + */ + substitute: function (str, o, regexp) { + if (!BUI.isString(str) + || (!BUI.isObject(o)) && !BUI.isArray(o)) { + return str; + } + + return str.replace(regexp || /\\?\{([^{}]+)\}/g, function (match, name) { + if (match.charAt(0) === '\\') { + return match.slice(1); + } + return (o[name] === undefined) ? '' : o[name]; + }); + }, + /** + * \u4f7f\u7b2c\u4e00\u4e2a\u5b57\u6bcd\u53d8\u6210\u5927\u5199 + * @param {String} s \u5b57\u7b26\u4e32 + * @return {String} \u9996\u5b57\u6bcd\u5927\u5199\u540e\u7684\u5b57\u7b26\u4e32 + */ + ucfirst : function(s){ + s += ''; + return s.charAt(0).toUpperCase() + s.substring(1); + }, + /** + * \u9875\u9762\u4e0a\u7684\u4e00\u70b9\u662f\u5426\u5728\u7528\u6237\u7684\u89c6\u56fe\u5185 + * @param {Object} offset \u5750\u6807\uff0cleft,top + * @return {Boolean} \u662f\u5426\u5728\u89c6\u56fe\u5185 + */ + isInView : function(offset){ + var left = offset.left, + top = offset.top, + viewWidth = BUI.viewportWidth(), + wiewHeight = BUI.viewportHeight(), + scrollTop = BUI.scrollTop(), + scrollLeft = BUI.scrollLeft(); + //\u5224\u65ad\u6a2a\u5750\u6807 + if(left < scrollLeft ||left > scrollLeft + viewWidth){ + return false; + } + //\u5224\u65ad\u7eb5\u5750\u6807 + if(top < scrollTop || top > scrollTop + wiewHeight){ + return false; + } + return true; + }, + /** + * \u9875\u9762\u4e0a\u7684\u4e00\u70b9\u7eb5\u5411\u5750\u6807\u662f\u5426\u5728\u7528\u6237\u7684\u89c6\u56fe\u5185 + * @param {Object} top \u7eb5\u5750\u6807 + * @return {Boolean} \u662f\u5426\u5728\u89c6\u56fe\u5185 + */ + isInVerticalView : function(top){ + var wiewHeight = BUI.viewportHeight(), + scrollTop = BUI.scrollTop(); + + //\u5224\u65ad\u7eb5\u5750\u6807 + if(top < scrollTop || top > scrollTop + wiewHeight){ + return false; + } + return true; + }, + /** + * \u9875\u9762\u4e0a\u7684\u4e00\u70b9\u6a2a\u5411\u5750\u6807\u662f\u5426\u5728\u7528\u6237\u7684\u89c6\u56fe\u5185 + * @param {Object} left \u6a2a\u5750\u6807 + * @return {Boolean} \u662f\u5426\u5728\u89c6\u56fe\u5185 + */ + isInHorizontalView : function(left){ + var viewWidth = BUI.viewportWidth(), + scrollLeft = BUI.scrollLeft(); + //\u5224\u65ad\u6a2a\u5750\u6807 + if(left < scrollLeft ||left > scrollLeft + viewWidth){ + return false; + } + return true; + }, + /** + * \u83b7\u53d6\u7a97\u53e3\u53ef\u89c6\u8303\u56f4\u5bbd\u5ea6 + * @return {Number} \u53ef\u89c6\u533a\u5bbd\u5ea6 + */ + viewportWidth : function(){ + return $(window).width(); + }, + /** + * \u83b7\u53d6\u7a97\u53e3\u53ef\u89c6\u8303\u56f4\u9ad8\u5ea6 + * @return {Number} \u53ef\u89c6\u533a\u9ad8\u5ea6 + */ + viewportHeight:function(){ + return $(window).height(); + }, + /** + * \u6eda\u52a8\u5230\u7a97\u53e3\u7684left\u4f4d\u7f6e + */ + scrollLeft : function(){ + return $(window).scrollLeft(); + }, + /** + * \u6eda\u52a8\u5230\u6a2a\u5411\u4f4d\u7f6e + */ + scrollTop : function(){ + return $(window).scrollTop(); + }, + /** + * \u7a97\u53e3\u5bbd\u5ea6 + * @return {Number} \u7a97\u53e3\u5bbd\u5ea6 + */ + docWidth : function(){ + var body = document.documentElement || document.body; + return $(body).width(); + }, + /** + * \u7a97\u53e3\u9ad8\u5ea6 + * @return {Number} \u7a97\u53e3\u9ad8\u5ea6 + */ + docHeight : function(){ + var body = document.documentElement || document.body; + return $(body).height(); + }, + /** + * \u904d\u5386\u6570\u7ec4\u6216\u8005\u5bf9\u8c61 + * @param {Object|Array} element/Object \u6570\u7ec4\u4e2d\u7684\u5143\u7d20\u6216\u8005\u5bf9\u8c61\u7684\u503c + * @param {Function} func \u904d\u5386\u7684\u51fd\u6570 function(elememt,index){} \u6216\u8005 function(value,key){} + */ + each : function (elements,func) { + if(!elements){ + return; + } + $.each(elements,function(k,v){ + return func(v,k); + }); + }, + /** + * \u5c01\u88c5\u4e8b\u4ef6\uff0c\u4fbf\u4e8e\u4f7f\u7528\u4e0a\u4e0b\u6587this,\u548c\u4fbf\u4e8e\u89e3\u9664\u4e8b\u4ef6\u65f6\u4f7f\u7528 + * @protected + * @param {Object} self \u5bf9\u8c61 + * @param {String} action \u4e8b\u4ef6\u540d\u79f0 + */ + wrapBehavior : function(self, action) { + return self['__bui_wrap_' + action] = function (e) { + if (!self.get('disabled')) { + self[action](e); + } + }; + }, + /** + * \u83b7\u53d6\u5c01\u88c5\u7684\u4e8b\u4ef6 + * @protected + * @param {Object} self \u5bf9\u8c61 + * @param {String} action \u4e8b\u4ef6\u540d\u79f0 + */ + getWrapBehavior : function(self, action) { + return self['__bui_wrap_' + action]; + } + + }); + + /** + * \u8868\u5355\u5e2e\u52a9\u7c7b\uff0c\u5e8f\u5217\u5316\u3001\u53cd\u5e8f\u5217\u5316\uff0c\u8bbe\u7f6e\u503c + * @class BUI.FormHelper + * @singleton + */ + var formHelper = BUI.FormHelper = { + /** + * \u5c06\u8868\u5355\u683c\u5f0f\u5316\u6210\u952e\u503c\u5bf9\u5f62\u5f0f + * @param {HTMLElement} form \u8868\u5355 + * @return {Object} \u952e\u503c\u5bf9\u7684\u5bf9\u8c61 + */ + serializeToObject:function(form){ + var array = $(form).serializeArray(), + result = {}; + BUI.each(array,function(item){ + var name = item.name; + if(!result[name]){ //\u5982\u679c\u662f\u5355\u4e2a\u503c\uff0c\u76f4\u63a5\u8d4b\u503c + result[name] = item.value; + }else{ //\u591a\u503c\u4f7f\u7528\u6570\u7ec4 + if(!BUI.isArray(result[name])){ + result[name] = [result[name]]; + } + result[name].push(item.value); + } + }); + return result; + }, + /** + * \u8bbe\u7f6e\u8868\u5355\u7684\u503c + * @param {HTMLElement} form \u8868\u5355 + * @param {Object} obj \u952e\u503c\u5bf9 + */ + setFields : function(form,obj){ + for(var name in obj){ + if(obj.hasOwnProperty(name)){ + BUI.FormHelper.setField(form,name,obj[name]); + } + } + }, + /** + * \u6e05\u7a7a\u8868\u5355 + * @param {HTMLElement} form \u8868\u5355\u5143\u7d20 + */ + clear : function(form){ + var elements = $.makeArray(form.elements); + + BUI.each(elements,function(element){ + if(element.type === 'checkbox' || element.type === 'radio' ){ + $(element).attr('checked',false); + }else{ + $(element).val(''); + } + $(element).change(); + }); + }, + /** + * \u8bbe\u7f6e\u8868\u5355\u5b57\u6bb5 + * @param {HTMLElement} form \u8868\u5355\u5143\u7d20 + * @param {string} field \u5b57\u6bb5\u540d + * @param {string} value \u5b57\u6bb5\u503c + */ + setField:function(form,fieldName,value){ + var fields = form.elements[fieldName]; + if(BUI.isArray(fields)){ + BUI.each(fields,function(field){ + if(field.type === 'checkbox'){ + if(field.value === value || BUI.Array.indexOf(field.value,value) !== -1){ + $(field).attr('checked',true); + } + }else if(field.type === 'radio' && field.value === value){ + $(field).attr('checked',true); + }else{ + $(field).val(value); + } + + }); + }else{ + $(fields).val(value); + } + }, + /** + * \u83b7\u53d6\u8868\u5355\u5b57\u6bb5\u503c + * @param {HTMLElement} form \u8868\u5355\u5143\u7d20 + * @param {string} field \u5b57\u6bb5\u540d + * @return {String} \u5b57\u6bb5\u503c + */ + getField : function(form,fieldName){ + return BUI.FormHelper.serializeToObject(form)[fieldName]; + } + }; + + return BUI; +});/** + * @fileOverview \u6570\u7ec4\u5e2e\u52a9\u7c7b + * @ignore + */ + +/** + * @class BUI + * \u63a7\u4ef6\u5e93\u7684\u57fa\u7840\u547d\u540d\u7a7a\u95f4 + * @singleton + */ + +define('bui/array',['bui/util'],function (r) { + + var BUI = r('bui/util'); + /** + * @class BUI.Array + * \u6570\u7ec4\u5e2e\u52a9\u7c7b + */ + BUI.Array ={ + /** + * \u8fd4\u56de\u6570\u7ec4\u7684\u6700\u540e\u4e00\u4e2a\u5bf9\u8c61 + * @param {Array} array \u6570\u7ec4\u6216\u8005\u7c7b\u4f3c\u4e8e\u6570\u7ec4\u7684\u5bf9\u8c61. + * @return {*} \u6570\u7ec4\u7684\u6700\u540e\u4e00\u9879. + */ + peek : function(array) { + return array[array.length - 1]; + }, + /** + * \u67e5\u627e\u8bb0\u5f55\u6240\u5728\u7684\u4f4d\u7f6e + * @param {*} value \u503c + * @param {Array} array \u6570\u7ec4\u6216\u8005\u7c7b\u4f3c\u4e8e\u6570\u7ec4\u7684\u5bf9\u8c61 + * @param {Number} [fromIndex=0] \u8d77\u59cb\u9879\uff0c\u9ed8\u8ba4\u4e3a0 + * @return {Number} \u4f4d\u7f6e\uff0c\u5982\u679c\u4e3a -1\u5219\u4e0d\u5728\u6570\u7ec4\u5185 + */ + indexOf : function(value, array,opt_fromIndex){ + var fromIndex = opt_fromIndex == null ? + 0 : (opt_fromIndex < 0 ? + Math.max(0, array.length + opt_fromIndex) : opt_fromIndex); + + for (var i = fromIndex; i < array.length; i++) { + if (i in array && array[i] === value) + return i; + } + return -1; + }, + /** + * \u6570\u7ec4\u662f\u5426\u5b58\u5728\u6307\u5b9a\u503c + * @param {*} value \u503c + * @param {Array} array \u6570\u7ec4\u6216\u8005\u7c7b\u4f3c\u4e8e\u6570\u7ec4\u7684\u5bf9\u8c61 + * @return {Boolean} \u662f\u5426\u5b58\u5728\u4e8e\u6570\u7ec4\u4e2d + */ + contains : function(value,array){ + return BUI.Array.indexOf(value,array) >=0; + }, + /** + * \u904d\u5386\u6570\u7ec4\u6216\u8005\u5bf9\u8c61 + * @method + * @param {Object|Array} element/Object \u6570\u7ec4\u4e2d\u7684\u5143\u7d20\u6216\u8005\u5bf9\u8c61\u7684\u503c + * @param {Function} func \u904d\u5386\u7684\u51fd\u6570 function(elememt,index){} \u6216\u8005 function(value,key){} + */ + each : BUI.each, + /** + * 2\u4e2a\u6570\u7ec4\u5185\u90e8\u7684\u503c\u662f\u5426\u76f8\u7b49 + * @param {Array} a1 \u6570\u7ec41 + * @param {Array} a2 \u6570\u7ec42 + * @return {Boolean} 2\u4e2a\u6570\u7ec4\u76f8\u7b49\u6216\u8005\u5185\u90e8\u5143\u7d20\u662f\u5426\u76f8\u7b49 + */ + equals : function(a1,a2){ + if(a1 == a2){ + return true; + } + if(!a1 || !a2){ + return false; + } + + if(a1.length != a2.length){ + return false; + } + var rst = true; + for(var i = 0 ;i < a1.length; i++){ + if(a1[i] !== a2[i]){ + rst = false; + break; + } + } + return rst; + }, + + /** + * \u8fc7\u6ee4\u6570\u7ec4 + * @param {Object|Array} element/Object \u6570\u7ec4\u4e2d\u7684\u5143\u7d20\u6216\u8005\u5bf9\u8c61\u7684\u503c + * @param {Function} func \u904d\u5386\u7684\u51fd\u6570 function(elememt,index){} \u6216\u8005 function(value,key){},\u5982\u679c\u8fd4\u56detrue\u5219\u6dfb\u52a0\u5230\u7ed3\u679c\u96c6 + * @return {Array} \u8fc7\u6ee4\u7684\u7ed3\u679c\u96c6 + */ + filter : function(array,func){ + var result = []; + BUI.Array.each(array,function(value,index){ + if(func(value,index)){ + result.push(value); + } + }); + return result; + }, + /** + * \u8f6c\u6362\u6570\u7ec4\u6570\u7ec4 + * @param {Object|Array} element/Object \u6570\u7ec4\u4e2d\u7684\u5143\u7d20\u6216\u8005\u5bf9\u8c61\u7684\u503c + * @param {Function} func \u904d\u5386\u7684\u51fd\u6570 function(elememt,index){} \u6216\u8005 function(value,key){},\u5c06\u8fd4\u56de\u7684\u7ed3\u679c\u6dfb\u52a0\u5230\u7ed3\u679c\u96c6 + * @return {Array} \u8fc7\u6ee4\u7684\u7ed3\u679c\u96c6 + */ + map : function(array,func){ + var result = []; + BUI.Array.each(array,function(value,index){ + result.push(func(value,index)); + }); + return result; + }, + /** + * \u83b7\u53d6\u7b2c\u4e00\u4e2a\u7b26\u5408\u6761\u4ef6\u7684\u6570\u636e + * @param {Array} array \u6570\u7ec4 + * @param {Function} func \u5339\u914d\u51fd\u6570 + * @return {*} \u7b26\u5408\u6761\u4ef6\u7684\u6570\u636e + */ + find : function(array,func){ + var i = BUI.Array.findIndex(array, func); + return i < 0 ? null : array[i]; + }, + /** + * \u83b7\u53d6\u7b2c\u4e00\u4e2a\u7b26\u5408\u6761\u4ef6\u7684\u6570\u636e\u7684\u7d22\u5f15\u503c + * @param {Array} array \u6570\u7ec4 + * @param {Function} func \u5339\u914d\u51fd\u6570 + * @return {Number} \u7b26\u5408\u6761\u4ef6\u7684\u6570\u636e\u7684\u7d22\u5f15\u503c + */ + findIndex : function(array,func){ + var result = -1; + BUI.Array.each(array,function(value,index){ + if(func(value,index)){ + result = index; + return false; + } + }); + return result; + }, + /** + * \u6570\u7ec4\u662f\u5426\u4e3a\u7a7a + * @param {Array} array \u6570\u7ec4 + * @return {Boolean} \u662f\u5426\u4e3a\u7a7a + */ + isEmpty : function(array){ + return array.length == 0; + }, + /** + * \u63d2\u5165\u6570\u7ec4 + * @param {Array} array \u6570\u7ec4 + * @param {Number} index \u4f4d\u7f6e + * @param {*} value \u63d2\u5165\u7684\u6570\u636e + */ + add : function(array,value){ + array.push(value); + }, + /** + * \u5c06\u6570\u636e\u63d2\u5165\u6570\u7ec4\u6307\u5b9a\u7684\u4f4d\u7f6e + * @param {Array} array \u6570\u7ec4 + * @param {*} value \u63d2\u5165\u7684\u6570\u636e + * @param {Number} index \u4f4d\u7f6e + */ + addAt : function(array,value,index){ + BUI.Array.splice(array, index, 0, value); + }, + /** + * \u6e05\u7a7a\u6570\u7ec4 + * @param {Array} array \u6570\u7ec4 + * @return {Array} \u6e05\u7a7a\u540e\u7684\u6570\u7ec4 + */ + empty : function(array){ + if(!(array instanceof(Array))){ + for (var i = array.length - 1; i >= 0; i--) { + delete array[i]; + } + } + array.length = 0; + }, + /** + * \u79fb\u9664\u8bb0\u5f55 + * @param {Array} array \u6570\u7ec4 + * @param {*} value \u8bb0\u5f55 + * @return {Boolean} \u662f\u5426\u79fb\u9664\u6210\u529f + */ + remove : function(array,value){ + var i = BUI.Array.indexOf(value, array); + var rv; + if ((rv = i >= 0)) { + BUI.Array.removeAt(array, i); + } + return rv; + }, + /** + * \u79fb\u9664\u6307\u5b9a\u4f4d\u7f6e\u7684\u8bb0\u5f55 + * @param {Array} array \u6570\u7ec4 + * @param {Number} index \u7d22\u5f15\u503c + * @return {Boolean} \u662f\u5426\u79fb\u9664\u6210\u529f + */ + removeAt : function(array,index){ + return BUI.Array.splice(array, index, 1).length == 1; + }, + /** + * @private + */ + slice : function(arr, start, opt_end){ + if (arguments.length <= 2) { + return Array.prototype.slice.call(arr, start); + } else { + return Array.prototype.slice.call(arr, start, opt_end); + } + }, + /** + * @private + */ + splice : function(arr, index, howMany, var_args){ + return Array.prototype.splice.apply(arr, BUI.Array.slice(arguments, 1)) + } + + }; + return BUI.Array; +});/** + * @fileOverview \u89c2\u5bdf\u8005\u6a21\u5f0f\u5b9e\u73b0\u4e8b\u4ef6 + * @ignore + */ + +define('bui/observable',['bui/util'],function (r) { + + var BUI = r('bui/util'); + /** + * @private + * @class BUI.Observable.Callbacks + * jquery 1.7 \u65f6\u5b58\u5728 $.Callbacks,\u4f46\u662ffireWith\u7684\u8fd4\u56de\u7ed3\u679c\u662f$.Callbacks \u5bf9\u8c61\uff0c + * \u800c\u6211\u4eec\u60f3\u8981\u7684\u6548\u679c\u662f\uff1a\u5f53\u5176\u4e2d\u6709\u4e00\u4e2a\u51fd\u6570\u8fd4\u56de\u4e3afalse\u65f6\uff0c\u963b\u6b62\u540e\u9762\u7684\u6267\u884c\uff0c\u5e76\u8fd4\u56defalse + */ + var Callbacks = function(){ + this._init(); + }; + + BUI.augment(Callbacks,{ + + _functions : null, + + _init : function(){ + var _self = this; + + _self._functions = []; + }, + /** + * \u6dfb\u52a0\u56de\u8c03\u51fd\u6570 + * @param {Function} fn \u56de\u8c03\u51fd\u6570 + */ + add:function(fn){ + this._functions.push(fn); + }, + /** + * \u79fb\u9664\u56de\u8c03\u51fd\u6570 + * @param {Function} fn \u56de\u8c03\u51fd\u6570 + */ + remove : function(fn){ + var functions = this._functions; + index = BUI.Array.indexOf(fn,functions); + if(index>=0){ + functions.splice(index,1); + } + }, + empty : function(){ + var length = this._functions.length; //ie6,7\u4e0b\uff0c\u5fc5\u987b\u6307\u5b9a\u9700\u8981\u5220\u9664\u7684\u6570\u91cf + this._functions.splice(0,length); + }, + /** + * \u89e6\u53d1\u56de\u8c03 + * @param {Object} scope \u4e0a\u4e0b\u6587 + * @param {Array} args \u56de\u8c03\u51fd\u6570\u7684\u53c2\u6570 + * @return {Boolean|undefined} \u5f53\u5176\u4e2d\u6709\u4e00\u4e2a\u51fd\u6570\u8fd4\u56de\u4e3afalse\u65f6\uff0c\u963b\u6b62\u540e\u9762\u7684\u6267\u884c\uff0c\u5e76\u8fd4\u56defalse + */ + fireWith : function(scope,args){ + var _self = this, + rst; + + BUI.each(_self._functions,function(fn){ + rst = fn.apply(scope,args); + if(rst === false){ + return false; + } + }); + return rst; + } + }); + + function getCallbacks(){ + return new Callbacks(); + } + /** + * \u652f\u6301\u4e8b\u4ef6\u7684\u5bf9\u8c61\uff0c\u53c2\u8003\u89c2\u5bdf\u8005\u6a21\u5f0f + * - \u6b64\u7c7b\u63d0\u4f9b\u4e8b\u4ef6\u7ed1\u5b9a + * - \u63d0\u4f9b\u4e8b\u4ef6\u5192\u6ce1\u673a\u5236 + * + *
          
          +   *   var control = new Control();
          +   *   control.on('click',function(ev){
          +   *   
          +   *   });
          +   *
          +   *   control.off();  //\u79fb\u9664\u6240\u6709\u4e8b\u4ef6
          +   * 
          + * @class BUI.Observable + * @abstract + * @param {Object} config \u914d\u7f6e\u9879\u952e\u503c\u5bf9 + */ + var Observable = function(config){ + this._events = []; + this._eventMap = {}; + this._bubblesEvents = []; + this._initEvents(config); + }; + + BUI.augment(Observable, + { + + /** + * @cfg {Object} listeners + * \u521d\u59cb\u5316\u4e8b\u4ef6,\u5feb\u901f\u6ce8\u518c\u4e8b\u4ef6 + *
          
          +     *    var list = new BUI.List.SimpleList({
          +     *      listeners : {
          +     *        itemclick : function(ev){},
          +     *        itemrendered : function(ev){}
          +     *      },
          +     *      items : []
          +     *    });
          +     *    list.render();
          +     *  
          + */ + + /** + * @cfg {Function} handler + * \u70b9\u51fb\u4e8b\u4ef6\u7684\u5904\u7406\u51fd\u6570\uff0c\u5feb\u901f\u914d\u7f6e\u70b9\u51fb\u4e8b\u4ef6\u800c\u4e0d\u9700\u8981\u5199listeners\u5c5e\u6027 + *
          
          +     *    var list = new BUI.List.SimpleList({
          +     *      handler : function(ev){} //click \u4e8b\u4ef6
          +     *    });
          +     *    list.render();
          +     *  
          + */ + + /** + * \u652f\u6301\u7684\u4e8b\u4ef6\u540d\u5217\u8868 + * @private + */ + _events:[], + + /** + * \u7ed1\u5b9a\u7684\u4e8b\u4ef6 + * @private + */ + _eventMap : {}, + + _bubblesEvents : [], + + _bubbleTarget : null, + + //\u83b7\u53d6\u56de\u8c03\u96c6\u5408 + _getCallbacks : function(eventType){ + var _self = this, + eventMap = _self._eventMap; + return eventMap[eventType]; + }, + //\u521d\u59cb\u5316\u4e8b\u4ef6\u5217\u8868 + _initEvents : function(config){ + var _self = this, + listeners = null; + + if(!config){ + return; + } + listeners = config.listeners || {}; + if(config.handler){ + listeners.click = config.handler; + } + if(listeners){ + for (var name in listeners) { + if(listeners.hasOwnProperty(name)){ + _self.on(name,listeners[name]); + } + }; + } + }, + //\u4e8b\u4ef6\u662f\u5426\u652f\u6301\u5192\u6ce1 + _isBubbles : function (eventType) { + return BUI.Array.indexOf(eventType,this._bubblesEvents) >= 0; + }, + /** + * \u6dfb\u52a0\u5192\u6ce1\u7684\u5bf9\u8c61 + * @protected + * @param {Object} target \u5192\u6ce1\u7684\u4e8b\u4ef6\u6e90 + */ + addTarget : function(target) { + this._bubbleTarget = target; + }, + /** + * \u6dfb\u52a0\u652f\u6301\u7684\u4e8b\u4ef6 + * @protected + * @param {String|String[]} events \u4e8b\u4ef6 + */ + addEvents : function(events){ + var _self = this, + existEvents = _self._events, + eventMap = _self._eventMap; + + function addEvent(eventType){ + if(BUI.Array.indexOf(eventType,existEvents) === -1){ + eventMap[eventType] = getCallbacks(); + existEvents.push(eventType); + } + } + if(BUI.isArray(events)){ + $.each(events,function(index,eventType){ + addEvent(eventType); + }); + }else{ + addEvent(events); + } + }, + /** + * \u79fb\u9664\u6240\u6709\u7ed1\u5b9a\u7684\u4e8b\u4ef6 + * @protected + */ + clearListeners : function(){ + var _self = this, + eventMap = _self._eventMap; + for(var name in eventMap){ + if(eventMap.hasOwnProperty(name)){ + eventMap[name].empty(); + } + } + }, + /** + * \u89e6\u53d1\u4e8b\u4ef6 + *
          
          +     *   //\u7ed1\u5b9a\u4e8b\u4ef6
          +     *   list.on('itemclick',function(ev){
          +     *     alert('21');
          +     *   });
          +     *   //\u89e6\u53d1\u4e8b\u4ef6
          +     *   list.fire('itemclick');
          +     * 
          + * @param {String} eventType \u4e8b\u4ef6\u7c7b\u578b + * @param {Object} eventData \u4e8b\u4ef6\u89e6\u53d1\u65f6\u4f20\u9012\u7684\u6570\u636e + * @return {Boolean|undefined} \u5982\u679c\u5176\u4e2d\u4e00\u4e2a\u4e8b\u4ef6\u5904\u7406\u5668\u8fd4\u56de false , \u5219\u8fd4\u56de false, \u5426\u5219\u8fd4\u56de\u6700\u540e\u4e00\u4e2a\u4e8b\u4ef6\u5904\u7406\u5668\u7684\u8fd4\u56de\u503c + */ + fire : function(eventType,eventData){ + var _self = this, + callbacks = _self._getCallbacks(eventType), + args = $.makeArray(arguments), + result; + if(!eventData){ + eventData = {}; + args.push(eventData); + } + if(!eventData.target){ + eventData.target = _self; + } + if(callbacks){ + result = callbacks.fireWith(_self,Array.prototype.slice.call(args,1)); + } + if(_self._isBubbles(eventType)){ + var bubbleTarget = _self._bubbleTarget; + if(bubbleTarget && bubbleTarget.fire){ + bubbleTarget.fire(eventType,eventData); + } + } + return result; + }, + /** + * \u6dfb\u52a0\u7ed1\u5b9a\u4e8b\u4ef6 + *
          
          +     *   //\u7ed1\u5b9a\u5355\u4e2a\u4e8b\u4ef6
          +     *   list.on('itemclick',function(ev){
          +     *     alert('21');
          +     *   });
          +     *   //\u7ed1\u5b9a\u591a\u4e2a\u4e8b\u4ef6
          +     *   list.on('itemrendered itemupdated',function(){
          +     *     //\u5217\u8868\u9879\u521b\u5efa\u3001\u66f4\u65b0\u65f6\u89e6\u53d1\u64cd\u4f5c
          +     *   });
          +     * 
          + * @param {String} eventType \u4e8b\u4ef6\u7c7b\u578b + * @param {Function} fn \u56de\u8c03\u51fd\u6570 + */ + on : function(eventType,fn){ + //\u4e00\u6b21\u76d1\u542c\u591a\u4e2a\u4e8b\u4ef6 + var arr = eventType.split(' '), + _self = this, + callbacks =null; + if(arr.length > 1){ + BUI.each(arr,function(name){ + _self.on(name,fn); + }); + }else{ + callbacks = _self._getCallbacks(eventType); + if(callbacks){ + callbacks.add(fn); + }else{ + _self.addEvents(eventType); + _self.on(eventType,fn); + } + } + return _self; + }, + /** + * \u79fb\u9664\u7ed1\u5b9a\u7684\u4e8b\u4ef6 + *
          
          +     *  //\u79fb\u9664\u6240\u6709\u4e8b\u4ef6
          +     *  list.off();
          +     *  
          +     *  //\u79fb\u9664\u7279\u5b9a\u4e8b\u4ef6
          +     *  function callback(ev){}
          +     *  list.on('click',callback);
          +     *
          +     *  list.off('click',callback);//\u9700\u8981\u4fdd\u5b58\u56de\u8c03\u51fd\u6570\u7684\u5f15\u7528
          +     * 
          +     * 
          + * @param {String} eventType \u4e8b\u4ef6\u7c7b\u578b + * @param {Function} fn \u56de\u8c03\u51fd\u6570 + */ + off : function(eventType,fn){ + if(!eventType && !fn){ + this.clearListeners(); + return this; + } + var _self = this, + callbacks = _self._getCallbacks(eventType); + if(callbacks){ + callbacks.remove(fn); + } + return _self; + }, + /** + * \u914d\u7f6e\u4e8b\u4ef6\u662f\u5426\u5141\u8bb8\u5192\u6ce1 + * @protected + * @param {String} eventType \u652f\u6301\u5192\u6ce1\u7684\u4e8b\u4ef6 + * @param {Object} cfg \u914d\u7f6e\u9879 + * @param {Boolean} cfg.bubbles \u662f\u5426\u652f\u6301\u5192\u6ce1 + */ + publish : function(eventType, cfg){ + var _self = this, + bubblesEvents = _self._bubblesEvents; + + if(cfg.bubbles){ + if(BUI.Array.indexOf(eventType,bubblesEvents) === -1){ + bubblesEvents.push(eventType); + } + }else{ + var index = BUI.Array.indexOf(eventType,bubblesEvents); + if(index !== -1){ + bubblesEvents.splice(index,1); + } + } + } + }); + + return Observable; +});/** + * @fileOverview UA,jQuery\u7684 $.browser \u5bf9\u8c61\u975e\u5e38\u96be\u4f7f\u7528 + * @ignore + * @author dxq613@gmail.com + */ +define('bui/ua',function(){ + + function numberify(s) { + var c = 0; + // convert '1.2.3.4' to 1.234 + return parseFloat(s.replace(/\./g, function () { + return (c++ === 0) ? '.' : ''; + })); + }; + + var UA = $.UA || (function(){ + var browser = $.browser, + versionNumber = numberify(browser.version), + /** + * \u6d4f\u89c8\u5668\u7248\u672c\u68c0\u6d4b + * @class BUI.UA + * @singleton + */ + ua = + { + /** + * ie \u7248\u672c + * @type {Number} + */ + ie : browser.msie && versionNumber, + + /** + * webkit \u7248\u672c + * @type {Number} + */ + webkit : browser.webkit && versionNumber, + /** + * opera \u7248\u672c + * @type {Number} + */ + opera : browser.opera && versionNumber, + /** + * mozilla \u706b\u72d0\u7248\u672c + * @type {Number} + */ + mozilla : browser.mozilla && versionNumber + }; + return ua; + })(); + + return UA; +});/** + * @fileOverview \u7531\u4e8ejQuery\u53ea\u6709 parseJSON \uff0c\u6ca1\u6709stringify\u6240\u4ee5\u4f7f\u7528\u8fc7\u7a0b\u4e0d\u65b9\u4fbf + * @ignore + */ +define('bui/json',['bui/ua'],function (require) { + + var win = window, + UA = require('bui/ua'), + JSON = win.JSON; + + // ie 8.0.7600.16315@win7 json \u6709\u95ee\u9898 + if (!JSON || UA['ie'] < 9) { + JSON = win.JSON = {}; + } + + function f(n) { + // Format integers to have at least two digits. + return n < 10 ? '0' + n : n; + } + + if (typeof Date.prototype.toJSON !== 'function') { + + Date.prototype.toJSON = function (key) { + + return isFinite(this.valueOf()) ? + this.getUTCFullYear() + '-' + + f(this.getUTCMonth() + 1) + '-' + + f(this.getUTCDate()) + 'T' + + f(this.getUTCHours()) + ':' + + f(this.getUTCMinutes()) + ':' + + f(this.getUTCSeconds()) + 'Z' : null; + }; + + String.prototype.toJSON = + Number.prototype.toJSON = + Boolean.prototype.toJSON = function (key) { + return this.valueOf(); + }; + } + + + var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, + escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, + gap, + indent, + meta = { // table of character substitutions + '\b': '\\b', + '\t': '\\t', + '\n': '\\n', + '\f': '\\f', + '\r': '\\r', + '"' : '\\"', + '\\': '\\\\' + }, + rep; + + function quote(string) { + + // If the string contains no control characters, no quote characters, and no + // backslash characters, then we can safely slap some quotes around it. + // Otherwise we must also replace the offending characters with safe escape + // sequences. + + escapable['lastIndex'] = 0; + return escapable.test(string) ? + '"' + string.replace(escapable, function (a) { + var c = meta[a]; + return typeof c === 'string' ? c : + '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4); + }) + '"' : + '"' + string + '"'; + } + + function str(key, holder) { + + // Produce a string from holder[key]. + + var i, // The loop counter. + k, // The member key. + v, // The member value. + length, + mind = gap, + partial, + value = holder[key]; + + // If the value has a toJSON method, call it to obtain a replacement value. + + if (value && typeof value === 'object' && + typeof value.toJSON === 'function') { + value = value.toJSON(key); + } + + // If we were called with a replacer function, then call the replacer to + // obtain a replacement value. + + if (typeof rep === 'function') { + value = rep.call(holder, key, value); + } + + // What happens next depends on the value's type. + + switch (typeof value) { + case 'string': + return quote(value); + + case 'number': + + // JSON numbers must be finite. Encode non-finite numbers as null. + + return isFinite(value) ? String(value) : 'null'; + + case 'boolean': + case 'null': + + // If the value is a boolean or null, convert it to a string. Note: + // typeof null does not produce 'null'. The case is included here in + // the remote chance that this gets fixed someday. + + return String(value); + + // If the type is 'object', we might be dealing with an object or an array or + // null. + + case 'object': + + // Due to a specification blunder in ECMAScript, typeof null is 'object', + // so watch out for that case. + + if (!value) { + return 'null'; + } + + // Make an array to hold the partial results of stringifying this object value. + + gap += indent; + partial = []; + + // Is the value an array? + + if (Object.prototype.toString.apply(value) === '[object Array]') { + + // The value is an array. Stringify every element. Use null as a placeholder + // for non-JSON values. + + length = value.length; + for (i = 0; i < length; i += 1) { + partial[i] = str(i, value) || 'null'; + } + + // Join all of the elements together, separated with commas, and wrap them in + // brackets. + + v = partial.length === 0 ? '[]' : + gap ? '[\n' + gap + + partial.join(',\n' + gap) + '\n' + + mind + ']' : + '[' + partial.join(',') + ']'; + gap = mind; + return v; + } + + // If the replacer is an array, use it to select the members to be stringified. + + if (rep && typeof rep === 'object') { + length = rep.length; + for (i = 0; i < length; i += 1) { + k = rep[i]; + if (typeof k === 'string') { + v = str(k, value); + if (v) { + partial.push(quote(k) + (gap ? ': ' : ':') + v); + } + } + } + } else { + + // Otherwise, iterate through all of the keys in the object. + + for (k in value) { + if (Object.hasOwnProperty.call(value, k)) { + v = str(k, value); + if (v) { + partial.push(quote(k) + (gap ? ': ' : ':') + v); + } + } + } + } + + // Join all of the member texts together, separated with commas, + // and wrap them in braces. + + v = partial.length === 0 ? '{}' : + gap ? '{\n' + gap + partial.join(',\n' + gap) + '\n' + + mind + '}' : '{' + partial.join(',') + '}'; + gap = mind; + return v; + } + } + + if (typeof JSON.stringify !== 'function') { + JSON.stringify = function (value, replacer, space) { + + // The stringify method takes a value and an optional replacer, and an optional + // space parameter, and returns a JSON text. The replacer can be a function + // that can replace values, or an array of strings that will select the keys. + // A default replacer method can be provided. Use of the space parameter can + // produce text that is more easily readable. + + var i; + gap = ''; + indent = ''; + + // If the space parameter is a number, make an indent string containing that + // many spaces. + + if (typeof space === 'number') { + for (i = 0; i < space; i += 1) { + indent += ' '; + } + + // If the space parameter is a string, it will be used as the indent string. + + } else if (typeof space === 'string') { + indent = space; + } + + // If there is a replacer, it must be a function or an array. + // Otherwise, throw an error. + + rep = replacer; + if (replacer && typeof replacer !== 'function' && + (typeof replacer !== 'object' || + typeof replacer.length !== 'number')) { + throw new Error('JSON.stringify'); + } + + // Make a fake root object containing our value under the key of ''. + // Return the result of stringifying the value. + + return str('', {'': value}); + }; + } + + function looseParse(data){ + try{ + return new Function('return ' + data + ';')(); + }catch(e){ + throw 'Json parse error!'; + } + } + /** + * JSON \u683c\u5f0f\u5316 + * @class BUI.JSON + * @singleton + */ + var JSON = { + /** + * \u8f6c\u6210json \u7b49\u540c\u4e8e$.parseJSON + * @method + * @param {String} jsonstring \u5408\u6cd5\u7684json \u5b57\u7b26\u4e32 + */ + parse : $.parseJSON, + /** + * \u4e1a\u52a1\u4e2d\u6709\u4e9b\u5b57\u7b26\u4e32\u7ec4\u6210\u7684json\u6570\u636e\u4e0d\u662f\u4e25\u683c\u7684json\u6570\u636e\uff0c\u5982\u4f7f\u7528\u5355\u5f15\u53f7\uff0c\u6216\u8005\u5c5e\u6027\u540d\u4e0d\u662f\u5b57\u7b26\u4e32 + * \u5982 \uff1a {a:'abc'} + * @method + * @param {String} jsonstring + */ + looseParse : looseParse, + /** + * \u5c06Json\u8f6c\u6210\u5b57\u7b26\u4e32 + * @method + * @param {Object} json json \u5bf9\u8c61 + */ + stringify : JSON.stringify + } + + return JSON; +});/** + * @fileOverview \u952e\u76d8\u503c + * @ignore + */ + +define('bui/keycode',function () { + + /** + * \u952e\u76d8\u6309\u952e\u5bf9\u5e94\u7684\u6570\u5b57\u503c + * @class BUI.KeyCode + * @singleton + */ + var keyCode = { + /** Key constant @type Number */ + BACKSPACE: 8, + /** Key constant @type Number */ + TAB: 9, + /** Key constant @type Number */ + NUM_CENTER: 12, + /** Key constant @type Number */ + ENTER: 13, + /** Key constant @type Number */ + RETURN: 13, + /** Key constant @type Number */ + SHIFT: 16, + /** Key constant @type Number */ + CTRL: 17, + /** Key constant @type Number */ + ALT: 18, + /** Key constant @type Number */ + PAUSE: 19, + /** Key constant @type Number */ + CAPS_LOCK: 20, + /** Key constant @type Number */ + ESC: 27, + /** Key constant @type Number */ + SPACE: 32, + /** Key constant @type Number */ + PAGE_UP: 33, + /** Key constant @type Number */ + PAGE_DOWN: 34, + /** Key constant @type Number */ + END: 35, + /** Key constant @type Number */ + HOME: 36, + /** Key constant @type Number */ + LEFT: 37, + /** Key constant @type Number */ + UP: 38, + /** Key constant @type Number */ + RIGHT: 39, + /** Key constant @type Number */ + DOWN: 40, + /** Key constant @type Number */ + PRINT_SCREEN: 44, + /** Key constant @type Number */ + INSERT: 45, + /** Key constant @type Number */ + DELETE: 46, + /** Key constant @type Number */ + ZERO: 48, + /** Key constant @type Number */ + ONE: 49, + /** Key constant @type Number */ + TWO: 50, + /** Key constant @type Number */ + THREE: 51, + /** Key constant @type Number */ + FOUR: 52, + /** Key constant @type Number */ + FIVE: 53, + /** Key constant @type Number */ + SIX: 54, + /** Key constant @type Number */ + SEVEN: 55, + /** Key constant @type Number */ + EIGHT: 56, + /** Key constant @type Number */ + NINE: 57, + /** Key constant @type Number */ + A: 65, + /** Key constant @type Number */ + B: 66, + /** Key constant @type Number */ + C: 67, + /** Key constant @type Number */ + D: 68, + /** Key constant @type Number */ + E: 69, + /** Key constant @type Number */ + F: 70, + /** Key constant @type Number */ + G: 71, + /** Key constant @type Number */ + H: 72, + /** Key constant @type Number */ + I: 73, + /** Key constant @type Number */ + J: 74, + /** Key constant @type Number */ + K: 75, + /** Key constant @type Number */ + L: 76, + /** Key constant @type Number */ + M: 77, + /** Key constant @type Number */ + N: 78, + /** Key constant @type Number */ + O: 79, + /** Key constant @type Number */ + P: 80, + /** Key constant @type Number */ + Q: 81, + /** Key constant @type Number */ + R: 82, + /** Key constant @type Number */ + S: 83, + /** Key constant @type Number */ + T: 84, + /** Key constant @type Number */ + U: 85, + /** Key constant @type Number */ + V: 86, + /** Key constant @type Number */ + W: 87, + /** Key constant @type Number */ + X: 88, + /** Key constant @type Number */ + Y: 89, + /** Key constant @type Number */ + Z: 90, + /** Key constant @type Number */ + CONTEXT_MENU: 93, + /** Key constant @type Number */ + NUM_ZERO: 96, + /** Key constant @type Number */ + NUM_ONE: 97, + /** Key constant @type Number */ + NUM_TWO: 98, + /** Key constant @type Number */ + NUM_THREE: 99, + /** Key constant @type Number */ + NUM_FOUR: 100, + /** Key constant @type Number */ + NUM_FIVE: 101, + /** Key constant @type Number */ + NUM_SIX: 102, + /** Key constant @type Number */ + NUM_SEVEN: 103, + /** Key constant @type Number */ + NUM_EIGHT: 104, + /** Key constant @type Number */ + NUM_NINE: 105, + /** Key constant @type Number */ + NUM_MULTIPLY: 106, + /** Key constant @type Number */ + NUM_PLUS: 107, + /** Key constant @type Number */ + NUM_MINUS: 109, + /** Key constant @type Number */ + NUM_PERIOD: 110, + /** Key constant @type Number */ + NUM_DIVISION: 111, + /** Key constant @type Number */ + F1: 112, + /** Key constant @type Number */ + F2: 113, + /** Key constant @type Number */ + F3: 114, + /** Key constant @type Number */ + F4: 115, + /** Key constant @type Number */ + F5: 116, + /** Key constant @type Number */ + F6: 117, + /** Key constant @type Number */ + F7: 118, + /** Key constant @type Number */ + F8: 119, + /** Key constant @type Number */ + F9: 120, + /** Key constant @type Number */ + F10: 121, + /** Key constant @type Number */ + F11: 122, + /** Key constant @type Number */ + F12: 123 + }; + + return keyCode; +});/* + * @fileOverview Date Format 1.2.3 + * @ignore + * (c) 2007-2009 Steven Levithan + * MIT license + * + * Includes enhancements by Scott Trenda + * and Kris Kowal + * + * Accepts a date, a mask, or a date and a mask. + * Returns a formatted version of the given date. + * The date defaults to the current date/time. + * The mask defaults to dateFormat.masks.default. + * + * Last modified by jayli \u62d4\u8d64 2010-09-09 + * - \u589e\u52a0\u4e2d\u6587\u7684\u652f\u6301 + * - \u7b80\u5355\u7684\u672c\u5730\u5316\uff0c\u5bf9w\uff08\u661f\u671fx\uff09\u7684\u652f\u6301 + * + */ +define('bui/date',function () { + + var dateRegex = /^(?:(?!0000)[0-9]{4}([-/.]+)(?:(?:0?[1-9]|1[0-2])\1(?:0?[1-9]|1[0-9]|2[0-8])|(?:0?[13-9]|1[0-2])\1(?:29|30)|(?:0?[13578]|1[02])\1(?:31))|(?:[0-9]{2}(?:0[48]|[2468][048]|[13579][26])|(?:0[48]|[2468][048]|[13579][26])00)([-/.]?)0?2\2(?:29))(\s+([01]|([01][0-9]|2[0-3])):([0-9]|[0-5][0-9]):([0-9]|[0-5][0-9]))?$/; + function dateParse(data, s) { + + var date = null; + s = s || '-'; + //Convert to date + if (!(date instanceof Date)) { + if(BUI.isString(data)){ + date = new Date(data.replace(/-/g,'/')); + }else{ + date = new Date(data); + } + + } + else { + return date; + } + + // Validate + if (date instanceof Date && (date != 'Invalid Date') && !isNaN(date)) { + return date; + } + else { + var arr = data.toString().split(s); + if (arr.length == 3) { + date = new Date(arr[0], (parseInt(arr[1], 10) - 1), arr[2]); + if (date instanceof Date && (date != 'Invalid Date') && !isNaN(date)) { + return date; + } + } + } + return null; + + } + + function DateAdd(strInterval, NumDay, dtDate) { + var dtTmp = new Date(dtDate); + if (isNaN(dtTmp)){ + dtTmp = new Date(); + } + switch (strInterval) { + case 's': + dtTmp = new Date(dtTmp.getTime() + (1000 * parseInt(NumDay))); + break; + case 'n': + dtTmp = new Date(dtTmp.getTime() + (60000 * parseInt(NumDay))); + break; + case 'h': + dtTmp = new Date(dtTmp.getTime() + (3600000 * parseInt(NumDay))); + break; + case 'd': + dtTmp = new Date(dtTmp.getTime() + (86400000 * parseInt(NumDay))); + break; + case 'w': + dtTmp = new Date(dtTmp.getTime() + ((86400000 * 7) * parseInt(NumDay))); + break; + case 'm': + dtTmp = new Date(dtTmp.getFullYear(), (dtTmp.getMonth())+parseInt(NumDay), dtTmp.getDate(), dtTmp.getHours(), dtTmp.getMinutes(), dtTmp.getSeconds()); + break; + case 'y': + //alert(dtTmp.getFullYear()); + dtTmp = new Date(dtTmp.getFullYear()+parseInt(NumDay), dtTmp.getMonth(), dtTmp.getDate(), dtTmp.getHours(), dtTmp.getMinutes(), dtTmp.getSeconds()); + //alert(dtTmp); + break; + } + return dtTmp; + } + + var dateFormat = function () { + var token = /w{1}|d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g, + timezone = /\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g, + timezoneClip = /[^-+\dA-Z]/g, + pad = function (val, len) { + val = String(val); + len = len || 2; + while (val.length < len) { + val = '0' + val; + } + return val; + }, + // Some common format strings + masks = { + 'default':'ddd mmm dd yyyy HH:MM:ss', + shortDate:'m/d/yy', + //mediumDate: 'mmm d, yyyy', + longDate:'mmmm d, yyyy', + fullDate:'dddd, mmmm d, yyyy', + shortTime:'h:MM TT', + //mediumTime: 'h:MM:ss TT', + longTime:'h:MM:ss TT Z', + isoDate:'yyyy-mm-dd', + isoTime:'HH:MM:ss', + isoDateTime:"yyyy-mm-dd'T'HH:MM:ss", + isoUTCDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'", + + //added by jayli + localShortDate:'yy\u5e74mm\u6708dd\u65e5', + localShortDateTime:'yy\u5e74mm\u6708dd\u65e5 hh:MM:ss TT', + localLongDate:'yyyy\u5e74mm\u6708dd\u65e5', + localLongDateTime:'yyyy\u5e74mm\u6708dd\u65e5 hh:MM:ss TT', + localFullDate:'yyyy\u5e74mm\u6708dd\u65e5 w', + localFullDateTime:'yyyy\u5e74mm\u6708dd\u65e5 w hh:MM:ss TT' + + }, + + // Internationalization strings + i18n = { + dayNames:[ + 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', + 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', + '\u661f\u671f\u65e5', '\u661f\u671f\u4e00', '\u661f\u671f\u4e8c', '\u661f\u671f\u4e09', '\u661f\u671f\u56db', '\u661f\u671f\u4e94', '\u661f\u671f\u516d' + ], + monthNames:[ + 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec', + 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December' + ] + }; + + // Regexes and supporting functions are cached through closure + return function (date, mask, utc) { + + // You can't provide utc if you skip other args (use the "UTC:" mask prefix) + if (arguments.length === 1 && Object.prototype.toString.call(date) === '[object String]' && !/\d/.test(date)) { + mask = date; + date = undefined; + } + + // Passing date through Date applies Date.parse, if necessary + date = date ? new Date(date) : new Date(); + if (isNaN(date)) { + throw SyntaxError('invalid date'); + } + + mask = String(masks[mask] || mask || masks['default']); + + // Allow setting the utc argument via the mask + if (mask.slice(0, 4) === 'UTC:') { + mask = mask.slice(4); + utc = true; + } + + var _ = utc ? 'getUTC' : 'get', + d = date[_ + 'Date'](), + D = date[_ + 'Day'](), + m = date[_ + 'Month'](), + y = date[_ + 'FullYear'](), + H = date[_ + 'Hours'](), + M = date[_ + 'Minutes'](), + s = date[_ + 'Seconds'](), + L = date[_ + 'Milliseconds'](), + o = utc ? 0 : date.getTimezoneOffset(), + flags = { + d:d, + dd:pad(d, undefined), + ddd:i18n.dayNames[D], + dddd:i18n.dayNames[D + 7], + w:i18n.dayNames[D + 14], + m:m + 1, + mm:pad(m + 1, undefined), + mmm:i18n.monthNames[m], + mmmm:i18n.monthNames[m + 12], + yy:String(y).slice(2), + yyyy:y, + h:H % 12 || 12, + hh:pad(H % 12 || 12, undefined), + H:H, + HH:pad(H, undefined), + M:M, + MM:pad(M, undefined), + s:s, + ss:pad(s, undefined), + l:pad(L, 3), + L:pad(L > 99 ? Math.round(L / 10) : L, undefined), + t:H < 12 ? 'a' : 'p', + tt:H < 12 ? 'am' : 'pm', + T:H < 12 ? 'A' : 'P', + TT:H < 12 ? 'AM' : 'PM', + Z:utc ? 'UTC' : (String(date).match(timezone) || ['']).pop().replace(timezoneClip, ''), + o:(o > 0 ? '-' : '+') + pad(Math.floor(Math.abs(o) / 60) * 100 + Math.abs(o) % 60, 4), + S:['th', 'st', 'nd', 'rd'][d % 10 > 3 ? 0 : (d % 100 - d % 10 !== 10) * d % 10] + }; + + return mask.replace(token, function ($0) { + return $0 in flags ? flags[$0] : $0.slice(1, $0.length - 1); + }); + }; + }(); + + /** + * \u65e5\u671f\u7684\u5de5\u5177\u65b9\u6cd5 + * @class BUI.Date + */ + var DateUtil = { + /** + * \u65e5\u671f\u52a0\u6cd5 + * @param {String} strInterval \u52a0\u6cd5\u7684\u7c7b\u578b\uff0cs(\u79d2),n(\u5206),h(\u65f6),d(\u5929),w(\u5468),m(\u6708),y(\u5e74) + * @param {Number} Num \u6570\u91cf\uff0c\u5982\u679c\u4e3a\u8d1f\u6570\uff0c\u5219\u4e3a\u51cf\u6cd5 + * @param {Date} dtDate \u8d77\u59cb\u65e5\u671f\uff0c\u9ed8\u8ba4\u4e3a\u6b64\u65f6 + */ + add : function(strInterval,Num,dtDate){ + return DateAdd(strInterval,Num,dtDate); + }, + /** + * \u5c0f\u65f6\u7684\u52a0\u6cd5 + * @param {Number} hours \u5c0f\u65f6 + * @param {Date} date \u8d77\u59cb\u65e5\u671f + */ + addHour : function(hours,date){ + return DateAdd('h',hours,date); + }, + /** + * \u5206\u7684\u52a0\u6cd5 + * @param {Number} minutes \u5206 + * @param {Date} date \u8d77\u59cb\u65e5\u671f + */ + addMinute : function(minutes,date){ + return DateAdd('n',minutes,date); + }, + /** + * \u79d2\u7684\u52a0\u6cd5 + * @param {Number} seconds \u79d2 + * @param {Date} date \u8d77\u59cb\u65e5\u671f + */ + addSecond : function(seconds,date){ + return DateAdd('s',seconds,date); + }, + /** + * \u5929\u7684\u52a0\u6cd5 + * @param {Number} days \u5929\u6570 + * @param {Date} date \u8d77\u59cb\u65e5\u671f + */ + addDay : function(days,date){ + return DateAdd('d',days,date); + }, + /** + * \u589e\u52a0\u5468 + * @param {Number} weeks \u5468\u6570 + * @param {Date} date \u8d77\u59cb\u65e5\u671f + */ + addWeek : function(weeks,date){ + return DateAdd('w',weeks,date); + }, + /** + * \u589e\u52a0\u6708 + * @param {Number} months \u6708\u6570 + * @param {Date} date \u8d77\u59cb\u65e5\u671f + */ + addMonths : function(months,date){ + return DateAdd('m',months,date); + }, + /** + * \u589e\u52a0\u5e74 + * @param {Number} years \u5e74\u6570 + * @param {Date} date \u8d77\u59cb\u65e5\u671f + */ + addYear : function(years,date){ + return DateAdd('y',years,date); + }, + /** + * \u65e5\u671f\u662f\u5426\u76f8\u7b49\uff0c\u5ffd\u7565\u65f6\u95f4 + * @param {Date} d1 \u65e5\u671f\u5bf9\u8c61 + * @param {Date} d2 \u65e5\u671f\u5bf9\u8c61 + * @return {Boolean} \u662f\u5426\u76f8\u7b49 + */ + isDateEquals : function(d1,d2){ + + return d1.getFullYear() === d2.getFullYear() && d1.getMonth() === d2.getMonth() && d1.getDate() === d2.getDate(); + }, + /** + * \u65e5\u671f\u65f6\u95f4\u662f\u5426\u76f8\u7b49\uff0c\u5305\u542b\u65f6\u95f4 + * @param {Date} d1 \u65e5\u671f\u5bf9\u8c61 + * @param {Date} d2 \u65e5\u671f\u5bf9\u8c61 + * @return {Boolean} \u662f\u5426\u76f8\u7b49 + */ + isEquals : function (d1,d2) { + if(d1 == d2){ + return true; + } + if(!d1 || !d2){ + return false; + } + if(!d1.getTime || !d2.getTime){ + return false; + } + return d1.getTime() == d2.getTime(); + }, + /** + * \u5b57\u7b26\u4e32\u662f\u5426\u662f\u6709\u6548\u7684\u65e5\u671f\u7c7b\u578b + * @param {String} str \u5b57\u7b26\u4e32 + * @return \u5b57\u7b26\u4e32\u662f\u5426\u80fd\u8f6c\u6362\u6210\u65e5\u671f + */ + isDateString : function(str){ + return dateRegex.test(str); + }, + /** + * \u5c06\u65e5\u671f\u683c\u5f0f\u5316\u6210\u5b57\u7b26\u4e32 + * @param {Date} date \u65e5\u671f + * @param {String} mask \u683c\u5f0f\u5316\u65b9\u5f0f + * @param {Date} utc \u662f\u5426utc\u65f6\u95f4 + * @return {String} \u65e5\u671f\u7684\u5b57\u7b26\u4e32 + */ + format:function (date, mask, utc) { + return dateFormat(date, mask, utc); + }, + /** + * \u8f6c\u6362\u6210\u65e5\u671f + * @param {String|Date} date \u5b57\u7b26\u4e32\u6216\u8005\u65e5\u671f + * @param {String} s \u65f6\u95f4\u7684\u5206\u5272\u7b26\uff0c\u5982 2001-01-01\u4e2d\u7684 '-' + * @return {Date} \u65e5\u671f\u5bf9\u8c61 + */ + parse:function (date, s) { + return dateParse(date, s); + }, + /** + * \u5f53\u524d\u5929 + * @return {Date} \u5f53\u524d\u5929 00:00:00 + */ + today : function(){ + var now = new Date(); + return new Date(now.getFullYear(),now.getMonth(),now.getDate()); + }, + /** + * \u8fd4\u56de\u5f53\u524d\u65e5\u671f + * @return {Date} \u65e5\u671f\u7684 00:00:00 + */ + getDate : function(date){ + return new Date(date.getFullYear(),date.getMonth(),date.getDate()); + } + }; + + return DateUtil; +});/** + * @fileOverview Base UI\u63a7\u4ef6\u7684\u6700\u57fa\u7840\u7684\u7c7b + * @author yiminghe@gmail.com + * copied by dxq613@gmail.com + * @ignore + */ +define('bui/base',['bui/observable'],function(require){ + + var INVALID = {}, + Observable = require('bui/observable'); + + function ensureNonEmpty(obj, name, create) { + var ret = obj[name] || {}; + if (create) { + obj[name] = ret; + } + return ret; + } + + function normalFn(host, method) { + if (BUI.isString(method)) { + return host[method]; + } + return method; + } + + function __fireAttrChange(self, when, name, prevVal, newVal) { + var attrName = name; + return self.fire(when + BUI.ucfirst(name) + 'Change', { + attrName: attrName, + prevVal: prevVal, + newVal: newVal + }); + } + + function setInternal(self, name, value, opts, attrs) { + opts = opts || {}; + + var ret, + subVal, + prevVal; + + prevVal = self.get(name); + + //\u5982\u679c\u672a\u6539\u53d8\u503c\u4e0d\u8fdb\u884c\u4fee\u6539 + if(!$.isPlainObject(value) && !BUI.isArray(value) && prevVal === value){ + return undefined; + } + // check before event + if (!opts['silent']) { + if (false === __fireAttrChange(self, 'before', name, prevVal, value)) { + return false; + } + } + // set it + ret = self._set(name, value, opts); + + if (ret === false) { + return ret; + } + + // fire after event + if (!opts['silent']) { + value = self.getAttrVals()[name]; + __fireAttrChange(self, 'after', name, prevVal, value); + } + return self; + } + + /** + * \u57fa\u7840\u7c7b\uff0c\u6b64\u7c7b\u63d0\u4f9b\u4ee5\u4e0b\u529f\u80fd + * - \u63d0\u4f9b\u8bbe\u7f6e\u83b7\u53d6\u5c5e\u6027 + * - \u63d0\u4f9b\u4e8b\u4ef6\u652f\u6301 + * - \u5c5e\u6027\u53d8\u5316\u65f6\u4f1a\u89e6\u53d1\u5bf9\u5e94\u7684\u4e8b\u4ef6 + * - \u5c06\u914d\u7f6e\u9879\u81ea\u52a8\u8f6c\u6362\u6210\u5c5e\u6027 + * + * ** \u521b\u5efa\u7c7b\uff0c\u7ee7\u627fBUI.Base\u7c7b ** + *
          
          +   *   var Control = function(cfg){
          +   *     Control.superclass.constructor.call(this,cfg); //\u8c03\u7528BUI.Base\u7684\u6784\u9020\u65b9\u6cd5\uff0c\u5c06\u914d\u7f6e\u9879\u53d8\u6210\u5c5e\u6027
          +   *   };
          +   *
          +   *   BUI.extend(Control,BUI.Base);
          +   * 
          + * + * ** \u58f0\u660e\u9ed8\u8ba4\u5c5e\u6027 ** + *
          
          +   *   Control.ATTRS = {
          +   *     id : {
          +   *       value : 'id' //value \u662f\u6b64\u5c5e\u6027\u7684\u9ed8\u8ba4\u503c
          +   *     },
          +   *     renderTo : {
          +   *      
          +   *     },
          +   *     el : {
          +   *       valueFn : function(){                 //\u7b2c\u4e00\u6b21\u8c03\u7528\u7684\u65f6\u5019\u5c06renderTo\u7684DOM\u8f6c\u6362\u6210el\u5c5e\u6027
          +   *         return $(this.get('renderTo'));
          +   *       }
          +   *     },
          +   *     text : {
          +   *       getter : function(){ //getter \u7528\u4e8e\u83b7\u53d6\u503c\uff0c\u800c\u4e0d\u662f\u8bbe\u7f6e\u7684\u503c
          +   *         return this.get('el').val();
          +   *       },
          +   *       setter : function(v){ //\u4e0d\u4ec5\u4ec5\u662f\u8bbe\u7f6e\u503c\uff0c\u53ef\u4ee5\u8fdb\u884c\u76f8\u5e94\u7684\u64cd\u4f5c
          +   *         this.get('el').val(v);
          +   *       }
          +   *     }
          +   *   };
          +   * 
          + * + * ** \u58f0\u660e\u7c7b\u7684\u65b9\u6cd5 ** + *
          
          +   *   BUI.augment(Control,{
          +   *     getText : function(){
          +   *       return this.get('text');   //\u53ef\u4ee5\u7528get\u65b9\u6cd5\u83b7\u53d6\u5c5e\u6027\u503c
          +   *     },
          +   *     setText : function(txt){
          +   *       this.set('text',txt);      //\u4f7f\u7528set \u8bbe\u7f6e\u5c5e\u6027\u503c
          +   *     }
          +   *   });
          +   * 
          + * + * ** \u521b\u5efa\u5bf9\u8c61 ** + *
          
          +   *   var c = new Control({
          +   *     id : 'oldId',
          +   *     text : '\u6d4b\u8bd5\u6587\u672c',
          +   *     renderTo : '#t1'
          +   *   });
          +   *
          +   *   var el = c.get(el); //$(#t1);
          +   *   el.val(); //text\u7684\u503c \uff1a '\u6d4b\u8bd5\u6587\u672c'
          +   *   c.set('text','\u4fee\u6539\u7684\u503c');
          +   *   el.val();  //'\u4fee\u6539\u7684\u503c'
          +   *
          +   *   c.set('id','newId') //\u4f1a\u89e6\u53d12\u4e2a\u4e8b\u4ef6\uff1a beforeIdChange,afterIdChange 2\u4e2a\u4e8b\u4ef6 ev.newVal \u548cev.prevVal\u6807\u793a\u65b0\u65e7\u503c
          +   * 
          + * @class BUI.Base + * @abstract + * @extends BUI.Observable + * @param {Object} config \u914d\u7f6e\u9879 + */ + var Base = function(config){ + var _self = this, + c = _self.constructor, + constructors = []; + + Observable.apply(this,arguments); + // define + while (c) { + constructors.push(c); + //_self.addAttrs(c['ATTRS']); + c = c.superclass ? c.superclass.constructor : null; + } + //\u4ee5\u5f53\u524d\u5bf9\u8c61\u7684\u5c5e\u6027\u6700\u7ec8\u6dfb\u52a0\u5230\u5c5e\u6027\u4e2d\uff0c\u8986\u76d6\u4e4b\u524d\u7684\u5c5e\u6027 + for (var i = constructors.length - 1; i >= 0; i--) { + _self.addAttrs(constructors[i]['ATTRS'],true); + }; + _self._initAttrs(config); + + }; + + Base.INVALID = INVALID; + + BUI.extend(Base,Observable); + + BUI.augment(Base, + { + /** + * \u6dfb\u52a0\u5c5e\u6027\u5b9a\u4e49 + * @protected + * @param {String} name \u5c5e\u6027\u540d + * @param {Object} attrConfig \u5c5e\u6027\u5b9a\u4e49 + * @param {Boolean} overrides \u662f\u5426\u8986\u76d6\u5b57\u6bb5 + */ + addAttr: function (name, attrConfig,overrides) { + var _self = this, + attrs = _self.getAttrs(), + cfg = BUI.cloneObject(attrConfig);//;//$.clone(attrConfig); + + if (!attrs[name]) { + attrs[name] = cfg; + } else if(overrides){ + BUI.mix(true,attrs[name], cfg); + } + return _self; + }, + /** + * \u6dfb\u52a0\u5c5e\u6027\u5b9a\u4e49 + * @protected + * @param {Object} attrConfigs An object with attribute name/configuration pairs. + * @param {Object} initialValues user defined initial values + * @param {Boolean} overrides \u662f\u5426\u8986\u76d6\u5b57\u6bb5 + */ + addAttrs: function (attrConfigs, initialValues,overrides) { + var _self = this; + if(!attrConfigs) + { + return _self; + } + if(typeof(initialValues) === 'boolean'){ + overrides = initialValues; + initialValues = null; + } + BUI.each(attrConfigs, function (attrConfig, name) { + _self.addAttr(name, attrConfig,overrides); + }); + if (initialValues) { + _self.set(initialValues); + } + return _self; + }, + /** + * \u662f\u5426\u5305\u542b\u6b64\u5c5e\u6027 + * @protected + * @param {String} name \u503c + * @return {Boolean} \u662f\u5426\u5305\u542b + */ + hasAttr : function(name){ + return name && this.getAttrs().hasOwnProperty(name); + }, + /** + * \u83b7\u53d6\u9ed8\u8ba4\u7684\u5c5e\u6027\u503c + * @protected + * @return {Object} \u5c5e\u6027\u503c\u7684\u952e\u503c\u5bf9 + */ + getAttrs : function(){ + return ensureNonEmpty(this, '__attrs', true); + }, + /** + * \u83b7\u53d6\u5c5e\u6027\u540d/\u5c5e\u6027\u503c\u952e\u503c\u5bf9 + * @protected + * @return {Object} \u5c5e\u6027\u5bf9\u8c61 + */ + getAttrVals: function(){ + return ensureNonEmpty(this, '__attrVals', true); + }, + /** + * \u83b7\u53d6\u5c5e\u6027\u503c\uff0c\u6240\u6709\u7684\u914d\u7f6e\u9879\u548c\u5c5e\u6027\u90fd\u53ef\u4ee5\u901a\u8fc7get\u65b9\u6cd5\u83b7\u53d6 + *
          
          +     *  var control = new Control({
          +     *   text : 'control text'
          +     *  });
          +     *  control.get('text'); //control text
          +     *
          +     *  control.set('customValue','value'); //\u4e34\u65f6\u53d8\u91cf
          +     *  control.get('customValue'); //value
          +     * 
          + * ** \u5c5e\u6027\u503c/\u914d\u7f6e\u9879 ** + *
           
          +     *   Control.ATTRS = { //\u58f0\u660e\u5c5e\u6027\u503c
          +     *     text : {
          +     *       valueFn : function(){},
          +     *       value : 'value',
          +     *       getter : function(v){} 
          +     *     }
          +     *   };
          +     *   var c = new Control({
          +     *     text : 'text value'
          +     *   });
          +     *   //get \u51fd\u6570\u53d6\u7684\u987a\u5e8f\u4e3a\uff1a\u662f\u5426\u6709\u4fee\u6539\u503c\uff08\u914d\u7f6e\u9879\u3001set)\u3001\u9ed8\u8ba4\u503c\uff08\u7b2c\u4e00\u6b21\u8c03\u7528\u6267\u884cvalueFn)\uff0c\u5982\u679c\u6709getter\uff0c\u5219\u5c06\u503c\u4f20\u5165getter\u8fd4\u56de
          +     *
          +     *   c.get('text') //text value
          +     *   c.set('text','new text');//\u4fee\u6539\u503c
          +     *   c.get('text');//new text
          +     * 
          + * @param {String} name \u5c5e\u6027\u540d + * @return {Object} \u5c5e\u6027\u503c + */ + get : function(name){ + var _self = this, + declared = _self.hasAttr(name), + attrVals = _self.getAttrVals(), + attrConfig, + getter, + ret; + + attrConfig = ensureNonEmpty(_self.getAttrs(), name); + getter = attrConfig['getter']; + + // get user-set value or default value + //user-set value takes privilege + ret = name in attrVals ? + attrVals[name] : + _self._getDefAttrVal(name); + + // invoke getter for this attribute + if (getter && (getter = normalFn(_self, getter))) { + ret = getter.call(_self, ret, name); + } + + return ret; + }, + /** + * @\u6e05\u7406\u6240\u6709\u5c5e\u6027\u503c + * @protected + */ + clearAttrVals : function(){ + this.__attrVals = {}; + }, + /** + * \u79fb\u9664\u5c5e\u6027\u5b9a\u4e49 + * @protected + */ + removeAttr: function (name) { + var _self = this; + + if (_self.hasAttr(name)) { + delete _self.getAttrs()[name]; + delete _self.getAttrVals()[name]; + } + + return _self; + }, + /** + * \u8bbe\u7f6e\u5c5e\u6027\u503c\uff0c\u4f1a\u89e6\u53d1before+Name+Change,\u548c after+Name+Change\u4e8b\u4ef6 + *
          
          +     *  control.on('beforeTextChange',function(ev){
          +     *    var newVal = ev.newVal,
          +     *      attrName = ev.attrName,
          +     *      preVal = ev.prevVal;
          +     *
          +     *    //TO DO
          +     *  });
          +     *  control.set('text','new text');  //\u6b64\u65f6\u89e6\u53d1 beforeTextChange,afterTextChange
          +     *  control.set('text','modify text',{silent : true}); //\u6b64\u65f6\u4e0d\u89e6\u53d1\u4e8b\u4ef6
          +     * 
          + * @param {String|Object} name \u5c5e\u6027\u540d + * @param {Object} value \u503c + * @param {Object} opts \u914d\u7f6e\u9879 + * @param {Boolean} opts.silent \u914d\u7f6e\u5c5e\u6027\u65f6\uff0c\u662f\u5426\u4e0d\u89e6\u53d1\u4e8b\u4ef6 + */ + set : function(name,value,opts){ + var _self = this; + if ($.isPlainObject(name)) { + opts = value; + var all = Object(name), + attrs = []; + + for (name in all) { + if (all.hasOwnProperty(name)) { + setInternal(_self, name, all[name], opts); + } + } + return _self; + } + return setInternal(_self, name, value, opts); + }, + /** + * \u8bbe\u7f6e\u5c5e\u6027\uff0c\u4e0d\u89e6\u53d1\u4e8b\u4ef6 + *
          
          +     *  control.setInternal('text','text');//\u6b64\u65f6\u4e0d\u89e6\u53d1\u4e8b\u4ef6
          +     * 
          + * @param {String} name \u5c5e\u6027\u540d + * @param {Object} value \u5c5e\u6027\u503c + * @return {Boolean|undefined} \u5982\u679c\u503c\u65e0\u6548\u5219\u8fd4\u56defalse,\u5426\u5219\u8fd4\u56deundefined + */ + setInternal : function(name, value, opts){ + return this._set(name, value, opts); + }, + //\u83b7\u53d6\u5c5e\u6027\u9ed8\u8ba4\u503c + _getDefAttrVal : function(name){ + var _self = this, + attrs = _self.getAttrs(), + attrConfig = ensureNonEmpty(attrs, name), + valFn = attrConfig.valueFn, + val; + + if (valFn && (valFn = normalFn(_self, valFn))) { + val = valFn.call(_self); + if (val !== undefined) { + attrConfig.value = val; + } + delete attrConfig.valueFn; + attrs[name] = attrConfig; + } + + return attrConfig.value; + }, + //\u4ec5\u4ec5\u8bbe\u7f6e\u5c5e\u6027\u503c + _set : function(name, value, opts){ + var _self = this, + setValue, + // if host does not have meta info corresponding to (name,value) + // then register on demand in order to collect all data meta info + // \u4e00\u5b9a\u8981\u6ce8\u518c\u5c5e\u6027\u5143\u6570\u636e\uff0c\u5426\u5219\u5176\u4ed6\u6a21\u5757\u901a\u8fc7 _attrs \u4e0d\u80fd\u679a\u4e3e\u5230\u6240\u6709\u6709\u6548\u5c5e\u6027 + // \u56e0\u4e3a\u5c5e\u6027\u5728\u58f0\u660e\u6ce8\u518c\u524d\u53ef\u4ee5\u76f4\u63a5\u8bbe\u7f6e\u503c + attrConfig = ensureNonEmpty(_self.getAttrs(), name, true), + setter = attrConfig['setter']; + + // if setter has effect + if (setter && (setter = normalFn(_self, setter))) { + setValue = setter.call(_self, value, name); + } + + if (setValue === INVALID) { + return false; + } + + if (setValue !== undefined) { + value = setValue; + } + + // finally set + _self.getAttrVals()[name] = value; + }, + //\u521d\u59cb\u5316\u5c5e\u6027 + _initAttrs : function(config){ + var _self = this; + if (config) { + for (var attr in config) { + if (config.hasOwnProperty(attr)) { + // \u7528\u6237\u8bbe\u7f6e\u4f1a\u8c03\u7528 setter/validator \u7684\uff0c\u4f46\u4e0d\u4f1a\u89e6\u53d1\u5c5e\u6027\u53d8\u5316\u4e8b\u4ef6 + _self._set(attr, config[attr]); + } + + } + } + } + }); + + //BUI.Base = Base; + return Base; +});/** + * @fileOverview Component\u547d\u540d\u7a7a\u95f4\u7684\u5165\u53e3\u6587\u4ef6 + * @ignore + */ + +define('bui/component',['bui/component/manage','bui/component/uibase','bui/component/view','bui/component/controller'],function (require) { + /** + * @class BUI.Component + *

          + * + *

          + * \u63a7\u4ef6\u57fa\u7c7b\u7684\u547d\u540d\u7a7a\u95f4 + */ + var Component = {}; + + BUI.mix(Component,{ + Manager : require('bui/component/manage'), + UIBase : require('bui/component/uibase'), + View : require('bui/component/view'), + Controller : require('bui/component/controller') + }); + + function create(component, self) { + var childConstructor, xclass; + if (component && (xclass = component.xclass)) { + if (self && !component.prefixCls) { + component.prefixCls = self.get('prefixCls'); + } + childConstructor = Component.Manager.getConstructorByXClass(xclass); + if (!childConstructor) { + BUI.error('can not find class by xclass desc : ' + xclass); + } + component = new childConstructor(component); + } + return component; + } + + /** + * \u6839\u636eXclass\u521b\u5efa\u5bf9\u8c61 + * @method + * @static + * @param {Object} component \u63a7\u4ef6\u7684\u914d\u7f6e\u9879\u6216\u8005\u63a7\u4ef6 + * @param {Object} self \u7236\u7c7b\u5b9e\u4f8b + * @return {Object} \u5b9e\u4f8b\u5bf9\u8c61 + */ + Component.create = create; + + return Component; +});/** + * @fileOverview Base UI\u63a7\u4ef6\u7684\u7ba1\u7406\u7c7b + * @author yiminghe@gmail.com + * copied by dxq613@gmail.com + * @ignore + */ + + + +//\u63a7\u4ef6\u7c7b\u7684\u7ba1\u7406\u5668 +define('bui/component/manage',function(require){ + + var uis = { + // \u4e0d\u5e26\u524d\u7f00 prefixCls + /* + "menu" :{ + priority:0, + constructor:Menu + } + */ + }; + + function getConstructorByXClass(cls) { + var cs = cls.split(/\s+/), + p = -1, + t, + ui = null; + for (var i = 0; i < cs.length; i++) { + var uic = uis[cs[i]]; + if (uic && (t = uic.priority) > p) { + p = t; + ui = uic.constructor; + } + } + return ui; + } + + function getXClassByConstructor(constructor) { + for (var u in uis) { + var ui = uis[u]; + if (ui.constructor == constructor) { + return u; + } + } + return 0; + } + + function setConstructorByXClass(cls, uic) { + if (BUI.isFunction(uic)) { + uis[cls] = { + constructor:uic, + priority:0 + }; + } else { + uic.priority = uic.priority || 0; + uis[cls] = uic; + } + } + + + function getCssClassWithPrefix(cls) { + var cs = $.trim(cls).split(/\s+/); + for (var i = 0; i < cs.length; i++) { + if (cs[i]) { + cs[i] = this.get('prefixCls') + cs[i]; + } + } + return cs.join(' '); + } + + + + var componentInstances = {}; + + /** + * Manage component metadata. + * @class BUI.Component.Manager + * @singleton + */ + var Manager ={ + + __instances:componentInstances, + /** + * \u6bcf\u5b9e\u4f8b\u5316\u4e00\u4e2a\u63a7\u4ef6\uff0c\u5c31\u6ce8\u518c\u5230\u7ba1\u7406\u5668\u4e0a + * @param {String} id \u63a7\u4ef6 id + * @param {BUI.Component.Controller} component \u63a7\u4ef6\u5bf9\u8c61 + */ + addComponent:function (id, component) { + componentInstances[id] = component; + }, + /** + * \u79fb\u9664\u6ce8\u518c\u7684\u63a7\u4ef6 + * @param {String} id \u63a7\u4ef6 id + */ + removeComponent:function (id) { + delete componentInstances[id]; + }, + + /** + * \u6839\u636eId\u83b7\u53d6\u63a7\u4ef6 + * @param {String} id \u7f16\u53f7 + * @return {BUI.Component.UIBase} \u7ee7\u627f UIBase\u7684\u7c7b\u5bf9\u8c61 + */ + getComponent:function (id) { + return componentInstances[id]; + }, + + getCssClassWithPrefix:getCssClassWithPrefix, + /** + * \u901a\u8fc7\u6784\u9020\u51fd\u6570\u83b7\u53d6xclass. + * @param {Function} constructor \u63a7\u4ef6\u7684\u6784\u9020\u51fd\u6570. + * @type {Function} + * @return {String} + * @method + */ + getXClassByConstructor:getXClassByConstructor, + /** + * \u901a\u8fc7xclass\u83b7\u53d6\u63a7\u4ef6\u7684\u6784\u9020\u51fd\u6570 + * @param {String} classNames Class names separated by space. + * @type {Function} + * @return {Function} + * @method + */ + getConstructorByXClass:getConstructorByXClass, + /** + * \u5c06 xclass \u540c\u6784\u9020\u51fd\u6570\u76f8\u5173\u8054. + * @type {Function} + * @param {String} className \u63a7\u4ef6\u7684xclass\u540d\u79f0. + * @param {Function} componentConstructor \u6784\u9020\u51fd\u6570 + * @method + */ + setConstructorByXClass:setConstructorByXClass + }; + + return Manager; +});/** + * @fileOverview uibase\u7684\u5165\u53e3\u6587\u4ef6 + * @ignore + */ +;(function(){ +var BASE = 'bui/component/uibase/'; +define('bui/component/uibase',[BASE + 'base',BASE + 'align',BASE + 'autoshow',BASE + 'autohide', + BASE + 'close',BASE + 'collapseable',BASE + 'drag',BASE + 'keynav',BASE + 'list', + BASE + 'listitem',BASE + 'mask',BASE + 'position',BASE + 'selection',BASE + 'stdmod', + BASE + 'decorate',BASE + 'tpl',BASE + 'childcfg',BASE + 'bindable',BASE + 'depends'],function(r){ + + var UIBase = r(BASE + 'base'); + + BUI.mix(UIBase,{ + Align : r(BASE + 'align'), + AutoShow : r(BASE + 'autoshow'), + AutoHide : r(BASE + 'autohide'), + Close : r(BASE + 'close'), + Collapseable : r(BASE + 'collapseable'), + Drag : r(BASE + 'drag'), + KeyNav : r(BASE + 'keynav'), + List : r(BASE + 'list'), + ListItem : r(BASE + 'listitem'), + Mask : r(BASE + 'mask'), + Position : r(BASE + 'position'), + Selection : r(BASE + 'selection'), + StdMod : r(BASE + 'stdmod'), + Decorate : r(BASE + 'decorate'), + Tpl : r(BASE + 'tpl'), + ChildCfg : r(BASE + 'childcfg'), + Bindable : r(BASE + 'bindable'), + Depends : r(BASE + 'depends') + }); + + BUI.mix(UIBase,{ + CloseView : UIBase.Close.View, + CollapseableView : UIBase.Collapseable.View, + ChildList : UIBase.List.ChildList, + /*DomList : UIBase.List.DomList, + DomListView : UIBase.List.DomList.View,*/ + ListItemView : UIBase.ListItem.View, + MaskView : UIBase.Mask.View, + PositionView : UIBase.Position.View, + StdModView : UIBase.StdMod.View, + TplView : UIBase.Tpl.View + }); + return UIBase; +}); +})(); +/** + * @fileOverview UI\u63a7\u4ef6\u7684\u6d41\u7a0b\u63a7\u5236 + * @author yiminghe@gmail.com + * copied by dxq613@gmail.com + * @ignore + */ +define('bui/component/uibase/base',['bui/component/manage'],function(require){ + + var Manager = require('bui/component/manage'), + + UI_SET = '_uiSet', + ATTRS = 'ATTRS', + ucfirst = BUI.ucfirst, + noop = $.noop, + Base = require('bui/base'); + /** + * \u6a21\u62df\u591a\u7ee7\u627f + * init attr using constructors ATTRS meta info + * @ignore + */ + function initHierarchy(host, config) { + callMethodByHierarchy(host, 'initializer', 'constructor'); + } + + function callMethodByHierarchy(host, mainMethod, extMethod) { + var c = host.constructor, + extChains = [], + ext, + main, + exts, + t; + + // define + while (c) { + + // \u6536\u96c6\u6269\u5c55\u7c7b + t = []; + if (exts = c.mixins) { + for (var i = 0; i < exts.length; i++) { + ext = exts[i]; + if (ext) { + if (extMethod != 'constructor') { + //\u53ea\u8c03\u7528\u771f\u6b63\u81ea\u5df1\u6784\u9020\u5668\u539f\u578b\u7684\u5b9a\u4e49\uff0c\u7ee7\u627f\u539f\u578b\u94fe\u4e0a\u7684\u4e0d\u8981\u7ba1 + if (ext.prototype.hasOwnProperty(extMethod)) { + ext = ext.prototype[extMethod]; + } else { + ext = null; + } + } + ext && t.push(ext); + } + } + } + + // \u6536\u96c6\u4e3b\u7c7b + // \u53ea\u8c03\u7528\u771f\u6b63\u81ea\u5df1\u6784\u9020\u5668\u539f\u578b\u7684\u5b9a\u4e49\uff0c\u7ee7\u627f\u539f\u578b\u94fe\u4e0a\u7684\u4e0d\u8981\u7ba1 !important + // \u6240\u4ee5\u4e0d\u7528\u81ea\u5df1\u5728 renderUI \u4e2d\u8c03\u7528 superclass.renderUI \u4e86\uff0cUIBase \u6784\u9020\u5668\u81ea\u52a8\u641c\u5bfb + // \u4ee5\u53ca initializer \u7b49\u540c\u7406 + if (c.prototype.hasOwnProperty(mainMethod) && (main = c.prototype[mainMethod])) { + t.push(main); + } + + // \u539f\u5730 reverse + if (t.length) { + extChains.push.apply(extChains, t.reverse()); + } + + c = c.superclass && c.superclass.constructor; + } + + // \u521d\u59cb\u5316\u51fd\u6570 + // \u987a\u5e8f\uff1a\u7236\u7c7b\u7684\u6240\u6709\u6269\u5c55\u7c7b\u51fd\u6570 -> \u7236\u7c7b\u5bf9\u5e94\u51fd\u6570 -> \u5b50\u7c7b\u7684\u6240\u6709\u6269\u5c55\u51fd\u6570 -> \u5b50\u7c7b\u5bf9\u5e94\u51fd\u6570 + for (i = extChains.length - 1; i >= 0; i--) { + extChains[i] && extChains[i].call(host); + } + } + + /** + * \u9500\u6bc1\u7ec4\u4ef6\u987a\u5e8f\uff1a \u5b50\u7c7b destructor -> \u5b50\u7c7b\u6269\u5c55 destructor -> \u7236\u7c7b destructor -> \u7236\u7c7b\u6269\u5c55 destructor + * @ignore + */ + function destroyHierarchy(host) { + var c = host.constructor, + extensions, + d, + i; + + while (c) { + // \u53ea\u89e6\u53d1\u8be5\u7c7b\u771f\u6b63\u7684\u6790\u6784\u5668\uff0c\u548c\u7236\u4eb2\u6ca1\u5173\u7cfb\uff0c\u6240\u4ee5\u4e0d\u8981\u5728\u5b50\u7c7b\u6790\u6784\u5668\u4e2d\u8c03\u7528 superclass + if (c.prototype.hasOwnProperty('destructor')) { + c.prototype.destructor.apply(host); + } + + if ((extensions = c.mixins)) { + for (i = extensions.length - 1; i >= 0; i--) { + d = extensions[i] && extensions[i].prototype.__destructor; + d && d.apply(host); + } + } + + c = c.superclass && c.superclass.constructor; + } + } + + /** + * \u6784\u5efa \u63d2\u4ef6 + * @ignore + */ + function constructPlugins(plugins) { + if(!plugins){ + return; + } + BUI.each(plugins, function (plugin,i) { + if (BUI.isFunction(plugin)) { + plugins[i] = new plugin(); + } + }); + } + + /** + * \u8c03\u7528\u63d2\u4ef6\u7684\u65b9\u6cd5 + * @ignore + */ + function actionPlugins(self, plugins, action) { + if(!plugins){ + return; + } + BUI.each(plugins, function (plugin,i) { + if (plugin[action]) { + plugin[action](self); + } + }); + } + + /** + * \u6839\u636e\u5c5e\u6027\u53d8\u5316\u8bbe\u7f6e UI + * @ignore + */ + function bindUI(self) { + var attrs = self.getAttrs(), + attr, + m; + + for (attr in attrs) { + if (attrs.hasOwnProperty(attr)) { + m = UI_SET + ucfirst(attr); + if (self[m]) { + // \u81ea\u52a8\u7ed1\u5b9a\u4e8b\u4ef6\u5230\u5bf9\u5e94\u51fd\u6570 + (function (attr, m) { + self.on('after' + ucfirst(attr) + 'Change', function (ev) { + // fix! \u9632\u6b62\u5192\u6ce1\u8fc7\u6765\u7684 + if (ev.target === self) { + self[m](ev.newVal, ev); + } + }); + })(attr, m); + } + } + } + } + + /** + * \u6839\u636e\u5f53\u524d\uff08\u521d\u59cb\u5316\uff09\u72b6\u6001\u6765\u8bbe\u7f6e UI + * @ignore + */ + function syncUI(self) { + var v, + f, + attrs = self.getAttrs(); + for (var a in attrs) { + if (attrs.hasOwnProperty(a)) { + var m = UI_SET + ucfirst(a); + //\u5b58\u5728\u65b9\u6cd5\uff0c\u5e76\u4e14\u7528\u6237\u8bbe\u7f6e\u4e86\u521d\u59cb\u503c\u6216\u8005\u5b58\u5728\u9ed8\u8ba4\u503c\uff0c\u5c31\u540c\u6b65\u72b6\u6001 + if ((f = self[m]) + // \u7528\u6237\u5982\u679c\u8bbe\u7f6e\u4e86\u663e\u5f0f\u4e0d\u540c\u6b65\uff0c\u5c31\u4e0d\u540c\u6b65\uff0c\u6bd4\u5982\u4e00\u4e9b\u503c\u4ece html \u4e2d\u8bfb\u53d6\uff0c\u4e0d\u9700\u8981\u540c\u6b65\u518d\u6b21\u8bbe\u7f6e + && attrs[a].sync !== false + && (v = self.get(a)) !== undefined) { + f.call(self, v); + } + } + } + } + + /** + * \u63a7\u4ef6\u5e93\u7684\u57fa\u7c7b\uff0c\u5305\u62ec\u63a7\u4ef6\u7684\u751f\u547d\u5468\u671f,\u4e0b\u9762\u662f\u57fa\u672c\u7684\u6269\u5c55\u7c7b + *

          + * + *

          + * @class BUI.Component.UIBase + * @extends BUI.Base + * @param {Object} config \u914d\u7f6e\u9879 + */ + var UIBase = function(config){ + + var _self = this, + id; + + // \u8bfb\u53d6\u7528\u6237\u8bbe\u7f6e\u7684\u5c5e\u6027\u503c\u5e76\u8bbe\u7f6e\u5230\u81ea\u8eab + Base.apply(_self, arguments); + + //\u4fdd\u5b58\u7528\u6237\u4f20\u5165\u7684\u914d\u7f6e\u9879 + _self.setInternal('userConfig',config); + // \u6309\u7167\u7c7b\u5c42\u6b21\u6267\u884c\u521d\u59cb\u51fd\u6570\uff0c\u4e3b\u7c7b\u6267\u884c initializer \u51fd\u6570\uff0c\u6269\u5c55\u7c7b\u6267\u884c\u6784\u9020\u5668\u51fd\u6570 + initHierarchy(_self, config); + + var listener, + n, + plugins = _self.get('plugins'), + listeners = _self.get('listeners'); + + constructPlugins(plugins); + + var xclass= _self.get('xclass'); + if(xclass){ + _self.__xclass = xclass;//debug \u65b9\u4fbf + } + actionPlugins(_self, plugins, 'initializer'); + + // \u662f\u5426\u81ea\u52a8\u6e32\u67d3 + config && config.autoRender && _self.render(); + + }; + + UIBase.ATTRS = + { + + + /** + * \u7528\u6237\u4f20\u5165\u7684\u914d\u7f6e\u9879 + * @type {Object} + * @readOnly + * @protected + */ + userConfig : { + + }, + /** + * \u662f\u5426\u81ea\u52a8\u6e32\u67d3,\u5982\u679c\u4e0d\u81ea\u52a8\u6e32\u67d3\uff0c\u9700\u8981\u7528\u6237\u8c03\u7528 render()\u65b9\u6cd5 + *
          
          +     *  //\u9ed8\u8ba4\u72b6\u6001\u4e0b\u521b\u5efa\u5bf9\u8c61\uff0c\u5e76\u6ca1\u6709\u8fdb\u884crender
          +     *  var control = new Control();
          +     *  control.render(); //\u9700\u8981\u8c03\u7528render\u65b9\u6cd5
          +     *
          +     *  //\u8bbe\u7f6eautoRender\u540e\uff0c\u4e0d\u9700\u8981\u8c03\u7528render\u65b9\u6cd5
          +     *  var control = new Control({
          +     *   autoRender : true
          +     *  });
          +     * 
          + * @cfg {Boolean} autoRender + */ + /** + * \u662f\u5426\u81ea\u52a8\u6e32\u67d3,\u5982\u679c\u4e0d\u81ea\u52a8\u6e32\u67d3\uff0c\u9700\u8981\u7528\u6237\u8c03\u7528 render()\u65b9\u6cd5 + * @type {Boolean} + * @ignore + */ + autoRender : { + value : false + }, + /** + * @type {Object} + * \u4e8b\u4ef6\u5904\u7406\u51fd\u6570: + * { + * 'click':function(e){} + * } + * @ignore + */ + listeners: { + value: {} + }, + /** + * \u63d2\u4ef6\u96c6\u5408 + *
          
          +     *  var grid = new Grid({
          +     *    columns : [{},{}],
          +     *    plugins : [Grid.Plugins.RadioSelection]
          +     *  });
          +     * 
          + * @cfg {Array} plugins + */ + /** + * \u63d2\u4ef6\u96c6\u5408 + * @type {Array} + * @readOnly + */ + plugins : { + value : [] + }, + /** + * \u662f\u5426\u5df2\u7ecf\u6e32\u67d3\u5b8c\u6210 + * @type {Boolean} + * @default false + * @readOnly + */ + rendered : { + value : false + }, + /** + * \u83b7\u53d6\u63a7\u4ef6\u7684 xclass + * @readOnly + * @type {String} + * @protected + */ + xclass: { + valueFn: function () { + return Manager.getXClassByConstructor(this.constructor); + } + } + }; + + BUI.extend(UIBase,Base); + + BUI.augment(UIBase, + { + /** + * \u521b\u5efaDOM\u7ed3\u6784 + * @protected + */ + create : function(){ + var self = this; + // \u662f\u5426\u751f\u6210\u8fc7\u8282\u70b9 + if (!self.get('created')) { + /** + * @event beforeCreateDom + * fired before root node is created + * @param e + */ + self.fire('beforeCreateDom'); + callMethodByHierarchy(self, 'createDom', '__createDom'); + self._set('created', true); + /** + * @event afterCreateDom + * fired when root node is created + * @param e + */ + self.fire('afterCreateDom'); + actionPlugins(self, self.get('plugins'), 'createDom'); + } + return self; + }, + /** + * \u6e32\u67d3 + */ + render : function(){ + var _self = this; + // \u662f\u5426\u5df2\u7ecf\u6e32\u67d3\u8fc7 + if (!_self.get('rendered')) { + var plugins = _self.get('plugins'); + _self.create(undefined); + + /** + * @event beforeRenderUI + * fired when root node is ready + * @param e + */ + _self.fire('beforeRenderUI'); + callMethodByHierarchy(_self, 'renderUI', '__renderUI'); + + /** + * @event afterRenderUI + * fired after root node is rendered into dom + * @param e + */ + + _self.fire('afterRenderUI'); + actionPlugins(_self, plugins, 'renderUI'); + + /** + * @event beforeBindUI + * fired before UIBase 's internal event is bind. + * @param e + */ + + _self.fire('beforeBindUI'); + bindUI(_self); + callMethodByHierarchy(_self, 'bindUI', '__bindUI'); + + /** + * @event afterBindUI + * fired when UIBase 's internal event is bind. + * @param e + */ + + _self.fire('afterBindUI'); + actionPlugins(_self, plugins, 'bindUI'); + + /** + * @event beforeSyncUI + * fired before UIBase 's internal state is synchronized. + * @param e + */ + + _self.fire('beforeSyncUI'); + + syncUI(_self); + callMethodByHierarchy(_self, 'syncUI', '__syncUI'); + + /** + * @event afterSyncUI + * fired after UIBase 's internal state is synchronized. + * @param e + */ + + _self.fire('afterSyncUI'); + actionPlugins(_self, plugins, 'syncUI'); + _self._set('rendered', true); + } + return _self; + }, + /** + * \u5b50\u7c7b\u53ef\u7ee7\u627f\u6b64\u65b9\u6cd5\uff0c\u5f53DOM\u521b\u5efa\u65f6\u8c03\u7528 + * @protected + * @method + */ + createDom : noop, + /** + * \u5b50\u7c7b\u53ef\u7ee7\u627f\u6b64\u65b9\u6cd5\uff0c\u6e32\u67d3UI\u65f6\u8c03\u7528 + * @protected + * @method + */ + renderUI : noop, + /** + * \u5b50\u7c7b\u53ef\u7ee7\u627f\u6b64\u65b9\u6cd5,\u7ed1\u5b9a\u4e8b\u4ef6\u65f6\u8c03\u7528 + * @protected + * @method + */ + bindUI : noop, + /** + * \u540c\u6b65\u5c5e\u6027\u503c\u5230UI\u4e0a + * @protected + * @method + */ + syncUI : noop, + + /** + * \u6790\u6784\u51fd\u6570 + */ + destroy: function () { + var _self = this; + /** + * @event beforeDestroy + * fired before UIBase 's destroy. + * @param e + */ + _self.fire('beforeDestroy'); + + actionPlugins(_self, _self.get('plugins'), 'destructor'); + destroyHierarchy(_self); + /** + * @event afterDestroy + * fired before UIBase 's destroy. + * @param e + */ + _self.fire('afterDestroy'); + _self.off(); + _self.clearAttrVals(); + _self.destroyed = true; + return _self; + } + }); + + BUI.mix(UIBase, + { + /** + * \u5b9a\u4e49\u4e00\u4e2a\u7c7b + * @static + * @param {Function} base \u57fa\u7c7b\u6784\u9020\u51fd\u6570 + * @param {Array} extensions \u6269\u5c55 + * @param {Object} px \u539f\u578b\u94fe\u4e0a\u7684\u6269\u5c55 + * @param {Object} sx + * @return {Function} \u7ee7\u627f\u4e0e\u57fa\u7c7b\u7684\u6784\u9020\u51fd\u6570 + */ + define : function(base, extensions, px, sx){ + if ($.isPlainObject(extensions)) { + sx = px; + px = extensions; + extensions = []; + } + + function C() { + UIBase.apply(this, arguments); + } + + BUI.extend(C, base, px, sx); + BUI.mixin(C,extensions); + + return C; + }, + /** + * \u6269\u5c55\u4e00\u4e2a\u7c7b\uff0c\u57fa\u7c7b\u5c31\u662f\u7c7b\u672c\u8eab + * @static + * @param {Array} extensions \u6269\u5c55 + * @param {Object} px \u539f\u578b\u94fe\u4e0a\u7684\u6269\u5c55 + * @param {Object} sx + * @return {Function} \u7ee7\u627f\u4e0e\u57fa\u7c7b\u7684\u6784\u9020\u51fd\u6570 + */ + extend: function extend(extensions, px, sx) { + var args = $.makeArray(arguments), + ret, + last = args[args.length - 1]; + args.unshift(this); + if (last.xclass) { + args.pop(); + args.push(last.xclass); + } + ret = UIBase.define.apply(UIBase, args); + if (last.xclass) { + var priority = last.priority || (this.priority ? (this.priority + 1) : 1); + + Manager.setConstructorByXClass(last.xclass, { + constructor: ret, + priority: priority + }); + //\u65b9\u4fbf\u8c03\u8bd5 + ret.__xclass = last.xclass; + ret.priority = priority; + ret.toString = function(){ + return last.xclass; + } + } + ret.extend = extend; + return ret; + } + }); + + return UIBase; +}); +/** + * @fileOverview \u8ddf\u6307\u5b9a\u7684\u5143\u7d20\u9879\u5bf9\u9f50\u7684\u65b9\u5f0f + * @author yiminghe@gmail.com + * copied by dxq613@gmail.com + * @ignore + */ + + +define('bui/component/uibase/align',['bui/ua'],function (require) { + var UA = require('bui/ua'), + CLS_ALIGN_PREFIX ='x-align-', + win = window; + + // var ieMode = document.documentMode || UA.ie; + + /* + inspired by closure library by Google + see http://yiminghe.iteye.com/blog/1124720 + */ + + /** + * \u5f97\u5230\u4f1a\u5bfc\u81f4\u5143\u7d20\u663e\u793a\u4e0d\u5168\u7684\u7956\u5148\u5143\u7d20 + * @ignore + */ + function getOffsetParent(element) { + // ie \u8fd9\u4e2a\u4e5f\u4e0d\u662f\u5b8c\u5168\u53ef\u884c + /** +
          +
          + \u5143\u7d20 6 \u9ad8 100px \u5bbd 50px
          +
          +
          + @ignore + **/ + // element.offsetParent does the right thing in ie7 and below. Return parent with layout! + // In other browsers it only includes elements with position absolute, relative or + // fixed, not elements with overflow set to auto or scroll. + // if (UA.ie && ieMode < 8) { + // return element.offsetParent; + // } + // \u7edf\u4e00\u7684 offsetParent \u65b9\u6cd5 + var doc = element.ownerDocument, + body = doc.body, + parent, + positionStyle = $(element).css('position'), + skipStatic = positionStyle == 'fixed' || positionStyle == 'absolute'; + + if (!skipStatic) { + return element.nodeName.toLowerCase() == 'html' ? null : element.parentNode; + } + + for (parent = element.parentNode; parent && parent != body; parent = parent.parentNode) { + positionStyle = $(parent).css('position'); + if (positionStyle != 'static') { + return parent; + } + } + return null; + } + + /** + * \u83b7\u5f97\u5143\u7d20\u7684\u663e\u793a\u90e8\u5206\u7684\u533a\u57df + * @private + * @ignore + */ + function getVisibleRectForElement(element) { + var visibleRect = { + left:0, + right:Infinity, + top:0, + bottom:Infinity + }, + el, + scrollX, + scrollY, + winSize, + doc = element.ownerDocument, + body = doc.body, + documentElement = doc.documentElement; + + // Determine the size of the visible rect by climbing the dom accounting for + // all scrollable containers. + for (el = element; el = getOffsetParent(el);) { + // clientWidth is zero for inline block elements in ie. + if ((!UA.ie || el.clientWidth != 0) && + // body may have overflow set on it, yet we still get the entire + // viewport. In some browsers, el.offsetParent may be + // document.documentElement, so check for that too. + (el != body && el != documentElement && $(el).css('overflow') != 'visible')) { + var pos = $(el).offset(); + // add border + pos.left += el.clientLeft; + pos.top += el.clientTop; + + visibleRect.top = Math.max(visibleRect.top, pos.top); + visibleRect.right = Math.min(visibleRect.right, + // consider area without scrollBar + pos.left + el.clientWidth); + visibleRect.bottom = Math.min(visibleRect.bottom, + pos.top + el.clientHeight); + visibleRect.left = Math.max(visibleRect.left, pos.left); + } + } + + // Clip by window's viewport. + scrollX = $(win).scrollLeft(); + scrollY = $(win).scrollTop(); + visibleRect.left = Math.max(visibleRect.left, scrollX); + visibleRect.top = Math.max(visibleRect.top, scrollY); + winSize = { + width:BUI.viewportWidth(), + height:BUI.viewportHeight() + }; + visibleRect.right = Math.min(visibleRect.right, scrollX + winSize.width); + visibleRect.bottom = Math.min(visibleRect.bottom, scrollY + winSize.height); + return visibleRect.top >= 0 && visibleRect.left >= 0 && + visibleRect.bottom > visibleRect.top && + visibleRect.right > visibleRect.left ? + visibleRect : null; + } + + function getElFuturePos(elRegion, refNodeRegion, points, offset) { + var xy, + diff, + p1, + p2; + + xy = { + left:elRegion.left, + top:elRegion.top + }; + + p1 = getAlignOffset(refNodeRegion, points[0]); + p2 = getAlignOffset(elRegion, points[1]); + + diff = [p2.left - p1.left, p2.top - p1.top]; + + return { + left:xy.left - diff[0] + (+offset[0]), + top:xy.top - diff[1] + (+offset[1]) + }; + } + + function isFailX(elFuturePos, elRegion, visibleRect) { + return elFuturePos.left < visibleRect.left || + elFuturePos.left + elRegion.width > visibleRect.right; + } + + function isFailY(elFuturePos, elRegion, visibleRect) { + return elFuturePos.top < visibleRect.top || + elFuturePos.top + elRegion.height > visibleRect.bottom; + } + + function adjustForViewport(elFuturePos, elRegion, visibleRect, overflow) { + var pos = BUI.cloneObject(elFuturePos), + size = { + width:elRegion.width, + height:elRegion.height + }; + + if (overflow.adjustX && pos.left < visibleRect.left) { + pos.left = visibleRect.left; + } + + // Left edge inside and right edge outside viewport, try to resize it. + if (overflow['resizeWidth'] && + pos.left >= visibleRect.left && + pos.left + size.width > visibleRect.right) { + size.width -= (pos.left + size.width) - visibleRect.right; + } + + // Right edge outside viewport, try to move it. + if (overflow.adjustX && pos.left + size.width > visibleRect.right) { + // \u4fdd\u8bc1\u5de6\u8fb9\u754c\u548c\u53ef\u89c6\u533a\u57df\u5de6\u8fb9\u754c\u5bf9\u9f50 + pos.left = Math.max(visibleRect.right - size.width, visibleRect.left); + } + + // Top edge outside viewport, try to move it. + if (overflow.adjustY && pos.top < visibleRect.top) { + pos.top = visibleRect.top; + } + + // Top edge inside and bottom edge outside viewport, try to resize it. + if (overflow['resizeHeight'] && + pos.top >= visibleRect.top && + pos.top + size.height > visibleRect.bottom) { + size.height -= (pos.top + size.height) - visibleRect.bottom; + } + + // Bottom edge outside viewport, try to move it. + if (overflow.adjustY && pos.top + size.height > visibleRect.bottom) { + // \u4fdd\u8bc1\u4e0a\u8fb9\u754c\u548c\u53ef\u89c6\u533a\u57df\u4e0a\u8fb9\u754c\u5bf9\u9f50 + pos.top = Math.max(visibleRect.bottom - size.height, visibleRect.top); + } + + return BUI.mix(pos, size); + } + + + function flip(points, reg, map) { + var ret = []; + $.each(points, function (index,p) { + ret.push(p.replace(reg, function (m) { + return map[m]; + })); + }); + return ret; + } + + function flipOffset(offset, index) { + offset[index] = -offset[index]; + return offset; + } + + + /** + * @class BUI.Component.UIBase.Align + * Align extension class. + * Align component with specified element. + * + */ + function Align() { + } + + + Align.__getOffsetParent = getOffsetParent; + + Align.__getVisibleRectForElement = getVisibleRectForElement; + + Align.ATTRS = + { + /** + * \u5bf9\u9f50\u914d\u7f6e\uff0c\u8be6\u7ec6\u8bf4\u660e\u8bf7\u53c2\u770b\uff1a JS\u63a7\u4ef6 \u5bf9\u9f50 + * @cfg {Object} align + *
          
          +         *  var overlay = new Overlay( {  
          +         *       align :{
          +         *         node: null,         // \u53c2\u8003\u5143\u7d20, falsy \u6216 window \u4e3a\u53ef\u89c6\u533a\u57df, 'trigger' \u4e3a\u89e6\u53d1\u5143\u7d20, \u5176\u4ed6\u4e3a\u6307\u5b9a\u5143\u7d20
          +         *         points: ['cc','cc'], // ['tr', 'tl'] \u8868\u793a overlay \u7684 tl \u4e0e\u53c2\u8003\u8282\u70b9\u7684 tr \u5bf9\u9f50
          +         *         offset: [0, 0]      // \u6709\u6548\u503c\u4e3a [n, m]
          +         *       }
          +         *     }); 
          +         * 
          + */ + + /** + * \u8bbe\u7f6e\u5bf9\u9f50\u5c5e\u6027 + * @type {Object} + * @field + * + * var align = { + * node: null, // \u53c2\u8003\u5143\u7d20, falsy \u6216 window \u4e3a\u53ef\u89c6\u533a\u57df, 'trigger' \u4e3a\u89e6\u53d1\u5143\u7d20, \u5176\u4ed6\u4e3a\u6307\u5b9a\u5143\u7d20 + * points: ['cc','cc'], // ['tr', 'tl'] \u8868\u793a overlay \u7684 tl \u4e0e\u53c2\u8003\u8282\u70b9\u7684 tr \u5bf9\u9f50 + * offset: [0, 0] // \u6709\u6548\u503c\u4e3a [n, m] + * }; + * overlay.set('align',align); + * + */ + align:{ + value:{} + } + }; + + function getRegion(node) { + var offset, w, h; + if (node.length && !$.isWindow(node[0])) { + offset = node.offset(); + w = node.outerWidth(); + h = node.outerHeight(); + } else { + offset = { left:BUI.scrollLeft(), top:BUI.scrollTop() }; + w = BUI.viewportWidth(); + h = BUI.viewportHeight(); + } + offset.width = w; + offset.height = h; + return offset; + } + + /** + * \u83b7\u53d6 node \u4e0a\u7684 align \u5bf9\u9f50\u70b9 \u76f8\u5bf9\u4e8e\u9875\u9762\u7684\u5750\u6807 + * @param region + * @param align + */ + function getAlignOffset(region, align) { + var V = align.charAt(0), + H = align.charAt(1), + w = region.width, + h = region.height, + x, y; + + x = region.left; + y = region.top; + + if (V === 'c') { + y += h / 2; + } else if (V === 'b') { + y += h; + } + + if (H === 'c') { + x += w / 2; + } else if (H === 'r') { + x += w; + } + + return { left:x, top:y }; + } + + //\u6e05\u9664\u5bf9\u9f50\u7684css\u6837\u5f0f + function clearAlignCls(el){ + var cls = el.attr('class'), + regex = new RegExp('\s?'+CLS_ALIGN_PREFIX+'[a-z]{2}-[a-z]{2}','ig'), + arr = regex.exec(cls); + if(arr){ + el.removeClass(arr.join(' ')); + } + } + + Align.prototype = + { + _uiSetAlign:function (v,ev) { + var alignCls = '', + el, + selfAlign; //points \u7684\u7b2c\u4e8c\u4e2a\u53c2\u6570\uff0c\u662f\u81ea\u5df1\u5bf9\u9f50\u4e8e\u5176\u4ed6\u8282\u70b9\u7684\u7684\u65b9\u5f0f + if (v && v.points) { + this.align(v.node, v.points, v.offset, v.overflow); + this.set('cachePosition',null); + el = this.get('el'); + clearAlignCls(el); + selfAlign = v.points.join('-'); + alignCls = CLS_ALIGN_PREFIX + selfAlign; + el.addClass(alignCls); + /**/ + } + }, + + /* + \u5bf9\u9f50 Overlay \u5230 node \u7684 points \u70b9, \u504f\u79fb offset \u5904 + @method + @ignore + @param {Element} node \u53c2\u7167\u5143\u7d20, \u53ef\u53d6\u914d\u7f6e\u9009\u9879\u4e2d\u7684\u8bbe\u7f6e, \u4e5f\u53ef\u662f\u4e00\u5143\u7d20 + @param {String[]} points \u5bf9\u9f50\u65b9\u5f0f + @param {Number[]} [offset] \u504f\u79fb + */ + align:function (refNode, points, offset, overflow) { + refNode = $(refNode || win); + offset = offset && [].concat(offset) || [0, 0]; + overflow = overflow || {}; + + var self = this, + el = self.get('el'), + fail = 0, + // \u5f53\u524d\u8282\u70b9\u53ef\u4ee5\u88ab\u653e\u7f6e\u7684\u663e\u793a\u533a\u57df + visibleRect = getVisibleRectForElement(el[0]), + // \u5f53\u524d\u8282\u70b9\u6240\u5360\u7684\u533a\u57df, left/top/width/height + elRegion = getRegion(el), + // \u53c2\u7167\u8282\u70b9\u6240\u5360\u7684\u533a\u57df, left/top/width/height + refNodeRegion = getRegion(refNode), + // \u5f53\u524d\u8282\u70b9\u5c06\u8981\u88ab\u653e\u7f6e\u7684\u4f4d\u7f6e + elFuturePos = getElFuturePos(elRegion, refNodeRegion, points, offset), + // \u5f53\u524d\u8282\u70b9\u5c06\u8981\u6240\u5904\u7684\u533a\u57df + newElRegion = BUI.merge(elRegion, elFuturePos); + + // \u5982\u679c\u53ef\u89c6\u533a\u57df\u4e0d\u80fd\u5b8c\u5168\u653e\u7f6e\u5f53\u524d\u8282\u70b9\u65f6\u5141\u8bb8\u8c03\u6574 + if (visibleRect && (overflow.adjustX || overflow.adjustY)) { + + // \u5982\u679c\u6a2a\u5411\u4e0d\u80fd\u653e\u4e0b + if (isFailX(elFuturePos, elRegion, visibleRect)) { + fail = 1; + // \u5bf9\u9f50\u4f4d\u7f6e\u53cd\u4e0b + points = flip(points, /[lr]/ig, { + l:'r', + r:'l' + }); + // \u504f\u79fb\u91cf\u4e5f\u53cd\u4e0b + offset = flipOffset(offset, 0); + } + + // \u5982\u679c\u7eb5\u5411\u4e0d\u80fd\u653e\u4e0b + if (isFailY(elFuturePos, elRegion, visibleRect)) { + fail = 1; + // \u5bf9\u9f50\u4f4d\u7f6e\u53cd\u4e0b + points = flip(points, /[tb]/ig, { + t:'b', + b:'t' + }); + // \u504f\u79fb\u91cf\u4e5f\u53cd\u4e0b + offset = flipOffset(offset, 1); + } + + // \u5982\u679c\u5931\u8d25\uff0c\u91cd\u65b0\u8ba1\u7b97\u5f53\u524d\u8282\u70b9\u5c06\u8981\u88ab\u653e\u7f6e\u7684\u4f4d\u7f6e + if (fail) { + elFuturePos = getElFuturePos(elRegion, refNodeRegion, points, offset); + BUI.mix(newElRegion, elFuturePos); + } + + var newOverflowCfg = {}; + + // \u68c0\u67e5\u53cd\u4e0b\u540e\u7684\u4f4d\u7f6e\u662f\u5426\u53ef\u4ee5\u653e\u4e0b\u4e86 + // \u5982\u679c\u4ecd\u7136\u653e\u4e0d\u4e0b\u53ea\u6709\u6307\u5b9a\u4e86\u53ef\u4ee5\u8c03\u6574\u5f53\u524d\u65b9\u5411\u624d\u8c03\u6574 + newOverflowCfg.adjustX = overflow.adjustX && + isFailX(elFuturePos, elRegion, visibleRect); + + newOverflowCfg.adjustY = overflow.adjustY && + isFailY(elFuturePos, elRegion, visibleRect); + + // \u786e\u5b9e\u8981\u8c03\u6574\uff0c\u751a\u81f3\u53ef\u80fd\u4f1a\u8c03\u6574\u9ad8\u5ea6\u5bbd\u5ea6 + if (newOverflowCfg.adjustX || newOverflowCfg.adjustY) { + newElRegion = adjustForViewport(elFuturePos, elRegion, + visibleRect, newOverflowCfg); + } + } + + // \u65b0\u533a\u57df\u4f4d\u7f6e\u53d1\u751f\u4e86\u53d8\u5316 + if (newElRegion.left != elRegion.left) { + self.setInternal('x', null); + self.get('view').setInternal('x', null); + self.set('x', newElRegion.left); + } + + if (newElRegion.top != elRegion.top) { + // https://github.com/kissyteam/kissy/issues/190 + // \u76f8\u5bf9\u4e8e\u5c4f\u5e55\u4f4d\u7f6e\u6ca1\u53d8\uff0c\u800c left/top \u53d8\u4e86 + // \u4f8b\u5982
          + // el.align(div) + self.setInternal('y', null); + self.get('view').setInternal('y', null); + self.set('y', newElRegion.top); + } + + // \u65b0\u533a\u57df\u9ad8\u5bbd\u53d1\u751f\u4e86\u53d8\u5316 + if (newElRegion.width != elRegion.width) { + el.width(el.width() + newElRegion.width - elRegion.width); + } + if (newElRegion.height != elRegion.height) { + el.height(el.height() + newElRegion.height - elRegion.height); + } + + return self; + }, + + /** + * \u5bf9\u9f50\u5230\u5143\u7d20\u7684\u4e2d\u95f4\uff0c\u67e5\u770b\u5c5e\u6027 {@link BUI.Component.UIBase.Align#property-align} . + *
          
          +         *  control.center('#t1'); //\u63a7\u4ef6\u5904\u4e8e\u5bb9\u5668#t1\u7684\u4e2d\u95f4\u4f4d\u7f6e
          +         * 
          + * @param {undefined|String|HTMLElement|jQuery} node + * + */ + center:function (node) { + var self = this; + self.set('align', { + node:node, + points:['cc', 'cc'], + offset:[0, 0] + }); + return self; + } + }; + + return Align; +});/** + * @fileOverview click\uff0cfocus,hover\u7b49\u5f15\u8d77\u63a7\u4ef6\u663e\u793a\uff0c\u5e76\u4e14\u5b9a\u4f4d + * @ignore + */ + +define('bui/component/uibase/autoshow',function () { + + /** + * \u5904\u7406\u81ea\u52a8\u663e\u793a\u63a7\u4ef6\u7684\u6269\u5c55\uff0c\u4e00\u822c\u7528\u4e8e\u663e\u793amenu,picker,tip\u7b49 + * @class BUI.Component.UIBase.AutoShow + */ + function autoShow() { + + } + + autoShow.ATTRS = { + + /** + * \u89e6\u53d1\u663e\u793a\u63a7\u4ef6\u7684DOM\u9009\u62e9\u5668 + *
          
          +     *  var overlay = new Overlay({ //\u70b9\u51fb#t1\u65f6\u663e\u793a\uff0c\u70b9\u51fb#t1,overlay\u4e4b\u5916\u7684\u5143\u7d20\u9690\u85cf
          +     *    trigger : '#t1',
          +     *    autoHide : true,
          +     *    content : '\u60ac\u6d6e\u5185\u5bb9'
          +     *  });
          +     *  overlay.render();
          +     * 
          + * @cfg {HTMLElement|String|jQuery} trigger + */ + /** + * \u89e6\u53d1\u663e\u793a\u63a7\u4ef6\u7684DOM\u9009\u62e9\u5668 + * @type {HTMLElement|String|jQuery} + */ + trigger : { + + }, + /** + * \u662f\u5426\u4f7f\u7528\u4ee3\u7406\u7684\u65b9\u5f0f\u89e6\u53d1\u663e\u793a\u63a7\u4ef6,\u5982\u679ctigger\u4e0d\u662f\u5b57\u7b26\u4e32\uff0c\u6b64\u5c5e\u6027\u65e0\u6548 + *
          
          +     *  var overlay = new Overlay({ //\u70b9\u51fb.t1(\u65e0\u8bba\u521b\u5efa\u63a7\u4ef6\u65f6.t1\u662f\u5426\u5b58\u5728)\u65f6\u663e\u793a\uff0c\u70b9\u51fb.t1,overlay\u4e4b\u5916\u7684\u5143\u7d20\u9690\u85cf
          +     *    trigger : '.t1',
          +     *    autoHide : true,
          +     *    delegateTigger : true, //\u4f7f\u7528\u59d4\u6258\u7684\u65b9\u5f0f\u89e6\u53d1\u663e\u793a\u63a7\u4ef6
          +     *    content : '\u60ac\u6d6e\u5185\u5bb9'
          +     *  });
          +     *  overlay.render();
          +     * 
          + * @cfg {Boolean} [delegateTigger = false] + */ + /** + * \u662f\u5426\u4f7f\u7528\u4ee3\u7406\u7684\u65b9\u5f0f\u89e6\u53d1\u663e\u793a\u63a7\u4ef6,\u5982\u679ctigger\u4e0d\u662f\u5b57\u7b26\u4e32\uff0c\u6b64\u5c5e\u6027\u65e0\u6548 + * @type {Boolean} + * @ignore + */ + delegateTigger : { + value : false + }, + /** + * \u9009\u62e9\u5668\u662f\u5426\u59cb\u7ec8\u8ddf\u968f\u89e6\u53d1\u5668\u5bf9\u9f50 + * @cfg {Boolean} autoAlign + * @ignore + */ + /** + * \u9009\u62e9\u5668\u662f\u5426\u59cb\u7ec8\u8ddf\u968f\u89e6\u53d1\u5668\u5bf9\u9f50 + * @type {Boolean} + * @protected + */ + autoAlign :{ + value : true + }, + /** + * \u63a7\u4ef6\u663e\u793a\u65f6\u7531\u6b64trigger\u89e6\u53d1\uff0c\u5f53\u914d\u7f6e\u9879 trigger \u9009\u62e9\u5668\u4ee3\u8868\u591a\u4e2aDOM \u5bf9\u8c61\u65f6\uff0c + * \u63a7\u4ef6\u53ef\u7531\u591a\u4e2aDOM\u5bf9\u8c61\u89e6\u53d1\u663e\u793a\u3002 + *
          
          +     *  overlay.on('show',function(){
          +     *    var curTrigger = overlay.get('curTrigger');
          +     *    //TO DO
          +     *  });
          +     * 
          + * @type {jQuery} + * @readOnly + */ + curTrigger : { + + }, + /** + * \u89e6\u53d1\u663e\u793a\u65f6\u7684\u56de\u8c03\u51fd\u6570 + * @cfg {Function} triggerCallback + * @ignore + */ + /** + * \u89e6\u53d1\u663e\u793a\u65f6\u7684\u56de\u8c03\u51fd\u6570 + * @type {Function} + * @ignore + */ + triggerCallback : { + value : function (ev) { + + } + }, + /** + * \u663e\u793a\u83dc\u5355\u7684\u4e8b\u4ef6 + *
          
          +     *    var overlay = new Overlay({ //\u79fb\u52a8\u5230#t1\u65f6\u663e\u793a\uff0c\u79fb\u52a8\u51fa#t1,overlay\u4e4b\u5916\u63a7\u4ef6\u9690\u85cf
          +     *      trigger : '#t1',
          +     *      autoHide : true,
          +     *      triggerEvent :'mouseover',
          +     *      autoHideType : 'leave',
          +     *      content : '\u60ac\u6d6e\u5185\u5bb9'
          +     *    });
          +     *    overlay.render();
          +     * 
          +     *  
          + * @cfg {String} [triggerEvent='click'] + * @default 'click' + */ + /** + * \u663e\u793a\u83dc\u5355\u7684\u4e8b\u4ef6 + * @type {String} + * @default 'click' + * @ignore + */ + triggerEvent : { + value:'click' + }, + /** + * \u56e0\u4e3a\u89e6\u53d1\u5143\u7d20\u53d1\u751f\u6539\u53d8\u800c\u5bfc\u81f4\u63a7\u4ef6\u9690\u85cf + * @cfg {String} triggerHideEvent + * @ignore + */ + /** + * \u56e0\u4e3a\u89e6\u53d1\u5143\u7d20\u53d1\u751f\u6539\u53d8\u800c\u5bfc\u81f4\u63a7\u4ef6\u9690\u85cf + * @type {String} + * @ignore + */ + triggerHideEvent : { + + }, + events : { + value : { + /** + * \u5f53\u89e6\u53d1\u5668\uff08\u89e6\u53d1\u9009\u62e9\u5668\u51fa\u73b0\uff09\u53d1\u751f\u6539\u53d8\u65f6\uff0c\u7ecf\u5e38\u7528\u4e8e\u4e00\u4e2a\u9009\u62e9\u5668\u5bf9\u5e94\u591a\u4e2a\u89e6\u53d1\u5668\u7684\u60c5\u51b5 + *
          
          +         *  overlay.on('triggerchange',function(ev){
          +         *    var curTrigger = ev.curTrigger;
          +         *    overlay.set('content',curTrigger.html());
          +         *  });
          +         * 
          + * @event + * @param {Object} e \u4e8b\u4ef6\u5bf9\u8c61 + * @param {jQuery} e.prevTrigger \u4e4b\u524d\u89e6\u53d1\u5668\uff0c\u53ef\u80fd\u4e3anull + * @param {jQuery} e.curTrigger \u5f53\u524d\u7684\u89e6\u53d1\u5668 + */ + 'triggerchange':false + } + } + }; + + autoShow.prototype = { + + __createDom : function () { + this._setTrigger(); + }, + _setTrigger : function () { + var _self = this, + triggerEvent = _self.get('triggerEvent'), + triggerHideEvent = _self.get('triggerHideEvent'), + triggerCallback = _self.get('triggerCallback'), + trigger = _self.get('trigger'), + isDelegate = _self.get('delegateTigger'), + triggerEl = $(trigger); + + //\u89e6\u53d1\u663e\u793a + function tiggerShow (ev) { + var prevTrigger = _self.get('curTrigger'), + curTrigger = isDelegate ?$(ev.currentTarget) : $(this), + align = _self.get('align'); + if(!prevTrigger || prevTrigger[0] != curTrigger[0]){ + + _self.set('curTrigger',curTrigger); + _self.fire('triggerchange',{prevTrigger : prevTrigger,curTrigger : curTrigger}); + } + if(_self.get('autoAlign')){ + align.node = curTrigger; + + } + _self.set('align',align); + _self.show(); + triggerCallback && triggerCallback(ev); + } + + //\u89e6\u53d1\u9690\u85cf + function tiggerHide (ev){ + var toElement = ev.toElement || ev.relatedTarget; + if(!toElement || !_self.containsElement(toElement)){ //mouseleave\u65f6\uff0c\u5982\u679c\u79fb\u52a8\u5230\u5f53\u524d\u63a7\u4ef6\u4e0a\uff0c\u53d6\u6d88\u6d88\u5931 + _self.hide(); + } + } + + if(triggerEvent){ + if(isDelegate && BUI.isString(trigger)){ + $(document).delegate(trigger,triggerEvent,tiggerShow); + }else{ + triggerEl.on(triggerEvent,tiggerShow); + } + + } + + if(triggerHideEvent){ + if(isDelegate && BUI.isString(trigger)){ + $(document).delegate(trigger,triggerHideEvent,tiggerHide); + }else{ + triggerEl.on(triggerHideEvent,tiggerHide); + } + } + }, + __renderUI : function () { + var _self = this, + align = _self.get('align'); + //\u5982\u679c\u63a7\u4ef6\u663e\u793a\u65f6\u4e0d\u662f\u7531trigger\u89e6\u53d1\uff0c\u5219\u540c\u7236\u5143\u7d20\u5bf9\u9f50 + if(align && !align.node){ + align.node = _self.get('render') || _self.get('trigger'); + } + } + }; + + return autoShow; +});/** + * @fileOverview \u70b9\u51fb\u6216\u79fb\u51fa\u63a7\u4ef6\u5916\u90e8\uff0c\u63a7\u4ef6\u9690\u85cf + * @author dxq613@gmail.com + * @ignore + */ +define('bui/component/uibase/autohide',function () { + + var wrapBehavior = BUI.wrapBehavior, + getWrapBehavior = BUI.getWrapBehavior; + + function isExcept(self,elem){ + var hideExceptNode = self.get('hideExceptNode'); + if(hideExceptNode && hideExceptNode.length){ + return $.contains(hideExceptNode[0],elem); + } + return false; + } + /** + * \u70b9\u51fb\u9690\u85cf\u63a7\u4ef6\u7684\u6269\u5c55 + * @class BUI.Component.UIBase.AutoHide + */ + function autoHide() { + + } + + autoHide.ATTRS = { + + /** + * \u63a7\u4ef6\u81ea\u52a8\u9690\u85cf\u7684\u4e8b\u4ef6\uff0c\u8fd9\u91cc\u652f\u63012\u79cd\uff1a + * - 'click' + * - 'leave' + *
          
          +     *    var overlay = new Overlay({ //\u70b9\u51fb#t1\u65f6\u663e\u793a\uff0c\u70b9\u51fb#t1\u4e4b\u5916\u7684\u5143\u7d20\u9690\u85cf
          +     *      trigger : '#t1',
          +     *      autoHide : true,
          +     *      content : '\u60ac\u6d6e\u5185\u5bb9'
          +     *    });
          +     *    overlay.render();
          +     *
          +     *    var overlay = new Overlay({ //\u79fb\u52a8\u5230#t1\u65f6\u663e\u793a\uff0c\u79fb\u52a8\u51fa#t1,overlay\u4e4b\u5916\u63a7\u4ef6\u9690\u85cf
          +     *      trigger : '#t1',
          +     *      autoHide : true,
          +     *      triggerEvent :'mouseover',
          +     *      autoHideType : 'leave',
          +     *      content : '\u60ac\u6d6e\u5185\u5bb9'
          +     *    });
          +     *    overlay.render();
          +     * 
          +     *  
          + * @cfg {String} [autoHideType = 'click'] + */ + /** + * \u63a7\u4ef6\u81ea\u52a8\u9690\u85cf\u7684\u4e8b\u4ef6\uff0c\u8fd9\u91cc\u652f\u63012\u79cd\uff1a + * 'click',\u548c'leave',\u9ed8\u8ba4\u4e3a'click' + * @type {String} + */ + autoHideType : { + value : 'click' + }, + /** + * \u662f\u5426\u81ea\u52a8\u9690\u85cf + *
          
          +     *  
          +     *  var overlay = new Overlay({ //\u70b9\u51fb#t1\u65f6\u663e\u793a\uff0c\u70b9\u51fb#t1,overlay\u4e4b\u5916\u7684\u5143\u7d20\u9690\u85cf
          +     *    trigger : '#t1',
          +     *    autoHide : true,
          +     *    content : '\u60ac\u6d6e\u5185\u5bb9'
          +     *  });
          +     *  overlay.render();
          +     * 
          + * @cfg {Object} autoHide + */ + /** + * \u662f\u5426\u81ea\u52a8\u9690\u85cf + * @type {Object} + * @ignore + */ + autoHide:{ + value : false + }, + /** + * \u70b9\u51fb\u6216\u8005\u79fb\u52a8\u5230\u6b64\u8282\u70b9\u65f6\u4e0d\u89e6\u53d1\u81ea\u52a8\u9690\u85cf + *
          
          +     *  
          +     *  var overlay = new Overlay({ //\u70b9\u51fb#t1\u65f6\u663e\u793a\uff0c\u70b9\u51fb#t1,#t2,overlay\u4e4b\u5916\u7684\u5143\u7d20\u9690\u85cf
          +     *    trigger : '#t1',
          +     *    autoHide : true,
          +     *    hideExceptNode : '#t2',
          +     *    content : '\u60ac\u6d6e\u5185\u5bb9'
          +     *  });
          +     *  overlay.render();
          +     * 
          + * @cfg {Object} hideExceptNode + */ + hideExceptNode :{ + + }, + events : { + value : { + /** + * @event autohide + * \u70b9\u51fb\u63a7\u4ef6\u5916\u90e8\u65f6\u89e6\u53d1\uff0c\u53ea\u6709\u5728\u63a7\u4ef6\u8bbe\u7f6e\u81ea\u52a8\u9690\u85cf(autoHide = true)\u6709\u6548 + * \u53ef\u4ee5\u963b\u6b62\u63a7\u4ef6\u9690\u85cf\uff0c\u901a\u8fc7\u5728\u4e8b\u4ef6\u76d1\u542c\u51fd\u6570\u4e2d return false + *
          
          +         *  overlay.on('autohide',function(){
          +         *    var curTrigger = overlay.curTrigger; //\u5f53\u524d\u89e6\u53d1\u7684\u9879
          +         *    if(condtion){
          +         *      return false; //\u963b\u6b62\u9690\u85cf
          +         *    }
          +         *  });
          +         * 
          + */ + autohide : false + } + } + }; + + autoHide.prototype = { + + __bindUI : function() { + var _self = this; + + _self.on('afterVisibleChange',function (ev) { + var visible = ev.newVal; + if(_self.get('autoHide')){ + if(visible){ + _self._bindHideEvent(); + }else{ + _self._clearHideEvent(); + } + } + }); + }, + /** + * \u5904\u7406\u9f20\u6807\u79fb\u51fa\u4e8b\u4ef6\uff0c\u4e0d\u5f71\u54cd{BUI.Component.Controller#handleMouseLeave}\u4e8b\u4ef6 + * @param {jQuery.Event} ev \u4e8b\u4ef6\u5bf9\u8c61 + */ + handleMoveOuter : function (ev) { + var _self = this, + target = ev.toElement || ev.relatedTarget; + if(!_self.containsElement(target) && !isExcept(_self,target)){ + if(_self.fire('autohide') !== false){ + _self.hide(); + } + } + }, + /** + * \u70b9\u51fb\u9875\u9762\u65f6\u7684\u5904\u7406\u51fd\u6570 + * @param {jQuery.Event} ev \u4e8b\u4ef6\u5bf9\u8c61 + * @protected + */ + handleDocumentClick : function (ev) { + var _self = this, + target = ev.target; + if(!_self.containsElement(target) && !isExcept(_self,target)){ + if(_self.fire('autohide') !== false){ + _self.hide(); + } + } + }, + _bindHideEvent : function() { + var _self = this, + trigger = _self.get('curTrigger'), + autoHideType = _self.get('autoHideType'); + if(autoHideType === 'click'){ + $(document).on('mousedown',wrapBehavior(_self,'handleDocumentClick')); + }else{ + _self.get('el').on('mouseleave',wrapBehavior(_self,'handleMoveOuter')); + if(trigger){ + $(trigger).on('mouseleave',wrapBehavior(_self,'handleMoveOuter')) + } + } + + }, + //\u6e05\u9664\u7ed1\u5b9a\u7684\u9690\u85cf\u4e8b\u4ef6 + _clearHideEvent : function() { + var _self = this, + trigger = _self.get('curTrigger'), + autoHideType = _self.get('autoHideType'); + if(autoHideType === 'click'){ + $(document).off('mousedown',getWrapBehavior(_self,'handleDocumentClick')); + }else{ + _self.get('el').off('mouseleave',getWrapBehavior(_self,'handleMoveOuter')); + if(trigger){ + $(trigger).off('mouseleave',getWrapBehavior(_self,'handleMoveOuter')) + } + } + } + }; + + return autoHide; + +}); + + + + +/** + * @fileOverview close \u5173\u95ed\u6216\u9690\u85cf\u63a7\u4ef6 + * @author yiminghe@gmail.com + * copied and modified by dxq613@gmail.com + * @ignore + */ + +define('bui/component/uibase/close',function () { + + var CLS_PREFIX = BUI.prefix + 'ext-'; + + function getCloseRenderBtn(self) { + return $(self.get('closeTpl')); + } + + /** + * \u5173\u95ed\u6309\u94ae\u7684\u89c6\u56fe\u7c7b + * @class BUI.Component.UIBase.CloseView + * @private + */ + function CloseView() { + } + + CloseView.ATTRS = { + closeTpl : { + value : '' + + '\u5173\u95ed<' + '/span>' + + '<' + '/a>' + }, + closable:{ + value:true + }, + closeBtn:{ + } + }; + + CloseView.prototype = { + _uiSetClosable:function (v) { + var self = this, + btn = self.get('closeBtn'); + if (v) { + if (!btn) { + self.setInternal('closeBtn', btn = getCloseRenderBtn(self)); + } + btn.appendTo(self.get('el'), undefined); + } else { + if (btn) { + btn.remove(); + } + } + } + }; + + /** + * @class BUI.Component.UIBase.Close + * Close extension class. + * Represent a close button. + */ + function Close() { + } + + var HIDE = 'hide'; + Close.ATTRS = + { + /** + * \u5173\u95ed\u6309\u94ae\u7684\u9ed8\u8ba4\u6a21\u7248 + *
          
          +      *   var overlay = new Overlay({
          +      *     closeTpl : 'x',
          +      *     closable : true,
          +      *     trigger : '#t1'
          +      *   });
          +      *   overlay.render();
          +      * 
          + * @cfg {String} closeTpl + */ + /** + * \u5173\u95ed\u6309\u94ae\u7684\u9ed8\u8ba4\u6a21\u7248 + * @type {String} + * @protected + */ + closeTpl:{ + view : true + }, + /** + * \u662f\u5426\u51fa\u73b0\u5173\u95ed\u6309\u94ae + * @cfg {Boolean} [closable = false] + */ + /** + * \u662f\u5426\u51fa\u73b0\u5173\u95ed\u6309\u94ae + * @type {Boolean} + */ + closable:{ + view:1 + }, + + /** + * \u5173\u95ed\u6309\u94ae. + * @protected + * @type {jQuery} + */ + closeBtn:{ + view:1 + }, + /** + * \u5173\u95ed\u65f6\u9690\u85cf\u8fd8\u662f\u79fb\u9664DOM\u7ed3\u6784
          + * default "hide". \u53ef\u4ee5\u8bbe\u7f6e "destroy" \uff0c\u5f53\u70b9\u51fb\u5173\u95ed\u6309\u94ae\u65f6\u79fb\u9664\uff08destroy)\u63a7\u4ef6 + * @cfg {String} [closeAction = 'hide'] + */ + /** + * \u5173\u95ed\u65f6\u9690\u85cf\u8fd8\u662f\u79fb\u9664DOM\u7ed3\u6784 + * default "hide".\u53ef\u4ee5\u8bbe\u7f6e "destroy" \uff0c\u5f53\u70b9\u51fb\u5173\u95ed\u6309\u94ae\u65f6\u79fb\u9664\uff08destroy)\u63a7\u4ef6 + * @type {String} + * @protected + */ + closeAction:{ + value:HIDE + } + + /** + * @event closing + * \u6b63\u5728\u5173\u95ed\uff0c\u53ef\u4ee5\u901a\u8fc7return false \u963b\u6b62\u5173\u95ed\u4e8b\u4ef6 + * @param {Object} e \u5173\u95ed\u4e8b\u4ef6 + * @param {String} e.action \u5173\u95ed\u6267\u884c\u7684\u884c\u4e3a\uff0chide,destroy + */ + + /** + * @event closed + * \u5df2\u7ecf\u5173\u95ed + * @param {Object} e \u5173\u95ed\u4e8b\u4ef6 + * @param {String} e.action \u5173\u95ed\u6267\u884c\u7684\u884c\u4e3a\uff0chide,destroy + */ + + /** + * @event closeclick + * \u89e6\u53d1\u70b9\u51fb\u5173\u95ed\u6309\u94ae\u7684\u4e8b\u4ef6,return false \u963b\u6b62\u5173\u95ed + * @param {Object} e \u5173\u95ed\u4e8b\u4ef6 + * @param {String} e.domTarget \u70b9\u51fb\u7684\u5173\u95ed\u6309\u94ae\u8282\u70b9 + */ + }; + + var actions = { + hide:HIDE, + destroy:'destroy' + }; + + Close.prototype = { + _uiSetClosable:function (v) { + var self = this; + if (v && !self.__bindCloseEvent) { + self.__bindCloseEvent = 1; + self.get('closeBtn').on('click', function (ev) { + if(self.fire('closeclick',{domTarget : ev.target}) !== false){ + self.close(); + } + ev.preventDefault(); + }); + } + }, + __destructor:function () { + var btn = this.get('closeBtn'); + btn && btn.detach(); + }, + /** + * \u5173\u95ed\u5f39\u51fa\u6846\uff0c\u5982\u679ccloseAction = 'hide'\u90a3\u4e48\u5c31\u662f\u9690\u85cf\uff0c\u5982\u679c closeAction = 'destroy'\u90a3\u4e48\u5c31\u662f\u91ca\u653e + */ + close : function(){ + var self = this, + action = actions[self.get('closeAction') || HIDE]; + if(self.fire('closing',{action : action}) !== false){ + self[action](); + self.fire('closed',{action : action}); + } + } + }; + + Close.View = CloseView; + + return Close; +}); +/** + * @fileOverview \u62d6\u62fd + * @author by dxq613@gmail.com + * @ignore + */ + +define('bui/component/uibase/drag',function(){ + + + var dragBackId = BUI.guid('drag'); + + /** + * \u62d6\u62fd\u63a7\u4ef6\u7684\u6269\u5c55 + *
          
          +     *  var Control = Overlay.extend([UIBase.Drag],{
          +     *      
          +     *  });
          +     *
          +     *  var c = new Contol({ //\u62d6\u52a8\u63a7\u4ef6\u65f6\uff0c\u5728#t2\u5185
          +     *      content : '
          ', + * dragNode : '#header', + * constraint : '#t2' + * }); + *
          + * @class BUI.Component.UIBase.Drag + */ + var drag = function(){ + + }; + + drag.ATTRS = + { + + /** + * \u70b9\u51fb\u62d6\u52a8\u7684\u8282\u70b9 + *
          
          +         *  var Control = Overlay.extend([UIBase.Drag],{
          +         *      
          +         *  });
          +         *
          +         *  var c = new Contol({ //\u62d6\u52a8\u63a7\u4ef6\u65f6\uff0c\u5728#t2\u5185
          +         *      content : '
          ', + * dragNode : '#header', + * constraint : '#t2' + * }); + *
          + * @cfg {jQuery} dragNode + */ + /** + * \u70b9\u51fb\u62d6\u52a8\u7684\u8282\u70b9 + * @type {jQuery} + * @ignore + */ + dragNode : { + + }, + /** + * \u662f\u5426\u6b63\u5728\u62d6\u52a8 + * @type {Boolean} + * @protected + */ + draging:{ + setter:function (v) { + if (v === true) { + return {}; + } + }, + value:null + }, + /** + * \u62d6\u52a8\u7684\u9650\u5236\u8303\u56f4 + *
          
          +         *  var Control = Overlay.extend([UIBase.Drag],{
          +         *      
          +         *  });
          +         *
          +         *  var c = new Contol({ //\u62d6\u52a8\u63a7\u4ef6\u65f6\uff0c\u5728#t2\u5185
          +         *      content : '
          ', + * dragNode : '#header', + * constraint : '#t2' + * }); + *
          + * @cfg {jQuery} constraint + */ + /** + * \u62d6\u52a8\u7684\u9650\u5236\u8303\u56f4 + * @type {jQuery} + * @ignore + */ + constraint : { + + }, + /** + * @private + * @type {jQuery} + */ + dragBackEl : { + /** @private **/ + getter:function(){ + return $('#'+dragBackId); + } + } + }; + var dragTpl = ''; + + function initBack(){ + var el = $(dragTpl).css('opacity', 0).prependTo('body'); + return el; + } + drag.prototype = { + + __bindUI : function(){ + var _self = this, + constraint = _self.get('constraint'), + dragNode = _self.get('dragNode'); + if(!dragNode){ + return; + } + dragNode.on('mousedown',function(e){ + + if(e.which == 1){ + e.preventDefault(); + _self.set('draging',{ + elX: _self.get('x'), + elY: _self.get('y'), + startX : e.pageX, + startY : e.pageY + }); + registEvent(); + } + }); + /** + * @private + */ + function mouseMove(e){ + var draging = _self.get('draging'); + if(draging){ + e.preventDefault(); + _self._dragMoveTo(e.pageX,e.pageY,draging,constraint); + } + } + /** + * @private + */ + function mouseUp(e){ + if(e.which == 1){ + _self.set('draging',false); + var dragBackEl = _self.get('dragBackEl'); + if(dragBackEl){ + dragBackEl.hide(); + } + unregistEvent(); + } + } + /** + * @private + */ + function registEvent(){ + $(document).on('mousemove',mouseMove); + $(document).on('mouseup',mouseUp); + } + /** + * @private + */ + function unregistEvent(){ + $(document).off('mousemove',mouseMove); + $(document).off('mouseup',mouseUp); + } + + }, + _dragMoveTo : function(x,y,draging,constraint){ + var _self = this, + dragBackEl = _self.get('dragBackEl'), + draging = draging || _self.get('draging'), + offsetX = draging.startX - x, + offsetY = draging.startY - y; + if(!dragBackEl.length){ + dragBackEl = initBack(); + } + dragBackEl.css({ + cursor: 'move', + display: 'block' + }); + _self.set('xy',[_self._getConstrainX(draging.elX - offsetX,constraint), + _self._getConstrainY(draging.elY - offsetY,constraint)]); + + }, + _getConstrainX : function(x,constraint){ + var _self = this, + width = _self.get('el').outerWidth(), + endX = x + width, + curX = _self.get('x'); + //\u5982\u679c\u5b58\u5728\u7ea6\u675f + if(constraint){ + var constraintOffset = constraint.offset(); + if(constraintOffset.left >= x){ + return constraintOffset.left; + } + if(constraintOffset.left + constraint.width() < endX){ + return constraintOffset.left + constraint.width() - width; + } + return x; + } + //\u5f53\u5de6\u53f3\u9876\u70b9\u90fd\u5728\u89c6\u56fe\u5185\uff0c\u79fb\u52a8\u5230\u6b64\u70b9 + if(BUI.isInHorizontalView(x) && BUI.isInHorizontalView(endX)){ + return x; + } + + return curX; + }, + _getConstrainY : function(y,constraint){ + var _self = this, + height = _self.get('el').outerHeight(), + endY = y + height, + curY = _self.get('y'); + //\u5982\u679c\u5b58\u5728\u7ea6\u675f + if(constraint){ + var constraintOffset = constraint.offset(); + if(constraintOffset.top > y){ + return constraintOffset.top; + } + if(constraintOffset.top + constraint.height() < endY){ + return constraintOffset.top + constraint.height() - height; + } + return y; + } + //\u5f53\u5de6\u53f3\u9876\u70b9\u90fd\u5728\u89c6\u56fe\u5185\uff0c\u79fb\u52a8\u5230\u6b64\u70b9 + if(BUI.isInVerticalView(y) && BUI.isInVerticalView(endY)){ + return y; + } + + return curY; + } + }; + + return drag; + +});/** + * @fileOverview \u4f7f\u7528\u952e\u76d8\u5bfc\u822a + * @ignore + */ + +define('bui/component/uibase/keynav',['bui/keycode'],function (require) { + + var KeyCode = require('bui/keycode'), + wrapBehavior = BUI.wrapBehavior, + getWrapBehavior = BUI.getWrapBehavior; + /** + * \u952e\u76d8\u5bfc\u822a + * @class BUI.Component.UIBase.KeyNav + */ + var keyNav = function () { + + }; + + keyNav.ATTRS = { + + /** + * \u662f\u5426\u5141\u8bb8\u952e\u76d8\u5bfc\u822a + * @cfg {Boolean} [allowKeyNav = true] + */ + allowKeyNav : { + value : true + }, + /** + * \u5bfc\u822a\u4f7f\u7528\u7684\u4e8b\u4ef6 + * @cfg {String} [navEvent = 'keydown'] + */ + navEvent : { + value : 'keydown' + }, + /** + * \u5f53\u83b7\u53d6\u4e8b\u4ef6\u7684DOM\u662f input,textarea,select\u7b49\u65f6\uff0c\u4e0d\u5904\u7406\u952e\u76d8\u5bfc\u822a + * @cfg {Object} [ignoreInputFields='true'] + */ + ignoreInputFields : { + value : true + } + + }; + + keyNav.prototype = { + + __bindUI : function () { + + }, + _uiSetAllowKeyNav : function(v){ + var _self = this, + eventName = _self.get('navEvent'), + el = _self.get('el'); + if(v){ + el.on(eventName,wrapBehavior(_self,'_handleKeyDown')); + }else{ + el.off(eventName,getWrapBehavior(_self,'_handleKeyDown')); + } + }, + /** + * \u5904\u7406\u952e\u76d8\u5bfc\u822a + * @private + */ + _handleKeyDown : function(ev){ + var _self = this, + code = ev.which; + switch(code){ + case KeyCode.UP : + _self.handleNavUp(ev); + break; + case KeyCode.DOWN : + _self.handleNavDown(ev); + break; + case KeyCode.RIGHT : + _self.handleNavRight(ev); + break; + case KeyCode.LEFT : + _self.handleNavLeft(ev); + break; + case KeyCode.ENTER : + _self.handleNavEnter(ev); + break; + case KeyCode.ESC : + _self.handleNavEsc(ev); + break; + case KeyCode.TAB : + _self.handleNavTab(ev); + break; + default: + break; + } + }, + /** + * \u5904\u7406\u5411\u4e0a\u5bfc\u822a + * @protected + * @param {jQuery.Event} ev \u4e8b\u4ef6\u5bf9\u8c61 + */ + handleNavUp : function (ev) { + // body... + }, + /** + * \u5904\u7406\u5411\u4e0b\u5bfc\u822a + * @protected + * @param {jQuery.Event} ev \u4e8b\u4ef6\u5bf9\u8c61 + */ + handleNavDown : function (ev) { + // body... + }, + /** + * \u5904\u7406\u5411\u5de6\u5bfc\u822a + * @protected + * @param {jQuery.Event} ev \u4e8b\u4ef6\u5bf9\u8c61 + */ + handleNavLeft : function (ev) { + // body... + }, + /** + * \u5904\u7406\u5411\u53f3\u5bfc\u822a + * @protected + * @param {jQuery.Event} ev \u4e8b\u4ef6\u5bf9\u8c61 + */ + handleNavRight : function (ev) { + // body... + }, + /** + * \u5904\u7406\u786e\u8ba4\u952e + * @protected + * @param {jQuery.Event} ev \u4e8b\u4ef6\u5bf9\u8c61 + */ + handleNavEnter : function (ev) { + // body... + }, + /** + * \u5904\u7406 esc \u952e + * @protected + * @param {jQuery.Event} ev \u4e8b\u4ef6\u5bf9\u8c61 + */ + handleNavEsc : function (ev) { + // body... + }, + /** + * \u5904\u7406Tab\u952e + * @param {jQuery.Event} ev \u4e8b\u4ef6\u5bf9\u8c61 + */ + handleNavTab : function(ev){ + + } + + }; + + return keyNav; +}); +/** + * @fileOverview mask \u906e\u7f69\u5c42 + * @author yiminghe@gmail.com + * copied and modified by dxq613@gmail.com + * @ignore + */ + +define('bui/component/uibase/mask',function (require) { + + var UA = require('bui/ua'), + + /** + * \u6bcf\u7ec4\u76f8\u540c prefixCls \u7684 position \u5171\u4eab\u4e00\u4e2a\u906e\u7f69 + * @ignore + */ + maskMap = { + /** + * @ignore + * { + * node: + * num: + * } + */ + + }, + ie6 = UA.ie == 6; + + function getMaskCls(self) { + return self.get('prefixCls') + 'ext-mask'; + } + + function docWidth() { + return ie6 ? BUI.docWidth() + 'px' : '100%'; + } + + function docHeight() { + return ie6 ? BUI.docHeight() + 'px' : '100%'; + } + + function initMask(maskCls) { + var mask = $('
          ' + + (ie6 ? '<' + 'iframe ' + + 'style="position:absolute;' + + 'left:' + '0' + ';' + + 'top:' + '0' + ';' + + 'background:white;' + + 'width: expression(this.parentNode.offsetWidth);' + + 'height: expression(this.parentNode.offsetHeight);' + + 'filter:alpha(opacity=0);' + + 'z-index:-1;">' : '') + + '
          ') + .prependTo('body'); + /** + * \u70b9 mask \u7126\u70b9\u4e0d\u8f6c\u79fb + * @ignore + */ + // mask.unselectable(); + mask.on('mousedown', function (e) { + e.preventDefault(); + }); + return mask; + } + + /** + * \u906e\u7f69\u5c42\u7684\u89c6\u56fe\u7c7b + * @class BUI.Component.UIBase.MaskView + * @private + */ + function MaskView() { + } + + MaskView.ATTRS = { + maskShared:{ + value:true + } + }; + + MaskView.prototype = { + + _maskExtShow:function () { + var self = this, + zIndex, + maskCls = getMaskCls(self), + maskDesc = maskMap[maskCls], + maskShared = self.get('maskShared'), + mask = self.get('maskNode'); + if (!mask) { + if (maskShared) { + if (maskDesc) { + mask = maskDesc.node; + } else { + mask = initMask(maskCls); + maskDesc = maskMap[maskCls] = { + num:0, + node:mask + }; + } + } else { + mask = initMask(maskCls); + } + self.setInternal('maskNode', mask); + } + if (zIndex = self.get('zIndex')) { + mask.css('z-index', zIndex - 1); + } + if (maskShared) { + maskDesc.num++; + } + if (!maskShared || maskDesc.num == 1) { + mask.show(); + } + }, + + _maskExtHide:function () { + var self = this, + maskCls = getMaskCls(self), + maskDesc = maskMap[maskCls], + maskShared = self.get('maskShared'), + mask = self.get('maskNode'); + if (maskShared && maskDesc) { + maskDesc.num = Math.max(maskDesc.num - 1, 0); + if (maskDesc.num == 0) { + mask.hide(); + } + } else if(mask){ + mask.hide(); + } + }, + + __destructor:function () { + var self = this, + maskShared = self.get('maskShared'), + mask = self.get('maskNode'); + if (self.get('maskNode')) { + if (maskShared) { + if (self.get('visible')) { + self._maskExtHide(); + } + } else { + mask.remove(); + } + } + } + + }; + + /** + * @class BUI.Component.UIBase.Mask + * Mask extension class. + * Make component to be able to show with mask. + */ + function Mask() { + } + + Mask.ATTRS = + { + /** + * \u63a7\u4ef6\u663e\u793a\u65f6\uff0c\u662f\u5426\u663e\u793a\u5c4f\u853d\u5c42 + *
          
          +         *   var overlay = new Overlay({ //\u663e\u793aoverlay\u65f6\uff0c\u5c4f\u853dbody
          +         *     mask : true,
          +         *     maskNode : 'body',
          +         *     trigger : '#t1'
          +         *   });
          +         *   overlay.render();
          +         * 
          + * @cfg {Boolean} [mask = false] + */ + /** + * \u63a7\u4ef6\u663e\u793a\u65f6\uff0c\u662f\u5426\u663e\u793a\u5c4f\u853d\u5c42 + * @type {Boolean} + * @protected + */ + mask:{ + value:false + }, + /** + * \u5c4f\u853d\u7684\u5185\u5bb9 + *
          
          +         *   var overlay = new Overlay({ //\u663e\u793aoverlay\u65f6\uff0c\u5c4f\u853dbody
          +         *     mask : true,
          +         *     maskNode : 'body',
          +         *     trigger : '#t1'
          +         *   });
          +         *   overlay.render();
          +         * 
          + * @cfg {jQuery} maskNode + */ + /** + * \u5c4f\u853d\u7684\u5185\u5bb9 + * @type {jQuery} + * @protected + */ + maskNode:{ + view:1 + }, + /** + * Whether to share mask with other overlays. + * @default true. + * @type {Boolean} + * @protected + */ + maskShared:{ + view:1 + } + }; + + Mask.prototype = { + + __bindUI:function () { + var self = this, + view = self.get('view'), + _maskExtShow = view._maskExtShow, + _maskExtHide = view._maskExtHide; + if (self.get('mask')) { + self.on('show',function(){ + view._maskExtShow(); + }); + self.on('hide',function(){ + view._maskExtHide(); + }); + } + } + }; + + Mask = Mask; + Mask.View = MaskView; + + return Mask; +}); + +/** + * @fileOverview \u4f4d\u7f6e\uff0c\u63a7\u4ef6\u7edd\u5bf9\u5b9a\u4f4d + * @author yiminghe@gmail.com + * copied by dxq613@gmail.com + * @ignore + */ +define('bui/component/uibase/position',function () { + + + /** + * \u5bf9\u9f50\u7684\u89c6\u56fe\u7c7b + * @class BUI.Component.UIBase.PositionView + * @private + */ + function PositionView() { + + } + + PositionView.ATTRS = { + x:{ + /** + * \u6c34\u5e73\u65b9\u5411\u7edd\u5bf9\u4f4d\u7f6e + * @private + * @ignore + */ + valueFn:function () { + var self = this; + // \u8bfb\u5230\u8fd9\u91cc\u65f6\uff0cel \u4e00\u5b9a\u662f\u5df2\u7ecf\u52a0\u5230 dom \u6811\u4e2d\u4e86\uff0c\u5426\u5219\u62a5\u672a\u77e5\u9519\u8bef + // el \u4e0d\u5728 dom \u6811\u4e2d offset \u62a5\u9519\u7684 + // \u6700\u65e9\u8bfb\u5c31\u662f\u5728 syncUI \u4e2d\uff0c\u4e00\u70b9\u91cd\u590d\u8bbe\u7f6e(\u8bfb\u53d6\u81ea\u8eab X \u518d\u8c03\u7528 _uiSetX)\u65e0\u6240\u8c13\u4e86 + return self.get('el') && self.get('el').offset().left; + } + }, + y:{ + /** + * \u5782\u76f4\u65b9\u5411\u7edd\u5bf9\u4f4d\u7f6e + * @private + * @ignore + */ + valueFn:function () { + var self = this; + return self.get('el') && self.get('el').offset().top; + } + }, + zIndex:{ + }, + /** + * @private + * see {@link BUI.Component.UIBase.Box#visibleMode}. + * @default "visibility" + * @ignore + */ + visibleMode:{ + value:'visibility' + } + }; + + + PositionView.prototype = { + + __createDom:function () { + this.get('el').addClass(BUI.prefix + 'ext-position'); + }, + + _uiSetZIndex:function (x) { + this.get('el').css('z-index', x); + }, + _uiSetX:function (x) { + if (x != null) { + this.get('el').offset({ + left:x + }); + } + }, + _uiSetY:function (y) { + if (y != null) { + this.get('el').offset({ + top:y + }); + } + }, + _uiSetLeft:function(left){ + if(left != null){ + this.get('el').css({left:left}); + } + }, + _uiSetTop : function(top){ + if(top != null){ + this.get('el').css({top:top}); + } + } + }; + + /** + * @class BUI.Component.UIBase.Position + * Position extension class. + * Make component positionable + */ + function Position() { + } + + Position.ATTRS = + /** + * @lends BUI.Component.UIBase.Position# + * @ignore + */ + { + /** + * \u6c34\u5e73\u5750\u6807 + * @cfg {Number} x + */ + /** + * \u6c34\u5e73\u5750\u6807 + *
          
          +         *     overlay.set('x',100);
          +         * 
          + * @type {Number} + */ + x:{ + view:1 + }, + /** + * \u5782\u76f4\u5750\u6807 + * @cfg {Number} y + */ + /** + * \u5782\u76f4\u5750\u6807 + *
          
          +         *     overlay.set('y',100);
          +         * 
          + * @type {Number} + */ + y:{ + view:1 + }, + /** + * \u76f8\u5bf9\u4e8e\u7236\u5143\u7d20\u7684\u6c34\u5e73\u4f4d\u7f6e + * @type {Number} + * @protected + */ + left : { + view:1 + }, + /** + * \u76f8\u5bf9\u4e8e\u7236\u5143\u7d20\u7684\u5782\u76f4\u4f4d\u7f6e + * @type {Number} + * @protected + */ + top : { + view:1 + }, + /** + * \u6c34\u5e73\u548c\u5782\u76f4\u5750\u6807 + *
          
          +         * var overlay = new Overlay({
          +         *   xy : [100,100],
          +         *   trigger : '#t1',
          +         *   srcNode : '#c1'
          +         * });
          +         * 
          + * @cfg {Number[]} xy + */ + /** + * \u6c34\u5e73\u548c\u5782\u76f4\u5750\u6807 + *
          
          +         *     overlay.set('xy',[100,100]);
          +         * 
          + * @type {Number[]} + */ + xy:{ + // \u76f8\u5bf9 page \u5b9a\u4f4d, \u6709\u6548\u503c\u4e3a [n, m], \u4e3a null \u65f6, \u9009 align \u8bbe\u7f6e + setter:function (v) { + var self = this, + xy = $.makeArray(v); + /* + \u5c5e\u6027\u5185\u5206\u53d1\u7279\u522b\u6ce8\u610f\uff1a + xy -> x,y + */ + if (xy.length) { + xy[0] && self.set('x', xy[0]); + xy[1] && self.set('y', xy[1]); + } + return v; + }, + /** + * xy \u7eaf\u4e2d\u8f6c\u4f5c\u7528 + * @ignore + */ + getter:function () { + return [this.get('x'), this.get('y')]; + } + }, + /** + * z-index value. + *
          
          +         *   var overlay = new Overlay({
          +         *       zIndex : '1000'
          +         *   });
          +         * 
          + * @cfg {Number} zIndex + */ + /** + * z-index value. + *
          
          +         *   overlay.set('zIndex','1200');
          +         * 
          + * @type {Number} + */ + zIndex:{ + view:1 + }, + /** + * Positionable element is by default visible false. + * For compatibility in overlay and PopupMenu. + * @default false + * @ignore + */ + visible:{ + view:true, + value:true + } + }; + + + Position.prototype = + /** + * @lends BUI.Component.UIBase.Position.prototype + * @ignore + */ + { + /** + * Move to absolute position. + * @param {Number|Number[]} x + * @param {Number} [y] + * @example + *
          
          +         * move(x, y);
          +         * move(x);
          +         * move([x,y])
          +         * 
          + */ + move:function (x, y) { + var self = this; + if (BUI.isArray(x)) { + y = x[1]; + x = x[0]; + } + self.set('xy', [x, y]); + return self; + }, + //\u8bbe\u7f6e x \u5750\u6807\u65f6\uff0c\u91cd\u7f6e left + _uiSetX : function(v){ + if(v != null){ + var _self = this, + el = _self.get('el'); + _self.setInternal('left',el.position().left); + if(v != -999){ + this.set('cachePosition',null); + } + + } + + }, + //\u8bbe\u7f6e y \u5750\u6807\u65f6\uff0c\u91cd\u7f6e top + _uiSetY : function(v){ + if(v != null){ + var _self = this, + el = _self.get('el'); + _self.setInternal('top',el.position().top); + if(v != -999){ + this.set('cachePosition',null); + } + } + }, + //\u8bbe\u7f6e left\u65f6\uff0c\u91cd\u7f6e x + _uiSetLeft : function(v){ + var _self = this, + el = _self.get('el'); + if(v != null){ + _self.setInternal('x',el.offset().left); + }/*else{ //\u5982\u679clef \u4e3anull,\u540c\u65f6\u8bbe\u7f6e\u8fc7left\u548ctop\uff0c\u90a3\u4e48\u53d6\u5bf9\u5e94\u7684\u503c + _self.setInternal('left',el.position().left); + }*/ + }, + //\u8bbe\u7f6etop \u65f6\uff0c\u91cd\u7f6ey + _uiSetTop : function(v){ + var _self = this, + el = _self.get('el'); + if(v != null){ + _self.setInternal('y',el.offset().top); + }/*else{ //\u5982\u679clef \u4e3anull,\u540c\u65f6\u8bbe\u7f6e\u8fc7left\u548ctop\uff0c\u90a3\u4e48\u53d6\u5bf9\u5e94\u7684\u503c + _self.setInternal('top',el.position().top); + }*/ + } + }; + + Position.View = PositionView; + return Position; +}); +/** + * @fileOverview \u53ef\u9009\u4e2d\u7684\u63a7\u4ef6,\u7236\u63a7\u4ef6\u652f\u6301selection\u6269\u5c55 + * @ignore + */ + +define('bui/component/uibase/listitem',function () { + + /** + * \u5217\u8868\u9879\u63a7\u4ef6\u7684\u89c6\u56fe\u5c42 + * @class BUI.Component.UIBase.ListItemView + * @private + */ + function listItemView () { + // body... + } + + listItemView.ATTRS = { + /** + * \u662f\u5426\u9009\u4e2d + * @type {Boolean} + */ + selected : { + + } + }; + + listItemView.prototype = { + _uiSetSelected : function(v){ + var _self = this, + cls = _self.getStatusCls('selected'), + el = _self.get('el'); + if(v){ + el.addClass(cls); + }else{ + el.removeClass(cls); + } + } + }; + /** + * \u5217\u8868\u9879\u7684\u6269\u5c55 + * @class BUI.Component.UIBase.ListItem + */ + function listItem() { + + } + + listItem.ATTRS = { + + /** + * \u662f\u5426\u53ef\u4ee5\u88ab\u9009\u4e2d + * @cfg {Boolean} [selectable=true] + */ + /** + * \u662f\u5426\u53ef\u4ee5\u88ab\u9009\u4e2d + * @type {Boolean} + */ + selectable : { + value : true + }, + + /** + * \u662f\u5426\u9009\u4e2d,\u53ea\u80fd\u901a\u8fc7\u8bbe\u7f6e\u7236\u7c7b\u7684\u9009\u4e2d\u65b9\u6cd5\u6765\u5b9e\u73b0\u9009\u4e2d + * @type {Boolean} + * @readOnly + */ + selected :{ + view : true, + sync : false, + value : false + } + }; + + listItem.prototype = { + + }; + + listItem.View = listItemView; + + return listItem; + +}); +/** + * @fileOverview + * \u63a7\u4ef6\u5305\u542b\u5934\u90e8\uff08head)\u3001\u5185\u5bb9(content)\u548c\u5c3e\u90e8\uff08foot) + * @ignore + */ +define('bui/component/uibase/stdmod',function () { + + var CLS_PREFIX = BUI.prefix + 'stdmod-'; + + + /** + * \u6807\u51c6\u6a21\u5757\u7ec4\u7ec7\u7684\u89c6\u56fe\u7c7b + * @class BUI.Component.UIBase.StdModView + * @private + */ + function StdModView() { + } + + StdModView.ATTRS = { + header:{ + }, + body:{ + }, + footer:{ + }, + bodyStyle:{ + }, + footerStyle:{ + }, + headerStyle:{ + }, + headerContent:{ + }, + bodyContent:{ + }, + footerContent:{ + } + }; + + StdModView.PARSER = { + header:function (el) { + return el.one("." + CLS_PREFIX + "header"); + }, + body:function (el) { + return el.one("." + CLS_PREFIX + "body"); + }, + footer:function (el) { + return el.one("." + CLS_PREFIX + "footer"); + } + };/**/ + + function createUI(self, part) { + var el = self.get('contentEl'), + partEl = self.get(part); + if (!partEl) { + partEl = $('
          ' + + '
          '); + partEl.appendTo(el); + self.setInternal(part, partEl); + } + } + + + function _setStdModRenderContent(self, part, v) { + part = self.get(part); + if (BUI.isString(v)) { + part.html(v); + } else { + part.html('') + .append(v); + } + } + + StdModView.prototype = { + + __createDom:function () { + createUI(this, 'header'); + createUI(this, 'body'); + createUI(this, 'footer'); + }, + + _uiSetBodyStyle:function (v) { + this.get('body').css(v); + }, + + _uiSetHeaderStyle:function (v) { + this.get('header').css(v); + }, + _uiSetFooterStyle:function (v) { + this.get('footer').css(v); + }, + + _uiSetBodyContent:function (v) { + _setStdModRenderContent(this, 'body', v); + }, + + _uiSetHeaderContent:function (v) { + _setStdModRenderContent(this, 'header', v); + }, + + _uiSetFooterContent:function (v) { + _setStdModRenderContent(this, 'footer', v); + } + }; + + /** + * @class BUI.Component.UIBase.StdMod + * StdMod extension class. + * Generate head, body, foot for component. + */ + function StdMod() { + } + + StdMod.ATTRS = + /** + * @lends BUI.Component.UIBase.StdMod# + * @ignore + */ + { + /** + * \u63a7\u4ef6\u7684\u5934\u90e8DOM. Readonly + * @readOnly + * @type {jQuery} + */ + header:{ + view:1 + }, + /** + * \u63a7\u4ef6\u7684\u5185\u5bb9DOM. Readonly + * @readOnly + * @type {jQuery} + */ + body:{ + view:1 + }, + /** + * \u63a7\u4ef6\u7684\u5e95\u90e8DOM. Readonly + * @readOnly + * @type {jQuery} + */ + footer:{ + view:1 + }, + /** + * \u5e94\u7528\u5230\u63a7\u4ef6\u5185\u5bb9\u7684css\u5c5e\u6027\uff0c\u952e\u503c\u5bf9\u5f62\u5f0f + * @cfg {Object} bodyStyle + */ + /** + * \u5e94\u7528\u5230\u63a7\u4ef6\u5185\u5bb9\u7684css\u5c5e\u6027\uff0c\u952e\u503c\u5bf9\u5f62\u5f0f + * @type {Object} + * @protected + */ + bodyStyle:{ + view:1 + }, + /** + * \u5e94\u7528\u5230\u63a7\u4ef6\u5e95\u90e8\u7684css\u5c5e\u6027\uff0c\u952e\u503c\u5bf9\u5f62\u5f0f + * @cfg {Object} footerStyle + */ + /** + * \u5e94\u7528\u5230\u63a7\u4ef6\u5e95\u90e8\u7684css\u5c5e\u6027\uff0c\u952e\u503c\u5bf9\u5f62\u5f0f + * @type {Object} + * @protected + */ + footerStyle:{ + view:1 + }, + /** + * \u5e94\u7528\u5230\u63a7\u4ef6\u5934\u90e8\u7684css\u5c5e\u6027\uff0c\u952e\u503c\u5bf9\u5f62\u5f0f + * @cfg {Object} headerStyle + */ + /** + * \u5e94\u7528\u5230\u63a7\u4ef6\u5934\u90e8\u7684css\u5c5e\u6027\uff0c\u952e\u503c\u5bf9\u5f62\u5f0f + * @type {Object} + * @protected + */ + headerStyle:{ + view:1 + }, + /** + * \u63a7\u4ef6\u5934\u90e8\u7684html + *
          
          +         * var dialog = new Dialog({
          +         *     headerContent: '<div class="header"></div>',
          +         *     bodyContent : '#c1',
          +         *     footerContent : '<div class="footer"></div>'
          +         * });
          +         * dialog.show();
          +         * 
          + * @cfg {jQuery|String} headerContent + */ + /** + * \u63a7\u4ef6\u5934\u90e8\u7684html + * @type {jQuery|String} + */ + headerContent:{ + view:1 + }, + /** + * \u63a7\u4ef6\u5185\u5bb9\u7684html + *
          
          +         * var dialog = new Dialog({
          +         *     headerContent: '<div class="header"></div>',
          +         *     bodyContent : '#c1',
          +         *     footerContent : '<div class="footer"></div>'
          +         * });
          +         * dialog.show();
          +         * 
          + * @cfg {jQuery|String} bodyContent + */ + /** + * \u63a7\u4ef6\u5185\u5bb9\u7684html + * @type {jQuery|String} + */ + bodyContent:{ + view:1 + }, + /** + * \u63a7\u4ef6\u5e95\u90e8\u7684html + *
          
          +         * var dialog = new Dialog({
          +         *     headerContent: '<div class="header"></div>',
          +         *     bodyContent : '#c1',
          +         *     footerContent : '<div class="footer"></div>'
          +         * });
          +         * dialog.show();
          +         * 
          + * @cfg {jQuery|String} footerContent + */ + /** + * \u63a7\u4ef6\u5e95\u90e8\u7684html + * @type {jQuery|String} + */ + footerContent:{ + view:1 + } + }; + + StdMod.View = StdModView; + return StdMod; +});/** + * @fileOverview \u4f7f\u7528wrapper + * @ignore + */ + +define('bui/component/uibase/decorate',['bui/array','bui/json','bui/component/manage'],function (require) { + + var ArrayUtil = require('bui/array'), + JSON = require('bui/json'), + prefixCls = BUI.prefix, + FIELD_PREFIX = 'data-' + FIELD_CFG = FIELD_PREFIX + 'cfg', + PARSER = 'PARSER', + Manager = require('bui/component/manage'), + regx = /^[\{\[]/; + + function isConfigField(name,cfgFields){ + if(cfgFields[name]){ + return true; + } + var reg = new RegExp("^"+FIELD_PREFIX); + if(name !== FIELD_CFG && reg.test(name)){ + return true; + } + return false; + } + + // \u6536\u96c6\u5355\u7ee7\u627f\u94fe\uff0c\u5b50\u7c7b\u5728\u524d\uff0c\u7236\u7c7b\u5728\u540e + function collectConstructorChains(self) { + var constructorChains = [], + c = self.constructor; + while (c) { + constructorChains.push(c); + c = c.superclass && c.superclass.constructor; + } + return constructorChains; + } + + //\u5982\u679c\u5c5e\u6027\u4e3a\u5bf9\u8c61\u6216\u8005\u6570\u7ec4\uff0c\u5219\u8fdb\u884c\u8f6c\u6362 + function parseFieldValue(value){ + value = $.trim(value); + if(regx.test(value)){ + value = JSON.looseParse(value); + } + return value; + } + + function setConfigFields(self,cfg){ + + var userConfig = self.userConfig || {}; + for (var p in cfg) { + // \u7528\u6237\u8bbe\u7f6e\u8fc7\u90a3\u4e48\u8fd9\u91cc\u4e0d\u4ece dom \u8282\u70b9\u53d6 + // \u7528\u6237\u8bbe\u7f6e > html parser > default value + if (!(p in userConfig)) { + self.setInternal(p,cfg[p]); + } + } + } + function applyParser(srcNode, parser) { + var self = this, + p, v, + userConfig = self.userConfig || {}; + + // \u4ece parser \u4e2d\uff0c\u9ed8\u9ed8\u8bbe\u7f6e\u5c5e\u6027\uff0c\u4e0d\u89e6\u53d1\u4e8b\u4ef6 + for (p in parser) { + // \u7528\u6237\u8bbe\u7f6e\u8fc7\u90a3\u4e48\u8fd9\u91cc\u4e0d\u4ece dom \u8282\u70b9\u53d6 + // \u7528\u6237\u8bbe\u7f6e > html parser > default value + if (!(p in userConfig)) { + v = parser[p]; + // \u51fd\u6570 + if (BUI.isFunction(v)) { + self.setInternal(p, v.call(self, srcNode)); + } + // \u5355\u9009\u9009\u62e9\u5668 + else if (typeof v == 'string') { + self.setInternal(p, srcNode.find(v)); + } + // \u591a\u9009\u9009\u62e9\u5668 + else if (BUI.isArray(v) && v[0]) { + self.setInternal(p, srcNode.find(v[0])) + } + } + } + } + + function initParser(self,srcNode){ + + var c = self.constructor, + len, + p, + constructorChains; + + constructorChains = collectConstructorChains(self); + + // \u4ece\u7236\u7c7b\u5230\u5b50\u7c7b\u5f00\u59cb\u4ece html \u8bfb\u53d6\u5c5e\u6027 + for (len = constructorChains.length - 1; len >= 0; len--) { + c = constructorChains[len]; + if (p = c[PARSER]) { + applyParser.call(self, srcNode, p); + } + } + } + + function initDecorate(self){ + var _self = self, + srcNode = _self.get('srcNode'), + userConfig, + decorateCfg; + if(srcNode){ + srcNode = $(srcNode); + _self.setInternal('el',srcNode); + _self.setInternal('srcNode',srcNode); + + userConfig = _self.get('userConfig'); + decorateCfg = _self.getDecorateConfig(srcNode); + setConfigFields(self,decorateCfg); + + //\u5982\u679c\u4eceDOM\u4e2d\u8bfb\u53d6\u5b50\u63a7\u4ef6 + if(_self.get('isDecorateChild') && _self.decorateInternal){ + _self.decorateInternal(srcNode); + } + initParser(self,srcNode); + } + } + + /** + * @class BUI.Component.UIBase.Decorate + * \u5c06DOM\u5bf9\u8c61\u5c01\u88c5\u6210\u63a7\u4ef6 + */ + function decorate(){ + initDecorate(this); + } + + decorate.ATTRS = { + + /** + * \u914d\u7f6e\u63a7\u4ef6\u7684\u6839\u8282\u70b9\u7684DOM + *
          
          +     * new Form.Form({
          +     *   srcNode : '#J_Form'
          +     * }).render();
          +     * 
          + * @cfg {jQuery} srcNode + */ + /** + * \u914d\u7f6e\u63a7\u4ef6\u7684\u6839\u8282\u70b9\u7684DOM + * @type {jQuery} + */ + srcNode : { + view : true + }, + /** + * \u662f\u5426\u6839\u636eDOM\u751f\u6210\u5b50\u63a7\u4ef6 + * @type {Boolean} + * @protected + */ + isDecorateChild : { + value : false + }, + /** + * \u6b64\u914d\u7f6e\u9879\u914d\u7f6e\u4f7f\u7528\u90a3\u4e9bsrcNode\u4e0a\u7684\u8282\u70b9\u4f5c\u4e3a\u914d\u7f6e\u9879 + * - \u5f53\u65f6\u7528 decorate \u65f6\uff0c\u53d6 srcNode\u4e0a\u7684\u8282\u70b9\u7684\u5c5e\u6027\u4f5c\u4e3a\u63a7\u4ef6\u7684\u914d\u7f6e\u4fe1\u606f + * - \u9ed8\u8ba4id,name,value,title \u90fd\u4f1a\u4f5c\u4e3a\u5c5e\u6027\u4f20\u5165 + * - \u4f7f\u7528 'data-cfg' \u4f5c\u4e3a\u6574\u4f53\u7684\u914d\u7f6e\u5c5e\u6027 + *
          
          +     *     
          +     *     //\u4f1a\u751f\u6210\u4ee5\u4e0b\u914d\u7f6e\u9879\uff1a
          +     *     {
          +     *         name : 'txtName',
          +     *         id : 'id',
          +     *         allowBlank:false
          +     *     }
          +     *     new Form.Field({
          +     *        src:'#c1'
          +     *     }).render();
          +     *  
          + * @type {Object} + * @protected + */ + decorateCfgFields : { + value : { + 'id' : true, + 'name' : true, + 'value' : true, + 'title' : true + } + } + }; + + decorate.prototype = { + + /** + * \u83b7\u53d6\u63a7\u4ef6\u7684\u914d\u7f6e\u4fe1\u606f + * @protected + */ + getDecorateConfig : function(el){ + if(!el.length){ + return null; + } + var _self = this, + dom = el[0], + attributes = dom.attributes, + decorateCfgFields = _self.get('decorateCfgFields'), + config = {}; + + BUI.each(attributes,function(attr){ + var name = attr.nodeName; + try{ + if(name === FIELD_CFG){ + var cfg = parseFieldValue(attr.nodeValue); + BUI.mix(config,cfg); + } + else if(isConfigField(name,decorateCfgFields)){ + name = name.replace(FIELD_PREFIX,''); + config[name] = parseFieldValue(attr.nodeValue); + } + }catch(e){ + BUI.log('parse field error,the attribute is:' + name); + } + }); + return config; + }, + /** + * \u83b7\u53d6\u5c01\u88c5\u6210\u5b50\u63a7\u4ef6\u7684\u8282\u70b9\u96c6\u5408 + * @protected + * @return {Array} \u8282\u70b9\u96c6\u5408 + */ + getDecorateElments : function(){ + var _self = this, + el = _self.get('el'), + contentContainer = _self.get('contentContainer'); + if(contentContainer){ + return el.find(contentContainer).children(); + }else{ + return el.children(); + } + }, + + /** + * \u5c01\u88c5\u6240\u6709\u7684\u5b50\u63a7\u4ef6 + * @protected + * @param {jQuery} el Root element of current component. + */ + decorateInternal: function (el) { + var self = this; + self.decorateChildren(el); + }, + /** + * \u83b7\u53d6\u5b50\u63a7\u4ef6\u7684xclass\u7c7b\u578b + * @protected + * @param {jQuery} \u5b50\u63a7\u4ef6\u7684\u6839\u8282\u70b9 + */ + findXClassByNode: function (childNode, ignoreError) { + var _self = this, + cls = childNode.attr("class") || '', + childClass = _self.get('defaultChildClass'); //\u5982\u679c\u6ca1\u6709\u6837\u5f0f\u6216\u8005\u67e5\u627e\u4e0d\u5230\u5bf9\u5e94\u7684\u7c7b\uff0c\u4f7f\u7528\u9ed8\u8ba4\u7684\u5b50\u63a7\u4ef6\u7c7b\u578b + + // \u8fc7\u6ee4\u6389\u7279\u5b9a\u524d\u7f00 + cls = cls.replace(new RegExp("\\b" + prefixCls, "ig"), ""); + + var UI = Manager.getConstructorByXClass(cls) || Manager.getConstructorByXClass(childClass); + + if (!UI && !ignoreError) { + BUI.log(childNode); + BUI.error("can not find ui " + cls + " from this markup"); + } + return Manager.getXClassByConstructor(UI); + }, + // \u751f\u6210\u4e00\u4e2a\u7ec4\u4ef6 + decorateChildrenInternal: function (xclass, c) { + var _self = this, + children = _self.get('children'); + children.push({ + xclass : xclass, + srcNode: c + }); + }, + /** + * \u5c01\u88c5\u5b50\u63a7\u4ef6 + * @private + * @param {jQuery} el component's root element. + */ + decorateChildren: function (el) { + var _self = this, + children = _self.getDecorateElments(); + BUI.each(children,function(c){ + var xclass = _self.findXClassByNode($(c)); + _self.decorateChildrenInternal(xclass, $(c)); + }); + } + }; + + return decorate; +});/** + * @fileOverview \u63a7\u4ef6\u6a21\u677f + * @author dxq613@gmail.com + * @ignore + */ +define('bui/component/uibase/tpl',function () { + + /** + * @private + * \u63a7\u4ef6\u6a21\u677f\u6269\u5c55\u7c7b\u7684\u6e32\u67d3\u7c7b(view) + * @class BUI.Component.UIBase.TplView + */ + function tplView () { + + } + + tplView.ATTRS = { + /** + * \u6a21\u677f + * @protected + * @type {String} + */ + tpl:{ + + } + }; + + tplView.prototype = { + __renderUI : function(){ + var _self = this, + contentContainer = _self.get('childContainer'), + contentEl; + + if(contentContainer){ + contentEl = _self.get('el').find(contentContainer); + if(contentEl.length){ + _self.set('contentEl',contentEl); + } + } + }, + /** + * \u83b7\u53d6\u751f\u6210\u63a7\u4ef6\u7684\u6a21\u677f + * @protected + * @param {Object} attrs \u5c5e\u6027\u503c + * @return {String} \u6a21\u677f + */ + getTpl:function (attrs) { + var _self = this, + tpl = _self.get('tpl'), + tplRender = _self.get('tplRender'); + attrs = attrs || _self.getAttrVals(); + + if(tplRender){ + return tplRender(attrs); + } + if(tpl){ + return BUI.substitute(tpl,attrs); + } + return ''; + }, + /** + * \u5982\u679c\u63a7\u4ef6\u8bbe\u7f6e\u4e86\u6a21\u677f\uff0c\u5219\u6839\u636e\u6a21\u677f\u548c\u5c5e\u6027\u503c\u751f\u6210DOM + * \u5982\u679c\u8bbe\u7f6e\u4e86content\u5c5e\u6027\uff0c\u6b64\u6a21\u677f\u4e0d\u5e94\u7528 + * @protected + * @param {Object} attrs \u5c5e\u6027\u503c\uff0c\u9ed8\u8ba4\u4e3a\u521d\u59cb\u5316\u65f6\u4f20\u5165\u7684\u503c + */ + setTplContent:function (attrs) { + var _self = this, + el = _self.get('el'), + content = _self.get('content'), + tpl = _self.getTpl(attrs); + if(!content && tpl){ + el.empty(); + el.html(tpl); + } + } + } + + /** + * \u63a7\u4ef6\u7684\u6a21\u677f\u6269\u5c55 + * @class BUI.Component.UIBase.Tpl + */ + function tpl() { + + } + + tpl.ATTRS = { + /** + * \u63a7\u4ef6\u7684\u6a21\u7248\uff0c\u7528\u4e8e\u521d\u59cb\u5316 + *
          
          +    * var list = new List.List({
          +    *   tpl : '<div class="toolbar"></div><ul></ul>',
          +    *   childContainer : 'ul'
          +    * });
          +    * //\u7528\u4e8e\u7edf\u4e00\u5b50\u63a7\u4ef6\u6a21\u677f
          +    * var list = new List.List({
          +    *   defaultChildCfg : {
          +    *     tpl : '<span>{text}</span>'
          +    *   }
          +    * });
          +    * list.render();
          +    * 
          + * @cfg {String} tpl + */ + /** + * \u63a7\u4ef6\u7684\u6a21\u677f + *
          
          +     *   list.set('tpl','<div class="toolbar"></div><ul></ul><div class="bottom"></div>')
          +     * 
          + * @type {String} + */ + tpl : { + view : true, + sync: false + }, + /** + *

          \u63a7\u4ef6\u7684\u6e32\u67d3\u51fd\u6570\uff0c\u5e94\u5bf9\u4e00\u4e9b\u7b80\u5355\u6a21\u677f\u89e3\u51b3\u4e0d\u4e86\u7684\u95ee\u9898\uff0c\u4f8b\u5982\u6709if,else\u903b\u8f91\uff0c\u6709\u5faa\u73af\u903b\u8f91, + * \u51fd\u6570\u539f\u578b\u662ffunction(data){},\u5176\u4e2ddata\u662f\u63a7\u4ef6\u7684\u5c5e\u6027\u503c

          + *

          \u63a7\u4ef6\u6a21\u677f\u7684\u52a0\u5f3a\u6a21\u5f0f\uff0c\u6b64\u5c5e\u6027\u4f1a\u8986\u76d6@see {BUI.Component.UIBase.Tpl#property-tpl}\u5c5e\u6027

          + * //\u7528\u4e8e\u7edf\u4e00\u5b50\u63a7\u4ef6\u6a21\u677f + * var list = new List.List({ + * defaultChildCfg : { + * tplRender : funciton(item){ + * if(item.type == '1'){ + * return 'type1 html'; + * }else{ + * return 'type2 html'; + * } + * } + * } + * }); + * list.render(); + * @cfg {Function} tplRender + */ + tplRender : { + view : true, + value : null + }, + /** + * \u8fd9\u662f\u4e00\u4e2a\u9009\u62e9\u5668\uff0c\u4f7f\u7528\u4e86\u6a21\u677f\u540e\uff0c\u5b50\u63a7\u4ef6\u53ef\u80fd\u4f1a\u6dfb\u52a0\u5230\u6a21\u677f\u5bf9\u5e94\u7684\u4f4d\u7f6e, + * - \u9ed8\u8ba4\u4e3anull,\u6b64\u65f6\u5b50\u63a7\u4ef6\u4f1a\u5c06\u63a7\u4ef6\u6700\u5916\u5c42 el \u4f5c\u4e3a\u5bb9\u5668 + *
          
          +     * var list = new List.List({
          +     *   tpl : '<div class="toolbar"></div><ul></ul>',
          +     *   childContainer : 'ul'
          +     * });
          +     * 
          + * @cfg {String} childContainer + */ + childContainer : { + view : true + } + }; + + tpl.prototype = { + + __renderUI : function () { + //\u4f7f\u7528srcNode\u65f6\uff0c\u4e0d\u4f7f\u7528\u6a21\u677f + if(!this.get('srcNode')){ + this.setTplContent(); + } + }, + /** + * \u6839\u636e\u63a7\u4ef6\u7684\u5c5e\u6027\u548c\u6a21\u677f\u751f\u6210\u63a7\u4ef6\u5185\u5bb9 + * @protected + */ + setTplContent : function () { + var _self = this, + attrs = _self.getAttrVals(); + _self.get('view').setTplContent(attrs); + }, + //\u6a21\u677f\u53d1\u751f\u6539\u53d8 + _uiSetTpl : function(){ + this.setTplContent(); + } + }; + + + tpl.View = tplView; + + return tpl; +}); + + +/** + * @fileOverview \u53ef\u4ee5\u5c55\u5f00\u6298\u53e0\u7684\u63a7\u4ef6 + * @ignore + */ + +define('bui/component/uibase/collapseable',function () { + + /** + * \u63a7\u4ef6\u5c55\u5f00\u6298\u53e0\u7684\u89c6\u56fe\u7c7b + * @class BUI.Component.UIBase.CollapseableView + * @private + */ + var collapseableView = function(){ + + }; + + collapseableView.ATTRS = { + collapsed : {} + } + + collapseableView.prototype = { + //\u8bbe\u7f6e\u6536\u7f29\u6837\u5f0f + _uiSetCollapsed : function(v){ + var _self = this, + cls = _self.getStatusCls('collapsed'), + el = _self.get('el'); + if(v){ + el.addClass(cls); + }else{ + el.removeClass(cls); + } + } + } + /** + * \u63a7\u4ef6\u5c55\u5f00\u6298\u53e0\u7684\u6269\u5c55 + * @class BUI.Component.UIBase.Collapseable + */ + var collapseable = function(){ + + }; + + collapseable.ATTRS = { + /** + * \u662f\u5426\u53ef\u6298\u53e0 + * @type {Boolean} + */ + collapseable: { + value : false + }, + /** + * \u662f\u5426\u5df2\u7ecf\u6298\u53e0 collapsed + * @cfg {Boolean} collapsed + */ + /** + * \u662f\u5426\u5df2\u7ecf\u6298\u53e0 + * @type {Boolean} + */ + collapsed : { + view : true, + value : false + }, + events : { + value : { + /** + * \u63a7\u4ef6\u5c55\u5f00 + * @event + * @param {Object} e \u4e8b\u4ef6\u5bf9\u8c61 + * @param {BUI.Component.Controller} target \u63a7\u4ef6 + */ + 'expanded' : true, + /** + * \u63a7\u4ef6\u6298\u53e0 + * @event + * @param {Object} e \u4e8b\u4ef6\u5bf9\u8c61 + * @param {BUI.Component.Controller} target \u63a7\u4ef6 + */ + 'collapsed' : true + } + } + }; + + collapseable.prototype = { + _uiSetCollapsed : function(v){ + var _self = this; + if(v){ + _self.fire('collapsed'); + }else{ + _self.fire('expanded'); + } + } + }; + + collapseable.View = collapseableView; + + return collapseable; +});/** + * @fileOverview \u5355\u9009\u6216\u8005\u591a\u9009 + * @author dxq613@gmail.com + * @ignore + */ +define('bui/component/uibase/selection',function () { + var + SINGLE_SELECTED = 'single'; + + /** + * @class BUI.Component.UIBase.Selection + * \u9009\u4e2d\u63a7\u4ef6\u4e2d\u7684\u9879\uff08\u5b50\u5143\u7d20\u6216\u8005DOM\uff09\uff0c\u6b64\u7c7b\u9009\u62e9\u7684\u5185\u5bb9\u67092\u79cd + *
            + *
          1. \u5b50\u63a7\u4ef6
          2. + *
          3. DOM\u5143\u7d20
          4. + *
          + * ** \u5f53\u9009\u62e9\u662f\u5b50\u63a7\u4ef6\u65f6\uff0celement \u548c item \u90fd\u662f\u6307 \u5b50\u63a7\u4ef6\uff1b** + * ** \u5f53\u9009\u62e9\u7684\u662fDOM\u5143\u7d20\u65f6\uff0celement \u6307DOM\u5143\u7d20\uff0citem \u6307DOM\u5143\u7d20\u5bf9\u5e94\u7684\u8bb0\u5f55 ** + * @abstract + */ + var selection = function(){ + + }; + + selection.ATTRS = + /** + * @lends BUI.Component.UIBase.Selection# + * @ignore + */ + { + /** + * \u9009\u4e2d\u7684\u4e8b\u4ef6 + *
          
          +         * var list = new List.SimpleList({
          +         *   itemTpl : '<li id="{value}">{text}</li>',
          +         *   idField : 'value',
          +         *   selectedEvent : 'mouseenter',
          +         *   render : '#t1',
          +         *   items : [{value : '1',text : '1'},{value : '2',text : '2'}]
          +         * });
          +         * 
          + * @cfg {String} [selectedEvent = 'click'] + */ + selectedEvent:{ + value : 'click' + }, + events : { + value : { + /** + * \u9009\u4e2d\u7684\u83dc\u5355\u6539\u53d8\u65f6\u53d1\u751f\uff0c + * \u591a\u9009\u65f6\uff0c\u9009\u4e2d\uff0c\u53d6\u6d88\u9009\u4e2d\u90fd\u89e6\u53d1\u6b64\u4e8b\u4ef6\uff0c\u5355\u9009\u65f6\uff0c\u53ea\u6709\u9009\u4e2d\u65f6\u89e6\u53d1\u6b64\u4e8b\u4ef6 + * @name BUI.Component.UIBase.Selection#selectedchange + * @event + * @param {Object} e \u4e8b\u4ef6\u5bf9\u8c61 + * @param {Object} e.item \u5f53\u524d\u9009\u4e2d\u7684\u9879 + * @param {HTMLElement} e.domTarget \u5f53\u524d\u9009\u4e2d\u7684\u9879\u7684DOM\u7ed3\u6784 + * @param {Boolean} e.selected \u662f\u5426\u9009\u4e2d + */ + 'selectedchange' : false, + + /** + * \u9009\u62e9\u6539\u53d8\u524d\u89e6\u53d1\uff0c\u53ef\u4ee5\u901a\u8fc7return false\uff0c\u963b\u6b62selectedchange\u4e8b\u4ef6 + * @event + * @param {Object} e \u4e8b\u4ef6\u5bf9\u8c61 + * @param {Object} e.item \u5f53\u524d\u9009\u4e2d\u7684\u9879 + * @param {Boolean} e.selected \u662f\u5426\u9009\u4e2d + */ + 'beforeselectedchange' : false, + + /** + * \u83dc\u5355\u9009\u4e2d + * @event + * @param {Object} e \u4e8b\u4ef6\u5bf9\u8c61 + * @param {Object} e.item \u5f53\u524d\u9009\u4e2d\u7684\u9879 + * @param {HTMLElement} e.domTarget \u5f53\u524d\u9009\u4e2d\u7684\u9879\u7684DOM\u7ed3\u6784 + */ + 'itemselected' : false, + /** + * \u83dc\u5355\u53d6\u6d88\u9009\u4e2d + * @event + * @param {Object} e \u4e8b\u4ef6\u5bf9\u8c61 + * @param {Object} e.item \u5f53\u524d\u9009\u4e2d\u7684\u9879 + * @param {HTMLElement} e.domTarget \u5f53\u524d\u9009\u4e2d\u7684\u9879\u7684DOM\u7ed3\u6784 + */ + 'itemunselected' : false + } + }, + /** + * \u6570\u636e\u7684id\u5b57\u6bb5\u540d\u79f0\uff0c\u901a\u8fc7\u6b64\u5b57\u6bb5\u67e5\u627e\u5bf9\u5e94\u7684\u6570\u636e + *
          
          +         * var list = new List.SimpleList({
          +         *   itemTpl : '<li id="{value}">{text}</li>',
          +         *   idField : 'value',
          +         *   render : '#t1',
          +         *   items : [{value : '1',text : '1'},{value : '2',text : '2'}]
          +         * });
          +         * 
          + * @cfg {String} [idField = 'id'] + */ + /** + * \u6570\u636e\u7684id\u5b57\u6bb5\u540d\u79f0\uff0c\u901a\u8fc7\u6b64\u5b57\u6bb5\u67e5\u627e\u5bf9\u5e94\u7684\u6570\u636e + * @type {String} + * @ignore + */ + idField : { + value : 'id' + }, + /** + * \u662f\u5426\u591a\u9009 + *
          
          +         * var list = new List.SimpleList({
          +         *   itemTpl : '<li id="{value}">{text}</li>',
          +         *   idField : 'value',
          +         *   render : '#t1',
          +         *   multipleSelect : true,
          +         *   items : [{value : '1',text : '1'},{value : '2',text : '2'}]
          +         * });
          +         * 
          + * @cfg {Boolean} [multipleSelect=false] + */ + /** + * \u662f\u5426\u591a\u9009 + * @type {Boolean} + * @default false + */ + multipleSelect : { + value : false + } + + }; + + selection.prototype = + /** + * @lends BUI.Component.UIBase.Selection.prototype + * @ignore + */ + { + /** + * \u6e05\u7406\u9009\u4e2d\u7684\u9879 + *
          
          +         *  list.clearSelection();
          +         * 
          + * + */ + clearSelection : function(){ + var _self = this, + selection = _self.getSelection(); + BUI.each(selection,function(item){ + _self.clearSelected(item); + }); + }, + /** + * \u83b7\u53d6\u9009\u4e2d\u7684\u9879\u7684\u503c + * @template + * @return {Array} + */ + getSelection : function(){ + + }, + /** + * \u83b7\u53d6\u9009\u4e2d\u7684\u7b2c\u4e00\u9879 + *
          
          +         * var item = list.getSelected(); //\u591a\u9009\u6a21\u5f0f\u4e0b\u7b2c\u4e00\u6761
          +         * 
          + * @return {Object} \u9009\u4e2d\u7684\u7b2c\u4e00\u9879\u6216\u8005\u4e3aundefined + */ + getSelected : function(){ + return this.getSelection()[0]; + }, + /** + * \u6839\u636e idField \u83b7\u53d6\u5230\u7684\u503c + * @protected + * @return {Object} \u9009\u4e2d\u7684\u503c + */ + getSelectedValue : function(){ + var _self = this, + field = _self.get('idField'), + item = _self.getSelected(); + + return _self.getValueByField(item,field); + }, + /** + * \u83b7\u53d6\u9009\u4e2d\u7684\u503c\u96c6\u5408 + * @protected + * @return {Array} \u9009\u4e2d\u503c\u5f97\u96c6\u5408 + */ + getSelectionValues:function(){ + var _self = this, + field = _self.get('idField'), + items = _self.getSelection(); + return $.map(items,function(item){ + return _self.getValueByField(item,field); + }); + }, + /** + * \u83b7\u53d6\u9009\u4e2d\u7684\u6587\u672c + * @protected + * @return {Array} \u9009\u4e2d\u7684\u6587\u672c\u96c6\u5408 + */ + getSelectionText:function(){ + var _self = this, + items = _self.getSelection(); + return $.map(items,function(item){ + return _self.getItemText(item); + }); + }, + /** + * \u79fb\u9664\u9009\u4e2d + *
          
          +         *    var item = list.getItem('id'); //\u901a\u8fc7id \u83b7\u53d6\u9009\u9879
          +         *    list.setSelected(item); //\u9009\u4e2d
          +         *
          +         *    list.clearSelected();//\u5355\u9009\u6a21\u5f0f\u4e0b\u6e05\u9664\u6240\u9009\uff0c\u591a\u9009\u6a21\u5f0f\u4e0b\u6e05\u9664\u9009\u4e2d\u7684\u7b2c\u4e00\u9879
          +         *    list.clearSelected(item); //\u6e05\u9664\u9009\u9879\u7684\u9009\u4e2d\u72b6\u6001
          +         * 
          + * @param {Object} [item] \u6e05\u9664\u9009\u9879\u7684\u9009\u4e2d\u72b6\u6001\uff0c\u5982\u679c\u672a\u6307\u5b9a\u5219\u6e05\u9664\u9009\u4e2d\u7684\u7b2c\u4e00\u4e2a\u9009\u9879\u7684\u9009\u4e2d\u72b6\u6001 + */ + clearSelected : function(item){ + var _self = this; + item = item || _self.getSelected(); + if(item){ + _self.setItemSelected(item,false); + } + }, + /** + * \u83b7\u53d6\u9009\u9879\u663e\u793a\u7684\u6587\u672c + * @protected + */ + getSelectedText : function(){ + var _self = this, + item = _self.getSelected(); + return _self.getItemText(item); + }, + /** + * \u8bbe\u7f6e\u9009\u4e2d\u7684\u9879 + *
          
          +         *  var items = list.getItemsByStatus('active'); //\u83b7\u53d6\u67d0\u79cd\u72b6\u6001\u7684\u9009\u9879
          +         *  list.setSelection(items);
          +         * 
          + * @param {Array} items \u9879\u7684\u96c6\u5408 + */ + setSelection: function(items){ + var _self = this; + + items = BUI.isArray(items) ? items : [items]; + + BUI.each(items,function(item){ + _self.setSelected(item); + }); + }, + /** + * \u8bbe\u7f6e\u9009\u4e2d\u7684\u9879 + *
          
          +         *   var item = list.getItem('id');
          +         *   list.setSelected(item);
          +         * 
          + * @param {Object} item \u8bb0\u5f55\u6216\u8005\u5b50\u63a7\u4ef6 + * @param {BUI.Component.Controller|Object} element \u5b50\u63a7\u4ef6\u6216\u8005DOM\u7ed3\u6784 + */ + setSelected: function(item){ + var _self = this, + multipleSelect = _self.get('multipleSelect'); + + if(!multipleSelect){ + var selectedItem = _self.getSelected(); + if(item != selectedItem){ + //\u5982\u679c\u662f\u5355\u9009\uff0c\u6e05\u9664\u5df2\u7ecf\u9009\u4e2d\u7684\u9879 + _self.clearSelected(selectedItem); + } + + } + _self.setItemSelected(item,true); + + }, + /** + * \u9009\u9879\u662f\u5426\u88ab\u9009\u4e2d + * @template + * @param {*} item \u9009\u9879 + * @return {Boolean} \u662f\u5426\u9009\u4e2d + */ + isItemSelected : function(item){ + + }, + /** + * \u8bbe\u7f6e\u9009\u9879\u7684\u9009\u4e2d\u72b6\u6001 + * @param {*} item \u9009\u9879 + * @param {Boolean} selected \u9009\u4e2d\u6216\u8005\u53d6\u6d88\u9009\u4e2d + * @protected + */ + setItemSelected : function(item,selected){ + var _self = this, + isSelected; + //\u5f53\u524d\u72b6\u6001\u7b49\u4e8e\u8981\u8bbe\u7f6e\u7684\u72b6\u6001\u65f6\uff0c\u4e0d\u89e6\u53d1\u6539\u53d8\u4e8b\u4ef6 + if(item){ + isSelected = _self.isItemSelected(item); + if(isSelected == selected){ + return; + } + } + if(_self.fire('beforeselectedchange') !== false){ + _self.setItemSelectedStatus(item,selected); + } + }, + /** + * \u8bbe\u7f6e\u9009\u9879\u7684\u9009\u4e2d\u72b6\u6001 + * @template + * @param {*} item \u9009\u9879 + * @param {Boolean} selected \u9009\u4e2d\u6216\u8005\u53d6\u6d88\u9009\u4e2d + * @protected + */ + setItemSelectedStatus : function(item,selected){ + + }, + /** + * \u8bbe\u7f6e\u6240\u6709\u9009\u9879\u9009\u4e2d + *
          
          +         *  list.setAllSelection(); //\u9009\u4e2d\u5168\u90e8\uff0c\u591a\u9009\u72b6\u6001\u4e0b\u6709\u6548
          +         * 
          + * @template + */ + setAllSelection : function(){ + + }, + /** + * \u8bbe\u7f6e\u9879\u9009\u4e2d\uff0c\u901a\u8fc7\u5b57\u6bb5\u548c\u503c + * @param {String} field \u5b57\u6bb5\u540d,\u9ed8\u8ba4\u4e3a\u914d\u7f6e\u9879'idField',\u6240\u4ee5\u6b64\u5b57\u6bb5\u53ef\u4ee5\u4e0d\u586b\u5199\uff0c\u4ec5\u586b\u5199\u503c + * @param {Object} value \u503c + * @example + *
          
          +         * var list = new List.SimpleList({
          +         *   itemTpl : '<li id="{id}">{text}</li>',
          +         *   idField : 'id', //id \u5b57\u6bb5\u4f5c\u4e3akey
          +         *   render : '#t1',
          +         *   items : [{id : '1',text : '1'},{id : '2',text : '2'}]
          +         * });
          +         *
          +         *   list.setSelectedByField('123'); //\u9ed8\u8ba4\u6309\u7167id\u5b57\u6bb5\u67e5\u627e
          +         *   //\u6216\u8005
          +         *   list.setSelectedByField('id','123');
          +         *
          +         *   list.setSelectedByField('value','123');
          +         * 
          + */ + setSelectedByField:function(field,value){ + if(!value){ + value = field; + field = this.get('idField'); + } + var _self = this, + item = _self.findItemByField(field,value); + _self.setSelected(item); + }, + /** + * \u8bbe\u7f6e\u591a\u4e2a\u9009\u4e2d\uff0c\u6839\u636e\u5b57\u6bb5\u548c\u503c + *
          
          +         * var list = new List.SimpleList({
          +         *   itemTpl : '<li id="{value}">{text}</li>',
          +         *   idField : 'value', //value \u5b57\u6bb5\u4f5c\u4e3akey
          +         *   render : '#t1',
          +         *   multipleSelect : true,
          +         *   items : [{value : '1',text : '1'},{value : '2',text : '2'}]
          +         * });
          +         *   var values = ['1','2','3'];
          +         *   list.setSelectionByField(values);//
          +         *
          +         *   //\u7b49\u4e8e
          +         *   list.setSelectionByField('value',values);
          +         * 
          + * @param {String} field \u9ed8\u8ba4\u4e3aidField + * @param {Array} values \u503c\u5f97\u96c6\u5408 + */ + setSelectionByField:function(field,values){ + if(!values){ + values = field; + field = this.get('idField'); + } + var _self = this; + BUI.each(values,function(value){ + _self.setSelectedByField(field,value); + }); + }, + /** + * \u9009\u4e2d\u5b8c\u6210\u540e\uff0c\u89e6\u53d1\u4e8b\u4ef6 + * @protected + * @param {*} item \u9009\u9879 + * @param {Boolean} selected \u662f\u5426\u9009\u4e2d + * @param {jQuery} element + */ + afterSelected : function(item,selected,element){ + var _self = this; + + if(selected){ + _self.fire('itemselected',{item:item,domTarget:element}); + _self.fire('selectedchange',{item:item,domTarget:element,selected:selected}); + }else{ + _self.fire('itemunselected',{item:item,domTarget:element}); + if(_self.get('multipleSelect')){ //\u53ea\u6709\u5f53\u591a\u9009\u65f6\uff0c\u53d6\u6d88\u9009\u4e2d\u624d\u89e6\u53d1selectedchange + _self.fire('selectedchange',{item:item,domTarget:element,selected:selected}); + } + } + } + + } + + return selection; +});/** + * @fileOverview \u6240\u6709\u5b50\u5143\u7d20\u90fd\u662f\u540c\u4e00\u7c7b\u7684\u96c6\u5408 + * @ignore + */ + +define('bui/component/uibase/list',['bui/component/uibase/selection'],function (require) { + + var Selection = require('bui/component/uibase/selection'); + + /** + * \u5217\u8868\u4e00\u7c7b\u7684\u63a7\u4ef6\u7684\u6269\u5c55\uff0clist,menu,grid\u90fd\u662f\u53ef\u4ee5\u4ece\u6b64\u7c7b\u6269\u5c55 + * @class BUI.Component.UIBase.List + */ + var list = function(){ + + }; + + list.ATTRS = { + + /** + * \u9009\u62e9\u7684\u6570\u636e\u96c6\u5408 + *
          
          +     * var list = new List.SimpleList({
          +     *   itemTpl : '<li id="{value}">{text}</li>',
          +     *   idField : 'value',
          +     *   render : '#t1',
          +     *   items : [{value : '1',text : '1'},{value : '2',text : '2'}]
          +     * });
          +     * list.render();
          +     * 
          + * @cfg {Array} items + */ + /** + * \u9009\u62e9\u7684\u6570\u636e\u96c6\u5408 + *
          
          +     *  list.set('items',items); //\u5217\u8868\u4f1a\u76f4\u63a5\u66ff\u6362\u5185\u5bb9
          +     *  //\u7b49\u540c\u4e8e 
          +     *  list.clearItems();
          +     *  list.addItems(items);
          +     * 
          + * @type {Array} + */ + items:{ + view : true + }, + /** + * \u9009\u9879\u7684\u9ed8\u8ba4key\u503c + * @cfg {String} [idField = 'id'] + */ + idField : { + value : 'id' + }, + /** + * \u5217\u8868\u9879\u7684\u9ed8\u8ba4\u6a21\u677f,\u4ec5\u5728\u521d\u59cb\u5316\u65f6\u4f20\u5165\u3002 + * @type {String} + * @ignore + */ + itemTpl : { + view : true + }, + /** + * \u5217\u8868\u9879\u7684\u6e32\u67d3\u51fd\u6570\uff0c\u5e94\u5bf9\u5217\u8868\u9879\u4e4b\u95f4\u6709\u5f88\u591a\u5dee\u5f02\u65f6 + *
          
          +     * var list = new List.SimpleList({
          +     *   itemTplRender : function(item){
          +     *     if(item.type == '1'){
          +     *       return '<li><img src="xxx.jpg"/>'+item.text+'</li>'
          +     *     }else{
          +     *       return '<li>item.text</li>'
          +     *     }
          +     *   },
          +     *   idField : 'value',
          +     *   render : '#t1',
          +     *   items : [{value : '1',text : '1',type : '0'},{value : '2',text : '2',type : '1'}]
          +     * });
          +     * list.render();
          +     * 
          + * @type {Function} + */ + itemTplRender : { + view : true + }, + /** + * \u5b50\u63a7\u4ef6\u5404\u4e2a\u72b6\u6001\u9ed8\u8ba4\u91c7\u7528\u7684\u6837\u5f0f + *
          
          +     * var list = new List.SimpleList({
          +     *   render : '#t1',
          +     *   itemStatusCls : {
          +     *     selected : 'active', //\u9ed8\u8ba4\u6837\u5f0f\u4e3alist-item-selected,\u73b0\u5728\u53d8\u6210'active'
          +     *     hover : 'hover' //\u9ed8\u8ba4\u6837\u5f0f\u4e3alist-item-hover,\u73b0\u5728\u53d8\u6210'hover'
          +     *   },
          +     *   items : [{id : '1',text : '1',type : '0'},{id : '2',text : '2',type : '1'}]
          +     * });
          +     * list.render();
          +     * 
          + * see {@link BUI.Component.Controller#property-statusCls} + * @type {Object} + */ + itemStatusCls : { + view : true, + value : {} + }, + events : { + + value : { + /** + * \u9009\u9879\u70b9\u51fb\u4e8b\u4ef6 + * @event + * @param {Object} e \u4e8b\u4ef6\u5bf9\u8c61 + * @param {BUI.Component.UIBase.ListItem} e.item \u70b9\u51fb\u7684\u9009\u9879 + * @param {HTMLElement} e.element \u9009\u9879\u4ee3\u8868\u7684DOM\u5bf9\u8c61 + * @param {HTMLElement} e.domTarget \u70b9\u51fb\u7684DOM\u5bf9\u8c61 + * @param {HTMLElement} e.domEvent \u70b9\u51fb\u7684\u539f\u751f\u4e8b\u4ef6\u5bf9\u8c61 + */ + 'itemclick' : true + } + } + }; + + list.prototype = { + + /** + * \u83b7\u53d6\u9009\u9879\u7684\u6570\u91cf + *
          
          +     *   var count = list.getItemCount();
          +     * 
          + * @return {Number} \u9009\u9879\u6570\u91cf + */ + getItemCount : function () { + return this.getItems().length; + }, + /** + * \u83b7\u53d6\u5b57\u6bb5\u7684\u503c + * @param {*} item \u5b57\u6bb5\u540d + * @param {String} field \u5b57\u6bb5\u540d + * @return {*} \u5b57\u6bb5\u7684\u503c + * @protected + */ + getValueByField : function(item,field){ + + }, + /** + * \u83b7\u53d6\u6240\u6709\u9009\u9879\u503c\uff0c\u5982\u679c\u9009\u9879\u662f\u5b50\u63a7\u4ef6\uff0c\u5219\u662f\u6240\u6709\u5b50\u63a7\u4ef6 + *
          
          +     *   var items = list.getItems();
          +     *   //\u7b49\u540c
          +     *   list.get(items);
          +     * 
          + * @return {Array} \u9009\u9879\u503c\u96c6\u5408 + */ + getItems : function () { + + }, + /** + * \u83b7\u53d6\u7b2c\u4e00\u9879 + *
          
          +     *   var item = list.getFirstItem();
          +     *   //\u7b49\u540c
          +     *   list.getItemAt(0);
          +     * 
          + * @return {Object|BUI.Component.Controller} \u9009\u9879\u503c\uff08\u5b50\u63a7\u4ef6\uff09 + */ + getFirstItem : function () { + return this.getItemAt(0); + }, + /** + * \u83b7\u53d6\u6700\u540e\u4e00\u9879 + *
          
          +     *   var item = list.getLastItem();
          +     *   //\u7b49\u540c
          +     *   list.getItemAt(list.getItemCount()-1);
          +     * 
          + * @return {Object|BUI.Component.Controller} \u9009\u9879\u503c\uff08\u5b50\u63a7\u4ef6\uff09 + */ + getLastItem : function () { + return this.getItemAt(this.getItemCount() - 1); + }, + /** + * \u901a\u8fc7\u7d22\u5f15\u83b7\u53d6\u9009\u9879\u503c\uff08\u5b50\u63a7\u4ef6\uff09 + *
          
          +     *   var item = list.getItemAt(0); //\u83b7\u53d6\u7b2c1\u4e2a
          +     *   var item = list.getItemAt(2); //\u83b7\u53d6\u7b2c3\u4e2a
          +     * 
          + * @param {Number} index \u7d22\u5f15\u503c + * @return {Object|BUI.Component.Controller} \u9009\u9879\uff08\u5b50\u63a7\u4ef6\uff09 + */ + getItemAt : function (index) { + return this.getItems()[index] || null; + }, + /** + * \u901a\u8fc7Id\u83b7\u53d6\u9009\u9879\uff0c\u5982\u679c\u662f\u6539\u53d8\u4e86idField\u5219\u901a\u8fc7\u6539\u53d8\u7684idField\u6765\u67e5\u627e\u9009\u9879 + *
          
          +     *   //\u5982\u679cidField = 'id'
          +     *   var item = list.getItem('2'); 
          +     *   //\u7b49\u540c\u4e8e
          +     *   list.findItemByField('id','2');
          +     *
          +     *   //\u5982\u679cidField = 'value'
          +     *   var item = list.getItem('2'); 
          +     *   //\u7b49\u540c\u4e8e
          +     *   list.findItemByField('value','2');
          +     * 
          + * @param {String} id \u7f16\u53f7 + * @return {Object|BUI.Component.Controller} \u9009\u9879\uff08\u5b50\u63a7\u4ef6\uff09 + */ + getItem : function(id){ + var field = this.get('idField'); + return this.findItemByField(field,id); + }, + /** + * \u8fd4\u56de\u6307\u5b9a\u9879\u7684\u7d22\u5f15 + *
          
          +     * var index = list.indexOf(item); //\u8fd4\u56de\u7d22\u5f15\uff0c\u4e0d\u5b58\u5728\u5219\u8fd4\u56de-1
          +     * 
          + * @param {Object|BUI.Component.Controller} \u9009\u9879 + * @return {Number} \u9879\u7684\u7d22\u5f15\u503c + */ + indexOfItem : function(item){ + return BUI.Array.indexOf(item,this.getItems()); + }, + /** + * \u6dfb\u52a0\u591a\u6761\u9009\u9879 + *
          
          +     * var items = [{id : '1',text : '1'},{id : '2',text : '2'}];
          +     * list.addItems(items);
          +     * 
          + * @param {Array} items \u8bb0\u5f55\u96c6\u5408\uff08\u5b50\u63a7\u4ef6\u914d\u7f6e\u9879\uff09 + */ + addItems : function (items) { + var _self = this; + BUI.each(items,function (item) { + _self.addItem(item); + }); + }, + /** + * \u63d2\u5165\u591a\u6761\u8bb0\u5f55 + *
          
          +     * var items = [{id : '1',text : '1'},{id : '2',text : '2'}];
          +     * list.addItemsAt(items,0); // \u5728\u6700\u524d\u9762\u63d2\u5165
          +     * list.addItemsAt(items,2); //\u7b2c\u4e09\u4e2a\u4f4d\u7f6e\u63d2\u5165
          +     * 
          + * @param {Array} items \u591a\u6761\u8bb0\u5f55 + * @param {Number} start \u8d77\u59cb\u4f4d\u7f6e + */ + addItemsAt : function(items,start){ + var _self = this; + BUI.each(items,function (item,index) { + _self.addItemAt(item,start + index); + }); + }, + /** + * \u66f4\u65b0\u5217\u8868\u9879\uff0c\u4fee\u6539\u9009\u9879\u503c\u540e\uff0cDOM\u8ddf\u968f\u53d8\u5316 + *
          
          +     *   var item = list.getItem('2');
          +     *   list.text = '\u65b0\u5185\u5bb9'; //\u6b64\u65f6\u5bf9\u5e94\u7684DOM\u4e0d\u4f1a\u53d8\u5316
          +     *   list.updateItem(item); //DOM\u8fdb\u884c\u76f8\u5e94\u7684\u53d8\u5316
          +     * 
          + * @param {Object} item \u9009\u9879\u503c + */ + updateItem : function(item){ + + }, + /** + * \u6dfb\u52a0\u9009\u9879,\u6dfb\u52a0\u5728\u63a7\u4ef6\u6700\u540e + * + *
          
          +     * list.addItem({id : '3',text : '3',type : '0'});
          +     * 
          + * + * @param {Object|BUI.Component.Controller} item \u9009\u9879\uff0c\u5b50\u63a7\u4ef6\u914d\u7f6e\u9879\u3001\u5b50\u63a7\u4ef6 + * @return {Object|BUI.Component.Controller} \u5b50\u63a7\u4ef6\u6216\u8005\u9009\u9879\u8bb0\u5f55 + */ + addItem : function (item) { + return this.addItemAt(item,this.getItemCount()); + }, + /** + * \u5728\u6307\u5b9a\u4f4d\u7f6e\u6dfb\u52a0\u9009\u9879 + *
          
          +     * list.addItemAt({id : '3',text : '3',type : '0'},0); //\u7b2c\u4e00\u4e2a\u4f4d\u7f6e
          +     * 
          + * @param {Object|BUI.Component.Controller} item \u9009\u9879\uff0c\u5b50\u63a7\u4ef6\u914d\u7f6e\u9879\u3001\u5b50\u63a7\u4ef6 + * @param {Number} index \u7d22\u5f15 + * @return {Object|BUI.Component.Controller} \u5b50\u63a7\u4ef6\u6216\u8005\u9009\u9879\u8bb0\u5f55 + */ + addItemAt : function(item,index) { + + }, + /** + * \u6839\u636e\u5b57\u6bb5\u67e5\u627e\u6307\u5b9a\u7684\u9879 + * @param {String} field \u5b57\u6bb5\u540d + * @param {Object} value \u5b57\u6bb5\u503c + * @return {Object} \u67e5\u8be2\u51fa\u6765\u7684\u9879\uff08\u4f20\u5165\u7684\u8bb0\u5f55\u6216\u8005\u5b50\u63a7\u4ef6\uff09 + * @protected + */ + findItemByField:function(field,value){ + + }, + /** + * + * \u83b7\u53d6\u6b64\u9879\u663e\u793a\u7684\u6587\u672c + * @param {Object} item \u83b7\u53d6\u8bb0\u5f55\u663e\u793a\u7684\u6587\u672c + * @protected + */ + getItemText:function(item){ + + }, + /** + * \u6e05\u9664\u6240\u6709\u9009\u9879,\u4e0d\u7b49\u540c\u4e8e\u5220\u9664\u5168\u90e8\uff0c\u6b64\u65f6\u4e0d\u4f1a\u89e6\u53d1\u5220\u9664\u4e8b\u4ef6 + *
          
          +     * list.clearItems(); 
          +     * //\u7b49\u540c\u4e8e
          +     * list.set('items',items);
          +     * 
          + */ + clearItems : function(){ + var _self = this, + items = _self.getItems(); + items.splice(0); + _self.clearControl(); + }, + /** + * \u5220\u9664\u9009\u9879 + *
          
          +     * var item = list.getItem('1');
          +     * list.removeItem(item);
          +     * 
          + * @param {Object|BUI.Component.Controller} item \u9009\u9879\uff08\u5b50\u63a7\u4ef6\uff09 + */ + removeItem : function (item) { + + }, + /** + * \u79fb\u9664\u9009\u9879\u96c6\u5408 + *
          
          +     * var items = list.getSelection();
          +     * list.removeItems(items);
          +     * 
          + * @param {Array} items \u9009\u9879\u96c6\u5408 + */ + removeItems : function(items){ + var _self = this; + + BUI.each(items,function(item){ + _self.removeItem(item); + }); + }, + /** + * \u901a\u8fc7\u7d22\u5f15\u5220\u9664\u9009\u9879 + *
          
          +     * list.removeItemAt(0); //\u5220\u9664\u7b2c\u4e00\u4e2a
          +     * 
          + * @param {Number} index \u7d22\u5f15 + */ + removeItemAt : function (index) { + this.removeItem(this.getItemAt(index)); + }, + /** + * @protected + * @template + * \u6e05\u9664\u6240\u6709\u7684\u5b50\u63a7\u4ef6\u6216\u8005\u5217\u8868\u9879\u7684DOM + */ + clearControl : function(){ + + } + } + + + + + + function clearSelected(item){ + if(item.selected){ + item.selected = false; + } + if(item.set){ + item.set('selected',false); + } + } + + function beforeAddItem(self,item){ + + var c = item.isController ? item.getAttrVals() : item, + defaultTpl = self.get('itemTpl'), + defaultStatusCls = self.get('itemStatusCls'), + defaultTplRender = self.get('itemTplRender'); + + //\u914d\u7f6e\u9ed8\u8ba4\u6a21\u677f + if(defaultTpl && !c.tpl){ + setItemAttr(item,'tpl',defaultTpl); + // c.tpl = defaultTpl; + } + //\u914d\u7f6e\u9ed8\u8ba4\u6e32\u67d3\u51fd\u6570 + if(defaultTplRender && !c.tplRender){ + setItemAttr(item,'tplRender',defaultTplRender); + //c.tplRender = defaultTplRender; + } + //\u914d\u7f6e\u9ed8\u8ba4\u72b6\u6001\u6837\u5f0f + if(defaultStatusCls){ + var statusCls = c.statusCls || item.isController ? item.get('statusCls') : {}; + BUI.each(defaultStatusCls,function(v,k){ + if(v && !statusCls[k]){ + statusCls[k] = v; + } + }); + setItemAttr(item,'statusCls',statusCls) + //item.statusCls = statusCls; + } + // clearSelected(item); + } + function setItemAttr(item,name,val){ + if(item.isController){ + item.set(name,val); + }else{ + item[name] = val; + } + } + + /** + * @class BUI.Component.UIBase.ChildList + * \u9009\u4e2d\u5176\u4e2d\u7684DOM\u7ed3\u6784 + * @extends BUI.Component.UIBase.List + * @mixins BUI.Component.UIBase.Selection + */ + var childList = function(){ + this.__init(); + }; + + childList.ATTRS = BUI.merge(true,list.ATTRS,Selection.ATTRS,{ + items : { + sync : false + }, + /** + * \u914d\u7f6e\u7684items \u9879\u662f\u5728\u521d\u59cb\u5316\u65f6\u4f5c\u4e3achildren + * @protected + * @type {Boolean} + */ + autoInitItems : { + value : true + }, + /** + * \u9ed8\u8ba4\u7684\u52a0\u8f7d\u63a7\u4ef6\u5185\u5bb9\u7684\u914d\u7f6e,\u9ed8\u8ba4\u503c\uff1a + *
          +     *  {
          +     *   property : 'children',
          +     *   dataType : 'json'
          +     * }
          +     * 
          + * @type {Object} + */ + defaultLoaderCfg : { + value : { + property : 'children', + dataType : 'json' + } + } + }); + + BUI.augment(childList,list,Selection,{ + //\u521d\u59cb\u5316\uff0c\u5c06items\u8f6c\u6362\u6210children + __init : function(){ + var _self = this, + items = _self.get('items'); + if(items && _self.get('autoInitItems')){ + _self.addItems(items); + } + _self.on('beforeRenderUI',function(){ + _self._beforeRenderUI(); + }); + }, + _uiSetItems : function (items) { + var _self = this; + //\u6e05\u7406\u5b50\u63a7\u4ef6 + _self.clearControl(); + _self.addItems(items); + }, + //\u6e32\u67d3\u5b50\u63a7\u4ef6 + _beforeRenderUI : function(){ + var _self = this, + children = _self.get('children'), + items = _self.get('items'); + BUI.each(children,function(item){ + beforeAddItem(_self,item); + }); + }, + //\u7ed1\u5b9a\u4e8b\u4ef6 + __bindUI : function(){ + var _self = this, + selectedEvent = _self.get('selectedEvent'); + + _self.on(selectedEvent,function(e){ + var item = e.target; + if(item.get('selectable')){ + if(!item.get('selected')){ + _self.setSelected(item); + }else if(_self.get('multipleSelect')){ + _self.clearSelected(item); + } + } + }); + + _self.on('click',function(e){ + if(e.target !== _self){ + _self.fire('itemclick',{item:e.target,domTarget : e.domTarget,domEvent : e}); + } + }); + _self.on('beforeAddChild',function(ev){ + beforeAddItem(_self,ev.child); + }); + _self.on('beforeRemoveChild',function(ev){ + var item = ev.child, + selected = item.get('selected'); + //\u6e05\u7406\u9009\u4e2d\u72b6\u6001 + if(selected){ + if(_self.get('multipleSelect')){ + _self.clearSelected(item); + }else{ + _self.setSelected(null); + } + } + item.set('selected',false); + }); + }, + /** + * @protected + * @override + * \u6e05\u9664\u8005\u5217\u8868\u9879\u7684DOM + */ + clearControl : function(){ + this.removeChildren(true); + }, + /** + * \u83b7\u53d6\u6240\u6709\u5b50\u63a7\u4ef6 + * @return {Array} \u5b50\u63a7\u4ef6\u96c6\u5408 + * @override + */ + getItems : function () { + return this.get('children'); + }, + /** + * \u66f4\u65b0\u5217\u8868\u9879 + * @param {Object} item \u9009\u9879\u503c + */ + updateItem : function(item){ + var _self = this, + idField = _self.get('idField'), + element = _self.findItemByField(idField,item[idField]); + if(element){ + element.setTplContent(); + } + return element; + }, + /** + * \u5220\u9664\u9879,\u5b50\u63a7\u4ef6\u4f5c\u4e3a\u9009\u9879 + * @param {Object} element \u5b50\u63a7\u4ef6 + */ + removeItem : function (item) { + var _self = this, + idField = _self.get('idField'); + if(!(item instanceof BUI.Component.Controller)){ + item = _self.findItemByField(idField,item[idField]); + } + this.removeChild(item,true); + }, + /** + * \u5728\u6307\u5b9a\u4f4d\u7f6e\u6dfb\u52a0\u9009\u9879,\u6b64\u5904\u9009\u9879\u6307\u5b50\u63a7\u4ef6 + * @param {Object|BUI.Component.Controller} item \u5b50\u63a7\u4ef6\u914d\u7f6e\u9879\u3001\u5b50\u63a7\u4ef6 + * @param {Number} index \u7d22\u5f15 + * @return {Object|BUI.Component.Controller} \u5b50\u63a7\u4ef6 + */ + addItemAt : function(item,index) { + return this.addChild(item,index); + }, + findItemByField : function(field,value,root){ + + root = root || this; + var _self = this, + children = root.get('children'), + result = null; + $(children).each(function(index,item){ + if(item.get(field) == value){ + result = item; + }else if(item.get('children').length){ + result = _self.findItemByField(field,value,item); + } + if(result){ + return false; + } + }); + return result; + }, + getItemText : function(item){ + return item.get('el').text(); + }, + getValueByField : function(item,field){ + return item && item.get(field); + }, + /** + * @protected + * @ignore + */ + setItemSelectedStatus : function(item,selected){ + var _self = this, + method = selected ? 'addClass' : 'removeClass', + element = null; + + if(item){ + item.set('selected',selected); + element = item.get('el'); + } + _self.afterSelected(item,selected,element); + }, + /** + * \u9009\u9879\u662f\u5426\u88ab\u9009\u4e2d + * @override + * @param {*} item \u9009\u9879 + * @return {Boolean} \u662f\u5426\u9009\u4e2d + */ + isItemSelected : function(item){ + return item ? item.get('selected') : false; + }, + /** + * \u8bbe\u7f6e\u6240\u6709\u9009\u9879\u9009\u4e2d + * @override + */ + setAllSelection : function(){ + var _self = this, + items = _self.getItems(); + _self.setSelection(items); + }, + /** + * \u83b7\u53d6\u9009\u4e2d\u7684\u9879\u7684\u503c + * @return {Array} + * @override + * @ignore + */ + getSelection : function(){ + var _self = this, + items = _self.getItems(), + rst = []; + BUI.each(items,function(item){ + if(_self.isItemSelected(item)){ + rst.push(item); + } + + }); + return rst; + } + }); + + list.ChildList = childList; + + return list; +}); + +/** + * @ignore + * 2013-1-22 + * \u66f4\u6539\u663e\u793a\u6570\u636e\u7684\u65b9\u5f0f\uff0c\u4f7f\u7528 _uiSetItems + *//** + * @fileOverview \u5b50\u63a7\u4ef6\u7684\u9ed8\u8ba4\u914d\u7f6e\u9879 + * @ignore + */ + +define('bui/component/uibase/childcfg',function (require) { + + /** + * @class BUI.Component.UIBase.ChildCfg + * \u5b50\u63a7\u4ef6\u9ed8\u8ba4\u914d\u7f6e\u9879\u7684\u6269\u5c55\u7c7b + */ + var childCfg = function(config){ + this._init(); + }; + + childCfg.ATTRS = { + /** + * \u9ed8\u8ba4\u7684\u5b50\u63a7\u4ef6\u914d\u7f6e\u9879,\u5728\u521d\u59cb\u5316\u63a7\u4ef6\u65f6\u914d\u7f6e + * + * - \u5982\u679c\u63a7\u4ef6\u5df2\u7ecf\u6e32\u67d3\u8fc7\uff0c\u6b64\u914d\u7f6e\u9879\u65e0\u6548\uff0c + * - \u63a7\u4ef6\u751f\u6210\u540e\uff0c\u4fee\u6539\u6b64\u914d\u7f6e\u9879\u65e0\u6548\u3002 + *
          
          +     *   var control = new Control({
          +     *     defaultChildCfg : {
          +     *       tpl : '<li>{text}</li>',
          +     *       xclass : 'a-b'
          +     *     }
          +     *   });
          +     * 
          + * @cfg {Object} defaultChildCfg + */ + /** + * @ignore + */ + defaultChildCfg : { + + } + }; + + childCfg.prototype = { + + _init : function(){ + var _self = this, + defaultChildCfg = _self.get('defaultChildCfg'); + if(defaultChildCfg){ + _self.on('beforeAddChild',function(ev){ + var child = ev.child; + if($.isPlainObject(child)){ + BUI.each(defaultChildCfg,function(v,k){ + if(!child[k]){ + child[k] = v; + } + }); + } + }); + } + } + + }; + + return childCfg; + +});/** + * @fileOverview \u4f9d\u8d56\u6269\u5c55\uff0c\u7528\u4e8e\u89c2\u5bdf\u8005\u6a21\u5f0f\u4e2d\u7684\u89c2\u5bdf\u8005 + * @ignore + */ + +define('bui/component/uibase/depends',['bui/component/manage'],function (require) { + + var regexp = /^#(.*):(.*)$/, + Manager = require('bui/component/manage'); + + //\u83b7\u53d6\u4f9d\u8d56\u4fe1\u606f + function getDepend(name){ + + var arr = regexp.exec(name), + id = arr[1], + eventType = arr[2], + source = getSource(id); + return { + source : source, + eventType: eventType + }; + } + + //\u7ed1\u5b9a\u4f9d\u8d56 + function bindDepend(self,name,action){ + var depend = getDepend(name), + source = depend.source, + eventType = depend.eventType, + callbak; + if(source && action && eventType){ + + if(BUI.isFunction(action)){//\u5982\u679caction\u662f\u4e00\u4e2a\u51fd\u6570 + callbak = action; + }else if(BUI.isArray(action)){//\u5982\u679c\u662f\u4e00\u4e2a\u6570\u7ec4\uff0c\u6784\u5efa\u4e00\u4e2a\u56de\u8c03\u51fd\u6570 + callbak = function(){ + BUI.each(action,function(methodName){ + if(self[methodName]){ + self[methodName](); + } + }); + } + } + } + if(callbak){ + depend.callbak = callbak; + source.on(eventType,callbak); + return depend; + } + return null; + } + //\u53bb\u9664\u4f9d\u8d56 + function offDepend(depend){ + var source = depend.source, + eventType = depend.eventType, + callbak = depend.callbak; + source.off(eventType,callbak); + } + + //\u83b7\u53d6\u7ed1\u5b9a\u7684\u4e8b\u4ef6\u6e90 + function getSource(id){ + var control = Manager.getComponent(id); + if(!control){ + control = $('#' + id); + if(!control.length){ + control = null; + } + } + return control; + } + + /** + * @class BUI.Component.UIBase.Depends + * \u4f9d\u8d56\u4e8b\u4ef6\u6e90\u7684\u6269\u5c55 + *
          
          +   *       var control = new Control({
          +   *         depends : {
          +   *           '#btn:click':['toggle'],//\u5f53\u70b9\u51fbid\u4e3a'btn'\u7684\u6309\u94ae\u65f6\uff0c\u6267\u884c control \u7684toggle\u65b9\u6cd5
          +   *           '#checkbox1:checked':['show'],//\u5f53\u52fe\u9009checkbox\u65f6\uff0c\u663e\u793a\u63a7\u4ef6
          +   *           '#menu:click',function(){}
          +   *         }
          +   *       });
          +   * 
          + */ + function Depends (){ + + }; + + Depends.ATTRS = { + /** + * \u63a7\u4ef6\u7684\u4f9d\u8d56\u4e8b\u4ef6\uff0c\u662f\u4e00\u4e2a\u6570\u7ec4\u96c6\u5408\uff0c\u6bcf\u4e00\u6761\u8bb0\u5f55\u662f\u4e00\u4e2a\u4f9d\u8d56\u5173\u7cfb
          + * \u4e00\u4e2a\u4f9d\u8d56\u662f\u6ce8\u518c\u4e00\u4e2a\u4e8b\u4ef6\uff0c\u6240\u4ee5\u9700\u8981\u5728\u4e00\u4e2a\u4f9d\u8d56\u4e2d\u63d0\u4f9b\uff1a + *
            + *
          1. \u7ed1\u5b9a\u6e90\uff1a\u4e3a\u4e86\u65b9\u4fbf\u914d\u7f6e\uff0c\u6211\u4eec\u4f7f\u7528 #id\u6765\u6307\u5b9a\u7ed1\u5b9a\u6e90\uff0c\u53ef\u4ee5\u4f7f\u63a7\u4ef6\u7684ID\uff08\u53ea\u652f\u6301\u7ee7\u627f{BUI.Component.Controller}\u7684\u63a7\u4ef6\uff09\uff0c\u4e5f\u53ef\u4ee5\u662fDOM\u7684id
          2. + *
          3. \u4e8b\u4ef6\u540d\uff1a\u4e8b\u4ef6\u540d\u662f\u4e00\u4e2a\u4f7f\u7528":"\u4e3a\u524d\u7f00\u7684\u5b57\u7b26\u4e32\uff0c\u4f8b\u5982 "#id:change",\u5373\u76d1\u542cchange\u4e8b\u4ef6
          4. + *
          5. \u89e6\u53d1\u7684\u65b9\u6cd5\uff1a\u53ef\u4ee5\u662f\u4e00\u4e2a\u6570\u7ec4\uff0c\u5982["disable","clear"],\u6570\u7ec4\u91cc\u9762\u662f\u63a7\u4ef6\u7684\u65b9\u6cd5\u540d\uff0c\u4e5f\u53ef\u4ee5\u662f\u4e00\u4e2a\u56de\u8c03\u51fd\u6570
          6. + *
          + *
          
          +     *       var control = new Control({
          +     *         depends : {
          +     *           '#btn:click':['toggle'],//\u5f53\u70b9\u51fbid\u4e3a'btn'\u7684\u6309\u94ae\u65f6\uff0c\u6267\u884c control \u7684toggle\u65b9\u6cd5
          +     *           '#checkbox1:checked':['show'],//\u5f53\u52fe\u9009checkbox\u65f6\uff0c\u663e\u793a\u63a7\u4ef6
          +     *           '#menu:click',function(){}
          +     *         }
          +     *       });
          +     * 
          + * ** \u6ce8\u610f\uff1a** \u8fd9\u4e9b\u4f9d\u8d56\u9879\u662f\u5728\u63a7\u4ef6\u6e32\u67d3\uff08render\uff09\u540e\u8fdb\u884c\u7684\u3002 + * @type {Object} + */ + depends : { + value : {} + }, + /** + * @private + * \u4f9d\u8d56\u7684\u6620\u5c04\u96c6\u5408 + * @type {Object} + */ + dependencesMap : { + value : {} + } + }; + + Depends.prototype = { + + __syncUI : function(){ + this.initDependences(); + }, + /** + * \u521d\u59cb\u5316\u4f9d\u8d56\u9879 + * @protected + */ + initDependences : function(){ + var _self = this, + depends = _self.get('depends'); + BUI.each(depends,function(action,name){ + _self.addDependence(name,action); + }); + }, + /** + * \u6dfb\u52a0\u4f9d\u8d56\uff0c\u5982\u679c\u5df2\u7ecf\u6709\u540c\u540d\u7684\u4e8b\u4ef6\uff0c\u5219\u79fb\u9664\uff0c\u518d\u6dfb\u52a0 + *
          
          +     *  form.addDependence('#btn:click',['toggle']); //\u5f53\u6309\u94ae#btn\u70b9\u51fb\u65f6\uff0c\u8868\u5355\u4ea4\u66ff\u663e\u793a\u9690\u85cf
          +     *
          +     *  form.addDependence('#btn:click',function(){//\u5f53\u6309\u94ae#btn\u70b9\u51fb\u65f6\uff0c\u8868\u5355\u4ea4\u66ff\u663e\u793a\u9690\u85cf
          +     *   //TO DO
          +     *  }); 
          +     * 
          + * @param {String} name \u4f9d\u8d56\u9879\u7684\u540d\u79f0 + * @param {Array|Function} action \u4f9d\u8d56\u9879\u7684\u4e8b\u4ef6 + */ + addDependence : function(name,action){ + var _self = this, + dependencesMap = _self.get('dependencesMap'), + depend; + _self.removeDependence(name); + depend = bindDepend(_self,name,action) + if(depend){ + dependencesMap[name] = depend; + } + }, + /** + * \u79fb\u9664\u4f9d\u8d56 + *
          
          +     *  form.removeDependence('#btn:click'); //\u5f53\u6309\u94ae#btn\u70b9\u51fb\u65f6\uff0c\u8868\u5355\u4e0d\u5728\u76d1\u542c
          +     * 
          + * @param {String} name \u4f9d\u8d56\u540d\u79f0 + */ + removeDependence : function(name){ + var _self = this, + dependencesMap = _self.get('dependencesMap'), + depend = dependencesMap[name]; + if(depend){ + offDepend(depend); + delete dependencesMap[name]; + } + }, + /** + * \u6e05\u9664\u6240\u6709\u7684\u4f9d\u8d56 + *
          
          +     *  form.clearDependences();
          +     * 
          + */ + clearDependences : function(){ + var _self = this, + map = _self.get('dependencesMap'); + BUI.each(map,function(depend,name){ + offDepend(depend); + }); + _self.set('dependencesMap',{}); + }, + __destructor : function(){ + this.clearDependences(); + } + + }; + + return Depends; +});/** + * @fileOverview bindable extension class. + * @author dxq613@gmail.com + * @ignore + */ +define('bui/component/uibase/bindable',function(){ + + /** + * bindable extension class. + *
          
          +		*   BUI.use(['bui/list','bui/data','bui/mask'],function(List,Data,Mask){
          +		*     var store = new Data.Store({
          +		*       url : 'data/xx.json'
          +		*     });
          +		*   	var list = new List.SimpleList({
          +		*  	    render : '#l1',
          +		*  	    store : store,
          +		*  	    loadMask : new Mask.LoadMask({el : '#t1'})
          +		*     });
          +		*
          +		*     list.render();
          +		*     store.load();
          +		*   });
          +		* 
          + * \u4f7f\u63a7\u4ef6\u7ed1\u5b9astore\uff0c\u5904\u7406store\u7684\u4e8b\u4ef6 {@link BUI.Data.Store} + * @class BUI.Component.UIBase.Bindable + */ + function bindable(){ + + } + + bindable.ATTRS = + { + /** + * \u7ed1\u5b9a {@link BUI.Data.Store}\u7684\u4e8b\u4ef6 + *
          
          +		*  var store = new Data.Store({
          +		*   url : 'data/xx.json',
          +		*   autoLoad : true
          +		*  });
          +		*
          +		*  var list = new List.SimpleList({
          +		*  	 render : '#l1',
          +		*  	 store : store
          +		*  });
          +		*
          +		*  list.render();
          +		* 
          + * @cfg {BUI.Data.Store} store + */ + /** + * \u7ed1\u5b9a {@link BUI.Data.Store}\u7684\u4e8b\u4ef6 + *
          
          +		*  var store = list.get('store');
          +		* 
          + * @type {BUI.Data.Store} + */ + store : { + + }, + /** + * \u52a0\u8f7d\u6570\u636e\u65f6\uff0c\u662f\u5426\u663e\u793a\u7b49\u5f85\u52a0\u8f7d\u7684\u5c4f\u853d\u5c42 + *
          
          +		*   BUI.use(['bui/list','bui/data','bui/mask'],function(List,Data,Mask){
          +		*     var store = new Data.Store({
          +		*       url : 'data/xx.json'
          +		*     });
          +		*   	var list = new List.SimpleList({
          +		*  	    render : '#l1',
          +		*  	    store : store,
          +		*  	    loadMask : new Mask.LoadMask({el : '#t1'})
          +		*     });
          +		*
          +		*     list.render();
          +		*     store.load();
          +		*   });
          +		* 
          + * @cfg {Boolean|Object} loadMask + */ + /** + * \u52a0\u8f7d\u6570\u636e\u65f6\uff0c\u662f\u5426\u663e\u793a\u7b49\u5f85\u52a0\u8f7d\u7684\u5c4f\u853d\u5c42 + * @type {Boolean|Object} + * @ignore + */ + loadMask : { + value : false + } + }; + + + BUI.augment(bindable, + /** + * @lends BUI.Data.Bindable.prototype + * @ignore + */ + { + + __bindUI : function(){ + var _self = this, + store = _self.get('store'), + loadMask = _self.get('loadMask'); + if(!store){ + return; + } + store.on('beforeload',function(e){ + _self.onBeforeLoad(e); + if(loadMask && loadMask.show){ + loadMask.show(); + } + }); + store.on('load',function(e){ + _self.onLoad(e); + if(loadMask && loadMask.hide){ + loadMask.hide(); + } + }); + store.on('exception',function(e){ + _self.onException(e); + if(loadMask && loadMask.hide){ + loadMask.hide(); + } + }); + store.on('add',function(e){ + _self.onAdd(e); + }); + store.on('remove',function(e){ + _self.onRemove(e); + }); + store.on('update',function(e){ + _self.onUpdate(e); + }); + store.on('localsort',function(e){ + _self.onLocalSort(e); + }); + }, + __syncUI : function(){ + var _self = this, + store = _self.get('store'); + if(!store){ + return; + } + if(store.hasData()){ + _self.onLoad(); + } + }, + /** + * @protected + * @template + * before store load data + * @param {Object} e The event object + * @see {@link BUI.Data.Store#event-beforeload} + */ + onBeforeLoad : function(e){ + + }, + /** + * @protected + * @template + * after store load data + * @param {Object} e The event object + * @see {@link BUI.Data.Store#event-load} + */ + onLoad : function(e){ + + }, + /** + * @protected + * @template + * occurred exception when store is loading data + * @param {Object} e The event object + * @see {@link BUI.Data.Store#event-exception} + */ + onException : function(e){ + + }, + /** + * @protected + * @template + * after added data to store + * @param {Object} e The event object + * @see {@link BUI.Data.Store#event-add} + */ + onAdd : function(e){ + + }, + /** + * @protected + * @template + * after remvoed data to store + * @param {Object} e The event object + * @see {@link BUI.Data.Store#event-remove} + */ + onRemove : function(e){ + + }, + /** + * @protected + * @template + * after updated data to store + * @param {Object} e The event object + * @see {@link BUI.Data.Store#event-update} + */ + onUpdate : function(e){ + + }, + /** + * @protected + * @template + * after local sorted data to store + * @param {Object} e The event object + * @see {@link BUI.Data.Store#event-localsort} + */ + onLocalSort : function(e){ + + } + }); + + return bindable; +});/** + * @fileOverview \u63a7\u4ef6\u7684\u89c6\u56fe\u5c42 + * @author yiminghe@gmail.com + * copied by dxq613@gmail.com + * @ignore + */ +define('bui/component/view',['bui/component/manage','bui/component/uibase'],function(require){ + + var win = window, + Manager = require('bui/component/manage'), + UIBase = require('bui/component/uibase'),//BUI.Component.UIBase, + doc = document; + + /** + * \u63a7\u4ef6\u7684\u89c6\u56fe\u5c42\u57fa\u7c7b + * @class BUI.Component.View + * @protected + * @extends BUI.Component.UIBase + * @mixins BUI.Component.UIBase.TplView + */ + var View = UIBase.extend([UIBase.TplView], + { + + /** + * Get all css class name to be applied to the root element of this component for given state. + * the css class names are prefixed with component name. + * @param {String} [state] This component's state info. + */ + getComponentCssClassWithState: function (state) { + var self = this, + componentCls = self.get('ksComponentCss'); + state = state || ''; + return self.getCssClassWithPrefix(componentCls.split(/\s+/).join(state + ' ') + state); + }, + + /** + * Get full class name (with prefix) for current component + * @param classes {String} class names without prefixCls. Separated by space. + * @method + * @return {String} class name with prefixCls + * @private + */ + getCssClassWithPrefix: Manager.getCssClassWithPrefix, + + /** + * Returns the dom element which is responsible for listening keyboard events. + * @return {jQuery} + */ + getKeyEventTarget: function () { + return this.get('el'); + }, + /** + * Return the dom element into which child component to be rendered. + * @return {jQuery} + */ + getContentElement: function () { + return this.get('contentEl') || this.get('el'); + }, + /** + * \u83b7\u53d6\u72b6\u6001\u5bf9\u5e94\u7684css\u6837\u5f0f + * @param {String} name \u72b6\u6001\u540d\u79f0 \u4f8b\u5982\uff1ahover,disabled\u7b49\u7b49 + * @return {String} \u72b6\u6001\u6837\u5f0f + */ + getStatusCls : function(name){ + var self = this, + statusCls = self.get('statusCls'), + cls = statusCls[name]; + if(!cls){ + cls = self.getComponentCssClassWithState('-' + name); + } + return cls; + }, + /** + * \u6e32\u67d3\u63a7\u4ef6 + * @protected + */ + renderUI: function () { + var self = this; + + // \u65b0\u5efa\u7684\u8282\u70b9\u624d\u9700\u8981\u6446\u653e\u5b9a\u4f4d,\u4e0d\u652f\u6301srcNode\u6a21\u5f0f + if (!self.get('srcNode')) { + var render = self.get('render'), + el = self.get('el'), + renderBefore = self.get('elBefore'); + if (renderBefore) { + el.insertBefore(renderBefore, undefined); + } else if (render) { + el.appendTo(render, undefined); + } else { + el.appendTo(doc.body, undefined); + } + } + }, + /** + * \u53ea\u8d1f\u8d23\u5efa\u7acb\u8282\u70b9\uff0c\u5982\u679c\u662f decorate \u8fc7\u6765\u7684\uff0c\u751a\u81f3\u5185\u5bb9\u4f1a\u4e22\u5931 + * @protected + * \u901a\u8fc7 render \u6765\u91cd\u5efa\u539f\u6709\u7684\u5185\u5bb9 + */ + createDom: function () { + var self = this, + contentEl = self.get('contentEl'), + el = self.get('el'); + if (!self.get('srcNode')) { + + el = $('<' + self.get('elTagName') + '>'); + + if (contentEl) { + el.append(contentEl); + } + + self.setInternal('el', el); + } + + el.addClass(self.getComponentCssClassWithState()); + if (!contentEl) { + // \u6ca1\u53d6\u5230,\u8fd9\u91cc\u8bbe\u4e0b\u503c, uiSet \u65f6\u53ef\u4ee5 set('content') \u53d6\u5230 + self.setInternal('contentEl', el); + } + }, + /** + * \u8bbe\u7f6e\u9ad8\u4eae\u663e\u793a + * @protected + */ + _uiSetHighlighted: function (v) { + var self = this, + componentCls = self.getStatusCls('hover'), + el = self.get('el'); + el[v ? 'addClass' : 'removeClass'](componentCls); + }, + + /** + * \u8bbe\u7f6e\u7981\u7528 + * @protected + */ + _uiSetDisabled: function (v) { + var self = this, + componentCls = self.getStatusCls('disabled'), + el = self.get('el'); + el[v ? 'addClass' : 'removeClass'](componentCls) + .attr('aria-disabled', v); + + //\u5982\u679c\u7981\u7528\u63a7\u4ef6\u65f6\uff0c\u5904\u4e8ehover\u72b6\u6001\uff0c\u5219\u6e05\u9664 + if(v && self.get('highlighted')){ + self.set('highlighted',false); + } + + if (self.get('focusable')) { + //\u4e0d\u80fd\u88ab tab focus \u5230 + self.getKeyEventTarget().attr('tabIndex', v ? -1 : 0); + } + }, + /** + * \u8bbe\u7f6e\u6fc0\u6d3b\u72b6\u6001 + * @protected + */ + _uiSetActive: function (v) { + var self = this, + componentCls = self.getStatusCls('active'); + self.get('el')[v ? 'addClass' : 'removeClass'](componentCls) + .attr('aria-pressed', !!v); + }, + /** + * \u8bbe\u7f6e\u83b7\u5f97\u7126\u70b9 + * @protected + */ + _uiSetFocused: function (v) { + var self = this, + el = self.get('el'), + componentCls = self.getStatusCls('focused'); + el[v ? 'addClass' : 'removeClass'](componentCls); + }, + /** + * \u8bbe\u7f6e\u63a7\u4ef6\u6700\u5916\u5c42DOM\u7684\u5c5e\u6027 + * @protected + */ + _uiSetElAttrs: function (attrs) { + this.get('el').attr(attrs); + }, + /** + * \u8bbe\u7f6e\u5e94\u7528\u5230\u63a7\u4ef6\u6700\u5916\u5c42DOM\u7684css class + * @protected + */ + _uiSetElCls: function (cls) { + this.get('el').addClass(cls); + }, + /** + * \u8bbe\u7f6e\u5e94\u7528\u5230\u63a7\u4ef6\u6700\u5916\u5c42DOM\u7684css style + * @protected + */ + _uiSetElStyle: function (style) { + this.get('el').css(style); + }, + /** + * \u8bbe\u7f6e\u5e94\u7528\u5230\u63a7\u4ef6\u5bbd\u5ea6 + * @protected + */ + _uiSetWidth: function (w) { + this.get('el').width(w); + }, + /** + * \u8bbe\u7f6e\u5e94\u7528\u5230\u63a7\u4ef6\u9ad8\u5ea6 + * @protected + */ + _uiSetHeight: function (h) { + var self = this; + self.get('el').height(h); + }, + /** + * \u8bbe\u7f6e\u5e94\u7528\u5230\u63a7\u4ef6\u7684\u5185\u5bb9 + * @protected + */ + _uiSetContent: function (c) { + var self = this, + el; + // srcNode \u65f6\u4e0d\u91cd\u65b0\u6e32\u67d3 content + // \u9632\u6b62\u5185\u90e8\u6709\u6539\u53d8\uff0c\u800c content \u5219\u662f\u8001\u7684 html \u5185\u5bb9 + if (self.get('srcNode') && !self.get('rendered')) { + } else { + el = self.get('contentEl'); + if (typeof c == 'string') { + el.html(c); + } else if (c) { + el.empty().append(c); + } + } + }, + /** + * \u8bbe\u7f6e\u5e94\u7528\u5230\u63a7\u4ef6\u662f\u5426\u53ef\u89c1 + * @protected + */ + _uiSetVisible: function (isVisible) { + var self = this, + el = self.get('el'), + visibleMode = self.get('visibleMode'); + if (visibleMode === 'visibility') { + el.css('visibility', isVisible ? 'visible' : 'hidden'); + } else { + el.css('display', isVisible ? '' : 'none'); + } + }, + /** + * \u6790\u6784\u51fd\u6570 + * @protected + */ + destructor : function () { + var el = this.get('el'); + if (el) { + el.remove(); + } + } + },{ + xclass : 'view', + priority : 0 + }); + + + View.ATTRS = + { + /** + * \u63a7\u4ef6\u6839\u8282\u70b9 + * @readOnly + * see {@link BUI.Component.Controller#property-el} + */ + el: { + /** + * @private + */ + setter: function (v) { + return $(v); + } + }, + + /** + * \u63a7\u4ef6\u6839\u8282\u70b9\u6837\u5f0f + * see {@link BUI.Component.Controller#property-elCls} + */ + elCls: { + }, + /** + * \u63a7\u4ef6\u6839\u8282\u70b9\u6837\u5f0f\u5c5e\u6027 + * see {@link BUI.Component.Controller#property-elStyle} + */ + elStyle: { + }, + /** + * \u63a7\u4ef6\u5bbd\u5ea6 + * see {@link BUI.Component.Controller#property-width} + */ + width: { + }, + /** + * \u63a7\u4ef6\u9ad8\u5ea6 + * see {@link BUI.Component.Controller#property-height} + */ + height: { + }, + /** + * \u72b6\u6001\u76f8\u5173\u7684\u6837\u5f0f,\u9ed8\u8ba4\u60c5\u51b5\u4e0b\u4f1a\u4f7f\u7528 \u524d\u7f00\u540d + xclass + '-' + \u72b6\u6001\u540d + * see {@link BUI.Component.Controller#property-statusCls} + * @type {Object} + */ + statusCls : { + value : {} + }, + /** + * \u63a7\u4ef6\u6839\u8282\u70b9\u4f7f\u7528\u7684\u6807\u7b7e + * @type {String} + */ + elTagName: { + // \u751f\u6210\u6807\u7b7e\u540d\u5b57 + value: 'div' + }, + /** + * \u63a7\u4ef6\u6839\u8282\u70b9\u5c5e\u6027 + * see {@link BUI.Component.Controller#property-elAttrs} + * @ignore + */ + elAttrs: { + }, + /** + * \u63a7\u4ef6\u5185\u5bb9\uff0chtml,\u6587\u672c\u7b49 + * see {@link BUI.Component.Controller#property-content} + */ + content: { + }, + /** + * \u63a7\u4ef6\u63d2\u5165\u5230\u6307\u5b9a\u5143\u7d20\u524d + * see {@link BUI.Component.Controller#property-tpl} + */ + elBefore: { + // better named to renderBefore, too late ! + }, + /** + * \u63a7\u4ef6\u5728\u6307\u5b9a\u5143\u7d20\u5185\u90e8\u6e32\u67d3 + * see {@link BUI.Component.Controller#property-render} + * @ignore + */ + render: {}, + /** + * \u662f\u5426\u53ef\u89c1 + * see {@link BUI.Component.Controller#property-visible} + */ + visible: { + value: true + }, + /** + * \u53ef\u89c6\u6a21\u5f0f + * see {@link BUI.Component.Controller#property-visibleMode} + */ + visibleMode: { + value: 'display' + }, + /** + * @private + * \u7f13\u5b58\u9690\u85cf\u65f6\u7684\u4f4d\u7f6e\uff0c\u5bf9\u5e94visibleMode = 'visiblity' \u7684\u573a\u666f + * @type {Object} + */ + cachePosition : { + + }, + /** + * content \u8bbe\u7f6e\u7684\u5185\u5bb9\u8282\u70b9,\u9ed8\u8ba4\u6839\u8282\u70b9 + * @type {jQuery} + * @default el + */ + contentEl: { + valueFn: function () { + return this.get('el'); + } + }, + /** + * \u6837\u5f0f\u524d\u7f00 + * see {@link BUI.Component.Controller#property-prefixCls} + */ + prefixCls: { + value: BUI.prefix + }, + /** + * \u53ef\u4ee5\u83b7\u53d6\u7126\u70b9 + * @protected + * see {@link BUI.Component.Controller#property-focusable} + */ + focusable: { + value: true + }, + /** + * \u83b7\u53d6\u7126\u70b9 + * see {@link BUI.Component.Controller#property-focused} + */ + focused: {}, + /** + * \u6fc0\u6d3b + * see {@link BUI.Component.Controller#property-active} + */ + active: {}, + /** + * \u7981\u7528 + * see {@link BUI.Component.Controller#property-disabled} + */ + disabled: {}, + /** + * \u9ad8\u4eae\u663e\u793a + * see {@link BUI.Component.Controller#property-highlighted} + */ + highlighted: {} + }; + + return View; +});/** + * @fileOverview \u52a0\u8f7d\u63a7\u4ef6\u5185\u5bb9 + * @ignore + */ + +define('bui/component/loader',['bui/util'],function (require) { + 'use strict'; + var BUI = require('bui/util'), + Base = require('bui/base'), + /** + * @class BUI.Component.Loader + * @extends BUI.Base + * ** \u63a7\u4ef6\u7684\u9ed8\u8ba4Loader\u5c5e\u6027\u662f\uff1a** + *
          
          +     *   
          +     *   defaultLoader : {
          +     *     value : {
          +     *       property : 'content',
          +     *       autoLoad : true
          +     *     }
          +     *   }
          +     * 
          + * ** \u4e00\u822c\u7684\u63a7\u4ef6\u9ed8\u8ba4\u8bfb\u53d6html\uff0c\u4f5c\u4e3a\u63a7\u4ef6\u7684content\u503c ** + *
          
          +     *   var control = new BUI.Component.Controller({
          +     *     render : '#c1',
          +     *     loader : {
          +     *       url : 'data/text.json'
          +     *     }
          +     *   });
          +     *
          +     *   control.render();
          +     * 
          + * + * ** \u53ef\u4ee5\u4fee\u6539Loader\u7684\u9ed8\u8ba4\u5c5e\u6027\uff0c\u52a0\u8f7dchildren ** + *
          
          +     *   var control = new BUI.Component.Controller({
          +     *     render : '#c1',
          +     *     loader : {
          +     *       url : 'data/children.json',
          +     *       property : 'children',
          +     *       dataType : 'json'
          +     *     }
          +     *   });
          +     *
          +     *   control.render();
          +     * 
          + * \u52a0\u8f7d\u63a7\u4ef6\u5185\u5bb9\u7684\u7c7b\uff0c\u4e00\u822c\u4e0d\u8fdb\u884c\u5b9e\u4f8b\u5316 + */ + Loader = function(config){ + Loader.superclass.constructor.call(this,config); + this._init(); + }; + + Loader.ATTRS = { + + /** + * \u52a0\u8f7d\u5185\u5bb9\u7684\u5730\u5740 + *
          
          +     *   var control = new BUI.Component.Controller({
          +     *     render : '#c1',
          +     *     loader : {
          +     *       url : 'data/text.json'
          +     *     }
          +     *   });
          +     *
          +     *   control.render();
          +     * 
          + * @cfg {String} url + */ + url : { + + }, + /** + * \u5bf9\u5e94\u7684\u63a7\u4ef6\uff0c\u52a0\u8f7d\u5b8c\u6210\u540e\u8bbe\u7f6e\u5c5e\u6027\u5230\u5bf9\u5e94\u7684\u63a7\u4ef6 + * @readOnly + * @type {BUI.Component.Controller} + */ + target : { + + }, + /** + * @private + * \u662f\u5426load \u8fc7 + */ + hasLoad : { + value : false + }, + /** + * \u662f\u5426\u81ea\u52a8\u52a0\u8f7d\u6570\u636e + *
          
          +     *   var control = new BUI.Component.Controller({
          +     *     render : '#c1',
          +     *     loader : {
          +     *       url : 'data/text.json',
          +     *       autoLoad : false
          +     *     }
          +     *   });
          +     *
          +     *   control.render();
          +     * 
          + * @cfg {Boolean} [autoLoad = true] + */ + autoLoad : { + + }, + /** + * \u5ef6\u8fdf\u52a0\u8f7d + * + * - event : \u89e6\u53d1\u52a0\u8f7d\u7684\u4e8b\u4ef6 + * - repeat \uff1a\u662f\u5426\u91cd\u590d\u52a0\u8f7d + *
          
          +     *   var control = new BUI.Component.Controller({
          +     *     render : '#c1',
          +     *     loader : {
          +     *       url : 'data/text.json',
          +     *       lazyLoad : {
          +     *         event : 'show',
          +     *         repeat : true
          +     *       }
          +     *     }
          +     *   });
          +     *
          +     *   control.render();
          +     * 
          + * @cfg {Object} [lazyLoad = null] + */ + lazyLoad: { + + }, + /** + * \u52a0\u8f7d\u8fd4\u56de\u7684\u6570\u636e\u4f5c\u4e3a\u63a7\u4ef6\u7684\u90a3\u4e2a\u5c5e\u6027 + *
          
          +     *   var control = new BUI.List.SimpleList({
          +     *     render : '#c1',
          +     *     loader : {
          +     *       url : 'data/text.json',
          +     *       dataType : 'json',
          +     *       property : 'items'
          +     *     }
          +     *   });
          +     *
          +     *   control.render();
          +     * 
          + * @cfg {String} property + */ + property : { + + }, + /** + * \u683c\u5f0f\u5316\u8fd4\u56de\u7684\u6570\u636e + * @cfg {Function} renderer + */ + renderer : { + value : function(value){ + return value; + } + }, + /** + * \u52a0\u8f7d\u6570\u636e\u65f6\u662f\u5426\u663e\u793a\u5c4f\u853d\u5c42\u548c\u52a0\u8f7d\u63d0\u793a {@link BUI.Mask.LoadMask} + * + * - loadMask : true\u65f6\u4f7f\u7528loadMask \u9ed8\u8ba4\u7684\u914d\u7f6e\u4fe1\u606f + * - loadMask : {msg : '\u6b63\u5728\u52a0\u8f7d\uff0c\u8bf7\u7a0d\u540e\u3002\u3002'} LoadMask\u7684\u914d\u7f6e\u4fe1\u606f + *
          
          +     *   var control = new BUI.Component.Controller({
          +     *     render : '#c1',
          +     *     loader : {
          +     *       url : 'data/text.json',
          +     *       loadMask : true
          +     *     }
          +     *   });
          +     *
          +     *   control.render();
          +     * 
          + * @cfg {Boolean|Object} [loadMask = false] + */ + loadMask : { + value : false + }, + /** + * ajax \u8bf7\u6c42\u8fd4\u56de\u6570\u636e\u7684\u7c7b\u578b + *
          
          +     *   var control = new BUI.Component.Controller({
          +     *     render : '#c1',
          +     *     loader : {
          +     *       url : 'data/text.json',
          +     *       dataType : 'json',
          +     *       property : 'items'
          +     *     }
          +     *   });
          +     *
          +     *   control.render();
          +     * 
          + * @cfg {String} [dataType = 'text'] + */ + dataType : { + value : 'text' + }, + /** + * Ajax\u8bf7\u6c42\u7684\u914d\u7f6e\u9879,\u4f1a\u8986\u76d6 url,dataType\u6570\u636e + * @cfg {Object} ajaxOptions + */ + ajaxOptions : { + value : { + method : 'get', + cache : false + } + }, + /** + * \u521d\u59cb\u5316\u7684\u8bf7\u6c42\u53c2\u6570 + *
          
          +     *   var control = new BUI.Component.Controller({
          +     *     render : '#c1',
          +     *     loader : {
          +     *       url : 'data/text.json',
          +     *       params : {
          +     *         a : 'a',
          +     *         b : 'b'
          +     *       }
          +     *     }
          +     *   });
          +     *
          +     *   control.render();
          +     * 
          + * @cfg {Object} params + * @default null + */ + params : { + + }, + /** + * \u9644\u52a0\u53c2\u6570\uff0c\u6bcf\u6b21\u8bf7\u6c42\u90fd\u5e26\u7684\u53c2\u6570 + * @cfg {Object} appendParams + */ + appendParams : { + + }, + /** + * \u6700\u540e\u4e00\u6b21\u8bf7\u6c42\u7684\u53c2\u6570 + * @readOnly + * @private + * @type {Object} + */ + lastParams : { + value : {} + }, + /** + * \u52a0\u8f7d\u6570\u636e\uff0c\u5e76\u6dfb\u52a0\u5c5e\u6027\u5230\u63a7\u4ef6\u540e\u7684\u56de\u8c03\u51fd\u6570 + * - data : \u52a0\u8f7d\u7684\u6570\u636e + * - params : \u52a0\u8f7d\u7684\u53c2\u6570 + *
          
          +     *   var control = new BUI.Component.Controller({
          +     *     render : '#c1',
          +     *     loader : {
          +     *       url : 'data/text.json',
          +     *       callback : function(text){
          +     *         var target = this.get('target');//control
          +     *         //TO DO
          +     *       }
          +     *     }
          +     *   });
          +     *
          +     *   control.render();
          +     * 
          + * @cfg {Function} callback + */ + callback : { + + }, + /** + * \u5931\u8d25\u7684\u56de\u8c03\u51fd\u6570 + * - response : \u8fd4\u56de\u7684\u9519\u8bef\u5bf9\u8c61 + * - params : \u52a0\u8f7d\u7684\u53c2\u6570 + * @cfg {Function} failure + */ + failure : { + + } + + }; + + BUI.extend(Loader,Base); + + BUI.augment(Loader,{ + /** + * @protected + * \u662f\u5426\u662fLoader + * @type {Boolean} + */ + isLoader : true, + //\u521d\u59cb\u5316 + _init : function(){ + var _self = this, + autoLoad = _self.get('autoLoad'), + params = _self.get('params'); + + _self._initMask(); + if(autoLoad){ + _self.load(params); + }else{ + _self._initParams(); + _self._initLazyLoad(); + } + }, + //\u521d\u59cb\u5316\u5ef6\u8fdf\u52a0\u8f7d + _initLazyLoad : function(){ + var _self = this, + target = _self.get('target'), + lazyLoad= _self.get('lazyLoad'); + + if(target && lazyLoad && lazyLoad.event){ + target.on(lazyLoad.event,function(){ + if(!_self.get('hasLoad') || lazyLoad.repeat){ + _self.load(); + } + }); + } + }, + /** + * \u521d\u59cb\u5316mask + * @private + */ + _initMask : function(){ + var _self = this, + target = _self.get('target'), + loadMask = _self.get('loadMask'); + if(target && loadMask){ + BUI.use('bui/mask',function(Mask){ + var cfg = $.isPlainObject(loadMask) ? loadMask : {}; + loadMask = new Mask.LoadMask(BUI.mix({el : target.get('el')},cfg)); + _self.set('loadMask',loadMask); + }); + } + }, + //\u521d\u59cb\u5316\u67e5\u8be2\u53c2\u6570 + _initParams : function(){ + var _self = this, + lastParams = _self.get('lastParams'), + params = _self.get('params'); + + //\u521d\u59cb\u5316 \u53c2\u6570 + BUI.mix(lastParams,params); + }, + /** + * \u52a0\u8f7d\u5185\u5bb9 + * @param {Object} params \u52a0\u8f7d\u6570\u636e\u7684\u53c2\u6570 + */ + load : function(params){ + var _self = this, + url = _self.get('url'), + ajaxOptions = _self.get('ajaxOptions'), + lastParams = _self.get('lastParams'), + appendParams = _self.get('appendParams'); + + BUI.mix(true,lastParams,appendParams,params); + params = BUI.cloneObject(lastParams); + //\u672a\u63d0\u4f9b\u52a0\u8f7d\u5730\u5740\uff0c\u963b\u6b62\u52a0\u8f7d + if(!url){ + return; + } + + _self.onBeforeLoad(); + _self.set('hasLoad',true); + $.ajax(BUI.mix({ + dataType : _self.get('dataType'), + data : params, + url : url, + success : function(data){ + _self.onload(data,params); + }, + error : function(jqXHR, textStatus, errorThrown){ + _self.onException({ + jqXHR : jqXHR, + textStatus : textStatus, + errorThrown : errorThrown + },params); + } + },ajaxOptions)); + }, + /** + * @private + * \u52a0\u8f7d\u524d + */ + onBeforeLoad : function(){ + var _self = this, + loadMask = _self.get('loadMask'); + if(loadMask && loadMask.show){ + loadMask.show(); + } + }, + /** + * @private + * \u52a0\u8f7d\u5b8c\u6bd5 + */ + onload : function(data,params){ + var _self = this, + loadMask = _self.get('loadMask'), + property = _self.get('property'), + callback = _self.get('callback'), + renderer = _self.get('renderer'), + target = _self.get('target'); + target.set(property,renderer.call(_self,data)); + + /**/ + if(loadMask && loadMask.hide){ + loadMask.hide(); + } + if(callback){ + callback.call(this,data,params); + } + }, + /** + * @private + * \u52a0\u8f7d\u51fa\u9519 + */ + onException : function(response,params){ + var _self = this, + failure = _self.get('failure'); + if(failure){ + failure.call(this,response,params); + } + } + + }); + + return Loader; +});/** + * @fileOverview \u63a7\u4ef6\u53ef\u4ee5\u5b9e\u4f8b\u5316\u7684\u57fa\u7c7b + * @ignore + * @author yiminghe@gmail.com + * copied by dxq613@gmail.com + */ + +/** + * jQuery \u4e8b\u4ef6 + * @class jQuery.Event + * @private + */ + + +define('bui/component/controller',['bui/component/uibase','bui/component/manage','bui/component/view','bui/component/loader'],function(require){ + 'use strict'; + var UIBase = require('bui/component/uibase'), + Manager = require('bui/component/manage'), + View = require('bui/component/view'), + Loader = require('bui/component/loader'), + wrapBehavior = BUI.wrapBehavior, + getWrapBehavior = BUI.getWrapBehavior; + + /** + * @ignore + */ + function wrapperViewSetter(attrName) { + return function (ev) { + var self = this; + // in case bubbled from sub component + if (self === ev.target) { + var value = ev.newVal, + view = self.get('view'); + if(view){ + view.set(attrName, value); + } + + } + }; + } + + /** + * @ignore + */ + function wrapperViewGetter(attrName) { + return function (v) { + var self = this, + view = self.get('view'); + return v === undefined ? view.get(attrName) : v; + }; + } + + /** + * @ignore + */ + function initChild(self, c, renderBefore) { + // \u751f\u6210\u7236\u7ec4\u4ef6\u7684 dom \u7ed3\u6784 + self.create(); + var contentEl = self.getContentElement(), + defaultCls = self.get('defaultChildClass'); + //\u914d\u7f6e\u9ed8\u8ba4 xclass + if(!c.xclass && !(c instanceof Controller)){ + if(!c.xtype){ + c.xclass = defaultCls; + }else{ + c.xclass = defaultCls + '-' + c.xtype; + } + + } + + c = BUI.Component.create(c, self); + c.setInternal('parent', self); + // set \u901a\u77e5 view \u4e5f\u66f4\u65b0\u5bf9\u5e94\u5c5e\u6027 + c.set('render', contentEl); + c.set('elBefore', renderBefore); + // \u5982\u679c parent \u4e5f\u6ca1\u6e32\u67d3\uff0c\u5b50\u7ec4\u4ef6 create \u51fa\u6765\u548c parent \u8282\u70b9\u5173\u8054 + // \u5b50\u7ec4\u4ef6\u548c parent \u7ec4\u4ef6\u4e00\u8d77\u6e32\u67d3 + // \u4e4b\u524d\u8bbe\u597d\u5c5e\u6027\uff0cview \uff0clogic \u540c\u6b65\u8fd8\u6ca1 bind ,create \u4e0d\u662f render \uff0c\u8fd8\u6ca1\u6709 bindUI + c.create(undefined); + return c; + } + + /** + * \u4e0d\u4f7f\u7528 valueFn\uff0c + * \u53ea\u6709 render \u65f6\u9700\u8981\u627e\u5230\u9ed8\u8ba4\uff0c\u5176\u4ed6\u65f6\u5019\u4e0d\u9700\u8981\uff0c\u9632\u6b62\u83ab\u540d\u5176\u5999\u521d\u59cb\u5316 + * @ignore + */ + function constructView(self) { + // \u9010\u5c42\u627e\u9ed8\u8ba4\u6e32\u67d3\u5668 + var attrs, + attrCfg, + attrName, + cfg = {}, + v, + Render = self.get('xview'); + + + //\u5c06\u6e32\u67d3\u5c42\u521d\u59cb\u5316\u6240\u9700\u8981\u7684\u5c5e\u6027\uff0c\u76f4\u63a5\u6784\u9020\u5668\u8bbe\u7f6e\u8fc7\u53bb + + attrs = self.getAttrs(); + + // \u6574\u7406\u5c5e\u6027\uff0c\u5bf9\u7eaf\u5c5e\u4e8e view \u7684\u5c5e\u6027\uff0c\u6dfb\u52a0 getter setter \u76f4\u63a5\u5230 view + for (attrName in attrs) { + if (attrs.hasOwnProperty(attrName)) { + attrCfg = attrs[attrName]; + if (attrCfg.view) { + // \u5148\u53d6\u540e getter + // \u9632\u6b62\u6b7b\u5faa\u73af + if (( v = self.get(attrName) ) !== undefined) { + cfg[attrName] = v; + } + + // setter \u4e0d\u5e94\u8be5\u6709\u5b9e\u9645\u64cd\u4f5c\uff0c\u4ec5\u7528\u4e8e\u6b63\u89c4\u5316\u6bd4\u8f83\u597d + // attrCfg.setter = wrapperViewSetter(attrName); + self.on('after' + BUI.ucfirst(attrName) + 'Change', + wrapperViewSetter(attrName)); + // \u903b\u8f91\u5c42\u8bfb\u503c\u76f4\u63a5\u4ece view \u5c42\u8bfb + // \u90a3\u4e48\u5982\u679c\u5b58\u5728\u9ed8\u8ba4\u503c\u4e5f\u8bbe\u7f6e\u5728 view \u5c42 + // \u903b\u8f91\u5c42\u4e0d\u8981\u8bbe\u7f6e getter + attrCfg.getter = wrapperViewGetter(attrName); + } + } + } + // does not autoRender for view + delete cfg.autoRender; + cfg.ksComponentCss = getComponentCss(self); + return new Render(cfg); + } + + function getComponentCss(self) { + var constructor = self.constructor, + cls, + re = []; + while (constructor && constructor !== Controller) { + cls = Manager.getXClassByConstructor(constructor); + if (cls) { + re.push(cls); + } + constructor = constructor.superclass && constructor.superclass.constructor; + } + return re.join(' '); + } + + function isMouseEventWithinElement(e, elem) { + var relatedTarget = e.relatedTarget; + // \u5728\u91cc\u9762\u6216\u7b49\u4e8e\u81ea\u8eab\u90fd\u4e0d\u7b97 mouseenter/leave + return relatedTarget && + ( relatedTarget === elem[0] ||$.contains(elem,relatedTarget)); + } + + /** + * \u53ef\u4ee5\u5b9e\u4f8b\u5316\u7684\u63a7\u4ef6\uff0c\u4f5c\u4e3a\u6700\u9876\u5c42\u7684\u63a7\u4ef6\u7c7b\uff0c\u4e00\u5207\u7528\u6237\u63a7\u4ef6\u90fd\u7ee7\u627f\u6b64\u63a7\u4ef6 + * xclass: 'controller'. + * ** \u521b\u5efa\u5b50\u63a7\u4ef6 ** + *
          
          +     * var Control = Controller.extend([mixin1,mixin2],{ //\u539f\u578b\u94fe\u4e0a\u7684\u51fd\u6570
          +     *   renderUI : function(){ //\u521b\u5efaDOM
          +     *   
          +     *   }, 
          +     *   bindUI : function(){  //\u7ed1\u5b9a\u4e8b\u4ef6
          +     *   
          +     *   },
          +     *   destructor : funciton(){ //\u6790\u6784\u51fd\u6570
          +     *   
          +     *   }
          +     * },{
          +     *   ATTRS : { //\u9ed8\u8ba4\u7684\u5c5e\u6027
          +     *       text : {
          +     *       
          +     *       }
          +     *   }
          +     * },{
          +     *     xclass : 'a' //\u7528\u4e8e\u628a\u5bf9\u8c61\u89e3\u6790\u6210\u7c7b
          +     * });
          +     * 
          + * + * ** \u521b\u5efa\u5bf9\u8c61 ** + *
          
          +     * var c1 = new Control({
          +     *     render : '#t1', //\u5728t1\u4e0a\u521b\u5efa
          +     *     text : 'text1',
          +     *     children : [{xclass : 'a',text : 'a1'},{xclass : 'b',text : 'b1'}]
          +     * });
          +     *
          +     * c1.render();
          +     * 
          + * @extends BUI.Component.UIBase + * @mixins BUI.Component.UIBase.Tpl + * @mixins BUI.Component.UIBase.Decorate + * @mixins BUI.Component.UIBase.Depends + * @mixins BUI.Component.UIBase.ChildCfg + * @class BUI.Component.Controller + */ + var Controller = UIBase.extend([UIBase.Decorate,UIBase.Tpl,UIBase.ChildCfg,UIBase.KeyNav,UIBase.Depends], + { + /** + * \u662f\u5426\u662f\u63a7\u4ef6\uff0c\u6807\u793a\u5bf9\u8c61\u662f\u5426\u662f\u4e00\u4e2aUI \u63a7\u4ef6 + * @type {Boolean} + */ + isController: true, + + /** + * \u4f7f\u7528\u524d\u7f00\u83b7\u53d6\u7c7b\u7684\u540d\u5b57 + * @param classes {String} class names without prefixCls. Separated by space. + * @method + * @protected + * @return {String} class name with prefixCls + */ + getCssClassWithPrefix: Manager.getCssClassWithPrefix, + + /** + * From UIBase, Initialize this component. * + * @protected + */ + initializer: function () { + var self = this; + + if(!self.get('id')){ + self.set('id',self.getNextUniqueId()); + } + Manager.addComponent(self.get('id'),self); + // initialize view + self.setInternal('view', constructView(self)); + }, + + /** + * \u8fd4\u56de\u65b0\u7684\u552f\u4e00\u7684Id,\u7ed3\u679c\u662f 'xclass' + number + * @protected + * @return {String} \u552f\u4e00id + */ + getNextUniqueId : function(){ + var self = this, + xclass = Manager.getXClassByConstructor(self.constructor); + return BUI.guid(xclass); + }, + /** + * From UIBase. Constructor(or get) view object to create ui elements. + * @protected + * + */ + createDom: function () { + var self = this, + //el, + view = self.get('view'); + view.create(undefined); + //el = view.getKeyEventTarget(); + /*if (!self.get('allowTextSelection')) { + //el.unselectable(undefined); + }*/ + }, + + /** + * From UIBase. Call view object to render ui elements. + * @protected + * + */ + renderUI: function () { + var self = this, + loader = self.get('loader'); + self.get('view').render(); + self._initChildren(); + if(loader){ + self.setInternal('loader',loader); + } + /**/ + + }, + _initChildren : function(children){ + var self = this, + i, + children, + child; + // then render my children + children = children || self.get('children').concat(); + self.get('children').length = 0; + for (i = 0; i < children.length; i++) { + child = self.addChild(children[i]); + child.render(); + } + }, + /** + * bind ui for box + * @private + */ + bindUI:function () { + var self = this, + events = self.get('events'); + this.on('afterVisibleChange', function (e) { + this.fire(e.newVal ? 'show' : 'hide'); + }); + //\u5904\u7406\u63a7\u4ef6\u4e8b\u4ef6\uff0c\u8bbe\u7f6e\u4e8b\u4ef6\u662f\u5426\u5192\u6ce1 + BUI.each(events, function (v,k) { + self.publish(k, { + bubbles:v + }); + }); + }, + /** + * \u63a7\u4ef6\u662f\u5426\u5305\u542b\u6307\u5b9a\u7684DOM\u5143\u7d20,\u5305\u62ec\u6839\u8282\u70b9 + *
          
          +         *   var control = new Control();
          +         *   $(document).on('click',function(ev){
          +         *     var target = ev.target;
          +         *
          +         *     if(!control.containsElement(elem)){ //\u672a\u70b9\u51fb\u5728\u63a7\u4ef6\u5185\u90e8
          +         *       control.hide();
          +         *     }
          +         *   });
          +         * 
          + * @param {HTMLElement} elem DOM \u5143\u7d20 + * @return {Boolean} \u662f\u5426\u5305\u542b + */ + containsElement : function (elem) { + var _self = this, + el = _self.get('el'), + children = _self.get('children'), + result = false; + if(!_self.get('rendered')){ + return false; + } + if($.contains(el[0],elem) || el[0] === elem){ + result = true; + }else{ + BUI.each(children,function (item) { + if(item.containsElement(elem)){ + result = true; + return false; + } + }); + } + return result; + }, + /** + * \u662f\u5426\u662f\u5b50\u63a7\u4ef6\u7684DOM\u5143\u7d20 + * @protected + * @return {Boolean} \u662f\u5426\u5b50\u63a7\u4ef6\u7684DOM\u5143\u7d20 + */ + isChildrenElement : function(elem){ + var _self = this, + children = _self.get('children'), + rst = false; + BUI.each(children,function(child){ + if(child.containsElement(elem)){ + rst = true; + return false; + } + }); + return rst; + }, + /** + * \u663e\u793a\u63a7\u4ef6 + */ + show:function () { + var self = this; + self.render(); + self.set('visible', true); + return self; + }, + + /** + * \u9690\u85cf\u63a7\u4ef6 + */ + hide:function () { + var self = this; + self.set('visible', false); + return self; + }, + /** + * \u4ea4\u66ff\u663e\u793a\u6216\u8005\u9690\u85cf + *
          
          +         *  control.show(); //\u663e\u793a
          +         *  control.toggle(); //\u9690\u85cf
          +         *  control.toggle(); //\u663e\u793a
          +         * 
          + */ + toggle : function(){ + this.set('visible',!this.get('visible')); + return this; + }, + _uiSetFocusable: function (focusable) { + var self = this, + t, + el = self.getKeyEventTarget(); + if (focusable) { + el.attr('tabIndex', 0) + // remove smart outline in ie + // set outline in style for other standard browser + .attr('hideFocus', true) + .on('focus', wrapBehavior(self, 'handleFocus')) + .on('blur', wrapBehavior(self, 'handleBlur')) + .on('keydown', wrapBehavior(self, 'handleKeydown')) + .on('keyup',wrapBehavior(self,'handleKeyUp')); + } else { + el.removeAttr('tabIndex'); + if (t = getWrapBehavior(self, 'handleFocus')) { + el.off('focus', t); + } + if (t = getWrapBehavior(self, 'handleBlur')) { + el.off('blur', t); + } + if (t = getWrapBehavior(self, 'handleKeydown')) { + el.off('keydown', t); + } + if (t = getWrapBehavior(self, 'handleKeyUp')) { + el.off('keyup', t); + } + } + }, + + _uiSetHandleMouseEvents: function (handleMouseEvents) { + var self = this, el = self.get('el'), t; + if (handleMouseEvents) { + el.on('mouseenter', wrapBehavior(self, 'handleMouseEnter')) + .on('mouseleave', wrapBehavior(self, 'handleMouseLeave')) + .on('contextmenu', wrapBehavior(self, 'handleContextMenu')) + .on('mousedown', wrapBehavior(self, 'handleMouseDown')) + .on('mouseup', wrapBehavior(self, 'handleMouseUp')) + .on('dblclick', wrapBehavior(self, 'handleDblClick')); + } else { + t = getWrapBehavior(self, 'handleMouseEnter') && + el.off('mouseenter', t); + t = getWrapBehavior(self, 'handleMouseLeave') && + el.off('mouseleave', t); + t = getWrapBehavior(self, 'handleContextMenu') && + el.off('contextmenu', t); + t = getWrapBehavior(self, 'handleMouseDown') && + el.off('mousedown', t); + t = getWrapBehavior(self, 'handleMouseUp') && + el.off('mouseup', t); + t = getWrapBehavior(self, 'handleDblClick') && + el.off('dblclick', t); + } + }, + + _uiSetFocused: function (v) { + if (v) { + this.getKeyEventTarget()[0].focus(); + } + }, + //\u5f53\u4f7f\u7528visiblity\u663e\u793a\u9690\u85cf\u65f6\uff0c\u9690\u85cf\u65f6\u628aDOM\u79fb\u9664\u51fa\u89c6\u56fe\u5185\uff0c\u663e\u793a\u65f6\u56de\u590d\u539f\u4f4d\u7f6e + _uiSetVisible : function(isVisible){ + var self = this, + el = self.get('el'), + visibleMode = self.get('visibleMode'); + if (visibleMode === 'visibility') { + if(isVisible){ + var position = self.get('cachePosition'); + if(position){ + self.set('xy',position); + } + } + if(!isVisible){ + var position = [ + self.get('x'),self.get('y') + ]; + self.set('cachePosition',position); + self.set('xy',[-999,-999]); + } + } + }, + //\u8bbe\u7f6echildren\u65f6 + _uiSetChildren : function(v){ + var self = this, + children = BUI.cloneObject(v); + //self.removeChildren(true); + self._initChildren(children); + }, + /** + * \u4f7f\u63a7\u4ef6\u53ef\u7528 + */ + enable : function(){ + this.set('disabled',false); + return this; + }, + /** + * \u4f7f\u63a7\u4ef6\u4e0d\u53ef\u7528\uff0c\u63a7\u4ef6\u4e0d\u53ef\u7528\u65f6\uff0c\u70b9\u51fb\u7b49\u4e8b\u4ef6\u4e0d\u4f1a\u89e6\u53d1 + *
          
          +         *  control.disable(); //\u7981\u7528
          +         *  control.enable(); //\u89e3\u9664\u7981\u7528
          +         * 
          + */ + disable : function(){ + this.set('disabled',true); + return this; + }, + /** + * \u5b50\u7ec4\u4ef6\u5c06\u8981\u6e32\u67d3\u5230\u7684\u8282\u70b9\uff0c\u5728 render \u7c7b\u4e0a\u8986\u76d6\u5bf9\u5e94\u65b9\u6cd5 + * @protected + * @ignore + */ + getContentElement: function () { + return this.get('view').getContentElement(); + }, + + /** + * \u7126\u70b9\u6240\u5728\u5143\u7d20\u5373\u952e\u76d8\u4e8b\u4ef6\u5904\u7406\u5143\u7d20\uff0c\u5728 render \u7c7b\u4e0a\u8986\u76d6\u5bf9\u5e94\u65b9\u6cd5 + * @protected + * @ignore + */ + getKeyEventTarget: function () { + return this.get('view').getKeyEventTarget(); + }, + + /** + * \u6dfb\u52a0\u63a7\u4ef6\u7684\u5b50\u63a7\u4ef6\uff0c\u7d22\u5f15\u503c\u4e3a 0-based + *
          
          +         *  control.add(new Control());//\u6dfb\u52a0controller\u5bf9\u8c61
          +         *  control.add({xclass : 'a'});//\u6dfb\u52a0xclass \u4e3aa \u7684\u4e00\u4e2a\u5bf9\u8c61
          +         *  control.add({xclass : 'b'},2);//\u63d2\u5165\u5230\u7b2c\u4e09\u4e2a\u4f4d\u7f6e
          +         * 
          + * @param {BUI.Component.Controller|Object} c \u5b50\u63a7\u4ef6\u7684\u5b9e\u4f8b\u6216\u8005\u914d\u7f6e\u9879 + * @param {String} [c.xclass] \u5982\u679cc\u4e3a\u914d\u7f6e\u9879\uff0c\u8bbe\u7f6ec\u7684xclass + * @param {Number} [index] 0-based \u5982\u679c\u672a\u6307\u5b9a\u7d22\u5f15\u503c\uff0c\u5219\u63d2\u5728\u63a7\u4ef6\u7684\u6700\u540e + */ + addChild: function (c, index) { + var self = this, + children = self.get('children'), + renderBefore; + if (index === undefined) { + index = children.length; + } + /** + * \u6dfb\u52a0\u5b50\u63a7\u4ef6\u524d\u89e6\u53d1 + * @event beforeAddChild + * @param {Object} e + * @param {Object} e.child \u6dfb\u52a0\u5b50\u63a7\u4ef6\u65f6\u4f20\u5165\u7684\u914d\u7f6e\u9879\u6216\u8005\u5b50\u63a7\u4ef6 + * @param {Number} e.index \u6dfb\u52a0\u7684\u4f4d\u7f6e + */ + self.fire('beforeAddChild',{child : c,index : index}); + renderBefore = children[index] && children[index].get('el') || null; + c = initChild(self, c, renderBefore); + children.splice(index, 0, c); + // \u5148 create \u5360\u4f4d \u518d render + // \u9632\u6b62 render \u903b\u8f91\u91cc\u8bfb parent.get('children') \u4e0d\u540c\u6b65 + // \u5982\u679c parent \u5df2\u7ecf\u6e32\u67d3\u597d\u4e86\u5b50\u7ec4\u4ef6\u4e5f\u8981\u7acb\u5373\u6e32\u67d3\uff0c\u5c31 \u521b\u5efa dom \uff0c\u7ed1\u5b9a\u4e8b\u4ef6 + if (self.get('rendered')) { + c.render(); + } + + /** + * \u6dfb\u52a0\u5b50\u63a7\u4ef6\u540e\u89e6\u53d1 + * @event afterAddChild + * @param {Object} e + * @param {Object} e.child \u6dfb\u52a0\u5b50\u63a7\u4ef6 + * @param {Number} e.index \u6dfb\u52a0\u7684\u4f4d\u7f6e + */ + self.fire('afterAddChild',{child : c,index : index}); + return c; + }, + /** + * \u5c06\u81ea\u5df1\u4ece\u7236\u63a7\u4ef6\u4e2d\u79fb\u9664 + *
          
          +         *  control.remove(); //\u5c06\u63a7\u4ef6\u4ece\u7236\u63a7\u4ef6\u4e2d\u79fb\u9664\uff0c\u5e76\u672a\u5220\u9664
          +         *  parent.addChild(control); //\u8fd8\u53ef\u4ee5\u6dfb\u52a0\u56de\u7236\u63a7\u4ef6
          +         *  
          +         *  control.remove(true); //\u4ece\u63a7\u4ef6\u4e2d\u79fb\u9664\u5e76\u8c03\u7528\u63a7\u4ef6\u7684\u6790\u6784\u51fd\u6570
          +         * 
          + * @param {Boolean} destroy \u662f\u5426\u5220\u9664DON\u8282\u70b9 + * @return {BUI.Component.Controller} \u5220\u9664\u7684\u5b50\u5bf9\u8c61. + */ + remove : function(destroy){ + var self = this, + parent = self.get('parent'); + if(parent){ + parent.removeChild(self,destroy); + }else if (destroy) { + self.destroy(); + } + return self; + }, + /** + * \u79fb\u9664\u5b50\u63a7\u4ef6\uff0c\u5e76\u8fd4\u56de\u79fb\u9664\u7684\u63a7\u4ef6 + * + * ** \u5982\u679c destroy=true,\u8c03\u7528\u79fb\u9664\u63a7\u4ef6\u7684 {@link BUI.Component.UIBase#destroy} \u65b9\u6cd5, + * \u540c\u65f6\u5220\u9664\u5bf9\u5e94\u7684DOM ** + *
          
          +         *  var child = control.getChild(id);
          +         *  control.removeChild(child); //\u4ec5\u4ec5\u79fb\u9664
          +         *  
          +         *  control.removeChild(child,true); //\u79fb\u9664\uff0c\u5e76\u8c03\u7528\u6790\u6784\u51fd\u6570
          +         * 
          + * @param {BUI.Component.Controller} c \u8981\u79fb\u9664\u7684\u5b50\u63a7\u4ef6. + * @param {Boolean} [destroy=false] \u5982\u679c\u662ftrue, + * \u8c03\u7528\u63a7\u4ef6\u7684\u65b9\u6cd5 {@link BUI.Component.UIBase#destroy} . + * @return {BUI.Component.Controller} \u79fb\u9664\u7684\u5b50\u63a7\u4ef6. + */ + removeChild: function (c, destroy) { + var self = this, + children = self.get('children'), + index = BUI.Array.indexOf(c, children); + + if(index === -1){ + return; + } + /** + * \u5220\u9664\u5b50\u63a7\u4ef6\u524d\u89e6\u53d1 + * @event beforeRemoveChild + * @param {Object} e + * @param {Object} e.child \u5b50\u63a7\u4ef6 + * @param {Boolean} e.destroy \u662f\u5426\u6e05\u9664DOM + */ + self.fire('beforeRemoveChild',{child : c,destroy : destroy}); + + if (index !== -1) { + children.splice(index, 1); + } + if (destroy && + // c is still json + c.destroy) { + c.destroy(); + } + /** + * \u5220\u9664\u5b50\u63a7\u4ef6\u524d\u89e6\u53d1 + * @event afterRemoveChild + * @param {Object} e + * @param {Object} e.child \u5b50\u63a7\u4ef6 + * @param {Boolean} e.destroy \u662f\u5426\u6e05\u9664DOM + */ + self.fire('afterRemoveChild',{child : c,destroy : destroy}); + + return c; + }, + + /** + * \u5220\u9664\u5f53\u524d\u63a7\u4ef6\u7684\u5b50\u63a7\u4ef6 + *
          
          +         *   control.removeChildren();//\u5220\u9664\u6240\u6709\u5b50\u63a7\u4ef6
          +         *   control.removeChildren(true);//\u5220\u9664\u6240\u6709\u5b50\u63a7\u4ef6\uff0c\u5e76\u8c03\u7528\u5b50\u63a7\u4ef6\u7684\u6790\u6784\u51fd\u6570
          +         * 
          + * @see Component.Controller#removeChild + * @param {Boolean} [destroy] \u5982\u679c\u8bbe\u7f6e true, + * \u8c03\u7528\u5b50\u63a7\u4ef6\u7684 {@link BUI.Component.UIBase#destroy}\u65b9\u6cd5. + */ + removeChildren: function (destroy) { + var self = this, + i, + t = [].concat(self.get('children')); + for (i = 0; i < t.length; i++) { + self.removeChild(t[i], destroy); + } + }, + + /** + * \u6839\u636e\u7d22\u5f15\u83b7\u53d6\u5b50\u63a7\u4ef6 + *
          
          +         *  control.getChildAt(0);//\u83b7\u53d6\u7b2c\u4e00\u4e2a\u5b50\u63a7\u4ef6
          +         *  control.getChildAt(2); //\u83b7\u53d6\u7b2c\u4e09\u4e2a\u5b50\u63a7\u4ef6
          +         * 
          + * @param {Number} index 0-based \u7d22\u5f15\u503c. + * @return {BUI.Component.Controller} \u5b50\u63a7\u4ef6\u6216\u8005null + */ + getChildAt: function (index) { + var children = this.get('children'); + return children[index] || null; + }, + /** + * \u6839\u636eId\u83b7\u53d6\u5b50\u63a7\u4ef6 + *
          
          +         *  control.getChild('id'); //\u4ece\u63a7\u4ef6\u7684\u76f4\u63a5\u5b50\u63a7\u4ef6\u4e2d\u67e5\u627e
          +         *  control.getChild('id',true);//\u9012\u5f52\u67e5\u627e\u6240\u6709\u5b50\u63a7\u4ef6\uff0c\u5305\u542b\u5b50\u63a7\u4ef6\u7684\u5b50\u63a7\u4ef6
          +         * 
          + * @param {String} id \u63a7\u4ef6\u7f16\u53f7 + * @param {Boolean} deep \u662f\u5426\u7ee7\u7eed\u67e5\u627e\u5728\u5b50\u63a7\u4ef6\u4e2d\u67e5\u627e + * @return {BUI.Component.Controller} \u5b50\u63a7\u4ef6\u6216\u8005null + */ + getChild : function(id,deep){ + return this.getChildBy(function(item){ + return item.get('id') === id; + },deep); + }, + /** + * \u901a\u8fc7\u5339\u914d\u51fd\u6570\u67e5\u627e\u5b50\u63a7\u4ef6\uff0c\u8fd4\u56de\u7b2c\u4e00\u4e2a\u5339\u914d\u7684\u5bf9\u8c61 + *
          
          +         *  control.getChildBy(function(child){//\u4ece\u63a7\u4ef6\u7684\u76f4\u63a5\u5b50\u63a7\u4ef6\u4e2d\u67e5\u627e
          +         *    return child.get('id') = '1243';
          +         *  }); 
          +         *  
          +         *  control.getChild(function(child){//\u9012\u5f52\u67e5\u627e\u6240\u6709\u5b50\u63a7\u4ef6\uff0c\u5305\u542b\u5b50\u63a7\u4ef6\u7684\u5b50\u63a7\u4ef6
          +         *    return child.get('id') = '1243';
          +         *  },true);
          +         * 
          + * @param {Function} math \u67e5\u627e\u7684\u5339\u914d\u51fd\u6570 + * @param {Boolean} deep \u662f\u5426\u7ee7\u7eed\u67e5\u627e\u5728\u5b50\u63a7\u4ef6\u4e2d\u67e5\u627e + * @return {BUI.Component.Controller} \u5b50\u63a7\u4ef6\u6216\u8005null + */ + getChildBy : function(math,deep){ + return this.getChildrenBy(math,deep)[0] || null; + }, + /** + * \u83b7\u53d6\u63a7\u4ef6\u7684\u9644\u52a0\u9ad8\u5ea6 = control.get('el').outerHeight() - control.get('el').height() + * @protected + * @return {Number} \u9644\u52a0\u5bbd\u5ea6 + */ + getAppendHeight : function(){ + var el = this.get('el'); + return el.outerHeight() - el.height(); + }, + /** + * \u83b7\u53d6\u63a7\u4ef6\u7684\u9644\u52a0\u5bbd\u5ea6 = control.get('el').outerWidth() - control.get('el').width() + * @protected + * @return {Number} \u9644\u52a0\u5bbd\u5ea6 + */ + getAppendWidth : function(){ + var el = this.get('el'); + return el.outerWidth() - el.width(); + }, + /** + * \u67e5\u627e\u7b26\u5408\u6761\u4ef6\u7684\u5b50\u63a7\u4ef6 + *
          
          +         *  control.getChildrenBy(function(child){//\u4ece\u63a7\u4ef6\u7684\u76f4\u63a5\u5b50\u63a7\u4ef6\u4e2d\u67e5\u627e
          +         *    return child.get('type') = '1';
          +         *  }); 
          +         *  
          +         *  control.getChildrenBy(function(child){//\u9012\u5f52\u67e5\u627e\u6240\u6709\u5b50\u63a7\u4ef6\uff0c\u5305\u542b\u5b50\u63a7\u4ef6\u7684\u5b50\u63a7\u4ef6
          +         *    return child.get('type') = '1';
          +         *  },true);
          +         * 
          + * @param {Function} math \u67e5\u627e\u7684\u5339\u914d\u51fd\u6570 + * @param {Boolean} deep \u662f\u5426\u7ee7\u7eed\u67e5\u627e\u5728\u5b50\u63a7\u4ef6\u4e2d\u67e5\u627e\uff0c\u5982\u679c\u7b26\u5408\u4e0a\u9762\u7684\u5339\u914d\u51fd\u6570\uff0c\u5219\u4e0d\u518d\u5f80\u4e0b\u67e5\u627e + * @return {BUI.Component.Controller[]} \u5b50\u63a7\u4ef6\u6570\u7ec4 + */ + getChildrenBy : function(math,deep){ + var self = this, + results = []; + if(!math){ + return results; + } + + self.eachChild(function(child){ + if(math(child)){ + results.push(child); + }else if(deep){ + + results = results.concat(child.getChildrenBy(math,deep)); + } + }); + return results; + }, + /** + * \u904d\u5386\u5b50\u5143\u7d20 + *
          
          +         *  control.eachChild(function(child,index){ //\u904d\u5386\u5b50\u63a7\u4ef6
          +         *  
          +         *  });
          +         * 
          + * @param {Function} func \u8fed\u4ee3\u51fd\u6570\uff0c\u51fd\u6570\u539f\u578bfunction(child,index) + */ + eachChild : function(func){ + BUI.each(this.get('children'),func); + }, + /** + * Handle dblclick events. By default, this performs its associated action by calling + * {@link BUI.Component.Controller#performActionInternal}. + * @protected + * @param {jQuery.Event} ev DOM event to handle. + */ + handleDblClick: function (ev) { + this.performActionInternal(ev); + if(!this.isChildrenElement(ev.target)){ + this.fire('dblclick',{domTarget : ev.target,domEvent : ev}); + } + }, + + /** + * Called by it's container component to dispatch mouseenter event. + * @private + * @param {jQuery.Event} ev DOM event to handle. + */ + handleMouseOver: function (ev) { + var self = this, + el = self.get('el'); + if (!isMouseEventWithinElement(ev, el)) { + self.handleMouseEnter(ev); + + } + }, + + /** + * Called by it's container component to dispatch mouseleave event. + * @private + * @param {jQuery.Event} ev DOM event to handle. + */ + handleMouseOut: function (ev) { + var self = this, + el = self.get('el'); + if (!isMouseEventWithinElement(ev, el)) { + self.handleMouseLeave(ev); + + } + }, + + /** + * Handle mouseenter events. If the component is not disabled, highlights it. + * @protected + * @param {jQuery.Event} ev DOM event to handle. + */ + handleMouseEnter: function (ev) { + var self = this; + this.set('highlighted', !!ev); + self.fire('mouseenter',{domTarget : ev.target,domEvent : ev}); + }, + + /** + * Handle mouseleave events. If the component is not disabled, de-highlights it. + * @protected + * @param {jQuery.Event} ev DOM event to handle. + */ + handleMouseLeave: function (ev) { + var self = this; + self.set('active', false); + self.set('highlighted', !ev); + self.fire('mouseleave',{domTarget : ev.target,domEvent : ev}); + }, + + /** + * Handles mousedown events. If the component is not disabled, + * If the component is activeable, then activate it. + * If the component is focusable, then focus it, + * else prevent it from receiving keyboard focus. + * @protected + * @param {jQuery.Event} ev DOM event to handle. + */ + handleMouseDown: function (ev) { + var self = this, + n, + isMouseActionButton = ev['which'] === 1, + el; + if (isMouseActionButton) { + el = self.getKeyEventTarget(); + if (self.get('activeable')) { + self.set('active', true); + } + if (self.get('focusable')) { + el[0].focus(); + self.set('focused', true); + } + + if (!self.get('allowTextSelection')) { + // firefox /chrome \u4e0d\u4f1a\u5f15\u8d77\u7126\u70b9\u8f6c\u79fb + n = ev.target.nodeName; + n = n && n.toLowerCase(); + // do not prevent focus when click on editable element + if (n !== 'input' && n !== 'textarea') { + ev.preventDefault(); + } + } + if(!self.isChildrenElement(ev.target)){ + self.fire('mousedown',{domTarget : ev.target,domEvent : ev}); + } + + } + }, + + /** + * Handles mouseup events. + * If this component is not disabled, performs its associated action by calling + * {@link BUI.Component.Controller#performActionInternal}, then deactivates it. + * @protected + * @param {jQuery.Event} ev DOM event to handle. + */ + handleMouseUp: function (ev) { + var self = this, + isChildrenElement = self.isChildrenElement(ev.target); + // \u5de6\u952e + if (self.get('active') && ev.which === 1) { + self.performActionInternal(ev); + self.set('active', false); + if(!isChildrenElement){ + self.fire('click',{domTarget : ev.target,domEvent : ev}); + } + } + if(!isChildrenElement){ + self.fire('mouseup',{domTarget : ev.target,domEvent : ev}); + } + }, + + /** + * Handles context menu. + * @protected + * @param {jQuery.Event} ev DOM event to handle. + */ + handleContextMenu: function (ev) { + }, + + /** + * Handles focus events. Style focused class. + * @protected + * @param {jQuery.Event} ev DOM event to handle. + */ + handleFocus: function (ev) { + this.set('focused', !!ev); + this.fire('focus',{domEvent : ev,domTarget : ev.target}); + }, + + /** + * Handles blur events. Remove focused class. + * @protected + * @param {jQuery.Event} ev DOM event to handle. + */ + handleBlur: function (ev) { + this.set('focused', !ev); + this.fire('blur',{domEvent : ev,domTarget : ev.target}); + }, + + /** + * Handle enter keydown event to {@link BUI.Component.Controller#performActionInternal}. + * @protected + * @param {jQuery.Event} ev DOM event to handle. + */ + handleKeyEventInternal: function (ev) { + var self = this, + isChildrenElement = self.isChildrenElement(ev.target); + if (ev.which === 13) { + if(!isChildrenElement){ + self.fire('click',{domTarget : ev.target,domEvent : ev}); + } + + return this.performActionInternal(ev); + } + if(!isChildrenElement){ + self.fire('keydown',{domTarget : ev.target,domEvent : ev}); + } + }, + + /** + * Handle keydown events. + * If the component is not disabled, call {@link BUI.Component.Controller#handleKeyEventInternal} + * @protected + * @param {jQuery.Event} ev DOM event to handle. + */ + handleKeydown: function (ev) { + var self = this; + if (self.handleKeyEventInternal(ev)) { + ev.halt(); + return true; + } + }, + handleKeyUp : function(ev){ + var self = this; + if(!self.isChildrenElement(ev.target)){ + self.fire('keyup',{domTarget : ev.target,domEvent : ev}); + } + }, + /** + * Performs the appropriate action when this component is activated by the user. + * @protected + * @param {jQuery.Event} ev DOM event to handle. + */ + performActionInternal: function (ev) { + }, + /** + * \u6790\u6784\u51fd\u6570 + * @protected + */ + destructor: function () { + var self = this, + id, + i, + view, + children = self.get('children'); + id = self.get('id'); + for (i = 0; i < children.length; i++) { + children[i].destroy && children[i].destroy(); + } + self.get('view').destroy(); + Manager.removeComponent(id); + } + }, + { + ATTRS: + { + /** + * \u63a7\u4ef6\u7684Html \u5185\u5bb9 + *
          
          +             *  new Control({
          +             *     content : '\u5185\u5bb9',
          +             *     render : '#c1'
          +             *  });
          +             * 
          + * @cfg {String|jQuery} content + */ + /** + * \u63a7\u4ef6\u7684Html \u5185\u5bb9 + * @type {String|jQuery} + */ + content:{ + view:1 + }, + /** + * \u63a7\u4ef6\u6839\u8282\u70b9\u4f7f\u7528\u7684\u6807\u7b7e + *
          
          +             *  new Control({
          +             *     elTagName : 'ul',
          +             *      content : '
        • \u5185\u5bb9
        • ', //\u63a7\u4ef6\u7684DOM <ul><li>\u5185\u5bb9</li></ul> + * render : '#c1' + * }); + *
          + * @cfg {String} elTagName + */ + elTagName: { + // \u751f\u6210\u6807\u7b7e\u540d\u5b57 + view : true, + value: 'div' + }, + /** + * \u5b50\u5143\u7d20\u7684\u9ed8\u8ba4 xclass,\u914d\u7f6echild\u7684\u65f6\u5019\u6ca1\u5fc5\u8981\u6bcf\u6b21\u90fd\u586b\u5199xclass + * @type {String} + */ + defaultChildClass : { + + }, + /** + * \u5982\u679c\u63a7\u4ef6\u672a\u8bbe\u7f6e xclass\uff0c\u540c\u65f6\u7236\u5143\u7d20\u8bbe\u7f6e\u4e86 defaultChildClass\uff0c\u90a3\u4e48 + * xclass = defaultChildClass + '-' + xtype + *
          
          +             *  A.ATTRS = {
          +             *    defaultChildClass : {
          +             *        value : 'b'
          +             *    }
          +             *  }
          +             *  //\u7c7bB \u7684xclass = 'b'\u7c7b B1\u7684xclass = 'b-1',\u7c7b B2\u7684xclass = 'b-2',\u90a3\u4e48
          +             *  var a = new A({
          +             *    children : [
          +             *        {content : 'b'}, //B\u7c7b
          +             *        {content : 'b1',xtype:'1'}, //B1\u7c7b
          +             *        {content : 'b2',xtype:'2'}, //B2\u7c7b
          +             *    ]
          +             *  });
          +             * 
          + * @type {String} + */ + xtype : { + + }, + /** + * \u6807\u793a\u63a7\u4ef6\u7684\u552f\u4e00\u7f16\u53f7\uff0c\u9ed8\u8ba4\u4f1a\u81ea\u52a8\u751f\u6210 + * @cfg {String} id + */ + /** + * \u6807\u793a\u63a7\u4ef6\u7684\u552f\u4e00\u7f16\u53f7\uff0c\u9ed8\u8ba4\u4f1a\u81ea\u52a8\u751f\u6210 + * @type {String} + */ + id : { + view : true + }, + /** + * \u63a7\u4ef6\u5bbd\u5ea6 + *
          
          +             * new Control({
          +             *   width : 200 // 200,'200px','20%'
          +             * });
          +             * 
          + * @cfg {Number|String} width + */ + /** + * \u63a7\u4ef6\u5bbd\u5ea6 + *
          
          +             *  control.set('width',200);
          +             *  control.set('width','200px');
          +             *  control.set('width','20%');
          +             * 
          + * @type {Number|String} + */ + width:{ + view:1 + }, + /** + * \u63a7\u4ef6\u5bbd\u5ea6 + *
          
          +             * new Control({
          +             *   height : 200 // 200,'200px','20%'
          +             * });
          +             * 
          + * @cfg {Number|String} height + */ + /** + * \u63a7\u4ef6\u5bbd\u5ea6 + *
          
          +             *  control.set('height',200);
          +             *  control.set('height','200px');
          +             *  control.set('height','20%');
          +             * 
          + * @type {Number|String} + */ + height:{ + view:1 + }, + /** + * \u63a7\u4ef6\u6839\u8282\u70b9\u5e94\u7528\u7684\u6837\u5f0f + *
          
          +             *  new Control({
          +             *   elCls : 'test',
          +             *   content : '\u5185\u5bb9',
          +             *   render : '#t1'   //<div id='t1'><div class="test">\u5185\u5bb9</div></div>
          +             *  });
          +             * 
          + * @cfg {String} elCls + */ + /** + * \u63a7\u4ef6\u6839\u8282\u70b9\u5e94\u7528\u7684\u6837\u5f0f css class + * @type {String} + */ + elCls:{ + view:1 + }, + /** + * @cfg {Object} elStyle + * \u63a7\u4ef6\u6839\u8282\u70b9\u5e94\u7528\u7684css\u5c5e\u6027 + *
          
          +             *    var cfg = {elStyle : {width:'100px', height:'200px'}};
          +             *  
          + */ + /** + * \u63a7\u4ef6\u6839\u8282\u70b9\u5e94\u7528\u7684css\u5c5e\u6027\uff0c\u4ee5\u952e\u503c\u5bf9\u5f62\u5f0f + * @type {Object} + *
          
          +             *	 control.set('elStyle',	{
          +             *		width:'100px',
          +             *		height:'200px'
          +             *   });
          +             *  
          + */ + elStyle:{ + view:1 + }, + /** + * @cfg {Object} elAttrs + * \u63a7\u4ef6\u6839\u8282\u70b9\u5e94\u7528\u7684\u5c5e\u6027\uff0c\u4ee5\u952e\u503c\u5bf9\u5f62\u5f0f: + *
          
          +             *  new Control({
          +             *    elAttrs :{title : 'tips'}   
          +             *  });
          +             * 
          + */ + /** + * @type {Object} + * \u63a7\u4ef6\u6839\u8282\u70b9\u5e94\u7528\u7684\u5c5e\u6027\uff0c\u4ee5\u952e\u503c\u5bf9\u5f62\u5f0f: + * { title : 'tips'} + * @ignore + */ + elAttrs:{ + view:1 + }, + /** + * \u5c06\u63a7\u4ef6\u63d2\u5165\u5230\u6307\u5b9a\u5143\u7d20\u524d + *
          
          +             *  new Control({
          +             *      elBefore : '#t1'
          +             *  });
          +             * 
          + * @cfg {jQuery} elBefore + */ + /** + * \u5c06\u63a7\u4ef6\u63d2\u5165\u5230\u6307\u5b9a\u5143\u7d20\u524d + * @type {jQuery} + * @ignore + */ + elBefore:{ + // better named to renderBefore, too late ! + view:1 + }, + + /** + * \u53ea\u8bfb\u5c5e\u6027\uff0c\u6839\u8282\u70b9DOM + * @type {jQuery} + */ + el:{ + view:1 + }, + /** + * \u63a7\u4ef6\u652f\u6301\u7684\u4e8b\u4ef6 + * @type {Object} + * @protected + */ + events : { + value : { + /** + * \u70b9\u51fb\u4e8b\u4ef6\uff0c\u6b64\u4e8b\u4ef6\u4f1a\u5192\u6ce1\uff0c\u6240\u4ee5\u53ef\u4ee5\u5728\u7236\u5143\u7d20\u4e0a\u76d1\u542c\u6240\u6709\u5b50\u5143\u7d20\u7684\u6b64\u4e8b\u4ef6 + * @event + * @param {Object} e \u4e8b\u4ef6\u5bf9\u8c61 + * @param {BUI.Component.Controller} e.target \u89e6\u53d1\u4e8b\u4ef6\u7684\u5bf9\u8c61 + * @param {jQuery.Event} e.domEvent DOM\u89e6\u53d1\u7684\u4e8b\u4ef6 + * @param {HTMLElement} e.domTarget \u89e6\u53d1\u4e8b\u4ef6\u7684DOM\u8282\u70b9 + */ + 'click' : true, + /** + * \u53cc\u51fb\u4e8b\u4ef6\uff0c\u6b64\u4e8b\u4ef6\u4f1a\u5192\u6ce1\uff0c\u6240\u4ee5\u53ef\u4ee5\u5728\u7236\u5143\u7d20\u4e0a\u76d1\u542c\u6240\u6709\u5b50\u5143\u7d20\u7684\u6b64\u4e8b\u4ef6 + * @event + * @param {Object} e \u4e8b\u4ef6\u5bf9\u8c61 + * @param {BUI.Component.Controller} e.target \u89e6\u53d1\u4e8b\u4ef6\u7684\u5bf9\u8c61 + * @param {jQuery.Event} e.domEvent DOM\u89e6\u53d1\u7684\u4e8b\u4ef6 + * @param {HTMLElement} e.domTarget \u89e6\u53d1\u4e8b\u4ef6\u7684DOM\u8282\u70b9 + */ + 'dblclick' : true, + /** + * \u9f20\u6807\u79fb\u5165\u63a7\u4ef6 + * @event + * @param {Object} e \u4e8b\u4ef6\u5bf9\u8c61 + * @param {BUI.Component.Controller} e.target \u89e6\u53d1\u4e8b\u4ef6\u7684\u5bf9\u8c61 + * @param {jQuery.Event} e.domEvent DOM\u89e6\u53d1\u7684\u4e8b\u4ef6 + * @param {HTMLElement} e.domTarget \u89e6\u53d1\u4e8b\u4ef6\u7684DOM\u8282\u70b9 + */ + 'mouseenter' : true, + /** + * \u9f20\u6807\u79fb\u51fa\u63a7\u4ef6 + * @event + * @param {Object} e \u4e8b\u4ef6\u5bf9\u8c61 + * @param {BUI.Component.Controller} e.target \u89e6\u53d1\u4e8b\u4ef6\u7684\u5bf9\u8c61 + * @param {jQuery.Event} e.domEvent DOM\u89e6\u53d1\u7684\u4e8b\u4ef6 + * @param {HTMLElement} e.domTarget \u89e6\u53d1\u4e8b\u4ef6\u7684DOM\u8282\u70b9 + */ + 'mouseleave' : true, + /** + * \u952e\u76d8\u6309\u4e0b\u6309\u952e\u4e8b\u4ef6\uff0c\u6b64\u4e8b\u4ef6\u4f1a\u5192\u6ce1\uff0c\u6240\u4ee5\u53ef\u4ee5\u5728\u7236\u5143\u7d20\u4e0a\u76d1\u542c\u6240\u6709\u5b50\u5143\u7d20\u7684\u6b64\u4e8b\u4ef6 + * @event + * @param {Object} e \u4e8b\u4ef6\u5bf9\u8c61 + * @param {BUI.Component.Controller} e.target \u89e6\u53d1\u4e8b\u4ef6\u7684\u5bf9\u8c61 + * @param {jQuery.Event} e.domEvent DOM\u89e6\u53d1\u7684\u4e8b\u4ef6 + * @param {HTMLElement} e.domTarget \u89e6\u53d1\u4e8b\u4ef6\u7684DOM\u8282\u70b9 + */ + 'keydown' : true, + /** + * \u952e\u76d8\u6309\u952e\u62ac\u8d77\u63a7\u4ef6\uff0c\u6b64\u4e8b\u4ef6\u4f1a\u5192\u6ce1\uff0c\u6240\u4ee5\u53ef\u4ee5\u5728\u7236\u5143\u7d20\u4e0a\u76d1\u542c\u6240\u6709\u5b50\u5143\u7d20\u7684\u6b64\u4e8b\u4ef6 + * @event + * @param {Object} e \u4e8b\u4ef6\u5bf9\u8c61 + * @param {BUI.Component.Controller} e.target \u89e6\u53d1\u4e8b\u4ef6\u7684\u5bf9\u8c61 + * @param {jQuery.Event} e.domEvent DOM\u89e6\u53d1\u7684\u4e8b\u4ef6 + * @param {HTMLElement} e.domTarget \u89e6\u53d1\u4e8b\u4ef6\u7684DOM\u8282\u70b9 + */ + 'keyup' : true, + /** + * \u63a7\u4ef6\u83b7\u53d6\u7126\u70b9\u4e8b\u4ef6 + * @event + * @param {Object} e \u4e8b\u4ef6\u5bf9\u8c61 + * @param {BUI.Component.Controller} e.target \u89e6\u53d1\u4e8b\u4ef6\u7684\u5bf9\u8c61 + * @param {jQuery.Event} e.domEvent DOM\u89e6\u53d1\u7684\u4e8b\u4ef6 + * @param {HTMLElement} e.domTarget \u89e6\u53d1\u4e8b\u4ef6\u7684DOM\u8282\u70b9 + */ + 'focus' : false, + /** + * \u63a7\u4ef6\u4e22\u5931\u7126\u70b9\u4e8b\u4ef6 + * @event + * @param {Object} e \u4e8b\u4ef6\u5bf9\u8c61 + * @param {BUI.Component.Controller} e.target \u89e6\u53d1\u4e8b\u4ef6\u7684\u5bf9\u8c61 + * @param {jQuery.Event} e.domEvent DOM\u89e6\u53d1\u7684\u4e8b\u4ef6 + * @param {HTMLElement} e.domTarget \u89e6\u53d1\u4e8b\u4ef6\u7684DOM\u8282\u70b9 + */ + 'blur' : false, + /** + * \u9f20\u6807\u6309\u4e0b\u63a7\u4ef6\uff0c\u6b64\u4e8b\u4ef6\u4f1a\u5192\u6ce1\uff0c\u6240\u4ee5\u53ef\u4ee5\u5728\u7236\u5143\u7d20\u4e0a\u76d1\u542c\u6240\u6709\u5b50\u5143\u7d20\u7684\u6b64\u4e8b\u4ef6 + * @event + * @param {Object} e \u4e8b\u4ef6\u5bf9\u8c61 + * @param {BUI.Component.Controller} e.target \u89e6\u53d1\u4e8b\u4ef6\u7684\u5bf9\u8c61 + * @param {jQuery.Event} e.domEvent DOM\u89e6\u53d1\u7684\u4e8b\u4ef6 + * @param {HTMLElement} e.domTarget \u89e6\u53d1\u4e8b\u4ef6\u7684DOM\u8282\u70b9 + */ + 'mousedown' : true, + /** + * \u9f20\u6807\u62ac\u8d77\u63a7\u4ef6\uff0c\u6b64\u4e8b\u4ef6\u4f1a\u5192\u6ce1\uff0c\u6240\u4ee5\u53ef\u4ee5\u5728\u7236\u5143\u7d20\u4e0a\u76d1\u542c\u6240\u6709\u5b50\u5143\u7d20\u7684\u6b64\u4e8b\u4ef6 + * @event + * @param {Object} e \u4e8b\u4ef6\u5bf9\u8c61 + * @param {BUI.Component.Controller} e.target \u89e6\u53d1\u4e8b\u4ef6\u7684\u5bf9\u8c61 + * @param {jQuery.Event} e.domEvent DOM\u89e6\u53d1\u7684\u4e8b\u4ef6 + * @param {HTMLElement} e.domTarget \u89e6\u53d1\u4e8b\u4ef6\u7684DOM\u8282\u70b9 + */ + 'mouseup' : true, + /** + * \u63a7\u4ef6\u663e\u793a + * @event + */ + 'show' : false, + /** + * \u63a7\u4ef6\u9690\u85cf + * @event + */ + 'hide' : false + } + }, + /** + * \u6307\u5b9a\u63a7\u4ef6\u7684\u5bb9\u5668 + *
          
          +             *  new Control({
          +             *    render : '#t1',
          +             *    elCls : 'test',
          +             *    content : '123'  //<div id="t1"><div class="test bui-xclass"><span>123</span></div></div>
          +             *  });
          +             * 
          + * @cfg {jQuery} render + */ + /** + * \u6307\u5b9a\u63a7\u4ef6\u7684\u5bb9\u5668 + * @type {jQuery} + * @ignore + */ + render:{ + view:1 + }, + /** + * \u72b6\u6001\u76f8\u5173\u7684\u6837\u5f0f,\u9ed8\u8ba4\u60c5\u51b5\u4e0b\u4f1a\u4f7f\u7528 \u524d\u7f00\u540d + xclass + '-' + \u72b6\u6001\u540d + *
            + *
          1. hover
          2. + *
          3. focused
          4. + *
          5. active
          6. + *
          7. disabled
          8. + *
          + * @type {Object} + */ + statusCls : { + view : true, + value : { + + } + }, + /** + * \u63a7\u4ef6\u7684\u53ef\u89c6\u65b9\u5f0f,\u503c\u4e3a\uff1a + * - 'display' + * - 'visibility' + *
          
          +             *   new Control({
          +             *     visibleMode: 'visibility'
          +             *   });
          +             *  
          + * @cfg {String} [visibleMode = 'display'] + */ + /** + * \u63a7\u4ef6\u7684\u53ef\u89c6\u65b9\u5f0f,\u4f7f\u7528 css + * - 'display' \u6216\u8005 + * - 'visibility' + *
          
          +             *  control.set('visibleMode','display')
          +             * 
          + * @type {String} + */ + visibleMode:{ + view:1, + value : 'display' + }, + /** + * \u63a7\u4ef6\u662f\u5426\u53ef\u89c1 + *
          
          +             *  new Control({
          +             *    visible : false   //\u9690\u85cf
          +             *  });
          +             * 
          + * @cfg {Boolean} [visible = true] + */ + /** + * \u63a7\u4ef6\u662f\u5426\u53ef\u89c1 + *
          
          +             *  control.set('visible',true); //control.show();
          +             *  control.set('visible',false); //control.hide();
          +             * 
          + * @type {Boolean} + * @default true + */ + visible:{ + value:true, + view:1 + }, + /** + * \u662f\u5426\u5141\u8bb8\u5904\u7406\u9f20\u6807\u4e8b\u4ef6 + * @default true. + * @type {Boolean} + * @protected + */ + handleMouseEvents: { + value: true + }, + + /** + * \u63a7\u4ef6\u662f\u5426\u53ef\u4ee5\u83b7\u53d6\u7126\u70b9 + * @default true. + * @protected + * @type {Boolean} + */ + focusable: { + value: false, + view: 1 + }, + /** + * \u4e00\u65e6\u4f7f\u7528loader\u7684\u9ed8\u8ba4\u914d\u7f6e + * @protected + * @type {Object} + */ + defaultLoaderCfg : { + value : { + property : 'content', + autoLoad : true + } + }, + /** + * \u63a7\u4ef6\u5185\u5bb9\u7684\u52a0\u8f7d\u5668 + * @type {BUI.Component.Loader} + */ + loader : { + getter : function(v){ + var _self = this, + defaultCfg; + if(v && !v.isLoader){ + v.target = _self; + defaultCfg = _self.get('defaultLoaderCfg') + v = new Loader(BUI.merge(defaultCfg,v)); + _self.setInternal('loader',v); + } + return v; + } + }, + /** + * 1. Whether allow select this component's text.
          + * 2. Whether not to lose last component's focus if click current one (set false). + * + * Defaults to: false. + * @type {Boolean} + * @property allowTextSelection + * @protected + */ + /** + * @ignore + */ + allowTextSelection: { + // \u548c focusable \u5206\u79bb + // grid \u9700\u6c42\uff1a\u5bb9\u5668\u5141\u8bb8\u9009\u62e9\u91cc\u9762\u5185\u5bb9 + value: true + }, + + /** + * \u63a7\u4ef6\u662f\u5426\u53ef\u4ee5\u6fc0\u6d3b + * @default true. + * @type {Boolean} + * @protected + */ + activeable: { + value: true + }, + + /** + * \u63a7\u4ef6\u662f\u5426\u83b7\u53d6\u7126\u70b9 + * @type {Boolean} + * @readOnly + */ + focused: { + view: 1 + }, + + /** + * \u63a7\u4ef6\u662f\u5426\u5904\u4e8e\u6fc0\u6d3b\u72b6\u6001\uff0c\u6309\u94ae\u6309\u4e0b\u8fd8\u672a\u62ac\u8d77 + * @type {Boolean} + * @default false + * @protected + */ + active: { + view: 1 + }, + /** + * \u63a7\u4ef6\u662f\u5426\u9ad8\u4eae + * @cfg {Boolean} highlighted + * @ignore + */ + /** + * \u63a7\u4ef6\u662f\u5426\u9ad8\u4eae + * @type {Boolean} + * @protected + */ + highlighted: { + view: 1 + }, + /** + * \u5b50\u63a7\u4ef6\u96c6\u5408 + * @cfg {BUI.Component.Controller[]} children + */ + /** + * \u5b50\u63a7\u4ef6\u96c6\u5408 + * @type {BUI.Component.Controller[]} + */ + children: { + sync : false, + value: [] + }, + /** + * \u63a7\u4ef6\u7684CSS\u524d\u7f00 + * @cfg {String} [prefixCls = BUI.prefix] + */ + /** + * \u63a7\u4ef6\u7684CSS\u524d\u7f00 + * @type {String} + * @default BUI.prefix + */ + prefixCls: { + value: BUI.prefix, // box srcNode need + view: 1 + }, + + /** + * \u7236\u63a7\u4ef6 + * @cfg {BUI.Component.Controller} parent + * @ignore + */ + /** + * \u7236\u63a7\u4ef6 + * @type {BUI.Component.Controller} + */ + parent: { + setter: function (p) { + // \u4e8b\u4ef6\u5192\u6ce1\u6e90 + this.addTarget(p); + } + }, + + /** + * \u7981\u7528\u63a7\u4ef6 + * @cfg {Boolean} [disabled = false] + */ + /** + * \u7981\u7528\u63a7\u4ef6 + *
          
          +             *  control.set('disabled',true); //==  control.disable();
          +             *  control.set('disabled',false); //==  control.enable();
          +             * 
          + * @type {Boolean} + * @default false + */ + disabled: { + view: 1, + value : false + }, + /** + * \u6e32\u67d3\u63a7\u4ef6\u7684View\u7c7b. + * @protected + * @cfg {BUI.Component.View} [xview = BUI.Component.View] + */ + /** + * \u6e32\u67d3\u63a7\u4ef6\u7684View\u7c7b. + * @protected + * @type {BUI.Component.View} + */ + xview: { + value: View + } + }, + PARSER : { + visible : function(el){ + var _self = this, + display = el.css('display'), + + visibility = el.css('visibility'), + visibleMode = _self.get('visibleMode'); + if((display == 'none' && visibleMode == 'display') || (visibility == 'hidden' && visibleMode == 'visibility')){ + return false; + } + return true; + } + } + }, { + xclass: 'controller', + priority : 0 + }); + + return Controller; +}); +/** + * @ignore + * @fileOverview cookie + * @author lifesinger@gmail.com + */ + + +define('bui/cookie',function () { + + var doc = document, + MILLISECONDS_OF_DAY = 24 * 60 * 60 * 1000, + encode = encodeURIComponent, + decode = decodeURIComponent; + + function isNotEmptyString(val) { + return typeof(val) === 'string' && val !== ''; + } + + /** + * Provide Cookie utilities. + * @class BUI.Cookie + * @singleton + */ + var Cookie = { + + /** + * Returns the cookie value for given name + * @return {String} name The name of the cookie to retrieve + */ + get: function (name) { + var ret, m; + + if (isNotEmptyString(name)) { + if ((m = String(doc.cookie).match( + new RegExp('(?:^| )' + name + '(?:(?:=([^;]*))|;|$)')))) { + ret = m[1] ? decode(m[1]) : ''; + } + } + return ret; + }, + + /** + * Set a cookie with a given name and value + * @param {String} name The name of the cookie to set + * @param {String} val The value to set for cookie + * @param {Number|Date} expires + * if Number secified how many days this cookie will expire + * @param {String} domain set cookie's domain + * @param {String} path set cookie's path + * @param {Boolean} secure whether this cookie can only be sent to server on https + */ + set: function (name, val, expires, domain, path, secure) { + var text = String(encode(val)), date = expires; + + // \u4ece\u5f53\u524d\u65f6\u95f4\u5f00\u59cb\uff0c\u591a\u5c11\u5929\u540e\u8fc7\u671f + if (typeof date === 'number') { + date = new Date(); + date.setTime(date.getTime() + expires * MILLISECONDS_OF_DAY); + } + // expiration date + if (date instanceof Date) { + text += '; expires=' + date.toUTCString(); + } + + // domain + if (isNotEmptyString(domain)) { + text += '; domain=' + domain; + } + + // path + if (isNotEmptyString(path)) { + text += '; path=' + path; + } + + // secure + if (secure) { + text += '; secure'; + } + + doc.cookie = name + '=' + text; + }, + + /** + * Remove a cookie from the machine by setting its expiration date to sometime in the past + * @param {String} name The name of the cookie to remove. + * @param {String} domain The cookie's domain + * @param {String} path The cookie's path + * @param {String} secure The cookie's secure option + */ + remove: function (name, domain, path, secure) { + this.set(name, '', -1, domain, path, secure); + } + }; + + BUI.Cookie = Cookie; + + return Cookie; +}); + +/** +* @ignore +* 2012.02.14 yiminghe@gmail.com +* - jsdoc added +* +* 2010.04 +* - get \u65b9\u6cd5\u8981\u8003\u8651 ie \u4e0b\uff0c +* \u503c\u4e3a\u7a7a\u7684 cookie \u4e3a 'test3; test3=3; test3tt=2; test1=t1test3; test3', \u6ca1\u6709\u7b49\u4e8e\u53f7\u3002 +* \u9664\u4e86\u6b63\u5219\u83b7\u53d6\uff0c\u8fd8\u53ef\u4ee5 split \u5b57\u7b26\u4e32\u7684\u65b9\u5f0f\u6765\u83b7\u53d6\u3002 +* - api \u8bbe\u8ba1\u4e0a\uff0c\u539f\u672c\u60f3\u501f\u9274 jQuery \u7684\u7b80\u660e\u98ce\u683c\uff1aS.cookie(name, ...), \u4f46\u8003\u8651\u5230\u53ef\u6269\u5c55\u6027\uff0c\u76ee\u524d +* \u72ec\u7acb\u6210\u9759\u6001\u5de5\u5177\u7c7b\u7684\u65b9\u5f0f\u66f4\u4f18\u3002 +*/ +/** + * @fileOverview Data \u547d\u540d\u7a7a\u95f4\u7684\u5165\u53e3\u6587\u4ef6 + * @ignore + */ +(function(){ +var BASE = 'bui/data/'; +define('bui/data',['bui/common',BASE + 'sortable',BASE + 'proxy',BASE + 'abstractstore',BASE + 'store', + BASE + 'node',BASE + 'treestore'],function(r) { + + var BUI = r('bui/common'), + Data = BUI.namespace('Data'); + BUI.mix(Data,{ + Sortable : r(BASE + 'sortable'), + Proxy : r(BASE + 'proxy'), + AbstractStore : r(BASE + 'abstractstore'), + Store : r(BASE + 'store'), + Node : r(BASE + 'node'), + TreeStore : r(BASE + 'treestore') + }); + + return Data; +}); +})(); +/** + * @fileOverview \u53ef\u6392\u5e8f\u6269\u5c55\u7c7b + * @ignore + */ + +define('bui/data/sortable',function() { + + var ASC = 'ASC', + DESC = 'DESC'; + /** + * \u6392\u5e8f\u6269\u5c55\u65b9\u6cd5\uff0c\u65e0\u6cd5\u76f4\u63a5\u4f7f\u7528 + * \u8bf7\u5728\u7ee7\u627f\u4e86 {@link BUI.Base}\u7684\u7c7b\u4e0a\u4f7f\u7528 + * @class BUI.Data.Sortable + * @extends BUI.Base + */ + var sortable = function(){ + + }; + + sortable.ATTRS = + /** + * @lends BUI.Data.Sortable# + * @ignore + */ + { + /** + * \u6bd4\u8f83\u51fd\u6570 + * @cfg {Function} compareFunction + * \u51fd\u6570\u539f\u578b function(v1,v2)\uff0c\u6bd4\u8f832\u4e2a\u5b57\u6bb5\u662f\u5426\u76f8\u7b49 + * \u5982\u679c\u662f\u5b57\u7b26\u4e32\u5219\u6309\u7167\u672c\u5730\u6bd4\u8f83\u7b97\u6cd5\uff0c\u5426\u5219\u4f7f\u7528 > ,== \u9a8c\u8bc1 + */ + compareFunction:{ + value : function(v1,v2){ + if(v1 === undefined){ + v1 = ''; + } + if(v2 === undefined){ + v2 = ''; + } + if(BUI.isString(v1)){ + return v1.localeCompare(v2); + } + + if(v1 > v2){ + return 1; + }else if(v1 === v2){ + return 0; + }else{ + return -1; + } + } + }, + /** + * \u6392\u5e8f\u5b57\u6bb5 + * @cfg {String} sortField + */ + /** + * \u6392\u5e8f\u5b57\u6bb5 + * @type {String} + */ + sortField : { + + }, + /** + * \u6392\u5e8f\u65b9\u5411,'ASC'\u3001'DESC' + * @cfg {String} [sortDirection = 'ASC'] + */ + /** + * \u6392\u5e8f\u65b9\u5411,'ASC'\u3001'DESC' + * @type {String} + */ + sortDirection : { + value : 'ASC' + }, + /** + * \u6392\u5e8f\u4fe1\u606f + *
            + *
          1. field: \u6392\u5e8f\u5b57\u6bb5
          2. + *
          3. direction: \u6392\u5e8f\u65b9\u5411,ASC(\u9ed8\u8ba4),DESC
          4. + *
          + * @cfg {Object} sortInfo + */ + /** + * \u6392\u5e8f\u4fe1\u606f + *
            + *
          1. field: \u6392\u5e8f\u5b57\u6bb5
          2. + *
          3. direction: \u6392\u5e8f\u65b9\u5411,ASC(\u9ed8\u8ba4),DESC
          4. + *
          + * @type {Object} + */ + sortInfo: { + getter : function(){ + var _self = this, + field = _self.get('sortField'); + + return { + field : field, + direction : _self.get('sortDirection') + }; + }, + setter: function(v){ + var _self = this; + + _self.set('sortField',v.field); + _self.set('sortDirection',v.direction); + } + } + }; + + BUI.augment(sortable, + /** + * @lends BUI.Data.Sortable.prototype + * @ignore + */ + { + compare : function(obj1,obj2,field,direction){ + + var _self = this, + dir; + field = field || _self.get('sortField'); + direction = direction || _self.get('sortDirection'); + //\u5982\u679c\u672a\u6307\u5b9a\u6392\u5e8f\u5b57\u6bb5\uff0c\u6216\u65b9\u5411\uff0c\u5219\u6309\u7167\u9ed8\u8ba4\u987a\u5e8f + if(!field || !direction){ + return 1; + } + dir = direction === ASC ? 1 : -1; + + return _self.get('compareFunction')(obj1[field],obj2[field]) * dir; + }, + /** + * \u83b7\u53d6\u6392\u5e8f\u7684\u96c6\u5408 + * @protected + * @return {Array} \u6392\u5e8f\u96c6\u5408 + */ + getSortData : function(){ + + }, + /** + * \u6392\u5e8f\u6570\u636e + * @param {String|Array} field \u6392\u5e8f\u5b57\u6bb5\u6216\u8005\u6570\u7ec4 + * @param {String} direction \u6392\u5e8f\u65b9\u5411 + * @param {Array} records \u6392\u5e8f + * @return {Array} + */ + sortData : function(field,direction,records){ + var _self = this, + records = records || _self.getSortData(); + + if(BUI.isArray(field)){ + records = field; + field = null; + } + + field = field || _self.get('sortField'); + direction = direction || _self.get('sortDirection'); + + _self.set('sortField',field); + _self.set('sortDirection',direction); + + if(!field || !direction){ + return records; + } + + records.sort(function(obj1,obj2){ + return _self.compare(obj1,obj2,field,direction); + }); + return records; + } + }); + + return sortable; +}); +define('bui/data/proxy',['bui/data/sortable'],function(require) { + + var Sortable = require('bui/data/sortable'); + + /** + * \u6570\u636e\u4ee3\u7406\u5bf9\u8c61\uff0c\u52a0\u8f7d\u6570\u636e, + * \u4e00\u822c\u4e0d\u76f4\u63a5\u4f7f\u7528\uff0c\u5728store\u91cc\u9762\u51b3\u5b9a\u4f7f\u7528\u4ec0\u4e48\u7c7b\u578b\u7684\u6570\u636e\u4ee3\u7406\u5bf9\u8c61 + * @class BUI.Data.Proxy + * @extends BUI.Base + * @abstract + */ + var proxy = function(config){ + proxy.superclass.constructor.call(this,config); + }; + + proxy.ATTRS = { + + }; + + BUI.extend(proxy,BUI.Base); + + BUI.augment(proxy, + /** + * @lends BUI.Data.Proxy.prototype + * @ignore + */ + { + /** + * @protected + * @private + */ + _read : function(params,callback){ + + }, + /** + * \u8bfb\u6570\u636e + * @param {Object} params \u952e\u503c\u5bf9\u5f62\u5f0f\u7684\u53c2\u6570 + * @param {Function} callback \u56de\u8c03\u51fd\u6570\uff0c\u51fd\u6570\u539f\u578b function(data){} + * @param {Object} scope \u56de\u8c03\u51fd\u6570\u7684\u4e0a\u4e0b\u6587 + */ + read : function(params,callback,scope){ + var _self = this; + scope = scope || _self; + + _self._read(params,function(data){ + callback.call(scope,data); + }); + }, + /** + * \u66f4\u65b0\u6570\u636e + * @protected + */ + update : function(params,callback,scope){ + + } + }); + + /** + * \u5f02\u6b65\u52a0\u8f7d\u6570\u636e\u7684\u4ee3\u7406 + * @class BUI.Data.Proxy.Ajax + * @extends BUI.Data.Proxy + */ + var ajaxProxy = function(config){ + ajaxProxy.superclass.constructor.call(this,config); + }; + + ajaxProxy.ATTRS = BUI.mix(true,proxy.ATTRS, + /** + * @lends BUI.Data.Proxy.Ajax# + * @ignore + */ + { + /** + * \u9650\u5236\u6761\u6570 + * @cfg {String} [limitParam='limit'] + */ + /** + * \u9650\u5236\u6761\u6570 + * @type {String} + * @default 'limit' + */ + limitParam : { + value : 'limit' + }, + /** + * \u8d77\u59cb\u7eaa\u5f55\u4ee3\u8868\u7684\u5b57\u6bb5 + * @cfg {String} [startParam='start'] + */ + /** + * \u8d77\u59cb\u7eaa\u5f55\u4ee3\u8868\u7684\u5b57\u6bb5 + * @type {String} + */ + startParam : { + value : 'start' + }, + /** + * \u9875\u7801\u7684\u5b57\u6bb5\u540d + * @cfg {String} [pageIndexParam='pageIndex'] + */ + /** + * \u9875\u7801\u7684\u5b57\u6bb5\u540d + * @type {String} + * @default 'pageIndex' + */ + pageIndexParam : { + value : 'pageIndex' + }, + /** + * \u52a0\u8f7d\u6570\u636e\u65f6\uff0c\u8fd4\u56de\u7684\u683c\u5f0f,\u76ee\u524d\u53ea\u652f\u6301"json\u3001jsonp"\u683c\u5f0f
          + * @cfg {String} [dataType='json'] + */ + /** + * \u52a0\u8f7d\u6570\u636e\u65f6\uff0c\u8fd4\u56de\u7684\u683c\u5f0f,\u76ee\u524d\u53ea\u652f\u6301"json\u3001jsonp"\u683c\u5f0f
          + * @type {String} + * @default "json" + */ + dataType: { + value : 'json' + }, + /** + * \u83b7\u53d6\u6570\u636e\u7684\u65b9\u5f0f,'GET'\u6216\u8005'POST',\u9ed8\u8ba4\u4e3a'GET' + * @cfg {String} [method='GET'] + */ + /** + * \u83b7\u53d6\u6570\u636e\u7684\u65b9\u5f0f,'GET'\u6216\u8005'POST',\u9ed8\u8ba4\u4e3a'GET' + * @type {String} + * @default 'GET' + */ + method : { + value : 'GET' + }, + /** + * \u662f\u5426\u4f7f\u7528Cache + * @type {Boolean} + */ + cache : { + value : false + }, + /** + * \u52a0\u8f7d\u6570\u636e\u7684\u94fe\u63a5 + * @cfg {String} url + * @required + */ + /** + * \u52a0\u8f7d\u6570\u636e\u7684\u94fe\u63a5 + * @type {String} + * @required + */ + url :{ + + } + + }); + BUI.extend(ajaxProxy,proxy); + + BUI.augment(ajaxProxy,{ + _processParams : function(params){ + var _self = this, + arr = ['start','limit','pageIndex']; + + BUI.each(arr,function(field){ + var fieldParam = _self.get(field+'Param'); + if(fieldParam !== field){ + params[fieldParam] = params[field]; + delete params[field]; + } + }); + }, + /** + * @protected + * @private + */ + _read : function(params,callback){ + var _self = this; + + params = BUI.cloneObject(params); + _self._processParams(params); + + $.ajax({ + url: _self.get('url'), + type : _self.get('method'), + dataType: _self.get('dataType'), + data : params, + cache : _self.get('cache'), + success: function(data) { + callback(data); + }, + error : function(jqXHR, textStatus, errorThrown){ + var result = { + exception : { + status : textStatus, + errorThrown: errorThrown, + jqXHR : jqXHR + } + }; + callback(result); + } + }); + } + }); + + /** + * \u8bfb\u53d6\u7f13\u5b58\u7684\u4ee3\u7406 + * @class BUI.Data.Proxy.Memery + * @extends BUI.Data.Proxy + * @mixins BUI.Data.Sortable + */ + var memeryProxy = function(config){ + memeryProxy.superclass.constructor.call(this,config); + }; + + BUI.extend(memeryProxy,proxy); + + BUI.mixin(memeryProxy,[Sortable]); + + BUI.augment(memeryProxy,{ + /** + * @protected + * @ignore + */ + _read : function(params,callback){ + var _self = this, + pageable = params.pageable, + start = params.start, + sortField = params.sortField, + sortDirection = params.sortDirection, + limit = params.limit, + data = _self.get('data'), + rows = []; + + _self.sortData(sortField,sortDirection); + + if(limit){//\u5206\u9875\u65f6 + rows = data.slice(start,start + limit); + callback({rows:rows,results:data.length}); + }else{//\u4e0d\u5206\u9875\u65f6 + rows = data.slice(start); + callback(rows); + } + + } + + }); + + proxy.Ajax = ajaxProxy; + proxy.Memery = memeryProxy; + + return proxy; + + +}); +/** + * @fileOverview \u62bd\u8c61\u6570\u636e\u7f13\u51b2\u7c7b + * @ignore + */ + +define('bui/data/abstractstore',['bui/common','bui/data/proxy'],function (require) { + var BUI = require('bui/common'), + Proxy = require('bui/data/proxy'); + + /** + * @class BUI.Data.AbstractStore + * \u6570\u636e\u7f13\u51b2\u62bd\u8c61\u7c7b,\u6b64\u7c7b\u4e0d\u8fdb\u884c\u5b9e\u4f8b\u5316 + * @extends BUI.Base + */ + function AbstractStore(config){ + AbstractStore.superclass.constructor.call(this,config); + this._init(); + } + + AbstractStore.ATTRS = { + /** + * \u521b\u5efa\u5bf9\u8c61\u65f6\u662f\u5426\u81ea\u52a8\u52a0\u8f7d + *
          
          +    *   var store = new Data.Store({
          +    *     url : 'data.php',  //\u8bbe\u7f6e\u52a0\u8f7d\u6570\u636e\u7684URL
          +    *     autoLoad : true    //\u521b\u5efaStore\u65f6\u81ea\u52a8\u52a0\u8f7d\u6570\u636e
          +    *   });
          +    * 
          + * @cfg {Boolean} [autoLoad=false] + */ + autoLoad: { + value :false + }, + /** + * \u4e0a\u6b21\u67e5\u8be2\u7684\u53c2\u6570 + * @type {Object} + * @readOnly + */ + lastParams : { + value : {} + }, + /** + * \u521d\u59cb\u5316\u65f6\u67e5\u8be2\u7684\u53c2\u6570\uff0c\u5728\u521d\u59cb\u5316\u65f6\u6709\u6548 + *
          
          +     * var store = new Data.Store({
          +    *     url : 'data.php',  //\u8bbe\u7f6e\u52a0\u8f7d\u6570\u636e\u7684URL
          +    *     autoLoad : true,    //\u521b\u5efaStore\u65f6\u81ea\u52a8\u52a0\u8f7d\u6570\u636e
          +    *     params : {         //\u8bbe\u7f6e\u8bf7\u6c42\u65f6\u7684\u53c2\u6570
          +    *       id : '1',
          +    *       type : '1'
          +    *     }
          +    *   });
          +     * 
          + * @cfg {Object} params + */ + params : { + + }, + /** + * \u6570\u636e\u4ee3\u7406\u5bf9\u8c61,\u7528\u4e8e\u52a0\u8f7d\u6570\u636e\u7684ajax\u914d\u7f6e\uff0c{@link BUI.Data.Proxy} + *
          
          +     *   var store = new Data.Store({
          +    *     url : 'data.php',  //\u8bbe\u7f6e\u52a0\u8f7d\u6570\u636e\u7684URL
          +    *     autoLoad : true,    //\u521b\u5efaStore\u65f6\u81ea\u52a8\u52a0\u8f7d\u6570\u636e
          +    *     proxy : {
          +    *       method : 'post',
          +    *       dataType : 'jsonp'
          +    *     }
          +    *   });
          +     * 
          + * @cfg {Object|BUI.Data.Proxy} proxy + */ + proxy : { + value : { + + } + }, + /** + * \u8bf7\u6c42\u6570\u636e\u7684\u5730\u5740\uff0c\u901a\u8fc7ajax\u52a0\u8f7d\u6570\u636e\uff0c + * \u6b64\u53c2\u6570\u8bbe\u7f6e\u5219\u52a0\u8f7d\u8fdc\u7a0b\u6570\u636e + * ** \u4f60\u53ef\u4ee5\u8bbe\u7f6e\u5728proxy\u5916\u90e8 ** + *
          
          +     *   var store = new Data.Store({
          +    *     url : 'data.php',  //\u8bbe\u7f6e\u52a0\u8f7d\u6570\u636e\u7684URL
          +    *     autoLoad : true,    //\u521b\u5efaStore\u65f6\u81ea\u52a8\u52a0\u8f7d\u6570\u636e
          +    *     proxy : {
          +    *       method : 'post',
          +    *       dataType : 'jsonp'
          +    *     }
          +    *   });
          +     * 
          + * ** \u4f60\u4e5f\u53ef\u4ee5\u8bbe\u7f6e\u5728proxy\u4e0a ** + *
          
          +     *   var store = new Data.Store({
          +    *     autoLoad : true,    //\u521b\u5efaStore\u65f6\u81ea\u52a8\u52a0\u8f7d\u6570\u636e
          +    *     proxy : {
          +    *       url : 'data.php',  //\u8bbe\u7f6e\u52a0\u8f7d\u6570\u636e\u7684URL
          +    *       method : 'post',
          +    *       dataType : 'jsonp'
          +    *     }
          +    *   });
          +     * 
          + * \u5426\u5219\u628a {BUI.Data.Store#cfg-data}\u4f5c\u4e3a\u672c\u5730\u7f13\u5b58\u6570\u636e\u52a0\u8f7d + * @cfg {String} url + */ + /** + * \u8bf7\u6c42\u6570\u636e\u7684url + *
          
          +     *   //\u66f4\u6539url
          +     *   store.get('proxy').set('url',url);
          +     * 
          + * @type {String} + */ + url : { + + }, + events : { + value : [ + /** + * \u6570\u636e\u63a5\u53d7\u6539\u53d8\uff0c\u6240\u6709\u589e\u52a0\u3001\u5220\u9664\u3001\u4fee\u6539\u7684\u6570\u636e\u8bb0\u5f55\u6e05\u7a7a + * @name BUI.Data.Store#acceptchanges + * @event + */ + 'acceptchanges', + /** + * \u5f53\u6570\u636e\u52a0\u8f7d\u5b8c\u6210\u540e + * @name BUI.Data.Store#load + * @event + * @param {jQuery.Event} e \u4e8b\u4ef6\u5bf9\u8c61\uff0c\u5305\u542b\u52a0\u8f7d\u6570\u636e\u65f6\u7684\u53c2\u6570 + */ + 'load', + + /** + * \u5f53\u6570\u636e\u52a0\u8f7d\u524d + * @name BUI.Data.Store#beforeload + * @event + */ + 'beforeload', + + /** + * \u53d1\u751f\u5728\uff0cbeforeload\u548cload\u4e2d\u95f4\uff0c\u6570\u636e\u5df2\u7ecf\u83b7\u53d6\u5b8c\u6210\uff0c\u4f46\u662f\u8fd8\u672a\u89e6\u53d1load\u4e8b\u4ef6\uff0c\u7528\u4e8e\u83b7\u53d6\u8fd4\u56de\u7684\u539f\u59cb\u6570\u636e + * @name BUI.Data.Store#beforeProcessLoad + * @event + * @param {jQuery.Event} e \u4e8b\u4ef6\u5bf9\u8c61 + * @param {Object} e.data \u4ece\u670d\u52a1\u5668\u7aef\u8fd4\u56de\u7684\u6570\u636e + */ + 'beforeProcessLoad', + + /** + * \u5f53\u6dfb\u52a0\u6570\u636e\u65f6\u89e6\u53d1\u8be5\u4e8b\u4ef6 + * @event + * @param {jQuery.Event} e \u4e8b\u4ef6\u5bf9\u8c61 + * @param {Object} e.record \u6dfb\u52a0\u7684\u6570\u636e + */ + 'add', + + /** + * \u52a0\u8f7d\u6570\u636e\u53d1\u751f\u5f02\u5e38\u65f6\u89e6\u53d1 + * @event + * @name BUI.Data.Store#exception + * @param {jQuery.Event} e \u4e8b\u4ef6\u5bf9\u8c61 + * @param {String|Object} e.error \u52a0\u8f7d\u6570\u636e\u65f6\u8fd4\u56de\u7684\u9519\u8bef\u4fe1\u606f\u6216\u8005\u52a0\u8f7d\u6570\u636e\u5931\u8d25\uff0c\u6d4f\u89c8\u5668\u8fd4\u56de\u7684\u4fe1\u606f\uff08httpResponse \u5bf9\u8c61 \u7684textStatus\uff09 + * @param {String} e.responseText \u7f51\u7edc\u6216\u8005\u6d4f\u89c8\u5668\u52a0\u8f7d\u6570\u636e\u53d1\u751f\u9519\u8bef\u662f\u8fd4\u56de\u7684httpResponse \u5bf9\u8c61\u7684responseText + */ + 'exception', + + /** + * \u5f53\u5220\u9664\u6570\u636e\u662f\u89e6\u53d1\u8be5\u4e8b\u4ef6 + * @event + * @param {jQuery.Event} e \u4e8b\u4ef6\u5bf9\u8c61 + * @param {Object} e.data \u5220\u9664\u7684\u6570\u636e + */ + 'remove', + + /** + * \u5f53\u66f4\u65b0\u6570\u636e\u6307\u5b9a\u5b57\u6bb5\u65f6\u89e6\u53d1\u8be5\u4e8b\u4ef6 + * @event + * @param {jQuery.Event} e \u4e8b\u4ef6\u5bf9\u8c61 + * @param {Object} e.record \u66f4\u65b0\u7684\u6570\u636e + * @param {Object} e.field \u66f4\u65b0\u7684\u5b57\u6bb5 + * @param {Object} e.value \u66f4\u65b0\u7684\u503c + */ + 'update', + + /** + * \u524d\u7aef\u53d1\u751f\u6392\u5e8f\u65f6\u89e6\u53d1 + * @name BUI.Data.Store#localsort + * @event + * @param {jQuery.Event} e \u4e8b\u4ef6\u5bf9\u8c61 + * @param {Object} e.field \u6392\u5e8f\u7684\u5b57\u6bb5 + * @param {Object} e.direction \u6392\u5e8f\u7684\u65b9\u5411 'ASC'\uff0c'DESC' + */ + 'localsort' + ] + }, + /** + * \u672c\u5730\u6570\u636e\u6e90,\u4f7f\u7528\u672c\u5730\u6570\u636e\u6e90\u65f6\u4f1a\u4f7f\u7528{@link BUI.Data.Proxy.Memery} + * @cfg {Array} data + */ + /** + * \u672c\u5730\u6570\u636e\u6e90 + * @type {Array} + */ + data : { + setter : function(data){ + var _self = this, + proxy = _self.get('proxy'); + if(proxy.set){ + proxy.set('data',data); + }else{ + proxy.data = data; + } + //\u8bbe\u7f6e\u672c\u5730\u6570\u636e\u65f6\uff0c\u628aautoLoad\u7f6e\u4e3atrue + _self.set('autoLoad',true); + } + } + }; + + BUI.extend(AbstractStore,BUI.Base); + + BUI.augment(AbstractStore,{ + /** + * \u662f\u5426\u662f\u6570\u636e\u7f13\u51b2\u5bf9\u8c61\uff0c\u7528\u4e8e\u5224\u65ad\u5bf9\u8c61 + * @type {Boolean} + */ + isStore : true, + /** + * @private + * \u521d\u59cb\u5316 + */ + _init : function(){ + var _self = this; + + _self.beforeInit(); + //\u521d\u59cb\u5316\u7ed3\u679c\u96c6 + _self._initParams(); + _self._initProxy(); + _self._initData(); + }, + /** + * @protected + * \u521d\u59cb\u5316\u4e4b\u524d + */ + beforeInit : function(){ + + }, + //\u521d\u59cb\u5316\u6570\u636e,\u5982\u679c\u9ed8\u8ba4\u52a0\u8f7d\u6570\u636e\uff0c\u5219\u52a0\u8f7d\u6570\u636e + _initData : function(){ + var _self = this, + autoLoad = _self.get('autoLoad'); + + if(autoLoad){ + _self.load(); + } + }, + //\u521d\u59cb\u5316\u67e5\u8be2\u53c2\u6570 + _initParams : function(){ + var _self = this, + lastParams = _self.get('lastParams'), + params = _self.get('params'); + + //\u521d\u59cb\u5316 \u53c2\u6570 + BUI.mix(lastParams,params); + }, + /** + * @protected + * \u521d\u59cb\u5316\u6570\u636e\u4ee3\u7406\u7c7b + */ + _initProxy : function(){ + var _self = this, + url = _self.get('url'), + proxy = _self.get('proxy'); + + if(!(proxy instanceof Proxy)){ + + if(url){ + proxy.url = url; + } + + //\u5f02\u6b65\u8bf7\u6c42\u7684\u4ee3\u7406\u7c7b + if(proxy.type === 'ajax' || proxy.url){ + proxy = new Proxy.Ajax(proxy); + }else{ + proxy = new Proxy.Memery(proxy); + } + + _self.set('proxy',proxy); + } + }, + /** + * \u52a0\u8f7d\u6570\u636e + *
          
          +     *  //\u4e00\u822c\u8c03\u7528
          +     *  store.load(params);
          +     *  
          +     *  //\u4f7f\u7528\u56de\u8c03\u51fd\u6570
          +     *  store.load(params,function(data){
          +     *  
          +     *  });
          +     *
          +     *  //load\u6709\u8bb0\u5fc6\u53c2\u6570\u7684\u529f\u80fd
          +     *  store.load({id : '123',type="1"});
          +     *  //\u4e0b\u4e00\u6b21\u8c03\u7528
          +     *  store.load();\u9ed8\u8ba4\u4f7f\u7528\u4e0a\u6b21\u7684\u53c2\u6570\uff0c\u53ef\u4ee5\u5bf9\u5bf9\u5e94\u7684\u53c2\u6570\u8fdb\u884c\u8986\u76d6
          +     * 
          + * @param {Object} params \u53c2\u6570\u952e\u503c\u5bf9 + * @param {Function} fn \u56de\u8c03\u51fd\u6570\uff0c\u9ed8\u8ba4\u4e3a\u7a7a + */ + load : function(params,callback){ + var _self = this, + proxy = _self.get('proxy'), + lastParams = _self.get('lastParams'); + + BUI.mix(true,lastParams,_self.getAppendParams(),params); + + _self.fire('beforeload',{params:lastParams}); + + //\u9632\u6b62\u5f02\u6b65\u8bf7\u6c42\u672a\u7ed3\u675f\uff0c\u53c8\u53d1\u9001\u65b0\u8bf7\u6c42\u56de\u8c03\u53c2\u6570\u9519\u8bef + params = BUI.cloneObject(lastParams); + proxy.read(lastParams,function(data){ + _self.onLoad(data,params); + if(callback){ + callback(data,params); + } + },_self); + }, + /** + * \u52a0\u8f7d\u5b8c\u6570\u636e + * @protected + * @template + */ + onLoad : function(data,params){ + var _self = this; + + var processResult = _self.processLoad(data,params); + //\u5982\u679c\u5904\u7406\u6210\u529f\uff0c\u8fd4\u56de\u9519\u8bef\u65f6\uff0c\u4e0d\u8fdb\u884c\u540e\u9762\u7684\u5904\u7406 + if(processResult){ + _self.afterProcessLoad(data,params); + } + }, + /** + * @private + * \u52a0\u8f7d\u5b8c\u6570\u636e\u5904\u7406\u6570\u636e + */ + processLoad : function(data,params){ + var _self = this, + hasErrorField = _self.get('hasErrorProperty'); + //\u83b7\u53d6\u7684\u539f\u59cb\u6570\u636e + _self.fire('beforeProcessLoad',data); + + if(data[hasErrorField] || data.exception){ + _self.onException(data); + return false; + } + return true; + }, + /** + * @protected + * @template + * \u5904\u7406\u6570\u636e\u540e + */ + afterProcessLoad : function(data,params){ + + }, + /** + * @protected + * \u5904\u7406\u9519\u8bef\u51fd\u6570 + * @param {*} data \u51fa\u9519\u5bf9\u8c61 + */ + onException : function(data){ + var _self = this, + errorProperty = _self.get('errorProperty'), + obj = {}; + //\u7f51\u7edc\u5f02\u5e38\u3001\u8f6c\u7801\u9519\u8bef\u4e4b\u7c7b\uff0c\u53d1\u751f\u5728json\u83b7\u53d6\u6216\u8f6c\u53d8\u65f6 + if(data.exception){ + obj.type = 'exception'; + obj[errorProperty] = data.exception; + }else{//\u7528\u6237\u5b9a\u4e49\u7684\u9519\u8bef + obj.type = 'error'; + obj[errorProperty] = data[errorProperty]; + } + _self.fire('exception',obj); + + }, + /** + * \u662f\u5426\u5305\u542b\u6570\u636e + * @return {Boolean} + */ + hasData : function(){ + + }, + /** + * \u83b7\u53d6\u9644\u52a0\u7684\u53c2\u6570 + * @template + * @protected + * @return {Object} \u9644\u52a0\u7684\u53c2\u6570 + */ + getAppendParams : function(){ + return {}; + } + }); + + return AbstractStore; +});/** + * @fileOverview \u6811\u5f62\u6570\u636e\u7ed3\u6784\u7684\u8282\u70b9\u7c7b\uff0c\u65e0\u6cd5\u76f4\u63a5\u4f7f\u7528\u6570\u636e\u4f5c\u4e3a\u8282\u70b9\uff0c\u6240\u4ee5\u8fdb\u884c\u4e00\u5c42\u5c01\u88c5 + * \u53ef\u4ee5\u76f4\u63a5\u4f5c\u4e3aTreeNode\u63a7\u4ef6\u7684\u914d\u7f6e\u9879 + * @ignore + */ + +define('bui/data/node',['bui/common'],function (require) { + var BUI = require('bui/common'); + + function mapNode(cfg,map){ + var rst = {}; + if(map){ + BUI.each(cfg,function(v,k){ + var name = map[k] || k; + rst[name] = v; + }); + rst.record = cfg; + }else{ + rst = cfg; + } + return rst; + } + /** + * @class BUI.Data.Node + * \u6811\u5f62\u6570\u636e\u7ed3\u6784\u7684\u8282\u70b9\u7c7b + */ + function Node (cfg,map) { + var _self = this; + cfg = mapNode(cfg,map); + BUI.mix(this,cfg); + } + + BUI.augment(Node,{ + /** + * \u662f\u5426\u6839\u8282\u70b9 + * @type {Boolean} + */ + root : false, + /** + * \u662f\u5426\u53f6\u5b50\u8282\u70b9 + * @type {Boolean} + */ + leaf : false, + /** + * \u663e\u793a\u8282\u70b9\u65f6\u663e\u793a\u7684\u6587\u672c + * @type {Object} + */ + text : '', + /** + * \u4ee3\u8868\u8282\u70b9\u7684\u7f16\u53f7 + * @type {String} + */ + id : null, + /** + * \u5b50\u8282\u70b9\u662f\u5426\u5df2\u7ecf\u52a0\u8f7d\u8fc7 + * @type {Boolean} + */ + loaded : false, + /** + * \u4ece\u6839\u8282\u70b9\u5230\u6b64\u8282\u70b9\u7684\u8def\u5f84\uff0cid\u7684\u96c6\u5408\u5982\uff1a ['0','1','12'], + * \u4fbf\u4e8e\u5feb\u901f\u5b9a\u4f4d\u8282\u70b9 + * @type {Array} + */ + path : null, + /** + * \u7236\u8282\u70b9 + * @type {BUI.Data.Node} + */ + parent : null, + /** + * \u6811\u8282\u70b9\u7684\u7b49\u7ea7 + * @type {Number} + */ + level : 0, + /** + * \u8282\u70b9\u662f\u5426\u7531\u4e00\u6761\u8bb0\u5f55\u5c01\u88c5\u800c\u6210 + * @type {Object} + */ + record : null, + /** + * \u5b50\u8282\u70b9\u96c6\u5408 + * @type {BUI.Data.Node[]} + */ + children : null, + /** + * \u662f\u5426\u662fNode\u5bf9\u8c61 + * @type {Object} + */ + isNode : true + }); + return Node; +});/** + * @fileOverview \u6811\u5f62\u5bf9\u8c61\u7f13\u51b2\u7c7b + * @ignore + */ + +define('bui/data/treestore',['bui/common','bui/data/node','bui/data/abstractstore','bui/data/proxy'],function (require) { + + var BUI = require('bui/common'), + Node = require('bui/data/node'), + Proxy = require('bui/data/proxy'), + AbstractStore = require('bui/data/abstractstore'); + + /** + * @class BUI.Data.TreeStore + * \u6811\u5f62\u6570\u636e\u7f13\u51b2\u7c7b + *

          + * + *

          + *
          
          +   *   //\u52a0\u8f7d\u9759\u6001\u6570\u636e
          +   *   var store = new TreeStore({
          +   *     root : {
          +   *       text : '\u6839\u8282\u70b9',
          +   *       id : 'root'
          +   *     },
          +   *     data : [{id : '1',text : 1},{id : '2',text : 2}] //\u4f1a\u52a0\u8f7d\u6210root\u7684children
          +   *   });
          +   *   //\u5f02\u6b65\u52a0\u8f7d\u6570\u636e\uff0c\u81ea\u52a8\u52a0\u8f7d\u6570\u636e\u65f6\uff0c\u4f1a\u8c03\u7528store.load({id : 'root'}); //root\u4e3a\u6839\u8282\u70b9\u7684id
          +   *   var store = new TreeStore({
          +   *     root : {
          +   *       text : '\u6839\u8282\u70b9',
          +   *       id : 'root'
          +   *     },
          +   *     url : 'data/nodes.php',
          +   *     autoLoad : true  //\u8bbe\u7f6e\u81ea\u52a8\u52a0\u8f7d\uff0c\u521d\u59cb\u5316\u540e\u81ea\u52a8\u52a0\u8f7d\u6570\u636e
          +   *   });
          +   *
          +   *   //\u52a0\u8f7d\u6307\u5b9a\u8282\u70b9
          +   *   var node = store.findNode('1');
          +   *   store.loadNode(node);
          +   *   //\u6216\u8005
          +   *   store.load({id : '1'});//\u53ef\u4ee5\u914d\u7f6e\u81ea\u5b9a\u4e49\u53c2\u6570\uff0c\u8fd4\u56de\u503c\u9644\u52a0\u5230\u6307\u5b9aid\u7684\u8282\u70b9\u4e0a
          +   * 
          + * @extends BUI.Data.AbstractStore + */ + function TreeStore(config){ + TreeStore.superclass.constructor.call(this,config); + } + + TreeStore.ATTRS = { + /** + * \u6839\u8282\u70b9 + *
          
          +     *  var store = new TreeStore({
          +     *    root : {text : '\u6839\u8282\u70b9',id : 'rootId',children : [{id : '1',text : '1'}]}
          +     *  });
          +     * 
          + * @cfg {Object} root + */ + /** + * \u6839\u8282\u70b9,\u521d\u59cb\u5316\u540e\u4e0d\u8981\u66f4\u6539\u5bf9\u8c61\uff0c\u53ef\u4ee5\u66f4\u6539\u5c5e\u6027\u503c + *
          
          +     *  var root = store.get('root');
          +     *  root.text = '\u4fee\u6539\u7684\u6587\u672c'\uff1b
          +     *  store.update(root);
          +     * 
          + * @type {Object} + * @readOnly + */ + root : { + + }, + /** + * \u6570\u636e\u6620\u5c04\uff0c\u7528\u4e8e\u8bbe\u7f6e\u7684\u6570\u636e\u8ddf@see {BUI.Data.Node} \u4e0d\u4e00\u81f4\u65f6\uff0c\u8fdb\u884c\u5339\u914d\u3002 + * \u5982\u679c\u6b64\u5c5e\u6027\u4e3anull,\u90a3\u4e48\u5047\u8bbe\u8bbe\u7f6e\u7684\u5bf9\u8c61\u662fNode\u5bf9\u8c61 + *
          
          +     *   //\u4f8b\u5982\u539f\u59cb\u6570\u636e\u4e3a {name : '123',value : '\u6587\u672c123',isLeaf: false,nodes : []}
          +     *   var store = new TreeStore({
          +     *     map : {
          +     *       id : 'name',
          +     *       text : 'value',
          +     *       leaf : 'isLeaf',
          +     *       children : 'nodes'
          +     *     }
          +     *   });
          +     *   //\u6620\u5c04\u540e\uff0c\u8bb0\u5f55\u4f1a\u53d8\u6210  {id : '123',text : '\u6587\u672c123',leaf: false,children : []};
          +     *   //\u6b64\u65f6\u539f\u59cb\u8bb0\u5f55\u4f1a\u4f5c\u4e3a\u5bf9\u8c61\u7684 record\u5c5e\u6027
          +     *   var node = store.findNode('123'),
          +     *     record = node.record;
          +     * 
          + * **Notes:** + * \u4f7f\u7528\u6570\u636e\u6620\u5c04\u7684\u8bb0\u5f55\u4ec5\u505a\u4e8e\u5c55\u793a\u6570\u636e\uff0c\u4e0d\u4f5c\u4e3a\u53ef\u66f4\u6539\u7684\u6570\u636e\uff0cadd,update\u4e0d\u4f1a\u66f4\u6539\u6570\u636e\u7684\u539f\u59cb\u6570\u636e + * @cfg {Object} map + */ + map : { + + }, + /** + * \u8fd4\u56de\u6570\u636e\u6807\u793a\u6570\u636e\u7684\u5b57\u6bb5
          + * \u5f02\u6b65\u52a0\u8f7d\u6570\u636e\u65f6\uff0c\u8fd4\u56de\u6570\u636e\u53ef\u4ee5\u4f7f\u6570\u7ec4\u6216\u8005\u5bf9\u8c61 + * - \u5982\u679c\u8fd4\u56de\u7684\u662f\u5bf9\u8c61,\u53ef\u4ee5\u9644\u52a0\u5176\u4ed6\u4fe1\u606f,\u90a3\u4e48\u53d6\u5bf9\u8c61\u5bf9\u5e94\u7684\u5b57\u6bb5 {nodes : [],hasError:false} + * - \u5982\u4f55\u83b7\u53d6\u9644\u52a0\u4fe1\u606f\u53c2\u770b @see {BUI.Data.AbstractStore-event-beforeProcessLoad} + *
          
          +     *  //\u8fd4\u56de\u6570\u636e\u4e3a\u6570\u7ec4 [{},{}]\uff0c\u4f1a\u76f4\u63a5\u9644\u52a0\u5230\u52a0\u8f7d\u7684\u8282\u70b9\u540e\u9762
          +     *  
          +     *  var node = store.loadNode('123');
          +     *  store.loadNode(node);
          +     *  
          +     * 
          + * @cfg {Object} [dataProperty = 'nodes'] + */ + dataProperty : { + value : 'nodes' + }, + events : { + value : [ + /** + * \u5f53\u6dfb\u52a0\u6570\u636e\u65f6\u89e6\u53d1\u8be5\u4e8b\u4ef6 + * @event + *
          
          +        *  store.on('add',function(ev){
          +        *    list.addItem(e.node,index);
          +        *  });
          +        * 
          + * @param {jQuery.Event} e \u4e8b\u4ef6\u5bf9\u8c61 + * @param {Object} e.node \u6dfb\u52a0\u7684\u8282\u70b9 + * @param {Number} index \u6dfb\u52a0\u7684\u4f4d\u7f6e + */ + 'add', + /** + * \u5f53\u66f4\u65b0\u6570\u636e\u6307\u5b9a\u5b57\u6bb5\u65f6\u89e6\u53d1\u8be5\u4e8b\u4ef6 + * @event + * @param {jQuery.Event} e \u4e8b\u4ef6\u5bf9\u8c61 + * @param {Object} e.node \u66f4\u65b0\u7684\u8282\u70b9 + */ + 'update', + /** + * \u5f53\u5220\u9664\u6570\u636e\u65f6\u89e6\u53d1\u8be5\u4e8b\u4ef6 + * @event + * @param {jQuery.Event} e \u4e8b\u4ef6\u5bf9\u8c61 + * @param {Object} e.node \u5220\u9664\u7684\u8282\u70b9 + * @param {Number} index \u5220\u9664\u8282\u70b9\u7684\u7d22\u5f15 + */ + 'remove', + /** + * \u8282\u70b9\u52a0\u8f7d\u5b8c\u6bd5\u89e6\u53d1\u8be5\u4e8b\u4ef6 + *
          
          +        *   //\u5f02\u6b65\u52a0\u8f7d\u8282\u70b9,\u6b64\u65f6\u8282\u70b9\u5df2\u7ecf\u9644\u52a0\u5230\u52a0\u8f7d\u8282\u70b9\u7684\u540e\u9762
          +        *   store.on('load',function(ev){
          +        *     var params = ev.params,
          +        *       id = params.id,
          +        *       node = store.findNode(id),
          +        *       children = node.children;  //\u8282\u70b9\u7684id
          +        *     //TO DO
          +        *   });
          +        * 
          + * + * @event + * @param {jQuery.Event} e \u4e8b\u4ef6\u5bf9\u8c61 + * @param {Object} e.node \u52a0\u8f7d\u7684\u8282\u70b9 + * @param {Object} e.params \u52a0\u8f7d\u8282\u70b9\u65f6\u7684\u53c2\u6570 + */ + 'load' + ] + } + } + + BUI.extend(TreeStore,AbstractStore); + + BUI.augment(TreeStore,{ + /** + * @protected + * @override + * \u521d\u59cb\u5316\u524d + */ + beforeInit:function(){ + this.initRoot(); + }, + //\u521d\u59cb\u5316\u6570\u636e,\u5982\u679c\u9ed8\u8ba4\u52a0\u8f7d\u6570\u636e\uff0c\u5219\u52a0\u8f7d\u6570\u636e + _initData : function(){ + var _self = this, + autoLoad = _self.get('autoLoad'), + root = _self.get('root'); + + if(autoLoad && !root.children){ + params = root.id ? {id : root.id}: {}; + _self.load(params); + } + }, + /** + * @protected + * \u521d\u59cb\u5316\u6839\u8282\u70b9 + */ + initRoot : function(){ + var _self = this, + map = _self.get('map'), + root = _self.get('root'); + if(!root){ + root = {}; + } + if(!root.isNode){ + root = new Node(root,map); + //root.children= []; + } + root.path = [root.id]; + root.level = 0; + if(root.children){ + _self.setChildren(root,root.children); + } + _self.set('root',root); + }, + /** + * \u6dfb\u52a0\u8282\u70b9\uff0c\u89e6\u53d1{@link BUI.Data.TreeStore#event-add} \u4e8b\u4ef6 + *
          
          +     *  //\u6dfb\u52a0\u5230\u6839\u8282\u70b9\u4e0b
          +     *  store.add({id : '1',text : '1'});
          +     *  //\u6dfb\u52a0\u5230\u6307\u5b9a\u8282\u70b9
          +     *  var node = store.findNode('1'),
          +     *    subNode = store.add({id : '11',text : '11'},node);
          +     *  //\u63d2\u5165\u5230\u8282\u70b9\u7684\u6307\u5b9a\u4f4d\u7f6e
          +     *  var node = store.findNode('1'),
          +     *    subNode = store.add({id : '12',text : '12'},node,0);
          +     * 
          + * @param {BUI.Data.Node|Object} node \u8282\u70b9\u6216\u8005\u6570\u636e\u5bf9\u8c61 + * @param {BUI.Data.Node} [parent] \u7236\u8282\u70b9,\u5982\u679c\u672a\u6307\u5b9a\u5219\u4e3a\u6839\u8282\u70b9 + * @param {Number} [index] \u6dfb\u52a0\u8282\u70b9\u7684\u4f4d\u7f6e + * @return {BUI.Data.Node} \u6dfb\u52a0\u5b8c\u6210\u7684\u8282\u70b9 + */ + add : function(node,parent,index){ + var _self = this; + + node = _self._add(node,parent,index); + _self.fire('add',{node : node,index : index}); + return node; + }, + // + _add : function(node,parent,index){ + parent = parent || this.get('root'); //\u5982\u679c\u672a\u6307\u5b9a\u7236\u5143\u7d20\uff0c\u6dfb\u52a0\u5230\u8ddf\u8282\u70b9 + var _self = this, + map = _self.get('map'), + nodes = parent.children, + nodeChildren = node.children || []; + if(nodeChildren.length == 0 && node.leaf == null){ + node.leaf = true; + } + if(parent){ + parent.leaf = false; + } + if(!node.isNode){ + node = new Node(node,map); + } + node.parent = parent; + node.level = parent.level + 1; + node.path = parent.path.concat(node.id); + index = index == null ? parent.children.length : index; + BUI.Array.addAt(nodes,node,index); + + _self.setChildren(node,nodeChildren); + return node; + }, + /** + * \u79fb\u9664\u8282\u70b9\uff0c\u89e6\u53d1{@link BUI.Data.TreeStore#event-remove} \u4e8b\u4ef6 + * + *
          
          +     *  var node = store.findNode('1'); //\u6839\u636e\u8282\u70b9id \u83b7\u53d6\u8282\u70b9
          +     *  store.remove(node);
          +     * 
          + * + * @param {BUI.Data.Node} node \u8282\u70b9\u6216\u8005\u6570\u636e\u5bf9\u8c61 + * @return {BUI.Data.Node} \u5220\u9664\u7684\u8282\u70b9 + */ + remove : function(node){ + var parent = node.parent || _self.get('root'), + index = BUI.Array.indexOf(node,parent.children) ; + + BUI.Array.remove(parent.children,node); + if(parent.children.length === 0){ + parent.leaf = true; + } + this.fire('remove',{node : node , index : index}); + node.parent = null; + return node; + }, + /** + * \u66f4\u65b0\u8282\u70b9 + *
          
          +     *  var node = store.findNode('1'); //\u6839\u636e\u8282\u70b9id \u83b7\u53d6\u8282\u70b9
          +     *  node.text = 'modify text'; //\u4fee\u6539\u6587\u672c
          +     *  store.update(node);        //\u6b64\u65f6\u4f1a\u89e6\u53d1update\u4e8b\u4ef6\uff0c\u7ed1\u5b9a\u4e86store\u7684\u63a7\u4ef6\u4f1a\u66f4\u65b0\u5bf9\u5e94\u7684DOM
          +     * 
          + * @return {BUI.Data.Node} \u66f4\u65b0\u8282\u70b9 + */ + update : function(node){ + this.fire('update',{node : node}); + }, + /** + * \u8fd4\u56de\u7f13\u5b58\u7684\u6570\u636e\uff0c\u6839\u8282\u70b9\u7684\u76f4\u63a5\u5b50\u8282\u70b9\u96c6\u5408 + *
          
          +     *   //\u83b7\u53d6\u6839\u8282\u70b9\u7684\u6240\u6709\u5b50\u8282\u70b9
          +     *   var data = store.getResult();
          +     *   //\u83b7\u53d6\u6839\u8282\u70b9
          +     *   var root = store.get('root');
          +     * 
          + * @return {Array} \u6839\u8282\u70b9\u4e0b\u9762\u7684\u6570\u636e + */ + getResult : function(){ + return this.get('root').children; + }, + /** + * \u8bbe\u7f6e\u7f13\u5b58\u7684\u6570\u636e\uff0c\u8bbe\u7f6e\u4e3a\u6839\u8282\u70b9\u7684\u6570\u636e + *
          
          +    *     var data = [
          +    *       {id : '1',text : '\u6587\u672c1'},
          +    *       {id : '2',text : '\u6587\u672c2',children:[
          +    *         {id : '21',text : '\u6587\u672c21'}
          +    *       ]},
          +    *       {id : '3',text : '\u6587\u672c3'}
          +    *     ];
          +    *     store.setResult(data); //\u4f1a\u5bf9\u6570\u636e\u8fdb\u884c\u683c\u5f0f\u5316\uff0c\u6dfb\u52a0leaf\u7b49\u5b57\u6bb5\uff1a
          +    *                            //[{id : '1',text : '\u6587\u672c1',leaf : true},{id : '2',text : '\u6587\u672c2',leaf : false,children:[...]}....]
          +    *   
          + * @param {Array} data \u7f13\u5b58\u7684\u6570\u636e + */ + setResult : function(data){ + var _self = this, + proxy = _self.get('proxy'), + root = _self.get('root'); + if(proxy instanceof Proxy.Memery){ + _self.set('data',data); + _self.load({id : root.id}); + }else{ + _self.setChildren(root,data); + } + }, + /** + * \u8bbe\u7f6e\u5b50\u8282\u70b9 + * @protected + * @param {BUI.Data.Node} node \u8282\u70b9 + * @param {Array} children \u5b50\u8282\u70b9 + */ + setChildren : function(node,children){ + var _self = this; + node.children = []; + if(!children.length){ + return; + } + BUI.each(children,function(item){ + _self._add(item,node); + }); + }, + /** + * \u67e5\u627e\u8282\u70b9 + *
          
          +     *  var node = store.findNode('1');//\u4ece\u6839\u8282\u70b9\u5f00\u59cb\u67e5\u627e\u8282\u70b9
          +     *  
          +     *  var subNode = store.findNode('123',node); //\u4ece\u6307\u5b9a\u8282\u70b9\u5f00\u59cb\u67e5\u627e
          +     * 
          + * @param {String} id \u8282\u70b9Id + * @param {BUI.Data.Node} [parent] \u7236\u8282\u70b9 + * @param {Boolean} [deep = true] \u662f\u5426\u9012\u5f52\u67e5\u627e + * @return {BUI.Data.Node} \u8282\u70b9 + */ + findNode : function(id,parent,deep){ + var _self = this; + deep = deep == null ? true : deep; + if(!parent){ + var root = _self.get('root'); + if(root.id === id){ + return root; + } + return _self.findNode(id,root); + } + var children = parent.children, + rst = null; + BUI.each(children,function(item){ + if(item.id === id){ + rst = item; + }else if(deep){ + rst = _self.findNode(id,item); + } + if(rst){ + return false; + } + }); + return rst; + }, + /** + * \u67e5\u627e\u8282\u70b9,\u6839\u636e\u5339\u914d\u51fd\u6570\u67e5\u627e + *
          
          +     *  var nodes = store.findNodesBy(function(node){
          +     *   if(node.status == '0'){
          +     *     return true;
          +     *   }
          +     *   return false;
          +     *  });
          +     * 
          + * @param {Function} func \u5339\u914d\u51fd\u6570 + * @param {BUI.Data.Node} [parent] \u7236\u5143\u7d20\uff0c\u5982\u679c\u4e0d\u5b58\u5728\uff0c\u5219\u4ece\u6839\u8282\u70b9\u67e5\u627e + * @return {Array} \u8282\u70b9\u6570\u7ec4 + */ + findNodesBy : function(func,parent){ + var _self = this, + root, + rst = []; + + if(!parent){ + parent = _self.get('root'); + } + + BUI.each(parent.children,function(item){ + if(func(item)){ + rst.push(item); + } + rst = rst.concat(_self.findNodesBy(func,item)); + }); + + return rst; + }, + /** + * \u6839\u636epath\u67e5\u627e\u8282\u70b9 + * @return {BUI.Data.Node} \u8282\u70b9 + * @ignore + */ + findNodeByPath : function(path){ + if(!path){ + return null; + } + var _self = this, + root = _self.get('root'), + pathArr = path.split(','), + node, + i, + tempId = pathArr[0]; + if(!tempId){ + return null; + } + if(root.id == tempId){ + node = root; + }else{ + node = _self.findNode(tempId,root,false); + } + if(!node){ + return; + } + for(i = 1 ; i < pathArr.length ; i = i + 1){ + var tempId = pathArr[i]; + node = _self.findNode(tempId,node,false); + if(!node){ + break; + } + } + return node; + }, + /** + * \u662f\u5426\u5305\u542b\u6307\u5b9a\u8282\u70b9\uff0c\u5982\u679c\u672a\u6307\u5b9a\u7236\u8282\u70b9\uff0c\u4ece\u6839\u8282\u70b9\u5f00\u59cb\u641c\u7d22 + *
          
          +     *  store.contains(node); //\u662f\u5426\u5b58\u5728\u8282\u70b9
          +     *
          +     *  store.contains(subNode,node); //\u8282\u70b9\u662f\u5426\u5b58\u5728\u6307\u5b9a\u5b50\u8282\u70b9
          +     * 
          + * @param {BUI.Data.Node} node \u8282\u70b9 + * @param {BUI.Data.Node} parent \u7236\u8282\u70b9 + * @return {Boolean} \u662f\u5426\u5305\u542b\u6307\u5b9a\u8282\u70b9 + */ + contains : function(node,parent){ + var _self = this, + findNode = _self.findNode(node.id,parent); + return !!findNode; + }, + /** + * \u52a0\u8f7d\u5b8c\u6570\u636e + * @protected + * @override + */ + afterProcessLoad : function(data,params){ + var _self = this, + id = params.id, + dataProperty = _self.get('dataProperty'), + node = _self.findNode(id) || _self.get('root');//\u5982\u679c\u627e\u4e0d\u5230\u7236\u5143\u7d20\uff0c\u5219\u653e\u7f6e\u5728\u8ddf\u8282\u70b9 + + if(BUI.isArray(data)){ + _self.setChildren(node,data); + }else{ + _self.setChildren(node,data[dataProperty]); + } + _self.fire('load',{node : node,params : params}); + }, + /** + * \u662f\u5426\u5305\u542b\u6570\u636e + * @return {Boolean} + */ + hasData : function(){ + return true; + //return this.get('root').children && this.get('root').children.length !== 0; + }, + /** + * \u662f\u5426\u5df2\u7ecf\u52a0\u8f7d\u8fc7\uff0c\u53f6\u5b50\u8282\u70b9\u6216\u8005\u5b58\u5728\u5b57\u8282\u70b9\u7684\u8282\u70b9 + * @param {BUI.Data.Node} node \u8282\u70b9 + * @return {Boolean} \u662f\u5426\u52a0\u8f7d\u8fc7 + */ + isLoaded : function(node){ + if(!this.get('url')){ //\u5982\u679c\u4e0d\u4ece\u8fdc\u7a0b\u52a0\u8f7d\u6570\u636e,\u9ed8\u8ba4\u5df2\u7ecf\u52a0\u8f7d + return true; + } + return node.leaf || (node.children && node.children.length); + }, + /** + * \u52a0\u8f7d\u8282\u70b9\u7684\u5b50\u8282\u70b9 + * @param {BUI.Data.Node} node \u8282\u70b9 + */ + loadNode : function(node){ + var _self = this; + //\u5982\u679c\u5df2\u7ecf\u52a0\u8f7d\u8fc7\uff0c\u6216\u8005\u8282\u70b9\u662f\u53f6\u5b50\u8282\u70b9 + if(_self.isLoaded(node)){ + return ; + } + if(!_self.get('url')){ //\u5982\u679c\u4e0d\u4ece\u8fdc\u7a0b\u52a0\u8f7d\u6570\u636e\uff0c\u4e0d\u662f\u6839\u8282\u70b9\u7684\u8bdd\uff0c\u53d6\u6d88\u52a0\u8f7d + return; + }else{ + _self.load({id:node.id,path : ''}); + } + + }, + /** + * \u52a0\u8f7d\u8282\u70b9\uff0c\u6839\u636epath + * @param {String} path \u52a0\u8f7d\u8def\u5f84 + * @ignore + */ + loadPath : function(path){ + var _self = this, + arr = path.split(','), + id = arr[0]; + if(_self.findNodeByPath(path)){ //\u52a0\u8f7d\u8fc7 + return; + } + _self.load({id : id,path : path}); + } + }); + + return TreeStore; + +});/** + * @fileOverview \u6570\u636e\u7f13\u51b2\u5bf9\u8c61 + * @author dxq613@gmail.com + * @ignore + */ + +define('bui/data/store',['bui/data/proxy','bui/data/abstractstore','bui/data/sortable'],function(require) { + + var Proxy = require('bui/data/proxy'), + AbstractStore = require('bui/data/abstractstore'), + Sortable = require('bui/data/sortable'); + + //\u79fb\u9664\u6570\u636e + function removeAt(index,array){ + if(index < 0){ + return; + } + var records = array, + record = records[index]; + records.splice(index,1); + return record; + } + + function removeFrom(record,array){ + var index = BUI.Array.indexOf(record,array); + if(index >= 0){ + removeAt(index,array); + } + } + + function contains(record,array){ + return BUI.Array.indexOf(record,array) !== -1; + } + /** + * \u7528\u4e8e\u52a0\u8f7d\u6570\u636e\uff0c\u7f13\u51b2\u6570\u636e\u7684\u7c7b + *

          + * + *

          + * ** \u7f13\u5b58\u9759\u6001\u6570\u636e ** + *
          
          +   *  var store = new Store({
          +   *    data : [{},{}]
          +   *  });
          +   * 
          + * ** \u5f02\u6b65\u52a0\u8f7d\u6570\u636e ** + *
          
          +   *  var store = new Store({
          +   *    url : 'data.json',
          +   *    autoLoad : true,
          +   *    params : {id : '123'},
          +   *    sortInfo : {
          +   *      field : 'id',
          +   *      direction : 'ASC' //ASC,DESC
          +   *    }
          +   *  });
          +   * 
          + * + * @class BUI.Data.Store + * @extends BUI.Data.AbstractStore + * @mixins BUI.Data.Sortable + */ + var store = function(config){ + store.superclass.constructor.call(this,config); + //this._init(); + }; + + store.ATTRS = + /** + * @lends BUI.Data.Store# + * @ignore + */ + { + /** + * \u5f53\u524d\u9875\u7801 + * @cfg {Number} [currentPage=0] + * @ignore + */ + /** + * \u5f53\u524d\u9875\u7801 + * @type {Number} + * @ignore + * @readOnly + */ + currentPage:{ + value : 0 + }, + + /** + * \u5220\u9664\u6389\u7684\u7eaa\u5f55 + * @readOnly + * @private + * @type {Array} + */ + deletedRecords : { + value:[] + }, + /** + * \u9519\u8bef\u5b57\u6bb5,\u5305\u542b\u5728\u8fd4\u56de\u4fe1\u606f\u4e2d\u8868\u793a\u9519\u8bef\u4fe1\u606f\u7684\u5b57\u6bb5 + *
          
          +     *   //\u53ef\u4ee5\u4fee\u6539\u63a5\u6536\u7684\u540e\u53f0\u53c2\u6570\u7684\u542b\u4e49
          +     *   var store = new Store({
          +     *     url : 'data.json',
          +     *     errorProperty : 'errorMsg', //\u5b58\u653e\u9519\u8bef\u4fe1\u606f\u7684\u5b57\u6bb5(error)
          +     *     hasErrorProperty : 'isError', //\u662f\u5426\u9519\u8bef\u7684\u5b57\u6bb5\uff08hasError)
          +     *     root : 'data',               //\u5b58\u653e\u6570\u636e\u7684\u5b57\u6bb5\u540d(rows)
          +     *     totalProperty : 'total'     //\u5b58\u653e\u8bb0\u5f55\u603b\u6570\u7684\u5b57\u6bb5\u540d(results)
          +     *   });
          +     * 
          + * @cfg {String} [errorProperty='error'] + */ + /** + * \u9519\u8bef\u5b57\u6bb5 + * @type {String} + * @ignore + */ + errorProperty : { + value : 'error' + }, + /** + * \u662f\u5426\u5b58\u5728\u9519\u8bef,\u52a0\u8f7d\u6570\u636e\u65f6\u5982\u679c\u8fd4\u56de\u9519\u8bef\uff0c\u6b64\u5b57\u6bb5\u8868\u793a\u6709\u9519\u8bef\u53d1\u751f + *
          
          +     *   //\u53ef\u4ee5\u4fee\u6539\u63a5\u6536\u7684\u540e\u53f0\u53c2\u6570\u7684\u542b\u4e49
          +     *   var store = new Store({
          +     *     url : 'data.json',
          +     *     errorProperty : 'errorMsg', //\u5b58\u653e\u9519\u8bef\u4fe1\u606f\u7684\u5b57\u6bb5(error)
          +     *     hasErrorProperty : 'isError', //\u662f\u5426\u9519\u8bef\u7684\u5b57\u6bb5\uff08hasError)
          +     *     root : 'data',               //\u5b58\u653e\u6570\u636e\u7684\u5b57\u6bb5\u540d(rows)
          +     *     totalProperty : 'total'     //\u5b58\u653e\u8bb0\u5f55\u603b\u6570\u7684\u5b57\u6bb5\u540d(results)
          +     *   });
          +     * 
          + * @cfg {String} [hasErrorProperty='hasError'] + */ + /** + * \u662f\u5426\u5b58\u5728\u9519\u8bef + * @type {String} + * @default 'hasError' + * @ignore + */ + hasErrorProperty : { + value : 'hasError' + }, + + /** + * \u5bf9\u6bd42\u4e2a\u5bf9\u8c61\u662f\u5426\u76f8\u5f53\uff0c\u5728\u53bb\u91cd\u3001\u66f4\u65b0\u3001\u5220\u9664\uff0c\u67e5\u627e\u6570\u636e\u65f6\u4f7f\u7528\u6b64\u51fd\u6570 + * @default + * function(obj1,obj2){ + * return obj1 == obj2; + * } + * @type {Object} + * @example + * function(obj1 ,obj2){ + * //\u5982\u679cid\u76f8\u7b49\uff0c\u5c31\u8ba4\u4e3a2\u4e2a\u6570\u636e\u76f8\u7b49\uff0c\u53ef\u4ee5\u5728\u6dfb\u52a0\u5bf9\u8c61\u65f6\u53bb\u91cd + * //\u66f4\u65b0\u5bf9\u8c61\u65f6\uff0c\u4ec5\u63d0\u4f9b\u6539\u53d8\u7684\u5b57\u6bb5 + * return obj1.id == obj2.id; + * } + * + */ + matchFunction : { + value : function(obj1,obj2){ + return obj1 == obj2; + } + }, + /** + * \u66f4\u6539\u7684\u7eaa\u5f55\u96c6\u5408 + * @type {Array} + * @private + * @readOnly + */ + modifiedRecords : { + value:[] + }, + /** + * \u65b0\u6dfb\u52a0\u7684\u7eaa\u5f55\u96c6\u5408\uff0c\u53ea\u8bfb + * @type {Array} + * @private + * @readOnly + */ + newRecords : { + value : [] + }, + /** + * \u662f\u5426\u8fdc\u7a0b\u6392\u5e8f\uff0c\u9ed8\u8ba4\u72b6\u6001\u4e0b\u5185\u5b58\u6392\u5e8f + * - \u7531\u4e8e\u5f53\u524dStore\u5b58\u50a8\u7684\u4e0d\u4e00\u5b9a\u662f\u6570\u636e\u6e90\u7684\u5168\u96c6\uff0c\u6240\u4ee5\u6b64\u914d\u7f6e\u9879\u9700\u8981\u91cd\u65b0\u8bfb\u53d6\u6570\u636e + * - \u5728\u5206\u9875\u72b6\u6001\u4e0b\uff0c\u8fdb\u884c\u8fdc\u7a0b\u6392\u5e8f\uff0c\u4f1a\u8fdb\u884c\u5168\u96c6\u6570\u636e\u7684\u6392\u5e8f\uff0c\u5e76\u8fd4\u56de\u9996\u9875\u7684\u6570\u636e + * - remoteSort\u4e3a false\u7684\u60c5\u51b5\u4e0b\uff0c\u4ec5\u5bf9\u5f53\u524d\u9875\u7684\u6570\u636e\u8fdb\u884c\u6392\u5e8f + * @cfg {Boolean} [remoteSort=false] + */ + remoteSort : { + value : false + }, + /** + * \u7f13\u5b58\u7684\u6570\u636e\uff0c\u5305\u542b\u4ee5\u4e0b\u51e0\u4e2a\u5b57\u6bb5 + *
            + *
          1. rows: \u6570\u636e\u96c6\u5408
          2. + *
          3. results: \u603b\u7684\u6570\u636e\u6761\u6570
          4. + *
          + * @type {Object} + * @private + * @readOnly + */ + resultMap : { + value : {} + }, + /** + * \u52a0\u8f7d\u6570\u636e\u65f6\uff0c\u8fd4\u56de\u6570\u636e\u7684\u6839\u76ee\u5f55 + * @cfg {String} [root='rows'] + *
          
          +     *    //\u9ed8\u8ba4\u8fd4\u56de\u6570\u636e\u7c7b\u578b\uff1a
          +     *    '{"rows":[{"name":"abc"},{"name":"bcd"}],"results":100}'
          +     *   //\u53ef\u4ee5\u4fee\u6539\u63a5\u6536\u7684\u540e\u53f0\u53c2\u6570\u7684\u542b\u4e49
          +     *   var store = new Store({
          +     *     url : 'data.json',
          +     *     errorProperty : 'errorMsg', //\u5b58\u653e\u9519\u8bef\u4fe1\u606f\u7684\u5b57\u6bb5(error)
          +     *     hasErrorProperty : 'isError', //\u662f\u5426\u9519\u8bef\u7684\u5b57\u6bb5\uff08hasError)
          +     *     root : 'data',               //\u5b58\u653e\u6570\u636e\u7684\u5b57\u6bb5\u540d(rows)
          +     *     totalProperty : 'total'     //\u5b58\u653e\u8bb0\u5f55\u603b\u6570\u7684\u5b57\u6bb5\u540d(results)
          +     *   });
          +     * 
          + * + */ + root: { value : 'rows'}, + + /** + * \u5f53\u524dStore\u7f13\u5b58\u7684\u6570\u636e\u6761\u6570 + * @type {Number} + * @private + * @readOnly + */ + rowCount :{ + value : 0 + }, + /** + * \u52a0\u8f7d\u6570\u636e\u65f6\uff0c\u8fd4\u56de\u8bb0\u5f55\u7684\u603b\u6570\u7684\u5b57\u6bb5\uff0c\u7528\u4e8e\u5206\u9875 + * @cfg {String} [totalProperty='results'] + *
          
          +     *    //\u9ed8\u8ba4\u8fd4\u56de\u6570\u636e\u7c7b\u578b\uff1a
          +     *    '{"rows":[{"name":"abc"},{"name":"bcd"}],"results":100}'
          +     *   //\u53ef\u4ee5\u4fee\u6539\u63a5\u6536\u7684\u540e\u53f0\u53c2\u6570\u7684\u542b\u4e49
          +     *   var store = new Store({
          +     *     url : 'data.json',
          +     *     errorProperty : 'errorMsg', //\u5b58\u653e\u9519\u8bef\u4fe1\u606f\u7684\u5b57\u6bb5(error)
          +     *     hasErrorProperty : 'isError', //\u662f\u5426\u9519\u8bef\u7684\u5b57\u6bb5\uff08hasError)
          +     *     root : 'data',               //\u5b58\u653e\u6570\u636e\u7684\u5b57\u6bb5\u540d(rows)
          +     *     totalProperty : 'total'     //\u5b58\u653e\u8bb0\u5f55\u603b\u6570\u7684\u5b57\u6bb5\u540d(results)
          +     *   });
          +     * 
          + */ + totalProperty: {value :'results'}, + + /** + * \u52a0\u8f7d\u6570\u636e\u7684\u8d77\u59cb\u4f4d\u7f6e + *
          
          +     *  //\u521d\u59cb\u5316\u65f6\uff0c\u53ef\u4ee5\u5728params\u4e2d\u914d\u7f6e
          +     *  var store = new Store({
          +     *    url : 'data.json',
          +     *    params : {
          +     *      start : 100
          +     *    }
          +     *  });
          +     * 
          + * @type {Object} + */ + start:{ + value : 0 + }, + /** + * \u6bcf\u9875\u591a\u5c11\u6761\u8bb0\u5f55,\u9ed8\u8ba4\u4e3anull,\u6b64\u65f6\u4e0d\u5206\u9875\uff0c\u5f53\u6307\u5b9a\u4e86\u6b64\u503c\u65f6\u5206\u9875 + *
          
          +     *  //\u5f53\u8bf7\u6c42\u7684\u6570\u636e\u5206\u9875\u65f6
          +     *  var store = new Store({
          +     *    url : 'data.json',
          +     *    pageSize : 30
          +     *  });
          +     * 
          + * @cfg {Number} pageSize + */ + pageSize : { + + } + }; + BUI.extend(store,AbstractStore); + + BUI.mixin(store,[Sortable]); + + BUI.augment(store, + /** + * @lends BUI.Data.Store.prototype + * @ignore + */ + { + /** + * \u6dfb\u52a0\u8bb0\u5f55,\u9ed8\u8ba4\u6dfb\u52a0\u5728\u540e\u9762 + *
          
          +    *  //\u6dfb\u52a0\u8bb0\u5f55
          +    *  store.add({id : '2',text: 'new data'});
          +    *  //\u662f\u5426\u53bb\u91cd\uff0c\u91cd\u590d\u6570\u636e\u4e0d\u80fd\u6dfb\u52a0
          +    *  store.add(obj,true); //\u4e0d\u80fd\u6dfb\u52a0\u91cd\u590d\u6570\u636e\uff0c\u6b64\u65f6\u7528obj1 === obj2\u5224\u65ad
          +    *  //\u4f7f\u7528\u5339\u914d\u51fd\u53bb\u91cd
          +    *  store.add(obj,true,function(obj1,obj2){
          +    *    return obj1.id == obj2.id;
          +    *  });
          +    *  
          +    * 
          + * @param {Array|Object} data \u6dfb\u52a0\u7684\u6570\u636e\uff0c\u53ef\u4ee5\u662f\u6570\u7ec4\uff0c\u53ef\u4ee5\u662f\u5355\u6761\u8bb0\u5f55 + * @param {Boolean} [noRepeat = false] \u662f\u5426\u53bb\u91cd,\u53ef\u4ee5\u4e3a\u7a7a\uff0c\u9ed8\u8ba4\uff1a false + * @param {Function} [match] \u5339\u914d\u51fd\u6570\uff0c\u53ef\u4ee5\u4e3a\u7a7a\uff0c + * @default \u914d\u7f6e\u9879\u4e2d matchFunction \u5c5e\u6027\u4f20\u5165\u7684\u51fd\u6570\uff0c\u9ed8\u8ba4\u662f\uff1a
          + * function(obj1,obj2){ + * return obj1 == obj2; + * } + * + */ + add :function(data,noRepeat,match){ + var _self = this, + count = _self.getCount(); + _self.addAt(data,count,noRepeat,match) + }, + /** + * \u6dfb\u52a0\u8bb0\u5f55,\u6307\u5b9a\u7d22\u5f15\u503c + *
          
          +    *  //\u4f7f\u7528\u65b9\u5f0f\u8ddf\u7c7b\u4f3c\u4e8eadd,\u589e\u52a0\u4e86index\u53c2\u6570
          +    *  store.add(obj,0);//\u6dfb\u52a0\u5728\u6700\u524d\u9762
          +    * 
          + * @param {Array|Object} data \u6dfb\u52a0\u7684\u6570\u636e\uff0c\u53ef\u4ee5\u662f\u6570\u7ec4\uff0c\u53ef\u4ee5\u662f\u5355\u6761\u8bb0\u5f55 + * @param {Number} index \u5f00\u59cb\u6dfb\u52a0\u6570\u636e\u7684\u4f4d\u7f6e + * @param {Boolean} [noRepeat = false] \u662f\u5426\u53bb\u91cd,\u53ef\u4ee5\u4e3a\u7a7a\uff0c\u9ed8\u8ba4\uff1a false + * @param {Function} [match] \u5339\u914d\u51fd\u6570\uff0c\u53ef\u4ee5\u4e3a\u7a7a\uff0c + */ + addAt : function(data,index,noRepeat,match){ + var _self = this; + + match = match || _self._getDefaultMatch(); + if(!BUI.isArray(data)){ + data = [data]; + } + + $.each(data,function(pos,element){ + if(!noRepeat || !_self.contains(element,match)){ + _self._addRecord(element,pos + index); + + _self.get('newRecords').push(element); + + removeFrom(element,_self.get('deletedRecords')); + removeFrom(element,_self.get('modifiedRecords')); + } + }); + }, + /** + * \u9a8c\u8bc1\u662f\u5426\u5b58\u5728\u6307\u5b9a\u8bb0\u5f55 + *
          
          +    *  store.contains(obj); //\u662f\u5426\u5305\u542b\u6307\u5b9a\u7684\u8bb0\u5f55
          +    *
          +    *  store.contains(obj,function(obj1,obj2){ //\u4f7f\u7528\u5339\u914d\u51fd\u6570
          +    *    return obj1.id == obj2.id;
          +    *  });
          +    * 
          + * @param {Object} record \u6307\u5b9a\u7684\u8bb0\u5f55 + * @param {Function} [match = function(obj1,obj2){return obj1 == obj2}] \u9ed8\u8ba4\u4e3a\u6bd4\u8f832\u4e2a\u5bf9\u8c61\u662f\u5426\u76f8\u540c + * @return {Boolean} + */ + contains :function(record,match){ + return this.findIndexBy(record,match)!==-1; + }, + /** + * \u67e5\u627e\u8bb0\u5f55\uff0c\u4ec5\u8fd4\u56de\u7b2c\u4e00\u6761 + *
          
          +    *  var record = store.find('id','123');
          +    * 
          + * @param {String} field \u5b57\u6bb5\u540d + * @param {String} value \u5b57\u6bb5\u503c + * @return {Object|null} + */ + find : function(field,value){ + var _self = this, + result = null, + records = _self.getResult(); + $.each(records,function(index,record){ + if(record[field] === value){ + result = record; + return false; + } + }); + return result; + }, + /** + * \u67e5\u627e\u8bb0\u5f55\uff0c\u8fd4\u56de\u6240\u6709\u7b26\u5408\u67e5\u8be2\u6761\u4ef6\u7684\u8bb0\u5f55 + *
          
          +    *   var records = store.findAll('type','0');
          +    * 
          + * @param {String} field \u5b57\u6bb5\u540d + * @param {String} value \u5b57\u6bb5\u503c + * @return {Array} + */ + findAll : function(field,value){ + var _self = this, + result = [], + records = _self.getResult(); + $.each(records,function(index,record){ + if(record[field] === value){ + result.push(record); + } + }); + return result; + }, + /** + * \u6839\u636e\u7d22\u5f15\u67e5\u627e\u8bb0\u5f55 + *
          
          +    *  var record = store.findByIndex(1);
          +    * 
          + * @param {Number} index \u7d22\u5f15 + * @return {Object} \u67e5\u627e\u7684\u8bb0\u5f55 + */ + findByIndex : function(index){ + return this.getResult()[index]; + }, + /** + * \u67e5\u627e\u6570\u636e\u6240\u5728\u7684\u7d22\u5f15\u4f4d\u7f6e,\u82e5\u4e0d\u5b58\u5728\u8fd4\u56de-1 + *
          
          +    *  var index = store.findIndexBy(obj);
          +    *
          +    *  var index = store.findIndexBy(obj,function(obj1,obj2){
          +    *    return obj1.id == obj2.id;
          +    *  });
          +    * 
          + * @param {Object} target \u6307\u5b9a\u7684\u8bb0\u5f55 + * @param {Function} [match = matchFunction] @see {BUI.Data.Store#matchFunction}\u9ed8\u8ba4\u4e3a\u6bd4\u8f832\u4e2a\u5bf9\u8c61\u662f\u5426\u76f8\u540c + * @return {Number} + */ + findIndexBy :function(target,match){ + var _self = this, + position = -1, + records = _self.getResult(); + match = match || _self._getDefaultMatch(); + if(target === null || target === undefined){ + return -1; + } + $.each(records,function(index,record){ + if(match(target,record)){ + position = index; + return false; + } + }); + return position; + }, + /** + * \u83b7\u53d6\u4e0b\u4e00\u6761\u8bb0\u5f55 + *
          
          +    *  var record = store.findNextRecord(obj);
          +    * 
          + * @param {Object} record \u5f53\u524d\u8bb0\u5f55 + * @return {Object} \u4e0b\u4e00\u6761\u8bb0\u5f55 + */ + findNextRecord : function(record){ + var _self = this, + index = _self.findIndexBy(record); + if(index >= 0){ + return _self.findByIndex(index + 1); + } + return; + }, + /** + * \u83b7\u53d6\u7f13\u5b58\u7684\u8bb0\u5f55\u6570 + *
          
          +     *  var count = store.getCount(); //\u7f13\u5b58\u7684\u6570\u636e\u6570\u91cf
          +     *
          +     *  var totalCount = store.getTotalCount(); //\u6570\u636e\u7684\u603b\u6570\uff0c\u5982\u679c\u6709\u5206\u9875\u65f6\uff0ctotalCount != count
          +     * 
          + * @return {Number} \u8bb0\u5f55\u6570 + */ + getCount : function(){ + return this.getResult().length; + }, + /** + * \u83b7\u53d6\u6570\u636e\u6e90\u7684\u6570\u636e\u603b\u6570\uff0c\u5206\u9875\u65f6\uff0c\u5f53\u524d\u4ec5\u7f13\u5b58\u5f53\u524d\u9875\u6570\u636e + *
          
          +     *  var count = store.getCount(); //\u7f13\u5b58\u7684\u6570\u636e\u6570\u91cf
          +     *
          +     *  var totalCount = store.getTotalCount(); //\u6570\u636e\u7684\u603b\u6570\uff0c\u5982\u679c\u6709\u5206\u9875\u65f6\uff0ctotalCount != count
          +     * 
          + * @return {Number} \u8bb0\u5f55\u7684\u603b\u6570 + */ + getTotalCount : function(){ + var _self = this, + resultMap = _self.get('resultMap'), + total = _self.get('totalProperty'); + return resultMap[total] || 0; + }, + /** + * \u83b7\u53d6\u5f53\u524d\u7f13\u5b58\u7684\u7eaa\u5f55 + *
          
          +     *   var records = store.getResult();
          +     * 
          + * @return {Array} \u7eaa\u5f55\u96c6\u5408 + */ + getResult : function(){ + var _self = this, + resultMap = _self.get('resultMap'), + root = _self.get('root'); + return resultMap[root]; + }, + /** + * \u662f\u5426\u5305\u542b\u6570\u636e + * @return {Boolean} + */ + hasData : function(){ + return this.getCount() !== 0; + }, + /** + * \u8bbe\u7f6e\u6570\u636e\u6e90,\u975e\u5f02\u6b65\u52a0\u8f7d\u65f6\uff0c\u8bbe\u7f6e\u7f13\u5b58\u7684\u6570\u636e + *
          
          +     *   store.setResult([]); //\u6e05\u7a7a\u6570\u636e
          +     *
          +     *   var data = [{},{}];
          +     *   store.setResult(data); //\u91cd\u8bbe\u6570\u636e
          +     * 
          + */ + setResult : function(data){ + var _self = this, + proxy = _self.get('proxy'); + if(proxy instanceof Proxy.Memery){ + _self.set('data',data); + _self.load({start:0}); + }else{ + _self._setResult(data); + } + }, + + /** + * \u5220\u9664\u4e00\u6761\u6216\u591a\u6761\u8bb0\u5f55\u89e6\u53d1 remove \u4e8b\u4ef6. + *
          
          +    *  store.remove(obj);  //\u5220\u9664\u4e00\u6761\u8bb0\u5f55
          +    *
          +    *  store.remove([obj1,obj2...]); //\u5220\u9664\u591a\u4e2a\u6761\u8bb0\u5f55
          +    *
          +    *  store.remvoe(obj,funciton(obj1,obj2){ //\u4f7f\u7528\u5339\u914d\u51fd\u6570
          +    *    return obj1.id == obj2.id;
          +    *  });
          +    * 
          + * @param {Array|Object} data \u6dfb\u52a0\u7684\u6570\u636e\uff0c\u53ef\u4ee5\u662f\u6570\u7ec4\uff0c\u53ef\u4ee5\u662f\u5355\u6761\u8bb0\u5f55 + * @param {Function} [match = function(obj1,obj2){return obj1 == obj2}] \u5339\u914d\u51fd\u6570\uff0c\u53ef\u4ee5\u4e3a\u7a7a + */ + remove :function(data,match){ + var _self =this, + delData=[]; + match = match || _self._getDefaultMatch(); + if(!BUI.isArray(data)){ + data = [data]; + } + $.each(data,function(index,element){ + var index = _self.findIndexBy(element,match), + record = removeAt(index,_self.getResult()); + //\u6dfb\u52a0\u5230\u5df2\u5220\u9664\u961f\u5217\u4e2d,\u5982\u679c\u662f\u65b0\u6dfb\u52a0\u7684\u6570\u636e\uff0c\u4e0d\u8ba1\u5165\u5220\u9664\u7684\u6570\u636e\u96c6\u5408\u4e2d + if(!contains(record,_self.get('newRecords')) && !contains(record,_self.get('deletedRecords'))){ + _self.get('deletedRecords').push(record); + } + removeFrom(record,_self.get('newRecords')); + removeFrom(record,_self.get('modifiedRecords')); + _self.fire('remove',{record:record}); + }); + }, + /** + * \u6392\u5e8f\uff0c\u5982\u679cremoteSort = true,\u53d1\u9001\u8bf7\u6c42\uff0c\u540e\u7aef\u6392\u5e8f + *
          
          +     *   store.sort('id','DESC'); //\u4ee5id\u4e3a\u6392\u5e8f\u5b57\u6bb5\uff0c\u5012\u5e8f\u6392\u5e8f
          +     * 
          + * @param {String} field \u6392\u5e8f\u5b57\u6bb5 + * @param {String} direction \u6392\u5e8f\u65b9\u5411 + */ + sort : function(field,direction){ + var _self = this, + remoteSort = _self.get('remoteSort'); + + if(!remoteSort){ + _self._localSort(field,direction); + }else{ + _self.set('sortField',field); + _self.set('sortDirection',direction); + _self.load(_self.get('sortInfo')); + } + }, + /** + * \u8ba1\u7b97\u6307\u5b9a\u5b57\u6bb5\u7684\u548c + *
          
          +     *   var sum = store.sum('number');
          +     * 
          + * @param {String} field \u5b57\u6bb5\u540d + * @param {Array} [data] \u8ba1\u7b97\u7684\u96c6\u5408\uff0c\u9ed8\u8ba4\u4e3aStore\u4e2d\u7684\u6570\u636e\u96c6\u5408 + * @return {Number} \u6c47\u603b\u548c + */ + sum : function(field,data){ + var _self = this, + records = data || _self.getResult(), + sum = 0; + BUI.each(records,function(record){ + var val = record[field]; + if(!isNaN(val)){ + sum += parseFloat(val); + } + }); + return sum; + }, + /** + * \u8bbe\u7f6e\u8bb0\u5f55\u7684\u503c \uff0c\u89e6\u53d1 update \u4e8b\u4ef6 + *
          
          +    *  store.setValue(obj,'value','new value');
          +    * 
          + * @param {Object} obj \u4fee\u6539\u7684\u8bb0\u5f55 + * @param {String} field \u4fee\u6539\u7684\u5b57\u6bb5\u540d + * @param {Object} value \u4fee\u6539\u7684\u503c + */ + setValue : function(obj,field,value){ + var record = obj, + _self = this; + + record[field]=value; + if(!contains(record,_self.get('newRecords')) && !contains(record,_self.get('modifiedRecords'))){ + _self.get('modifiedRecords').push(record); + } + _self.fire('update',{record:record,field:field,value:value}); + }, + /** + * \u66f4\u65b0\u8bb0\u5f55 \uff0c\u89e6\u53d1 update\u4e8b\u4ef6 + *
          
          +    *   var record = store.find('id','12');
          +    *   record.value = 'new value';
          +    *   record.text = 'new text';
          +    *   store.update(record); //\u89e6\u53d1update\u4e8b\u4ef6\uff0c\u5f15\u8d77\u7ed1\u5b9a\u4e86store\u7684\u63a7\u4ef6\u66f4\u65b0
          +    * 
          + * @param {Object} obj \u4fee\u6539\u7684\u8bb0\u5f55 + * @param {Boolean} [isMatch = false] \u662f\u5426\u9700\u8981\u8fdb\u884c\u5339\u914d\uff0c\u68c0\u6d4b\u6307\u5b9a\u7684\u8bb0\u5f55\u662f\u5426\u5728\u96c6\u5408\u4e2d + */ + update : function(obj,isMatch){ + var record = obj, + _self = this, + match = null, + index = null; + if(isMatch){ + match = _self._getDefaultMatch(); + index = _self.findIndexBy(obj,match); + if(index >=0){ + record = _self.getResult()[index]; + } + } + record = BUI.mix(record,obj); + if(!contains(record,_self.get('newRecords')) && !contains(record,_self.get('modifiedRecords'))){ + _self.get('modifiedRecords').push(record); + } + _self.fire('update',{record:record}); + }, + //\u6dfb\u52a0\u7eaa\u5f55 + _addRecord :function(record,index){ + var records = this.getResult(); + if(index == undefined){ + index = records.length; + } + records.splice(index,0,record); + this.fire('add',{record:record,index:index}); + }, + //\u6e05\u9664\u6539\u53d8\u7684\u6570\u636e\u8bb0\u5f55 + _clearChanges : function(){ + var _self = this; + _self.get('newRecords').splice(0); + _self.get('modifiedRecords').splice(0); + _self.get('deletedRecords').splice(0); + }, + //\u83b7\u53d6\u9ed8\u8ba4\u7684\u5339\u914d\u51fd\u6570 + _getDefaultMatch :function(){ + + return this.get('matchFunction'); + }, + + //\u83b7\u53d6\u5206\u9875\u76f8\u5173\u7684\u4fe1\u606f + _getPageParams : function(){ + var _self = this, + sortInfo = _self.get('sortInfo'), + start = _self.get('start'), + limit = _self.get('pageSize'), + pageIndex = _self.get('pageIndex') || (limit ? start/limit : 0); + + params = { + start : start, + limit : limit, + pageIndex : pageIndex //\u4e00\u822c\u800c\u8a00\uff0cpageIndex = start/limit + }; + + if(_self.get('remoteSort')){ + BUI.mix(params,sortInfo); + } + + return params; + }, + /** + * \u83b7\u53d6\u9644\u52a0\u7684\u53c2\u6570,\u5206\u9875\u4fe1\u606f\uff0c\u6392\u5e8f\u4fe1\u606f + * @override + * @protected + * @return {Object} \u9644\u52a0\u7684\u53c2\u6570 + */ + getAppendParams : function(){ + return this._getPageParams(); + }, + /** + * @protected + * \u521d\u59cb\u5316\u4e4b\u524d + */ + beforeInit : function(){ + //\u521d\u59cb\u5316\u7ed3\u679c\u96c6 + this._setResult([]); + }, + //\u672c\u5730\u6392\u5e8f + _localSort : function(field,direction){ + var _self = this; + + _self._sortData(field,direction); + + _self.fire('localsort'); + }, + _sortData : function(field,direction,data){ + var _self = this; + data = data || _self.getResult(); + + _self.sortData(field,direction,data); + }, + //\u5904\u7406\u6570\u636e + afterProcessLoad : function(data,params){ + var _self = this, + root = _self.get('root'), + start = params.start, + limit = params.limit, + totalProperty = _self.get('totalProperty'); + + if(BUI.isArray(data)){ + _self._setResult(data); + }else{ + _self._setResult(data[root],data[totalProperty]); + } + + _self.set('start',start); + + if(limit){ + _self.set('pageIndex',start/limit); + } + + //\u5982\u679c\u672c\u5730\u6392\u5e8f,\u5219\u6392\u5e8f + if(!_self.get('remoteSort')){ + _self._sortData(); + } + + _self.fire('load',{ params : params }); + }, + //\u8bbe\u7f6e\u7ed3\u679c\u96c6 + _setResult : function(rows,totalCount){ + var _self = this, + resultMap = _self.get('resultMap'); + + totalCount = totalCount || rows.length; + resultMap[_self.get('root')] = rows; + resultMap[_self.get('totalProperty')] = totalCount; + + //\u6e05\u7406\u4e4b\u524d\u53d1\u751f\u7684\u6539\u53d8 + _self._clearChanges(); + } + }); + + return store; +});/** + * @fileOverview Overlay \u6a21\u5757\u7684\u5165\u53e3 + * @ignore + */ + +define('bui/overlay',['bui/common','bui/overlay/overlay','bui/overlay/dialog','bui/overlay/message'],function (require) { + var BUI = require('bui/common'), + Overlay = BUI.namespace('Overlay'); + + BUI.mix(Overlay,{ + Overlay : require('bui/overlay/overlay'), + Dialog : require('bui/overlay/dialog'), + Message : require('bui/overlay/message') + }); + + BUI.mix(Overlay,{ + OverlayView : Overlay.Overlay.View, + DialogView : Overlay.Dialog.View + }); + + BUI.Message = BUI.Overlay.Message; + return Overlay; + +});/** + * @fileOverview \u60ac\u6d6e\u5c42 + * @ignore + */ + +define('bui/overlay/overlay',['bui/common'],function (require) { + var BUI = require('bui/common'), + Component = BUI.Component, + CLS_ARROW = 'x-align-arrow', + UIBase = Component.UIBase; + + /** + * \u60ac\u6d6e\u5c42\u7684\u89c6\u56fe\u7c7b + * @class BUI.Overlay.OverlayView + * @extends BUI.Component.View + * @mixins BUI.Component.UIBase.PositionView + * @mixins BUI.Component.UIBase.CloseView + * @private + */ + var overlayView = Component.View.extend([ + UIBase.PositionView, + UIBase.CloseView + ]); + + /** + * \u60ac\u6d6e\u5c42\uff0c\u663e\u793a\u60ac\u6d6e\u4fe1\u606f\uff0cMessage\u3001Dialog\u7684\u57fa\u7c7b + *

          + * + *

          + * xclass : 'overlay' + * ** \u4e00\u822c\u6765\u8bf4\uff0coverlay\u7684\u5b50\u7c7b\uff0cDialog \u3001Message\u3001ToolTip\u5df2\u7ecf\u80fd\u591f\u6ee1\u8db3\u65e5\u5e38\u5e94\u7528\uff0c\u4f46\u662f\u4f7f\u7528overay\u66f4\u9002\u5408\u4e00\u4e9b\u66f4\u52a0\u7075\u6d3b\u7684\u5730\u65b9 ** + * ## \u7b80\u5355overlay + *
          
          +   *   BUI.use('bui/overlay',function(Overlay){
          +   *     //\u70b9\u51fb#btn\uff0c\u663e\u793aoverlay
          +   *     var overlay = new Overlay.Overlay({
          +   *       trigger : '#btn',
          +   *       content : '\u8fd9\u662f\u5185\u5bb9',
          +   *       elCls : '\u5916\u5c42\u5e94\u7528\u7684\u6837\u5f0f',
          +   *       autoHide : true //\u70b9\u51fboverlay\u5916\u9762\uff0coverlay \u4f1a\u81ea\u52a8\u9690\u85cf
          +   *     });
          +   *
          +   *     overlay.render();
          +   *   });
          +   * 
          +   *
          +   * 
          +   * @class BUI.Overlay.Overlay
          +   * @extends BUI.Component.Controller
          +   * @mixins BUI.Component.UIBase.Position
          +   * @mixins BUI.Component.UIBase.Align
          +   * @mixins BUI.Component.UIBase.Close
          +   * @mixins BUI.Component.UIBase.AutoShow
          +   * @mixins BUI.Component.UIBase.AutoHide
          +   */
          +  var overlay = Component.Controller.extend([UIBase.Position,UIBase.Align,UIBase.Close,UIBase.AutoShow,UIBase.AutoHide],{
          +    renderUI : function(){
          +      var _self = this,
          +        el = _self.get('el'),
          +        arrowContainer = _self.get('arrowContainer'),
          +        container = arrowContainer ? el.one(arrowContainer) : el;
          +      if(_self.get('showArrow')){
          +        $(_self.get('arrowTpl')).appendTo(container);
          +      }
          +    },
          +    show : function(){
          +      var _self = this,
          +        effectCfg = _self.get('effect'),
          +        el = _self.get('el'),
          +		    visibleMode = _self.get('visibleMode'),
          +        effect = effectCfg.effect,
          +        duration = effectCfg.duration;
          +
          +  	  if(visibleMode === 'visibility'){
          +    		overlay.superclass.show.call(_self);
          +    		if(effectCfg.callback){
          +              effectCfg.callback.call(_self);
          +        }
          +    		return;
          +  	  }
          +      //\u5982\u679c\u8fd8\u672a\u6e32\u67d3\uff0c\u5219\u5148\u6e32\u67d3\u63a7\u4ef6
          +      if(!_self.get('rendered')){
          +        _self.set('visible',true);
          +        _self.render();
          +        _self.set('visible',false);
          +        el = _self.get('el');
          +      }
          +      
          +      switch(effect){
          +        case  'linear' :
          +          el.show(duration,callback);
          +          break;
          +        case  'fade' :
          +          el.fadeIn(duration,callback);
          +          break;
          +        case  'slide' :
          +          el.slideDown(duration,callback);
          +          break;
          +        default:
          +          callback();
          +        break;
          +      }
          +
          +      function callback(){
          +        _self.set('visible',true);
          +        if(effectCfg.callback){
          +          effectCfg.callback.call(_self);
          +        }
          +      }
          +
          +    },
          +    hide : function(){
          +      var _self = this,
          +        effectCfg = _self.get('effect'),
          +        el = _self.get('el'),
          +        effect = effectCfg.effect,
          +        duration = effectCfg.duration;
          +  	  if(_self.get('visibleMode') === 'visibility'){
          +  		  callback();
          +  		  return;
          +  	  }
          +      switch(effect){
          +        case 'linear':
          +          el.hide(duration,callback);
          +          break;
          +        case  'fade' :
          +          el.fadeOut(duration,callback);
          +          break;
          +        case  'slide' :
          +          el.slideUp(duration,callback);
          +          break;
          +        default:
          +          callback();
          +        break;
          +      }
          +      function callback(){
          +        _self.set('visible',false);
          +        if(effectCfg.callback){
          +          effectCfg.callback.call(_self);
          +        }
          +      }
          +
          +    }
          +  },{
          +    ATTRS : 
          +	/**
          +	* @lends BUI.Overlay.Overlay#
          +  * @ignore 
          +	**/	
          +	{
          +      /**
          +       * {Object} - \u53ef\u9009, \u663e\u793a\u6216\u9690\u85cf\u65f6\u7684\u7279\u6548\u652f\u6301, \u5bf9\u8c61\u5305\u542b\u4ee5\u4e0b\u914d\u7f6e
          +       * 
            + *
          1. effect:\u7279\u6548\u6548\u679c\uff0c'none(\u9ed8\u8ba4\u65e0\u7279\u6548)','linear(\u7ebf\u6027)',fade(\u6e10\u53d8)','slide(\u6ed1\u52a8\u51fa\u73b0)'
          2. + *
          3. duration:\u65f6\u95f4\u95f4\u9694
          4. + *
          + * @type {Object} + */ + effect:{ + value : { + effect : 'none', + duration : 0, + callback : null + } + }, + /** + * whether this component can be closed. + * @default false + * @type {Boolean} + * @protected + */ + closable:{ + value:false + }, + /** + * \u662f\u5426\u663e\u793a\u6307\u5411\u7bad\u5934\uff0c\u8ddfalign\u5c5e\u6027\u7684points\u76f8\u5173 + * @type {Boolean} + * @protected + */ + showArrow : { + value : false + }, + /** + * \u7bad\u5934\u653e\u7f6e\u5728\u7684\u4f4d\u7f6e\uff0c\u662f\u4e00\u4e2a\u9009\u62e9\u5668\uff0c\u4f8b\u5982 .arrow-wraper + * new Tip({ //\u53ef\u4ee5\u8bbe\u7f6e\u6574\u4e2a\u63a7\u4ef6\u7684\u6a21\u677f + * arrowContainer : '.arrow-wraper', + * tpl : '
          ' + * }); + * + * @type {String} + * @protected + */ + arrowContainer : { + view : true + }, + /** + * \u6307\u5411\u7bad\u5934\u7684\u6a21\u677f + * @type {Object} + * @protected + */ + arrowTpl : { + value : '' + }, + visibleMode : { + value : 'visibility' + }, + visible :{ + value:false + }, + xview : { + value : overlayView + } + } + },{ + xclass:'overlay' + }); + + overlay.View = overlayView; + return overlay; + +});/** + * @fileOverview \u5f39\u51fa\u6846 + * @author dxq613@gmail.com + * @ignore + */ + +define('bui/overlay/dialog',['bui/overlay/overlay'],function (require) { + var Overlay = require('bui/overlay/overlay'), + UIBase = BUI.Component.UIBase, + CLS_TITLE = 'header-title', + PREFIX = BUI.prefix, + HEIGHT_PADDING = 20; + + /** + * dialog\u7684\u89c6\u56fe\u7c7b + * @class BUI.Overlay.DialogView + * @extends BUI.Overlay.OverlayView + * @mixins BUI.Component.UIBase.StdModView + * @mixins BUI.Component.UIBase.MaskView + * @private + */ + var dialogView = Overlay.View.extend([UIBase.StdModView,UIBase.MaskView],{ + + _uiSetTitle:function(v){ + var _self = this, + el = _self.get('el'); + + el.find('.' + CLS_TITLE).html(v); + + }, + _uiSetContentId : function(v){ + var _self = this, + body = _self.get('body'), + children = $('#'+v).children(); + + children.appendTo(body); + }, + _uiSetHeight : function(v){ + var _self = this, + bodyHeight = v, + header = _self.get('header'), + body = _self.get('body'), + footer = _self.get('footer'); + + bodyHeight -= header.outerHeight()+footer.outerHeight(); + bodyHeight -=HEIGHT_PADDING * 2; + body.height(bodyHeight); + }, + _removeContent : function(){ + var _self = this, + body = _self.get('body'), + contentId = _self.get('contentId'); + if(contentId){ + body.children().appendTo($('#'+contentId)); + }else { + body.children().remove(); + } + } + + },{ + xclass:'dialog-view' + }); + + /** + * \u5f39\u51fa\u6846 xclass:'dialog' + *

          + * + *

          + * ** \u666e\u901a\u5f39\u51fa\u6846 ** + *
          
          +   *  BUI.use('bui/overlay',function(Overlay){
          +   *      var dialog = new Overlay.Dialog({
          +   *        title:'\u975e\u6a21\u6001\u7a97\u53e3',
          +   *        width:500,
          +   *        height:300,
          +   *        mask:false,  //\u8bbe\u7f6e\u662f\u5426\u6a21\u6001
          +   *        buttons:[],
          +   *        bodyContent:'

          \u8fd9\u662f\u4e00\u4e2a\u975e\u6a21\u6001\u7a97\u53e3,\u5e76\u4e14\u4e0d\u5e26\u6309\u94ae

          ' + * }); + * dialog.show(); + * $('#btnShow').on('click',function () { + * dialog.show(); + * }); + * }); + *
          + * + * ** \u4f7f\u7528\u73b0\u6709\u7684html\u7ed3\u6784 ** + *
          
          +   *  BUI.use('bui/overlay',function(Overlay){
          +   *      var dialog = new Overlay.Dialog({
          +   *        title:'\u914d\u7f6eDOM',
          +   *        width:500,
          +   *        height:250,
          +   *        contentId:'content',//\u914d\u7f6eDOM\u5bb9\u5668\u7684\u7f16\u53f7
          +   *        success:function () {
          +   *          alert('\u786e\u8ba4');
          +   *          this.hide();
          +   *        }
          +   *      });
          +   *    dialog.show();
          +   *    $('#btnShow').on('click',function () {
          +   *      dialog.show();
          +   *    });
          +   *  });
          +   * 
          + * @class BUI.Overlay.Dialog + * @extends BUI.Overlay.Overlay + * @mixins BUI.Component.UIBase.StdMod + * @mixins BUI.Component.UIBase.Mask + * @mixins BUI.Component.UIBase.Drag + */ + var dialog = Overlay.extend([UIBase.StdMod,UIBase.Mask,UIBase.Drag],{ + + show:function(){ + var _self = this; + + dialog.superclass.show.call(this); + _self.center(); + }, + //\u7ed1\u5b9a\u4e8b\u4ef6 + bindUI : function(){ + var _self = this; + _self.on('closeclick',function(){ + return _self.onCancel(); + }); + }, + /** + * @protected + * \u53d6\u6d88 + */ + onCancel : function(){ + var _self = this, + cancel = _self.get('cancel'); + return cancel.call(this); + }, + //\u8bbe\u7f6e\u6309\u94ae + _uiSetButtons:function(buttons){ + var _self = this, + footer = _self.get('footer'); + + footer.children().remove(); + BUI.each(buttons,function(conf){ + _self._createButton(conf,footer); + }); + + }, + //\u521b\u5efa\u6309\u94ae + _createButton : function(conf,parent){ + var _self = this, + temp = '', + btn = $(temp).appendTo(parent); + btn.on('click',function(){ + conf.handler.call(_self,_self,this); + }); + }, + destructor : function(){ + var _self = this, + contentId = _self.get('contentId'), + body = _self.get('body'), + closeAction = _self.get('closeAction'); + if(closeAction == 'destroy'){ + _self.hide(); + if(contentId){ + body.children().appendTo('#'+contentId); + } + } + } + },{ + + ATTRS : + /** + * @lends BUI.Overlay.Dialog# + * @ignore + */ + { + closeTpl:{ + view:true, + value : '\u00d7' + }, + /** + * \u5f39\u51fa\u5e93\u7684\u6309\u94ae\uff0c\u53ef\u4ee5\u6709\u591a\u4e2a,\u67093\u4e2a\u53c2\u6570 + * var dialog = new Overlay.Dialog({ + * title:'\u81ea\u5b9a\u4e49\u6309\u94ae', + * width:500, + * height:300, + * mask:false, + * buttons:[ + * { + * text:'\u81ea\u5b9a\u4e49', + * elCls : 'button button-primary', + * handler : function(){ + * //do some thing + * this.hide(); + * } + * },{ + * text:'\u5173\u95ed', + * elCls : 'button', + * handler : function(){ + * this.hide(); + * } + * } + * ], + * + * bodyContent:'

          \u8fd9\u662f\u4e00\u4e2a\u81ea\u5b9a\u4e49\u6309\u94ae\u7a97\u53e3,\u53ef\u4ee5\u914d\u7f6e\u4e8b\u4ef6\u548c\u6587\u672c\u6837\u5f0f

          ' + * }); + * dialog.show(); + *
            + *
          1. text:\u6309\u94ae\u6587\u672c
          2. + *
          3. elCls:\u6309\u94ae\u6837\u5f0f
          4. + *
          5. handler:\u70b9\u51fb\u6309\u94ae\u7684\u56de\u8c03\u4e8b\u4ef6
          6. + *
          + * @cfg {Array} buttons + * @default '\u786e\u5b9a'\u3001'\u53d6\u6d88'2\u4e2a\u6309\u94ae + * + */ + buttons:{ + value:[ + { + text:'\u786e\u5b9a', + elCls : 'button button-primary', + handler : function(){ + var _self = this, + success = _self.get('success'); + if(success){ + success.call(_self); + } + } + },{ + text:'\u53d6\u6d88', + elCls : 'button button-primary', + handler : function(dialog,btn){ + if(this.onCancel() !== false){ + this.close(); + } + } + } + ] + }, + /** + * \u5f39\u51fa\u6846\u663e\u793a\u5185\u5bb9\u7684DOM\u5bb9\u5668ID + * @cfg {Object} contentId + */ + contentId:{ + view:true + }, + /** + * \u70b9\u51fb\u6210\u529f\u65f6\u7684\u56de\u8c03\u51fd\u6570 + * @cfg {Function} success + */ + success : { + value : function(){ + this.close(); + } + }, + /** + * \u7528\u6237\u53d6\u6d88\u65f6\u8c03\u7528\uff0c\u5982\u679creturn false\u5219\u963b\u6b62\u7a97\u53e3\u5173\u95ed + * @cfg {Function} cancel + */ + cancel : { + value : function(){ + + } + }, + dragNode : { + /** + * @private + */ + valueFn : function(){ + return this.get('header'); + } + }, + + /** + * \u9ed8\u8ba4\u7684\u52a0\u8f7d\u63a7\u4ef6\u5185\u5bb9\u7684\u914d\u7f6e,\u9ed8\u8ba4\u503c\uff1a + *
          +       *  {
          +       *   property : 'bodyContent',
          +       *   autoLoad : true
          +       * }
          +       * 
          + * @type {Object} + */ + defaultLoaderCfg : { + valueFn :function(){ + var _self = this; + return { + property : 'bodyContent', + autoLoad : false, + lazyLoad : { + event : 'show' + }, + loadMask : { + el : _self.get('body') + } + } + } + }, + /** + * \u5f39\u51fa\u6846\u6807\u9898 + * @cfg {String} title + */ + /** + * \u5f39\u51fa\u6846\u6807\u9898 + *
          
          +       *  dialog.set('title','new title');
          +       * 
          + * @type {String} + */ + title : { + view:true, + value : '' + }, + mask : { + value:true + }, + maskShared:{ + value:false + }, + headerContent:{ + value:'
          \u6807\u9898
          ' + }, + footerContent:{ + + }, + closable:{ + value : true + }, + xview:{ + value:dialogView + } + } + },{ + xclass : 'dialog' + }); + + dialog.View = dialogView; + return dialog; + +});/** + * @fileOverview \u6d88\u606f\u6846\uff0c\u8b66\u544a\u3001\u786e\u8ba4 + * @author dxq613@gmail.com + * @ignore + */ + +define('bui/overlay/message',['bui/overlay/dialog'],function (require) { + var Dialog = require('bui/overlay/dialog'), + PREFIX = BUI.prefix, + iconText ={ + info : 'i', + error : '\u00d7', + success : '', + question : '?', + warning: '!' + }; + + /** + * \u6d88\u606f\u6846\u7c7b\uff0c\u4e00\u822c\u4e0d\u76f4\u63a5\u521b\u5efa\u5bf9\u8c61\uff0c\u800c\u662f\u8c03\u7528\u5176Alert\u548cConfirm\u65b9\u6cd5 + *
          
          +   ** BUI.use('bui/overlay',function(overlay){
          +   * 
          +   *    BUI.Message.Alert('\u8fd9\u53ea\u662f\u7b80\u5355\u7684\u63d0\u793a\u4fe1\u606f','info');
          +   *    BUI.Message.Alert('\u8fd9\u53ea\u662f\u7b80\u5355\u7684\u6210\u529f\u4fe1\u606f','success');
          +   *    BUI.Message.Alert('\u8fd9\u53ea\u662f\u7b80\u5355\u7684\u8b66\u544a\u4fe1\u606f','warning');
          +   *    BUI.Message.Alert('\u8fd9\u53ea\u662f\u7b80\u5355\u7684\u9519\u8bef\u4fe1\u606f','error');
          +   *    BUI.Message.Alert('\u8fd9\u53ea\u662f\u7b80\u5355\u7684\u8be2\u95ee\u4fe1\u606f','question');
          +   *
          +   *    //\u56de\u8c03\u51fd\u6570
          +   *    BUI.Message.Alert('\u70b9\u51fb\u89e6\u53d1\u56de\u8c03\u51fd\u6570',function() {
          +   *         alert('\u6267\u884c\u56de\u8c03');
          +   *       },'error');
          +   *       
          +   *    //\u590d\u6742\u7684\u63d0\u793a\u4fe1\u606f
          +   *    var msg = '<h2>\u4e0a\u4f20\u5931\u8d25\uff0c\u8bf7\u4e0a\u4f2010M\u4ee5\u5185\u7684\u6587\u4ef6</h2>'+
          +   *       '<p class="auxiliary-text">\u5982\u8fde\u7eed\u4e0a\u4f20\u5931\u8d25\uff0c\u8bf7\u53ca\u65f6\u8054\u7cfb\u5ba2\u670d\u70ed\u7ebf\uff1a0511-23883767834</p>'+
          +   *       '<p><a href="#">\u8fd4\u56delist\u9875\u9762</a> <a href="#">\u67e5\u770b\u8be6\u60c5</a></p>';
          +   *     BUI.Message.Alert(msg,'error');
          +   *    //\u786e\u8ba4\u4fe1\u606f
          +   *    BUI.Message.Confirm('\u786e\u8ba4\u8981\u66f4\u6539\u4e48\uff1f',function(){
          +   *       alert('\u786e\u8ba4');
          +   *     },'question');
          +   * });
          +   * 
          + * @class BUI.Overlay.Message + * @private + * @extends BUI.Overlay.Dialog + */ + var message = Dialog.extend({ + + /** + * @protected + * @ignore + */ + renderUI : function(){ + this._setContent(); + }, + bindUI : function(){ + var _self = this, + body = _self.get('body'); + _self.on('afterVisibleChange',function(ev){ + if(ev.newVal){ + if(BUI.UA.ie < 8){ + /** + * fix ie6,7 bug + * @ignore + */ + var outerWidth = body.outerWidth(); + if(BUI.UA.ie == 6){ + outerWidth = outerWidth > 350 ? 350 : outerWidth; + } + _self.get('header').width(outerWidth - 20); + _self.get('footer').width(outerWidth); + } + } + }); + }, + //\u6839\u636e\u6a21\u7248\u8bbe\u7f6e\u5185\u5bb9 + _setContent : function(){ + var _self = this, + body = _self.get('body'), + contentTpl = BUI.substitute(_self.get('contentTpl'),{ + msg : _self.get('msg'), + iconTpl : _self.get('iconTpl') + }); + body.empty(); + + $(contentTpl).appendTo(body); + }, + //\u8bbe\u7f6e\u7c7b\u578b + _uiSetIcon : function(v){ + if (!this.get('rendered')) { + return; + } + this._setContent(); + }, + //\u8bbe\u7f6e\u6587\u672c + _uiSetMsg : function(v){ + if (!this.get('rendered')) { + return; + } + this._setContent(); + } + + },{ + ATTRS : + { + /** + * \u56fe\u6807\u7c7b\u578b + *
            + *
          1. \u63d0\u793a\u4fe1\u606f\uff0c\u7c7b\u578b\u53c2\u6570info
          2. + *
          3. \u6210\u529f\u4fe1\u606f\uff0c\u7c7b\u578b\u53c2\u6570success
          4. + *
          5. \u8b66\u544a\u4fe1\u606f\uff0c\u7c7b\u578b\u53c2\u6570warning
          6. + *
          7. \u9519\u8bef\u4fe1\u606f\uff0c\u7c7b\u578b\u53c2\u6570error
          8. + *
          9. \u786e\u8ba4\u4fe1\u606f\uff0c\u7c7b\u578b\u53c2\u6570question
          10. + *
          + * @type {String} + */ + icon : { + + }, + /** + * \u63d0\u793a\u6d88\u606f\uff0c\u53ef\u4ee5\u662f\u6587\u672c\u6216\u8005html + * @cfg {String} msg + */ + /** + * \u63d0\u793a\u6d88\u606f\uff0c\u53ef\u4ee5\u662f\u6587\u672c\u6216\u8005html + * @type {String} + */ + msg : { + + }, + /** + * @private + */ + iconTpl : { + /** + * @private + */ + getter:function(){ + var _self = this, + type = _self.get('icon'); + return '
          ' + iconText[type] + '
          '; + } + }, + /** + * \u5185\u5bb9\u7684\u6a21\u7248 + * @type {String} + * @protected + */ + contentTpl : { + value : '{iconTpl}
          {msg}
          ' + } + } + },{ + xclass : 'message', + priority : 0 + }); + + var singlelon = new message({ + icon:'info', + title:'' + }); + + function messageFun(buttons,defaultIcon){ + + return function (msg,callback,icon){ + + if(BUI.isString(callback)){ + icon = callback; + callback = null; + } + icon = icon || defaultIcon; + callback = callback || hide; + showMessage({ + 'buttons': buttons, + 'icon':icon, + 'msg':msg, + 'success' : callback + }); + }; + } + + function showMessage(config){ + singlelon.set(config); + + singlelon.show(); + } + + function success(){ + var _self = this, + success = _self.get('success'); + if(success){ + success.call(_self); + _self.hide(); + } + } + + function hide(){ + this.hide(); + } + + + var Alert = messageFun([{ + text:'\u786e\u5b9a', + elCls : 'button button-primary', + handler : success + } + ],'info'), + Confirm = messageFun([{ + text:'\u786e\u5b9a', + elCls : 'button button-primary', + handler : success + },{ + text:'\u53d6\u6d88', + elCls : 'button button-primary', + handler : hide + } + ],'question'); + + /** + * \u63d0\u793a\u6846\u9759\u6001\u7c7b + * @class BUI.Message + */ + + /** + * \u663e\u793a\u63d0\u793a\u4fe1\u606f\u6846 + * @static + * @method + * @member BUI.Message + * @param {String} msg \u63d0\u793a\u4fe1\u606f + * @param {Function} callback \u786e\u5b9a\u7684\u56de\u8c03\u51fd\u6570 + * @param {String} icon \u56fe\u6807\uff0c\u63d0\u4f9b\u4ee5\u4e0b\u51e0\u79cd\u56fe\u6807\uff1ainfo,error,success,question,warning + */ + message.Alert = Alert; + + /** + * \u663e\u793a\u786e\u8ba4\u6846 + *
          
          +   * BUI.Message.Confirm('\u786e\u8ba4\u8981\u66f4\u6539\u4e48\uff1f',function(){
          +   *       alert('\u786e\u8ba4');
          +   * },'question');
          +   * 
          + * @static + * @method + * @member BUI.Message + * @param {String} msg \u63d0\u793a\u4fe1\u606f + * @param {Function} callback \u786e\u5b9a\u7684\u56de\u8c03\u51fd\u6570 + * @param {String} icon \u56fe\u6807\uff0c\u63d0\u4f9b\u4ee5\u4e0b\u51e0\u79cd\u56fe\u6807\uff1ainfo,error,success,question,warning + */ + message.Confirm = Confirm; + + /** + * \u81ea\u5b9a\u4e49\u6d88\u606f\u6846\uff0c\u4f20\u5165\u914d\u7f6e\u4fe1\u606f {@link BUI.Overlay.Dialog} \u548c {@link BUI.Overlay.Message} + * @static + * @method + * @member BUI.Message + * @param {Object} config \u914d\u7f6e\u4fe1\u606f + */ + message.Show = showMessage; + + return message; +});/** + * @fileOverview \u5217\u8868\u6a21\u5757\u5165\u53e3\u6587\u4ef6 + * @ignore + */ +;(function(){ +var BASE = 'bui/list/'; +define('bui/list',['bui/common',BASE + 'list',BASE + 'listitem',BASE + 'simplelist',BASE + 'listbox'],function (r) { + var BUI = r('bui/common'), + List = BUI.namespace('List'); + + BUI.mix(List,{ + List : r(BASE + 'list'), + ListItem : r(BASE + 'listitem'), + SimpleList : r(BASE + 'simplelist'), + Listbox : r(BASE + 'listbox') + }); + + BUI.mix(List,{ + ListItemView : List.ListItem.View, + SimpleListView : List.SimpleList.View + }); + + return List; +}); +})(); +/** + * @fileOverview \u4f7f\u7528DOM\u5143\u7d20\u4f5c\u4e3a\u9009\u9879\u7684\u6269\u5c55\u7c7b + * @author dxq613@gmail.com + * @ignore + */ + +define('bui/list/domlist',['bui/common'],function (require) { + 'use strict'; + + var BUI = require('bui/common'), + Selection = BUI.Component.UIBase.Selection, + FIELD_PREFIX = 'data-', + List = BUI.Component.UIBase.List; + + function getItemStatusCls(name ,self) { + var _self = self, + itemCls = _self.get('itemCls'), + itemStatusCls = _self.get('itemStatusCls'); + + if(itemStatusCls && itemStatusCls[name]){ + return itemStatusCls[name]; + } + return itemCls + '-' + name; + } + + /** + * \u9009\u9879\u662fDOM\u7684\u5217\u8868\u7684\u89c6\u56fe\u7c7b + * @private + * @class BUI.List.DomList.View + */ + var domListView = function(){ + + }; + + domListView.ATTRS = { + items : {} + }; + + domListView.prototype = { + /** + * @protected + * \u6e05\u9664\u8005\u5217\u8868\u9879\u7684DOM + */ + clearControl : function(){ + var _self = this, + listEl = _self.getItemContainer(), + itemCls = _self.get('itemCls'); + listEl.find('.'+itemCls).remove(); + }, + /** + * \u6dfb\u52a0\u9009\u9879 + * @param {Object} item \u9009\u9879\u503c + * @param {Number} index \u7d22\u5f15 + */ + addItem : function(item,index){ + return this._createItem(item,index); + }, + /** + * \u83b7\u53d6\u6240\u6709\u7684\u8bb0\u5f55 + * @return {Array} \u8bb0\u5f55\u96c6\u5408 + */ + getItems : function(){ + var _self = this, + elements = _self.getAllElements(), + rst = []; + BUI.each(elements,function(elem){ + rst.push(_self.getItemByElement(elem)); + }); + return rst; + }, + /** + * \u66f4\u65b0\u5217\u8868\u9879 + * @param {Object} item \u9009\u9879\u503c + * @ignore + */ + updateItem : function(item){ + var _self = this, + items = _self.getItems(), + index = BUI.Array.indexOf(item,items), + element = null, + tpl; + if(index >=0 ){ + element = _self.findElement(item); + tpl = _self.getItemTpl(item,index); + if(element){ + $(element).html($(tpl).html()); + } + } + return element; + }, + /** + * \u79fb\u9664\u9009\u9879 + * @param {jQuery} element + * @ignore + */ + removeItem:function(item,element){ + element = element || this.findElement(item); + $(element).remove(); + }, + /** + * \u83b7\u53d6\u5217\u8868\u9879\u7684\u5bb9\u5668 + * @return {jQuery} \u5217\u8868\u9879\u5bb9\u5668 + * @protected + */ + getItemContainer : function () { + return this.get('itemContainer') || this.get('el'); + }, + /** + * \u83b7\u53d6\u8bb0\u5f55\u7684\u6a21\u677f,itemTpl \u548c \u6570\u636eitem \u5408\u5e76\u4ea7\u751f\u7684\u6a21\u677f + * @protected + */ + getItemTpl : function (item,index) { + var _self = this, + render = _self.get('itemTplRender'), + itemTpl = _self.get('itemTpl'); + if(render){ + return render(item,index); + } + + return BUI.substitute(itemTpl,item); + }, + //\u521b\u5efa\u9879 + _createItem : function(item,index){ + var _self = this, + listEl = _self.getItemContainer(), + itemCls = _self.get('itemCls'), + dataField = _self.get('dataField'), + tpl = _self.getItemTpl(item,index), + node = $(tpl); + if(index !== undefined){ + var target = listEl.find('.'+itemCls)[index]; + if(target){ + node.insertBefore(target); + }else{ + node.appendTo(listEl); + } + }else{ + node.appendTo(listEl); + } + node.addClass(itemCls); + node.data(dataField,item); + return node; + }, + /** + * \u83b7\u53d6\u5217\u8868\u9879\u5bf9\u5e94\u72b6\u6001\u7684\u6837\u5f0f + * @param {String} name \u72b6\u6001\u540d\u79f0 + * @return {String} \u72b6\u6001\u7684\u6837\u5f0f + */ + getItemStatusCls : function(name){ + return getItemStatusCls(name,this); + }, + /** + * \u8bbe\u7f6e\u5217\u8868\u9879\u9009\u4e2d + * @protected + * @param {*} name \u72b6\u6001\u540d\u79f0 + * @param {HTMLElement} element DOM\u7ed3\u6784 + * @param {Boolean} value \u8bbe\u7f6e\u6216\u53d6\u6d88\u6b64\u72b6\u6001 + */ + setItemStatusCls : function(name,element,value){ + var _self = this, + cls = _self.getItemStatusCls(name), + method = value ? 'addClass' : 'removeClass'; + if(element){ + $(element)[method](cls); + } + }, + /** + * \u662f\u5426\u6709\u67d0\u4e2a\u72b6\u6001 + * @param {*} name \u72b6\u6001\u540d\u79f0 + * @param {HTMLElement} element DOM\u7ed3\u6784 + * @return {Boolean} \u662f\u5426\u5177\u6709\u72b6\u6001 + */ + hasStatus : function(name,element){ + var _self = this, + cls = _self.getItemStatusCls(name); + return $(element).hasClass(cls); + }, + /** + * \u8bbe\u7f6e\u5217\u8868\u9879\u9009\u4e2d + * @param {*} item \u8bb0\u5f55 + * @param {Boolean} selected \u662f\u5426\u9009\u4e2d + * @param {HTMLElement} element DOM\u7ed3\u6784 + */ + setItemSelected: function(item,selected,element){ + var _self = this; + + element = element || _self.findElement(item); + _self.setItemStatusCls('selected',element,selected); + }, + /** + * \u83b7\u53d6\u6240\u6709\u5217\u8868\u9879\u7684DOM\u7ed3\u6784 + * @return {Array} DOM\u5217\u8868 + */ + getAllElements : function(){ + var _self = this, + itemCls = _self.get('itemCls'), + el = _self.get('el'); + return el.find('.' + itemCls); + }, + /** + * \u83b7\u53d6DOM\u7ed3\u6784\u4e2d\u7684\u6570\u636e + * @param {HTMLElement} element DOM \u7ed3\u6784 + * @return {Object} \u8be5\u9879\u5bf9\u5e94\u7684\u503c + */ + getItemByElement : function(element){ + var _self = this, + dataField = _self.get('dataField'); + return $(element).data(dataField); + }, + /** + * \u6839\u636e\u72b6\u6001\u83b7\u53d6\u7b2c\u4e00\u4e2aDOM \u8282\u70b9 + * @param {String} name \u72b6\u6001\u540d\u79f0 + * @return {HTMLElement} Dom \u8282\u70b9 + */ + getFirstElementByStatus : function(name){ + var _self = this, + cls = _self.getItemStatusCls(name), + el = _self.get('el'); + return el.find('.' + cls)[0]; + }, + /** + * \u6839\u636e\u72b6\u6001\u83b7\u53d6DOM + * @return {Array} DOM\u6570\u7ec4 + */ + getElementsByStatus : function(status){ + var _self = this, + cls = _self.getItemStatusCls(status), + el = _self.get('el'); + return el.find('.' + cls); + }, + /** + * \u901a\u8fc7\u6837\u5f0f\u67e5\u627eDOM\u5143\u7d20 + * @param {String} css\u6837\u5f0f + * @return {jQuery} DOM\u5143\u7d20\u7684\u6570\u7ec4\u5bf9\u8c61 + */ + getSelectedElements : function(){ + var _self = this, + cls = _self.getItemStatusCls('selected'), + el = _self.get('el'); + return el.find('.' + cls); + }, + /** + * \u67e5\u627e\u6307\u5b9a\u7684\u9879\u7684DOM\u7ed3\u6784 + * @param {Object} item + * @return {HTMLElement} element + */ + findElement : function(item){ + var _self = this, + elements = _self.getAllElements(), + result = null; + + BUI.each(elements,function(element){ + if(_self.getItemByElement(element) == item){ + result = element; + return false; + } + }); + return result; + }, + /** + * \u5217\u8868\u9879\u662f\u5426\u9009\u4e2d + * @param {HTMLElement} element \u662f\u5426\u9009\u4e2d + * @return {Boolean} \u662f\u5426\u9009\u4e2d + */ + isElementSelected : function(element){ + var _self = this, + cls = _self.getItemStatusCls('selected'); + return element && $(element).hasClass(cls); + } + }; + + //\u8f6c\u6362\u6210Object + function parseItem(element,self){ + var attrs = element.attributes, + itemStatusFields = self.get('itemStatusFields'), + item = {}; + + BUI.each(attrs,function(attr){ + var name = attr.nodeName; + if(name.indexOf(FIELD_PREFIX) !== -1){ + name = name.replace(FIELD_PREFIX,''); + item[name] = attr.nodeValue; + } + }); + item.text = $(element).text(); + //\u83b7\u53d6\u72b6\u6001\u5bf9\u5e94\u7684\u503c + BUI.each(itemStatusFields,function(v,k){ + var cls = getItemStatusCls(k,self); + if($(element).hasClass(cls)){ + item[v] = true; + } + }); + return item; + } + + /** + * @class BUI.List.DomList + * \u9009\u9879\u662fDOM\u7ed3\u6784\u7684\u5217\u8868 + * @extends BUI.Component.UIBase.List + * @mixins BUI.Component.UIBase.Selection + */ + var domList = function(){ + + }; + + domList.ATTRS =BUI.merge(true,List.ATTRS,Selection.ATTRS,{ + + /** + * \u5728DOM\u8282\u70b9\u4e0a\u5b58\u50a8\u6570\u636e\u7684\u5b57\u6bb5 + * @type {String} + * @protected + */ + dataField : { + view:true, + value:'data-item' + }, + /** + * \u9009\u9879\u6240\u5728\u5bb9\u5668\uff0c\u5982\u679c\u672a\u8bbe\u5b9a\uff0c\u4f7f\u7528 el + * @type {jQuery} + * @protected + */ + itemContainer : { + view : true + }, + /** + * \u9009\u9879\u72b6\u6001\u5bf9\u5e94\u7684\u9009\u9879\u503c + * + * - \u6b64\u5b57\u6bb5\u7528\u4e8e\u5c06\u9009\u9879\u8bb0\u5f55\u7684\u503c\u8ddf\u663e\u793a\u7684DOM\u72b6\u6001\u76f8\u5bf9\u5e94 + * - \u4f8b\u5982\uff1a\u4e0b\u9762\u8bb0\u5f55\u4e2d checked : true \uff0c\u53ef\u4ee5\u4f7f\u5f97\u6b64\u8bb0\u5f55\u5bf9\u5e94\u7684DOM\u4e0a\u5e94\u7528\u5bf9\u5e94\u7684\u72b6\u6001(\u9ed8\u8ba4\u4e3a 'list-item-checked') + *
          {id : '1',text : 1,checked : true}
          + * - \u5f53\u66f4\u6539DOM\u7684\u72b6\u6001\u65f6\uff0c\u8bb0\u5f55\u4e2d\u5bf9\u5e94\u7684\u5b57\u6bb5\u5c5e\u6027\u4e5f\u4f1a\u8ddf\u7740\u53d8\u5316 + *
          
          +     *   var list = new List.SimpleList({
          +     *   render : '#t1',
          +     *   idField : 'id', //\u81ea\u5b9a\u4e49\u6837\u5f0f\u540d\u79f0
          +     *   itemStatusFields : {
          +     *     checked : 'checked',
          +     *     disabled : 'disabled'
          +     *   },
          +     *   items : [{id : '1',text : '1',checked : true},{id : '2',text : '2',disabled : true}]
          +     * });
          +     * list.render(); //\u5217\u8868\u6e32\u67d3\u540e\uff0c\u4f1a\u81ea\u52a8\u5e26\u6709checked,\u548cdisabled\u5bf9\u5e94\u7684\u6837\u5f0f
          +     *
          +     * var item = list.getItem('1');
          +     * list.hasStatus(item,'checked'); //true
          +     *
          +     * list.setItemStatus(item,'checked',false);
          +     * list.hasStatus(item,'checked');  //false
          +     * item.checked;                    //false
          +     * 
          +     * 
          + * ** \u6ce8\u610f ** + * \u6b64\u5b57\u6bb5\u8ddf {@link #itemStatusCls} \u4e00\u8d77\u4f7f\u7528\u6548\u679c\u66f4\u597d\uff0c\u53ef\u4ee5\u81ea\u5b9a\u4e49\u5bf9\u5e94\u72b6\u6001\u7684\u6837\u5f0f + * @cfg {Object} itemStatusFields + */ + itemStatusFields : { + value : {} + }, + /** + * \u9879\u7684\u6837\u5f0f\uff0c\u7528\u6765\u83b7\u53d6\u5b50\u9879 + * @cfg {Object} itemCls + */ + itemCls : { + view : true + }, + /** + * \u83b7\u53d6\u9879\u7684\u6587\u672c\uff0c\u9ed8\u8ba4\u83b7\u53d6\u663e\u793a\u7684\u6587\u672c + * @type {Object} + * @protected + */ + textGetter : { + + }, + /** + * \u9ed8\u8ba4\u7684\u52a0\u8f7d\u63a7\u4ef6\u5185\u5bb9\u7684\u914d\u7f6e,\u9ed8\u8ba4\u503c\uff1a + *
          +     *  {
          +     *   property : 'items',
          +     *   dataType : 'json'
          +     * }
          +     * 
          + * @type {Object} + */ + defaultLoaderCfg : { + value : { + property : 'items', + dataType : 'json' + } + }, + events : { + value : { + /** + * \u9009\u9879\u5bf9\u5e94\u7684DOM\u521b\u5efa\u5b8c\u6bd5 + * @event + * @param {Object} e \u4e8b\u4ef6\u5bf9\u8c61 + * @param {Object} e.item \u6e32\u67d3DOM\u5bf9\u5e94\u7684\u9009\u9879 + * @param {HTMLElement} e.element \u6e32\u67d3\u7684DOM\u5bf9\u8c61 + */ + 'itemrendered' : true, + /** + * @event + * \u5220\u9664\u9009\u9879 + * @param {Object} e \u4e8b\u4ef6\u5bf9\u8c61 + * @param {Object} e.item \u5220\u9664DOM\u5bf9\u5e94\u7684\u9009\u9879 + * @param {HTMLElement} e.element \u5220\u9664\u7684DOM\u5bf9\u8c61 + */ + 'itemremoved' : true, + /** + * @event + * \u66f4\u65b0\u9009\u9879 + * @param {Object} e \u4e8b\u4ef6\u5bf9\u8c61 + * @param {Object} e.item \u66f4\u65b0DOM\u5bf9\u5e94\u7684\u9009\u9879 + * @param {HTMLElement} e.element \u66f4\u65b0\u7684DOM\u5bf9\u8c61 + */ + 'itemupdated' : true, + /** + * \u8bbe\u7f6e\u8bb0\u5f55\u65f6\uff0c\u6240\u6709\u7684\u8bb0\u5f55\u663e\u793a\u5b8c\u6bd5\u540e\u89e6\u53d1 + * @event + */ + 'itemsshow' : false, + /** + * \u8bbe\u7f6e\u8bb0\u5f55\u540e\uff0c\u6240\u6709\u7684\u8bb0\u5f55\u663e\u793a\u524d\u89e6\u53d1 + * @event: + */ + 'beforeitemsshow' : false, + /** + * \u6e05\u7a7a\u6240\u6709\u8bb0\u5f55\uff0cDOM\u6e05\u7406\u5b8c\u6210\u540e + * @event + */ + 'itemsclear' : false, + /** + * \u6e05\u7a7a\u6240\u6709Dom\u524d\u89e6\u53d1 + * @event + */ + 'beforeitemsclear' : false + + } + } + }); + + domList.PARSER = { + items : function(el){ + var _self = this, + rst = [], + itemCls = _self.get('itemCls'), + dataField = _self.get('dataField'), + elements = el.find('.' + itemCls); + BUI.each(elements,function(element){ + var item = parseItem(element,_self); + rst.push(item); + $(element).data(dataField,item); + }); + //_self.setInternal('items',rst); + return rst; + } + }; + + BUI.augment(domList,List,Selection,{ + + //\u8bbe\u7f6e\u8bb0\u5f55 + _uiSetItems : function (items) { + var _self = this; + //\u4f7f\u7528srcNode \u7684\u65b9\u5f0f\uff0c\u4e0d\u540c\u6b65 + if(_self.get('srcNode') && !_self.get('rendered')){ + return; + } + this.setItems(items); + }, + __bindUI : function(){ + var _self = this, + selectedEvent = _self.get('selectedEvent'), + itemCls = _self.get('itemCls'), + itemContainer = _self.get('view').getItemContainer(); + + itemContainer.delegate('.'+itemCls,'click',function(ev){ + var itemEl = $(ev.currentTarget), + item = _self.getItemByElement(itemEl); + if(_self.isItemDisabled(item,itemEl)){ //\u7981\u7528\u72b6\u6001\u4e0b\u963b\u6b62\u9009\u4e2d + return; + } + var rst = _self.fire('itemclick',{item:item,element : itemEl[0],domTarget:ev.target}); + if(rst !== false && selectedEvent == 'click'){ + setItemSelectedStatus(item,itemEl); + } + }); + if(selectedEvent !== 'click'){ //\u5982\u679c\u9009\u4e2d\u4e8b\u4ef6\u4e0d\u7b49\u4e8eclick\uff0c\u5219\u8fdb\u884c\u76d1\u542c\u9009\u4e2d + itemContainer.delegate('.'+itemCls,selectedEvent,function(ev){ + var itemEl = $(ev.currentTarget), + item = _self.getItemByElement(itemEl); + if(_self.isItemDisabled(item,itemEl)){ //\u7981\u7528\u72b6\u6001\u4e0b\u963b\u6b62\u9009\u4e2d + return; + } + setItemSelectedStatus(item,itemEl); + }); + } + + itemContainer.delegate('.' + itemCls,'dblclick',function(ev){ + var itemEl = $(ev.currentTarget), + item = _self.getItemByElement(itemEl); + if(_self.isItemDisabled(item,itemEl)){ //\u7981\u7528\u72b6\u6001\u4e0b\u963b\u6b62\u9009\u4e2d + return; + } + _self.fire('itemdblclick',{item:item,element : itemEl[0],domTarget:ev.target}); + }); + + function setItemSelectedStatus(item,itemEl){ + var multipleSelect = _self.get('multipleSelect'), + isSelected; + isSelected = _self.isItemSelected(item,itemEl); + if(!isSelected){ + if(!multipleSelect){ + _self.clearSelected(); + } + _self.setItemSelected(item,true,itemEl); + }else if(multipleSelect){ + _self.setItemSelected(item,false,itemEl); + } + } + _self.on('itemrendered itemupdated',function(ev){ + var item = ev.item, + element = ev.element; + _self._syncItemStatus(item,element); + }); + }, + //\u83b7\u53d6\u503c\uff0c\u901a\u8fc7\u5b57\u6bb5 + getValueByField : function(item,field){ + return item && item[field]; + }, + //\u540c\u6b65\u9009\u9879\u72b6\u6001 + _syncItemStatus : function(item,element){ + var _self = this, + itemStatusFields = _self.get('itemStatusFields'); + BUI.each(itemStatusFields,function(v,k){ + _self.get('view').setItemStatusCls(k,element,item[v]); + }); + }, + /** + * @protected + * \u83b7\u53d6\u8bb0\u5f55\u4e2d\u7684\u72b6\u6001\u503c\uff0c\u672a\u5b9a\u4e49\u5219\u4e3aundefined + * @param {Object} item \u8bb0\u5f55 + * @param {String} status \u72b6\u6001\u540d + * @return {Boolean|undefined} + */ + getStatusValue : function(item,status){ + var _self = this, + itemStatusFields = _self.get('itemStatusFields'), + field = itemStatusFields[status]; + return item[field]; + }, + /** + * \u83b7\u53d6\u9009\u9879\u6570\u91cf + * @return {Number} \u9009\u9879\u6570\u91cf + */ + getCount : function(){ + var items = this.getItems(); + return items ? items.length : 0; + }, + /** + * \u66f4\u6539\u72b6\u6001\u503c\u5bf9\u5e94\u7684\u5b57\u6bb5 + * @protected + * @param {String} status \u72b6\u6001\u540d + * @return {String} \u72b6\u6001\u5bf9\u5e94\u7684\u5b57\u6bb5 + */ + getStatusField : function(status){ + var _self = this, + itemStatusFields = _self.get('itemStatusFields'); + return itemStatusFields[status]; + }, + /** + * \u8bbe\u7f6e\u8bb0\u5f55\u72b6\u6001\u503c + * @protected + * @param {Object} item \u8bb0\u5f55 + * @param {String} status \u72b6\u6001\u540d + * @param {Boolean} value \u72b6\u6001\u503c + */ + setStatusValue : function(item,status,value){ + var _self = this, + itemStatusFields = _self.get('itemStatusFields'), + field = itemStatusFields[status]; + if(field){ + item[field] = value; + } + }, + /** + * @ignore + * \u83b7\u53d6\u9009\u9879\u6587\u672c + */ + getItemText : function(item){ + var _self = this, + textGetter = _self.get('textGetter'); + if(!item) + { + return ''; + } + if(textGetter){ + return textGetter(item); + }else{ + return $(_self.findElement(item)).text(); + } + }, + /** + * \u5220\u9664\u9879 + * @param {Object} item \u9009\u9879\u8bb0\u5f55 + * @ignore + */ + removeItem : function (item) { + var _self = this, + items = _self.get('items'), + element = _self.findElement(item), + index; + index = BUI.Array.indexOf(item,items); + if(index !== -1){ + items.splice(index, 1); + } + _self.get('view').removeItem(item,element); + _self.fire('itemremoved',{item:item,domTarget: $(element)[0],element : element}); + }, + /** + * \u5728\u6307\u5b9a\u4f4d\u7f6e\u6dfb\u52a0\u9009\u9879,\u9009\u9879\u503c\u4e3a\u4e00\u4e2a\u5bf9\u8c61 + * @param {Object} item \u9009\u9879 + * @param {Number} index \u7d22\u5f15 + * @ignore + */ + addItemAt : function(item,index) { + var _self = this, + items = _self.get('items'); + if(index === undefined) { + index = items.length; + } + items.splice(index, 0, item); + _self.addItemToView(item,index); + return item; + }, + /** + * @protected + * \u76f4\u63a5\u5728View\u4e0a\u663e\u793a + * @param {Object} item \u9009\u9879 + * @param {Number} index \u7d22\u5f15 + * + */ + addItemToView : function(item,index){ + var _self = this, + element = _self.get('view').addItem(item,index); + _self.fire('itemrendered',{item:item,domTarget : $(element)[0],element : element}); + }, + /** + * \u66f4\u65b0\u5217\u8868\u9879 + * @param {Object} item \u9009\u9879\u503c + * @ignore + */ + updateItem : function(item){ + var _self = this, + element = _self.get('view').updateItem(item); + _self.fire('itemupdated',{item : item,domTarget : $(element)[0],element : element}); + }, + /** + * \u8bbe\u7f6e\u5217\u8868\u8bb0\u5f55 + *
          
          +     *   list.setItems(items);
          +     *   //\u7b49\u540c 
          +     *   list.set('items',items);
          +     * 
          + * @param {Array} items \u5217\u8868\u8bb0\u5f55 + */ + setItems : function(items){ + var _self = this; + //\u6e05\u7406\u5b50\u63a7\u4ef6 + _self.clearControl(); + _self.fire('beforeitemsshow'); + BUI.each(items,function(item,index){ + _self.addItemToView(item,index); + }); + _self.fire('itemsshow'); + }, + /** + * \u83b7\u53d6\u6240\u6709\u9009\u9879 + * @return {Array} \u9009\u9879\u96c6\u5408 + * @override + * @ignore + */ + getItems : function () { + + return this.get('items'); + }, + /** + * \u83b7\u53d6DOM\u7ed3\u6784\u4e2d\u7684\u6570\u636e + * @protected + * @param {HTMLElement} element DOM \u7ed3\u6784 + * @return {Object} \u8be5\u9879\u5bf9\u5e94\u7684\u503c + */ + getItemByElement : function(element){ + return this.get('view').getItemByElement(element); + }, + /** + * \u83b7\u53d6\u9009\u4e2d\u7684\u7b2c\u4e00\u9879, + *
          
          +     * var item = list.getSelected(); //\u591a\u9009\u6a21\u5f0f\u4e0b\u7b2c\u4e00\u6761
          +     * 
          + * @return {Object} \u9009\u4e2d\u7684\u7b2c\u4e00\u9879\u6216\u8005\u4e3anull + */ + getSelected : function(){ //this.getSelection()[0] \u7684\u65b9\u5f0f\u6548\u7387\u592a\u4f4e + var _self = this, + element = _self.get('view').getFirstElementByStatus('selected'); + return _self.getItemByElement(element) || null; + }, + /** + * \u6839\u636e\u72b6\u6001\u83b7\u53d6\u9009\u9879 + *
          
          +     *   //\u8bbe\u7f6e\u72b6\u6001
          +     *   list.setItemStatus(item,'active');
          +     *   
          +     *   //\u83b7\u53d6'active'\u72b6\u6001\u7684\u9009\u9879
          +     *   list.getItemsByStatus('active');
          +     * 
          + * @param {String} status \u72b6\u6001\u540d + * @return {Array} \u9009\u9879\u7ec4\u96c6\u5408 + */ + getItemsByStatus : function(status){ + var _self = this, + elements = _self.get('view').getElementsByStatus(status), + rst = []; + BUI.each(elements,function(element){ + rst.push(_self.getItemByElement(element)); + }); + return rst; + }, + /** + * \u67e5\u627e\u6307\u5b9a\u7684\u9879\u7684DOM\u7ed3\u6784 + *
          
          +     *   var item = list.getItem('2'); //\u83b7\u53d6\u9009\u9879
          +     *   var element = list.findElement(item);
          +     *   $(element).addClass('xxx');
          +     * 
          + * @param {Object} item + * @return {HTMLElement} element + */ + findElement : function(item){ + var _self = this; + if(BUI.isString(item)){ + item = _self.getItem(item); + } + return this.get('view').findElement(item); + }, + findItemByField : function(field,value){ + var _self = this, + items = _self.get('items'), + result = null; + BUI.each(items,function(item){ + if(item[field] === value){ + result = item; + return false; + } + }); + + return result; + }, + /** + * @override + * @ignore + */ + setItemSelectedStatus : function(item,selected,element){ + var _self = this; + element = element || _self.findElement(item); + //_self.get('view').setItemSelected(item,selected,element); + _self.setItemStatus(item,'selected',selected,element); + //_self.afterSelected(item,selected,element); + }, + /** + * \u8bbe\u7f6e\u6240\u6709\u9009\u9879\u9009\u4e2d + * @ignore + */ + setAllSelection : function(){ + var _self = this, + items = _self.getItems(); + _self.setSelection(items); + }, + /** + * \u9009\u9879\u662f\u5426\u88ab\u9009\u4e2d + *
          
          +     *   var item = list.getItem('2');
          +     *   if(list.isItemSelected(item)){
          +     *     //do something
          +     *   }
          +     * 
          + * @override + * @param {Object} item \u9009\u9879 + * @return {Boolean} \u662f\u5426\u9009\u4e2d + */ + isItemSelected : function(item,element){ + var _self = this; + element = element || _self.findElement(item); + + return _self.get('view').isElementSelected(element); + }, + /** + * \u662f\u5426\u9009\u9879\u88ab\u7981\u7528 + *
          
          +     * var item = list.getItem('2');
          +     * if(list.isItemDisabled(item)){ //\u5982\u679c\u9009\u9879\u7981\u7528
          +     *   //do something
          +     * }
          +     * 
          + * @param {Object} item \u9009\u9879 + * @return {Boolean} \u9009\u9879\u662f\u5426\u7981\u7528 + */ + isItemDisabled : function(item,element){ + return this.hasStatus(item,'disabled',element); + }, + /** + * \u8bbe\u7f6e\u9009\u9879\u7981\u7528 + *
          
          +     * var item = list.getItem('2');
          +     * list.setItemDisabled(item,true);//\u8bbe\u7f6e\u9009\u9879\u7981\u7528\uff0c\u4f1a\u5728DOM\u4e0a\u6dfb\u52a0 itemCls + 'disabled'\u7684\u6837\u5f0f
          +     * list.setItemDisabled(item,false); //\u53d6\u6d88\u7981\u7528\uff0c\u53ef\u4ee5\u7528{@link #itemStatusCls} \u6765\u66ff\u6362\u6837\u5f0f
          +     * 
          + * @param {Object} item \u9009\u9879 + */ + setItemDisabled : function(item,disabled){ + + var _self = this; + /*if(disabled){ + //\u6e05\u9664\u9009\u62e9 + _self.setItemSelected(item,false); + }*/ + _self.setItemStatus(item,'disabled',disabled); + }, + /** + * \u83b7\u53d6\u9009\u4e2d\u7684\u9879\u7684\u503c + * @override + * @return {Array} + * @ignore + */ + getSelection : function(){ + var _self = this, + elements = _self.get('view').getSelectedElements(), + rst = []; + BUI.each(elements,function(elem){ + rst.push(_self.getItemByElement(elem)); + }); + return rst; + }, + /** + * @protected + * @override + * \u6e05\u9664\u8005\u5217\u8868\u9879\u7684DOM + */ + clearControl : function(){ + this.fire('beforeitemsclear'); + this.get('view').clearControl(); + this.fire('itemsclear'); + }, + /** + * \u9009\u9879\u662f\u5426\u5b58\u5728\u67d0\u79cd\u72b6\u6001 + *
          
          +     * var item = list.getItem('2');
          +     * list.setItemStatus(item,'active',true);
          +     * list.hasStatus(item,'active'); //true
          +     *
          +     * list.setItemStatus(item,'active',false);
          +     * list.hasStatus(item,'false'); //true
          +     * 
          + * @param {*} item \u9009\u9879 + * @param {String} status \u72b6\u6001\u540d\u79f0\uff0c\u5982selected,hover,open\u7b49\u7b49 + * @param {HTMLElement} [element] \u9009\u9879\u5bf9\u5e94\u7684Dom\uff0c\u653e\u7f6e\u53cd\u590d\u67e5\u627e + * @return {Boolean} \u662f\u5426\u5177\u6709\u67d0\u79cd\u72b6\u6001 + */ + hasStatus : function(item,status,element){ + if(!item){ + return false; + } + var _self = this; + element = element || _self.findElement(item); + return _self.get('view').hasStatus(status,element); + }, + /** + * \u8bbe\u7f6e\u9009\u9879\u72b6\u6001,\u53ef\u4ee5\u8bbe\u7f6e\u4efb\u4f55\u81ea\u5b9a\u4e49\u72b6\u6001 + *
          
          +     * var item = list.getItem('2');
          +     * list.setItemStatus(item,'active',true);
          +     * list.hasStatus(item,'active'); //true
          +     *
          +     * list.setItemStatus(item,'active',false);
          +     * list.hasStatus(item,'false'); //true
          +     * 
          + * @param {*} item \u9009\u9879 + * @param {String} status \u72b6\u6001\u540d\u79f0 + * @param {Boolean} value \u72b6\u6001\u503c\uff0ctrue,false + * @param {HTMLElement} [element] \u9009\u9879\u5bf9\u5e94\u7684Dom\uff0c\u653e\u7f6e\u53cd\u590d\u67e5\u627e + */ + setItemStatus : function(item,status,value,element){ + var _self = this; + if(item){ + element = element || _self.findElement(item); + } + + if(!_self.isItemDisabled(item,element) || status === 'disabled'){ //\u7981\u7528\u540e\uff0c\u963b\u6b62\u6dfb\u52a0\u4efb\u4f55\u72b6\u6001\u53d8\u5316 + if(item){ + if(status === 'disabled' && value){ //\u7981\u7528\uff0c\u540c\u65f6\u6e05\u7406\u5176\u4ed6\u72b6\u6001 + _self.clearItemStatus(item); + } + _self.setStatusValue(item,status,value); + _self.get('view').setItemStatusCls(status,element,value); + _self.fire('itemstatuschange',{item : item,status : status,value : value,element : element}); + } + + if(status === 'selected'){ //\u5904\u7406\u9009\u4e2d + _self.afterSelected(item,value,element); + } + } + + }, + /** + * \u6e05\u9664\u6240\u6709\u9009\u9879\u72b6\u6001,\u5982\u679c\u6307\u5b9a\u6e05\u9664\u7684\u72b6\u6001\u540d\uff0c\u5219\u6e05\u9664\u6307\u5b9a\u7684\uff0c\u5426\u5219\u6e05\u9664\u6240\u6709\u72b6\u6001 + * @param {Object} item \u9009\u9879 + */ + clearItemStatus : function(item,status,element){ + var _self = this, + itemStatusFields = _self.get('itemStatusFields'); + element = element || _self.findElement(item); + + if(status){ + _self.setItemStatus(item,status,false,element); + }else{ + BUI.each(itemStatusFields,function(v,k){ + _self.setItemStatus(item,k,false,element); + }); + if(!itemStatusFields['selected']){ + _self.setItemSelected(item,false); + } + //\u79fb\u9664hover\u72b6\u6001 + _self.setItemStatus(item,'hover',false); + } + + } + }); + + domList.View = domListView; + + return domList; +});/** + * @fileOverview \u5217\u8868\u9009\u9879\uff0c\u4f7f\u7528\u952e\u76d8\u5bfc\u822a + * @author dxq613@gmail.com + * @ignore + */ + +define('bui/list/keynav',function () { + 'use strict'; + /** + * @class BUI.List.KeyNav + * \u5217\u8868\u5bfc\u822a\u6269\u5c55\u7c7b + */ + var KeyNav = function(){}; + + KeyNav.ATTRS = { + /** + * \u9009\u9879\u9ad8\u4eae\u4f7f\u7528\u7684\u72b6\u6001,\u6709\u4e9b\u573a\u666f\u4e0b\uff0c\u4f7f\u7528selected\u66f4\u5408\u9002 + * @cfg {String} [highlightedStatus='hover'] + */ + highlightedStatus : { + value : 'hover' + } + }; + + BUI.augment(KeyNav,{ + + /** + * \u8bbe\u7f6e\u9009\u9879\u9ad8\u4eae\uff0c\u9ed8\u8ba4\u4f7f\u7528 'hover' \u72b6\u6001 + * @param {Object} item \u9009\u9879 + * @param {Boolean} value \u72b6\u6001\u503c\uff0ctrue,false + * @protected + */ + setHighlighted : function(item,element){ + if(this.hasStatus(item,'hover',element)){ + return; + } + var _self = this, + highlightedStatus = _self.get('highlightedStatus'), + lightedElement = _self._getHighLightedElement(), + lightedItem = lightedElement ? _self.getItemByElement(lightedElement) : null; + if(lightedItem !== item){ + if(lightedItem){ + this.setItemStatus(lightedItem,highlightedStatus,false,lightedElement); + } + this.setItemStatus(item,highlightedStatus,true,element); + } + }, + _getHighLightedElement : function(){ + var _self = this, + highlightedStatus = _self.get('highlightedStatus'), + element = _self.get('view').getFirstElementByStatus(highlightedStatus); + return element; + }, + /** + * \u83b7\u53d6\u9ad8\u4eae\u7684\u9009\u9879 + * @return {Object} item + * @protected + */ + getHighlighted : function(){ + var _self = this, + highlightedStatus = _self.get('highlightedStatus'), + element = _self.get('view').getFirstElementByStatus(highlightedStatus); + return _self.getItemByElement(element) || null; + }, + /** + * \u83b7\u53d6\u5217\u6570 + * @return {Number} \u9009\u9879\u7684\u5217\u6570,\u9ed8\u8ba4\u4e3a1\u5217 + * @protected + */ + getColumnCount : function(){ + var _self = this, + firstItem = _self.getFirstItem(), + element = _self.findElement(firstItem), + node = $(element); + if(element){ + return parseInt(node.parent().width() / node.outerWidth(),10); + } + return 1; + }, + /** + * \u83b7\u53d6\u9009\u9879\u7684\u884c\u6570 \uff0c\u603b\u6570/\u5217\u6570 = list.getCount / column + * @protected + * @return {Number} \u9009\u9879\u884c\u6570 + */ + getRowCount : function(columns){ + var _self = this; + columns = columns || _self.getColumnCount(); + return (this.getCount() + columns - 1) / columns; + }, + _getNextItem : function(forward,skip,count){ + var _self = this, + currentIndx = _self._getCurrentIndex(),//\u9ed8\u8ba4\u7b2c\u4e00\u884c + itemCount = _self.getCount(), + factor = forward ? 1 : -1, + nextIndex; + if(currentIndx === -1){ + return forward ? _self.getFirstItem() : _self.getLastItem(); + } + if(!forward){ + skip = skip * factor; + } + nextIndex = (currentIndx + skip + count) % count; + if(nextIndex > itemCount - 1){ //\u5982\u679c\u4f4d\u7f6e\u8d85\u51fa\u7d22\u5f15\u4f4d\u7f6e + if(forward){ + nextIndex = nextIndex - (itemCount - 1); + }else{ + nextIndex = nextIndex + skip; + } + + } + return _self.getItemAt(nextIndex); + }, + //\u83b7\u53d6\u5de6\u8fb9\u4e00\u9879 + _getLeftItem : function(){ + var _self = this, + count = _self.getCount(), + column = _self.getColumnCount(); + if(!count || column <= 1){ //\u5355\u5217\u65f6,\u6216\u8005\u4e3a0\u65f6 + return null; + } + return _self._getNextItem(false,1,count); + }, + //\u83b7\u53d6\u5f53\u524d\u9879 + _getCurrentItem : function(){ + return this.getHighlighted(); + }, + //\u83b7\u53d6\u5f53\u524d\u9879 + _getCurrentIndex : function(){ + var _self = this, + item = _self._getCurrentItem(); + return this.indexOfItem(item); + }, + //\u83b7\u53d6\u53f3\u8fb9\u4e00\u9879 + _getRightItem : function(){ + var _self = this, + count = _self.getCount(), + column = _self.getColumnCount(); + if(!count || column <= 1){ //\u5355\u5217\u65f6,\u6216\u8005\u4e3a0\u65f6 + return null; + } + return this._getNextItem(true,1,count); + }, + //\u83b7\u53d6\u4e0b\u9762\u4e00\u9879 + _getDownItem : function(){ + var _self = this, + columns = _self.getColumnCount(), + rows = _self.getRowCount(columns); + if(rows <= 1){ //\u5355\u884c\u6216\u8005\u4e3a0\u65f6 + return null; + } + return this._getNextItem(true,columns,columns * rows); + + }, + //\u83b7\u53d6\u4e0a\u9762\u4e00\u9879 + _getUpperItem : function(){ + var _self = this, + columns = _self.getColumnCount(), + rows = _self.getRowCount(columns); + if(rows <= 1){ //\u5355\u884c\u6216\u8005\u4e3a0\u65f6 + return null; + } + return this._getNextItem(false,columns,columns * rows); + }, + /** + * \u5904\u7406\u5411\u4e0a\u5bfc\u822a + * @protected + * @param {jQuery.Event} ev \u4e8b\u4ef6\u5bf9\u8c61 + */ + handleNavUp : function (ev) { + var _self = this, + upperItem = _self._getUpperItem(); + _self.setHighlighted(upperItem); + }, + /** + * \u5904\u7406\u5411\u4e0b\u5bfc\u822a + * @protected + * @param {jQuery.Event} ev \u4e8b\u4ef6\u5bf9\u8c61 + */ + handleNavDown : function (ev) { + this.setHighlighted(this._getDownItem()); + }, + /** + * \u5904\u7406\u5411\u5de6\u5bfc\u822a + * @protected + * @param {jQuery.Event} ev \u4e8b\u4ef6\u5bf9\u8c61 + */ + handleNavLeft : function (ev) { + this.setHighlighted(this._getLeftItem()); + }, + + /** + * \u5904\u7406\u5411\u53f3\u5bfc\u822a + * @protected + * @param {jQuery.Event} ev \u4e8b\u4ef6\u5bf9\u8c61 + */ + handleNavRight : function (ev) { + this.setHighlighted(this._getRightItem()); + }, + /** + * \u5904\u7406\u786e\u8ba4\u952e + * @protected + * @param {jQuery.Event} ev \u4e8b\u4ef6\u5bf9\u8c61 + */ + handleNavEnter : function (ev) { + var _self = this, + current = _self._getCurrentItem(); + if(current){ + _self.setSelected(current); + } + }, + /** + * \u5904\u7406 esc \u952e + * @protected + * @param {jQuery.Event} ev \u4e8b\u4ef6\u5bf9\u8c61 + */ + handleNavEsc : function (ev) { + this.setHighlighted(null); //\u79fb\u9664 + }, + /** + * \u5904\u7406Tab\u952e + * @param {jQuery.Event} ev \u4e8b\u4ef6\u5bf9\u8c61 + */ + handleNavTab : function(ev){ + this.setHighlighted(this._getRightItem()); + } + + }); + + return KeyNav; +});/** + * @fileOverview \u7b80\u5355\u5217\u8868\uff0c\u76f4\u63a5\u4f7f\u7528DOM\u4f5c\u4e3a\u5217\u8868\u9879 + * @ignore + */ + +define('bui/list/simplelist',['bui/common','bui/list/domlist','bui/list/keynav'],function (require) { + + /** + * @name BUI.List + * @namespace \u5217\u8868\u547d\u540d\u7a7a\u95f4 + * @ignore + */ + var BUI = require('bui/common'), + UIBase = BUI.Component.UIBase, + DomList = require('bui/list/domlist'), + KeyNav = require('bui/list/keynav'), + CLS_ITEM = BUI.prefix + 'list-item'; + + /** + * @class BUI.List.SimpleListView + * \u7b80\u5355\u5217\u8868\u89c6\u56fe\u7c7b + * @extends BUI.Component.View + */ + var simpleListView = BUI.Component.View.extend([DomList.View],{ + + setElementHover : function(element,hover){ + var _self = this; + + _self.setItemStatusCls('hover',element,hover); + } + + },{ + ATTRS : { + itemContainer : { + valueFn : function(){ + return this.get('el').find(this.get('listSelector')); + } + } + } + },{ + xclass:'simple-list-view' + }); + + /** + * \u7b80\u5355\u5217\u8868\uff0c\u7528\u4e8e\u663e\u793a\u7b80\u5355\u6570\u636e + *

          + * + *

          + * xclass:'simple-list' + * ## \u663e\u793a\u9759\u6001\u6570\u7ec4\u7684\u6570\u636e + * + * ** \u6700\u7b80\u5355\u7684\u5217\u8868 ** + *
          
          +   * 
          +   * BUI.use('bui/list',function(List){
          +   *   var list = new List.SimpleList({
          +   *     render : '#t1',
          +   *     items : [{value : '1',text : '1'},{value : '2',text : '2'}]
          +   *   });
          +   *   list.render();
          +   * });
          +   * 
          +   * 
          + * + * ** \u81ea\u5b9a\u4e49\u6a21\u677f\u7684\u5217\u8868 ** + *
          
          +   * 
          +   * BUI.use('bui/list',function(List){
          +   *   var list = new List.SimpleList({
          +   *     render : '#t1',
          +   *     items : [{value : '1',text : '1'},{value : '2',text : '2'}]
          +   *   });
          +   *   list.render();
          +   * });
          +   * 
          +   * 
          + * + * @class BUI.List.SimpleList + * @extends BUI.Component.Controller + * @mixins BUI.List.DomList + * @mixins BUI.List.KeyNav + * @mixins BUI.Component.UIBase.Bindable + */ + var simpleList = BUI.Component.Controller.extend([DomList,UIBase.Bindable,KeyNav], + /** + * @lends BUI.List.SimpleList.prototype + * @ignore + */ + { + /** + * @protected + * @ignore + */ + bindUI : function(){ + var _self = this, + itemCls = _self.get('itemCls'), + itemContainer = _self.get('view').getItemContainer(); + + itemContainer.delegate('.'+itemCls,'mouseover',function(ev){ + var element = ev.currentTarget, + item = _self.getItemByElement(element); + if(_self.isItemDisabled(ev.item,ev.currentTarget)){ //\u5982\u679c\u7981\u7528 + return; + } + + if(_self.get('highlightedStatus') === 'hover'){ + _self.setHighlighted(item,element) + }else{ + _self.setItemStatus(item,'hover',true,element); + } + }).delegate('.'+itemCls,'mouseout',function(ev){ + var sender = $(ev.currentTarget); + _self.get('view').setElementHover(sender,false); + }); + }, + /** + * \u6dfb\u52a0 + * @protected + */ + onAdd : function(e){ + var _self = this, + item = e.record; + _self.addItemToView(item,e.index); + }, + /** + * \u5220\u9664 + * @protected + */ + onRemove : function(e){ + var _self = this, + item = e.record; + _self.removeItem(item); + }, + /** + * \u66f4\u65b0 + * @protected + */ + onUpdate : function(e){ + this.updateItem(e.record); + }, + /** + * \u672c\u5730\u6392\u5e8f + * @protected + */ + onLocalSort : function(e){ + this.onLoad(e); + }, + /** + * \u52a0\u8f7d\u6570\u636e + * @protected + */ + onLoad:function(){ + var _self = this, + store = _self.get('store'), + items = store.getResult(); + _self.set('items',items); + } + },{ + ATTRS : + /** + * @lends BUI.List.SimpleList# + * @ignore + */ + { + /** + * \u9009\u9879\u96c6\u5408 + * @protected + * @type {Array} + */ + items : { + view:true, + value : [] + }, + /** + * \u9009\u9879\u7684\u6837\u5f0f\uff0c\u7528\u6765\u83b7\u53d6\u5b50\u9879 + *
          
          +       * var list = new List.SimpleList({
          +       *   render : '#t1',
          +       *   itemCls : 'my-item', //\u81ea\u5b9a\u4e49\u6837\u5f0f\u540d\u79f0
          +       *   items : [{id : '1',text : '1',type : '0'},{id : '2',text : '2',type : '1'}]
          +       * });
          +       * list.render();
          +       * 
          + * @cfg {Object} [itemCl='list-item'] + */ + itemCls : { + view:true, + value : CLS_ITEM + }, + /** + * \u9009\u9879\u7684\u9ed8\u8ba4id\u5b57\u6bb5 + *
          
          +       * var list = new List.SimpleList({
          +       *   render : '#t1',
          +       *   idField : 'id', //\u81ea\u5b9a\u4e49\u9009\u9879 id \u5b57\u6bb5
          +       *   items : [{id : '1',text : '1',type : '0'},{id : '2',text : '2',type : '1'}]
          +       * });
          +       * list.render();
          +       *
          +       * list.getItem('1'); //\u4f7f\u7528idField\u6307\u5b9a\u7684\u5b57\u6bb5\u8fdb\u884c\u67e5\u627e
          +       * 
          + * @cfg {String} [idField = 'value'] + */ + idField : { + value : 'value' + }, + /** + * \u5217\u8868\u7684\u9009\u62e9\u5668\uff0c\u5c06\u5217\u8868\u9879\u9644\u52a0\u5230\u6b64\u8282\u70b9 + * @protected + * @type {Object} + */ + listSelector:{ + view:true, + value:'ul' + }, + /** + * \u5217\u8868\u9879\u7684\u9ed8\u8ba4\u6a21\u677f\u3002 + *
          
          +       * var list = new List.SimpleList({
          +       *   itemTpl : '<li id="{value}">{text}</li>', //\u5217\u8868\u9879\u7684\u6a21\u677f
          +       *   idField : 'value',
          +       *   render : '#t1',
          +       *   items : [{value : '1',text : '1'},{value : '2',text : '2'}]
          +       * });
          +       * list.render();
          +       * 
          + * @cfg {String} [itemTpl ='<li role="option" class="bui-list-item" data-value="{value}">{text}</li>'] + */ + + itemTpl :{ + view : true, + value : '
        • {text}
        • ' + }, + tpl : { + value:'
            ' + }, + xview:{ + value : simpleListView + } + } + },{ + xclass : 'simple-list', + prority : 0 + }); + + simpleList.View = simpleListView; + return simpleList; +});/** + * @fileOverview \u53ef\u9009\u62e9\u7684\u5217\u8868 + * @author dengbin + * @ignore + */ + +define('bui/list/listbox',['bui/list/simplelist'],function (require) { + var SimpleList = require('bui/list/simplelist'); + /** + * \u5217\u8868\u9009\u62e9\u6846 + * @extends BUI.List.SimpleList + * @class BUI.List.Listbox + */ + var listbox = SimpleList.extend({ + bindUI : function(){ + var _self = this; + + _self.on('selectedchange',function(e){ + var item = e.item, + sender = $(e.domTarget), + checkbox =sender.find('input'); + if(item){ + checkbox.attr('checked',e.selected); + } + }); + } + },{ + ATTRS : { + /** + * \u9009\u9879\u6a21\u677f + * @override + * @type {String} + */ + itemTpl : { + value : '
          • {text}
          • ' + }, + /** + * \u9009\u9879\u6a21\u677f + * @override + * @type {Boolean} + */ + multipleSelect : { + value : true + } + } + },{ + xclass: 'listbox' + }); + + return listbox; +});/** + * @fileOverview \u5217\u8868\u9879 + * @author dxq613@gmail.com + * @ignore + */ +define('bui/list/listitem',function ($) { + + + var Component = BUI.Component, + UIBase = Component.UIBase; + + /** + * @private + * @class BUI.List.ItemView + * @extends BUI.Component.View + * @extends BUI.Component.View + * @mixins BUI.Component.UIBase.ListItemView + * \u5217\u8868\u9879\u7684\u89c6\u56fe\u5c42\u5bf9\u8c61 + */ + var itemView = Component.View.extend([UIBase.ListItemView],{ + }); + + /** + * \u5217\u8868\u9879 + * @private + * @class BUI.List.ListItem + * @extends BUI.Component.Controller + * @mixins BUI.Component.UIBase.ListItem + */ + var item = Component.Controller.extend([UIBase.ListItem],{ + + },{ + ATTRS : + /** + * @lends BUI.List.Item# + * @ignore + */ + { + elTagName:{ + view:true, + value:'li' + }, + xview:{ + value:itemView + }, + tpl:{ + view:true, + value:'{text}' + } + } + },{ + xclass:'list-item' + }); + + item.View = itemView; + + return item; +});/** + * @fileOverview \u5217\u8868 + * @ignore + */ +define('bui/list/list',function (require) { + + var Component = BUI.Component, + UIBase = Component.UIBase; + + /** + * \u5217\u8868 + *

            + * + *

            + * xclass:'list' + * @class BUI.List.List + * @extends BUI.Component.Controller + * @mixins BUI.Component.UIBase.ChildList + */ + var list = Component.Controller.extend([UIBase.ChildList],{ + + },{ + ATTRS : + /** + * @lends BUI.List.List# + * @ignore + */ + { + elTagName:{ + view:true, + value:'ul' + }, + idField:{ + value:'id' + }, + /** + * \u5b50\u7c7b\u7684\u9ed8\u8ba4\u7c7b\u540d\uff0c\u5373\u7c7b\u7684 xclass + * @type {String} + * @override + * @default 'list-item' + */ + defaultChildClass : { + value : 'list-item' + } + } + },{ + xclass:'list' + }); + + return list; +});/** + * @fileOverview Picker\u7684\u5165\u53e3 + * @author dxq613@gmail.com + * @ignore + */ + +define('bui/picker',['bui/common','bui/picker/picker','bui/picker/listpicker'],function (require) { + var BUI = require('bui/common'), + Picker = BUI.namespace('Picker'); + + BUI.mix(Picker,{ + Picker : require('bui/picker/picker'), + ListPicker : require('bui/picker/listpicker') + }); + + return Picker; +});/** + * @fileOverview \u9009\u62e9\u5668 + * @ignore + */ + +define('bui/picker/picker',['bui/overlay'],function (require) { + + var Overlay = require('bui/overlay').Overlay; + + /** + * \u9009\u62e9\u5668\u63a7\u4ef6\u7684\u57fa\u7c7b\uff0c\u5f39\u51fa\u4e00\u4e2a\u5c42\u6765\u9009\u62e9\u6570\u636e\uff0c\u4e0d\u8981\u4f7f\u7528\u6b64\u7c7b\u521b\u5efa\u63a7\u4ef6\uff0c\u4ec5\u7528\u4e8e\u7ee7\u627f\u5b9e\u73b0\u63a7\u4ef6 + * xclass : 'picker' + *
            
            +   * BUI.use(['bui/picker','bui/list'],function(Picker,List){
            +   *
            +   * var items = [
            +   *       {text:'\u9009\u98791',value:'a'},
            +   *       {text:'\u9009\u98792',value:'b'},
            +   *      {text:'\u9009\u98793',value:'c'}
            +   *     ],
            +   *   list = new List.SimpleList({
            +   *     elCls:'bui-select-list',
            +   *     items : items
            +   *   }),
            +   *   picker = new Picker.ListPicker({
            +   *     trigger : '#show',  
            +   *     valueField : '#hide', //\u5982\u679c\u9700\u8981\u5217\u8868\u8fd4\u56de\u7684value\uff0c\u653e\u5728\u9690\u85cf\u57df\uff0c\u90a3\u4e48\u6307\u5b9a\u9690\u85cf\u57df
            +   *     width:100,  //\u6307\u5b9a\u5bbd\u5ea6
            +   *     children : [list] //\u914d\u7f6epicker\u5185\u7684\u5217\u8868
            +   *   });
            +   * picker.render();
            +   * });
            +   * 
            + * @abstract + * @class BUI.Picker.Picker + * @extends BUI.Overlay.Overlay + */ + var picker = Overlay.extend({ + + bindUI : function(){ + var _self = this, + innerControl = _self.get('innerControl'), + hideEvent = _self.get('hideEvent'), + trigger = $(_self.get('trigger')); + + trigger.on(_self.get('triggerEvent'),function(e){ + if(_self.get('autoSetValue')){ + var valueField = _self.get('valueField') || _self.get('textField') || this, + val = $(valueField).val(); + _self.setSelectedValue(val); + } + }); + + innerControl.on(_self.get('changeEvent'),function(e){ + var curTrigger = _self.get('curTrigger'), + textField = _self.get('textField') || curTrigger, + valueField = _self.get('valueField'), + selValue = _self.getSelectedValue(), + isChange = false; + + if(textField){ + var selText = _self.getSelectedText(), + preText = $(textField).val(); + if(selText != preText){ + $(textField).val(selText); + isChange = true; + } + } + + if(valueField){ + var preValue = $(valueField).val(); + if(valueField != preValue){ + $(valueField).val(selValue); + isChange = true; + } + } + if(isChange){ + _self.onChange(selText,selValue,e); + } + }); + if(hideEvent){ + innerControl.on(_self.get('hideEvent'),function(){ + var curTrigger = _self.get('curTrigger'); + try{ //\u9690\u85cf\u65f6\uff0c\u5728ie6,7\u4e0b\u4f1a\u62a5\u9519 + if(curTrigger){ + curTrigger.focus(); + } + }catch(e){ + BUI.log(e); + } + _self.hide(); + }); + } + }, + /** + * \u8bbe\u7f6e\u9009\u4e2d\u7684\u503c + * @template + * @protected + * @param {String} val \u8bbe\u7f6e\u503c + */ + setSelectedValue : function(val){ + + }, + /** + * \u83b7\u53d6\u9009\u4e2d\u7684\u503c\uff0c\u591a\u9009\u72b6\u6001\u4e0b\uff0c\u503c\u4ee5','\u5206\u5272 + * @template + * @protected + * @return {String} \u9009\u4e2d\u7684\u503c + */ + getSelectedValue : function(){ + + }, + /** + * \u83b7\u53d6\u9009\u4e2d\u9879\u7684\u6587\u672c\uff0c\u591a\u9009\u72b6\u6001\u4e0b\uff0c\u6587\u672c\u4ee5','\u5206\u5272 + * @template + * @protected + * @return {String} \u9009\u4e2d\u7684\u6587\u672c + */ + getSelectedText : function(){ + + }, + /** + * @protected + * \u53d1\u751f\u6539\u53d8 + */ + onChange : function(selText,selValue,ev){ + var _self = this, + curTrigger = _self.get('curTrigger'); + _self.fire('selectedchange',{value : selValue,text : selText,curTrigger : curTrigger}); + }, + _uiSetValueField : function(v){ + var _self = this; + if(v){ + _self.setSelectedValue($(v).val()); + } + }, + _getTextField : function(){ + var _self = this; + return _self.get('textField') || _self.get('curTrigger'); + } + },{ + ATTRS : { + + /** + * \u7528\u4e8e\u9009\u62e9\u7684\u63a7\u4ef6\uff0c\u9ed8\u8ba4\u4e3a\u7b2c\u4e00\u4e2a\u5b50\u5143\u7d20,\u6b64\u63a7\u4ef6\u5b9e\u73b0 @see {BUI.Component.UIBase.Selection} \u63a5\u53e3 + * @protected + * @type {Object|BUI.Component.Controller} + */ + innerControl : { + getter:function(){ + return this.get('children')[0]; + } + }, + /** + * \u663e\u793a\u9009\u62e9\u5668\u7684\u4e8b\u4ef6 + * @cfg {String} [triggerEvent='click'] + */ + /** + * \u663e\u793a\u9009\u62e9\u5668\u7684\u4e8b\u4ef6 + * @type {String} + * @default 'click' + */ + triggerEvent:{ + value:'click' + }, + /** + * \u9009\u62e9\u5668\u9009\u4e2d\u7684\u9879\uff0c\u662f\u5426\u968f\u7740\u89e6\u53d1\u5668\u6539\u53d8 + * @cfg {Boolean} [autoSetValue=true] + */ + /** + * \u9009\u62e9\u5668\u9009\u4e2d\u7684\u9879\uff0c\u662f\u5426\u968f\u7740\u89e6\u53d1\u5668\u6539\u53d8 + * @type {Boolean} + */ + autoSetValue : { + value : true + }, + /** + * \u9009\u62e9\u53d1\u751f\u6539\u53d8\u7684\u4e8b\u4ef6 + * @cfg {String} [changeEvent='selectedchange'] + */ + /** + * \u9009\u62e9\u53d1\u751f\u6539\u53d8\u7684\u4e8b\u4ef6 + * @type {String} + */ + changeEvent : { + value:'selectedchange' + }, + /** + * \u81ea\u52a8\u9690\u85cf + * @type {Boolean} + * @override + */ + autoHide:{ + value : true + }, + /** + * \u9690\u85cf\u9009\u62e9\u5668\u7684\u4e8b\u4ef6 + * @protected + * @type {String} + */ + hideEvent:{ + value:'itemclick' + }, + /** + * \u8fd4\u56de\u7684\u6587\u672c\u653e\u5728\u7684DOM\uff0c\u4e00\u822c\u662finput + * @cfg {String|HTMLElement|jQuery} textField + */ + /** + * \u8fd4\u56de\u7684\u6587\u672c\u653e\u5728\u7684DOM\uff0c\u4e00\u822c\u662finput + * @type {String|HTMLElement|jQuery} + */ + textField : { + + }, + align : { + value : { + points: ['bl','tl'], // ['tr', 'tl'] \u8868\u793a overlay \u7684 tl \u4e0e\u53c2\u8003\u8282\u70b9\u7684 tr \u5bf9\u9f50 + offset: [0, 0] // \u6709\u6548\u503c\u4e3a [n, m] + } + }, + /** + * \u8fd4\u56de\u7684\u503c\u653e\u7f6eDOM ,\u4e00\u822c\u662finput + * @cfg {String|HTMLElement|jQuery} valueField + */ + /** + * \u8fd4\u56de\u7684\u503c\u653e\u7f6eDOM ,\u4e00\u822c\u662finput + * @type {String|HTMLElement|jQuery} + */ + valueField:{ + + } + /** + * @event selectedchange + * \u9009\u4e2d\u503c\u6539\u53d8\u4e8b\u4ef6 + * @param {Object} e \u4e8b\u4ef6\u5bf9\u8c61 + * @param {String} text \u9009\u4e2d\u7684\u6587\u672c + * @param {string} value \u9009\u4e2d\u7684\u503c + * @param {jQuery} curTrigger \u5f53\u524d\u89e6\u53d1picker\u7684\u5143\u7d20 + */ + } + },{ + xclass:'picker' + }); + + return picker; +});/** + * @fileOverview \u5217\u8868\u9879\u7684\u9009\u62e9\u5668 + * @ignore + */ + +define('bui/picker/listpicker',['bui/picker/picker','bui/list'],function (require) { + + var List = require('bui/list'), + Picker = require('bui/picker/picker'), + /** + * \u5217\u8868\u9009\u62e9\u5668,xclass = 'list-picker' + *
            
            +     * BUI.use(['bui/picker'],function(Picker){
            +     *
            +     * var items = [
            +     *       {text:'\u9009\u98791',value:'a'},
            +     *       {text:'\u9009\u98792',value:'b'},
            +     *      {text:'\u9009\u98793',value:'c'}
            +     *     ],
            +     *   picker = new Picker.ListPicker({
            +     *     trigger : '#show',  
            +     *     valueField : '#hide', //\u5982\u679c\u9700\u8981\u5217\u8868\u8fd4\u56de\u7684value\uff0c\u653e\u5728\u9690\u85cf\u57df\uff0c\u90a3\u4e48\u6307\u5b9a\u9690\u85cf\u57df
            +     *     width:100,  //\u6307\u5b9a\u5bbd\u5ea6
            +     *     children : [{
            +     *        elCls:'bui-select-list',
            +     *        items : items
            +     *     }] //\u914d\u7f6epicker\u5185\u7684\u5217\u8868
            +     *   });
            +     * picker.render();
            +     * });
            +     * 
            + * @class BUI.Picker.ListPicker + * @extends BUI.Picker.Picker + */ + listPicker = Picker.extend({ + initializer : function(){ + var _self = this, + children = _self.get('children'), + list = _self.get('list'); + if(!list){ + children.push({ + + }); + } + }, + /** + * \u8bbe\u7f6e\u9009\u4e2d\u7684\u503c + * @override + * @protected + * @param {String} val \u8bbe\u7f6e\u503c + */ + setSelectedValue : function(val){ + val = val ? val.toString() : ''; + var _self = this, + list = _self.get('list'), + selectedValue = _self.getSelectedValue(); + if(val !== selectedValue && list.getCount()){ + if(list.get('multipleSelect')){ + list.clearSelection(); + } + list.setSelectionByField(val.split(',')); + } + }, + /** + * @protected + * @ignore + */ + onChange : function(selText,selValue,ev){ + var _self = this, + curTrigger = _self.get('curTrigger'); + _self.fire('selectedchange',{value : selValue,text : selText,curTrigger : curTrigger,item : ev.item}); + }, + /** + * \u83b7\u53d6\u9009\u4e2d\u7684\u503c\uff0c\u591a\u9009\u72b6\u6001\u4e0b\uff0c\u503c\u4ee5','\u5206\u5272 + * @protected + * @return {String} \u9009\u4e2d\u7684\u503c + */ + getSelectedValue : function(){ + return this.get('list').getSelectionValues().join(','); + }, + /** + * \u83b7\u53d6\u9009\u4e2d\u9879\u7684\u6587\u672c\uff0c\u591a\u9009\u72b6\u6001\u4e0b\uff0c\u6587\u672c\u4ee5','\u5206\u5272 + * @protected + * @return {String} \u9009\u4e2d\u7684\u6587\u672c + */ + getSelectedText : function(){ + return this.get('list').getSelectionText().join(','); + } + },{ + ATTRS : { + /** + * \u9ed8\u8ba4\u5b50\u63a7\u4ef6\u7684\u6837\u5f0f,\u9ed8\u8ba4\u4e3a'simple-list' + * @type {String} + * @override + */ + defaultChildClass:{ + value : 'simple-list' + }, + /** + * \u9009\u62e9\u7684\u5217\u8868 + *
            
            +         *  var list = picker.get('list');
            +         *  list.getSelected();
            +         * 
            + * @type {BUI.List.SimpleList} + * @readOnly + */ + list : { + getter:function(){ + return this.get('children')[0]; + } + } + /** + * @event selectedchange + * \u9009\u62e9\u53d1\u751f\u6539\u53d8\u4e8b\u4ef6 + * @param {Object} e \u4e8b\u4ef6\u5bf9\u8c61 + * @param {String} e.text \u9009\u4e2d\u7684\u6587\u672c + * @param {string} e.value \u9009\u4e2d\u7684\u503c + * @param {Object} e.item \u53d1\u751f\u6539\u53d8\u7684\u9009\u9879 + * @param {jQuery} e.curTrigger \u5f53\u524d\u89e6\u53d1picker\u7684\u5143\u7d20 + */ + } + },{ + xclass : 'list-picker' + }); + + return listPicker; +});/** + * @fileOverview form \u547d\u540d\u7a7a\u95f4\u5165\u53e3 + * @ignore + */ +;(function(){ +var BASE = 'bui/form/'; +define('bui/form',['bui/common',BASE + 'fieldcontainer',BASE + 'form',BASE + 'row',BASE + 'fieldgroup',BASE + 'horizontal',BASE + 'rules',BASE + 'field',BASE + 'fieldgroup'],function (r) { + var BUI = r('bui/common'), + Form = BUI.namespace('Form'), + Tips = r(BASE + 'tips'); + + BUI.mix(Form,{ + Tips : Tips, + TipItem : Tips.Item, + FieldContainer : r(BASE + 'fieldcontainer'), + Form : r(BASE + 'form'), + Row : r(BASE + 'row'), + Group : r(BASE + 'fieldgroup'), + HForm : r(BASE + 'horizontal'), + Rules : r(BASE + 'rules'), + Field : r(BASE + 'field'), + FieldGroup : r(BASE + 'fieldgroup') + }); + return Form; +}); +})(); +/** + * @fileOverview \u8f93\u5165\u63d0\u793a\u4fe1\u606f + * @author dxq613@gmail.com + * @ignore + */ + +define('bui/form/tips',['bui/common','bui/overlay'],function (require) { + + var BUI = require('bui/common'), + prefix = BUI.prefix, + Overlay = require('bui/overlay').Overlay, + FIELD_TIP = 'data-tip', + CLS_TIP_CONTAINER = prefix + 'form-tip-container'; + + /** + * \u8868\u5355\u63d0\u793a\u4fe1\u606f\u7c7b + * xclass:'form-tip' + * @class BUI.Form.TipItem + * @extends BUI.Overlay.Overlay + */ + var tipItem = Overlay.extend( + /** + * @lends BUI.Form.TipItem.prototype + * @ignore + */ + { + initializer : function(){ + var _self = this, + render = _self.get('render'); + if(!render){ + var parent = $(_self.get('trigger')).parent(); + _self.set('render',parent); + } + }, + renderUI : function(){ + var _self = this; + + _self.resetVisible(); + + }, + /** + * \u91cd\u7f6e\u662f\u5426\u663e\u793a + */ + resetVisible : function(){ + var _self = this, + triggerEl = $(_self.get('trigger')); + + if(triggerEl.val()){//\u5982\u679c\u9ed8\u8ba4\u6709\u6587\u672c\u5219\u4e0d\u663e\u793a\uff0c\u5426\u5219\u663e\u793a + _self.set('visible',false); + }else{ + _self.set('align',{ + node:$(_self.get('trigger')), + points: ['cl','cl'] + }); + _self.set('visible',true); + } + }, + bindUI : function(){ + var _self = this, + triggerEl = $(_self.get('trigger')); + + _self.get('el').on('click',function(){ + _self.hide(); + triggerEl.focus(); + }); + triggerEl.on('click focus',function(){ + _self.hide(); + }); + + triggerEl.on('blur',function(){ + _self.resetVisible(); + }); + } + },{ + ATTRS : + /** + * @lends BUI.Form.TipItem# + * @ignore + */ + { + /** + * \u63d0\u793a\u7684\u8f93\u5165\u6846 + * @cfg {String|HTMLElement|jQuery} trigger + */ + /** + * \u63d0\u793a\u7684\u8f93\u5165\u6846 + * @type {String|HTMLElement|jQuery} + */ + trigger:{ + + }, + /** + * \u63d0\u793a\u6587\u672c + * @cfg {String} text + */ + /** + * \u63d0\u793a\u6587\u672c + * @type {String} + */ + text : { + + }, + /** + * \u63d0\u793a\u6587\u672c\u4e0a\u663e\u793a\u7684icon\u6837\u5f0f + * @cfg {String} iconCls + * iconCls : icon-ok + */ + /** + * \u63d0\u793a\u6587\u672c\u4e0a\u663e\u793a\u7684icon\u6837\u5f0f + * @type {String} + * iconCls : icon-ok + */ + iconCls:{ + + }, + /** + * \u9ed8\u8ba4\u7684\u6a21\u7248 + * @type {String} + * @default '{text}' + */ + tpl:{ + value:'{text}' + } + } + },{ + xclass : 'form-tip' + }); + + /** + * \u8868\u5355\u63d0\u793a\u4fe1\u606f\u7684\u7ba1\u7406\u7c7b + * @class BUI.Form.Tips + * @extends BUI.Base + */ + var Tips = function(config){ + if (this.constructor !== Tips){ + return new Tips(config); + } + + Tips.superclass.constructor.call(this,config); + this._init(); + }; + + Tips.ATTRS = + /** + * @lends BUI.Form.Tips + * @ignore + */ + { + + /** + * \u8868\u5355\u7684\u9009\u62e9\u5668 + * @cfg {String|HTMLElement|jQuery} form + */ + /** + * \u8868\u5355\u7684\u9009\u62e9\u5668 + * @type {String|HTMLElement|jQuery} + */ + form : { + + }, + /** + * \u8868\u5355\u63d0\u793a\u9879\u5bf9\u8c61 {@link BUI.Form.TipItem} + * @readOnly + * @type {Array} + */ + items : { + value:[] + } + }; + + BUI.extend(Tips,BUI.Base); + + BUI.augment(Tips,{ + _init : function(){ + var _self = this, + form = $(_self.get('form')); + if(form.length){ + BUI.each($.makeArray(form[0].elements),function(elem){ + var tipConfig = $(elem).attr(FIELD_TIP); + if(tipConfig){ + _self._initFormElement(elem,$.parseJSON(tipConfig)); + } + }); + form.addClass(CLS_TIP_CONTAINER); + } + }, + _initFormElement : function(element,config){ + if(config){ + config.trigger = element; + //config.render = this.get('form'); + } + var _self = this, + items = _self.get('items'), + item = new tipItem(config); + items.push(item); + }, + /** + * \u83b7\u53d6\u63d0\u793a\u9879 + * @param {String} name \u5b57\u6bb5\u7684\u540d\u79f0 + * @return {BUI.Form.TipItem} \u63d0\u793a\u9879 + */ + getItem : function(name){ + var _self = this, + items = _self.get('items'), + result = null; + BUI.each(items,function(item){ + + if($(item.get('trigger')).attr('name') === name){ + result = item; + return false; + } + + }); + + return result; + }, + /** + * \u91cd\u7f6e\u6240\u6709\u63d0\u793a\u7684\u53ef\u89c6\u72b6\u6001 + */ + resetVisible : function(){ + var _self = this, + items = _self.get('items'); + + BUI.each(items,function(item){ + item.resetVisible(); + }); + }, + /** + * \u751f\u6210 \u8868\u5355\u63d0\u793a + */ + render:function(){ + var _self = this, + items = _self.get('items'); + BUI.each(items,function(item){ + item.render(); + }); + }, + /** + * \u5220\u9664\u6240\u6709\u63d0\u793a + */ + destroy:function(){ + var _self = this, + items = _self.get(items); + + BUI.each(items,function(item){ + item.destroy(); + }); + } + }); + + Tips.Item = tipItem; + return Tips; + +});/** + * @fileOverview \u8868\u5355\u5143\u7d20 + * @ignore + */ + +define('bui/form/basefield',['bui/common','bui/form/tips','bui/form/valid','bui/form/remote'],function (require){ + + var BUI = require('bui/common'), + Component = BUI.Component, + TipItem = require('bui/form/tips').Item, + Valid = require('bui/form/valid'), + Remote = require('bui/form/remote'), + CLS_FIELD_ERROR = BUI.prefix + 'form-field-error', + DATA_ERROR = 'data-error'; + + /** + * \u5b57\u6bb5\u89c6\u56fe\u7c7b + * @class BUI.Form.FieldView + * @private + */ + var fieldView = Component.View.extend([Remote.View,Valid.View],{ + //\u6e32\u67d3DOM + renderUI : function(){ + var _self = this, + control = _self.get('control'); + if(!control){ + var controlTpl = _self.get('controlTpl'), + container = _self.getControlContainer(); + + if(controlTpl){ + var control = $(controlTpl).appendTo(container); + _self.set('control',control); + } + }else{ + //var controlContainer = control.parent(); + _self.set('controlContainer',control.parent()); + } + }, + /** + * \u6e05\u7406\u663e\u793a\u7684\u9519\u8bef\u4fe1\u606f + * @protected + */ + clearErrors : function(){ + var _self = this, + msgEl = _self.get('msgEl'); + if(msgEl){ + msgEl.remove(); + _self.set('msgEl',null); + } + _self.get('el').removeClass(CLS_FIELD_ERROR); + }, + /** + * \u663e\u793a\u9519\u8bef\u4fe1\u606f + * @param {String} msg \u9519\u8bef\u4fe1\u606f + * @protected + */ + showError : function(msg,errorTpl){ + var _self = this, + control = _self.get('control'), + errorMsg = BUI.substitute(errorTpl,{error : msg}), + el = $(errorMsg); + //_self.clearErrorMsg(); + + el.appendTo(control.parent()); + _self.set('msgEl',el); + _self.get('el').addClass(CLS_FIELD_ERROR); + }, + /** + * @internal \u83b7\u53d6\u63a7\u4ef6\u7684\u5bb9\u5668 + * @return {jQuery} \u63a7\u4ef6\u5bb9\u5668 + */ + getControlContainer : function(){ + var _self = this, + el = _self.get('el'), + controlContainer = _self.get('controlContainer'); + if(controlContainer){ + if(BUI.isString(controlContainer)){ + return el.find(controlContainer); + } + return controlContainer; + } + return el; + }, + /** + * \u83b7\u53d6\u663e\u793a\u52a0\u8f7d\u72b6\u6001\u7684\u5bb9\u5668 + * @protected + * @override + * @return {jQuery} \u52a0\u8f7d\u72b6\u6001\u7684\u5bb9\u5668 + */ + getLoadingContainer : function () { + return this.getControlContainer(); + }, + //\u8bbe\u7f6e\u540d\u79f0 + _uiSetName : function(v){ + var _self = this; + _self.get('control').attr('name',v); + } + }, + { + ATTRS : { + error:{}, + controlContainer : {}, + msgEl: {}, + control : {} + } + }); + + /** + * \u8868\u5355\u5b57\u6bb5\u57fa\u7c7b + * @class BUI.Form.Field + * @mixins BUI.Form.Remote + * @extends BUI.Component.Controller + */ + var field = Component.Controller.extend([Remote,Valid],{ + + initializer : function(){ + var _self = this; + _self.on('afterRenderUI',function(){ + var tip = _self.get('tip'); + if(tip){ + tip.trigger = _self.getTipTigger(); + tip.autoRender = true; + tip = new TipItem(tip); + _self.set('tip',tip); + } + }); + }, + //\u7ed1\u5b9a\u4e8b\u4ef6 + bindUI : function(){ + var _self = this, + validEvent = _self.get('validEvent'), + changeEvent = _self.get('changeEvent'), + innerControl = _self.getInnerControl(); + + //\u9009\u62e9\u6846\u53ea\u4f7f\u7528 select\u4e8b\u4ef6 + if(innerControl.is('select')){ + validEvent = 'change'; + } + //\u9a8c\u8bc1\u4e8b\u4ef6 + innerControl.on(validEvent,function(){ + var value = _self.getControlValue(innerControl); + _self.validControl(value); + }); + //\u672a\u53d1\u751f\u9a8c\u8bc1\u65f6\uff0c\u9996\u6b21\u83b7\u53d6\u7126\u70b9\uff0c\u8fdb\u884c\u9a8c\u8bc1 + innerControl.on('focus',function(){ + if(!_self.get('hasValid')){ + var value = _self.getControlValue(innerControl); + _self.validControl(value); + } + }); + + //\u672c\u6765\u662f\u76d1\u542c\u63a7\u4ef6\u7684change\u4e8b\u4ef6\uff0c\u4f46\u662f\uff0c\u5982\u679c\u63a7\u4ef6\u8fd8\u672a\u89e6\u53d1change,\u4f46\u662f\u901a\u8fc7get('value')\u6765\u53d6\u503c\uff0c\u5219\u4f1a\u51fa\u73b0\u9519\u8bef\uff0c + //\u6240\u4ee5\u5f53\u901a\u8fc7\u9a8c\u8bc1\u65f6\uff0c\u5373\u89e6\u53d1\u6539\u53d8\u4e8b\u4ef6 + _self.on(changeEvent,function(){ + _self.onValid(); + }); + + _self.on('remotecomplete',function (ev) { + _self._setError(ev.error); + }); + + }, + /** + * \u9a8c\u8bc1\u6210\u529f\u540e\u6267\u884c\u7684\u64cd\u4f5c + * @protected + */ + onValid : function(){ + var _self = this, + value = _self.getControlValue(); + + value = _self.parseValue(value); + if(!_self.isCurrentValue(value)){ + _self.setInternal('value',value); + _self.onChange(); + } + }, + onChange : function () { + this.fire('change'); + }, + /** + * @protected + * \u662f\u5426\u5f53\u524d\u503c\uff0c\u4e3b\u8981\u7528\u4e8e\u65e5\u671f\u7b49\u7279\u6b8a\u503c\u7684\u6bd4\u8f83\uff0c\u4e0d\u80fd\u7528 == \u8fdb\u884c\u6bd4\u8f83 + * @param {*} value \u8fdb\u884c\u6bd4\u8f83\u7684\u503c + * @return {Boolean} \u662f\u5426\u5f53\u524d\u503c + */ + isCurrentValue : function (value) { + return value == this.get('value'); + }, + //\u6e05\u7406\u9519\u8bef\u4fe1\u606f + _clearError : function(){ + this.set('error',null); + this.get('view').clearErrors(); + }, + //\u8bbe\u7f6e\u9519\u8bef\u4fe1\u606f + _setError : function(msg){ + this.set('error',msg); + this.showErrors(); + }, + + /** + * \u83b7\u53d6\u5185\u90e8\u8868\u5355\u5143\u7d20\u7684\u503c + * @protected + * @param {jQuery} [innerControl] \u5185\u90e8\u8868\u5355\u5143\u7d20 + * @return {String|Boolean} \u8868\u5355\u5143\u7d20\u7684\u503c,checkbox\uff0cradio\u7684\u8fd4\u56de\u503c\u4e3a true,false + */ + getControlValue : function(innerControl){ + var _self = this; + innerControl = innerControl || _self.getInnerControl(); + return innerControl.val(); + }, + /** + * @protected + * \u83b7\u53d6\u5185\u90e8\u63a7\u4ef6\u7684\u5bb9\u5668 + */ + getControlContainer : function(){ + return this.get('view').getControlContainer(); + }, + /** + * \u83b7\u53d6\u5f02\u6b65\u9a8c\u8bc1\u7684\u53c2\u6570\uff0c\u5bf9\u4e8e\u8868\u5355\u5b57\u6bb5\u57df\u800c\u8a00\uff0c\u662f{[name] : [value]} + * @protected + * @override + * @return {Object} \u53c2\u6570\u952e\u503c\u5bf9 + */ + getRemoteParams : function () { + var _self = this, + rst = {}; + rst[_self.get('name')] = _self.get('value'); + return rst; + }, + /** + * \u8bbe\u7f6e\u5b57\u6bb5\u7684\u503c + * @protected + * @param {*} value \u5b57\u6bb5\u503c + */ + setControlValue : function(value){ + var _self = this, + innerControl = _self.getInnerControl(); + innerControl.val(value); + }, + /** + * \u5c06\u5b57\u7b26\u4e32\u7b49\u683c\u5f0f\u8f6c\u6362\u6210 + * @protected + * @param {String} value \u539f\u59cb\u6570\u636e + * @return {*} \u8be5\u5b57\u6bb5\u6307\u5b9a\u7684\u7c7b\u578b + */ + parseValue : function(value){ + return value; + }, + valid : function(){ + var _self = this; + _self.validControl(); + }, + /** + * \u9a8c\u8bc1\u63a7\u4ef6\u5185\u5bb9 + * @return {Boolean} \u662f\u5426\u901a\u8fc7\u9a8c\u8bc1 + */ + validControl : function(value){ + var _self = this, + errorMsg; + value = value || _self.getControlValue(), + preError = _self.get('error'); + errorMsg = _self.getValidError(value); + _self.setInternal('hasValid',true); + if (errorMsg) { + _self._setError(errorMsg); + _self.fire('error', {msg:errorMsg, value:value}); + if(preError !== errorMsg){//\u9a8c\u8bc1\u9519\u8bef\u4fe1\u606f\u6539\u53d8\uff0c\u8bf4\u660e\u9a8c\u8bc1\u6539\u53d8 + _self.fire('validchange',{ valid : false }); + } + } else { + _self._clearError(); + _self.fire('valid'); + if(preError){//\u5982\u679c\u4ee5\u524d\u5b58\u5728\u9519\u8bef\uff0c\u90a3\u4e48\u9a8c\u8bc1\u7ed3\u679c\u6539\u53d8 + _self.fire('validchange',{ valid : true }); + } + } + + return !errorMsg; + }, + /** + * \u5b57\u6bb5\u83b7\u5f97\u7126\u70b9 + */ + focus : function(){ + this.getInnerControl().focus(); + }, + /** + * \u5b57\u6bb5\u53d1\u751f\u6539\u53d8 + */ + change : function(){ + var control = this.getInnerControl(); + control.change(); + }, + /** + * \u5b57\u6bb5\u4e22\u5931\u7126\u70b9 + */ + blur : function(){ + this.getInnerControl().blur(); + }, + + /** + * \u662f\u5426\u901a\u8fc7\u9a8c\u8bc1,\u5982\u679c\u672a\u53d1\u751f\u8fc7\u6821\u9a8c\uff0c\u5219\u8fdb\u884c\u6821\u9a8c\uff0c\u5426\u5219\u4e0d\u8fdb\u884c\u6821\u9a8c\uff0c\u76f4\u63a5\u6839\u636e\u5df2\u6821\u9a8c\u7684\u7ed3\u679c\u5224\u65ad\u3002 + * @return {Boolean} \u662f\u5426\u901a\u8fc7\u9a8c\u8bc1 + */ + isValid : function(){ + var _self = this; + if(!_self.get('hasValid')){ + _self.validControl(); + } + return !_self.get('error'); + }, + /** + * \u83b7\u53d6\u9a8c\u8bc1\u51fa\u9519\u4fe1\u606f + * @return {String} \u51fa\u9519\u4fe1\u606f + */ + getError : function(){ + return this.get('error'); + }, + /** + * \u83b7\u53d6\u9a8c\u8bc1\u51fa\u9519\u4fe1\u606f\u96c6\u5408 + * @return {Array} \u51fa\u9519\u4fe1\u606f\u96c6\u5408 + */ + getErrors : function(){ + var error = this.getError(); + if(error){ + return [error]; + } + return []; + }, + /** + * \u6e05\u7406\u51fa\u9519\u4fe1\u606f\uff0c\u56de\u6eda\u5230\u672a\u51fa\u9519\u72b6\u6001 + */ + clearErrors : function(){ + var _self = this; + _self._clearError(); + if(_self.getControlValue()!= _self.get('value')){ + _self.setControlValue(_self.get('value')); + } + }, + /** + * \u83b7\u53d6\u5185\u90e8\u7684\u8868\u5355\u5143\u7d20\u6216\u8005\u5185\u90e8\u63a7\u4ef6 + * @protected + * @return {jQuery|BUI.Component.Controller} + */ + getInnerControl : function(){ + return this.get('view').get('control'); + }, + /** + * \u63d0\u793a\u4fe1\u606f\u6309\u7167\u6b64\u5143\u7d20\u5bf9\u9f50 + * @protected + * @return {HTMLElement} + */ + getTipTigger : function(){ + return this.getInnerControl(); + }, + //\u6790\u6784\u51fd\u6570 + destructor : function(){ + var _self = this, + tip = _self.get('tip'); + if(tip && tip.destroy){ + tip.destroy(); + } + }, + /** + * @protected + * \u8bbe\u7f6e\u5185\u90e8\u5143\u7d20\u5bbd\u5ea6 + */ + setInnerWidth : function(width){ + var _self = this, + innerControl = _self.getInnerControl(), + appendWidth = innerControl.outerWidth() - innerControl.width(); + innerControl.width(width - appendWidth); + }, + //\u91cd\u7f6e \u63d0\u793a\u4fe1\u606f\u662f\u5426\u53ef\u89c1 + _resetTip :function(){ + var _self = this, + tip = _self.get('tip'); + if(tip){ + tip.resetVisible(); + } + }, + /** + * \u91cd\u7f6e\u663e\u793a\u63d0\u793a\u4fe1\u606f + * field.resetTip(); + */ + resetTip : function(){ + this._resetTip(); + }, + //\u8bbe\u7f6e\u503c + _uiSetValue : function(v){ + var _self = this; + //v = v ? v.toString() : ''; + _self.setControlValue(v); + if(_self.get('rendered')){ + _self.validControl(); + _self.onChange(); + } + _self._resetTip(); + }, + //\u7981\u7528\u63a7\u4ef6 + _uiSetDisabled : function(v){ + var _self = this, + innerControl = _self.getInnerControl(); + innerControl.attr('disabled',v); + if(_self.get('rendered')){ + if(v){//\u63a7\u4ef6\u4e0d\u53ef\u7528\uff0c\u6e05\u9664\u9519\u8bef + _self.clearErrors(); + } + if(!v){//\u63a7\u4ef6\u53ef\u7528\uff0c\u6267\u884c\u91cd\u65b0\u9a8c\u8bc1 + _self.valid(); + } + } + }, + _uiSetWidth : function(v){ + var _self = this; + if(v != null && _self.get('forceFit')){ + _self.setInnerWidth(v); + } + } + },{ + ATTRS : { + /** + * \u662f\u5426\u53d1\u751f\u8fc7\u6821\u9a8c\uff0c\u521d\u59cb\u503c\u4e3a\u7a7a\u65f6\uff0c\u672a\u8fdb\u884c\u8d4b\u503c\uff0c\u4e0d\u8fdb\u884c\u6821\u9a8c + * @type {Boolean} + */ + hasValid : { + value : false + }, + /** + * \u5185\u90e8\u5143\u7d20\u662f\u5426\u6839\u636e\u63a7\u4ef6\u5bbd\u5ea6\u8c03\u6574\u5bbd\u5ea6 + * @type {Boolean} + */ + forceFit : { + value : false + }, + /** + * \u662f\u5426\u663e\u793a\u63d0\u793a\u4fe1\u606f + * @type {Object} + */ + tip : { + + }, + /** + * \u8868\u5355\u5143\u7d20\u6216\u8005\u63a7\u4ef6\u5185\u5bb9\u6539\u53d8\u7684\u4e8b\u4ef6 + * @type {String} + */ + changeEvent : { + value : 'valid' + }, + /** + * \u8868\u5355\u5143\u7d20\u6216\u8005\u63a7\u4ef6\u89e6\u53d1\u6b64\u4e8b\u4ef6\u65f6\uff0c\u89e6\u53d1\u9a8c\u8bc1 + * @type {String} + */ + validEvent : { + value : 'keyup change' + }, + /** + * \u5b57\u6bb5\u7684name\u503c + * @type {Object} + */ + name : { + view :true + }, + /** + * \u662f\u5426\u663e\u793a\u9519\u8bef + * @type {Boolean} + */ + showError : { + view : true, + value : true + }, + /** + * \u5b57\u6bb5\u7684\u503c,\u7c7b\u578b\u6839\u636e\u5b57\u6bb5\u7c7b\u578b\u51b3\u5b9a + * @cfg {*} value + */ + value : { + view : true + }, + /** + * \u6807\u9898 + * @type {String} + */ + label : { + + }, + /** + * \u63a7\u4ef6\u5bb9\u5668\uff0c\u5982\u679c\u4e3a\u7a7a\u76f4\u63a5\u6dfb\u52a0\u5728\u63a7\u4ef6\u5bb9\u5668\u4e0a + * @type {String|HTMLElement} + */ + controlContainer : { + view : true + }, + /** + * \u5185\u90e8\u8868\u5355\u5143\u7d20\u7684\u63a7\u4ef6 + * @protected + * @type {jQuery} + */ + control : { + view : true + }, + /** + * \u5185\u90e8\u8868\u5355\u5143\u7d20\u7684\u5bb9\u5668 + * @type {String} + */ + controlTpl : { + view : true, + value : '' + }, + events: { + value : { + /** + * \u672a\u901a\u8fc7\u9a8c\u8bc1 + * @event + */ + error : false, + /** + * \u901a\u8fc7\u9a8c\u8bc1 + * @event + */ + valid : false, + /** + * @event + * \u503c\u6539\u53d8\uff0c\u4ec5\u5f53\u901a\u8fc7\u9a8c\u8bc1\u65f6\u89e6\u53d1 + */ + change : true, + + /** + * @event + * \u9a8c\u8bc1\u6539\u53d8 + * @param {Object} e \u4e8b\u4ef6\u5bf9\u8c61 + * @param {Object} e.target \u89e6\u53d1\u4e8b\u4ef6\u7684\u5bf9\u8c61 + * @param {Boolean} e.valid \u662f\u5426\u901a\u8fc7\u9a8c\u8bc1 + */ + validchange : true + } + }, + tpl: { + value : '' + }, + xview : { + value : fieldView + } + }, + PARSER : { + control : function(el){ + var control = el.find('input,select,textarea'); + if(control.length){ + return control; + } + return el; + }, + disabled : function(el){ + return !!el.attr('disabled'); + }, + value : function(el){ + var _self = this, + selector = 'select,input,textarea', + value = _self.get('value'); + if(!value){ + if(el.is(selector)){ + value = el.val(); + }else{ + value = el.find(selector).val(); + } + + } + return value; + }, + name : function(el){ + var _self = this, + selector = 'select,input,textarea', + name = _self.get('name'); + if(!name){ + if(el.is(selector)){ + name = el.attr('name'); + }else{ + name = el.find(selector).attr('name'); + } + + } + return name; + } + + } + },{ + xclass:'form-field' + }); + + field.View = fieldView; + + return field; + +});/** + * @fileOverview \u8868\u5355\u6587\u672c\u57df + * @author dxq613@gmail.com + * @ignore + */ + +define('bui/form/textfield',['bui/form/basefield'],function (require) { + var Field = require('bui/form/basefield'); + + /** + * \u8868\u5355\u6587\u672c\u57df + * @class BUI.Form.Field.Text + * @extends BUI.Form.Field + */ + var textField = Field.extend({ + + },{ + xclass : 'form-field-text' + }); + + return textField; +});/** + * @fileOverview \u8868\u5355\u6587\u672c\u57df + * @author dxq613@gmail.com + * @ignore + */ + +define('bui/form/numberfield',['bui/form/basefield'],function (require) { + + /** + * \u8868\u5355\u6570\u5b57\u57df + * @class BUI.Form.Field.Number + * @extends BUI.Form.Field + */ + var Field = require('bui/form/basefield'), + numberField = Field.extend({ + + /** + * \u5c06\u5b57\u7b26\u4e32\u7b49\u683c\u5f0f\u8f6c\u6362\u6210\u6570\u5b57 + * @protected + * @param {String} value \u539f\u59cb\u6570\u636e + * @return {Number} \u8be5\u5b57\u6bb5\u6307\u5b9a\u7684\u7c7b\u578b + */ + parseValue : function(value){ + if(value == '' || value == null){ + return null; + } + if(BUI.isNumber(value)){ + return value; + } + var _self = this, + allowDecimals = _self.get('allowDecimals'); + value = value.replace(/\,/g,''); + if(!allowDecimals){ + return parseInt(value); + } + return parseFloat(parseFloat(value).toFixed(_self.get('decimalPrecision'))); + }, + _uiSetMax : function(v){ + this.addRule('max',v); + }, + _uiSetMin : function(v){ + this.addRule('min',v); + } + },{ + ATTRS : { + /** + * \u6700\u5927\u503c + * @type {Number} + */ + max : { + + }, + /** + * \u6700\u5c0f\u503c + * @type {Number} + */ + min : { + + }, + decorateCfgFields : { + value : { + min : true, + max : true + } + }, + /** + * \u8868\u5355\u5143\u7d20\u6216\u8005\u63a7\u4ef6\u89e6\u53d1\u6b64\u4e8b\u4ef6\u65f6\uff0c\u89e6\u53d1\u9a8c\u8bc1 + * @type {String} + */ + validEvent : { + value : 'keyup change' + }, + defaultRules : { + value : { + number : true + } + }, + /** + * \u662f\u5426\u5141\u8bb8\u5c0f\u6570\uff0c\u5982\u679c\u4e0d\u5141\u8bb8\uff0c\u5219\u6700\u7ec8\u7ed3\u679c\u8f6c\u6362\u6210\u6574\u6570 + * @type {Boolean} + */ + allowDecimals : { + value : true + }, + /** + * \u5141\u8bb8\u5c0f\u6570\u65f6\u7684\uff0c\u5c0f\u6570\u4f4d + * @type {Number} + */ + decimalPrecision : { + value : 2 + }, + /** + * \u5bf9\u6570\u5b57\u8fdb\u884c\u5fae\u8c03\u65f6\uff0c\u6bcf\u6b21\u589e\u52a0\u6216\u51cf\u5c0f\u7684\u6570\u5b57 + * @type {Object} + */ + step : { + value : 1 + } + } + },{ + xclass : 'form-field-number' + }); + + return numberField; +});/** +* @fileOverview \u9690\u85cf\u5b57\u6bb5 +* @ignore +* @author dxq613@gmail.com +*/ + +define('bui/form/hiddenfield',['bui/form/basefield'],function (require) { + var Field = require('bui/form/basefield'); + /** + * \u8868\u5355\u9690\u85cf\u57df + * @class BUI.Form.Field.Hidden + * @extends BUI.Form.Field + */ + var hiddenField = Field.extend({ + + },{ + ATTRS : { + /** + * \u5185\u90e8\u8868\u5355\u5143\u7d20\u7684\u5bb9\u5668 + * @type {String} + */ + controlTpl : { + value : '' + }, + tpl : { + value : '' + } + } + },{ + xclass : 'form-field-hidden' + }); + + return hiddenField; + +});/** +* @fileOverview \u53ea\u8bfb\u5b57\u6bb5 +* @ignore +* @author dxq613@gmail.com +*/ + +define('bui/form/readonlyfield',['bui/form/basefield'],function (require) { + var Field = require('bui/form/basefield'); + /** + * \u8868\u5355\u9690\u85cf\u57df + * @class BUI.Form.Field.ReadOnly + * @extends BUI.Form.Field + */ + var readonlyField = Field.extend({ + + },{ + ATTRS : { + /** + * \u5185\u90e8\u8868\u5355\u5143\u7d20\u7684\u5bb9\u5668 + * @type {String} + */ + controlTpl : { + value : '' + } + } + },{ + xclass : 'form-field-readonly' + }); + + return readonlyField; + +});/** + * @fileOverview \u6a21\u62df\u9009\u62e9\u6846\u5728\u8868\u5355\u4e2d + * @ignore + */ + +define('bui/form/selectfield',['bui/common','bui/form/basefield'],function (require) { + + var BUI = require('bui/common'), + Field = require('bui/form/basefield'); + + function resetOptions (select,options,self) { + select.children().remove(); + var emptyText = self.get('emptyText'); + if(emptyText){ + appendItem('',emptyText,select); + } + BUI.each(options,function (option) { + appendItem(option.value,option.text,select); + }); + } + + function appendItem(value,text,select){ + var str = '' + $(str).appendTo(select); + } + /** + * \u8868\u5355\u9009\u62e9\u57df + * @class BUI.Form.Field.Select + * @extends BUI.Form.Field + */ + var selectField = Field.extend({ + //\u751f\u6210select + renderUI : function(){ + var _self = this, + innerControl = _self.getInnerControl(), + select = _self.get('select'); + if(_self.get('srcNode') && innerControl.is('select')){ //\u5982\u679c\u4f7f\u7528\u73b0\u6709DOM\u751f\u6210\uff0c\u4e0d\u4f7f\u7528\u81ea\u5b9a\u4e49\u9009\u62e9\u6846\u63a7\u4ef6 + return; + } + //select = select || {}; + if($.isPlainObject(select)){ + _self._initSelect(select); + } + }, + _initSelect : function(select){ + var _self = this, + items = _self.get('items'); + BUI.use('bui/select',function(Select){ + select.render = _self.getControlContainer(); + select.valueField = _self.getInnerControl(); + select.autoRender = true; + /* if(items){ + select.items = items; + }*/ + select = new Select.Select(select); + _self.set('select',select); + _self.set('isCreate',true); + _self.get('children').push(select); + select.on('change',function(ev){ + var val = select.getSelectedValue(); + _self.set('value',val); + }); + }) + }, + /** + * \u91cd\u65b0\u8bbe\u7f6e\u9009\u9879\u96c6\u5408 + * @param {Array} items \u9009\u9879\u96c6\u5408 + */ + setItems : function (items) { + var _self = this, + select = _self.get('select'); + + if($.isPlainObject(items)){ + var tmp = []; + BUI.each(items,function(v,n){ + tmp.push({value : n,text : v}); + }); + items = tmp; + } + + var control = _self.getInnerControl(); + if(control.is('select')){ + resetOptions(control,items,_self); + _self.setControlValue(_self.get('value')); + if(!_self.getControlValue()){ + _self.setInternal('value',''); + } + } + + if(select){ + if(select.set){ + select.set('items',items); + }else{ + select.items = items; + } + } + }, + /** + * \u8bbe\u7f6e\u5b57\u6bb5\u7684\u503c + * @protected + * @param {*} value \u5b57\u6bb5\u503c + */ + setControlValue : function(value){ + var _self = this, + select = _self.get('select'), + innerControl = _self.getInnerControl(); + innerControl.val(value); + if(select && select.set && select.getSelectedValue() !== value){ + select.setSelectedValue(value); + } + }, + /** + * \u83b7\u53d6tip\u663e\u793a\u5bf9\u5e94\u7684\u5143\u7d20 + * @protected + * @override + * @return {HTMLElement} + */ + getTipTigger : function(){ + var _self = this, + select = _self.get('select'); + if(select && select.rendered){ + return select.get('el').find('input'); + } + return _self.get('el'); + }, + //\u8bbe\u7f6e\u9009\u9879 + _uiSetItems : function(v){ + if(v){ + this.setItems(v); + } + }, + /** + * @protected + * \u8bbe\u7f6e\u5185\u90e8\u5143\u7d20\u5bbd\u5ea6 + */ + setInnerWidth : function(width){ + var _self = this, + innerControl = _self.getInnerControl(), + select = _self.get('select'), + appendWidth = innerControl.outerWidth() - innerControl.width(); + innerControl.width(width - appendWidth); + if(select && select.set){ + select.set('width',width); + } + } + },{ + ATTRS : { + /** + * \u9009\u9879 + * @type {Array} + */ + items : { + + }, + /** + * \u5185\u90e8\u8868\u5355\u5143\u7d20\u7684\u5bb9\u5668 + * @type {String} + */ + controlTpl : { + value : '' + }, + /** + * \u662f\u5426\u663e\u793a\u4e3a\u7a7a\u7684\u6587\u672c + * @type {Boolean} + */ + showBlank : { + value : true + }, + /** + * \u9009\u62e9\u4e3a\u7a7a\u65f6\u7684\u6587\u672c + * @type {String} + */ + emptyText : { + value : '\u8bf7\u9009\u62e9' + }, + select : { + value : {} + } + }, + PARSER : { + emptyText : function(el){ + if(!this.get('showBlank')){ + return ''; + } + var options = el.find('option'), + rst = this.get('emptyText'); + if(options.length){ + rst = $(options[0]).text(); + } + return rst; + } + } + },{ + xclass : 'form-field-select' + }); + + return selectField; +});/** + * @fileOverview \u8868\u5355\u65e5\u5386\u57df + * @author dxq613@gmail.com + * @ignore + */ + +define('bui/form/datefield',['bui/common','bui/form/basefield','bui/calendar'],function (require) { + + var BUI = require('bui/common'), + Field = require('bui/form/basefield'), + DateUtil = BUI.Date, + DatePicker = require('bui/calendar').DatePicker; + + /** + * \u8868\u5355\u6587\u672c\u57df + * @class BUI.Form.Field.Date + * @extends BUI.Form.Field + */ + var dateField = Field.extend({ + //\u751f\u6210\u65e5\u671f\u63a7\u4ef6 + renderUI : function(){ + + var _self = this, + datePicker = _self.get('datePicker'); + if($.isPlainObject(datePicker)){ + datePicker.trigger = _self.getInnerControl(); + datePicker.autoRender = true; + datePicker = new DatePicker(datePicker); + _self.set('datePicker',datePicker); + _self.set('isCreatePicker',true); + _self.get('children').push(datePicker); + } + if(datePicker.get('showTime')){ + _self.getInnerControl().addClass('calendar-time'); + } + + }, + bindUI : function(){ + var _self = this, + datePicker = _self.get('datePicker'); + datePicker.on('selectedchange',function(ev){ + var curTrigger = ev.curTrigger; + if(curTrigger[0] == _self.getInnerControl()[0]){ + _self.set('value',ev.value); + } + }); + }, + /** + * \u8bbe\u7f6e\u5b57\u6bb5\u7684\u503c + * @protected + * @param {Date} value \u5b57\u6bb5\u503c + */ + setControlValue : function(value){ + var _self = this, + innerControl = _self.getInnerControl(); + if(BUI.isDate(value)){ + value = DateUtil.format(value,_self._getFormatMask()); + } + innerControl.val(value); + }, + //\u83b7\u53d6\u683c\u5f0f\u5316\u51fd\u6570 + _getFormatMask : function(){ + var _self = this, + datePicker = _self.get('datePicker'); + + if(datePicker.get('showTime')){ + return 'yyyy-mm-dd HH:MM:ss'; + } + return 'yyyy-mm-dd'; + }, + /** + * \u5c06\u5b57\u7b26\u4e32\u7b49\u683c\u5f0f\u8f6c\u6362\u6210\u65e5\u671f + * @protected + * @override + * @param {String} value \u539f\u59cb\u6570\u636e + * @return {Date} \u8be5\u5b57\u6bb5\u6307\u5b9a\u7684\u7c7b\u578b + */ + parseValue : function(value){ + if(BUI.isNumber(value)){ + return new Date(value); + } + return DateUtil.parse(value); + }, + /** + * @override + * @protected + * \u662f\u5426\u5f53\u524d\u503c + */ + isCurrentValue : function (value) { + return DateUtil.isEquals(value,this.get('value')); + }, + //\u8bbe\u7f6e\u6700\u5927\u503c + _uiSetMax : function(v){ + this.addRule('max',v); + var _self = this, + datePicker = _self.get('datePicker'); + if(datePicker && datePicker.set){ + datePicker.set('maxDate',v); + } + }, + //\u8bbe\u7f6e\u6700\u5c0f\u503c + _uiSetMin : function(v){ + this.addRule('min',v); + var _self = this, + datePicker = _self.get('datePicker'); + if(datePicker && datePicker.set){ + datePicker.set('minDate',v); + } + } + },{ + ATTRS : { + /** + * \u5185\u90e8\u8868\u5355\u5143\u7d20\u7684\u5bb9\u5668 + * @type {String} + */ + controlTpl : { + value : '' + }, + defaultRules : { + value : { + date : true + } + }, + /** + * \u6700\u5927\u503c + * @type {Date|String} + */ + max : { + + }, + /** + * \u6700\u5c0f\u503c + * @type {Date|String} + */ + min : { + + }, + value : { + setter : function(v){ + if(BUI.isNumber(v)){//\u5c06\u6570\u5b57\u8f6c\u6362\u6210\u65e5\u671f\u7c7b\u578b + return new Date(v); + } + return v; + } + }, + /** + * \u65f6\u95f4\u9009\u62e9\u63a7\u4ef6 + * @type {Object|BUI.Calendar.DatePicker} + */ + datePicker : { + value : { + + } + }, + /** + * \u65f6\u95f4\u9009\u62e9\u5668\u662f\u5426\u662f\u7531\u6b64\u63a7\u4ef6\u521b\u5efa + * @type {Boolean} + * @readOnly + */ + isCreatePicker : { + value : true + } + }, + PARSER : { + datePicker : function(el){ + if(el.hasClass('calendar-time')){ + return { + showTime : true + } + } + return {}; + } + } + },{ + xclass : 'form-field-date' + }); + + return dateField; +});/** + * @fileOverview \u53ef\u52fe\u9009\u5b57\u6bb5 + * @ignore + */ + +define('bui/form/checkfield',['bui/form/basefield'],function (require) { + var Field = require('bui/form/basefield'); + + /** + * \u53ef\u9009\u4e2d\u83dc\u5355\u57df + * @class BUI.Form.Field.Check + * @extends BUI.Form.Field + */ + var checkField = Field.extend({ + /** + * \u9a8c\u8bc1\u6210\u529f\u540e\u6267\u884c\u7684\u64cd\u4f5c + * @protected + */ + onValid : function(){ + var _self = this, + checked = _self._getControlChecked(); + _self.setInternal('checked',checked); + _self.fire('change'); + if(checked){ + _self.fire('checked'); + }else{ + _self.fire('unchecked'); + } + }, + //\u8bbe\u7f6e\u662f\u5426\u52fe\u9009 + _setControlChecked : function(checked){ + var _self = this, + innerControl = _self.getInnerControl(); + innerControl.attr('checked',!!checked); + }, + //\u83b7\u53d6\u662f\u5426\u52fe\u9009 + _getControlChecked : function(){ + var _self = this, + innerControl = _self.getInnerControl(); + return !!innerControl.attr('checked'); + }, + //\u8986\u76d6 \u8bbe\u7f6e\u503c\u7684\u65b9\u6cd5 + _uiSetValue : function(v){ + + }, + //\u8bbe\u7f6e\u662f\u5426\u52fe\u9009 + _uiSetChecked : function(v){ + var _self = this; + _self._setControlChecked(v); + if(_self.get('rendered')){ + _self.onValid(); + } + } + },{ + ATTRS : { + /** + * \u89e6\u53d1\u9a8c\u8bc1\u4e8b\u4ef6\uff0c\u8fdb\u800c\u5f15\u8d77change\u4e8b\u4ef6 + * @override + * @type {String} + */ + validEvent : { + value : 'click' + }, + /** + * \u662f\u5426\u9009\u4e2d + * @cfg {String} checked + */ + /** + * \u662f\u5426\u9009\u4e2d + * @type {String} + */ + checked : { + value : false + }, + events : { + value : { + /** + * @event + * \u9009\u4e2d\u4e8b\u4ef6 + */ + 'checked' : false, + /** + * @event + * \u53d6\u6d88\u9009\u4e2d\u4e8b\u4ef6 + */ + 'unchecked' : false + } + } + }, + PARSER : { + checked : function(el){ + return !!el.attr('checked'); + } + } + },{ + xclass : 'form-check-field' + }); + + return checkField; +});/** + * @fileOverview \u590d\u9009\u6846\u8868\u5355\u57df + * @ignore + */ + +define('bui/form/checkboxfield',['bui/form/checkfield'],function (required) { + + var CheckField = required('bui/form/checkfield'); + + /** + * \u8868\u5355\u590d\u9009\u57df + * @class BUI.Form.Field.Checkbox + * @extends BUI.Form.Field.Check + */ + var CheckBoxField = CheckField.extend({ + + },{ + ATTRS : { + /** + * \u5185\u90e8\u8868\u5355\u5143\u7d20\u7684\u5bb9\u5668 + * @type {String} + */ + controlTpl : { + view : true, + value : '' + }, + /** + * \u63a7\u4ef6\u5bb9\u5668\uff0c\u5982\u679c\u4e3a\u7a7a\u76f4\u63a5\u6dfb\u52a0\u5728\u63a7\u4ef6\u5bb9\u5668\u4e0a + * @type {String|HTMLElement} + */ + controlContainer : { + value : '.checkbox' + }, + tpl : { + value : '' + } + } + },{ + xclass : 'form-field-checkbox' + }); + + return CheckBoxField; +});/** + * @fileOverview \u5355\u9009\u6846\u8868\u5355\u57df + * @ignore + */ + +define('bui/form/radiofield',['bui/form/checkfield'],function (required) { + + var CheckField = required('bui/form/checkfield'); + + /** + * \u8868\u5355\u5355\u9009\u57df + * @class BUI.Form.Field.Radio + * @extends BUI.Form.Field.Check + */ + var RadioField = CheckField.extend({ + bindUI : function(){ + var _self = this, + parent = _self.get('parent'), + name = _self.get('name'); + + if(parent){ + _self.getInnerControl().on('click',function(ev){ + var fields = parent.getFields(name); + BUI.each(fields,function(field){ + if(field != _self){ + field.set('checked',false); + } + }); + }); + } + } + },{ + ATTRS : { + /** + * \u5185\u90e8\u8868\u5355\u5143\u7d20\u7684\u5bb9\u5668 + * @type {String} + */ + controlTpl : { + view : true, + value : '' + }, + /** + * \u63a7\u4ef6\u5bb9\u5668\uff0c\u5982\u679c\u4e3a\u7a7a\u76f4\u63a5\u6dfb\u52a0\u5728\u63a7\u4ef6\u5bb9\u5668\u4e0a + * @type {String|HTMLElement} + */ + controlContainer : { + value : '.radio' + }, + tpl : { + value : '' + } + } + },{ + xclass : 'form-field-radio' + }); + + return RadioField; +});/** + * @fileOverview \u4ec5\u4ec5\u7528\u4e8e\u663e\u793a\u6587\u672c\uff0c\u4e0d\u80fd\u7f16\u8f91\u7684\u5b57\u6bb5 + * @ignore + */ + +define('bui/form/plainfield',['bui/form/basefield'],function (require) { + var Field = require('bui/form/basefield'); + + + var PlainFieldView = Field.View.extend({ + + _uiSetValue : function(v){ + var _self = this, + textEl = _self.get('textEl'), + container = _self.getControlContainer(), + renderer = _self.get('renderer'), + text = renderer ? renderer(v) : v, + width = _self.get('width'), + appendWidth = 0, + textTpl; + if(textEl){ + + textEl.remove(); + } + text = text || ' '; + textTpl = BUI.substitute(_self.get('textTpl'),{text : text}); + textEl = $(textTpl).appendTo(container); + appendWidth = textEl.outerWidth() - textEl.width(); + textEl.width(width - appendWidth); + _self.set('textEl',textEl); + } + + },{ + ATTRS : { + textEl : {}, + value : {} + } + },{ + xclass : 'form-field-plain-view' + }); + + /** + * \u8868\u5355\u6587\u672c\u57df\uff0c\u4e0d\u80fd\u7f16\u8f91 + * @class BUI.Form.Field.Plain + * @extends BUI.Form.Field + */ + var PlainField = Field.extend({ + + },{ + ATTRS : { + /** + * \u5185\u90e8\u8868\u5355\u5143\u7d20\u7684\u5bb9\u5668 + * @type {String} + */ + controlTpl : { + value : '' + }, + /** + * \u663e\u793a\u6587\u672c\u7684\u6a21\u677f + * @type {String} + */ + textTpl : { + view : true, + value : '{text}' + }, + /** + * \u5c06\u5b57\u6bb5\u7684\u503c\u683c\u5f0f\u5316\u8f93\u51fa + * @type {Function} + */ + renderer : { + view : true, + value : function(value){ + return value; + } + }, + tpl : { + value : '' + }, + xview : { + value : PlainFieldView + } + } + },{ + xclass : 'form-field-plain' + }); + + return PlainField; +});/** + * @fileOverview \u8868\u5355\u4e2d\u7684\u5217\u8868\uff0c\u6bcf\u4e2a\u5217\u8868\u540e\u6709\u4e2a\u9690\u85cf\u57df\u7528\u6765\u5b58\u50a8\u6570\u636e + * @ignore + */ + +define('bui/form/listfield',['bui/common','bui/form/basefield','bui/list'],function (require) { + var BUI = require('bui/common'), + List = require('bui/list'), + Field = require('bui/form/basefield'); + + /** + * @class BUI.Form.Field.List + * \u8868\u5355\u4e2d\u7684\u5217\u8868 + * @extends BUI.Form.Field + */ + var List = Field.extend({ + + initializer : function(){ + var _self = this; + //if(!_self.get('srcNode')){ + _self._initList(); + //} + }, + _getList : function(){ + var _self = this, + children = _self.get('children'); + return children[0]; + }, + bindUI : function(){ + var _self = this, + list = _self._getList(); + if(list){ + list.on('selectedchange',function(){ + var value = _self._getListValue(list); + _self.set('value',value); + }); + } + }, + //\u83b7\u53d6\u5217\u8868\u503c + _getListValue : function(list){ + var _self = this; + list = list || _self._getList(); + return list.getSelectionValues().join(','); + }, + /** + * \u8bbe\u7f6e\u5b57\u6bb5\u7684\u503c + * @protected + * @param {*} value \u5b57\u6bb5\u503c + */ + setControlValue : function(value){ + var _self = this, + innerControl = _self.getInnerControl(), + list = _self._getList(); + innerControl.val(value); + if(_self._getListValue(list) !== value && list.getCount()){ + if(list.get('multipleSelect')){ + list.clearSelection(); + } + list.setSelectionByField(value.split(',')); + } + }, + //\u540c\u6b65\u6570\u636e + syncUI : function(){ + this.set('list',this._getList()); + }, + //\u521d\u59cb\u5316\u5217\u8868 + _initList : function(){ + var _self = this, + children = _self.get('children'), + list = _self.get('list') || {}; + if(children[0]){ + return; + } + if($.isPlainObject(list)){ + list.xclass = list.xclass || 'simple-list'; + } + children.push(list); + }, + /** + * \u8bbe\u7f6e\u9009\u9879 + * @param {Array} items \u9009\u9879\u8bb0\u5f55 + */ + setItems : function(items){ + var _self = this, + value = _self.get('value'), + list = _self._getList(); + list.set('items',items); + list.setSelectionByField(value.split(',')); + }, + //\u8bbe\u7f6e\u9009\u9879\u96c6\u5408 + _uiSetItems : function(v){ + if(v){ + this.setItems(v); + } + } + },{ + ATTRS : { + /** + * \u5185\u90e8\u8868\u5355\u5143\u7d20\u7684\u5bb9\u5668 + * @type {String} + */ + controlTpl : { + value : '' + }, + /** + * \u9009\u9879 + * @type {Array} + */ + items : { + setter : function(v){ + if($.isPlainObject(v)){ + var rst = []; + BUI.each(v,function(v,k){ + rst.push({value : k,text :v}); + }); + v = rst; + } + return v; + } + }, + /** + * \u5217\u8868 + * @type {BUI.List.SimpleList} + */ + list : { + + } + } + },{ + xclass : 'form-field-list' + }); + + return List; +});/** + * @fileOverview \u8868\u5355\u57df\u7684\u5165\u53e3\u6587\u4ef6 + * @ignore + */ +;(function(){ +var BASE = 'bui/form/'; +define(BASE + 'field',['bui/common',BASE + 'textfield',BASE + 'datefield',BASE + 'selectfield',BASE + 'hiddenfield', + BASE + 'numberfield',BASE + 'checkfield',BASE + 'radiofield',BASE + 'checkboxfield',BASE + 'plainfield'],function (require) { + var BUI = require('bui/common'), + Field = require(BASE + 'basefield'); + + BUI.mix(Field,{ + Text : require(BASE + 'textfield'), + Date : require(BASE + 'datefield'), + Select : require(BASE + 'selectfield'), + Hidden : require(BASE + 'hiddenfield'), + Number : require(BASE + 'numberfield'), + Check : require(BASE + 'checkfield'), + Radio : require(BASE + 'radiofield'), + Checkbox : require(BASE + 'checkboxfield'), + Plain : require(BASE + 'plainfield'), + List : require(BASE + 'listfield') + }); + + return Field; +}); + +})(); +/** + * @fileOverview \u8868\u5355\u9a8c\u8bc1 + * @ignore + */ + +define('bui/form/valid',['bui/common','bui/form/rules'],function (require) { + + var BUI = require('bui/common'), + Rules = require('bui/form/rules'); + + /** + * @class BUI.Form.ValidView + * @private + * \u5bf9\u63a7\u4ef6\u5185\u7684\u5b57\u6bb5\u57df\u8fdb\u884c\u9a8c\u8bc1\u7684\u89c6\u56fe + */ + var ValidView = function(){ + + }; + + ValidView.prototype = { + /** + * \u83b7\u53d6\u9519\u8bef\u4fe1\u606f\u7684\u5bb9\u5668 + * @protected + * @return {jQuery} + */ + getErrorsContainer : function(){ + var _self = this, + errorContainer = _self.get('errorContainer'); + if(errorContainer){ + if(BUI.isString(errorContainer)){ + return _self.get('el').find(errorContainer); + } + return errorContainer; + } + return _self.getContentElement(); + }, + /** + * \u663e\u793a\u9519\u8bef + */ + showErrors : function(errors){ + var _self = this, + errorsContainer = _self.getErrorsContainer(), + errorTpl = _self.get('errorTpl'); + _self.clearErrors(); + + if(!_self.get('showError')){ + return ; + } + //\u5982\u679c\u4ec5\u663e\u793a\u7b2c\u4e00\u6761\u9519\u8bef\u8bb0\u5f55 + if(_self.get('showOneError')){ + if(errors && errors.length){ + _self.showError(errors[0],errorTpl,errorsContainer); + } + return ; + } + + BUI.each(errors,function(error){ + if(error){ + _self.showError(error,errorTpl,errorsContainer); + } + }); + }, + /** + * \u663e\u793a\u4e00\u6761\u9519\u8bef + * @protected + * @template + * @param {String} msg \u9519\u8bef\u4fe1\u606f + */ + showError : function(msg,errorTpl,container){ + + }, + /** + * @protected + * @template + * \u6e05\u9664\u9519\u8bef + */ + clearErrors : function(){ + + } + }; + /** + * \u5bf9\u63a7\u4ef6\u5185\u7684\u5b57\u6bb5\u57df\u8fdb\u884c\u9a8c\u8bc1 + * @class BUI.Form.Valid + */ + var Valid = function(){ + + }; + + Valid.ATTRS = { + + /** + * \u63a7\u4ef6\u56fa\u6709\u7684\u9a8c\u8bc1\u89c4\u5219\uff0c\u4f8b\u5982\uff0c\u65e5\u671f\u5b57\u6bb5\u57df\uff0c\u6709\u7684date\u7c7b\u578b\u7684\u9a8c\u8bc1 + * @protected + * @type {Object} + */ + defaultRules : { + value : {} + }, + /** + * \u63a7\u4ef6\u56fa\u6709\u7684\u9a8c\u8bc1\u51fa\u9519\u4fe1\u606f\uff0c\u4f8b\u5982\uff0c\u65e5\u671f\u5b57\u6bb5\u57df\uff0c\u4e0d\u662f\u6709\u6548\u65e5\u671f\u7684\u9a8c\u8bc1\u5b57\u6bb5 + * @protected + * @type {Object} + */ + defaultMessages : { + value : {} + }, + /** + * \u9a8c\u8bc1\u89c4\u5219 + * @type {Object} + */ + rules : { + value : {} + }, + /** + * \u9a8c\u8bc1\u4fe1\u606f\u96c6\u5408 + * @type {Object} + */ + messages : { + value : {} + }, + /** + * \u9a8c\u8bc1\u5668 \u9a8c\u8bc1\u5bb9\u5668\u5185\u7684\u8868\u5355\u5b57\u6bb5\u662f\u5426\u901a\u8fc7\u9a8c\u8bc1 + * @type {Function} + */ + validator : { + + }, + /** + * \u5b58\u653e\u9519\u8bef\u4fe1\u606f\u5bb9\u5668\u7684\u9009\u62e9\u5668\uff0c\u5982\u679c\u672a\u63d0\u4f9b\u5219\u9ed8\u8ba4\u663e\u793a\u5728\u63a7\u4ef6\u4e2d + * @private + * @type {String} + */ + errorContainer : { + view : true + }, + /** + * \u663e\u793a\u9519\u8bef\u4fe1\u606f\u7684\u6a21\u677f + * @type {Object} + */ + errorTpl : { + view : true, + value : '!' + }, + /** + * \u663e\u793a\u9519\u8bef + * @type {Boolean} + */ + showError : { + view : true, + value : true + }, + /** + * \u662f\u5426\u4ec5\u663e\u793a\u4e00\u4e2a\u9519\u8bef + * @type {Boolean} + */ + showOneError: { + + }, + /** + * \u9519\u8bef\u4fe1\u606f\uff0c\u8fd9\u4e2a\u9a8c\u8bc1\u9519\u8bef\u4e0d\u5305\u542b\u5b50\u63a7\u4ef6\u7684\u9a8c\u8bc1\u9519\u8bef + * @type {String} + */ + error : { + + } + }; + + Valid.prototype = { + /** + * \u662f\u5426\u901a\u8fc7\u9a8c\u8bc1 + * @template + * @return {Boolean} \u662f\u5426\u901a\u8fc7\u9a8c\u8bc1 + */ + isValid : function(){ + + }, + /** + * \u8fdb\u884c\u9a8c\u8bc1 + */ + valid : function(){ + + }, + /** + * @protected + * @template + * \u9a8c\u8bc1\u81ea\u8eab\u7684\u89c4\u5219\u548c\u9a8c\u8bc1\u5668 + */ + validControl : function(){ + + }, + //\u9a8c\u8bc1\u89c4\u5219 + validRules : function(rules,value){ + var _self = this, + messages = _self._getValidMessages(), + error = null; + + for(var name in rules){ + if(rules.hasOwnProperty(name)){ + var baseValue = rules[name]; + error = Rules.valid(name,value,baseValue,messages[name],_self); + if(error){ + break; + } + } + } + return error; + }, + //\u83b7\u53d6\u9a8c\u8bc1\u9519\u8bef\u4fe1\u606f + _getValidMessages : function(){ + var _self = this, + defaultMessages = _self.get('defaultMessages'), + messages = _self.get('messages'); + return BUI.merge(defaultMessages,messages); + }, + /** + * @template + * @protected + * \u63a7\u4ef6\u672c\u8eab\u662f\u5426\u901a\u8fc7\u9a8c\u8bc1\uff0c\u4e0d\u8003\u8651\u5b50\u63a7\u4ef6 + * @return {String} \u9a8c\u8bc1\u7684\u9519\u8bef + */ + getValidError : function(value){ + var _self = this, + validator = _self.get('validator'), + error = null; + + error = _self.validRules(_self.get('defaultRules'),value) || _self.validRules(_self.get('rules'),value); + + if(!error){ + if(_self.parseValue){ + value = _self.parseValue(value); + } + error = validator ? validator.call(this,value) : ''; + } + + return error; + }, + /** + * \u83b7\u53d6\u9a8c\u8bc1\u51fa\u9519\u4fe1\u606f\uff0c\u5305\u62ec\u81ea\u8eab\u548c\u5b50\u63a7\u4ef6\u7684\u9a8c\u8bc1\u9519\u8bef\u4fe1\u606f + * @return {Array} \u51fa\u9519\u4fe1\u606f + */ + getErrors : function(){ + + }, + /** + * \u663e\u793a\u9519\u8bef + * @param {Array} \u663e\u793a\u9519\u8bef + */ + showErrors : function(errors){ + var _self = this, + errors = errors || _self.getErrors(); + _self.get('view').showErrors(errors); + }, + /** + * \u6e05\u9664\u9519\u8bef + */ + clearErrors : function(){ + var _self = this, + children = _self.get('children'); + + BUI.each(children,function(item){ + item.clearErrors && item.clearErrors(); + }); + _self.set('error',null); + _self.get('view').clearErrors(); + }, + /** + * \u6dfb\u52a0\u9a8c\u8bc1\u89c4\u5219 + * @param {String} name \u89c4\u5219\u540d\u79f0 + * @param {*} [value] \u89c4\u5219\u8fdb\u884c\u6821\u9a8c\u7684\u8fdb\u884c\u5bf9\u6bd4\u7684\u503c\uff0c\u5982max : 10 + * @param {String} [message] \u51fa\u9519\u4fe1\u606f,\u53ef\u4ee5\u4f7f\u6a21\u677f + *
              + *
            1. \u5982\u679c value \u662f\u5355\u4e2a\u503c\uff0c\u4f8b\u5982\u6700\u5927\u503c value = 10,\u90a3\u4e48\u6a21\u677f\u53ef\u4ee5\u5199\u6210\uff1a '\u8f93\u5165\u503c\u4e0d\u80fd\u5927\u4e8e{0}!'
            2. + *
            3. \u5982\u679c value \u662f\u4e2a\u590d\u6742\u5bf9\u8c61\uff0c\u6570\u7ec4\u65f6\uff0c\u6309\u7167\u7d22\u5f15\uff0c\u5bf9\u8c61\u65f6\u6309\u7167 key \u963b\u6b62\u3002\u5982\uff1avalue= {max:10,min:5} \uff0c\u5219'\u8f93\u5165\u503c\u4e0d\u80fd\u5927\u4e8e{max},\u4e0d\u80fd\u5c0f\u4e8e{min}'
            4. + *
            + * var field = form.getField('name'); + * field.addRule('required',true); + * + * field.addRule('max',10,'\u4e0d\u80fd\u5927\u4e8e{0}'); + */ + addRule : function(name,value,message){ + var _self = this, + rules = _self.get('rules'), + messages = _self.get('messages'); + rules[name] = value; + if(message){ + messages[name] = message; + } + + }, + /** + * \u6dfb\u52a0\u591a\u4e2a\u9a8c\u8bc1\u89c4\u5219 + * @param {Object} rules \u591a\u4e2a\u9a8c\u8bc1\u89c4\u5219 + * @param {Object} [messages] \u9a8c\u8bc1\u89c4\u5219\u7684\u51fa\u9519\u4fe1\u606f + * var field = form.getField('name'); + * field.addRules({ + * required : true, + * max : 10 + * }); + */ + addRules : function(rules,messages){ + var _self = this; + + BUI.each(rules,function(value,name){ + var msg = messages ? messages[name] : null; + _self.addRule(name,value,msg); + }); + }, + /** + * \u79fb\u9664\u6307\u5b9a\u540d\u79f0\u7684\u9a8c\u8bc1\u89c4\u5219 + * @param {String} name \u9a8c\u8bc1\u89c4\u5219\u540d\u79f0 + * var field = form.getField('name'); + * field.remove('required'); + */ + removeRule : function(name){ + var _self = this, + rules = _self.get('rules'); + delete rules[name]; + }, + /** + * \u6e05\u7406\u9a8c\u8bc1\u89c4\u5219 + */ + clearRules : function(){ + var _self = this; + _self.set('rules',{}); + } + }; + + Valid.View = ValidView; + return Valid; +});/** + * @fileOverview \u8868\u5355\u5206\u7ec4\u9a8c\u8bc1 + * @ignore + */ + +define('bui/form/groupvalid',['bui/form/valid'],function (require) { + + var CLS_ERROR = 'x-form-error', + Valid = require('bui/form/valid'); + + /** + * @class BUI.Form.GroupValidView + * @private + * \u8868\u5355\u5206\u7ec4\u9a8c\u8bc1\u89c6\u56fe + * @extends BUI.Form.ValidView + */ + function GroupValidView(){ + + } + + BUI.augment(GroupValidView,Valid.View,{ + /** + * \u663e\u793a\u4e00\u6761\u9519\u8bef + * @private + * @param {String} msg \u9519\u8bef\u4fe1\u606f + */ + showError : function(msg,errorTpl,container){ + var errorMsg = BUI.substitute(errorTpl,{error : msg}), + el = $(errorMsg); + el.appendTo(container); + el.addClass(CLS_ERROR); + }, + /** + * \u6e05\u9664\u9519\u8bef + */ + clearErrors : function(){ + var _self = this, + errorContainer = _self.getErrorsContainer(); + errorContainer.children('.' + CLS_ERROR).remove(); + } + }); + + /** + * @class BUI.Form.GroupValid + * \u8868\u5355\u5206\u7ec4\u9a8c\u8bc1 + * @extends BUI.Form.Valid + */ + function GroupValid(){ + + } + + GroupValid.ATTRS = ATTRS =BUI.merge(true,Valid.ATTRS,{ + events: { + value : { + validchange : true, + change : true + } + } + }); + + BUI.augment(GroupValid,Valid,{ + __bindUI : function(){ + var _self = this, + validEvent = 'validchange change'; + + //\u5f53\u4e0d\u9700\u8981\u663e\u793a\u5b50\u63a7\u4ef6\u9519\u8bef\u65f6\uff0c\u4ec5\u9700\u8981\u76d1\u542c'change'\u4e8b\u4ef6\u5373\u53ef + _self.on(validEvent,function(ev){ + var sender = ev.target; + if(sender != this && _self.get('showError')){ + var valid = _self.isChildrenValid(); + if(valid){ + _self.validControl(_self.getRecord()); + valid = _self.isSelfValid(); + } + if(!valid){ + _self.showErrors(); + }else{ + _self.clearErrors(); + } + } + }); + }, + /** + * \u662f\u5426\u901a\u8fc7\u9a8c\u8bc1 + */ + isValid : function(){ + var _self = this, + isValid = _self.isChildrenValid(); + return isValid && _self.isSelfValid(); + }, + /** + * \u8fdb\u884c\u9a8c\u8bc1 + */ + valid : function(){ + var _self = this, + children = _self.get('children'); + + BUI.each(children,function(item){ + item.valid(); + }); + }, + /** + * \u6240\u6709\u5b50\u63a7\u4ef6\u662f\u5426\u901a\u8fc7\u9a8c\u8bc1 + * @protected + * @return {Boolean} \u6240\u6709\u5b50\u63a7\u4ef6\u662f\u5426\u901a\u8fc7\u9a8c\u8bc1 + */ + isChildrenValid : function(){ + var _self = this, + children = _self.get('children'), + isValid = true; + + BUI.each(children,function(item){ + if(!item.isValid()){ + isValid = false; + return false; + } + }); + return isValid; + }, + isSelfValid : function () { + return !this.get('error'); + }, + /** + * \u9a8c\u8bc1\u63a7\u4ef6\u5185\u5bb9 + * @protected + * @return {Boolean} \u662f\u5426\u901a\u8fc7\u9a8c\u8bc1 + */ + validControl : function (record) { + var _self = this, + error = _self.getValidError(record); + _self.set('error',error); + }, + /** + * \u83b7\u53d6\u9a8c\u8bc1\u51fa\u9519\u4fe1\u606f\uff0c\u5305\u62ec\u81ea\u8eab\u548c\u5b50\u63a7\u4ef6\u7684\u9a8c\u8bc1\u9519\u8bef\u4fe1\u606f + * @return {Array} \u51fa\u9519\u4fe1\u606f + */ + getErrors : function(){ + var _self = this, + children = _self.get('children'), + showChildError = _self.get('showChildError'), + validError = null, + rst = []; + if(showChildError){ + BUI.each(children,function(child){ + if(child.getErrors){ + rst = rst.concat(child.getErrors()); + } + }); + } + //\u5982\u679c\u6240\u6709\u5b50\u63a7\u4ef6\u901a\u8fc7\u9a8c\u8bc1\uff0c\u624d\u663e\u793a\u81ea\u5df1\u7684\u9519\u8bef + if(_self.isChildrenValid()){ + validError = _self.get('error'); + if(validError){ + rst.push(validError); + } + } + + return rst; + }, + //\u8bbe\u7f6e\u9519\u8bef\u6a21\u677f\u65f6\uff0c\u8986\u76d6\u5b50\u63a7\u4ef6\u8bbe\u7f6e\u7684\u9519\u8bef\u6a21\u677f + _uiSetErrorTpl : function(v){ + var _self = this, + children = _self.get('children'); + + BUI.each(children,function(item){ + item.set('errorTpl',v); + }); + } + }); + + GroupValid.View = GroupValidView; + + return GroupValid; +});/** + * @fileOverview \u8868\u5355\u5b57\u6bb5\u7684\u5bb9\u5668\u6269\u5c55 + * @ignore + */ +define('bui/form/fieldcontainer',['bui/common','bui/form/field','bui/form/groupvalid'],function (require) { + var BUI = require('bui/common'), + Field = require('bui/form/field'), + GroupValid = require('bui/form/groupvalid'), + PREFIX = BUI.prefix; + + var FIELD_XCLASS = 'form-field', + CLS_FIELD = PREFIX + FIELD_XCLASS, + CLS_GROUP = PREFIX + 'form-group', + FIELD_TAGS = 'input,select,textarea'; + + function isField(node){ + return node.is(FIELD_TAGS); + } + /** + * \u83b7\u53d6\u8282\u70b9\u9700\u8981\u5c01\u88c5\u7684\u5b50\u8282\u70b9 + * @ignore + */ + function getDecorateChilds(node,srcNode){ + + if(node != srcNode){ + + if(isField(node)){ + return [node]; + } + var cls = node.attr('class'); + if(cls && (cls.indexOf(CLS_GROUP) !== -1 || cls.indexOf(CLS_FIELD) !== -1)){ + return [node]; + } + } + var rst = [], + children = node.children(); + BUI.each(children,function(subNode){ + rst = rst.concat(getDecorateChilds($(subNode),srcNode)); + }); + return rst; + } + + var containerView = BUI.Component.View.extend([GroupValid.View]); + + /** + * \u8868\u5355\u5b57\u6bb5\u5bb9\u5668\u7684\u6269\u5c55\u7c7b + * @class BUI.Form.FieldContainer + * @extends BUI.Component.Controller + * @mixins BUI.Form.GroupValid + */ + var container = BUI.Component.Controller.extend([GroupValid], + { + //\u540c\u6b65\u6570\u636e + syncUI : function(){ + var _self = this, + fields = _self.getFields(), + validators = _self.get('validators'); + + BUI.each(fields,function(field){ + var name = field.get('name'); + if(validators[name]){ + field.set('validator',validators[name]); + } + }); + BUI.each(validators,function(item,key){ + //\u6309\u7167ID\u67e5\u627e + if(key.indexOf('#') == 0){ + var id = key.replace('#',''), + child = _self.getChild(id,true); + if(child){ + child.set('validator',item); + } + } + }); + }, + /** + * \u83b7\u53d6\u5c01\u88c5\u7684\u5b50\u63a7\u4ef6\u8282\u70b9 + * @protected + * @override + */ + getDecorateElments : function(){ + var _self = this, + el = _self.get('el'); + var items = getDecorateChilds(el,el); + return items; + }, + /** + * \u6839\u636e\u5b50\u8282\u70b9\u83b7\u53d6\u5bf9\u5e94\u7684\u5b50\u63a7\u4ef6 xclass + * @protected + * @override + */ + findXClassByNode : function(childNode, ignoreError){ + + + if(childNode.attr('type') === 'checkbox'){ + return FIELD_XCLASS + '-checkbox'; + } + + if(childNode.attr('type') === 'radio'){ + return FIELD_XCLASS + '-radio'; + } + + if(childNode.attr('type') === 'number'){ + return FIELD_XCLASS + '-number'; + } + + if(childNode.hasClass('calendar')){ + return FIELD_XCLASS + '-date'; + } + + if(childNode[0].tagName == "SELECT"){ + return FIELD_XCLASS + '-select'; + } + + if(isField(childNode)){ + return FIELD_XCLASS; + } + + return BUI.Component.Controller.prototype.findXClassByNode.call(this,childNode, ignoreError); + }, + /** + * \u83b7\u53d6\u8868\u5355\u7f16\u8f91\u7684\u5bf9\u8c61 + * @return {Object} \u7f16\u8f91\u7684\u5bf9\u8c61 + */ + getRecord : function(){ + var _self = this, + rst = {}, + fields = _self.getFields(); + BUI.each(fields,function(field){ + var name = field.get('name'), + value = _self._getFieldValue(field); + + if(!rst[name]){//\u6ca1\u6709\u503c\uff0c\u76f4\u63a5\u8d4b\u503c + rst[name] = value; + }else if(BUI.isArray(rst[name]) && value != null){//\u5df2\u7ecf\u5b58\u5728\u503c\uff0c\u5e76\u4e14\u662f\u6570\u7ec4\uff0c\u52a0\u5165\u6570\u7ec4 + rst[name].push(value); + }else if(value != null){ //\u5426\u5219\u5c01\u88c5\u6210\u6570\u7ec4\uff0c\u5e76\u52a0\u5165\u6570\u7ec4 + var arr = [rst[name]] + arr.push(value); + rst[name] = arr; + } + }); + return rst; + }, + /** + * \u83b7\u53d6\u8868\u5355\u5b57\u6bb5 + * @return {Array} \u8868\u5355\u5b57\u6bb5 + */ + getFields : function(name){ + var _self = this, + rst = [], + children = _self.get('children'); + BUI.each(children,function(item){ + if(item instanceof Field){ + if(!name || item.get('name') == name){ + rst.push(item); + } + }else if(item.getFields){ + rst = rst.concat(item.getFields(name)); + } + }); + return rst; + }, + /** + * \u6839\u636ename \u83b7\u53d6\u8868\u5355\u5b57\u6bb5 + * @param {String} name \u5b57\u6bb5\u540d + * @return {BUI.Form.Field} \u8868\u5355\u5b57\u6bb5\u6216\u8005 null + */ + getField : function(name){ + var _self = this, + fields = _self.getFields(), + rst = null; + + BUI.each(fields,function(field){ + if(field.get('name') === name){ + rst = field; + return false; + } + }); + return rst; + }, + /** + * \u6839\u636e\u7d22\u5f15\u83b7\u53d6\u5b57\u6bb5\u7684name + * @param {Number} index \u5b57\u6bb5\u7684\u7d22\u5f15 + * @return {String} \u5b57\u6bb5\u540d\u79f0 + */ + getFieldAt : function (index) { + return this.getFields()[index]; + }, + /** + * \u6839\u636e\u5b57\u6bb5\u540d + * @param {String} name \u5b57\u6bb5\u540d + * @param {*} value \u5b57\u6bb5\u503c + */ + setFieldValue : function(name,value){ + var _self = this, + fields = _self.getFields(name); + BUI.each(fields,function(field){ + _self._setFieldValue(field,value); + }); + }, + //\u8bbe\u7f6e\u5b57\u6bb5\u57df\u7684\u503c + _setFieldValue : function(field,value){ + //\u5982\u679c\u5b57\u6bb5\u4e0d\u53ef\u7528\uff0c\u5219\u4e0d\u80fd\u8bbe\u7f6e\u503c + if(field.get('disabled')){ + return; + } + //\u5982\u679c\u662f\u53ef\u52fe\u9009\u7684 + if(field instanceof Field.Check){ + var fieldValue = field.get('value'); + if(value && (fieldValue === value || (BUI.isArray(value) && BUI.Array.contains(fieldValue,value)))){ + field.set('checked',true); + }else{ + field.set('checked',false); + } + }else{ + if(value == null){ + value = ''; + } + field.set('value',value); + } + }, + /** + * \u83b7\u53d6\u5b57\u6bb5\u503c,\u4e0d\u5b58\u5728\u5b57\u6bb5\u65f6\u8fd4\u56denull,\u591a\u4e2a\u540c\u540d\u5b57\u6bb5\u65f6\uff0ccheckbox\u8fd4\u56de\u4e00\u4e2a\u6570\u7ec4 + * @param {String} name \u5b57\u6bb5\u540d + * @return {*} \u5b57\u6bb5\u503c + */ + getFieldValue : function(name){ + var _self = this, + fields = _self.getFields(name), + rst = []; + + BUI.each(fields,function(field){ + var value = _self._getFieldValue(field); + if(value){ + rst.push(value); + } + }); + if(rst.length === 0){ + return null; + } + if(rst.length === 1){ + return rst[0] + } + return rst; + }, + //\u83b7\u53d6\u5b57\u6bb5\u57df\u7684\u503c + _getFieldValue : function(field){ + if(!(field instanceof Field.Check) || field.get('checked')){ + return field.get('value'); + } + return null; + }, + /** + * \u6e05\u9664\u6240\u6709\u8868\u5355\u57df\u7684\u503c + */ + clearFields : function(){ + this.clearErrors(); + this.setRecord({}) + }, + /** + * \u8bbe\u7f6e\u8868\u5355\u7f16\u8f91\u7684\u5bf9\u8c61 + * @param {Object} record \u7f16\u8f91\u7684\u5bf9\u8c61 + */ + setRecord : function(record){ + var _self = this, + fields = _self.getFields(); + + BUI.each(fields,function(field){ + var name = field.get('name'); + _self._setFieldValue(field,record[name]); + }); + }, + /** + * \u66f4\u65b0\u8868\u5355\u7f16\u8f91\u7684\u5bf9\u8c61 + * @param {Object} record \u7f16\u8f91\u7684\u5bf9\u8c61 + */ + updateRecord : function(record){ + var _self = this, + fields = _self.getFields(); + + BUI.each(fields,function(field){ + var name = field.get('name'); + if(record.hasOwnProperty(name)){ + _self._setFieldValue(field,record[name]); + } + }); + }, + /** + * \u8bbe\u7f6e\u63a7\u4ef6\u83b7\u53d6\u7126\u70b9\uff0c\u8bbe\u7f6e\u7b2c\u4e00\u4e2a\u5b50\u63a7\u4ef6\u83b7\u53d6\u7126\u70b9 + */ + focus : function(){ + var _self = this, + fields = _self.getFields(), + firstField = fields[0]; + if(firstField){ + firstField.focus(); + } + }, + //\u7981\u7528\u63a7\u4ef6 + _uiSetDisabled : function(v){ + var _self = this, + children = _self.get('children'); + + BUI.each(children,function(item){ + item.set('disabled',v); + }); + } + }, + { + ATTRS : { + /** + * \u8868\u5355\u7684\u6570\u636e\u8bb0\u5f55\uff0c\u4ee5\u952e\u503c\u5bf9\u7684\u5f62\u5f0f\u5b58\u5728 + * @type {Object} + */ + record : { + setter : function(v){ + this.setRecord(v); + }, + getter : function(){ + return this.getRecord(); + } + }, + /** + * \u5185\u90e8\u5143\u7d20\u7684\u9a8c\u8bc1\u51fd\u6570\uff0c\u53ef\u4ee5\u4f7f\u75282\u4e2d\u9009\u62e9\u5668 + *
              + *
            1. id: \u4f7f\u7528\u4ee5'#'\u4e3a\u524d\u7f00\u7684\u9009\u62e9\u5668\uff0c\u53ef\u4ee5\u67e5\u627e\u5b57\u6bb5\u6216\u8005\u5206\u7ec4\uff0c\u6dfb\u52a0\u8054\u5408\u6821\u9a8c
            2. + *
            3. name: \u4e0d\u4f7f\u7528\u4efb\u4f55\u524d\u7f00\uff0c\u6ca1\u67e5\u627e\u8868\u5355\u5b57\u6bb5
            4. + *
            + * @type {Object} + */ + validators : { + value : { + + } + }, + /** + * \u9ed8\u8ba4\u7684\u52a0\u8f7d\u63a7\u4ef6\u5185\u5bb9\u7684\u914d\u7f6e,\u9ed8\u8ba4\u503c\uff1a + *
            +         *  {
            +         *   property : 'children',
            +         *   dataType : 'json'
            +         * }
            +         * 
            + * @type {Object} + */ + defaultLoaderCfg : { + value : { + property : 'children', + dataType : 'json' + } + }, + disabled : { + sync : false + }, + isDecorateChild : { + value : true + }, + xview : { + value : containerView + } + } + },{ + xclass : 'form-field-container' + } + ); + container.View = containerView; + return container; + +});/** + * @fileOverview \u8868\u5355\u6587\u672c\u57df\u7ec4\uff0c\u53ef\u4ee5\u5305\u542b\u4e00\u4e2a\u81f3\u591a\u4e2a\u5b57\u6bb5 + * @author dxq613@gmail.com + * @ignore + */ + +define('bui/form/group/base',['bui/common','bui/form/fieldcontainer'],function (require) { + var BUI = require('bui/common'), + FieldContainer = require('bui/form/fieldcontainer'); + + /** + * @class BUI.Form.Group + * \u8868\u5355\u5b57\u6bb5\u5206\u7ec4 + * @extends BUI.Form.FieldContainer + */ + var Group = FieldContainer.extend({ + + },{ + ATTRS : { + /** + * \u6807\u9898 + * @type {String} + */ + label : { + view : true + }, + defaultChildClass : { + value : 'form-field' + } + } + },{ + xclass:'form-group' + }); + + return Group; +});/** + * @fileOverview \u8303\u56f4\u7684\u5b57\u6bb5\u7ec4\uff0c\u6bd4\u5982\u65e5\u671f\u8303\u56f4\u7b49 + * @ignore + */ + +define('bui/form/group/range',['bui/form/group/base'],function (require) { + var Group = require('bui/form/group/base'); + + function testRange (self,curVal,prevVal) { + var allowEqual = self.get('allowEqual'); + + if(allowEqual){ + return prevVal <= curVal; + } + + return prevVal < curVal; + } + /** + * @class BUI.Form.Group.Range + * \u5b57\u6bb5\u8303\u56f4\u5206\u7ec4\uff0c\u7528\u4e8e\u65e5\u671f\u8303\u56f4\uff0c\u6570\u5b57\u8303\u56f4\u7b49\u573a\u666f + * @extends BUI.Form.Group + */ + var Range = Group.extend({ + + },{ + ATTRS : { + /** + * \u9ed8\u8ba4\u7684\u9a8c\u8bc1\u51fd\u6570\u5931\u8d25\u540e\u663e\u793a\u7684\u6587\u672c\u3002 + * @type {Object} + */ + rangeText : { + value : '\u5f00\u59cb\u4e0d\u80fd\u5927\u4e8e\u7ed3\u675f\uff01' + }, + /** + * \u662f\u5426\u5141\u8bb8\u524d\u540e\u76f8\u7b49 + * @type {Boolean} + */ + allowEqual : { + value : true + }, + /** + * \u9a8c\u8bc1\u5668 + * @override + * @type {Function} + */ + validator : { + value : function (record) { + var _self = this, + fields = _self.getFields(), + valid = true; + for(var i = 1; i < fields.length ; i ++){ + var cur = fields[i], + prev = fields[i-1], + curVal, + prevVal; + if(cur && prev){ + curVal = cur.get('value'); + prevVal = prev.get('value'); + if(!testRange(_self,curVal,prevVal)){ + valid = false; + break; + } + } + } + if(!valid){ + return _self.get('rangeText'); + } + return null; + } + } + } + },{ + xclass : 'form-group-range' + }); + + return Range; +});/** + * @fileOverview \u9009\u62e9\u5206\u7ec4\uff0c\u5305\u542b\uff0ccheckbox,radio + * @ignore + */ + +define('bui/form/group/check',['bui/form/group/base'],function (require) { + var Group = require('bui/form/group/base'); + + function getFieldName (self) { + var firstField = self.getFieldAt(0); + if(firstField){ + return firstField.get('name'); + } + return ''; + } + /** + * @class BUI.Form.Group.Check + * \u5355\u9009\uff0c\u590d\u9009\u5206\u7ec4\uff0c\u53ea\u80fd\u5305\u542b\u540cname\u7684checkbox,radio + * @extends BUI.Form.Group + */ + var Check = Group.extend({ + bindUI : function(){ + var _self = this; + _self.on('change',function(ev){ + var name = getFieldName(_self), + range = _self.get('range'), + record = _self.getRecord(), + value = record[name], + max = range[1]; + if(value && value.length >= max){ + _self._setFieldsEnable(name,false); + }else{ + _self._setFieldsEnable(name,true); + } + }); + }, + _setFieldsEnable : function(name,enable){ + + var _self = this, + fields = _self.getFields(name); + BUI.each(fields,function(field){ + if(enable){ + field.enable(); + }else{ + if(!field.get('checked')){ + field.disable(); + } + } + }); + }, + _uiSetRange : function(v){ + this.addRule('checkRange',v); + } + + },{ + ATTRS : { + /** + * \u9700\u8981\u9009\u4e2d\u7684\u5b57\u6bb5, + *
              + *
            1. \u5982\u679c range:1\uff0crange:2 \u6700\u5c11\u52fe\u90091\u4e2a\uff0c2\u4e2a\u3002
            2. + *
            3. \u5982\u679c range :0,\u53ef\u4ee5\u5168\u90e8\u4e0d\u9009\u4e2d\u3002
            4. + *
            5. \u5982\u679c range:[1,2],\u5219\u5fc5\u987b\u9009\u4e2d1-2\u4e2a\u3002
            6. + *
            + * @type {Array|Number} + */ + range : { + setter : function (v) { + if(BUI.isString(v) || BUI.isNumber(v)){ + v = [parseInt(v)]; + } + return v; + } + } + } + },{ + xclass : 'form-group-check' + }); + + return Check; + +});/** + * @fileOverview \u9009\u62e9\u6846\u5206\u7ec4 + * @ignore + */ + +define('bui/form/group/select',['bui/form/group/base','bui/data'],function (require) { + var Group = require('bui/form/group/base'), + Data = require('bui/data'), + Bindable = BUI.Component.UIBase.Bindable; + + function getItems(nodes){ + var items = []; + BUI.each(nodes,function(node){ + items.push({ + text : node.text, + value : node.id + }); + }); + return items; + } + + /** + * @class BUI.Form.Group.Select + * \u7ea7\u8054\u9009\u62e9\u6846\u5206\u7ec4 + * @extends BUI.Form.Group + * @mixins BUI.Component.UIBase.Bindable + */ + var Select = Group.extend([Bindable],{ + initializer : function(){ + var _self = this, + url = _self.get('url'), + store = _self.get('store') || _self._getStore(); + if(!store.isStore){ + store.autoLoad = true; + if(url){ + store.url = url; + } + store = new Data.TreeStore(store); + _self.set('store',store); + } + }, + bindUI : function () { + var _self = this; + _self.on('change',function (ev) { + var target = ev.target; + if(target != _self){ + var field = target, + value = field.get('value'), + level = _self._getFieldIndex(field) + 1; + _self._valueChange(value,level); + } + }); + }, + onLoad : function(e){ + var _self = this, + node = e ? e.node : _self.get('store').get('root'); + _self._setFieldItems(node.level,node.children); + }, + //\u83b7\u53d6store\u7684\u914d\u7f6e\u9879 + _getStore : function(){ + var _self = this, + type = _self.get('type'); + if(type && TypeMap[type]){ + return TypeMap[type]; + } + return {}; + }, + _valueChange : function(value,level){ + var _self = this, + store = _self.get('store'); + if(value){ + var node = store.findNode(value); + if(!node){ + return; + } + if(store.isLoaded(node)){ + _self._setFieldItems(level,node.children); + }else{ + store.loadNode(node); + } + }else{ + _self._setFieldItems(level,[]); + } + }, + _setFieldItems : function(level,nodes){ + var _self = this, + field = _self.getFieldAt(level), + items = getItems(nodes); + if(field){ + field.setItems(items); + _self._valueChange(field.get('value'),level + 1); + } + }, + //\u83b7\u53d6\u5b57\u6bb5\u7684\u7d22\u5f15\u4f4d\u7f6e + _getFieldIndex : function (field) { + var _self = this, + fields = _self.getFields(); + return BUI.Array.indexOf(field,fields); + } + },{ + ATTRS : { + /** + * \u7ea7\u8054\u9009\u62e9\u6846\u7684\u7c7b\u578b,\u76ee\u524d\u4ec5\u5185\u7f6e\u4e86 'city'\u4e00\u4e2a\u7c7b\u578b\uff0c\u7528\u4e8e\u9009\u62e9\u7701\u3001\u5e02\u3001\u53bf, + * \u53ef\u4ee5\u81ea\u5b9a\u4e49\u6dfb\u52a0\u7c7b\u578b + * Select.addType('city',{ + * proxy : { + * url : 'http://lp.taobao.com/go/rgn/citydistrictdata.php', + * dataType : 'jsonp' + * }, + * map : { + * isleaf : 'leaf', + * value : 'text' + * } + * }); + * @type {String} + */ + type : { + + }, + store : { + + } + } + },{ + xclass : 'form-group-select' + }); + + var TypeMap = {}; + + /** + * \u6dfb\u52a0\u4e00\u4e2a\u7c7b\u578b\u7684\u7ea7\u8054\u9009\u62e9\u6846\uff0c\u76ee\u524d\u4ec5\u5185\u7f6e\u4e86 'city'\u4e00\u4e2a\u7c7b\u578b\uff0c\u7528\u4e8e\u9009\u62e9\u7701\u3001\u5e02\u3001\u53bf + * @static + * @param {String} name \u7c7b\u578b\u540d\u79f0 + * @param {Object} cfg \u914d\u7f6e\u9879\uff0c\u8be6\u7ec6\u4fe1\u606f\u8bf7\u53c2\u770b\uff1a @see{BUI.Data.TreeStore} + */ + Select.addType = function(name,cfg){ + TypeMap[name] = cfg; + }; + + Select.addType('city',{ + proxy : { + url : 'http://lp.taobao.com/go/rgn/citydistrictdata.php', + dataType : 'jsonp' + }, + map : { + isleaf : 'leaf', + value : 'text' + } + }); + + + return Select; +});/** + * @fileOverview \u8868\u5355\u6587\u672c\u57df\u7ec4\uff0c\u53ef\u4ee5\u5305\u542b\u4e00\u4e2a\u81f3\u591a\u4e2a\u5b57\u6bb5 + * @author dxq613@gmail.com + * @ignore + */ + +define('bui/form/fieldgroup',['bui/common','bui/form/group/base','bui/form/group/range','bui/form/group/check','bui/form/group/select'],function (require) { + var BUI = require('bui/common'), + Group = require('bui/form/group/base'); + + BUI.mix(Group,{ + Range : require('bui/form/group/range'), + Check : require('bui/form/group/check'), + Select : require('bui/form/group/select') + }); + return Group; +});/** + * @fileOverview \u521b\u5efa\u8868\u5355 + * @ignore + */ + +define('bui/form/form',['bui/common','bui/toolbar','bui/form/fieldcontainer'],function (require) { + + var BUI = require('bui/common'), + Bar = require('bui/toolbar').Bar, + FieldContainer = require('bui/form/fieldcontainer'), + Component = BUI.Component; + + var FormView = FieldContainer.View.extend({ + _uiSetMethod : function(v){ + this.get('el').attr('method',v); + }, + _uiSetAction : function(v){ + this.get('el').attr('action',v); + } + },{ + ATTRS : { + method : {}, + action : {} + } + },{ + xclass: 'form-view' + }); + + /** + * @class BUI.Form.Form + * \u8868\u5355\u63a7\u4ef6,\u8868\u5355\u76f8\u5173\u7684\u7c7b\u56fe\uff1a + * + * @extends BUI.Form.FieldContainer + */ + var Form = FieldContainer.extend({ + renderUI : function(){ + var _self = this, + buttonBar = _self.get('buttonBar'), + cfg; + if($.isPlainObject(buttonBar) && _self.get('buttons')){ + cfg = BUI.merge(_self.getDefaultButtonBarCfg(),buttonBar); + buttonBar = new Bar(cfg); + _self.set('buttonBar',buttonBar); + } + }, + bindUI : function(){ + var _self = this, + formEl = _self.get('el'); + + formEl.on('submit',function(ev){ + _self.valid(); + if(!_self.isValid() || _self.onBeforeSubmit() === false){ + ev.preventDefault(); + } + }); + }, + /** + * \u83b7\u53d6\u6309\u94ae\u680f\u9ed8\u8ba4\u7684\u914d\u7f6e\u9879 + * @protected + * @return {Object} + */ + getDefaultButtonBarCfg : function(){ + var _self = this, + buttons = _self.get('buttons'); + return { + autoRender : true, + elCls :'toolbar', + render : _self.get('el'), + items : buttons, + defaultChildClass : 'bar-item-button' + }; + }, + /** + * \u8868\u5355\u63d0\u4ea4\uff0c\u5982\u679c\u672a\u901a\u8fc7\u9a8c\u8bc1\uff0c\u5219\u963b\u6b62\u63d0\u4ea4 + */ + submit : function(options){ + var _self = this; + _self.valid(); + if(_self.isValid()){ + if(_self.onBeforeSubmit() == false){ + return; + } + if(!options){ + _self.get('el')[0].submit(); + } + } + }, + /** + * \u5e8f\u5217\u5316\u8868\u5355\u6210\u5bf9\u8c61 + * @return {Object} \u5e8f\u5217\u5316\u6210\u5bf9\u8c61 + */ + serializeToObject : function(){ + return BUI.FormHelper.serializeToObject(this.get('el')[0]); + }, + /** + * \u8868\u5355\u63d0\u4ea4\u524d + * @protected + * @return {Boolean} \u662f\u5426\u53d6\u6d88\u63d0\u4ea4 + */ + onBeforeSubmit : function(){ + return this.fire('beforesubmit'); + }, + /** + * \u8868\u5355\u6062\u590d\u521d\u59cb\u503c + */ + reset : function(){ + var _self = this, + initRecord = _self.get('initRecord'); + _self.setRecord(initRecord); + }, + /** + * \u91cd\u7f6e\u63d0\u793a\u4fe1\u606f\uff0c\u56e0\u4e3a\u5728\u8868\u5355\u9690\u85cf\u72b6\u6001\u4e0b\uff0c\u63d0\u793a\u4fe1\u606f\u5b9a\u4f4d\u9519\u8bef + *
            
            +     * dialog.on('show',function(){
            +     *   form.resetTips();
            +     * });
            +     *   
            +     * 
            + */ + resetTips : function(){ + var _self = this, + fields = _self.getFields(); + BUI.each(fields,function(field){ + field.resetTip(); + }); + }, + /** + * @protected + * @ignore + */ + destructor : function(){ + var _self = this, + buttonBar = _self.get('buttonBar'); + if(buttonBar && buttonBar.destroy){ + buttonBar.destroy(); + } + }, + //\u8bbe\u7f6e\u8868\u5355\u7684\u521d\u59cb\u6570\u636e + _uiSetInitRecord : function(v){ + //if(v){ + this.setRecord(v); + //} + + } + },{ + ATTRS : { + /** + * \u63d0\u4ea4\u7684\u8def\u5f84 + * @type {String} + */ + action : { + view : true, + value : '' + }, + allowTextSelection:{ + value : true + }, + events : { + value : { + /** + * @event + * \u8868\u5355\u63d0\u4ea4\u524d\u89e6\u53d1\uff0c\u5982\u679c\u8fd4\u56defalse\u4f1a\u963b\u6b62\u8868\u5355\u63d0\u4ea4 + */ + beforesubmit : false + } + }, + /** + * \u63d0\u4ea4\u7684\u65b9\u5f0f + * @type {String} + */ + method : { + view : true, + value : 'get' + }, + decorateCfgFields : { + value : { + 'method' : true, + 'action' : true + } + }, + /** + * \u9ed8\u8ba4\u7684\u5b50\u63a7\u4ef6\u65f6\u6587\u672c\u57df + * @type {String} + */ + defaultChildClass : { + value : 'form-field' + }, + /** + * \u4f7f\u7528\u7684\u6807\u7b7e\uff0c\u4e3aform + * @type {String} + */ + elTagName : { + value : 'form' + }, + /** + * \u8868\u5355\u6309\u94ae + * @type {Array} + */ + buttons : { + + }, + /** + * \u6309\u94ae\u680f + * @type {BUI.Toolbar.Bar} + */ + buttonBar : { + value : { + + } + }, + childContainer : { + value : '.x-form-fields' + }, + /** + * \u8868\u5355\u521d\u59cb\u5316\u7684\u6570\u636e\uff0c\u7528\u4e8e\u521d\u59cb\u5316\u6216\u8005\u8868\u5355\u56de\u6eda + * @type {Object} + */ + initRecord : { + + }, + /** + * \u8868\u5355\u9ed8\u8ba4\u4e0d\u663e\u793a\u9519\u8bef\uff0c\u4e0d\u5f71\u54cd\u8868\u5355\u5206\u7ec4\u548c\u8868\u5355\u5b57\u6bb5 + * @type {Boolean} + */ + showError : { + value : false + }, + xview : { + value : FormView + }, + tpl : { + value : '
            ' + } + } + },{ + xclass : 'form' + }); + + Form.View = FormView; + return Form; +});/** + * @fileOverview \u5782\u76f4\u8868\u5355 + * @ignore + */ + +define('bui/form/horizontal',['bui/common','bui/form/form'],function (require) { + var BUI = require('bui/common'), + Form = require('bui/form/form'); + + /** + * @class BUI.Form.Horizontal + * \u6c34\u5e73\u8868\u5355\uff0c\u5b57\u6bb5\u6c34\u5e73\u6392\u5217 + * @extends BUI.Form.Form + * + */ + var Horizontal = Form.extend({ + /** + * \u83b7\u53d6\u6309\u94ae\u680f\u9ed8\u8ba4\u7684\u914d\u7f6e\u9879 + * @protected + * @return {Object} + */ + getDefaultButtonBarCfg : function(){ + var _self = this, + buttons = _self.get('buttons'); + return { + autoRender : true, + elCls : 'actions-bar toolbar row', + tpl : '
            ', + childContainer : '.form-actions', + render : _self.get('el'), + items : buttons, + defaultChildClass : 'bar-item-button' + }; + } + },{ + ATTRS : { + defaultChildClass : { + value : 'form-row' + }, + errorTpl : { + value : '!{error}' + }, + elCls : { + value : 'form-horizontal' + } + }, + PARSER : { + + } + },{ + xclass : 'form-horizontal' + }); + return Horizontal; +});/** + * @fileOverview \u8868\u5355\u91cc\u7684\u4e00\u884c\u5143\u7d20 + * @ignore + */ + +define('bui/form/row',['bui/common','bui/form/fieldcontainer'],function (require) { + var BUI = require('bui/common'), + FieldContainer = require('bui/form/fieldcontainer'); + + /** + * @class BUI.Form.Row + * \u8868\u5355\u884c + * @extends BUI.Form.FieldContainer + */ + var Row = FieldContainer.extend({ + + },{ + ATTRS : { + elCls : { + value : 'row' + }, + defaultChildCfg:{ + value : { + tpl : ' \ +
            \ +
            ', + childContainer : '.controls', + showOneError : true, + controlContainer : '.controls', + elCls : 'control-group span8', + errorTpl : '!{error}' + } + + }, + defaultChildClass : { + value : 'form-field-text' + } + } + },{ + xclass:'form-row' + }); + + return Row; +});/** + * @fileOverview \u9a8c\u8bc1\u89c4\u5219 + * @ignore + */ + +define('bui/form/rule',['bui/common'],function (require) { + + var BUI = require('bui/common'); + /** + * @class BUI.Form.Rule + * \u9a8c\u8bc1\u89c4\u5219 + * @extends BUI.Base + */ + var Rule = function (config){ + Rule.superclass.constructor.call(this,config); + } + + BUI.extend(Rule,BUI.Base); + + Rule.ATTRS = { + /** + * \u89c4\u5219\u540d\u79f0 + * @type {String} + */ + name : { + + }, + /** + * \u9a8c\u8bc1\u5931\u8d25\u4fe1\u606f + * @type {String} + */ + msg : { + + }, + /** + * \u9a8c\u8bc1\u51fd\u6570 + * @type {Function} + */ + validator : { + value : function(value,baseValue,formatedMsg,control){ + + } + } + } + + //\u662f\u5426\u901a\u8fc7\u9a8c\u8bc1 + function valid(self,value,baseValue,msg,control){ + var _self = self, + validator = _self.get('validator'), + formatedMsg = formatError(self,baseValue,msg), + valid = true; + value = value == null ? '' : value; + return validator.call(_self,value,baseValue,formatedMsg,control); + } + + function parseParams(values){ + + if(values == null){ + return {}; + } + + if($.isPlainObject(values)){ + return values; + } + + var ars = values, + rst = {}; + if(BUI.isArray(values)){ + + for(var i = 0; i < ars.length; i++){ + rst[i] = ars[i]; + } + return rst; + } + + return {'0' : values}; + } + + function formatError(self,values,msg){ + var ars = parseParams(values); + msg = msg || self.get('msg'); + return BUI.substitute(msg,ars); + } + + BUI.augment(Rule,{ + + /** + * \u662f\u5426\u901a\u8fc7\u9a8c\u8bc1\uff0c\u8be5\u51fd\u6570\u53ef\u4ee5\u63a5\u6536\u591a\u4e2a\u53c2\u6570 + * @param {*} [value] \u9a8c\u8bc1\u7684\u503c + * @param {*} [baseValue] \u8ddf\u4f20\u5165\u503c\u76f8\u6bd4\u8f83\u7684\u503c + * @param {String} [msg] \u9a8c\u8bc1\u5931\u8d25\u540e\u7684\u9519\u8bef\u4fe1\u606f\uff0c\u663e\u793a\u7684\u9519\u8bef\u4e2d\u53ef\u4ee5\u663e\u793a baseValue\u4e2d\u7684\u4fe1\u606f + * @param {BUI.Form.Field|BUI.Form.Group} [control] \u53d1\u751f\u9a8c\u8bc1\u7684\u63a7\u4ef6 + * @return {String} \u901a\u8fc7\u9a8c\u8bc1\u8fd4\u56de null ,\u672a\u901a\u8fc7\u9a8c\u8bc1\u8fd4\u56de\u9519\u8bef\u4fe1\u606f + * + * var msg = '\u8f93\u5165\u6570\u636e\u5fc5\u987b\u5728{0}\u548c{1}\u4e4b\u95f4\uff01', + * rangeRule = new Rule({ + * name : 'range', + * msg : msg, + * validator :function(value,range,msg){ + * var min = range[0], //\u6b64\u5904\u6211\u4eec\u628arange\u5b9a\u4e49\u4e3a\u6570\u7ec4\uff0c\u4e5f\u53ef\u4ee5\u5b9a\u4e49\u4e3a{min:0,max:200},\u90a3\u4e48\u5728\u4f20\u5165\u6821\u9a8c\u65f6\u8ddf\u6b64\u5904\u4e00\u81f4\u5373\u53ef + * max = range[1]; //\u5728\u9519\u8bef\u4fe1\u606f\u4e2d\uff0c\u4f7f\u7528\u7528 '\u8f93\u5165\u6570\u636e\u5fc5\u987b\u5728{min}\u548c{max}\u4e4b\u95f4\uff01',\u9a8c\u8bc1\u51fd\u6570\u4e2d\u7684\u5b57\u7b26\u4e32\u5df2\u7ecf\u8fdb\u884c\u683c\u5f0f\u5316 + * if(value < min || value > max){ + * return false; + * } + * return true; + * } + * }); + * var range = [0,200], + * val = 100, + * error = rangeRule.valid(val,range);//msg\u53ef\u4ee5\u5728\u6b64\u5904\u91cd\u65b0\u4f20\u5165 + * + */ + valid : function(value,baseValue,msg,control){ + var _self = this; + return valid(_self,value,baseValue,msg,control); + } + }); + + return Rule; + + +});/** + * @fileOverview \u9a8c\u8bc1\u96c6\u5408 + * @ignore + */ + +define('bui/form/rules',['bui/form/rule'],function (require) { + + var Rule = require('bui/form/rule'); + + function toNumber(value){ + return parseFloat(value); + } + + function toDate(value){ + return BUI.Date.parse(value); + } + + var ruleMap = { + + }; + + /** + * @class BUI.Form.Rules + * @singleton + * \u8868\u5355\u9a8c\u8bc1\u7684\u9a8c\u8bc1\u89c4\u5219\u7ba1\u7406\u5668 + */ + var rules = { + /** + * \u6dfb\u52a0\u9a8c\u8bc1\u89c4\u5219 + * @param {Object|BUI.Form.Rule} rule \u9a8c\u8bc1\u89c4\u5219\u914d\u7f6e\u9879\u6216\u8005\u9a8c\u8bc1\u89c4\u5219\u5bf9\u8c61 + * @param {String} name \u89c4\u5219\u540d\u79f0 + */ + add : function(rule){ + var name; + if($.isPlainObject(rule)){ + name = rule.name; + ruleMap[name] = new Rule(rule); + }else if(rule.get){ + name = rule.get('name'); + ruleMap[name] = rule; + } + return ruleMap[name]; + }, + /** + * \u5220\u9664\u9a8c\u8bc1\u89c4\u5219 + * @param {String} name \u89c4\u5219\u540d\u79f0 + */ + remove : function(name){ + delete ruleMap[name]; + }, + /** + * \u83b7\u53d6\u9a8c\u8bc1\u89c4\u5219 + * @param {String} name \u89c4\u5219\u540d\u79f0 + * @return {BUI.Form.Rule} \u9a8c\u8bc1\u89c4\u5219 + */ + get : function(name){ + return ruleMap[name]; + }, + /** + * \u9a8c\u8bc1\u6307\u5b9a\u7684\u89c4\u5219 + * @param {String} name \u89c4\u5219\u7c7b\u578b + * @param {*} value \u9a8c\u8bc1\u503c + * @param {*} [baseValue] \u7528\u4e8e\u9a8c\u8bc1\u7684\u57fa\u7840\u503c + * @param {String} [msg] \u663e\u793a\u9519\u8bef\u7684\u6a21\u677f + * @param {BUI.Form.Field|BUI.Form.Group} [control] \u663e\u793a\u9519\u8bef\u7684\u6a21\u677f + * @return {String} \u901a\u8fc7\u9a8c\u8bc1\u8fd4\u56de null,\u5426\u5219\u8fd4\u56de\u9519\u8bef\u4fe1\u606f + */ + valid : function(name,value,baseValue,msg,control){ + var rule = rules.get(name); + if(rule){ + return rule.valid(value,baseValue,msg,control); + } + return null; + }, + /** + * \u9a8c\u8bc1\u6307\u5b9a\u7684\u89c4\u5219 + * @param {String} name \u89c4\u5219\u7c7b\u578b + * @param {*} values \u9a8c\u8bc1\u503c + * @param {*} [baseValue] \u7528\u4e8e\u9a8c\u8bc1\u7684\u57fa\u7840\u503c + * @param {BUI.Form.Field|BUI.Form.Group} [control] \u663e\u793a\u9519\u8bef\u7684\u6a21\u677f + * @return {Boolean} \u662f\u5426\u901a\u8fc7\u9a8c\u8bc1 + */ + isValid : function(name,value,baseValue,control){ + return rules.valid(name,value,baseValue,control) == null; + } + }; + + /** + * \u975e\u7a7a\u9a8c\u8bc1,\u4f1a\u5bf9\u503c\u53bb\u9664\u7a7a\u683c + *
              + *
            1. name: required
            2. + *
            3. msg: \u4e0d\u80fd\u4e3a\u7a7a\uff01
            4. + *
            5. required: boolean \u7c7b\u578b
            6. + *
            + * @member BUI.Form.Rules + * @type {BUI.Form.Rule} + */ + var required = rules.add({ + name : 'required', + msg : '\u4e0d\u80fd\u4e3a\u7a7a\uff01', + validator : function(value,required,formatedMsg){ + if(required !== false && /^\s*$/.test(value)){ + return formatedMsg; + } + } + }); + + /** + * \u76f8\u7b49\u9a8c\u8bc1 + *
              + *
            1. name: equalTo
            2. + *
            3. msg: \u4e24\u6b21\u8f93\u5165\u4e0d\u4e00\u81f4\uff01
            4. + *
            5. equalTo: \u4e00\u4e2a\u5b57\u7b26\u4e32\uff0cid\uff08#id_name) \u6216\u8005 name
            6. + *
            + * { + * equalTo : '#password' + * } + * //\u6216\u8005 + * { + * equalTo : 'password' + * } + * @member BUI.Form.Rules + * @type {BUI.Form.Rule} + */ + var equalTo = rules.add({ + name : 'equalTo', + msg : '\u4e24\u6b21\u8f93\u5165\u4e0d\u4e00\u81f4\uff01', + validator : function(value,equalTo,formatedMsg){ + var el = $(equalTo); + if(el.length){ + equalTo = el.val(); + } + return value === equalTo ? undefined : formatedMsg; + } + }); + + + /** + * \u4e0d\u5c0f\u4e8e\u9a8c\u8bc1 + *
              + *
            1. name: min
            2. + *
            3. msg: \u8f93\u5165\u503c\u4e0d\u80fd\u5c0f\u4e8e{0}\uff01
            4. + *
            5. min: \u6570\u5b57\uff0c\u5b57\u7b26\u4e32
            6. + *
            + * { + * min : 5 + * } + * //\u5b57\u7b26\u4e32 + * @member BUI.Form.Rules + * @type {BUI.Form.Rule} + */ + var min = rules.add({ + name : 'min', + msg : '\u8f93\u5165\u503c\u4e0d\u80fd\u5c0f\u4e8e{0}\uff01', + validator : function(value,min,formatedMsg){ + if(value !== '' && toNumber(value) < toNumber(min)){ + return formatedMsg; + } + } + }); + + /** + * \u4e0d\u5c0f\u4e8e\u9a8c\u8bc1,\u7528\u4e8e\u6570\u503c\u6bd4\u8f83 + *
              + *
            1. name: max
            2. + *
            3. msg: \u8f93\u5165\u503c\u4e0d\u80fd\u5927\u4e8e{0}\uff01
            4. + *
            5. max: \u6570\u5b57\u3001\u5b57\u7b26\u4e32
            6. + *
            + * { + * max : 100 + * } + * //\u5b57\u7b26\u4e32 + * { + * max : '100' + * } + * @member BUI.Form.Rules + * @type {BUI.Form.Rule} + */ + var max = rules.add({ + name : 'max', + msg : '\u8f93\u5165\u503c\u4e0d\u80fd\u5927\u4e8e{0}\uff01', + validator : function(value,max,formatedMsg){ + if(value !== '' && toNumber(value) > toNumber(max)){ + return formatedMsg; + } + } + }); + + /** + * \u8f93\u5165\u957f\u5ea6\u9a8c\u8bc1\uff0c\u5fc5\u987b\u662f\u6307\u5b9a\u7684\u957f\u5ea6 + *
              + *
            1. name: length
            2. + *
            3. msg: \u8f93\u5165\u503c\u957f\u5ea6\u4e3a{0}\uff01
            4. + *
            5. length: \u6570\u5b57
            6. + *
            + * @member BUI.Form.Rules + * @type {BUI.Form.Rule} + */ + var length = rules.add({ + name : 'length', + msg : '\u8f93\u5165\u503c\u957f\u5ea6\u4e3a{0}\uff01', + validator : function(value,len,formatedMsg){ + if(value != null){ + value = $.trim(value.toString()); + if(len != value.length){ + return formatedMsg; + } + } + } + }); + /** + * \u6700\u77ed\u957f\u5ea6\u9a8c\u8bc1,\u4f1a\u5bf9\u503c\u53bb\u9664\u7a7a\u683c + *
              + *
            1. name: minlength
            2. + *
            3. msg: \u8f93\u5165\u503c\u957f\u5ea6\u4e0d\u5c0f\u4e8e{0}\uff01
            4. + *
            5. minlength: \u6570\u5b57
            6. + *
            + * { + * minlength : 5 + * } + * @member BUI.Form.Rules + * @type {BUI.Form.Rule} + */ + var minlength = rules.add({ + name : 'minlength', + msg : '\u8f93\u5165\u503c\u957f\u5ea6\u4e0d\u5c0f\u4e8e{0}\uff01', + validator : function(value,min,formatedMsg){ + if(value != null){ + value = $.trim(value.toString()); + var len = value.length; + if(len < min){ + return formatedMsg; + } + } + } + }); + + /** + * \u6700\u77ed\u957f\u5ea6\u9a8c\u8bc1,\u4f1a\u5bf9\u503c\u53bb\u9664\u7a7a\u683c + *
              + *
            1. name: maxlength
            2. + *
            3. msg: \u8f93\u5165\u503c\u957f\u5ea6\u4e0d\u5927\u4e8e{0}\uff01
            4. + *
            5. maxlength: \u6570\u5b57
            6. + *
            + * { + * maxlength : 10 + * } + * @member BUI.Form.Rules + * @type {BUI.Form.Rule} + */ + var maxlength = rules.add({ + name : 'maxlength', + msg : '\u8f93\u5165\u503c\u957f\u5ea6\u4e0d\u5927\u4e8e{0}\uff01', + validator : function(value,max,formatedMsg){ + if(value){ + value = $.trim(value.toString()); + var len = value.length; + if(len > max){ + return formatedMsg; + } + } + } + }); + + /** + * \u6b63\u5219\u8868\u8fbe\u5f0f\u9a8c\u8bc1,\u5982\u679c\u6b63\u5219\u8868\u8fbe\u5f0f\u4e3a\u7a7a\uff0c\u5219\u4e0d\u8fdb\u884c\u6821\u9a8c + *
              + *
            1. name: regexp
            2. + *
            3. msg: \u8f93\u5165\u503c\u4e0d\u7b26\u5408{0}\uff01
            4. + *
            5. regexp: \u6b63\u5219\u8868\u8fbe\u5f0f
            6. + *
            + * @member BUI.Form.Rules + * @type {BUI.Form.Rule} + */ + var regexp = rules.add({ + name : 'regexp', + msg : '\u8f93\u5165\u503c\u4e0d\u7b26\u5408{0}\uff01', + validator : function(value,regexp,formatedMsg){ + if(regexp){ + return regexp.test(value) ? undefined : formatedMsg; + } + } + }); + + /** + * \u90ae\u7bb1\u9a8c\u8bc1,\u4f1a\u5bf9\u503c\u53bb\u9664\u7a7a\u683c\uff0c\u65e0\u6570\u636e\u4e0d\u8fdb\u884c\u6821\u9a8c + *
              + *
            1. name: email
            2. + *
            3. msg: \u4e0d\u662f\u6709\u6548\u7684\u90ae\u7bb1\u5730\u5740\uff01
            4. + *
            + * @member BUI.Form.Rules + * @type {BUI.Form.Rule} + */ + var email = rules.add({ + name : 'email', + msg : '\u4e0d\u662f\u6709\u6548\u7684\u90ae\u7bb1\u5730\u5740\uff01', + validator : function(value,baseValue,formatedMsg){ + value = $.trim(value); + if(value){ + return /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(value) ? undefined : formatedMsg; + } + } + }); + + /** + * \u65e5\u671f\u9a8c\u8bc1\uff0c\u4f1a\u5bf9\u503c\u53bb\u9664\u7a7a\u683c\uff0c\u65e0\u6570\u636e\u4e0d\u8fdb\u884c\u6821\u9a8c\uff0c + * \u5982\u679c\u4f20\u5165\u7684\u503c\u4e0d\u662f\u5b57\u7b26\u4e32\uff0c\u800c\u662f\u6570\u5b57\uff0c\u5219\u8ba4\u4e3a\u662f\u6709\u6548\u503c + *
              + *
            1. name: date
            2. + *
            3. msg: \u4e0d\u662f\u6709\u6548\u7684\u65e5\u671f\uff01
            4. + *
            + * @member BUI.Form.Rules + * @type {BUI.Form.Rule} + */ + var date = rules.add({ + name : 'date', + msg : '\u4e0d\u662f\u6709\u6548\u7684\u65e5\u671f\uff01', + validator : function(value,baseValue,formatedMsg){ + if(BUI.isNumber(value)){ //\u6570\u5b57\u8ba4\u4e3a\u662f\u65e5\u671f + return; + } + if(BUI.isDate(value)){ + return; + } + value = $.trim(value); + if(value){ + return BUI.Date.isDateString(value) ? undefined : formatedMsg; + } + } + }); + + /** + * \u4e0d\u5c0f\u4e8e\u9a8c\u8bc1 + *
              + *
            1. name: minDate
            2. + *
            3. msg: \u8f93\u5165\u65e5\u671f\u4e0d\u80fd\u5c0f\u4e8e{0}\uff01
            4. + *
            5. minDate: \u65e5\u671f\uff0c\u5b57\u7b26\u4e32
            6. + *
            + * { + * minDate : '2001-01-01'; + * } + * //\u5b57\u7b26\u4e32 + * @member BUI.Form.Rules + * @type {BUI.Form.Rule} + */ + var minDate = rules.add({ + name : 'minDate', + msg : '\u8f93\u5165\u65e5\u671f\u4e0d\u80fd\u5c0f\u4e8e{0}\uff01', + validator : function(value,minDate,formatedMsg){ + if(value){ + var date = toDate(value); + if(date && date < toDate(minDate)){ + return formatedMsg; + } + } + } + }); + + /** + * \u4e0d\u5c0f\u4e8e\u9a8c\u8bc1,\u7528\u4e8e\u6570\u503c\u6bd4\u8f83 + *
              + *
            1. name: maxDate
            2. + *
            3. msg: \u8f93\u5165\u503c\u4e0d\u80fd\u5927\u4e8e{0}\uff01
            4. + *
            5. maxDate: \u65e5\u671f\u3001\u5b57\u7b26\u4e32
            6. + *
            + * { + * maxDate : '2001-01-01'; + * } + * //\u6216\u65e5\u671f + * { + * maxDate : new Date('2001-01-01'); + * } + * @member BUI.Form.Rules + * @type {BUI.Form.Rule} + */ + var maxDate = rules.add({ + name : 'maxDate', + msg : '\u8f93\u5165\u65e5\u671f\u4e0d\u80fd\u5927\u4e8e{0}\uff01', + validator : function(value,maxDate,formatedMsg){ + if(value){ + var date = toDate(value); + if(date && date > toDate(maxDate)){ + return formatedMsg; + } + } + } + }); + /** + * \u6570\u5b57\u9a8c\u8bc1\uff0c\u4f1a\u5bf9\u503c\u53bb\u9664\u7a7a\u683c\uff0c\u65e0\u6570\u636e\u4e0d\u8fdb\u884c\u6821\u9a8c + * \u5141\u8bb8\u5343\u5206\u7b26\uff0c\u4f8b\u5982\uff1a 12,000,000\u7684\u683c\u5f0f + *
              + *
            1. name: number
            2. + *
            3. msg: \u4e0d\u662f\u6709\u6548\u7684\u6570\u5b57\uff01
            4. + *
            + * @member BUI.Form.Rules + * @type {BUI.Form.Rule} + */ + var number = rules.add({ + name : 'number', + msg : '\u4e0d\u662f\u6709\u6548\u7684\u6570\u5b57\uff01', + validator : function(value,baseValue,formatedMsg){ + if(BUI.isNumber(value)){ + return; + } + value = value.replace(/\,/g,''); + return !isNaN(value) ? undefined : formatedMsg; + } + }); + + //\u6d4b\u8bd5\u8303\u56f4 + function testRange (baseValue,curVal,prevVal) { + var allowEqual = baseValue && (baseValue.equals !== false); + + if(allowEqual){ + return prevVal <= curVal; + } + + return prevVal < curVal; + } + function isEmpty(value){ + return value == '' || value == null; + } + //\u6d4b\u8bd5\u662f\u5426\u540e\u9762\u7684\u6570\u636e\u5927\u4e8e\u524d\u9762\u7684 + function rangeValid(value,baseValue,formatedMsg,group){ + var fields = group.getFields(), + valid = true; + for(var i = 1; i < fields.length ; i ++){ + var cur = fields[i], + prev = fields[i-1], + curVal, + prevVal; + if(cur && prev){ + curVal = cur.get('value'); + prevVal = prev.get('value'); + if(!isEmpty(curVal) && !isEmpty(prevVal) && !testRange(baseValue,curVal,prevVal)){ + valid = false; + break; + } + } + } + if(!valid){ + return formatedMsg; + } + return null; + } + /** + * \u8d77\u59cb\u7ed3\u675f\u65e5\u671f\u9a8c\u8bc1\uff0c\u524d\u9762\u7684\u65e5\u671f\u4e0d\u80fd\u5927\u4e8e\u540e\u9762\u7684\u65e5\u671f + *
              + *
            1. name: dateRange
            2. + *
            3. msg: \u8d77\u59cb\u65e5\u671f\u4e0d\u80fd\u5927\u4e8e\u7ed3\u675f\u65e5\u671f\uff01
            4. + *
            5. dateRange: \u53ef\u4ee5\u4f7ftrue\u6216\u8005{equals : fasle}\uff0c\u6807\u793a\u662f\u5426\u5141\u8bb8\u76f8\u7b49
            6. + *
            + * { + * dateRange : true + * } + * { + * dateRange : {equals : false} + * } + * @member BUI.Form.Rules + * @type {BUI.Form.Rule} + */ + var dateRange = rules.add({ + name : 'dateRange', + msg : '\u7ed3\u675f\u65e5\u671f\u4e0d\u80fd\u5c0f\u4e8e\u8d77\u59cb\u65e5\u671f\uff01', + validator : rangeValid + }); + + /** + * \u6570\u5b57\u8303\u56f4 + *
              + *
            1. name: numberRange
            2. + *
            3. msg: \u8d77\u59cb\u6570\u5b57\u4e0d\u80fd\u5927\u4e8e\u7ed3\u675f\u6570\u5b57\uff01
            4. + *
            5. numberRange: \u53ef\u4ee5\u4f7ftrue\u6216\u8005{equals : fasle}\uff0c\u6807\u793a\u662f\u5426\u5141\u8bb8\u76f8\u7b49
            6. + *
            + * { + * numberRange : true + * } + * { + * numberRange : {equals : false} + * } + * @member BUI.Form.Rules + * @type {BUI.Form.Rule} + */ + var numberRange = rules.add({ + name : 'numberRange', + msg : '\u7ed3\u675f\u6570\u5b57\u4e0d\u80fd\u5c0f\u4e8e\u5f00\u59cb\u6570\u5b57\uff01', + validator : rangeValid + }); + + function getFieldName (self) { + var firstField = self.getFieldAt(0); + if(firstField){ + return firstField.get('name'); + } + return ''; + } + + function testCheckRange(value,range){ + if(!BUI.isArray(range)){ + range = [range]; + } + //\u4e0d\u5b58\u5728\u503c + if(!value || !range.length){ + return false; + } + var len = !value ? 0 : !BUI.isArray(value) ? 1 : value.length; + //\u5982\u679c\u53ea\u6709\u4e00\u4e2a\u9650\u5b9a\u503c + if(range.length == 1){ + var number = range [0]; + if(!number){//range = [0],\u5219\u4e0d\u5fc5\u9009 + return true; + } + if(number > len){ + return false; + } + }else{ + var min = range [0], + max = range[1]; + if(min > len || max < len){ + return false; + } + } + return true; + } + + /** + * \u52fe\u9009\u7684\u8303\u56f4 + *
              + *
            1. name: checkRange
            2. + *
            3. msg: \u5fc5\u987b\u9009\u4e2d{0}\u9879\uff01
            4. + *
            5. checkRange: \u52fe\u9009\u7684\u9879\u8303\u56f4
            6. + *
            + * //\u81f3\u5c11\u52fe\u9009\u4e00\u9879 + * { + * checkRange : 1 + * } + * //\u53ea\u80fd\u52fe\u9009\u4e24\u9879 + * { + * checkRange : [2,2] + * } + * //\u53ef\u4ee5\u52fe\u90092-4\u9879 + * { + * checkRange : [2,4 + * ] + * } + * @member BUI.Form.Rules + * @type {BUI.Form.Rule} + */ + var checkRange = rules.add({ + name : 'checkRange', + msg : '\u5fc5\u987b\u9009\u4e2d{0}\u9879\uff01', + validator : function(record,baseValue,formatedMsg,group){ + var name = getFieldName(group), + value, + range = baseValue; + + if(name && range){ + value = record[name]; + if(!testCheckRange(value,range)){ + return formatedMsg; + } + } + return null; + } + }); + + + return rules; +});/** + * @fileOverview \u8868\u5355\u5f02\u6b65\u8bf7\u6c42\uff0c\u5f02\u6b65\u6821\u9a8c\u3001\u8fdc\u7a0b\u83b7\u53d6\u6570\u636e + * @ignore + */ + +define('bui/form/remote',['bui/common'],function(require) { + var BUI = require('bui/common'); + + /** + * @class BUI.Form.RemoteView + * @private + * \u8868\u5355\u5f02\u6b65\u8bf7\u6c42\u7c7b\u7684\u89c6\u56fe\u7c7b + */ + var RemoteView = function () { + // body... + }; + + RemoteView.ATTRS = { + isLoading : {}, + loadingEl : {} + }; + + RemoteView.prototype = { + + /** + * \u83b7\u53d6\u663e\u793a\u52a0\u8f7d\u72b6\u6001\u7684\u5bb9\u5668 + * @protected + * @template + * @return {jQuery} \u52a0\u8f7d\u72b6\u6001\u7684\u5bb9\u5668 + */ + getLoadingContainer : function () { + // body... + }, + _setLoading : function () { + var _self = this, + loadingEl = _self.get('loadingEl'), + loadingTpl = _self.get('loadingTpl'); + if(!loadingEl){ + loadingEl = $(loadingTpl).appendTo(_self.getLoadingContainer()); + _self.setInternal('loadingEl',loadingEl); + } + }, + _clearLoading : function () { + var _self = this, + loadingEl = _self.get('loadingEl'); + if(loadingEl){ + loadingEl.remove(); + _self.setInternal('loadingEl',null); + } + }, + _uiSetIsLoading : function (v) { + var _self = this; + if(v){ + _self._setLoading(); + }else{ + _self._clearLoading(); + } + } + }; + + /** + * @class BUI.Form.Remote + * \u8868\u5355\u5f02\u6b65\u8bf7\u6c42\uff0c\u6240\u6709\u9700\u8981\u5b9e\u73b0\u5f02\u6b65\u6821\u9a8c\u3001\u5f02\u6b65\u8bf7\u6c42\u7684\u7c7b\u53ef\u4ee5\u4f7f\u7528\u3002 + */ + var Remote = function(){ + + }; + + Remote.ATTRS = { + + /** + * \u9ed8\u8ba4\u7684\u5f02\u6b65\u8bf7\u6c42\u914d\u7f6e\u9879\uff1a + * method : 'GET', + * cache : true, + * dataType : 'text' + * @protected + * @type {Object} + */ + defaultRemote : { + value : { + method : 'GET', + cache : true, + callback : function (data) { + return data; + } + } + }, + /** + * \u5f02\u6b65\u8bf7\u6c42\u5ef6\u8fdf\u7684\u65f6\u95f4\uff0c\u5f53\u5b57\u6bb5\u9a8c\u8bc1\u901a\u8fc7\u540e\uff0c\u4e0d\u9a6c\u4e0a\u8fdb\u884c\u5f02\u6b65\u8bf7\u6c42\uff0c\u7b49\u5f85\u7ee7\u7eed\u8f93\u5165\uff0c + * 300\uff08\u9ed8\u8ba4\uff09\u6beb\u79d2\u540e\uff0c\u53d1\u9001\u8bf7\u6c42\uff0c\u5728\u8fd9\u4e2a\u8fc7\u7a0b\u4e2d\uff0c\u7ee7\u7eed\u8f93\u5165\uff0c\u5219\u53d6\u6d88\u5f02\u6b65\u8bf7\u6c42\u3002 + * @type {Object} + */ + remoteDaly : { + value : 500 + }, + /** + * \u52a0\u8f7d\u7684\u6a21\u677f + * @type {String} + */ + loadingTpl : { + view : true, + value : 'loading' + }, + /** + * \u662f\u5426\u6b63\u5728\u7b49\u5f85\u5f02\u6b65\u8bf7\u6c42\u7ed3\u679c + * @type {Boolean} + */ + isLoading : { + view : true, + value : false + }, + /** + * \u5f02\u6b65\u8bf7\u6c42\u7684\u914d\u7f6e\u9879\uff0c\u53c2\u8003jQuery\u7684 ajax\u914d\u7f6e\u9879\uff0c\u5982\u679c\u4e3a\u5b57\u7b26\u4e32\u5219\u4e3a url\u3002 + * \u8bf7\u4e0d\u8981\u8986\u76d6success\u5c5e\u6027\uff0c\u5982\u679c\u9700\u8981\u56de\u8c03\u5219\u4f7f\u7528 callback \u5c5e\u6027 + * + * { + * remote : { + * url : 'test.php', + * dataType:'json',//\u9ed8\u8ba4\u4e3a\u5b57\u7b26\u4e32 + * callback : function(data){ + * if(data.success){ //data\u4e3a\u9ed8\u8ba4\u8fd4\u56de\u7684\u503c + * return '' //\u8fd4\u56de\u503c\u4e3a\u7a7a\u65f6\uff0c\u9a8c\u8bc1\u6210\u529f + * }else{ + * return '\u9a8c\u8bc1\u5931\u8d25\uff0cXX\u9519\u8bef\uff01' //\u663e\u793a\u8fd4\u56de\u7684\u5b57\u7b26\u4e32\u4e3a\u9519\u8bef + * } + * } + * } + * } + * @type {String|Object} + */ + remote : { + setter : function (v) { + if(BUI.isString(v)){ + v = {url : v} + } + return v; + } + }, + /** + * \u5f02\u6b65\u8bf7\u6c42\u7684\u51fd\u6570\u6307\u9488\uff0c\u4ec5\u5185\u90e8\u4f7f\u7528 + * @private + * @type {Number} + */ + remoteHandler : { + + }, + events : { + value : { + /** + * \u5f02\u6b65\u8bf7\u6c42\u7ed3\u675f + * @event + * @param {Object} e \u4e8b\u4ef6\u5bf9\u8c61 + * @param {*} e.error \u662f\u5426\u9a8c\u8bc1\u6210\u529f + */ + remotecomplete : false, + /** + * \u5f02\u6b65\u8bf7\u6c42\u5f00\u59cb + * @event + * @param {Object} e \u4e8b\u4ef6\u5bf9\u8c61 + * @param {Object} e.data \u53d1\u9001\u7684\u5bf9\u8c61\uff0c\u662f\u4e00\u4e2a\u952e\u503c\u5bf9\uff0c\u53ef\u4ee5\u4fee\u6539\u6b64\u5bf9\u8c61\uff0c\u9644\u52a0\u4fe1\u606f + */ + remotestart : false + } + } + }; + + Remote.prototype = { + + __bindUI : function(){ + var _self = this; + + _self.on('change',function (ev) { + if(_self.get('remote') && _self.isValid()){ + var data = _self.getRemoteParams(); + _self._startRemote(data); + } + }); + + _self.on('error',function (ev) { + if(_self.get('remote')){ + _self._cancelRemote(); + } + }); + + }, + //\u5f00\u59cb\u5f02\u6b65\u8bf7\u6c42 + _startRemote : function(data){ + var _self = this, + remoteHandler = _self.get('remoteHandler'), + remoteDaly = _self.get('remoteDaly'); + if(remoteHandler){ + //\u5982\u679c\u524d\u9762\u5df2\u7ecf\u53d1\u9001\u8fc7\u5f02\u6b65\u8bf7\u6c42\uff0c\u53d6\u6d88\u6389 + _self._cancelRemote(remoteHandler); + } + //\u4f7f\u7528\u95ed\u5305\u8fdb\u884c\u5f02\u6b65\u8bf7\u6c42 + function dalayFunc(){ + _self._remoteValid(data,remoteHandler); + _self.set('isLoading',true); + } + remoteHandler = setTimeout(dalayFunc,remoteDaly); + _self.setInternal('remoteHandler',remoteHandler); + + }, + //\u5f02\u6b65\u8bf7\u6c42 + _remoteValid : function(data,remoteHandler){ + var _self = this, + remote = _self.get('remote'), + defaultRemote = _self.get('defaultRemote'), + options = BUI.merge(defaultRemote,remote,{data : data}); + + function complete (error,data) { + //\u786e\u8ba4\u5f53\u524d\u8fd4\u56de\u7684\u9519\u8bef\u662f\u5f53\u524d\u8bf7\u6c42\u7684\u7ed3\u679c\uff0c\u9632\u6b62\u8986\u76d6\u540e\u9762\u7684\u8bf7\u6c42 + if(remoteHandler == _self.get('remoteHandler')){ + _self.fire('remotecomplete',{error : error,data : data}); + _self.set('isLoading',false); + _self.setInternal('remoteHandler',null); + } + } + + options.success = function (data) { + var callback = options.callback, + error = callback(data); + complete(error,data); + }; + + options.error = function (jqXHR, textStatus,errorThrown){ + complete(errorThrown); + }; + + _self.fire('remotestart',{data : data}); + $.ajax(options); + }, + /** + * \u83b7\u53d6\u5f02\u6b65\u8bf7\u6c42\u7684\u952e\u503c\u5bf9 + * @template + * @protected + * @return {Object} \u8fdc\u7a0b\u9a8c\u8bc1\u7684\u53c2\u6570\uff0c\u952e\u503c\u5bf9 + */ + getRemoteParams : function() { + + }, + //\u53d6\u6d88\u5f02\u6b65\u8bf7\u6c42 + _cancelRemote : function(remoteHandler){ + var _self = this; + + remoteHandler = remoteHandler || _self.get('remoteHandler'); + if(remoteHandler){ + clearTimeout(remoteHandler); + _self.setInternal('remoteHandler',null); + } + _self.set('isLoading',false); + } + + }; + + Remote.View = RemoteView; + return Remote; +});/** + * @fileOverview \u9009\u62e9\u6846\u547d\u540d\u7a7a\u95f4\u5165\u53e3\u6587\u4ef6 + * @ignore + */ + +define('bui/select',['bui/common','bui/select/select','bui/select/combox','bui/select/suggest'],function (require) { + var BUI = require('bui/common'), + Select = BUI.namespace('Select'); + + BUI.mix(Select,{ + Select : require('bui/select/select'), + Combox : require('bui/select/combox'), + Suggest: require('bui/select/suggest') + }); + return Select; +});/** + * @fileOverview \u9009\u62e9\u63a7\u4ef6 + * @author dxq613@gmail.com + * @ignore + */ + +define('bui/select/select',['bui/common','bui/picker'],function (require) { + 'use strict'; + var BUI = require('bui/common'), + ListPicker = require('bui/picker').ListPicker, + PREFIX = BUI.prefix; + + function formatItems(items){ + + if($.isPlainObject(items)){ + var tmp = []; + BUI.each(items,function(v,n){ + tmp.push({value : n,text : v}); + }); + return tmp; + } + var rst = []; + BUI.each(items,function(item,index){ + if(BUI.isString(item)){ + rst.push({value : item,text:item}); + }else{ + rst.push(item); + } + }); + return rst; + } + + var Component = BUI.Component, + Picker = ListPicker, + CLS_INPUT = PREFIX + 'select-input', + /** + * \u9009\u62e9\u63a7\u4ef6 + * xclass:'select' + *
            
            +     *  BUI.use('bui/select',function(Select){
            +     * 
            +     *   var items = [
            +     *         {text:'\u9009\u98791',value:'a'},
            +     *         {text:'\u9009\u98792',value:'b'},
            +     *         {text:'\u9009\u98793',value:'c'}
            +     *       ],
            +     *       select = new Select.Select({  
            +     *         render:'#s1',
            +     *         valueField:'#hide',
            +     *         //multipleSelect: true, //\u662f\u5426\u591a\u9009
            +     *         items:items
            +     *       });
            +     *   select.render();
            +     *   select.on('change', function(ev){
            +     *     //ev.text,ev.value,ev.item
            +     *   });
            +     *   
            +     * });
            +     * 
            + * @class BUI.Select.Select + * @extends BUI.Component.Controller + */ + select = Component.Controller.extend({ + //\u521d\u59cb\u5316 + initializer:function(){ + var _self = this, + multipleSelect = _self.get('multipleSelect'), + xclass, + picker = _self.get('picker'); + if(!picker){ + xclass = multipleSelect ? 'listbox' : 'simple-list'; + picker = new Picker({ + children:[ + { + xclass : xclass, + elCls:PREFIX + 'select-list', + store : _self.get('store'), + items : formatItems(_self.get('items'))/**/ + } + ], + valueField : _self.get('valueField') + }); + + _self.set('picker',picker); + }else{ + if(_self.get('valueField')){ + picker.set('valueField',_self.get('valueField')); + } + } + if(multipleSelect){ + picker.set('hideEvent',''); + } + + }, + //\u6e32\u67d3DOM\u4ee5\u53ca\u9009\u62e9\u5668 + renderUI : function(){ + var _self = this, + picker = _self.get('picker'), + el = _self.get('el'), + textEl = el.find('.' + _self.get('inputCls')); + picker.set('trigger',el); + picker.set('triggerEvent', _self.get('triggerEvent')); + picker.set('autoSetValue', _self.get('autoSetValue')); + picker.set('textField',textEl); + if(_self.get('forceFit')){ + picker.set('width',el.outerWidth()); + } + + picker.render(); + }, + //\u7ed1\u5b9a\u4e8b\u4ef6 + bindUI : function(){ + var _self = this, + picker = _self.get('picker'), + list = picker.get('list'), + store = list.get('store'); + + //\u9009\u9879\u53d1\u751f\u6539\u53d8\u65f6 + picker.on('selectedchange',function(ev){ + _self.fire('change',{text : ev.text,value : ev.value,item : ev.item}); + }); + list.on('itemsshow',function(){ + _self._syncValue(); + }); + }, + /** + * \u662f\u5426\u5305\u542b\u5143\u7d20 + * @override + */ + containsElement : function(elem){ + var _self = this, + picker = _self.get('picker'); + + return Component.Controller.prototype.containsElement.call(this,elem) || picker.containsElement(elem); + }, + + //\u8bbe\u7f6e\u5b50\u9879 + _uiSetItems : function(items){ + if(!items){ + return; + } + var _self = this, + picker = _self.get('picker'), + list = picker.get('list'); + list.set('items',formatItems(items)); + _self._syncValue(); + }, + _syncValue : function(){ + var _self = this, + picker = _self.get('picker'), + valueField = _self.get('valueField'); + if(valueField){ + picker.setSelectedValue($(valueField).val()); + } + }, + //\u8bbe\u7f6eForm\u8868\u5355\u4e2d\u7684\u540d\u79f0 + _uiSetName:function(v){ + var _self = this, + textEl = _self._getTextEl(); + if(v){ + textEl.attr('name',v); + } + }, + _uiSetWidth : function(v){ + var _self = this; + if(v != null){ + var textEl = _self._getTextEl(), + iconEl = _self.get('el').find('.x-icon'), + appendWidth = textEl.outerWidth() - textEl.width(), + picker = _self.get('picker'), + width = v - iconEl.outerWidth() - appendWidth; + textEl.width(width); + if(_self.get('forceFit')){ + picker.set('width',v); + } + + } + }, + _getTextEl : function(){ + var _self = this, + el = _self.get('el'); + return el.find('.' + _self.get('inputCls')); + }, + /** + * \u6790\u6784\u51fd\u6570 + */ + destructor:function(){ + var _self = this, + picker = _self.get('picker'); + if(picker){ + picker.destroy(); + } + }, + //\u83b7\u53d6List\u63a7\u4ef6 + _getList:function(){ + var _self = this, + picker = _self.get('picker'), + list = picker.get('list'); + return list; + }, + /** + * \u83b7\u53d6\u9009\u4e2d\u9879\u7684\u503c\uff0c\u5982\u679c\u662f\u591a\u9009\u5219\uff0c\u8fd4\u56de\u7684'1,2,3'\u5f62\u5f0f\u7684\u5b57\u7b26\u4e32 + *
            
            +       *  var value = select.getSelectedValue();
            +       * 
            + * @return {String} \u9009\u4e2d\u9879\u7684\u503c + */ + getSelectedValue:function(){ + return this.get('picker').getSelectedValue(); + }, + /** + * \u8bbe\u7f6e\u9009\u4e2d\u7684\u503c + *
            
            +       * select.setSelectedValue('1'); //\u5355\u9009\u6a21\u5f0f\u4e0b
            +       * select.setSelectedValue('1,2,3'); //\u591a\u9009\u6a21\u5f0f\u4e0b
            +       * 
            + * @param {String} value \u9009\u4e2d\u7684\u503c + */ + setSelectedValue : function(value){ + var _self = this, + picker = _self.get('picker'); + picker.setSelectedValue(value); + }, + /** + * \u83b7\u53d6\u9009\u4e2d\u9879\u7684\u6587\u672c\uff0c\u5982\u679c\u662f\u591a\u9009\u5219\uff0c\u8fd4\u56de\u7684'text1,text2,text3'\u5f62\u5f0f\u7684\u5b57\u7b26\u4e32 + *
            
            +       *  var value = select.getSelectedText();
            +       * 
            + * @return {String} \u9009\u4e2d\u9879\u7684\u6587\u672c + */ + getSelectedText:function(){ + return this.get('picker').getSelectedText(); + } + },{ + ATTRS : + /** + * @lends BUI.Select.Select# + * @ignore + */ + { + + /** + * \u9009\u62e9\u5668\uff0c\u6d6e\u52a8\u51fa\u73b0\uff0c\u4f9b\u7528\u6237\u9009\u62e9 + * @cfg {BUI.Picker.ListPicker} picker + *
            
            +         * var columns = [
            +         *       {title : '\u8868\u59341(30%)',dataIndex :'a', width:'30%'},
            +         *       {id: '123',title : '\u8868\u59342(30%)',dataIndex :'b', width:'30%'},
            +         *       {title : '\u8868\u59343(40%)',dataIndex : 'c',width:'40%'}
            +         *     ],   
            +         *   data = [{a:'123',b:'\u9009\u62e9\u6587\u672c1'},{a:'cdd',b:'\u9009\u62e9\u6587\u672c2'},{a:'1333',b:'\u9009\u62e9\u6587\u672c3',c:'eee',d:2}],
            +         *   grid = new Grid.SimpleGrid({
            +         *     idField : 'a', //\u8bbe\u7f6e\u4f5c\u4e3akey \u7684\u5b57\u6bb5\uff0c\u653e\u5230valueField\u4e2d
            +         *     columns : columns,
            +         *     textGetter: function(item){ //\u8fd4\u56de\u9009\u4e2d\u7684\u6587\u672c
            +         *       return item.b;
            +         *     }
            +         *   }),
            +         *   picker = new Picker.ListPicker({
            +         *     width:300,  //\u6307\u5b9a\u5bbd\u5ea6
            +         *     children : [grid] //\u914d\u7f6epicker\u5185\u7684\u5217\u8868
            +         *   }),
            +         *   select = new Select.Select({  
            +         *     render:'#s1',
            +         *     picker : picker,
            +         *     forceFit:false, //\u4e0d\u5f3a\u8feb\u5217\u8868\u8ddf\u9009\u62e9\u5668\u5bbd\u5ea6\u4e00\u81f4
            +         *     valueField:'#hide',
            +         *     items : data
            +         *   });
            +         * select.render();
            +         * 
            + */ + /** + * \u9009\u62e9\u5668\uff0c\u6d6e\u52a8\u51fa\u73b0\uff0c\u4f9b\u7528\u6237\u9009\u62e9 + * @readOnly + * @type {BUI.Picker.ListPicker} + */ + picker:{ + + }, + /** + * \u5b58\u653e\u503c\u5f97\u5b57\u6bb5\uff0c\u4e00\u822c\u662f\u4e00\u4e2ainput[type='hidden'] ,\u7528\u4e8e\u5b58\u653e\u9009\u62e9\u6846\u7684\u503c + * @cfg {Object} valueField + */ + /** + * @ignore + */ + valueField : { + + }, + /** + * \u6570\u636e\u7f13\u51b2\u7c7b + *
            
            +         *  var store = new Store({
            +         *    url : 'data.json',
            +         *    autoLoad : true
            +         *  });
            +         *  var select = new Select({
            +         *    render : '#s',
            +         *    store : store//\u8bbe\u7f6e\u4e86store\u540e\uff0c\u4e0d\u8981\u518d\u8bbe\u7f6eitems\uff0c\u4f1a\u8fdb\u884c\u8986\u76d6
            +         *  });
            +         *  select.render();
            +         * 
            + * @cfg {BUI.Data.Store} Store + */ + store : { + + }, + focusable:{ + value:true + }, + /** + * \u662f\u5426\u53ef\u4ee5\u591a\u9009 + * @cfg {Boolean} [multipleSelect=false] + */ + /** + * \u662f\u5426\u53ef\u4ee5\u591a\u9009 + * @type {Boolean} + */ + multipleSelect:{ + value:false + }, + /** + * \u63a7\u4ef6\u7684name\uff0c\u7528\u4e8e\u5b58\u653e\u9009\u4e2d\u7684\u6587\u672c\uff0c\u4fbf\u4e8e\u8868\u5355\u63d0\u4ea4 + * @cfg {Object} name + */ + /** + * \u63a7\u4ef6\u7684name\uff0c\u4fbf\u4e8e\u8868\u5355\u63d0\u4ea4 + * @type {Object} + */ + name:{ + + }, + /** + * \u9009\u9879 + * @cfg {Array} items + *
            
            +         *  BUI.use('bui/select',function(Select){
            +         * 
            +         *   var items = [
            +         *         {text:'\u9009\u98791',value:'a'},
            +         *         {text:'\u9009\u98792',value:'b'},
            +         *         {text:'\u9009\u98793',value:'c'}
            +         *       ],
            +         *       select = new Select.Select({  
            +         *         render:'#s1',
            +         *         valueField:'#hide',
            +         *         //multipleSelect: true, //\u662f\u5426\u591a\u9009
            +         *         items:items
            +         *       });
            +         *   select.render();
            +         *   
            +         * });
            +         * 
            + */ + /** + * \u9009\u9879 + * @type {Array} + */ + items:{ + sync:false + }, + /** + * \u6807\u793a\u9009\u62e9\u5b8c\u6210\u540e\uff0c\u663e\u793a\u6587\u672c\u7684DOM\u8282\u70b9\u7684\u6837\u5f0f + * @type {String} + * @protected + * @default 'bui-select-input' + */ + inputCls:{ + value:CLS_INPUT + }, + /** + * \u662f\u5426\u4f7f\u9009\u62e9\u5217\u8868\u8ddf\u9009\u62e9\u6846\u540c\u7b49\u5bbd\u5ea6 + *
            
            +         *   picker = new Picker.ListPicker({
            +         *     width:300,  //\u6307\u5b9a\u5bbd\u5ea6
            +         *     children : [grid] //\u914d\u7f6epicker\u5185\u7684\u5217\u8868
            +         *   }),
            +         *   select = new Select.Select({  
            +         *     render:'#s1',
            +         *     picker : picker,
            +         *     forceFit:false, //\u4e0d\u5f3a\u8feb\u5217\u8868\u8ddf\u9009\u62e9\u5668\u5bbd\u5ea6\u4e00\u81f4
            +         *     valueField:'#hide',
            +         *     items : data
            +         *   });
            +         * select.render();
            +         * 
            + * @cfg {Boolean} [forceFit=true] + */ + forceFit : { + value : true + }, + events : { + value : { + /** + * \u9009\u62e9\u503c\u53d1\u751f\u6539\u53d8\u65f6 + * @event + * @param {Object} e \u4e8b\u4ef6\u5bf9\u8c61 + * @param {String} e.text \u9009\u4e2d\u7684\u6587\u672c + * @param {String} e.value \u9009\u4e2d\u7684value + * @param {Object} e.item \u53d1\u751f\u6539\u53d8\u7684\u9009\u9879 + */ + 'change' : false + } + }, + /** + * \u63a7\u4ef6\u7684\u9ed8\u8ba4\u6a21\u7248 + * @type {String} + * @default + * '<input type="text" readonly="readonly" class="bui-select-input"/><span class="x-icon x-icon-normal"><span class="bui-caret bui-caret-down"></span></span>' + */ + tpl : { + view:true, + value : '' + }, + /** + * \u89e6\u53d1\u7684\u4e8b\u4ef6 + * @cfg {String} triggerEvent + * @default 'click' + */ + triggerEvent:{ + value:'click' + } + } + },{ + xclass : 'select' + }); + + return select; + +});/** + * @fileOverview \u7ec4\u5408\u6846\u53ef\u7528\u4e8e\u9009\u62e9\u8f93\u5165\u6587\u672c + * @ignore + */ + +define('bui/select/combox',['bui/common','bui/select/select'],function (require) { + + var BUI = require('bui/common'), + Select = require('bui/select/select'), + CLS_INPUT = BUI.prefix + 'combox-input'; + + function getFunction(textField,valueField,picker){ + var list = picker.get('list'), + text = picker.getSelectedText(); + if(text){ + $(textField).val(text); + } + } + + /** + * \u7ec4\u5408\u6846 \u7528\u4e8e\u63d0\u793a\u8f93\u5165 + * xclass:'combox' + *
            
            +   * BUI.use('bui/select',function(Select){
            +   * 
            +   *  var select = new Select.Combox({
            +   *    render:'#c1',
            +   *    name:'combox',
            +   *    items:['\u9009\u98791','\u9009\u98792','\u9009\u98793','\u9009\u98794']
            +   *  });
            +   *  select.render();
            +   * });
            +   * 
            + * @class BUI.Select.Combox + * @extends BUI.Select.Select + */ + var combox = Select.extend({ + + renderUI : function(){ + var _self = this, + picker = _self.get('picker'); + + picker.get('getFunction',getFunction); + }, + _uiSetItems : function(v){ + var _self = this; + + for(var i = 0 ; i < v.length ; i++){ + var item = v[i]; + if(BUI.isString(item)){ + v[i] = {value:item,text:item}; + } + } + combox.superclass._uiSetItems.call(_self,v); + } + + },{ + ATTRS : + /** + * @lends BUI.Select.Combox# + * @ignore + */ + { + /** + * \u63a7\u4ef6\u7684\u6a21\u7248 + * @type {String} + * @default + * '<input type="text" class="'+CLS_INPUT+'"/>' + */ + tpl:{ + view:true, + value:'' + }, + /** + * \u663e\u793a\u9009\u62e9\u56de\u7684\u6587\u672cDOM\u8282\u70b9\u7684\u6837\u5f0f + * @type {String} + * @protected + * @default 'bui-combox-input' + */ + inputCls:{ + value:CLS_INPUT + } + } + },{ + xclass:'combox' + }); + + return combox; +});/** + * @fileOverview \u7ec4\u5408\u6846\u53ef\u7528\u4e8e\u9009\u62e9\u8f93\u5165\u6587\u672c + * @ignore + */ + +define('bui/select/suggest',['bui/common','bui/select/combox'],function (require) { + 'use strict'; + var BUI = require('bui/common'), + Combox = require('bui/select/combox'), + TIMER_DELAY = 200, + EMPTY = ''; + + /** + * \u7ec4\u5408\u6846 \u7528\u4e8e\u63d0\u793a\u8f93\u5165 + * xclass:'suggest' + * ** \u7b80\u5355\u4f7f\u7528\u9759\u6001\u6570\u636e ** + *
            
            +   * BUI.use('bui/select',function (Select) {
            +   *
            +   *  var suggest = new Select.Suggest({
            +   *     render:'#c2',
            +   *     name:'suggest', //\u5f62\u6210\u8f93\u5165\u6846\u7684name
            +   *     data:['1222224','234445','122','1111111']
            +   *   });
            +   *   suggest.render();
            +   *   
            +   * });
            +   * 
            + * ** \u67e5\u8be2\u670d\u52a1\u5668\u6570\u636e ** + *
            
            +   * BUI.use('bui/select',function(Select){
            +   *
            +   *  var suggest = new Select.Suggest({
            +   *    render:'#s1',
            +   *    name:'suggest', 
            +   *    url:'server-data.php'
            +   *  });
            +   *  suggest.render();
            +   *
            +   * });
            +   * 
            + * @class BUI.Select.Suggest + * @extends BUI.Select.Combox + */ + var suggest = Combox.extend({ + bindUI : function(){ + var _self = this, + textEl = _self.get('el').find('input'), + triggerEvent = (_self.get('triggerEvent') === 'keyup') ? 'keyup' : 'keyup click'; + + //\u76d1\u542c keyup \u4e8b\u4ef6 + textEl.on(triggerEvent, function(){ + _self._start(); + }); + }, + //\u542f\u52a8\u8ba1\u65f6\u5668\uff0c\u5f00\u59cb\u76d1\u542c\u7528\u6237\u8f93\u5165 + _start:function(){ + var _self = this; + _self._timer = _self.later(function(){ + _self._updateContent(); + // _self._timer = _self.later(arguments.callee, TIMER_DELAY); + }, TIMER_DELAY); + }, + //\u66f4\u65b0\u63d0\u793a\u5c42\u7684\u6570\u636e + _updateContent:function(){ + var _self = this, + isStatic = _self.get('data'), + textEl = _self.get('el').find('input'), + text; + + //\u68c0\u6d4b\u662f\u5426\u9700\u8981\u66f4\u65b0\u3002\u6ce8\u610f\uff1a\u52a0\u5165\u7a7a\u683c\u4e5f\u7b97\u6709\u53d8\u5316 + if (!isStatic && (textEl.val() === _self.get('query'))) { + return; + } + + _self.set('query', textEl.val()); + text = textEl.val(); + //\u8f93\u5165\u4e3a\u7a7a\u65f6,\u76f4\u63a5\u8fd4\u56de + if (!isStatic && !text) { + /* _self.set('items',EMPTY_ARRAY); + picker.hide();*/ + return; + } + + //3\u79cd\u52a0\u8f7d\u65b9\u5f0f\u9009\u62e9 + var cacheable = _self.get('cacheable'), + url = _self.get('url'), + data = _self.get('data'); + + if (cacheable && url) { + var dataCache = _self.get('dataCache'); + if (dataCache[text] !== undefined) { + //\u4ece\u7f13\u5b58\u8bfb\u53d6 + //BUI.log('use cache'); + _self._handleResponse(dataCache[text]); + }else{ + //\u8bf7\u6c42\u670d\u52a1\u5668\u6570\u636e + //BUI.log('no cache, data from server'); + _self._requestData(); + } + }else if (url) { + //\u4ece\u670d\u52a1\u5668\u83b7\u53d6\u6570\u636e + //BUI.log('no cache, data always from server'); + _self._requestData(); + }else if (data) { + //\u4f7f\u7528\u9759\u6001\u6570\u636e\u6e90 + //BUI.log('use static datasource'); + _self._handleResponse(data,true); + } + }, + //\u5982\u679c\u5b58\u5728\u6570\u636e\u6e90 + _getStore : function(){ + var _self = this, + picker = _self.get('picker'), + list = picker.get('list'); + if(list){ + return list.get('store'); + } + }, + //\u901a\u8fc7 script \u5143\u7d20\u5f02\u6b65\u52a0\u8f7d\u6570\u636e + _requestData:function(){ + var _self = this, + textEl = _self.get('el').find('input'), + callback = _self.get('callback'), + store = _self.get('store'), + param = {}; + + param[textEl.attr('name')] = textEl.val(); + if(store){ + param.start = 0; //\u56de\u6eda\u5230\u7b2c\u4e00\u9875 + store.load(param,callback); + }else{ + $.ajax({ + url:_self.get('url'), + type:'post', + dataType:_self.get('dataType'), + data:param, + success:function(data){ + _self._handleResponse(data); + if(callback){ + callback(data); + } + } + }); + } + + }, + //\u5904\u7406\u83b7\u53d6\u7684\u6570\u636e + _handleResponse:function(data,filter){ + var _self = this, + items = filter ? _self._getFilterItems(data) : data; + _self.set('items',items); + + if(_self.get('cacheable')){ + _self.get('dataCache')[_self.get('query')] = items; + } + }, + //\u5982\u679c\u5217\u8868\u8bb0\u5f55\u662f\u5bf9\u8c61\u83b7\u53d6\u663e\u793a\u7684\u6587\u672c + _getItemText : function(item){ + var _self = this, + picker = _self.get('picker'), + list = picker.get('list'); + if(list){ + return list.getItemText(item); + } + return ''; + }, + //\u83b7\u53d6\u8fc7\u6ee4\u7684\u6587\u672c + _getFilterItems:function(data){ + var _self = this, + result = [], + textEl = _self.get('el').find('input'), + text = textEl.val(), + isStatic = _self.get('data'); + data = data || []; + /** + * @private + * @ignore + */ + function push(str,item){ + if(BUI.isString(item)){ + result.push(str); + }else{ + result.push(item); + } + } + BUI.each(data, function(item){ + var str = BUI.isString(item) ? item : _self._getItemText(item); + if(isStatic){ + if(str.indexOf($.trim(text)) !== -1){ + push(str,item); + } + }else{ + push(str,item); + } + }); + + return result; + }, + /** + * \u5ef6\u8fdf\u6267\u884c\u6307\u5b9a\u51fd\u6570 fn + * @protected + * @return {Object} \u64cd\u4f5c\u5b9a\u65f6\u5668\u7684\u5bf9\u8c61 + */ + later:function (fn, when, periodic) { + when = when || 0; + var r = periodic ? setInterval(fn, when) : setTimeout(fn, when); + + return { + id:r, + interval:periodic, + cancel:function () { + if (this.interval) { + clearInterval(r); + } else { + clearTimeout(r); + } + } + }; + } + },{ + ATTRS : + /** + * @lends BUI.Select.Suggest# + * @ignore + */ + { + /** + * \u7528\u4e8e\u663e\u793a\u63d0\u793a\u7684\u6570\u636e\u6e90 + *
            
            +       *   var suggest = new Select.Suggest({
            +       *     render:'#c2',
            +       *     name:'suggest', //\u5f62\u6210\u8f93\u5165\u6846\u7684name
            +       *     data:['1222224','234445','122','1111111']
            +       *   });
            +       * 
            + * @cfg {Array} data + */ + /** + * \u7528\u4e8e\u663e\u793a\u63d0\u793a\u7684\u6570\u636e\u6e90 + * @type {Array} + * @ignore + */ + data:{ + value : null + }, + /** + * \u8f93\u5165\u6846\u7684\u503c + * @type {String} + * @private + */ + query:{ + value : EMPTY + }, + /** + * \u662f\u5426\u5141\u8bb8\u7f13\u5b58 + * @cfg {Boolean} cacheable + * @default false + */ + /** + * \u662f\u5426\u5141\u8bb8\u7f13\u5b58 + * @type {Boolean} + * @default false + */ + cacheable:{ + value:false + }, + /** + * \u7f13\u5b58\u7684\u6570\u636e + * @private + */ + dataCache:{ + value:{} + }, + /** + * \u8bf7\u6c42\u8fd4\u56de\u7684\u6570\u636e\u683c\u5f0f\u9ed8\u8ba4\u4e3a'jsonp' + *
            
            +       *  var suggest = new Select.Suggest({
            +       *    render:'#s1',
            +       *    name:'suggest', 
            +       *    dataType : 'json',
            +       *    url:'server-data.php'
            +       *  }); 
            +       * 
            + * @cfg {Object} [dataType = 'jsonp'] + */ + dataType : { + value : 'jsonp' + }, + /** + * \u8bf7\u6c42\u6570\u636e\u7684url + *
            
            +       *  var suggest = new Select.Suggest({
            +       *    render:'#s1',
            +       *    name:'suggest', 
            +       *    dataType : 'json',
            +       *    url:'server-data.php'
            +       *  }); 
            +       * 
            + * @cfg {String} url + */ + url : { + + }, + /** + * \u8bf7\u6c42\u5b8c\u6570\u636e\u7684\u56de\u8c03\u51fd\u6570 + *
            
            +       *  var suggest = new Select.Suggest({
            +       *    render:'#s1',
            +       *    name:'suggest', 
            +       *    dataType : 'json',
            +       *    callback : function(data){
            +       *      //do something
            +       *    },
            +       *    url:'server-data.php'
            +       *  }); 
            +       * 
            + * @type {Function} + */ + callback : { + + }, + /** + * \u89e6\u53d1\u7684\u4e8b\u4ef6 + * @cfg {String} triggerEvent + * @default 'click' + */ + triggerEvent:{ + valueFn:function(){ + if(this.get('data')){ + return 'click'; + } + return 'keyup'; + } + }, + /** + * suggest\u4e0d\u63d0\u4f9b\u81ea\u52a8\u8bbe\u7f6e\u9009\u4e2d\u6587\u672c\u529f\u80fd + * @type {Boolean} + * @default true + */ + autoSetValue:{ + value:false + } + } + },{ + xclass:'suggest' + }); + + return suggest; +});/** + * @fileOverview Mask\u7684\u5165\u53e3\u6587\u4ef6 + * @ignore + */ + +define('bui/mask',['bui/common','bui/mask/mask','bui/mask/loadmask'],function (require) { + var BUI = require('bui/common'), + Mask = require('bui/mask/mask'); + Mask.LoadMask = require('bui/mask/loadmask'); + return Mask; +});/** + * @fileOverview Mask\u5c4f\u853d\u5c42 + * @author dxq613@gmail.com + * @ignore + */ + +define('bui/mask/mask',['bui/common'],function (require) { + + var BUI = require('bui/common'), + Mask = BUI.namespace('Mask'), + UA = BUI.UA, + CLS_MASK = BUI.prefix + 'ext-mask', + CLS_MASK_MSG = CLS_MASK + '-msg'; + + BUI.mix(Mask, + /** + * \u5c4f\u853d\u5c42 + *
            
            +    * BUI.use('bui/mask',function(Mask){
            +    *   Mask.maskElement('#domId'); //\u5c4f\u853ddom
            +    *   Mask.unmaskElement('#domId'); //\u89e3\u9664DOM\u5c4f\u853d
            +    * });
            +    * 
            + * @class BUI.Mask + * @singleton + */ + { + /** + * @description \u5c4f\u853d\u6307\u5b9a\u5143\u7d20 + * @param {String|HTMLElement} element \u88ab\u5c4f\u853d\u7684\u5143\u7d20 + * @param {String} [msg] \u5c4f\u853d\u5143\u7d20\u65f6\u663e\u793a\u7684\u6587\u672c + * @param {String} [msgCls] \u663e\u793a\u6587\u672c\u5e94\u7528\u7684\u6837\u5f0f + *
            
            +         *   BUI.Mask.maskElement('#domId');
            +         *   
            +         * 
            + */ + maskElement:function (element, msg, msgCls) { + var maskedEl = $(element), + maskDiv = $('.' + CLS_MASK, maskedEl), + tpl = null, + msgDiv = null, + top = null, + left = null; + if (!maskDiv.length) { + maskDiv = $('
            ').appendTo(maskedEl); + maskedEl.addClass('x-masked-relative x-masked'); + if (UA.ie === 6) { + maskDiv.height(maskedEl.height()); + } + if (msg) { + tpl = ['
            ', msg, '
            '].join(''); + msgDiv = $(tpl).appendTo(maskedEl); + if (msgCls) { + msgDiv.addClass(msgCls); + } + try { + top = (maskedEl.height() - msgDiv.height()) / 2; + left = (maskedEl.width() - msgDiv.width()) / 2; + + msgDiv.css({ left:left, top:top }); + } catch (ex) { + BUI.log('mask error occurred'); + } + } + } + return maskDiv; + }, + /** + * @description \u89e3\u9664\u5143\u7d20\u7684\u5c4f\u853d + * @param {String|HTMLElement} \u5c4f\u853d\u7684\u5143\u7d20 + *
            
            +         * BUI.Mask.unmaskElement('#domId');
            +         * 
            + */ + unmaskElement:function (element) { + var maskedEl = $(element), + msgEl = maskedEl.children('.' + CLS_MASK_MSG), + maskDiv = maskedEl.children('.' + CLS_MASK); + if (msgEl) { + msgEl.remove(); + } + if (maskDiv) { + maskDiv.remove(); + } + maskedEl.removeClass('x-masked-relative x-masked'); + + } + }); + + return Mask; +});/** + * @fileOverview \u52a0\u8f7d\u6570\u636e\u65f6\u5c4f\u853d\u5c42 + * @ignore + */ + +define('bui/mask/loadmask',['bui/mask/mask'],function (require) { + + var Mask = require('bui/mask/mask'); + + /** + * \u5c4f\u853d\u6307\u5b9a\u5143\u7d20\uff0c\u5e76\u663e\u793a\u52a0\u8f7d\u4fe1\u606f + *
            
            +     * BUI.use('bui/mask',function(Mask){
            +     *    var loadMask = new Mask.LoadMask({
            +     *        el : '#domId',
            +     *        msg : 'loading ....'
            +     *    });
            +     *
            +     *    $('#btn').on('click',function(){
            +     *        loadMask.show();
            +     *    });
            +     *
            +     *    $('#btn1').on('click',function(){
            +     *        loadMask.hide();
            +     *    });
            +     * });
            +     * 
            + * @class BUI.Mask.LoadMask + * @extends BUI.Base + */ + function LoadMask(config) { + var _self = this; + LoadMask.superclass.constructor.call(_self, config); + } + + BUI.extend(LoadMask, BUI.Base); + + LoadMask.ATTRS = { + /** + * \u5c4f\u853d\u7684\u5143\u7d20 + *
            
            +         *    var loadMask = new Mask.LoadMask({
            +         *        el : '#domId'
            +         *    });
            +         * 
            + * @cfg {jQuery} el + */ + el : { + + }, + /** + * \u52a0\u8f7d\u65f6\u663e\u793a\u7684\u52a0\u8f7d\u4fe1\u606f + *
            
            +         *    var loadMask = new Mask.LoadMask({
            +         *        el : '#domId',
            +         *        msg : '\u6b63\u5728\u52a0\u8f7d\uff0c\u8bf7\u7a0d\u540e\u3002\u3002\u3002'
            +         *    });
            +         * 
            + * @cfg {String} msg [msg = 'Loading...'] + */ + msg:{ + value : 'Loading...' + }, + /** + * \u52a0\u8f7d\u65f6\u663e\u793a\u7684\u52a0\u8f7d\u4fe1\u606f\u7684\u6837\u5f0f + *
            
            +         *    var loadMask = new Mask.LoadMask({
            +         *        el : '#domId',
            +         *        msgCls : 'custom-cls'
            +         *    });
            +         * 
            + * @cfg {String} [msgCls = 'x-mask-loading'] + */ + msgCls:{ + value : 'x-mask-loading' + }, + /** + * \u52a0\u8f7d\u63a7\u4ef6\u662f\u5426\u7981\u7528 + * @type {Boolean} + * @field + * @default false + * @ignore + */ + disabled:{ + value : false + } + }; + + //\u5bf9\u8c61\u539f\u578b + BUI.augment(LoadMask, + /** + * @lends BUI.Mask.LoadMask.prototype + * @ignore + */ + { + + /** + * \u8bbe\u7f6e\u63a7\u4ef6\u4e0d\u53ef\u7528 + */ + disable:function () { + this.set('disabled',true); + }, + /** + * @private \u52a0\u8f7d\u5df2\u7ecf\u5b8c\u6bd5\uff0c\u89e3\u9664\u5c4f\u853d + */ + onLoad:function () { + Mask.unmaskElement(this.get('el')); + }, + /** + * @private \u5f00\u59cb\u52a0\u8f7d\uff0c\u5c4f\u853d\u5f53\u524d\u5143\u7d20 + */ + onBeforeLoad:function () { + var _self = this; + if (!_self.get('disabled')) { + Mask.maskElement(_self.get('el'), _self.get('msg'), this.get('msgCls')); + } + }, + /** + * \u663e\u793a\u52a0\u8f7d\u6761\uff0c\u5e76\u906e\u76d6\u5143\u7d20 + */ + show:function () { + this.onBeforeLoad(); + }, + + /** + * \u9690\u85cf\u52a0\u8f7d\u6761\uff0c\u5e76\u89e3\u9664\u906e\u76d6\u5143\u7d20 + */ + hide:function () { + this.onLoad(); + }, + + /* + * \u6e05\u7406\u8d44\u6e90 + */ + destroy:function () { + this.hide(); + this.clearAttrVals(); + this.off(); + } + }); + + return LoadMask; +});/** + * @fileOverview \u83dc\u5355\u547d\u540d\u7a7a\u95f4\u5165\u53e3\u6587\u4ef6 + * @ignore + */ + +define('bui/menu',['bui/common','bui/menu/menu','bui/menu/menuitem','bui/memu/contextmenu','bui/menu/popmenu','bui/menu/sidemenu'],function (require) { + + var BUI = require('bui/common'), + Menu = BUI.namespace('Menu'); + BUI.mix(Menu,{ + Menu : require('bui/menu/menu'), + MenuItem : require('bui/menu/menuitem'), + ContextMenu : require('bui/memu/contextmenu'), + PopMenu : require('bui/menu/popmenu'), + SideMenu : require('bui/menu/sidemenu') + }); + + Menu.ContextMenuItem = Menu.ContextMenu.Item; + return Menu; +});/** + * @fileOverview \u83dc\u5355\u9879 + * @ignore + */ +define('bui/menu/menuitem',['bui/common'],function(require){ + + var BUI = require('bui/common'), + Component = BUI.Component, + UIBase = Component.UIBase, + PREFIX = BUI.prefix, + CLS_OPEN = PREFIX + 'menu-item-open', + CLS_CARET = 'x-caret', + CLS_COLLAPSE = PREFIX + 'menu-item-collapsed', + DATA_ID = 'data-id'; + + /** + * @private + * @class BUI.Menu.MenuItemView + * @mixins BUI.Component.UIBase.ListItemView + * @mixins BUI.Component.UIBase.CollapseableView + * \u83dc\u5355\u9879\u7684\u89c6\u56fe\u7c7b + */ + var menuItemView = Component.View.extend([UIBase.ListItemView,UIBase.CollapseableView],{ + + _uiSetOpen : function (v) { + var _self = this, + cls = _self.getStatusCls('open'); + if(v){ + _self.get('el').addClass(cls); + }else{ + _self.get('el').removeClass(cls); + } + } + },{ + ATTRS : { + } + },{ + xclass:'menu-item-view' + }); + + /** + * \u83dc\u5355\u9879 + * @class BUI.Menu.MenuItem + * @extends BUI.Component.Controller + * @mixins BUI.Component.UIBase.ListItem + */ + var menuItem = Component.Controller.extend([UIBase.ListItem,UIBase.Collapseable],{ + /** + * \u6e32\u67d3 + * @protected + */ + renderUI : function(){ + var _self = this, + el = _self.get('el'), + id = _self.get('id'), + temp = null; + //\u672a\u8bbe\u7f6eid\u65f6\u81ea\u52a8\u751f\u6210 + if(!id){ + id = BUI.guid('menu-item'); + _self.set('id',id); + } + el.attr(DATA_ID,id); + }, + /** + * \u5904\u7406\u9f20\u6807\u79fb\u5165 + * @protected + */ + handleMouseEnter : function (ev) { + var _self = this; + if(this.get('subMenu')){ + this.set('open',true); + } + menuItem.superclass.handleMouseEnter.call(this,ev); + }, + /** + * \u5904\u7406\u9f20\u6807\u79fb\u51fa + * @protected + */ + handleMouseLeave :function (ev) { + var _self = this, + subMenu = _self.get('subMenu'), + toElement = ev.toElement; + if(toElement && subMenu && subMenu.containsElement(toElement)){ + _self.set('open',true); + }else{ + _self.set('open',false); + } + menuItem.superclass.handleMouseLeave.call(this,ev); + }, + /** + * \u81ea\u5df1\u548c\u5b50\u83dc\u5355\u662f\u5426\u5305\u542b + * @override + */ + containsElement:function (elem) { + var _self = this, + subMenu, + contains = menuItem.superclass.containsElement.call(_self,elem); + if(!contains){ + subMenu = _self.get('subMenu'); + contains = subMenu && subMenu.containsElement(elem); + } + return contains; + }, + //\u8bbe\u7f6e\u6253\u5f00\u5b50\u83dc\u5355 + _uiSetOpen : function (v) { + var _self = this, + subMenu = _self.get('subMenu'), + subMenuAlign = _self.get('subMenuAlign'); + if(subMenu){ + if(v){ + subMenuAlign.node = _self.get('el'); + subMenu.set('align',subMenuAlign); + subMenu.show(); + }else{ + var menuAlign = subMenu.get('align'); + //\u9632\u6b62\u5b50\u83dc\u5355\u88ab\u516c\u7528\u65f6 + if(!menuAlign || menuAlign.node == _self.get('el')){ + subMenu.hide(); + } + + } + } + }, + //\u8bbe\u7f6e\u4e0b\u7ea7\u83dc\u5355 + _uiSetSubMenu : function (subMenu) { + if(subMenu){ + var _self = this, + el = _self.get('el'), + parent = _self.get('parent'); + //\u8bbe\u7f6e\u83dc\u5355\u9879\u6240\u5c5e\u7684\u83dc\u5355\u4e3a\u4e0a\u4e00\u7ea7\u83dc\u5355 + if(!subMenu.get('parentMenu')){ + subMenu.set('parentMenu',parent); + if(parent.get('autoHide')){ + subMenu.set('autoHide',false); + } + } + $(_self.get('arrowTpl')).appendTo(el); + } + }, + /** + * \u6790\u6784\u51fd\u6570 + * @protected + */ + destructor : function () { + var _self = this, + subMenu = _self.get('subMenu'); + if(subMenu){ + subMenu.destroy(); + } + } + + },{ + ATTRS : + /** + * @lends BUI.Menu.MenuItem# + * @ignore + */ + { + /** + * \u9ed8\u8ba4\u7684Html \u6807\u7b7e + * @type {String} + */ + elTagName : { + value: 'li' + }, + xview : { + value : menuItemView + }, + /** + * \u83dc\u5355\u9879\u662f\u5426\u5c55\u5f00\uff0c\u663e\u793a\u5b50\u83dc\u5355 + * @cfg {Boolean} [open=false] + */ + /** + * \u83dc\u5355\u9879\u662f\u5426\u5c55\u5f00\uff0c\u663e\u793a\u5b50\u83dc\u5355 + * @type {Boolean} + * @default false + */ + open :{ + view : true, + value : false + }, + /** + * \u4e0b\u7ea7\u83dc\u5355 + * @cfg {BUI.Menu.Menu} subMenu + */ + /** + * \u4e0b\u7ea7\u83dc\u5355 + * @type {BUI.Menu.Menu} + */ + subMenu : { + view : true + }, + /** + * \u4e0b\u7ea7\u83dc\u5355\u548c\u83dc\u5355\u9879\u7684\u5bf9\u9f50\u65b9\u5f0f + * @type {Object} + * @protected + * @default \u9ed8\u8ba4\u5728\u4e0b\u9762\u663e\u793a + */ + subMenuAlign : { + valueFn : function (argument) { + return { + //node: this.get('el'), // \u53c2\u8003\u5143\u7d20, falsy \u6216 window \u4e3a\u53ef\u89c6\u533a\u57df, 'trigger' \u4e3a\u89e6\u53d1\u5143\u7d20, \u5176\u4ed6\u4e3a\u6307\u5b9a\u5143\u7d20 + points: ['tr','tl'], // ['tr', 'tl'] \u8868\u793a overlay \u7684 tl \u4e0e\u53c2\u8003\u8282\u70b9\u7684 tr \u5bf9\u9f50 + offset: [-5, 0] // \u6709\u6548\u503c\u4e3a [n, m] + } + } + }, + /** + * \u5f53\u5b58\u5728\u5b50\u83dc\u5355\u65f6\u7684\u7bad\u5934\u6a21\u7248 + * @protected + * @type {String} + */ + arrowTpl : { + value : '' + }, + events : { + value : { + 'afterOpenChange' : true + } + } + } + },{ + xclass : 'menu-item', + priority : 0 + }); + + var separator = menuItem.extend({ + + },{ + ATTRS : { + focusable : { + value : false + }, + selectable:{ + value : false + }, + handleMouseEvents:{ + value:false + } + } + },{ + xclass:'menu-item-sparator' + }); + + menuItem.View = menuItemView; + menuItem.Separator = separator; + + return menuItem; +});/** + * @fileOverview \u83dc\u5355\u57fa\u7c7b + * @author dxq613@gmail.com + * @ignore + */ + +define('bui/menu/menu',['bui/common'],function(require){ + + var BUI = require('bui/common'), + Component = BUI.Component, + UIBase = Component.UIBase; + + /** + * \u83dc\u5355 + * xclass:'menu' + * + * @class BUI.Menu.Menu + * @extends BUI.Component.Controller + * @mixins BUI.Component.UIBase.ChildList + */ + var Menu = Component.Controller.extend([UIBase.ChildList],{ + /** + * \u7ed1\u5b9a\u4e8b\u4ef6 + * @protected + */ + bindUI:function(){ + var _self = this; + + _self.on('click',function(e){ + var item = e.target, + multipleSelect = _self.get('multipleSelect'); + if(_self != item){ + //\u5355\u9009\u60c5\u51b5\u4e0b\uff0c\u5141\u8bb8\u81ea\u52a8\u9690\u85cf\uff0c\u4e14\u6ca1\u6709\u5b50\u83dc\u5355\u7684\u60c5\u51b5\u4e0b\uff0c\u83dc\u5355\u9690\u85cf + if(!multipleSelect && _self.get('clickHide') && !item.get('subMenu')){ + _self.getTopAutoHideMenu().hide(); + } + } + }); + + _self.on('afterOpenChange',function (ev) { + var target = ev.target, + opened = ev.newVal, + children = _self.get('children'); + if(opened){ + BUI.each(children,function(item) { + if(item !== target && item.get('open')){ + item.set('open',false); + } + }); + } + }); + + _self.on('afterVisibleChange',function (ev) { + var visible = ev.newVal, + parent = _self.get('parentMenu'); + _self._clearOpen(); + }); + }, + + //\u70b9\u51fb\u81ea\u52a8\u9690\u85cf\u65f6 + getTopAutoHideMenu : function() { + var _self = this, + parentMenu = _self.get('parentMenu'), + topHideMenu; + if(parentMenu && parentMenu.get('autoHide')){ + return parentMenu.getTopAutoHideMenu(); + } + if(_self.get('autoHide')){ + return _self; + } + return null; + }, + //\u6e05\u9664\u83dc\u5355\u9879\u7684\u6fc0\u6d3b\u72b6\u6001 + _clearOpen : function () { + var _self = this, + children = _self.get('children'); + BUI.each(children,function (item) { + if(item.set){ + item.set('open',false); + } + }); + }, + /** + * \u6839\u636eID\u67e5\u627e\u83dc\u5355\u9879 + * @param {String} id \u7f16\u53f7 + * @return {BUI.Menu.MenuItem} \u83dc\u5355\u9879 + */ + findItemById : function(id){ + + return this.findItemByField('id',id); + }, + _uiSetSelectedItem : function(item){ + if(item){ + _self.setSelected(item); + } + } + },{ + ATTRS: + /** + * @lends BUI.Menu.Menu# + * @ignore + */ + { + + elTagName:{ + view : true, + value : 'ul' + }, + idField:{ + value:'id' + }, + /** + * \u5b50\u7c7b\u7684\u9ed8\u8ba4\u7c7b\u540d\uff0c\u5373\u7c7b\u7684 xclass + * @type {String} + * @default 'menu-item' + */ + defaultChildClass : { + value : 'menu-item' + }, + /** + * \u9009\u4e2d\u7684\u83dc\u5355\u9879 + * @type {Object} + */ + selectedItem : { + + }, + /** + * \u4e0a\u4e00\u7ea7\u83dc\u5355 + * @type {BUI.Menu.Menu} + * @readOnly + */ + parentMenu : { + + } + } + + },{ + xclass : 'menu', + priority : 0 + }); + + return Menu; +});/** + * @fileOverview \u4e0b\u62c9\u83dc\u5355\uff0c\u4e00\u822c\u7528\u4e8e\u4e0b\u62c9\u663e\u793a\u83dc\u5355 + * @author dxq613@gmail.com + * @ignore + */ + +define('bui/menu/popmenu',['bui/common','bui/menu/menu'],function (require) { + + var BUI = require('bui/common'), + UIBase = BUI.Component.UIBase, + Menu = require('bui/menu/menu'); + + var popMenuView = BUI.Component.View.extend([UIBase.PositionView],{ + + }); + + /** + * @class BUI.Menu.PopMenu + * \u4e0a\u4e0b\u6587\u83dc\u5355\uff0c\u4e00\u822c\u7528\u4e8e\u5f39\u51fa\u83dc\u5355 + * xclass:'pop-menu' + * @extends BUI.Menu.Menu + * @mixins BUI.Component.UIBase.AutoShow + * @mixins BUI.Component.UIBase.Position + * @mixins BUI.Component.UIBase.Align + * @mixins BUI.Component.UIBase.AutoHide + */ + var popMenu = Menu.extend([UIBase.Position,UIBase.Align,UIBase.AutoShow,,UIBase.AutoHide],{ + + },{ + ATTRS:{ + /** \u70b9\u51fb\u83dc\u5355\u9879\uff0c\u5982\u679c\u83dc\u5355\u4e0d\u662f\u591a\u9009\uff0c\u83dc\u5355\u9690\u85cf + * @type {Boolean} + * @default true + */ + clickHide : { + value : true + }, + align : { + value : { + points: ['bl','tl'], // ['tr', 'tl'] \u8868\u793a overlay \u7684 tl \u4e0e\u53c2\u8003\u8282\u70b9\u7684 tr \u5bf9\u9f50 + offset: [0, 0] // \u6709\u6548\u503c\u4e3a [n, m] + } + }, + visibleMode : { + value : 'visibility' + }, + /** + * \u70b9\u51fb\u83dc\u5355\u5916\u9762\uff0c\u83dc\u5355\u9690\u85cf + * \u70b9\u51fb\u83dc\u5355\u9879\uff0c\u5982\u679c\u83dc\u5355\u4e0d\u662f\u591a\u9009\uff0c\u83dc\u5355\u9690\u85cf + * @type {Boolean} + * @default true + */ + autoHide : { + value : true + }, + visible : { + value : false + }, + xview:{ + value : popMenuView + } + } + },{ + xclass:'pop-menu' + }); + + return popMenu; + +});/** + * @fileOverview \u5f39\u51fa\u83dc\u5355\uff0c\u4e00\u822c\u7528\u4e8e\u53f3\u952e\u83dc\u5355 + * @author dxq613@gmail.com + * @ignore + */ + +define('bui/memu/contextmenu',['bui/common','bui/menu/menuitem','bui/menu/popmenu'],function (require) { + + var BUI = require('bui/common'), + MenuItem = require('bui/menu/menuitem'), + PopMenu = require('bui/menu/popmenu'), + PREFIX = BUI.prefix, + CLS_Link = PREFIX + 'menu-item-link', + CLS_ITEM_ICON = PREFIX + 'menu-item-icon', + Component = BUI.Component, + UIBase = Component.UIBase; + + /** + * \u4e0a\u4e0b\u6587\u83dc\u5355\u9879 + * xclass:'context-menu-item' + * @class BUI.Menu.ContextMenuItem + * @extends BUI.Menu.MenuItem + */ + var contextMenuItem = MenuItem.extend({ + + bindUI:function(){ + var _self = this; + + _self.get('el').delegate('.' + CLS_Link,'click',function(ev){ + ev.preventDefault(); + }); + }, + //\u8bbe\u7f6e\u56fe\u6807\u6837\u5f0f + _uiSetIconCls : function (v,ev) { + var _self = this, + preCls = ev.prevVal, + iconEl = _self.get('el').find('.'+CLS_ITEM_ICON); + iconEl.removeClass(preCls); + iconEl.addClass(v); + } + },{ + + ATTRS: + /** + * @lends BUI.Menu.MenuItem# + * @ignore + */ + { + /** + * \u663e\u793a\u7684\u6587\u672c + * @type {String} + */ + text:{ + veiw:true, + value:'' + }, + /** + * \u83dc\u5355\u9879\u56fe\u6807\u7684\u6837\u5f0f + * @type {String} + */ + iconCls:{ + sync:false, + value:'' + }, + tpl:{ + value:'\ + {text}' + } + } + },{ + xclass:'context-menu-item' + }); + + /** + * \u4e0a\u4e0b\u6587\u83dc\u5355\uff0c\u4e00\u822c\u7528\u4e8e\u5f39\u51fa\u83dc\u5355 + * xclass:'context-menu' + * @class BUI.Menu.ContextMenu + * @extends BUI.Menu.PopMenu + */ + var contextMenu = PopMenu.extend({ + + },{ + ATTRS:{ + /** + * \u5b50\u7c7b\u7684\u9ed8\u8ba4\u7c7b\u540d\uff0c\u5373\u7c7b\u7684 xclass + * @type {String} + * @override + * @default 'menu-item' + */ + defaultChildClass : { + value : 'context-menu-item' + }, + align : { + value : null + } + } + },{ + xclass:'context-menu' + }); + + contextMenu.Item = contextMenuItem; + return contextMenu; +}); +/** + * @fileOverview \u4fa7\u8fb9\u680f\u83dc\u5355 + * @author dxq613@gmail.com + * @ignore + */ +define('bui/menu/sidemenu',['bui/common','bui/menu/menu'],function(require){ + + var BUI = require('bui/common'), + Menu = require('bui/menu/menu'), + Component = BUI.Component, + CLS_MENU_TITLE = BUI.prefix + 'menu-title', + CLS_MENU_LEAF = 'menu-leaf'; + + /** + * \u4fa7\u8fb9\u680f\u83dc\u5355 + * xclass:'side-menu' + * @class BUI.Menu.SideMenu + * @extends BUI.Menu.Menu + */ + var sideMenu = Menu.extend( + /** + * @lends BUI.Menu.SideMenu.prototype + * @ignore + */ + { + //\u521d\u59cb\u5316\u914d\u7f6e\u9879 + initializer : function(){ + var _self = this, + items = _self.get('items'), + children = _self.get('children'); + + BUI.each(items,function(item){ + var menuCfg = _self._initMenuCfg(item); + children.push(menuCfg); + }); + }, + bindUI : function(){ + var _self = this, + children = _self.get('children'); + BUI.each(children,function(item){ + var menu = item.get('children')[0]; + if(menu){ + menu.publish('click',{ + bubbles:1 + }); + } + }); + //\u9632\u6b62\u94fe\u63a5\u8df3\u8f6c + _self.get('el').delegate('a','click',function(ev){ + ev.preventDefault(); + }); + //\u5904\u7406\u70b9\u51fb\u4e8b\u4ef6\uff0c\u5c55\u5f00\u3001\u6298\u53e0\u3001\u9009\u4e2d + _self.on('itemclick',function(ev){ + var item = ev.item, + titleEl = $(ev.domTarget).closest('.' + CLS_MENU_TITLE); + if(titleEl.length){ + var collapsed = item.get('collapsed'); + item.set('collapsed',!collapsed); + }else if(item.get('el').hasClass(CLS_MENU_LEAF)){ + _self.fire('menuclick',{item:item}); + _self.clearSelection(); + _self.setSelected(item); + } + }); + }, + /** + * @protected + * @ignore + */ + getItems:function(){ + var _self = this, + items = [], + children = _self.get('children'); + BUI.each(children,function(item){ + var menu = item.get('children')[0]; + items = items.concat(menu.get('children')); + }); + return items; + }, + //\u521d\u59cb\u5316\u83dc\u5355\u914d\u7f6e\u9879 + _initMenuCfg : function(item){ + var _self = this, + items = item.items, + subItems = [], + cfg = { + xclass : 'menu-item', + elCls : 'menu-second', + collapsed : item.collapsed, + selectable: false, + children : [{ + xclass : 'menu', + children : subItems + }], + content: '
            '+item.text+'
            ' + }; + BUI.each(items,function(subItem){ + var subItemCfg = _self._initSubMenuCfg(subItem); + subItems.push(subItemCfg); + }); + + return cfg; + + }, + //\u521d\u59cb\u5316\u4e8c\u7ea7\u83dc\u5355 + _initSubMenuCfg : function(subItem){ + var _self = this, + cfg = { + xclass : 'menu-item', + elCls : 'menu-leaf', + tpl : '{text}' + }; + return BUI.mix(cfg,subItem); + } + },{ + + ATTRS : + /** + * @lends BUI.Menu.SideMenu.prototype + * @ignore + */ + { + + /** + * \u914d\u7f6e\u7684items \u9879\u662f\u5728\u521d\u59cb\u5316\u65f6\u4f5c\u4e3achildren + * @protected + * @type {Boolean} + */ + autoInitItems : { + value : false + }, + events : { + value : { + /** + * \u70b9\u51fb\u83dc\u5355\u9879 + * @name BUI.Menu.SideMenu#menuclick + * @event + * @param {Object} e \u4e8b\u4ef6\u5bf9\u8c61 + * @param {Object} e.item \u5f53\u524d\u9009\u4e2d\u7684\u9879 + */ + 'menuclick' : false + } + } + } + },{ + xclass :'side-menu' + }); + + return sideMenu; +});/** + * @fileOverview \u5207\u6362\u6807\u7b7e\u5165\u53e3 + * @ignore + */ + +define('bui/tab',['bui/common','bui/tab/tab','bui/tab/tabitem','bui/tab/navtabitem','bui/tab/navtab','bui/tab/tabpanel','bui/tab/tabpanelitem'],function (require) { + var BUI = require('bui/common'), + Tab = BUI.namespace('Tab'); + + BUI.mix(Tab,{ + Tab : require('bui/tab/tab'), + TabItem : require('bui/tab/tabitem'), + NavTabItem : require('bui/tab/navtabitem'), + NavTab : require('bui/tab/navtab'), + TabPanel : require('bui/tab/tabpanel'), + TabPanelItem : require('bui/tab/tabpanelitem') + }); + + return Tab; +});/** + * @fileOverview \u5bfc\u822a\u9879 + * @author dxq613@gmail.com + * @ignore + */ +define('bui/tab/navtabitem',['bui/common'],function(requrie){ + + var BUI = requrie('bui/common'), + Component = BUI.Component, + CLS_ITEM_TITLE = 'tab-item-title', + CLS_ITEM_CLOSE = 'tab-item-close', + CLS_NAV_ACTIVED = 'tab-nav-actived', + CLS_CONTENT = 'tab-content'; + + /** + * \u5bfc\u822a\u6807\u7b7e\u9879\u7684\u89c6\u56fe\u7c7b + * @class BUI.Tab.NavTabItemView + * @extends BUI.Component.View + * @private + */ + var navTabItemView = Component.View.extend({ + renderUI : function(){ + var _self = this, + contentContainer = _self.get('tabContentContainer'), + contentTpl = _self.get('tabContentTpl'); + if(contentContainer){ + var tabContentEl = $(contentTpl).appendTo(contentContainer); + _self.set('tabContentEl',tabContentEl); + } + }, + //\u8bbe\u7f6e\u94fe\u63a5\u5730\u5740 + _uiSetHref : function(v){ + this._setHref(v); + }, + _setHref : function(href){ + var _self = this, + tabContentEl = _self.get('tabContentEl'); + href = href || _self.get('href'); + if(tabContentEl){ + $('iframe',tabContentEl).attr('src',href); + } + }, + resetHref : function(){ + this._setHref(); + }, + //\u8bbe\u7f6e\u6807\u9898 + _uiSetTitle : function(v){ + var _self = this, + el = _self.get('el'); + el.attr('title',v); + $('.' + CLS_ITEM_TITLE,el).text(v); + }, + _uiSetActived : function(v){ + var _self = this, + el = _self.get('el'); + + _self.setTabContentVisible(v); + if(v){ + el.addClass(CLS_NAV_ACTIVED); + }else{ + el.removeClass(CLS_NAV_ACTIVED); + } + + }, + //\u6790\u6784\u51fd\u6570 + destructor : function(){ + var _self = this, + tabContentEl = _self.get('tabContentEl'); + if(tabContentEl){ + tabContentEl.remove(); + } + }, + //\u8bbe\u7f6e\u6807\u7b7e\u5185\u5bb9\u662f\u5426\u53ef\u89c1 + setTabContentVisible : function(v){ + var _self = this, + tabContentEl = _self.get('tabContentEl'); + + if(tabContentEl){ + if(v){ + tabContentEl.show(); + }else{ + tabContentEl.hide(); + } + } + } + + },{ + + ATTRS : { + + tabContentContainer:{ + + }, + tabContentEl: { + + }, + title:{ + + }, + href:{ + + } + } + }); + + /** + * \u5bfc\u822a\u6807\u7b7e\u9879 + * xclass : 'nav-tab-item' + * @class BUI.Tab.NavTabItem + * @extends BUI.Component.Controller + */ + var navTabItem = Component.Controller.extend( + /** + * @lends BUI.Tab.NavTabItem.prototype + * @ignore + */ + { + /** + * \u521b\u5efaDOM + * @protected + */ + createDom : function(){ + var _self = this, + parent = _self.get('parent'); + if(parent){ + _self.set('tabContentContainer',parent.getTabContentContainer()); + } + }, + /** + * \u7ed1\u5b9a\u4e8b\u4ef6 + * @protected + */ + bindUI : function(){ + var _self = this, + el = _self.get('el'), + events = _self.get('events'); + + el.on('click',function(ev){ + var sender = $(ev.target); + if(sender.hasClass(CLS_ITEM_CLOSE)){ + if(_self.fire('closing')!== false){ + _self.close(); + } + } + }); + }, + /** + * \u5904\u7406\u53cc\u51fb + * @protected + */ + handleDblClick:function(ev){ + var _self = this; + + if(_self.fire('closing')!== false){ + _self.close(); + } + _self.fire('dblclick',{domTarget : ev.target,domEvent : ev}); + }, + /** + * \u5904\u7406\u53f3\u952e + * @protected + */ + handleContextMenu:function(ev){ + ev.preventDefault(); + this.fire('showmenu',{position:{x:ev.pageX,y:ev.pageY}}); + }, + /** + * \u8bbe\u7f6e\u6807\u9898 + * @param {String} title \u6807\u9898 + */ + setTitle : function(title){ + this.set('title',title); + }, + /** + * \u5173\u95ed + */ + close:function(){ + this.fire('closed'); + }, + /** + * \u91cd\u65b0\u52a0\u8f7d\u9875\u9762 + */ + reload : function(){ + this.get('view').resetHref(); + }, + /** + * @protected + * @ignore + */ + show : function(){ + var _self = this; + _self.get('el').show(500,function(){ + _self.set('visible',true); + }); + }, + /** + * @protected + * @ignore + */ + hide : function(callback){ + var _self = this; + this.get('el').hide(500,function(){ + _self.set('visible',false); + callback && callback(); + }); + }, + + _uiSetActived : function(v){ + var _self = this, + parent = _self.get('parent'); + if(parent && v){ + parent._setItemActived(_self); + } + }, + _uiSetCloseable : function(v){ + var _self = this, + el = _self.get('el'), + closeEl = el.find('.' + CLS_ITEM_CLOSE); + if(v){ + closeEl.show(); + }else{ + closeEl.hide(); + } + } + },{ + ATTRS : + /** + * @lends BUI.Tab.NavTabItem# + * @ignore + */ + { + elTagName : { + value: 'li' + }, + /** + * \u6807\u7b7e\u662f\u5426\u9009\u4e2d + * @type {Boolean} + */ + actived : { + view:true, + value : false + }, + /** + * \u662f\u5426\u53ef\u5173\u95ed + * @type {Boolean} + */ + closeable : { + value : true + }, + allowTextSelection:{ + view:false, + value:false + }, + events:{ + value : { + /** + * \u70b9\u51fb\u83dc\u5355\u9879 + * @name BUI.Tab.NavTabItem#click + * @event + * @param {Object} e \u4e8b\u4ef6\u5bf9\u8c61 + * @param {BUI.Tab.NavTabItem} e.target \u6b63\u5728\u70b9\u51fb\u7684\u6807\u7b7e + */ + 'click' : true, + /** + * \u6b63\u5728\u5173\u95ed\uff0c\u8fd4\u56defalse\u53ef\u4ee5\u963b\u6b62\u5173\u95ed\u4e8b\u4ef6\u53d1\u751f + * @name BUI.Tab.NavTabItem#closing + * @event + * @param {Object} e \u4e8b\u4ef6\u5bf9\u8c61 + * @param {BUI.Tab.NavTabItem} e.target \u6b63\u5728\u5173\u95ed\u7684\u6807\u7b7e + */ + 'closing' : true, + /** + * \u5173\u95ed\u4e8b\u4ef6 + * @name BUI.Tab.NavTabItem#closed + * @event + * @param {Object} e \u4e8b\u4ef6\u5bf9\u8c61 + * @param {BUI.Tab.NavTabItem} e.target \u5173\u95ed\u7684\u6807\u7b7e + */ + 'closed' : true, + /** + * @name BUI.Tab.NavTabItem#showmenu + * @event + * @param {Object} e \u4e8b\u4ef6\u5bf9\u8c61 + * @param {BUI.Tab.NavTabItem} e.target \u663e\u793a\u83dc\u5355\u7684\u6807\u7b7e + */ + 'showmenu' : true, + 'afterVisibleChange' : true + } + }, + /** + * @private + * @type {Object} + */ + tabContentContainer:{ + view : true + }, + /** + * @private + * @type {Object} + */ + tabContentTpl : { + view : true, + value : '' + }, + /** + * \u6807\u7b7e\u9875\u6307\u5b9a\u7684URL + * @cfg {String} href + */ + /** + * \u6807\u7b7e\u9875\u6307\u5b9a\u7684URL + * @type {String} + */ + href : { + view : true, + value:'' + }, + visible:{ + view:true, + value:true + }, + /** + * \u6807\u7b7e\u6587\u672c + * @cfg {String} title + */ + /** + * \u6807\u7b7e\u6587\u672c + * tab.getItem('id').set('title','new title'); + * @type {String} + * @default '' + */ + title : { + view:true, + value : '' + }, + tpl : { + view:true, + value :'' + }, + xview:{ + value : navTabItemView + } + } + },{ + xclass : 'nav-tab-item', + priority : 0 + }); + + navTabItem.View = navTabItemView; + return navTabItem; +});/** + * @fileOverview \u5bfc\u822a\u6807\u7b7e + * @author dxq613@gmail.com + * @ignore + */ +define('bui/tab/navtab',['bui/common','bui/menu'],function(require){ + + var BUI = require('bui/common'), + Menu = require('bui/menu'), + Component = BUI.Component, + CLS_NAV_LIST = 'tab-nav-list', + CLS_ARROW_LEFT = 'arrow-left', + CLS_ARROW_RIGHT = 'arrow-right', + ID_CLOSE = 'm_close', + ITEM_WIDTH = 140; + + /** + * \u5bfc\u822a\u6807\u7b7e\u7684\u89c6\u56fe\u7c7b + * @class BUI.Tab.NavTabView + * @extends BUI.Component.View + * @private + */ + var navTabView = Component.View.extend({ + renderUI : function(){ + var _self = this, + el = _self.get('el'), + //tpl = _self.get('tpl'), + listEl = null; + + //$(tpl).appendTo(el); + listEl = el.find('.' + CLS_NAV_LIST); + _self.setInternal('listEl',listEl); + }, + getContentElement : function(){ + + return this.get('listEl'); + }, + getTabContentContainer : function(){ + return this.get('el').find('.tab-content-container'); + }, + _uiSetHeight : function(v){ + var _self = this, + el = _self.get('el'), + barEl = el.find('.tab-nav-bar'), + containerEl = _self.getTabContentContainer(); + if(v){ + containerEl.height(v - barEl.height()); + } + el.height(v); + } + },{ + + },{ + xclass : 'nav-tab-view', + priority:0 + }); + /** + * \u5bfc\u822a\u6807\u7b7e + * @class BUI.Tab.NavTab + * @extends BUI.Component.Controller + */ + var navTab = Component.Controller.extend( + /** + * @lends BUI.Tab.NavTab.prototype + * @ignore + */ + { + /** + * \u6dfb\u52a0\u6807\u7b7e\u9879 + * @param {Object} config \u83dc\u5355\u9879\u7684\u914d\u7f6e\u9879 + * @param {Boolean} reload \u5982\u679c\u6807\u7b7e\u9875\u5df2\u5b58\u5728\uff0c\u5219\u91cd\u65b0\u52a0\u8f7d + */ + addTab:function(config,reload){ + var _self = this, + id = config.id || BUI.guid('tab-item'), + item = _self.getItemById(id); + + if(item){ + var hrefChage = false; + if(config.href && item.get('href') != config.href){ + item.set('href',config.href); + hrefChage = true; + } + _self._setItemActived(item); + if(reload && !hrefChage){ + item.reload(); + } + }else{ + + config = BUI.mix({ + id : id, + visible : false, + actived : true, + xclass : 'nav-tab-item' + },config); + + item = _self.addChild(config); + item.show(); + _self._resetItemList(); + } + return item; + }, + /** + * \u83b7\u53d6\u5bfc\u822a\u6807\u7b7e\uff0c\u5b58\u653e\u5185\u5bb9\u7684\u8282\u70b9 + * @return {jQuery} \u5bfc\u822a\u5185\u5bb9\u7684\u5bb9\u5668 + */ + getTabContentContainer : function(){ + return this.get('view').getTabContentContainer(); + }, + //\u7ed1\u5b9a\u4e8b\u4ef6 + bindUI: function(){ + var _self = this; + + _self._bindScrollEvent(); + + //\u76d1\u542c\u70b9\u51fb\u6807\u7b7e + _self.on('click',function(ev){ + var item = ev.target; + if(item != _self){ + _self._setItemActived(item); + _self.fire('itemclick',{item:item}); + } + }); + + //\u5173\u95ed\u6807\u7b7e + _self.on('closed',function(ev){ + var item = ev.target; + _self._closeItem(item); + }); + + _self.on('showmenu',function(ev){ + _self._showMenu(ev.target,ev.position); + }); + + _self.on('afterVisibleChange',function(ev){ + var item = ev.target; + if(item.get('actived')){ + _self._scrollToItem(item); + } + }); + }, + //\u7ed1\u5b9a\u6eda\u52a8\u4e8b\u4ef6 + _bindScrollEvent : function(){ + var _self = this, + el = _self.get('el'); + + el.find('.arrow-left').on('click',function(){ + if(el.hasClass(CLS_ARROW_LEFT + '-active')){ + _self._scrollLeft(); + } + }); + + el.find('.arrow-right').on('click',function(){ + if(el.hasClass(CLS_ARROW_RIGHT + '-active')){ + _self._scrllRight(); + } + }); + }, + _showMenu : function(item,position){ + var _self = this, + menu = _self._getMenu(), + closeable = item.get('closeable'), + closeItem; + + _self.set('showMenuItem',item); + + menu.set('xy',[position.x,position.y]); + menu.show(); + closeItem = menu.getItem(ID_CLOSE); + if(closeItem){ + closeItem.set('disabled',!closeable); + } + }, + /** + * \u901a\u8fc7id,\u8bbe\u7f6e\u9009\u4e2d\u7684\u6807\u7b7e\u9879 + * @param {String} id \u6807\u7b7e\u7f16\u53f7 + */ + setActived : function(id){ + var _self = this, + item = _self.getItemById(id); + _self._setItemActived(item); + }, + /** + * \u83b7\u53d6\u5f53\u524d\u9009\u4e2d\u7684\u6807\u7b7e\u9879 + * @return {BUI.Tab.NavTabItem} \u9009\u4e2d\u7684\u6807\u7b7e\u5bf9\u8c61 + */ + getActivedItem : function(){ + var _self = this, + children = _self.get('children'), + result = null; + BUI.each(children,function(item){ + if(item.get('actived')){ + result = item; + return false; + } + }); + return result; + }, + /** + * \u901a\u8fc7\u7f16\u53f7\u83b7\u53d6\u6807\u7b7e\u9879 + * @param {String} id \u6807\u7b7e\u9879\u7684\u7f16\u53f7 + * @return {BUI.Tab.NavTabItem} \u6807\u7b7e\u9879\u5bf9\u8c61 + */ + getItemById : function(id){ + var _self = this, + children = _self.get('children'), + result = null; + BUI.each(children,function(item){ + if(item.get('id') === id){ + result = item; + return false; + } + }); + return result; + }, + _getMenu : function(){ + var _self = this; + + return _self.get('menu') || _self._initMenu(); + }, + _initMenu : function(){ + var _self = this, + menu = new Menu.ContextMenu({ + children : [ + { + + xclass : 'context-menu-item', + iconCls:'icon icon-refresh', + text : '\u5237\u65b0', + listeners:{ + 'click':function(){ + var item = _self.get('showMenuItem'); + if(item){ + item.reload(); + } + } + } + }, + { + id : ID_CLOSE, + xclass : 'context-menu-item', + iconCls:'icon icon-remove', + text: '\u5173\u95ed', + listeners:{ + 'click':function(){ + var item = _self.get('showMenuItem'); + if(item){ + item.close(); + } + } + } + }, + { + xclass : 'context-menu-item', + iconCls:'icon icon-remove-sign', + text : '\u5173\u95ed\u5176\u4ed6', + listeners:{ + 'click':function(){ + var item = _self.get('showMenuItem'); + if(item){ + _self.closeOther(item); + } + } + } + }, + { + xclass : 'context-menu-item', + iconCls:'icon icon-remove-sign', + text : '\u5173\u95ed\u6240\u6709', + listeners:{ + 'click':function(){ + _self.closeAll(); + } + } + } + + ] + }); + + _self.set('menu',menu); + return menu; + }, + //\u5173\u95ed\u6807\u7b7e\u9879 + _closeItem : function(item){ + var _self = this, + index = _self._getIndex(item), + activedItem = _self.getActivedItem(), + preItem = _self._getItemByIndex(index -1), + nextItem = _self._getItemByIndex(index + 1); + + item.hide(function(){ + _self.removeChild(item,true); + _self._resetItemList(); + if(activedItem === item){ + if(preItem){ + _self._setItemActived(preItem); + }else{ + _self._setItemActived(nextItem); + } + }else{//\u5220\u9664\u6807\u7b7e\u9879\u65f6\uff0c\u53ef\u80fd\u4f1a\u5f15\u8d77\u6eda\u52a8\u6309\u94ae\u72b6\u6001\u7684\u6539\u53d8 + _self._scrollToItem(activedItem);; + } + + }); + + }, + closeAll:function(){ + var _self = this, + children = _self.get('children'); + BUI.each(children,function(item){ + item.close(); + }); + }, + closeOther : function(curItem){ + var _self = this, + children = _self.get('children'); + BUI.each(children,function(item){ + if(curItem !==item){ + item.close(); + } + + }); + }, + //\u901a\u8fc7\u4f4d\u7f6e\u67e5\u627e\u6807\u7b7e\u9879 + _getItemByIndex : function(index){ + var _self = this, + children = _self.get('children'); + return children[index]; + }, + //\u83b7\u53d6\u6807\u7b7e\u9879\u7684\u4f4d\u7f6e + _getIndex : function(item){ + var _self = this, + children = _self.get('children'); + return BUI.Array.indexOf(item,children); + }, + //\u91cd\u65b0\u8ba1\u7b97\u6807\u7b7e\u9879\u5bb9\u5668\u7684\u5bbd\u5ea6\u4f4d\u7f6e + _resetItemList : function(){ + var _self = this, + children = _self.get('children'), + container = _self.getContentElement(), + totalWidth = children.length * ITEM_WIDTH; + + container.width(totalWidth); + + }, + //\u4f7f\u6307\u5b9a\u6807\u7b7e\u9879\u5728\u7528\u6237\u53ef\u89c6\u533a\u57df\u5185 + _scrollToItem : function(item){ + var _self = this, + container = _self.getContentElement(), + containerPosition = container.position(), + disWidth = _self._getDistanceToEnd(item,container,containerPosition), + disBegin = _self._getDistanceToBegin(item,containerPosition); //\u5f53\u524d\u6d3b\u52a8\u7684\u9879\u8ddd\u79bb\u6700\u53f3\u7aef\u7684\u8ddd\u79bb + + //\u5982\u679c\u6807\u7b7e\u9879\u5217\u8868\u5c0f\u4e8e\u6574\u4e2a\u6807\u7b7e\u5bb9\u5668\u7684\u5927\u5c0f\uff0c\u5219\u5de6\u5bf9\u9f50 + if(container.width() < container.parent().width()){ + _self._scrollTo(container,0); + }else if(disBegin < 0){//\u5982\u679c\u5de6\u8fb9\u88ab\u906e\u6321\uff0c\u5411\u53f3\u79fb\u52a8 + + _self._scrollTo(container,containerPosition.left - (disBegin)); + + }else if(disWidth > 0){//\u5982\u679c\u5f53\u524d\u8282\u70b9\u88ab\u53f3\u7aef\u906e\u6321\uff0c\u5219\u5411\u5de6\u6eda\u52a8\u5230\u663e\u793a\u4f4d\u7f6e + + _self._scrollTo(container,containerPosition.left + (disWidth) * -1); + + }else if(containerPosition.left < 0){//\u5c06\u5de6\u8fb9\u79fb\u52a8\uff0c\u4f7f\u6700\u540e\u4e00\u4e2a\u6807\u7b7e\u9879\u79bb\u53f3\u8fb9\u6700\u8fd1 + var lastDistance = _self._getLastDistance(container,containerPosition), + toLeft = 0; + if(lastDistance < 0){ + toLeft = containerPosition.left - lastDistance; + toLeft = toLeft < 0 ? toLeft : 0; + _self._scrollTo(container,toLeft); + } + } + }, + //\u83b7\u53d6\u6807\u7b7e\u5230\u6700\u5de6\u7aef\u7684\u8ddd\u79bb + _getDistanceToBegin : function(item,containerPosition){ + var position = item.get('el').position(); + + return position.left + containerPosition.left; + }, + /** + * \u83b7\u53d6\u6807\u7b7e\u5230\u6700\u53f3\u7aef\u7684\u8ddd\u79bb + * @return {Number} \u50cf\u7d20 + * @private + */ + _getDistanceToEnd : function(item,container,containerPosition){ + var _self = this, + container = container || _self.getContentElement(), + wraperWidth = container.parent().width(), + containerPosition = containerPosition || container.position(), + offsetLeft = _self._getDistanceToBegin(item,containerPosition), + disWidth = offsetLeft + ITEM_WIDTH - wraperWidth; + return disWidth; + }, + //\u83b7\u53d6\u6700\u540e\u4e00\u4e2a\u6807\u7b7e\u9879\u79bb\u53f3\u8fb9\u7684\u95f4\u8ddd + _getLastDistance : function(container,containerPosition){ + var _self = this, + children = _self.get('children'), + lastItem = children[children.length - 1]; + if(lastItem) + { + return _self._getDistanceToEnd(lastItem,container,containerPosition); + } + return 0; + }, + _scrollTo : function(el,left,callback){ + var _self = this; + el.animate({left:left},500,function(){ + _self._setArrowStatus(el); + }); + }, + _scrollLeft : function(){ + var _self = this, + container = _self.getContentElement(), + position = container.position(), + disWidth = _self._getLastDistance(container,position), + toLeft; + if(disWidth > 0 ){ + toLeft = disWidth > ITEM_WIDTH ? ITEM_WIDTH : disWidth; + _self._scrollTo(container,position.left - toLeft); + } + + }, + //\u5411\u53f3\u6eda\u52a8 + _scrllRight : function(){ + var _self = this, + container = _self.getContentElement(), + position = container.position(), + toRight; + if(position.left < 0){ + toRight = position.left + ITEM_WIDTH; + toRight = toRight < 0 ? toRight : 0; + _self._scrollTo(container,toRight); + } + }, + //\u8bbe\u7f6e\u5411\u5de6\uff0c\u5411\u53f3\u7684\u7bad\u5934\u662f\u5426\u53ef\u7528 + _setArrowStatus : function(container,containerPosition){ + + container = container || this.getContentElement(); + var _self = this, + wapperEl = _self.get('el'), + position = containerPosition || container.position(), + disWidth = _self._getLastDistance(container,containerPosition); + + //\u53ef\u4ee5\u5411\u5de6\u8fb9\u6eda\u52a8 + if(position.left < 0){ + wapperEl.addClass(CLS_ARROW_RIGHT+'-active'); + }else{ + wapperEl.removeClass(CLS_ARROW_RIGHT+'-active'); + } + + if(disWidth > 0){ + wapperEl.addClass(CLS_ARROW_LEFT+'-active'); + }else{ + wapperEl.removeClass(CLS_ARROW_LEFT+'-active'); + } + }, + //\u8bbe\u7f6e\u5f53\u524d\u9009\u4e2d\u7684\u6807\u7b7e + _setItemActived:function(item){ + var _self = this, + preActivedItem = _self.getActivedItem(); + if(item === preActivedItem){ + return; + } + + if(preActivedItem){ + preActivedItem.set('actived',false); + } + if(item){ + if(!item.get('actived')){ + item.set('actived',true); + } + //\u5f53\u6807\u7b7e\u9879\u53ef\u89c1\u65f6\uff0c\u5426\u5219\u65e0\u6cd5\u8ba1\u7b97\u4f4d\u7f6e\u4fe1\u606f + if(item.get('visible')){ + _self._scrollToItem(item); + } + + _self.fire('activeChange',{item:item}); + } + } + + }, + + { + ATTRS : + /** + * @lends BUI.Tab.NavTab.prototype + * @ignore + */ + { + defaultChildClass:{ + value : 'nav-tab-item' + }, + /** + * @private + * \u53f3\u952e\u83dc\u5355 + * @type {Object} + */ + menu : { + + }, + /** + * \u6e32\u67d3\u6807\u7b7e\u7684\u6a21\u7248 + * @type {String} + */ + tpl : { + view : true, + value : '
            '+ + '
              '+ + '
              '+ + '
              ' + }, + xview : { + value : navTabView + }, + events : { + + value : { + /** + * \u70b9\u51fb\u6807\u7b7e\u9879 + * @event + * @param {Object} e \u4e8b\u4ef6\u5bf9\u8c61 + * @param {BUI.Tab.NavTabItem} e.item \u6807\u7b7e\u9879 + */ + 'itemclick' : false + } + } + } + }, + { + xclass:'nav-tab', + priority : 0 + + } + ); + + return navTab; +});/** + * @fileOverview + * @ignore + */ + +define('bui/tab/tabitem',['bui/common'],function (require) { + + + var BUI = require('bui/common'), + Component = BUI.Component, + UIBase = Component.UIBase; + + /** + * @private + * @class BUI.Tab.TabItemView + * @extends BUI.Component.View + * @mixins BUI.Component.UIBase.ListItemView + * \u6807\u7b7e\u9879\u7684\u89c6\u56fe\u5c42\u5bf9\u8c61 + */ + var itemView = Component.View.extend([UIBase.ListItemView],{ + },{ + xclass:'tab-item-view' + }); + + + /** + * \u6807\u7b7e\u9879 + * @class BUI.Tab.TabItem + * @extends BUI.Component.Controller + * @mixins BUI.Component.UIBase.ListItem + */ + var item = Component.Controller.extend([UIBase.ListItem],{ + + },{ + ATTRS : + { + + elTagName:{ + view:true, + value:'li' + }, + xview:{ + value:itemView + }, + tpl:{ + view:true, + value:'{text}' + } + } + },{ + xclass:'tab-item' + }); + + + item.View = itemView; + return item; +});/** + * @fileOverview \u5207\u6362\u6807\u7b7e + * @ignore + */ + +define('bui/tab/tab',['bui/common'],function (require) { + + + var BUI = require('bui/common'), + Component = BUI.Component, + UIBase = Component.UIBase; + + /** + * \u5217\u8868 + * xclass:'tab' + *
              
              +   * BUI.use('bui/tab',function(Tab){
              +   *   
              +   *     var tab = new Tab.Tab({
              +   *         render : '#tab',
              +   *         elCls : 'nav-tabs',
              +   *         autoRender: true,
              +   *         children:[
              +   *           {text:'\u6807\u7b7e\u4e00',value:'1'},
              +   *           {text:'\u6807\u7b7e\u4e8c',value:'2'},
              +   *           {text:'\u6807\u7b7e\u4e09',value:'3'}
              +   *         ]
              +   *       });
              +   *     tab.on('selectedchange',function (ev) {
              +   *       var item = ev.item;
              +   *       $('#log').text(item.get('text') + ' ' + item.get('value'));
              +   *     });
              +   *     tab.setSelected(tab.getItemAt(0)); //\u8bbe\u7f6e\u9009\u4e2d\u7b2c\u4e00\u4e2a
              +   *   
              +   *   });
              +   *  
              + * @class BUI.Tab.Tab + * @extends BUI.Component.Controller + * @mixins BUI.Component.UIBase.ChildList + */ + var tab = Component.Controller.extend([UIBase.ChildList],{ + + },{ + ATTRS : { + elTagName:{ + view:true, + value:'ul' + }, + /** + * \u5b50\u7c7b\u7684\u9ed8\u8ba4\u7c7b\u540d\uff0c\u5373\u7c7b\u7684 xclass + * @type {String} + * @override + * @default 'tab-item' + */ + defaultChildClass : { + value : 'tab-item' + } + } + },{ + xclass : 'tab' + }); + + return tab; + +});/** + * @fileOverview + * @ignore + */ + +define('bui/tab/tabpanelitem',['bui/common','bui/tab/tabitem'],function (require) { + + + var BUI = require('bui/common'), + TabItem = require('bui/tab/tabitem'), + Component = BUI.Component; + + /** + * @private + * @class BUI.Tab.TabPanelItemView + * @extends BUI.Tab.TabItemView + * \u5b58\u5728\u9762\u677f\u7684\u6807\u7b7e\u9879\u89c6\u56fe\u5c42\u5bf9\u8c61 + */ + var itemView = TabItem.View.extend({ + },{ + xclass:'tab-panel-item-view' + }); + + + /** + * \u6807\u7b7e\u9879 + * @class BUI.Tab.TabPanelItem + * @extends BUI.Tab.TabItem + */ + var item = TabItem.extend({ + + renderUI : function(){ + var _self = this, + selected = _self.get('selected'); + _self._setPanelVisible(selected); + }, + //\u8bbe\u7f6e\u9762\u677f\u662f\u5426\u53ef\u89c1 + _setPanelVisible : function(visible){ + var _self = this, + panel = _self.get('panel'), + method = visible ? 'show' : 'hide'; + if(panel){ + $(panel)[method](); + } + }, + //\u9009\u4e2d\u6807\u7b7e\u9879\u65f6\u663e\u793a\u9762\u677f + _uiSetSelected : function(v){ + this._setPanelVisible(v); + }, + destructor: function(){ + var _self = this, + panel = _self.get('panel'); + if(panel && _self.get('panelDestroyable')){ + $(panel).remove(); + } + }, + _uiSetPanelContent : function(v){ + var _self = this, + panel = _self.get('panel'); + $(panel).html(v); + } + },{ + ATTRS : + { + /** + * \u6807\u7b7e\u9879\u5bf9\u5e94\u7684\u9762\u677f\u5bb9\u5668\uff0c\u5f53\u6807\u7b7e\u9009\u4e2d\u65f6\uff0c\u9762\u677f\u663e\u793a + * @cfg {String|HTMLElement|jQuery} panel + * @internal \u9762\u677f\u5c5e\u6027\u4e00\u822c\u7531 tabPanel\u8bbe\u7f6e\u800c\u4e0d\u5e94\u8be5\u7531\u7528\u6237\u624b\u5de5\u8bbe\u7f6e + */ + /** + * \u6807\u7b7e\u9879\u5bf9\u5e94\u7684\u9762\u677f\u5bb9\u5668\uff0c\u5f53\u6807\u7b7e\u9009\u4e2d\u65f6\uff0c\u9762\u677f\u663e\u793a + * @type {String|HTMLElement|jQuery} + * @readOnly + */ + panel : { + + }, + /** + * panel\u7684\u5185\u5bb9 + * @property {String} + */ + panelContent : { + + }, + /** + * \u9ed8\u8ba4\u7684\u52a0\u8f7d\u63a7\u4ef6\u5185\u5bb9\u7684\u914d\u7f6e,\u9ed8\u8ba4\u503c\uff1a + *
              +       *  {
              +       *   property : 'panelContent',
              +       *   lazyLoad : {
              +       *       event : 'active'
              +       *   },
              +       *     loadMask : {
              +       *       el : _self.get('panel')
              +       *   }
              +       * }
              +       * 
              + * @type {Object} + */ + defaultLoaderCfg : { + valueFn :function(){ + var _self = this; + return { + property : 'panelContent', + autoLoad : false, + lazyLoad : { + event : 'afterSelectedChange' + }, + loadMask : { + el : _self.get('panel') + } + } + } + }, + /** + * \u79fb\u9664\u6807\u7b7e\u9879\u65f6\u662f\u5426\u79fb\u9664\u9762\u677f\uff0c\u9ed8\u8ba4\u4e3a false + * @type {Boolean} + */ + panelDestroyable : { + value : true + }, + xview:{ + value:itemView + } + } + },{ + xclass:'tab-panel-item' + }); + + item.View = itemView; + return item; + +});/** + * @fileOverview \u6bcf\u4e2a\u6807\u7b7e\u5bf9\u5e94\u4e00\u4e2a\u9762\u677f + * @ignore + */ + +define('bui/tab/tabpanel',['bui/common','bui/tab/tab'],function (require) { + + var BUI = require('bui/common'), + Tab = require('bui/tab/tab'); + + /** + * \u5e26\u6709\u9762\u677f\u7684\u5207\u6362\u6807\u7b7e + *
              
              +   * BUI.use('bui/tab',function(Tab){
              +   *   
              +   *     var tab = new Tab.TabPanel({
              +   *       render : '#tab',
              +   *       elCls : 'nav-tabs',
              +   *       panelContainer : '#panel',
              +   *       autoRender: true,
              +   *       children:[
              +   *         {text:'\u6e90\u4ee3\u7801',value:'1'},
              +   *         {text:'HTML',value:'2'},
              +   *         {text:'JS',value:'3'}
              +   *       ]
              +   *     });
              +   *     tab.setSelected(tab.getItemAt(0));
              +   *   });
              +   * 
              + * @class BUI.Tab.TabPanel + * @extends BUI.Tab.Tab + */ + var tabPanel = Tab.extend({ + initializer : function(){ + var _self = this, + children = _self.get('children'), + panelContainer = $(_self.get('panelContainer')), + panelCls = _self.get('panelCls'), + panels = panelCls ? panelContainer.find('.' + panels) : panelContainer.children(); + + BUI.each(children,function(item,index){ + if(item.set){ + item.set('panel',panels[index]); + }else{ + item.panel = panels[index]; + } + }); + } + },{ + ATTRS : { + + /** + * \u9ed8\u8ba4\u5b50\u63a7\u4ef6\u7684xclass + * @type {String} + */ + defaultChildClass:{ + value : 'tab-panel-item' + }, + /** + * \u9762\u677f\u7684\u5bb9\u5668 + * @type {String|HTMLElement|jQuery} + */ + panelContainer : { + + }, + /** + * panel \u9762\u677f\u4f7f\u7528\u7684\u6837\u5f0f\uff0c\u5982\u679c\u521d\u59cb\u5316\u65f6\uff0c\u5bb9\u5668\u5185\u5df2\u7ecf\u5b58\u5728\u6709\u8be5\u6837\u5f0f\u7684DOM\uff0c\u5219\u4f5c\u4e3a\u9762\u677f\u4f7f\u7528 + * \u5bf9\u5e94\u540c\u4e00\u4e2a\u4f4d\u7f6e\u7684\u6807\u7b7e\u9879,\u5982\u679c\u4e3a\u7a7a\uff0c\u9ed8\u8ba4\u53d6\u9762\u677f\u5bb9\u5668\u7684\u5b50\u5143\u7d20 + * @type {String} + */ + panelCls : { + + } + } + },{ + xclass : 'tab-panel' + }); + + return tabPanel; +});/** + * @fileOverview \u5de5\u5177\u680f\u547d\u540d\u7a7a\u95f4\u5165\u53e3 + * @ignore + */ + +define('bui/toolbar',['bui/common','bui/toolbar/baritem','bui/toolbar/bar','bui/toolbar/pagingbar','bui/toolbar/numberpagingbar'],function (require) { + var BUI = require('bui/common'), + Toolbar = BUI.namespace('Toolbar'); + + BUI.mix(Toolbar,{ + BarItem : require('bui/toolbar/baritem'), + Bar : require('bui/toolbar/bar'), + PagingBar : require('bui/toolbar/pagingbar'), + NumberPagingBar : require('bui/toolbar/numberpagingbar') + }); + return Toolbar; +});/** + * @fileOverview buttons or controls of toolbar + * @author dxq613@gmail.com, yiminghe@gmail.com + * @ignore + */ +define('bui/toolbar/baritem',function(){ + + /** + * @name BUI.Toolbar + * @namespace \u5de5\u5177\u680f\u547d\u540d\u7a7a\u95f4 + * @ignore + */ + var PREFIX = BUI.prefix, + Component = BUI.Component, + UIBase = Component.UIBase; + + /** + * barItem\u7684\u89c6\u56fe\u7c7b + * @class BUI.Toolbar.BarItemView + * @extends BUI.Component.View + * @mixins BUI.Component.UIBase.ListItemView + * @private + */ + var BarItemView = Component.View.extend([UIBase.ListItemView]); + /** + * \u5de5\u5177\u680f\u7684\u5b50\u9879\uff0c\u5305\u62ec\u6309\u94ae\u3001\u6587\u672c\u3001\u94fe\u63a5\u548c\u5206\u9694\u7b26\u7b49 + * @class BUI.Toolbar.BarItem + * @extends BUI.Component.Controller + */ + var BarItem = Component.Controller.extend([UIBase.ListItem],{ + + /** + * render baritem 's dom + * @protected + */ + renderUI:function() { + var el = this.get('el'); + el.addClass(PREFIX + 'inline-block'); + if (!el.attr('id')) { + el.attr('id', this.get('id')); + } + } + },{ + ATTRS: + /** + * @lends BUI.Toolbar.BarItem.prototype + * @ignore + */ + { + elTagName :{ + view : true, + value : 'li' + }, + /** + * \u662f\u5426\u53ef\u9009\u62e9 + *
              
              +       * 
              +       * 
              + * @cfg {Object} [selectable = false] + */ + selectable : { + value : false + }, + /** + * \u662f\u5426\u83b7\u53d6\u7126\u70b9 + * @default {boolean} false + */ + focusable : { + value : false + }, + xview: { + value : BarItemView + } + } + },{ + xclass : 'bar-item', + priority : 1 + }); + + /** + * \u5de5\u5177\u680f\u7684\u5b50\u9879\uff0c\u6dfb\u52a0\u6309\u94ae + * xclass : 'bar-item-button' + * @extends BUI.Toolbar.BarItem + * @class BUI.Toolbar.BarItem.Button + */ + var ButtonBarItem = BarItem.extend({ + + _uiSetDisabled : function(value){ + var _self = this, + el = _self.get('el'), + method = value ? 'addClass' : 'removeClass'; + + el.find('button').attr('disabled',value)[method](PREFIX + 'button-disabled'); + }, + _uiSetChecked: function(value){ + var _self = this, + el = _self.get('el'), + method = value ? 'addClass' : 'removeClass'; + + el.find('button')[method](PREFIX + 'button-checked'); + }, + _uiSetText : function(v){ + var _self = this, + el = _self.get('el'); + el.find('button').text(v); + }, + _uiSetbtnCls : function(v){ + var _self = this, + el = _self.get('el'); + el.find('button').addClass(v); + } + + },{ + ATTRS: + /** + * @lends BUI.Toolbar.BarItem.Button.prototype + * @ignore + */ + { + /** + * \u662f\u5426\u9009\u4e2d + * @type {Boolean} + */ + checked : { + value :false + }, + /** + * \u6a21\u677f + * @type {String} + */ + tpl : { + view : true, + value : '' + }, + /** + * \u6309\u94ae\u7684\u6837\u5f0f + * @cfg {String} btnCls + */ + /** + * \u6309\u94ae\u7684\u6837\u5f0f + * @type {String} + */ + btnCls:{ + sync:false + }, + /** + * The text to be used as innerHTML (html tags are accepted). + * @cfg {String} text + */ + /** + * The text to be used as innerHTML (html tags are accepted). + * @type {String} + */ + text : { + sync:false, + value : '' + } + } + },{ + xclass : 'bar-item-button', + priority : 2 + }); + + /** + * \u5de5\u5177\u680f\u9879\u4e4b\u95f4\u7684\u5206\u9694\u7b26 + * xclass:'bar-item-separator' + * @extends BUI.Toolbar.BarItem + * @class BUI.Toolbar.BarItem.Separator + */ + var SeparatorBarItem = BarItem.extend({ + /* render separator's dom + * @protected + * + */ + renderUI:function() { + var el = this.get('el'); + el .attr('role', 'separator'); + } + }, + { + xclass : 'bar-item-separator', + priority : 2 + }); + + + /** + * \u5de5\u5177\u680f\u9879\u4e4b\u95f4\u7684\u7a7a\u767d + * xclass:'bar-item-spacer' + * @extends BUI.Toolbar.BarItem + * @class BUI.Toolbar.BarItem.Spacer + */ + var SpacerBarItem = BarItem.extend({ + + },{ + ATTRS: + /** + * @lends BUI.Toolbar.BarItem.Spacer.prototype + * @ignore + */ + { + /** + * \u7a7a\u767d\u5bbd\u5ea6 + * @type {Number} + */ + width : { + view:true, + value : 2 + } + } + },{ + xclass : 'bar-item-spacer', + priority : 2 + }); + + + /** + * \u663e\u793a\u6587\u672c\u7684\u5de5\u5177\u680f\u9879 + * xclass:'bar-item-text' + * @extends BUI.Toolbar.BarItem + * @class BUI.Toolbar.BarItem.Text + */ + var TextBarItem = BarItem.extend({ + _uiSetText : function(text){ + var _self = this, + el = _self.get('el'); + el.html(text); + } + },{ + ATTRS: + /** + * @lends BUI.Toolbar.BarItem.Text.prototype + * @ignore + */ + { + + /** + * \u6587\u672c\u7528\u4f5c innerHTML (html tags are accepted). + * @cfg {String} text + */ + /** + * \u6587\u672c\u7528\u4f5c innerHTML (html tags are accepted). + * @default {String} "" + */ + text : { + value : '' + } + } + },{ + xclass : 'bar-item-text', + priority : 2 + }); + + + BarItem.types = { + 'button' : ButtonBarItem, + 'separator' : SeparatorBarItem, + 'spacer' : SpacerBarItem, + 'text' : TextBarItem + }; + + + return BarItem; +});/** + * @fileOverview A collection of commonly used function buttons or controls represented in compact visual form. + * @author dxq613@gmail.com, yiminghe@gmail.com + * @ignore + */ +define('bui/toolbar/bar',function(){ + + var Component = BUI.Component, + UIBase = Component.UIBase; + + /** + * bar\u7684\u89c6\u56fe\u7c7b + * @class BUI.Toolbar.BarView + * @extends BUI.Component.View + * @private + */ + var barView = Component.View.extend({ + + renderUI:function() { + var el = this.get('el'); + el.attr('role', 'toolbar'); + + if (!el.attr('id')) { + el.attr('id', BUI.guid('bar')); + } + } + }); + + /** + * \u5de5\u5177\u680f + * \u53ef\u4ee5\u653e\u7f6e\u6309\u94ae\u3001\u6587\u672c\u3001\u94fe\u63a5\u7b49\uff0c\u662f\u5206\u9875\u680f\u7684\u57fa\u7c7b + * xclass : 'bar' + *

              + * + *

              + * ## \u6309\u94ae\u7ec4 + *
              
              +   *   BUI.use('bui/toolbar',function(Toolbar){
              +   *     var buttonGroup = new Toolbar.Bar({
              +   *       elCls : 'button-group',
              +   *       defaultChildCfg : {
              +   *         elCls : 'button button-small'
              +   *       },
              +   *       children : [{content : '\u589e\u52a0'},{content : '\u4fee\u6539'},{content : '\u5220\u9664'}],
              +   *       
              +   *       render : '#b1'
              +   *     });
              +   *
              +   *     buttonGroup.render();
              +   *   });
              +   * 
              + * @class BUI.Toolbar.Bar + * @extends BUI.Component.Controller + * @mixins BUI.Component.UIBase.ChildList + */ + var Bar = Component.Controller.extend([UIBase.ChildList], + /** + * @lends BUI.Toolbar.Bar.prototype + * @ignore + */ + { + /** + * \u901a\u8fc7id \u83b7\u53d6\u9879 + * @param {String|Number} id the id of item + * @return {BUI.Toolbar.BarItem} + */ + getItem : function(id){ + return this.getChild(id); + } + },{ + ATTRS: + /** + * @lends BUI.Toolbar.Bar.prototype + * @ignore + */ + { + elTagName :{ + view : true, + value : 'ul' + }, + /** + * \u9ed8\u8ba4\u5b50\u9879\u7684\u6837\u5f0f + * @type {String} + * @override + */ + defaultChildClass: { + value : 'bar-item' + }, + /** + * \u83b7\u53d6\u7126\u70b9 + * @protected + * @ignore + */ + focusable : { + value : false + }, + /** + * @private + * @ignore + */ + xview : { + value : barView + } + } + },{ + xclass : 'bar', + priority : 1 + }); + + return Bar; +});/** + * @fileOverview a specialized toolbar that is bound to a Grid.Store and provides automatic paging control. + * @author dxq613@gmail.com, yiminghe@gmail.com + * @ignore + */ +define('bui/toolbar/pagingbar',['bui/toolbar/bar'],function(require) { + + var Bar = require('bui/toolbar/bar'), + Component = BUI.Component, + Bindable = Component.UIBase.Bindable; + + var PREFIX = BUI.prefix, + ID_FIRST = 'first', + ID_PREV = 'prev', + ID_NEXT = 'next', + ID_LAST = 'last', + ID_SKIP = 'skip', + ID_TOTAL_PAGE = 'totalPage', + ID_CURRENT_PAGE = 'curPage', + ID_TOTAL_COUNT = 'totalCount'; + + /** + * \u5206\u9875\u680f + * xclass:'pagingbar' + * @extends BUI.Toolbar.Bar + * @mixins BUI.Component.UIBase.Bindable + * @class BUI.Toolbar.PagingBar + */ + var PagingBar = Bar.extend([Bindable], + /** + * @lends BUI.Toolbar.PagingBar.prototype + * @ignore + */ + { + /** + * From Bar, Initialize this paging bar items. + * + * @protected + */ + initializer:function () { + var _self = this, + children = _self.get('children'), + items = _self.get('items'), + store = _self.get('store'); + if(!items || items.length){ + items = _self._getItems(); + BUI.each(items, function (item) { + children.push(item);//item + }); + } + + if (store && store.get('pageSize')) { + _self.set('pageSize', store.get('pageSize')); + } + }, + /** + * bind page change and store events + * + * @protected + */ + bindUI:function () { + var _self = this; + _self._bindButtonEvent(); + //_self._bindStoreEvents(); + + }, + /** + * skip to page + * this method can fire "beforepagechange" event, + * if you return false in the handler the action will be canceled + * @param {Number} page target page + */ + jumpToPage:function (page) { + if (page <= 0 || page > this.get('totalPage')) { + return; + } + var _self = this, + store = _self.get('store'), + pageSize = _self.get('pageSize'), + index = page - 1, + start = index * pageSize; + var result = _self.fire('beforepagechange', {from:_self.get('curPage'), to:page}); + if (store && result !== false) { + store.load({ start:start, limit:pageSize, pageIndex:index }); + } + }, + //after store loaded data,reset the information of paging bar and buttons state + _afterStoreLoad:function (store, params) { + var _self = this, + pageSize = _self.get('pageSize'), + start = 0, //\u9875\u9762\u7684\u8d77\u59cb\u8bb0\u5f55 + end, //\u9875\u9762\u7684\u7ed3\u675f\u8bb0\u5f55 + totalCount, //\u8bb0\u5f55\u7684\u603b\u6570 + curPage, //\u5f53\u524d\u9875 + totalPage;//\u603b\u9875\u6570; + + start = store.get('start'); + + //\u8bbe\u7f6e\u52a0\u8f7d\u6570\u636e\u540e\u7ffb\u9875\u680f\u7684\u72b6\u6001 + totalCount = store.getTotalCount(); + end = totalCount - start > pageSize ? start + store.getCount() : totalCount; + totalPage = parseInt((totalCount + pageSize - 1) / pageSize, 10); + totalPage = totalPage > 0 ? totalPage : 1; + curPage = parseInt(start / pageSize, 10) + 1; + + _self.set('start', start); + _self.set('end', end); + _self.set('totalCount', totalCount); + _self.set('curPage', curPage); + _self.set('totalPage', totalPage); + + //\u8bbe\u7f6e\u6309\u94ae\u72b6\u6001 + _self._setAllButtonsState(); + _self._setNumberPages(); + }, + + //bind page change events + _bindButtonEvent:function () { + var _self = this; + + //first page handler + _self._bindButtonItemEvent(ID_FIRST, function () { + _self.jumpToPage(1); + }); + + //previous page handler + _self._bindButtonItemEvent(ID_PREV, function () { + _self.jumpToPage(_self.get('curPage') - 1); + }); + + //previous page next + _self._bindButtonItemEvent(ID_NEXT, function () { + _self.jumpToPage(_self.get('curPage') + 1); + }); + + //previous page next + _self._bindButtonItemEvent(ID_LAST, function () { + _self.jumpToPage(_self.get('totalPage')); + }); + //skip to one page + _self._bindButtonItemEvent(ID_SKIP, function () { + handleSkip(); + }); + //input page number and press key "enter" + var curPage = _self.getItem(ID_CURRENT_PAGE); + if(curPage){ + curPage.get('el').on('keyup', function (event) { + event.stopPropagation(); + if (event.keyCode === 13) { + handleSkip(); + } + }); + } + + //when click skip button or press key "enter",cause an action of skipping page + /** + * @private + * @ignore + */ + function handleSkip() { + var value = parseInt(_self._getCurrentPageValue(), 10); + if (_self._isPageAllowRedirect(value)) { + _self.jumpToPage(value); + } else { + _self._setCurrentPageValue(_self.get('curPage')); + } + } + }, + // bind button item event + _bindButtonItemEvent:function (id, func) { + var _self = this, + item = _self.getItem(id); + if (item) { + item.on('click', func); + } + }, + onLoad:function (params) { + var _self = this, + store = _self.get('store'); + _self._afterStoreLoad(store, params); + }, + //get the items of paging bar + _getItems:function () { + var _self = this, + items = _self.get('items'); + if (items && items.length) { + return items; + } + //default items + items = []; + //first item + items.push(_self._getButtonItem(ID_FIRST)); + //previous item + items.push(_self._getButtonItem(ID_PREV)); + //separator item + items.push(_self._getSeparator()); + //total page of store + items.push(_self._getTextItem(ID_TOTAL_PAGE)); + //current page of store + items.push(_self._getTextItem(ID_CURRENT_PAGE)); + //button for skip to + items.push(_self._getButtonItem(ID_SKIP)); + //separator item + items.push(_self._getSeparator()); + //next item + items.push(_self._getButtonItem(ID_NEXT)); + //last item + items.push(_self._getButtonItem(ID_LAST)); + //separator item + items.push(_self._getSeparator()); + //current page of store + items.push(_self._getTextItem(ID_TOTAL_COUNT)); + return items; + }, + //get item which the xclass is button + _getButtonItem:function (id) { + var _self = this; + return { + id:id, + xclass:'bar-item-button', + text:_self.get(id + 'Text'), + disabled:true, + elCls:_self.get(id + 'Cls') + }; + }, + //get separator item + _getSeparator:function () { + return {xclass:'bar-item-separator'}; + }, + //get text item + _getTextItem:function (id) { + var _self = this; + return { + id:id, + xclass:'bar-item-text', + text:_self._getTextItemTpl(id) + }; + }, + //get text item's template + _getTextItemTpl:function (id) { + var _self = this, + obj = {}; + obj[id] = _self.get(id); + return BUI.substitute(this.get(id + 'Tpl'), obj); + }, + //Whether to allow jump, if it had been in the current page or not within the scope of effective page, not allowed to jump + _isPageAllowRedirect:function (value) { + var _self = this; + return value && value > 0 && value <= _self.get('totalPage') && value !== _self.get('curPage'); + }, + //when page changed, reset all buttons state + _setAllButtonsState:function () { + var _self = this, + store = _self.get('store'); + if (store) { + _self._setButtonsState([ID_PREV, ID_NEXT, ID_FIRST, ID_LAST, ID_SKIP], true); + } + + if (_self.get('curPage') === 1) { + _self._setButtonsState([ID_PREV, ID_FIRST], false); + } + if (_self.get('curPage') === _self.get('totalPage')) { + _self._setButtonsState([ID_NEXT, ID_LAST], false); + } + }, + //if button id in the param buttons,set the button state + _setButtonsState:function (buttons, enable) { + var _self = this, + children = _self.get('children'); + BUI.each(children, function (child) { + if (BUI.Array.indexOf(child.get('id'), buttons) !== -1) { + child.set('disabled', !enable); + } + }); + }, + //show the information of current page , total count of pages and total count of records + _setNumberPages:function () { + var _self = this, + totalPageItem = _self.getItem(ID_TOTAL_PAGE), + totalCountItem = _self.getItem(ID_TOTAL_COUNT); + if (totalPageItem) { + totalPageItem.set('content', _self._getTextItemTpl(ID_TOTAL_PAGE)); + } + _self._setCurrentPageValue(_self.get(ID_CURRENT_PAGE)); + if (totalCountItem) { + totalCountItem.set('content', _self._getTextItemTpl(ID_TOTAL_COUNT)); + } + }, + _getCurrentPageValue:function (curItem) { + var _self = this; + curItem = curItem || _self.getItem(ID_CURRENT_PAGE); + var textEl = curItem.get('el').find('input'); + return textEl.val(); + }, + //show current page in textbox + _setCurrentPageValue:function (value, curItem) { + var _self = this; + curItem = curItem || _self.getItem(ID_CURRENT_PAGE); + var textEl = curItem.get('el').find('input'); + textEl.val(value); + } + }, { + ATTRS: + /** + * @lends BUI.Toolbar.PagingBar.prototype + * @ignore + */ + { + + /** + * the text of button for first page + * @default {String} "\u9996 \u9875" + */ + firstText:{ + value:'\u9996 \u9875' + }, + /** + * the cls of button for first page + * @default {String} "bui-pb-first" + */ + firstCls:{ + value:PREFIX + 'pb-first' + }, + /** + * the text for previous page button + * @default {String} "\u524d\u4e00\u9875" + */ + prevText:{ + value:'\u4e0a\u4e00\u9875' + }, + /** + * the cls for previous page button + * @default {String} "bui-pb-prev" + */ + prevCls:{ + value: PREFIX + 'pb-prev' + }, + /** + * the text for next page button + * @default {String} "\u4e0b\u4e00\u9875" + */ + nextText:{ + value:'\u4e0b\u4e00\u9875' + }, + /** + * the cls for next page button + * @default {String} "bui-pb-next" + */ + nextCls:{ + value: PREFIX + 'pb-next' + }, + /** + * the text for last page button + * @default {String} "\u672b \u9875" + */ + lastText:{ + value:'\u672b \u9875' + }, + /** + * the cls for last page button + * @default {String} "bui-pb-last" + */ + lastCls:{ + value:PREFIX + 'pb-last' + }, + /** + * the text for skip page button + * @default {String} "\u8df3 \u8f6c" + */ + skipText:{ + value:'\u786e\u5b9a' + }, + /** + * the cls for skip page button + * @default {String} "bui-pb-last" + */ + skipCls:{ + value:PREFIX + 'pb-skip' + }, + /** + * the template of total page info + * @default {String} '\u5171 {totalPage} \u9875' + */ + totalPageTpl:{ + value:'\u5171 {totalPage} \u9875' + }, + /** + * the template of current page info + * @default {String} '\u7b2c <input type="text" autocomplete="off" class="bui-pb-page" size="20" name="inputItem"> \u9875' + */ + curPageTpl:{ + value:'\u7b2c \u9875' + }, + /** + * the template of total count info + * @default {String} '\u7b2c <input type="text" autocomplete="off" class="bui-pb-page" size="20" name="inputItem"> \u9875' + */ + totalCountTpl:{ + value:'\u5171{totalCount}\u6761\u8bb0\u5f55' + }, + /** + * current page of the paging bar + * @private + * @default {Number} 0 + */ + curPage:{ + value:0 + }, + /** + * total page of the paging bar + * @private + * @default {Number} 0 + */ + totalPage:{ + value:0 + }, + /** + * total count of the store that the paging bar bind to + * @private + * @default {Number} 0 + */ + totalCount:{ + value:0 + }, + /** + * The number of records considered to form a 'page'. + * if store set the property ,override this value by store's pageSize + * @private + */ + pageSize:{ + value:30 + }, + /** + * The {@link BUI.Data.Store} the paging toolbar should use as its data source. + * @protected + */ + store:{ + + } + }, + ID_FIRST:ID_FIRST, + ID_PREV:ID_PREV, + ID_NEXT:ID_NEXT, + ID_LAST:ID_LAST, + ID_SKIP:ID_SKIP, + ID_TOTAL_PAGE:ID_TOTAL_PAGE, + ID_CURRENT_PAGE:ID_CURRENT_PAGE, + ID_TOTAL_COUNT:ID_TOTAL_COUNT + }, { + xclass:'pagingbar', + priority:2 + }); + + return PagingBar; + +});/** + * @fileOverview a specialized toolbar that is bound to a Grid.Store and provides automatic paging control. + * @author + * @ignore + */ +define('bui/toolbar/numberpagingbar',['bui/toolbar/pagingbar'],function(require) { + + var Component = BUI.Component, + PBar = require('bui/toolbar/pagingbar'); + + var PREFIX = BUI.prefix, + NUMBER_CONTAINER = 'numberContainer', + CLS_NUMBER_BUTTON = PREFIX + 'button-number'; + + /** + * \u6570\u5b57\u5206\u9875\u680f + * xclass:'pagingbar-number' + * @extends BUI.Toolbar.PagingBar + * @class BUI.Toolbar.NumberPagingBar + */ + var NumberPagingBar = PBar.extend( + /** + * @lends BUI.Toolbar.NumberPagingBar.prototype + * @ignore + */ + { + /** + * get the initial items of paging bar + * @protected + * + */ + _getItems : function(){ + var _self = this, + items = _self.get('items'); + + if(items){ + return items; + } + //default items + items = []; + //previous item + items.push(_self._getButtonItem(PBar.ID_PREV)); + //next item + items.push(_self._getButtonItem(PBar.ID_NEXT)); + return items; + }, + _getButtonItem : function(id){ + var _self = this; + + return { + id:id, + content:''+_self.get(id + 'Text')+'', + disabled:true + }; + }, + /** + * bind buttons event + * @protected + * + */ + _bindButtonEvent : function(){ + var _self = this, + cls = _self.get('numberButtonCls'); + _self.constructor.superclass._bindButtonEvent.call(this); + _self.get('el').delegate('a','click',function(ev){ + ev.preventDefault(); + }); + _self.on('click',function(ev){ + var item = ev.target; + if(item && item.get('el').hasClass(cls)){ + var page = item.get('id'); + _self.jumpToPage(page); + } + }); + }, + //\u8bbe\u7f6e\u9875\u7801\u4fe1\u606f\uff0c\u8bbe\u7f6e \u9875\u6570 \u6309\u94ae + _setNumberPages : function(){ + var _self = this; + + _self._setNumberButtons(); + }, + //\u8bbe\u7f6e \u9875\u6570 \u6309\u94ae + _setNumberButtons : function(){ + var _self = this, + curPage = _self.get('curPage'), + totalPage = _self.get('totalPage'), + numberItems = _self._getNumberItems(curPage,totalPage), + curItem; + + _self._clearNumberButtons(); + + BUI.each(numberItems,function(item){ + _self._appendNumberButton(item); + }); + curItem = _self.getItem(curPage); + if(curItem){ + curItem.set('selected',true); + } + + }, + _appendNumberButton : function(cfg){ + var _self = this, + count = _self.getItemCount(); + var item = _self.addItemAt(cfg,count - 1); + }, + _clearNumberButtons : function(){ + var _self = this, + items = _self.getItems(), + count = _self.getItemCount(); + + while(count > 2){ + _self.removeItemAt(count-2); + count = _self.getItemCount(); + } + }, + //\u83b7\u53d6\u6240\u6709\u9875\u7801\u6309\u94ae\u7684\u914d\u7f6e\u9879 + _getNumberItems : function(curPage, totalPage){ + var _self = this, + result = [], + maxLimitCount = _self.get('maxLimitCount'), + showRangeCount = _self.get('showRangeCount'), + maxPage; + + function addNumberItem(from,to){ + for(var i = from ;i<=to;i++){ + result.push(_self._getNumberItem(i)); + } + } + + function addEllipsis(){ + result.push(_self._getEllipsisItem()); + } + + if(totalPage < maxLimitCount){ + maxPage = totalPage; + addNumberItem(1,totalPage); + }else{ + var startNum = (curPage <= maxLimitCount) ? 1 : (curPage - showRangeCount), + lastLimit = curPage + showRangeCount, + endNum = lastLimit < totalPage ? (lastLimit > maxLimitCount ? lastLimit : maxLimitCount) : totalPage; + if (startNum > 1) { + addNumberItem(1, 1); + if(startNum > 2){ + addEllipsis(); + } + } + maxPage = endNum; + addNumberItem(startNum, endNum); + } + + if (maxPage < totalPage) { + if(maxPage < totalPage -1){ + addEllipsis(); + } + addNumberItem(totalPage, totalPage); + } + + return result; + }, + //\u83b7\u53d6\u7701\u7565\u53f7 + _getEllipsisItem : function(){ + var _self = this; + return { + disabled: true, + content : _self.get('ellipsisTpl') + }; + }, + //\u751f\u6210\u9875\u9762\u6309\u94ae\u914d\u7f6e\u9879 + _getNumberItem : function(page){ + var _self = this; + return { + id : page, + elCls : _self.get('numberButtonCls') + }; + } + + },{ + ATTRS:{ + itemStatusCls : { + value : { + selected : 'active', + disabled : 'disabled' + } + }, + itemTpl : { + value : '{id}' + }, + prevText : { + value : '<<' + }, + nextText : { + value : '>>' + }, + /** + * \u5f53\u9875\u7801\u8d85\u8fc7\u8be5\u8bbe\u7f6e\u9875\u7801\u65f6\u5019\u663e\u793a\u7701\u7565\u53f7 + * @default {Number} 4 + */ + maxLimitCount : { + value : 4 + }, + showRangeCount : { + value : 1 + }, + /** + * the css used on number button + */ + numberButtonCls:{ + value : CLS_NUMBER_BUTTON + }, + /** + * the template of ellipsis which represent the omitted pages number + */ + ellipsisTpl : { + value : '...' + } + } + },{ + xclass : 'pagingbar-number', + priority : 3 + }); + + return NumberPagingBar; + +});/** + * @fileOverview \u8fdb\u5ea6\u6761\u547d\u540d\u7a7a\u95f4\u5165\u53e3 + * @ignore + */ + +define('bui/progressbar',['bui/common','bui/progressbar/base','bui/progressbar/load'],function (require) { + var BUI = require('bui/common'), + ProgressBar = BUI.namespace('ProgressBar'); + BUI.mix(ProgressBar,{ + Base : require('bui/progressbar/base'), + Load : require('bui/progressbar/load') + }); + + return ProgressBar; +});/** + * @fileOverview \u8fdb\u5ea6\u6761 + * @author dengbin + * @ignore + */ + +define('bui/progressbar/base',['bui/common'],function(require){ + + var BUI = require('bui/common'); + + var progressBarView = BUI.Component.View.extend({ + _uiSetPercent : function (v) { + + var _self = this, + innerEl = _self.get('el').children(); + if(!BUI.isArray(v)){ + v = [v]; + } + BUI.each(innerEl,function (item,index) { + $(item).width(v[index] + '%'); + }); + + } + },{ + ATTRS:{ + percent:{} + } + }); + /** + * \u57fa\u7840\u8fdb\u5ea6\u6761\uff0c\u7528\u4e8e\u663e\u793a\u8fdb\u5ea6 + * xclass:'progress-bar' + *
              
              + 	*  BUI.use('bui/progressbar',function(ProgressBar){
              +  *   
              +  *     var Progressbar = ProgressBar.Base,
              +  *       progressbar = new Progressbar({
              +  *         elCls : 'progress progress-striped active',
              +  *         render : '#progressbar',
              +  *         tpl : '
              ', + * percent:10 + * }); + * progressbar.render(); + * }); + *
              + * @class BUI.ProgressBar.Base + * @extends BUI.Component.Controller + */ + var progressBar = BUI.Component.Controller.extend({ + + },{ + ATTRS : { + /** + * \u8fdb\u5ea6\u767e\u5206\u6bd4 + * @type {number} + */ + percent : { + view:true, + value: 0 + }, + tpl : { + value : '
              ' + }, + xview : { + value : progressBarView + } + } + + },{ + xclass:'progress-bar' + }); + + return progressBar; +});/** + * @fileOverview \u5f02\u6b65\u8fdb\u5ea6\u6761 + * @author dengbin + * @ignore + */ + +define('bui/progressbar/load',['bui/progressbar/base'],function(require){ + + var Base = require('bui/progressbar/base'), + notStarted = 0, + hasStarted = 1, + hasEnded = 2; + /** + * \u5f02\u6b65\u52a0\u8f7d\u8fdb\u5ea6\u6761 + *
              
              +	 *  BUI.use('bui/progressbar',function(ProgressBar){
              +   *   
              +   *    var Progressbar = ProgressBar.Load;
              +   *    var num = 10,
              +   *      ajaxCfg = {     
              +   *        url : 'data/progress-bar-data.php',
              +   *        dataType : 'json',
              +   *        data : {
              +   *          id :num
              +   *        }
              +   *      };
              +   *    var progressbar = new Progressbar({
              +   *      render : '#progressbar',
              +   *      tpl : '
              ', + * elCls:'progress progress-striped active', + * ajaxCfg : ajaxCfg, + * interval : 1000 + * }); + * + * progressbar.render(); + * $('.button-primary').click(function(){ + * num = 10; + * ajaxCfg.data.id = num; + * progressbar.start(); + * }); + + * $('.button-danger').click(function(){ + * progressbar.cancel(); + * }); + * + * }); + *
              + * @extends BUI.ProgressBar.Base + * @class BUI.ProgressBar.Load + */ + var loadProgressBar = Base.extend({ + /** + * @protected + * @ignore + */ + bindUI : function () { + var _self = this; + + _self.on('afterPercentChange',function (ev) { + if(_self.isLoading()){ + var percent = _self.get('percent'); + if(percent == 100 ){ + _self.onCompleted(); + } + _self.onChange(); + } + }); + + }, + /** + * \u5f00\u59cb + *
              
              +		 *   progressbar.start();
              +		 * 
              + */ + start : function () { + var _self = this; + if(!_self.isLoading()){ + _self.onstart(); + } + }, + /** + * \u5b8c\u6210 + *
              
              +		 *   progressbar.complete();
              +		 * 
              + */ + complete : function(){ + var _self = this; + clearTimeout(_self.get('t')); + _self.set('percent',100); + + }, + /** + * \u53d6\u6d88 + *
              
              +		 *   progressbar.cancel();
              +		 * 
              + */ + cancel : function(){ + var _self = this; + clearTimeout(_self.get('t')); + if(_self.get('percent')){ + _self.set('percent',0); + } + _self.set('status',notStarted); + }, + /** + * \u5f00\u59cb + * @protected + */ + onstart : function(){ + var _self = this, + cfg = _self.get('cfg'); + + _self.set('percent',0); + _self.set('status',hasStarted); + + _self.fire('start',cfg); + _self._startLoad(); + }, + /** + * \u52a0\u8f7d\u53d8\u5316 + * @protected + */ + onChange : function(){ + var _self = this; + _self.fire('loadchange'); + }, + + /** + * \u5b8c\u6210 + * @protected + */ + onCompleted : function(){ + var _self = this; + _self.set('status',hasEnded); + _self.fire('completed'); + + }, + /** + * \u662f\u5426\u6b63\u5728\u52a0\u8f7d + * @return {Boolean} \u662f\u5426\u6b63\u5728\u52a0\u8f7d + */ + isLoading : function () { + return this.get('status') === hasStarted; + }, + /** + * \u662f\u5426\u5df2\u7ecf\u52a0\u8f7d\u5b8c\u6bd5 + * @return {Boolean} \u662f\u5426\u52a0\u8f7d\u5b8c\u6bd5 + */ + isCompleted : function () { + return this.get('status') === hasEnded; + }, + _startLoad : function () { + var _self = this, + ajaxCfg = _self.get('ajaxCfg'), + interval = _self.get('interval'), + t; + ajaxCfg.success = function(data){ + var percent = data.percent; + _self.set('percent',percent); + if(percent < 100 && _self.isLoading()){ + t = setTimeout(function(){ + $.ajax(ajaxCfg); + },interval); + _self.set('t',t); + } + }; + $.ajax(ajaxCfg); + + } + },{ + ATTRS : { + /** + * \u8fdb\u5ea6\u6761\u72b6\u6001 + * 0\uff1a \u672a\u5f00\u59cb + * 1 \uff1a \u5df2\u5f00\u59cb + * 2 \uff1a \u4ee5\u7ed3\u675f + * @type {Number} + */ + status : { + value : 0 + }, + /** + * ajax\u914d\u7f6e\u9879 + * @type {Object} + */ + ajaxCfg : { + + }, + /** + * \u53d1\u9001\u8bf7\u6c42\u65f6\u95f4\u95f4\u9694 + * @type {number} + */ + interval : { + value : 500 + }, + /** + * \u5f53\u6570\u636e\u52a0\u8f7d\u5b8c\u6210\u540e + * @name BUI.ProgressBar.Load + * @event + * @param {jQuery.Event} e \u4e8b\u4ef6\u5bf9\u8c61\uff0c\u5305\u542b\u52a0\u8f7d\u6570\u636e\u65f6\u7684\u53c2\u6570 + */ + events : { + value : [ + 'start', + 'loadchange', + 'completed' + ] + } + } + },{ + xclass : 'progress-bar-load' + }); + + return loadProgressBar; +}); +/** + * @fileOverview \u65e5\u5386\u547d\u540d\u7a7a\u95f4\u5165\u53e3 + * @ignore + */ + +define('bui/calendar',['bui/common','bui/calendar/calendar','bui/calendar/monthpicker','bui/calendar/datepicker'],function (require) { + var BUI = require('bui/common'), + Calendar = BUI.namespace('Calendar'); + BUI.mix(Calendar,{ + Calendar : require('bui/calendar/calendar'), + MonthPicker : require('bui/calendar/monthpicker'), + DatePicker : require('bui/calendar/datepicker') + }); + + return Calendar; +});/** + * @fileOverview \u9009\u62e9\u5e74\u6708 + * @author dxq613@gmail.com + * @ignore + */ + +define('bui/calendar/monthpicker',['bui/common','bui/overlay','bui/list','bui/toolbar'],function (require){ + var BUI = require('bui/common'), + Component = BUI.Component, + Overlay = require('bui/overlay').Overlay, + List = require('bui/list').SimpleList, + Toolbar = require('bui/toolbar'), + PREFIX = BUI.prefix, + CLS_MONTH = 'x-monthpicker-month', + DATA_MONTH = 'data-month', + DATA_YEAR = 'data-year', + CLS_YEAR = 'x-monthpicker-year', + CLS_YEAR_NAV = 'x-monthpicker-yearnav', + CLS_SELECTED = 'x-monthpicker-selected', + CLS_ITEM = 'x-monthpicker-item', + months = ['\u4e00\u6708','\u4e8c\u6708','\u4e09\u6708','\u56db\u6708','\u4e94\u6708','\u516d\u6708','\u4e03\u6708','\u516b\u6708','\u4e5d\u6708','\u5341\u6708','\u5341\u4e00\u6708','\u5341\u4e8c\u6708']; + + function getMonths(){ + return $.map(months,function(month,index){ + return {text:month,value:index}; + }); + } + + var MonthPanel = List.extend({ + + + bindUI : function(){ + var _self = this; + _self.get('el').delegate('a','click',function(ev){ + ev.preventDefault(); + }).delegate('.' + CLS_MONTH,'dblclick',function(){ + _self.fire('dblclick'); + }); + } + },{ + ATTRS:{ + itemTpl:{ + view:true, + value : '
            • {text}
            • ' + }, + + itemCls : { + value : CLS_ITEM + }, + items:{ + view:true, + value:getMonths() + }, + elCls : { + view:true, + value:'x-monthpicker-months' + } + } + },{ + xclass:'calendar-month-panel' + }); + + + var YearPanel = List.extend({ + + bindUI : function(){ + var _self = this, + el = _self.get('el'); + el.delegate('a','click',function(ev){ + ev.preventDefault(); + }); + + el.delegate('.' + CLS_YEAR,'dblclick',function(){ + _self.fire('dblclick'); + }); + + el.delegate('.x-icon','click',function(ev){ + var sender = $(ev.currentTarget); + + if(sender.hasClass(CLS_YEAR_NAV + '-prev')){ + _self._prevPage(); + }else if(sender.hasClass(CLS_YEAR_NAV + '-next')){ + _self._nextPage(); + } + }); + _self.on('itemselected',function(ev){ + if(ev.item){ + _self.setInternal('year',ev.item.value); + } + + }); + }, + _prevPage : function(){ + var _self = this, + start = _self.get('start'), + yearCount = _self.get('yearCount'); + _self.set('start',start - yearCount); + }, + _nextPage : function(){ + var _self = this, + start = _self.get('start'), + yearCount = _self.get('yearCount'); + _self.set('start',start + yearCount); + }, + _uiSetStart : function(){ + var _self = this; + _self._setYearsContent(); + }, + _uiSetYear : function(v){ + var _self = this, + item = _self.findItemByField('value',v); + if(item){ + _self.setSelectedByField(v); + }else{ + _self.set('start',v); + } + }, + _setYearsContent : function(){ + var _self = this, + year = _self.get('year'), + start = _self.get('start'), + yearCount = _self.get('yearCount'), + items = []; + + for(var i = start;i< start + yearCount;i++){ + var text = i.toString(); + + items.push({text:text,value:i}); + } + _self.set('items',items); + _self.setSelectedByField(year); + } + + },{ + ATTRS:{ + items:{ + view:true, + value:[] + }, + elCls : { + view:true, + value:'x-monthpicker-years' + }, + itemCls : { + value : CLS_ITEM + }, + year:{ + + }, + /** + * \u8d77\u59cb\u5e74 + * @private + * @ignore + * @type {Number} + */ + start:{ + value: new Date().getFullYear() + }, + /** + * \u5e74\u6570 + * @private + * @ignore + * @type {Number} + */ + yearCount:{ + value:10 + }, + itemTpl : { + view:true, + value : '
            • {text}
            • ' + }, + tpl : { + view:true, + value:'
              '+ + ''+ + ''+ + '
              '+ + '
                ' + } + } + },{ + xclass:'calendar-year-panel' + }); + + /** + * \u6708\u4efd\u9009\u62e9\u5668 + * xclass : 'calendar-monthpicker' + * @class BUI.Calendar.MonthPicker + * @extends BUI.Overlay.Overlay + */ + var monthPicker = Overlay.extend({ + + initializer : function(){ + var _self = this, + children = _self.get('children'), + monthPanel = new MonthPanel(), + yearPanel = new YearPanel(), + footer = _self._createFooter(); + + children.push(monthPanel); + children.push(yearPanel); + children.push(footer); + + _self.set('yearPanel',yearPanel); + _self.set('monthPanel',monthPanel); + }, + bindUI : function(){ + var _self = this; + + _self.get('monthPanel').on('itemselected',function(ev){ + if(ev.item){ + _self.setInternal('month',ev.item.value); + } + }).on('dblclick',function(){ + _self._successCall(); + }); + + _self.get('yearPanel').on('itemselected',function(ev){ + if(ev.item){ + _self.setInternal('year',ev.item.value); + } + }).on('dblclick',function(){ + _self._successCall(); + }); + + }, + _successCall : function(){ + var _self = this, + callback = _self.get('success'); + + if(callback){ + callback.call(_self); + } + }, + _createFooter : function(){ + var _self = this; + return new Toolbar.Bar({ + elCls : PREFIX + 'clear x-monthpicker-footer', + children:[ + { + xclass:'bar-item-button', + text:'\u786e\u5b9a', + btnCls: 'button button-small button-primary', + handler:function(){ + _self._successCall(); + } + },{ + xclass:'bar-item-button', + text:'\u53d6\u6d88', + btnCls:'button button-small last', + handler:function(){ + var callback = _self.get('cancel'); + if(callback){ + callback.call(_self); + } + } + } + ] + }); + }, + _uiSetYear : function(v){ + this.get('yearPanel').set('year',v); + }, + _uiSetMonth:function(v){ + this.get('monthPanel').setSelectedByField(v); + } + },{ + ATTRS: + /** + * @lends BUI.Calendar.MonthPicker# + * @ignore + */ + { + /** + * \u4e0b\u90e8\u5de5\u5177\u680f + * @private + * @type {Object} + */ + footer : { + + }, + align : { + value : {} + }, + /** + * \u9009\u4e2d\u7684\u5e74 + * @type {Number} + */ + year : { + + }, + /** + * \u6210\u529f\u7684\u56de\u8c03\u51fd\u6570 + * @type {Function} + */ + success:{ + value : function(){ + + } + }, + /** + * \u53d6\u6d88\u7684\u56de\u8c03\u51fd\u6570 + * @type {Function} + */ + cancel :{ + + value : function(){} + + }, + width:{ + value:180 + }, + /** + * \u9009\u4e2d\u7684\u6708 + * @type {Number} + */ + month:{ + + }, + /** + * \u9009\u62e9\u5e74\u7684\u63a7\u4ef6 + * @private + * @type {Object} + */ + yearPanel : { + + }, + /** + * \u9009\u62e9\u6708\u7684\u63a7\u4ef6 + * @private + * @type {Object} + */ + monthPanel:{ + + } + + } + },{ + xclass :'monthpicker' + }); + return monthPicker; + +});/** + * @fileOverview \u65e5\u671f\u63a7\u4ef6\u6765\u9009\u62e9\u5e74\u6708\u7684\u90e8\u5206 + * @ignore + */ + +define('bui/calendar/header',['bui/common'],function (require) { + + var BUI = require('bui/common'), + PREFIX = BUI.prefix, + Component = BUI.Component, + CLS_TEXT_YEAR = 'year-text', + CLS_TEXT_MONTH = 'month-text', + CLS_ARROW = 'x-datepicker-arrow', + CLS_PREV = 'x-datepicker-prev', + CLS_NEXT = 'x-datepicker-next'; + + /** + * \u65e5\u5386\u63a7\u4ef6\u663e\u793a\u9009\u62e9\u5e74\u6708 + * xclass:'calendar-header' + * @class BUI.Calendar.Header + * @private + * @extends BUI.Component.Controller + */ + var header = Component.Controller.extend({ + + bindUI : function(){ + var _self = this, + el = _self.get('el'); + + el.delegate('.' + CLS_ARROW,'click',function(e){ + e.preventDefault(); + var sender = $(e.currentTarget); + if(sender.hasClass(CLS_NEXT)){ + _self.nextMonth(); + }else if(sender.hasClass(CLS_PREV)){ + _self.prevMonth(); + } + }); + + el.delegate('.x-datepicker-month','click',function(){ + _self.fire('headerclick'); + }); + + }, + /** + * \u8bbe\u7f6e\u5e74\u6708 + * @ignore + * @param {Number} year \u5e74 + * @param {Number} month \u6708 + */ + setMonth : function(year,month){ + var _self = this, + curYear = _self.get('year'), + curMonth = _self.get('month'); + if(year !== curYear || month !== curMonth){ + _self.set('year',year); + _self.set('month',month); + _self.fire('monthchange',{year:year,month:month}); + } + }, + /** + * \u4e0b\u4e00\u6708 + * @ignore + */ + nextMonth : function(){ + var _self = this, + date = new Date(_self.get('year'),_self.get('month') + 1); + + _self.setMonth(date.getFullYear(),date.getMonth()); + }, + /** + * \u4e0a\u4e00\u6708 + * @ignore + */ + prevMonth : function(){ + var _self = this, + date = new Date(_self.get('year'),_self.get('month') - 1); + + _self.setMonth(date.getFullYear(),date.getMonth()); + }, + _uiSetYear : function(v){ + var _self = this; + _self.get('el').find('.' + CLS_TEXT_YEAR).text(v); + }, + _uiSetMonth : function(v){ + var _self = this; + _self.get('el').find('.' + CLS_TEXT_MONTH).text(v+1); + } + + },{ + ATTRS : { + /** + * \u5e74 + * @type {Number} + */ + year:{ + sync:false + }, + /** + * \u6708 + * @type {Number} + */ + month:{ + sync:false, + setter:function(v){ + this.set('monthText',v+1); + } + }, + /** + * @private + * @type {Object} + */ + monthText : { + + }, + tpl:{ + view:true, + value:'
                '+ + '
                '+ + '
                '+ + '{year}\u5e74 {monthText}\u6708'+ + ''+ + '
                '+ + '
                ' + + '
                ' + }, + elCls:{ + view:true, + value:'x-datepicker-header' + }, + events:{ + value:{ + /** + * \u6708\u53d1\u751f\u6539\u53d8\uff0c\u5e74\u53d1\u751f\u6539\u53d8\u4e5f\u610f\u5473\u7740\u6708\u53d1\u751f\u6539\u53d8 + * @event + * @param {Object} e \u4e8b\u4ef6\u5bf9\u8c61 + * @param {Number} e.year \u5e74 + * @param {Number} e.month \u6708 + */ + 'monthchange' : true + } + } + } + },{ + xclass:'calendar-header' + }); + + return header; + +});/** + * @fileOverview \u65e5\u5386\u63a7\u4ef6\u663e\u793a\u4e00\u6708\u7684\u65e5\u671f + * @author dxq613@gmail.com + * @ignore + */ +define('bui/calendar/panel',['bui/common'],function (require) { + + var BUI = require('bui/common'), + Component = BUI.Component, + DateUtil = BUI.Date, + CLS_DATE = 'x-datepicker-date', + CLS_TODAY = 'x-datepicker-today', + CLS_DISABLED = 'x-datepicker-disabled', + CLS_ACTIVE = 'x-datepicker-active', + DATA_DATE = 'data-date',//\u5b58\u50a8\u65e5\u671f\u5bf9\u8c61 + DATE_MASK = 'isoDate', + CLS_SELECTED = 'x-datepicker-selected', + SHOW_WEEKS = 6,//\u5f53\u524d\u5bb9\u5668\u663e\u793a6\u5468 + dateTypes = { + deactive : 'prevday', + active : 'active', + disabled : 'disabled' + }, + weekDays = ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday']; + + /** + * \u65e5\u5386\u9762\u677f\u7684\u89c6\u56fe\u7c7b + * @class BUI.Calendar.PanelView + * @extends BUI.Component.View + * @private + */ + var panelView = Component.View.extend({ + + renderUI : function(){ + this.updatePanel(); + }, + + //\u66f4\u65b0\u5bb9\u5668\uff0c\u5f53\u6708\u3001\u5e74\u53d1\u751f\u6539\u53d8\u65f6 + updatePanel : function(){ + var _self = this, + el = _self.get('el'), + bodyEl = el.find('tbody'), + innerTem = _self._getPanelInnerTpl(); + + bodyEl.empty(); + $(innerTem).appendTo(bodyEl); + }, + //\u83b7\u53d6\u5bb9\u5668\u5185\u5bb9 + _getPanelInnerTpl : function(){ + var _self = this, + startDate = _self._getFirstDate(), + temps = []; + + for (var i = 0; i < SHOW_WEEKS; i++) { + var weekStart = DateUtil.addWeek(i,startDate); + temps.push(_self._getWeekTpl(weekStart)); + }; + + return temps.join(''); + }, + //\u83b7\u53d6\u5468\u6a21\u7248 + _getWeekTpl : function(startDate){ + var _self = this, + weekTpl = _self.get('weekTpl'), + daysTemps = []; + for (var i = 0; i < weekDays.length; i++) { + var date = DateUtil.addDay(i,startDate); + daysTemps.push(_self._getDayTpl(date)); + } + + return BUI.substitute(weekTpl,{ + daysTpl:daysTemps.join('') + }); + }, + //\u83b7\u53d6\u65e5\u6a21\u7248 + _getDayTpl : function(date){ + var _self = this, + dayTpl = _self.get('dayTpl'), + day = date.getDay(), + todayCls = _self._isToday(date) ? CLS_TODAY:'', + dayOfWeek = weekDays[day], + dateNumber = date.getDate(), + //\u4e0d\u662f\u672c\u6708\u5219\u5904\u4e8e\u4e0d\u6d3b\u52a8\u72b6\u6001 + //\u4e0d\u5728\u6307\u5b9a\u7684\u6700\u5927\u6700\u5c0f\u8303\u56f4\u5185\uff0c\u7981\u6b62\u9009\u4e2d + dateType = _self._isInRange(date) ? (_self._isCurrentMonth(date) ? dateTypes.active : dateTypes.deactive) : dateTypes.disabled; + + return BUI.substitute(dayTpl,{ + dayOfWeek : dayOfWeek, + dateType : dateType, + dateNumber : dateNumber, + todayCls : todayCls, + date : DateUtil.format(date,DATE_MASK) + }); + }, + //\u83b7\u53d6\u5f53\u524d\u5bb9\u5668\u7684\u7b2c\u4e00\u5929 + _getFirstDate : function(year,month){ + var _self = this, + monthFirstDate = _self._getMonthFirstDate(year,month), + day = monthFirstDate.getDay(); + return DateUtil.addDay(day * -1,monthFirstDate); + }, + //\u83b7\u53d6\u5f53\u6708\u7684\u7b2c\u4e00\u5929 + _getMonthFirstDate : function(year,month){ + var _self = this, + year = year || _self.get('year'), + month = month || _self.get('month'); + return new Date(year,month); + }, + //\u662f\u5426\u662f\u5f53\u524d\u663e\u793a\u7684\u6708 + _isCurrentMonth : function(date){ + return date.getMonth() === this.get('month'); + }, + //\u662f\u5426\u662f\u4eca\u5929 + _isToday : function(date){ + var tody = new Date(); + return tody.getFullYear() === date.getFullYear() && tody.getMonth() === date.getMonth() && tody.getDate() === date.getDate(); + }, + //\u662f\u5426\u5728\u5141\u8bb8\u7684\u8303\u56f4\u5185 + _isInRange : function(date){ + var _self = this, + maxDate = _self.get('maxDate'), + minDate = _self.get('minDate'); + + if(minDate && date < minDate){ + return false; + } + if(maxDate && date > maxDate){ + return false; + } + return true; + }, + //\u6e05\u9664\u9009\u4e2d\u7684\u65e5\u671f + _clearSelectedDate : function(){ + var _self = this; + _self.get('el').find('.'+CLS_SELECTED).removeClass(CLS_SELECTED); + }, + //\u67e5\u627e\u65e5\u671f\u5bf9\u5e94\u7684DOM\u8282\u70b9 + _findDateElement : function(date){ + var _self = this, + dateStr = DateUtil.format(date,DATE_MASK), + activeList = _self.get('el').find('.' + CLS_DATE), + result = null; + if(dateStr){ + activeList.each(function(index,item){ + if($(item).attr('title') === dateStr){ + result = $(item); + return false; + } + }); + } + return result; + }, + //\u8bbe\u7f6e\u9009\u4e2d\u7684\u65e5\u671f + _setSelectedDate : function(date){ + var _self = this, + dateEl = _self._findDateElement(date); + + _self._clearSelectedDate(); + if(dateEl){ + dateEl.addClass(CLS_SELECTED); + } + } + },{ + ATTRS : { + + } + }); + + /** + * \u65e5\u5386\u63a7\u4ef6\u663e\u793a\u65e5\u671f\u7684\u5bb9\u5668 + * xclass:'calendar-panel' + * @class BUI.Calendar.Panel + * @private + * @extends BUI.Component.Controller + */ + var panel = Component.Controller.extend( + /** + * @lends BUI.Calendar.Panel.prototype + * @ignore + */ + { + + /** + * \u8bbe\u7f6e\u9ed8\u8ba4\u5e74\u6708 + * @protected + */ + initializer : function(){ + var _self = this, + now = new Date(); + if(!_self.get('year')){ + _self.set('year',now.getFullYear()); + } + + if(!_self.get('month')){ + _self.set('month',now.getMonth()); + } + }, + /** + * @protected + * @ignore + */ + bindUI : function(){ + var _self = this, + el = _self.get('el'); + el.delegate('.' + CLS_DATE,'click',function(e){ + e.preventDefault(); + }); + //\u963b\u6b62\u7981\u7528\u7684\u65e5\u671f\u88ab\u9009\u62e9 + el.delegate('.' + CLS_DISABLED,'mouseup',function(e){ + e.stopPropagation(); + }); + }, + /** + * @protected + * @ignore + */ + performActionInternal : function(ev){ + var _self = this, + sender = $(ev.target).closest('.' + CLS_DATE); + if(sender){ + var date = sender.attr('title'); + if(date){ + date = DateUtil.parse(date); + if(_self.get('view')._isInRange(date)){ + _self.set('selected',date); + } + //_self.fire('click',{date:date}); + } + } + }, + /** + * \u8bbe\u7f6e\u5e74\u6708 + * @param {Number} year \u5e74 + * @param {Number} month \u6708 + */ + setMonth : function(year,month){ + var _self = this, + curYear = _self.get('year'), + curMonth = _self.get('month'); + if(year !== curYear || month !== curMonth){ + _self.set('year',year); + _self.set('month',month); + //if(_self.get('rendered')){ + _self.get('view').updatePanel(); + //} + } + }, + //\u9009\u4e2d\u65e5\u671f + _uiSetSelected : function(date,ev){ + var _self = this; + + if(!(ev && ev.prevVal && DateUtil.isDateEquals(date,ev.prevVal))){ + _self.setMonth(date.getFullYear(),date.getMonth()); + _self.get('view')._setSelectedDate(date); + _self.fire('selectedchange',{date:date}); + } + }, + //\u8bbe\u7f6e\u6700\u65e5\u671f + _uiSetMaxDate : function(v){ + if(v){ + this.get('view').updatePanel(); + } + }, + //\u8bbe\u7f6e\u6700\u5c0f\u65e5\u671f + _uiSetMinDate : function(v){ + if(v){ + this.get('view').updatePanel(); + } + } + },{ + ATTRS: + /** + * @lends BUI.Calendar.Panel# + * @ignore + */ + { + /** + * \u5c55\u793a\u7684\u6708\u6240\u5c5e\u5e74 + * @type {Number} + */ + year : { + view :true + }, + /** + * \u5c55\u793a\u7684\u6708 + * @type {Number} + */ + month:{ + view :true + }, + /** + * \u9009\u4e2d\u7684\u65e5\u671f + * @type {Date} + */ + selected : { + + }, + focusable:{ + value:true + }, + /** + * \u65e5\u671f\u7684\u6a21\u677f + * @private + * @type {Object} + */ + dayTpl:{ + view : true, + value:''+ + ''+ + '{dateNumber}'+ + ''+ + '' + }, + events:{ + value : { + /** + * @event + * @name BUI.Calendar.Panel#click + * @param {Object} e \u70b9\u51fb\u4e8b\u4ef6 + * @param {Date} e.date + */ + 'click' : false, + /** + * @name BUI.Calendar.Panel#selectedchange + * @param {Object} e \u70b9\u51fb\u4e8b\u4ef6 + * @param {Date} e.date + */ + 'selectedchange' : false + } + }, + /** + * \u6700\u5c0f\u65e5\u671f + * @type {Date | String} + */ + maxDate : { + view : true, + setter : function(val){ + if(val){ + if(BUI.isString(val)){ + return DateUtil.parse(val); + } + return val; + } + } + }, + /** + * \u6700\u5c0f\u65e5\u671f + * @type {Date | String} + */ + minDate : { + view : true, + setter : function(val){ + if(val){ + if(BUI.isString(val)){ + return DateUtil.parse(val); + } + return val; + } + } + }, + /** + * \u5468\u7684\u6a21\u677f + * @private + * @type {Object} + */ + weekTpl:{ + view : true, + value : '{daysTpl}' + }, + tpl:{ + view:true, + value:'' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '
                \u65e5\u4e00\u4e8c\u4e09\u56db\u4e94\u516d
                ' + }, + xview : {value : panelView} + } + },{ + xclass:'calendar-panel', + priority:0 + }); + + return panel; +});/** + * @fileOverview \u65e5\u671f\u63a7\u4ef6 + * @author dxq613@gmail.com + * @ignore + */ + +define('bui/calendar/calendar',['bui/picker','bui/calendar/monthpicker','bui/calendar/header','bui/calendar/panel','bui/toolbar'],function(require){ + + var BUI = require('bui/common'), + PREFIX = BUI.prefix, + CLS_PICKER_TIME = 'x-datepicker-time', + CLS_PICKER_HOUR = 'x-datepicker-hour', + CLS_PICKER_MINUTE = 'x-datepicker-minute', + CLS_PICKER_SECOND = 'x-datepicker-second', + CLS_TIME_PICKER = 'x-timepicker', + Picker = require('bui/picker').ListPicker, + MonthPicker = require('bui/calendar/monthpicker'), + Header = require('bui/calendar/header'), + Panel = require('bui/calendar/panel'), + Toolbar = require('bui/toolbar'), + Component = BUI.Component, + DateUtil = BUI.Date; + + function today(){ + var now = new Date(); + return new Date(now.getFullYear(),now.getMonth(),now.getDate()); + } + + function fixedNumber(n){ + if( n< 10 ){ + return '0'+n; + } + return n.toString(); + } + function getNumberItems(end){ + var items = []; + for (var i = 0; i < end; i++) { + items.push({text:fixedNumber(i),value:fixedNumber(i)}); + } + return items; + } + + function getTimeUnit (self,cls){ + var inputEl = self.get('el').find('.' + cls); + return parseInt(inputEl.val()); + + } + + function setTimeUnit (self,cls,val){ + var inputEl = self.get('el').find('.' + cls); + if(BUI.isNumber(val)){ + val = fixedNumber(val); + } + inputEl.val(val); + } + + + + /** + * \u65e5\u671f\u63a7\u4ef6 + *

                + * + *

                + * xclass:'calendar' + *
                
                +   *  BUI.use('bui/calendar',function(Calendar){
                +   *    var calendar = new Calendar.Calendar({
                +   *      render:'#calendar'
                +   *    });
                +   *    calendar.render();
                +   *    calendar.on('selectedchange',function (ev) {
                +   *      alert(ev.date);
                +   *    });
                +   * });
                +   * 
                + * @class BUI.Calendar.Calendar + * @extends BUI.Component.Controller + */ + var calendar = Component.Controller.extend({ + + //\u8bbe\u7f6e\u5185\u5bb9 + initializer: function(){ + var _self = this, + children = _self.get('children'), + header = new Header(), + panel = new Panel(), + footer = _self.get('footer') || _self._createFooter(), + monthPicker = _self.get('monthPicker') || _self._createMonthPicker(); + + + //\u6dfb\u52a0\u5934 + children.push(header); + //\u6dfb\u52a0panel + children.push(panel); + children.push(footer); + children.push(monthPicker); + + _self.set('header',header); + _self.set('panel',panel); + _self.set('footer',footer); + _self.set('monthPicker',monthPicker); + + }, + renderUI : function(){ + var _self = this, + children = _self.get('children'); + if(_self.get('showTime')){ + var timepicker = _self.get('timepicker') || _self._initTimePicker(); + children.push(timepicker); + _self.set('timepicker',timepicker); + } + }, + //\u7ed1\u5b9a\u4e8b\u4ef6 + bindUI : function(){ + var _self = this, + header = _self.get('header'), + panel = _self.get('panel'); + + panel.on('selectedchange',function(e){ + var date = e.date; + if(!DateUtil.isDateEquals(date,_self.get('selectedDate'))){ + _self.set('selectedDate',date); + } + }); + if(!_self.get('showTime')){ + panel.on('click',function(){ + _self.fire('accept'); + }); + }else{ + _self._initTimePickerEvent(); + } + + header.on('monthchange',function(e){ + _self._setYearMonth(e.year,e.month); + }); + + header.on('headerclick',function(){ + var monthPicker = _self.get('monthPicker'); + monthPicker.set('year',header.get('year')); + monthPicker.set('month',header.get('month')); + monthPicker.show(); + }); + }, + _initTimePicker : function(){ + var _self = this, + picker = new Picker({ + elCls : CLS_TIME_PICKER, + children:[{ + itemTpl : '
              • {text}
              • ' + }], + autoAlign : false, + align : { + node : _self.get('el'), + points:['bl','bl'], + offset:[0,-30] + }, + trigger : _self.get('el').find('.' + CLS_PICKER_TIME) + }); + picker.render(); + _self._initTimePickerEvent(picker); + return picker; + }, + _initTimePickerEvent : function(picker){ + var _self = this, + picker= _self.get('timepicker'); + + if(!picker){ + return; + } + + picker.get('el').delegate('a','click',function(ev){ + ev.preventDefault(); + }); + picker.on('triggerchange',function(ev){ + var curTrigger = ev.curTrigger; + if(curTrigger.hasClass(CLS_PICKER_HOUR)){ + picker.get('list').set('items',getNumberItems(24)); + }else{ + picker.get('list').set('items',getNumberItems(60)); + } + }); + + picker.on('selectedchange',function(ev){ + var curTrigger = ev.curTrigger, + val = ev.value; + if(curTrigger.hasClass(CLS_PICKER_HOUR)){ + _self.setInternal('hour',val); + }else if(curTrigger.hasClass(CLS_PICKER_MINUTE)){ + _self.setInternal('minute',val); + }else{ + _self.setInternal('second',val); + } + }); + }, + //\u66f4\u6539\u5e74\u548c\u6708 + _setYearMonth : function(year,month){ + var _self = this, + selectedDate = _self.get('selectedDate'), + date = selectedDate.getDate(); + if(year !== selectedDate.getFullYear() || month !== selectedDate.getMonth()){ + _self.set('selectedDate',new Date(year,month,date)); + } + }, + //\u521b\u5efa\u9009\u62e9\u6708\u7684\u63a7\u4ef6 + _createMonthPicker: function(){ + var _self = this; + + return new MonthPicker({ + effect : { + effect:'slide', + duration:300 + }, + visibleMode:'display', + success : function(){ + var picker = this; + _self._setYearMonth(picker.get('year'),picker.get('month')); + picker.hide(); + }, + cancel : function(){ + this.hide(); + } + }); + }, + //\u521b\u5efa\u5e95\u90e8\u6309\u94ae\u680f + _createFooter : function(){ + var _self = this, + showTime = this.get('showTime'), + items = []; + + if(showTime){ + items.push({ + content : _self.get('timeTpl') + }); + items.push({ + xclass:'bar-item-button', + text:'\u786e\u5b9a', + btnCls: 'button button-small button-primary', + listeners:{ + click:function(){ + _self.fire('accept'); + } + } + }); + }else{ + items.push({ + xclass:'bar-item-button', + text:'\u4eca\u5929', + btnCls: 'button button-small', + listeners:{ + click:function(){ + var day = today(); + _self.set('selectedDate',day); + _self.fire('accept'); + } + } + }); + } + + return new Toolbar.Bar({ + elCls : PREFIX + 'calendar-footer', + children:items + }); + }, + //\u8bbe\u7f6e\u6240\u9009\u65e5\u671f + _uiSetSelectedDate : function(v){ + var _self = this, + year = v.getFullYear(), + month = v.getMonth(); + + _self.get('header').setMonth(year,month); + _self.get('panel').set('selected',v); + _self.fire('datechange',{date:v}); + }, + _uiSetHour : function(v){ + setTimeUnit(this,CLS_PICKER_HOUR,v); + }, + _uiSetMinute : function(v){ + setTimeUnit(this,CLS_PICKER_MINUTE,v); + }, + _uiSetSecond : function(v){ + setTimeUnit(this,CLS_PICKER_SECOND,v); + }, + //\u8bbe\u7f6e\u6700\u5927\u503c + _uiSetMaxDate : function(v){ + var _self = this; + _self.get('panel').set('maxDate',v); + }, + //\u8bbe\u7f6e\u6700\u5c0f\u503c + _uiSetMinDate : function(v){ + var _self = this; + _self.get('panel').set('minDate',v); + } + + },{ + ATTRS : + /** + * @lends BUI.Calendar.Calendar# + * @ignore + */ + { + /** + * \u65e5\u5386\u63a7\u4ef6\u5934\u90e8\uff0c\u9009\u62e9\u5e74\u6708 + * @private + * @type {Object} + */ + header:{ + + }, + + /** + * \u65e5\u5386\u63a7\u4ef6\u9009\u62e9\u65e5 + * @private + * @type {Object} + */ + panel:{ + + }, + /** + * \u6700\u5927\u65e5\u671f + *
                
                +       *   calendar.set('maxDate','2013-07-29');
                +       * 
                + * @type {Date} + */ + maxDate : { + + }, + /** + * \u6700\u5c0f\u65e5\u671f + *
                
                +       *   calendar.set('minDate','2013-07-29');
                +       * 
                + * @type {Date} + */ + minDate : { + + }, + /** + * \u9009\u62e9\u6708\u4efd\u63a7\u4ef6 + * @private + * @type {Object} + */ + monthPicker : { + + }, + /** + * \u9009\u62e9\u65f6\u95f4\u63a7\u4ef6 + * @private + * @type {Object} + */ + timepicker:{ + + }, + width:{ + value:180 + }, + events:{ + value:{ + /** + * @event + * @name BUI.Calendar.Calendar#click + * @param {Object} e \u70b9\u51fb\u4e8b\u4ef6 + * @param {Date} e.date + */ + 'click' : false, + /** + * \u786e\u8ba4\u65e5\u671f\u66f4\u6539\uff0c\u5982\u679c\u4e0d\u663e\u793a\u65e5\u671f\u5219\u5f53\u70b9\u51fb\u65e5\u671f\u6216\u8005\u70b9\u51fb\u4eca\u5929\u6309\u94ae\u65f6\u89e6\u53d1\uff0c\u5982\u679c\u663e\u793a\u65e5\u671f\uff0c\u5219\u5f53\u70b9\u51fb\u786e\u8ba4\u6309\u94ae\u65f6\u89e6\u53d1\u3002 + * @event + */ + 'accept' : false, + /** + * @event + * @name BUI.Calendar.Calendar#datechange + * @param {Object} e \u9009\u4e2d\u7684\u65e5\u671f\u53d1\u751f\u6539\u53d8 + * @param {Date} e.date + */ + 'datechange' : false, + /** + * @event + * @name BUI.Calendar.Calendar#monthchange + * @param {Object} e \u6708\u4efd\u53d1\u751f\u6539\u53d8 + * @param {Number} e.year + * @param {Number} e.month + */ + 'monthchange' : false + } + }, + /** + * \u662f\u5426\u9009\u62e9\u65f6\u95f4,\u6b64\u9009\u9879\u51b3\u5b9a\u662f\u5426\u53ef\u4ee5\u9009\u62e9\u65f6\u95f4 + * + * @cfg {Boolean} showTime + */ + showTime : { + value : false + }, + timeTpl : { + value : '::' + }, + /** + * \u9009\u62e9\u7684\u65e5\u671f,\u9ed8\u8ba4\u4e3a\u5f53\u5929 + *
                
                +       *  var calendar = new Calendar.Calendar({
                +       *  render:'#calendar',
                +       *   selectedDate : new Date('2013/07/01') //\u4e0d\u80fd\u4f7f\u7528\u5b57\u7b26\u4e32
                +       * });
                +       * 
                + * @cfg {Date} selectedDate + */ + /** + * \u9009\u62e9\u7684\u65e5\u671f + *
                
                +       *   calendar.set('selectedDate',new Date('2013-9-01'));
                +       * 
                + * @type {Date} + * @default today + */ + selectedDate : { + value : today() + }, + /** + * \u5c0f\u65f6,\u9ed8\u8ba4\u4e3a\u5f53\u524d\u5c0f\u65f6 + * @type {Number} + */ + hour : { + value : new Date().getHours() + + }, + /** + * \u5206,\u9ed8\u8ba4\u4e3a\u5f53\u524d\u5206 + * @type {Number} + */ + minute:{ + value : new Date().getMinutes() + }, + /** + * \u79d2,\u9ed8\u8ba4\u4e3a\u5f53\u524d\u79d2 + * @type {Number} + */ + second : { + value : 0 + } + } + },{ + xclass : 'calendar', + priority : 0 + }); + + return calendar; +});/** + * @fileOverview \u65e5\u671f\u9009\u62e9\u5668 + * @author dxq613@gmail.com + * @ignore + */ +define('bui/calendar/datepicker',['bui/common','bui/picker','bui/calendar/calendar'],function(require){ + + var BUI = require('bui/common'), + Picker = require('bui/picker').Picker, + Calendar = require('bui/calendar/calendar'), + DateUtil = BUI.Date; + + /** + * \u65e5\u671f\u9009\u62e9\u5668\uff0c\u53ef\u4ee5\u7531\u8f93\u5165\u6846\u7b49\u89e6\u53d1 + *

                + * + *

                + * xclass : 'calendar-datepicker' + *
                
                +   *   BUI.use('bui/calendar',function(Calendar){
                +   *      var datepicker = new Calendar.DatePicker({
                +   *        trigger:'.calendar',
                +   *        //delegateTigger : true, //\u5982\u679c\u8bbe\u7f6e\u6b64\u53c2\u6570\uff0c\u90a3\u4e48\u65b0\u589e\u52a0\u7684.calendar\u5143\u7d20\u4e5f\u4f1a\u652f\u6301\u65e5\u5386\u9009\u62e9
                +   *        autoRender : true
                +   *      });
                +   *    });
                +   * 
                + * @class BUI.Calendar.DatePicker + * @extends BUI.Picker.Picker + */ + var datepicker = Picker.extend({ + + initializer:function(){ + var _self = this, + children = _self.get('children'), + calendar = new Calendar({ + showTime : _self.get('showTime') + }); + + children.push(calendar); + _self.set('calendar',calendar); + }, + /** + * \u8bbe\u7f6e\u9009\u4e2d\u7684\u503c + *
                
                +     *   datePicker.setSelectedValue('2012-01-1');
                +     * 
                + * @param {String} val \u8bbe\u7f6e\u503c + * @protected + */ + setSelectedValue : function(val){ + var _self = this, + calendar = this.get('calendar'), + date = DateUtil.parse(val); + date = date || new Date(new Date().setSeconds(0)); + calendar.set('selectedDate',DateUtil.getDate(date)); + if(_self.get('showTime')){ + calendar.set('hour',date.getHours()); + calendar.set('minute',date.getMinutes()); + calendar.set('second',date.getSeconds()); + } + }, + /** + * \u83b7\u53d6\u9009\u4e2d\u7684\u503c + * @protected + * @return {String} \u9009\u4e2d\u7684\u503c + */ + getSelectedValue : function(){ + var _self = this, + calendar = _self.get('calendar'), + date = DateUtil.getDate(calendar.get('selectedDate')); + if(_self.get('showTime')){ + date = DateUtil.addHour(calendar.get('hour'),date); + date = DateUtil.addMinute(calendar.get('minute'),date); + date = DateUtil.addSecond(calendar.get('second'),date); + } + return date; + }, + /** + * \u83b7\u53d6\u9009\u4e2d\u9879\u7684\u6587\u672c\uff0c\u591a\u9009\u72b6\u6001\u4e0b\uff0c\u6587\u672c\u4ee5','\u5206\u5272 + * @protected + * @return {String} \u9009\u4e2d\u7684\u6587\u672c + */ + getSelectedText : function(){ + return DateUtil.format(this.getSelectedValue(),this._getFormatType()); + }, + _getFormatType : function(){ + if(this.get('showTime')){ + return 'yyyy-mm-dd HH:MM:ss'; + } + return 'yyyy-mm-dd'; + }, + //\u8bbe\u7f6e\u6700\u5927\u503c + _uiSetMaxDate : function(v){ + var _self = this; + _self.get('calendar').set('maxDate',v); + }, + //\u8bbe\u7f6e\u6700\u5c0f\u503c + _uiSetMinDate : function(v){ + var _self = this; + _self.get('calendar').set('minDate',v); + } + + },{ + ATTRS : + /** + * @lends BUI.Calendar.DatePicker# + * @ignore + */ + { + /** + * \u662f\u5426\u663e\u793a\u65e5\u671f + *
                
                +       *  var datepicker = new Calendar.DatePicker({
                +       *    trigger:'.calendar',
                +       *    showTime : true, //\u53ef\u4ee5\u9009\u62e9\u65e5\u671f
                +       *    autoRender : true
                +       *  });
                +       * 
                + * @type {Boolean} + */ + showTime : { + value:false + }, + /** + * \u6700\u5927\u65e5\u671f + *
                
                +       *   var datepicker = new Calendar.DatePicker({
                +       *     trigger:'.calendar',
                +       *     maxDate : '2014-01-01',
                +       *     minDate : '2013-7-25',
                +       *     autoRender : true
                +       *   });
                +       * 
                + * @type {Date} + */ + maxDate : { + + }, + /** + * \u6700\u5c0f\u65e5\u671f + *
                
                +       *   var datepicker = new Calendar.DatePicker({
                +       *     trigger:'.calendar',
                +       *     maxDate : '2014-01-01',
                +       *     minDate : '2013-7-25',
                +       *     autoRender : true
                +       *   });
                +       * 
                + * @type {Date} + */ + minDate : { + + }, + changeEvent:{ + value:'accept' + }, + hideEvent:{ + value:'accept' + }, + /** + * \u65e5\u5386\u5bf9\u8c61,\u53ef\u4ee5\u8fdb\u884c\u66f4\u591a\u7684\u64cd\u4f5c\uff0c\u53c2\u770b{@link BUI.Calendar.Calendar} + * @type {BUI.Calendar.Calendar} + */ + calendar:{ + + } + } + },{ + xclass : 'datepicker', + priority : 0 + }); + return datepicker; + +});/** + * @fileOverview \u7f16\u8f91\u5668\u547d\u540d\u7a7a\u95f4\u5165\u53e3 + * @ignore + */ + +define('bui/editor',['bui/common','bui/form','bui/editor/editor','bui/editor/record','bui/editor/dialog'],function (require) { + var BUI = require('bui/common'), + Form = require('bui/form'), + Editor = BUI.namespace('Editor'); + + BUI.mix(Editor,{ + Editor : require('bui/editor/editor'), + RecordEditor : require('bui/editor/record'), + DialogEditor : require('bui/editor/dialog') + }); + return Editor; +});/** + * @fileOverview \u7f16\u8f91\u5668\u6269\u5c55\u7c7b\uff0c\u5f15\u5165\u8fd9\u4e2a\u6269\u5c55\uff0c\u63a7\u4ef6\u53ef\u4ee5\u652f\u6301\u7f16\u8f91\u5668\u529f\u80fd\u3002 + * @ignore + */ + +define('bui/editor/mixin',function (require) { + + function initEditor (self) { + var _self = self, + controlCfgField = _self.get('controlCfgField'), + control = _self.get(controlCfgField), + c = _self.addChild(control); + _self.setInternal(controlCfgField,c); + } + + /** + * @class BUI.Editor.Mixin + * \u7f16\u8f91\u5668\u6269\u5c55\u7c7b + */ + var Mixin = function () { + initEditor(this); + }; + + Mixin.ATTRS = { + /** + * \u63a5\u53d7\u66f4\u6539\u7684\u4e8b\u4ef6 + * @protected + * @type {String} + */ + acceptEvent : { + value : 'autohide' + }, + /** + * \u5f53\u53d1\u751f\u9519\u8bef\u65f6\u662f\u5426\u963b\u6b62\u7f16\u8f91\u5668\u6d88\u5931 + * @type {Boolean} + */ + preventHide : { + value : true + }, + /** + * \u91cd\u7f6e\u6570\u636e\u65f6\u7684\u4e8b\u4ef6 + * @type {String} + */ + changeSourceEvent : { + value : 'show triggerchange' + }, + /** + * \u662f\u5426\u5ffd\u7565\u6389\u8f93\u5165\u6846\u4e4b\u7c7b\u7684\u952e\u76d8\u4e8b\u4ef6 + * @protected + * @type {Boolean} + */ + ignoreInputFields: { + value :false + }, + /** + * \u5185\u90e8\u63a7\u4ef6\u7684\u4ee3\u8868Value\u7684\u5b57\u6bb5 + * @protected + * @type {String} + */ + innerValueField : { + + }, + /** + * \u7a7a\u503c\u7684\u6570\u636e\uff0c\u6e05\u7a7a\u7f16\u8f91\u5668\u65f6\u4f7f\u7528 + * @protected + * @type {*} + */ + emptyValue : { + + }, + /** + * \u5185\u90e8\u63a7\u4ef6\u914d\u7f6e\u9879\u7684\u5b57\u6bb5 + * @protected + * @type {String} + */ + controlCfgField : { + + }, + autoUpdate : { + value : true + }, + events : { + value : { + /** + * @event + * \u63a5\u53d7\u66f4\u6539 + */ + accept : false, + /** + * @event + * \u53d6\u6d88\u66f4\u6539 + */ + cancel : false + } + } + }; + + Mixin.prototype = { + //\u7ed1\u5b9a\u4e8b\u4ef6 + __bindUI : function(){ + var _self = this, + acceptEvent = _self.get('acceptEvent'), + changeSourceEvent = _self.get('changeSourceEvent'); + + if(acceptEvent){ + _self.on(acceptEvent,function(){ + if(_self.accept()){ + return ; + }else if(_self.get('preventHide')){ + return false; + }else{ + _self.cancel(); + } + }); + } + if(changeSourceEvent){ + _self.on(changeSourceEvent,function(){ + _self.setValue(_self.getSourceValue()); + if(_self.get('visible')){ + _self.focus(); + } + }); + } + }, + /** + * @protected + * \u83b7\u53d6\u7f16\u8f91\u5668\u7684\u5185\u90e8\u63a7\u4ef6 + * @return {BUI.Component.Controller} \u7528\u4e8e\u7f16\u8f91\u6570\u636e\u7684\u5185\u90e8\u6570\u636e + */ + getInnerControl : function(){ + var _self = this, + children = _self.get('children'); + return children[0]; + }, + /** + * \u8bbe\u7f6e\u503c\uff0c\u503c\u7684\u7c7b\u578b\u53d6\u51b3\u4e8e\u7f16\u8f91\u5668\u7f16\u8f91\u7684\u6570\u636e + * @param {String|Object} value \u7f16\u8f91\u5668\u663e\u793a\u7684\u503c + */ + setValue : function(value){ + var _self = this, + innerControl = _self.getInnerControl(); + _self.set('editValue',value); + _self.clearControlValue(); + innerControl.set(_self.get('innerValueField'),value); + if(!value){//\u7f16\u8f91\u7684\u503c\u7b49\u4e8e\u7a7a\uff0c\u5219\u53ef\u80fd\u4e0d\u4f1a\u89e6\u53d1\u9a8c\u8bc1 + _self.valid(); + } + }, + /** + * \u83b7\u53d6\u7f16\u8f91\u5668\u7684\u503c + * @return {String|Object} \u7f16\u8f91\u5668\u7684\u503c + */ + getValue :function(){ + var _self = this, + innerControl = _self.getInnerControl(); + return innerControl.get(_self.get('innerValueField')); + }, + /** + * \u7f16\u8f91\u7684\u5185\u5bb9\u662f\u5426\u901a\u8fc7\u9a8c\u8bc1 + * @return {Boolean} \u662f\u5426\u901a\u8fc7\u9a8c\u8bc1 + */ + isValid : function(){ + var _self = this, + innerControl = _self.getInnerControl(); + return innerControl.isValid ? innerControl.isValid() : true; + }, + /** + * \u9a8c\u8bc1\u5185\u5bb9\u662f\u5426\u901a\u8fc7\u9a8c\u8bc1 + */ + valid : function(){ + var _self = this, + innerControl = _self.getInnerControl(); + innerControl.valid && innerControl.valid(); + }, + /** + * \u83b7\u53d6\u9519\u8bef\u4fe1\u606f + * @return {Array} \u9519\u8bef\u4fe1\u606f + */ + getErrors : function(){ + var _self = this, + innerControl = _self.getInnerControl(); + return innerControl.getErrors ? innerControl.getErrors() : []; + }, + /** + * \u7f16\u8f91\u7684\u5185\u5bb9\u662f\u5426\u53d1\u751f\u6539\u53d8 + * @return {Boolean} + */ + isChange : function(){ + var _self = this, + editValue = _self.get('editValue'), + value = _self.getValue(); + return editValue !== value; + }, + /** + * \u6e05\u9664\u7f16\u8f91\u7684\u503c + */ + clearValue : function(){ + this.clearControlValue(); + this.clearErrors(); + }, + /** + * \u6e05\u9664\u7f16\u8f91\u7684\u63a7\u4ef6\u7684\u503c + * @protected + * @template + */ + clearControlValue : function(){ + var _self = this, + innerControl = _self.getInnerControl(); + innerControl.set(_self.get('innerValueField'),_self.get('emptyValue')); + }, + /** + * \u6e05\u9664\u9519\u8bef + */ + clearErrors : function(){ + var _self = this, + innerControl = _self.getInnerControl(); + innerControl.clearErrors(); + }, + /** + * @protected + * @template + * \u83b7\u53d6\u7f16\u8f91\u7684\u6e90\u6570\u636e + */ + getSourceValue : function(){ + + }, + /** + * @protected + * @template + * \u66f4\u65b0\u7f16\u8f91\u7684\u6e90\u6570\u636e + */ + updateSource : function(){ + + }, + /** + * @protected + * @override + * \u5904\u7406esc\u952e + */ + handleNavEsc : function(){ + this.cancel(); + }, + /** + * @protected + * @override + * \u5904\u7406enter\u952e + */ + handleNavEnter : function(ev){ + var sender = ev.target; + if(sender.tagName === 'TEXTAREA'){ //\u6587\u672c\u8f93\u5165\u6846\uff0c\u4e0d\u786e\u5b9a\u9690\u85cf + return; + } + if(sender.tagName === 'BUTTON'){ + $(sender).trigger('click'); + } + this.accept(); + }, + /** + * \u8bbe\u7f6e\u83b7\u53d6\u7126\u70b9 + */ + focus : function(){ + var _self = this, + innerControl = _self.getInnerControl(); + innerControl.focus && innerControl.focus() + }, + /** + * \u63a5\u53d7\u7f16\u8f91\u5668\u7684\u7f16\u8f91\u7ed3\u679c + * @return {Boolean} \u662f\u5426\u6210\u529f\u63a5\u53d7\u7f16\u8f91 + */ + accept : function(){ + var _self = this, + value; + _self.valid(); + if(!_self.isValid()){ + return false; + } + value = _self.getValue(); + + if(_self.get('autoUpdate')){ + _self.updateSource(value); + } + if(_self.fire('beforeaccept',{value :value}) == false){ + return; + } + _self.fire('accept',{value :value,editValue : _self.get('editValue')});/**/ + _self.hide(); + return true; + }, + /** + * \u53d6\u6d88\u7f16\u8f91 + */ + cancel : function(){ + this.fire('cancel'); + this.clearValue(); + this.close(); + } + }; + + return Mixin; +});/** + * @ignore + * @fileOverview \u7f16\u8f91\u5668 + * @author dxq613@gmail.com + */ + +define('bui/editor/editor',['bui/common','bui/overlay','bui/editor/mixin'],function (require) { + var BUI = require('bui/common'), + Overlay = require('bui/overlay').Overlay + CLS_TIPS = 'x-editor-tips', + Mixin = require('bui/editor/mixin'); + + /** + * @class BUI.Editor.Editor + * @extends BUI.Overlay.Overlay + * @mixins BUI.Editor.Mixin + * \u7f16\u8f91\u5668 + *

                + * + *

                + */ + var editor = Overlay.extend([Mixin],{ + bindUI : function(){ + var _self = this, + innerControl = _self.getInnerControl(); + _self.on('validchange',function(ev){ + if(!_self.isValid() && _self.get('visible')){ + _self._showError(_self.getErrors()); + }else{ + _self._hideError(); + } + }); + _self.on('hide',function(){ + _self._hideError(); + }); + + _self.on('show',function(){ + if(!_self.isValid()){ + _self._showError(_self.getErrors()); + } + }); + }, + _initOverlay : function(){ + var _self = this, + overlay = new Overlay({ + children : [{ + xclass : 'simple-list', + itemTpl : '
              • ! {error}
              • ' + }], + elCls : CLS_TIPS, + autoRender : true + }); + _self.set('overlay',overlay); + return overlay; + }, + //\u83b7\u53d6\u663e\u793a\u9519\u8bef\u5217\u8868 + _getErrorList : function(){ + var _self = this, + overlay = _self.get('overlay'); + return overlay && overlay.get('children')[0]; + }, + _showError : function(errors){ + var _self = this, + overlay = _self.get('overlay') || _self._initOverlay(), + list = _self._getErrorList(), + align = _self.get('errorAlign'), + items = BUI.Array.map(errors,function(text){ + return {error : text}; + }); + list.set('items',items); + align.node = _self.get('el'); + overlay.set('align',align); + overlay.show(); + }, + //\u9690\u85cf\u9519\u8bef + _hideError : function(){ + var _self = this, + overlay = _self.get('overlay'); + overlay && overlay.hide(); + }, + /** + * @protected + * @override + * \u83b7\u53d6\u7f16\u8f91\u7684\u6e90\u6570\u636e + * @return {String} \u8fd4\u56de\u9700\u8981\u7f16\u8f91\u7684\u6587\u672c + */ + getSourceValue : function(){ + var _self = this, + trigger = _self.get('curTrigger'); + return trigger.text(); + }, + /** + * @protected + * \u66f4\u65b0\u6587\u672c + * @param {String} text \u7f16\u8f91\u5668\u7684\u503c + */ + updateSource : function(text){ + var _self = this, + trigger = _self.get('curTrigger'); + if(trigger && trigger.length){ + trigger.text(text); + } + }, + _uiSetWidth : function(v){ + var _self = this; + if(v != null){ + var innerControl = _self.getInnerControl(); + if(innerControl.set){ + innerControl.set('width',v); + } + } + } + },{ + ATTRS : { + /** + * \u5185\u90e8\u63a7\u4ef6\u7684\u4ee3\u8868Value\u7684\u5b57\u6bb5 + * @protected + * @override + * @type {String} + */ + innerValueField : { + value : 'value' + }, + /** + * \u7a7a\u503c\u7684\u6570\u636e\uff0c\u6e05\u7a7a\u7f16\u8f91\u5668\u65f6\u4f7f\u7528 + * @protected + * @type {*} + */ + emptyValue : { + value : '' + }, + /** + * \u662f\u5426\u81ea\u52a8\u9690\u85cf + * @override + * @type {Boolean} + */ + autoHide : { + value : true + }, + /** + * \u5185\u90e8\u63a7\u4ef6\u914d\u7f6e\u9879\u7684\u5b57\u6bb5 + * @protected + * @type {String} + */ + controlCfgField : { + value : 'field' + }, + /** + * \u9ed8\u8ba4\u7684\u5b57\u6bb5\u57df\u914d\u7f6e\u9879 + * @type {Object} + */ + defaultChildCfg : { + value : { + tpl : '', + forceFit : true, + errorTpl : ''// + } + }, + defaultChildClass : { + value : 'form-field' + }, + align : { + value : { + points: ['tl','tl'] + } + }, + /** + * \u9519\u8bef\u4fe1\u606f\u7684\u5bf9\u9f50\u65b9\u5f0f + * @type {Object} + */ + errorAlign : { + value : { + points: ['bl','tl'], + offset : [0,10] + } + }, + /** + * \u663e\u793a\u9519\u8bef\u7684\u5f39\u51fa\u5c42 + * @type {BUI.Overlay.Overlay} + */ + overlay : { + + }, + /** + * \u7f16\u8f91\u5668\u4e2d\u9ed8\u8ba4\u4f7f\u7528\u6587\u672c\u5b57\u6bb5\u57df\u6765\u7f16\u8f91\u6570\u636e + * @type {Array} + */ + field : { + value : {} + } + } + },{ + xclass : 'editor' + }); + + return editor; +});/** + * @fileOverview \u5bf9\u8c61\u7f16\u8f91\u5668 + * @ignore + */ + +define('bui/editor/record',['bui/common','bui/editor/editor'],function (require) { + var BUI = require('bui/common'), + Editor = require('bui/editor/editor'); + + /** + * @class BUI.Editor.RecordEditor + * @extends BUI.Editor.Editor + * \u7f16\u8f91\u5668 + */ + var editor = Editor.extend({ + /** + * @protected + * @override + * \u83b7\u53d6\u7f16\u8f91\u7684\u6e90\u6570\u636e + * @return {String} \u8fd4\u56de\u9700\u8981\u7f16\u8f91\u7684\u6587\u672c + */ + getSourceValue : function(){ + return this.get('record'); + }, + /** + * @protected + * \u66f4\u65b0\u6587\u672c + * @param {Object} value \u7f16\u8f91\u5668\u7684\u503c + */ + updateSource : function(value){ + var _self = this, + record = _self.get('record'); + BUI.mix(record,value); + }, + _uiSetRecord : function(v){ + this.setValue(v); + } + },{ + ATTRS : { + + /** + * \u5185\u90e8\u63a7\u4ef6\u7684\u4ee3\u8868Value\u7684\u5b57\u6bb5 + * @protected + * @override + * @type {String} + */ + innerValueField : { + value : 'record' + }, + /** + * \u63a5\u53d7\u66f4\u6539\u7684\u4e8b\u4ef6 + * @type {String} + */ + acceptEvent : { + value : '' + }, + /** + * \u7a7a\u503c\u7684\u6570\u636e\uff0c\u6e05\u7a7a\u7f16\u8f91\u5668\u65f6\u4f7f\u7528 + * @protected + * @type {*} + */ + emptyValue : { + value : {} + }, + /** + * \u662f\u5426\u81ea\u52a8\u9690\u85cf + * @override + * @type {Boolean} + */ + autoHide : { + value : false + }, + /** + * \u7f16\u8f91\u7684\u8bb0\u5f55 + * @type {Object} + */ + record : { + value : {} + }, + /** + * \u5185\u90e8\u63a7\u4ef6\u914d\u7f6e\u9879\u7684\u5b57\u6bb5 + * @protected + * @type {String} + */ + controlCfgField : { + value : 'form' + }, + /** + * \u7f16\u8f91\u5668\u5185\u8868\u5355\u7684\u914d\u7f6e\u9879 + * @type {Object} + */ + form : { + value : {} + }, + /** + * \u9519\u8bef\u4fe1\u606f\u7684\u5bf9\u9f50\u65b9\u5f0f + * @type {Object} + */ + errorAlign : { + value : { + points: ['tr','tl'], + offset : [10,0] + } + }, + /** + * \u9ed8\u8ba4\u7684\u5b57\u6bb5\u57df\u914d\u7f6e\u9879 + * @type {Object} + */ + defaultChildCfg : { + valueFn : function(){ + var _self = this; + return { + xclass : 'form', + errorTpl : '', + showError : true, + showChildError : true, + defaultChildCfg : { + elCls : 'bui-inline-block', + tpl : '', + forceFit : true + }, + buttons : [ + { + btnCls : 'button button-primary', + text : '\u786e\u5b9a', + handler : function(){ + _self.accept(); + } + }, + { + btnCls : 'button', + text : '\u53d6\u6d88', + handler : function(){ + _self.cancel(); + } + }] + } + } + } + } + },{ + xclass : 'record-editor' + }); + + return editor; +});/** + * @fileOverview \u4f7f\u7528\u5f39\u51fa\u6846\u4f5c\u4e3a\u7f16\u8f91\u5668 + * @ignore + */ + +define('bui/editor/dialog',['bui/overlay','bui/editor/mixin'],function (require) { + var Dialog = require('bui/overlay').Dialog, + Mixin = require('bui/editor/mixin'); + + /** + * @class BUI.Editor.DialogEditor + * @extends BUI.Overlay.Dialog + * @mixins BUI.Editor.Mixin + * \u7f16\u8f91\u5668 + */ + var editor = Dialog.extend([Mixin],{ + /** + * @protected + * @override + * \u83b7\u53d6\u7f16\u8f91\u7684\u6e90\u6570\u636e + * @return {String} \u8fd4\u56de\u9700\u8981\u7f16\u8f91\u7684\u6587\u672c + */ + getSourceValue : function(){ + return this.get('record'); + }, + /** + * @protected + * @override + * \u5904\u7406enter\u952e + */ + handleNavEnter : function(ev){ + var _self = this, + success = _self.get('success'), + sender = ev.target; + if(sender.tagName === 'TEXTAREA'){ //\u6587\u672c\u8f93\u5165\u6846\uff0c\u4e0d\u786e\u5b9a\u9690\u85cf + return; + } + if(sender.tagName === 'BUTTON'){ + $(sender).trigger('click'); + } + if(success){ + success.call(_self); + }else{ + this.accept(); + } + }, + /** + * \u53d6\u6d88\u7f16\u8f91 + */ + cancel : function(){ + if(this.onCancel()!== false){ + this.fire('cancel'); + this.clearValue(); + this.close(); + } + }, + /** + * @protected + * \u66f4\u65b0\u6587\u672c + * @param {Object} value \u7f16\u8f91\u5668\u7684\u503c + */ + updateSource : function(value){ + var _self = this, + record = _self.get('record'); + BUI.mix(record,value); + }, + _uiSetRecord : function(v){ + this.setValue(v); + } + },{ + ATTRS : { + /** + * \u5185\u90e8\u63a7\u4ef6\u7684\u4ee3\u8868Value\u7684\u5b57\u6bb5 + * @protected + * @override + * @type {String} + */ + innerValueField : { + value : 'record' + }, + /** + * \u63a5\u53d7\u66f4\u6539\u7684\u4e8b\u4ef6 + * @type {String} + */ + acceptEvent : { + value : '' + }, + /** + * \u7f16\u8f91\u7684\u8bb0\u5f55 + * @type {Object} + */ + record : { + value : {} + }, + /** + * \u7a7a\u503c\u7684\u6570\u636e\uff0c\u6e05\u7a7a\u7f16\u8f91\u5668\u65f6\u4f7f\u7528 + * @protected + * @type {*} + */ + emptyValue : { + value : {} + }, + /** + * \u5185\u90e8\u63a7\u4ef6\u914d\u7f6e\u9879\u7684\u5b57\u6bb5 + * @protected + * @type {String} + */ + controlCfgField : { + value : 'form' + }, + /** + * dialog \u7f16\u8f91\u5668\u4e00\u822c\u7531\u6309\u94ae\u89e6\u53d1\uff0c\u5728\u89e6\u53d1\u65f6\u8bbe\u7f6e\u6570\u636e\u6e90 + * @override + * @type {String} + */ + changeSourceEvent : { + value : '' + }, + /** + * \u9ed8\u8ba4\u7684\u5b57\u6bb5\u57df\u914d\u7f6e\u9879 + * @type {Object} + */ + defaultChildCfg : { + value : { + xclass : 'form-horizontal' + } + }, + /** + * \u8bbe\u7f6e\u53ef\u4ee5\u83b7\u53d6\u4ea4\u5355 + * @type {Boolean} + */ + focusable : { + value : true + }, + success : { + value : function () { + this.accept(); + } + }, + /** + * \u7f16\u8f91\u5668\u5185\u8868\u5355\u7684\u914d\u7f6e\u9879 + * @type {Object} + */ + form : { + value : {} + } + } + },{ + xclass : 'dialog-editor' + }); + + return editor; +});/** + * @fileOverview \u8868\u683c\u547d\u540d\u7a7a\u95f4\u5165\u53e3 + * @ignore + */ + +define('bui/grid',['bui/common','bui/grid/simplegrid','bui/grid/grid','bui/grid/column','bui/grid/header','bui/grid/format','bui/grid/plugins'],function (require) { + + var BUI = require('bui/common'), + Grid = BUI.namespace('Grid'); + + BUI.mix(Grid,{ + SimpleGrid : require('bui/grid/simplegrid'), + Grid : require('bui/grid/grid'), + Column : require('bui/grid/column'), + Header : require('bui/grid/header'), + Format : require('bui/grid/format'), + Plugins : require('bui/grid/plugins') + }); + + return Grid; + +});/** + * @fileOverview \u7b80\u5355\u8868\u683c,\u4ec5\u7528\u4e8e\u5c55\u793a\u6570\u636e + * @author dxq613@gmail.com + * @ignore + */ +define('bui/grid/simplegrid',['bui/common','bui/list'],function(require) { + + var BUI = require('bui/common'), + List = require('bui/list'), + Component = BUI.Component, + UIBase = Component.UIBase, + PREFIX = BUI.prefix, + CLS_GRID = PREFIX + 'grid', + CLS_GRID_ROW = CLS_GRID + '-row', + CLS_ROW_ODD = PREFIX + 'grid-row-odd', + CLS_ROW_EVEN = PREFIX + 'grid-row-even', + CLS_GRID_BORDER = PREFIX + 'grid-border', + CLS_ROW_FIRST = PREFIX + 'grid-row-first'; + + + /** + * \u7b80\u5355\u8868\u683c\u7684\u89c6\u56fe\u7c7b + * @class BUI.Grid.SimpleGridView + * @extends BUI.List.SimpleListView + * @private + */ + var simpleGridView = List.SimpleListView.extend({ + /** + * \u8bbe\u7f6e\u5217 + * @internal + * @param {Array} columns \u5217\u96c6\u5408 + */ + setColumns : function(columns){ + var _self = this, + headerRowEl = _self.get('headerRowEl'); + + columns = columns || _self.get('columns'); + //\u6e05\u7a7a\u8868\u5934 + headerRowEl.empty(); + + BUI.each(columns,function(column){ + _self._createColumn(column,headerRowEl); + }); + }, + //\u521b\u5efa\u5217 + _createColumn : function(column,parent){ + var _self = this, + columnTpl = BUI.substitute(_self.get('columnTpl'),column); + $(columnTpl).appendTo(parent); + }, + /** + * \u83b7\u53d6\u884c\u6a21\u677f + * @ignore + */ + getItemTpl : function (record,index) { + var _self = this, + columns = _self.get('columns'), + rowTpl = _self.get('rowTpl'), + oddCls = index % 2 === 0 ? CLS_ROW_ODD : CLS_ROW_EVEN, + cellsTpl = [], + rowEl; + + BUI.each(columns, function (column) { + var dataIndex = column['dataIndex']; + cellsTpl.push(_self._getCellTpl(column, dataIndex, record)); + }); + + rowTpl = BUI.substitute(rowTpl,{cellsTpl:cellsTpl.join(''), oddCls:oddCls}); + return rowTpl; + }, + //get cell template by config and record + _getCellTpl:function (column, dataIndex, record) { + var _self = this, + renderer = column.renderer, + text = renderer ? renderer(record[dataIndex], record) : record[dataIndex], + cellTpl = _self.get('cellTpl'); + return BUI.substitute(cellTpl,{elCls : column.elCls,text:text}); + }, + /** + * \u6e05\u9664\u6570\u636e + * @ignore + */ + clearData : function(){ + var _self = this, + tbodyEl = _self.get('itemContainer'); + tbodyEl.empty(); + }, + showData : function(data){ + + var _self = this; + BUI.each(data,function(record,index){ + _self._createRow(record,index); + }); + }, + //\u8bbe\u7f6e\u5355\u5143\u683c\u8fb9\u6846 + _uiSetInnerBorder : function(v){ + var _self = this, + el = _self.get('el'); + if(v){ + el.addClass(CLS_GRID_BORDER); + }else{ + el.removeClass(CLS_GRID_BORDER); + } + }, + _uiSetTableCls : function(v){ + var _self = this, + tableEl = _self.get('el').find('table'); + tableEl.attr('class',v); + } + },{ + ATTRS : { + /** + * @private + * @ignore + */ + headerRowEl : { + valueFn :function(){ + var _self = this, + thead = _self.get('el').find('thead'); + return thead.children('tr'); + } + }, + /** + * @private + * @ignore + * @type {Object} + */ + itemContainer :{ + valueFn :function(){ + return this.get('el').find('tbody'); + } + }, + tableCls : { + + } + } + },{ + xclass:'simple-grid-veiw' + }); + + /** + * \u7b80\u5355\u8868\u683c + * xclass:'simple-grid' + *
                
                +   *  BUI.use('bui/grid',function(Grid){
                +   *     
                +   *    var columns = [{
                +   *             title : '\u8868\u59341(10%)',
                +   *             dataIndex :'a',
                +   *             width:'10%'
                +   *           },{
                +   *             id: '123',
                +   *             title : '\u8868\u59342(20%)',
                +   *             dataIndex :'b',
                +   *             width:'20%'
                +   *           },{
                +   *             title : '\u8868\u59343(70%)',
                +   *             dataIndex : 'c',
                +   *             width:'70%'
                +   *         }],
                +   *         data = [{a:'123'},{a:'cdd',b:'edd'},{a:'1333',c:'eee',d:2}];
                +   *
                +   *     var grid = new Grid.SimpleGrid({
                +   *       render:'#grid',
                +   *       columns : columns,
                +   *       items : data,
                +   *       idField : 'a'
                +   *     });
                +   *
                +   *     grid.render();
                +   *   });
                +   * 
                + * @class BUI.Grid.SimpleGrid + * @extends BUI.List.SimpleList + */ + var simpleGrid = BUI.List.SimpleList.extend( + /** + * @lends BUI.Grid.SimpleGrid.prototype + * @ignore + */ + { + renderUI : function(){ + this.get('view').setColumns(); + }, + /** + * \u7ed1\u5b9a\u4e8b\u4ef6 + * @protected + */ + bindUI : function(){ + var _self = this, + itemCls = _self.get('itemCls'), + hoverCls = itemCls + '-hover', + el = _self.get('el'); + + el.delegate('.'+itemCls,'mouseover',function(ev){ + var sender = $(ev.currentTarget); + sender.addClass(hoverCls); + }).delegate('.'+itemCls,'mouseout',function(ev){ + var sender = $(ev.currentTarget); + sender.removeClass(hoverCls); + }); + }, + /** + * \u663e\u793a\u6570\u636e + *
                
                +     *   var data = [{},{}];
                +     *   grid.showData(data);
                +     *
                +     *   //\u7b49\u540c
                +     *   grid.set('items',data);
                +     * 
                + * @param {Array} data \u8981\u663e\u793a\u7684\u6570\u636e + */ + showData : function(data){ + this.clearData(); + //this.get('view').showData(data); + this.set('items',data); + }, + /** + * \u6e05\u9664\u6570\u636e + */ + clearData : function(){ + this.get('view').clearData(); + }, + _uiSetColumns : function(columns){ + var _self = this; + + //\u91cd\u7f6e\u5217\uff0c\u5148\u6e05\u7a7a\u6570\u636e + _self.clearData(); + _self.get('view').setColumns(columns); + } + },{ + ATTRS : + /** + * @lends BUI.Grid.SimpleGrid# + * @ignore + */ + { + /** + * \u8868\u683c\u53ef\u70b9\u51fb\u9879\u7684\u6837\u5f0f + * @protected + * @type {String} + */ + itemCls : { + view:true, + value : CLS_GRID_ROW + }, + /** + * \u8868\u683c\u5e94\u7528\u7684\u6837\u5f0f\uff0c\u66f4\u6539\u6b64\u503c\uff0c\u5219\u4e0d\u5e94\u7528\u9ed8\u8ba4\u8868\u683c\u6837\u5f0f + *
                
                +       * grid = new Grid.SimpleGrid({
                +       *   render:'#grid',
                +       *   columns : columns,
                +       *   innerBorder : false,
                +       *   tableCls:'table table-bordered table-striped', 
                +       *   store : store 
                +       * }); 
                +       * 
                + * @type {Object} + */ + tableCls : { + view : true, + value : CLS_GRID + '-table' + }, + /** + * \u5217\u4fe1\u606f + * @cfg {Array} columns + */ + /** + * \u5217\u4fe1\u606f\uff0c\u4ec5\u652f\u6301\u4ee5\u4e0b\u914d\u7f6e\u9879\uff1a + *
                  + *
                1. title\uff1a\u6807\u9898
                2. + *
                3. elCls: \u5e94\u7528\u5230\u672c\u5217\u7684\u6837\u5f0f
                4. + *
                5. width\uff1a\u5bbd\u5ea6\uff0c\u6570\u5b57\u6216\u8005\u767e\u5206\u6bd4
                6. + *
                7. dataIndex: \u5b57\u6bb5\u540d
                8. + *
                9. renderer: \u6e32\u67d3\u51fd\u6570
                10. + *
                + * \u5177\u4f53\u5b57\u6bb5\u7684\u89e3\u91ca\u6e05\u53c2\u770b \uff1a {@link BUI.Grid.Column} + * @type {Array} + */ + columns : { + view : true, + sync:false, + value : [] + }, + /** + * \u6a21\u677f + * @protected + */ + tpl:{ + view : true, + value:'
                ' + }, + /** + * \u5355\u5143\u683c\u5de6\u53f3\u4e4b\u95f4\u662f\u5426\u51fa\u73b0\u8fb9\u6846 + *
                
                +       * 
                
                +       * grid = new Grid.SimpleGrid({
                +       *   render:'#grid',
                +       *   columns : columns,
                +       *   innerBorder : false,
                +       *   store : store 
                +       * }); 
                +       * 
                + *
                + * @cfg {Boolean} [innerBorder=true] + */ + /** + * \u5355\u5143\u683c\u5de6\u53f3\u4e4b\u95f4\u662f\u5426\u51fa\u73b0\u8fb9\u6846 + * @type {Boolean} + * @default true + */ + innerBorder : { + view:true, + value : true + }, + /** + * \u884c\u6a21\u7248 + * @type {Object} + */ + rowTpl:{ + view : true, + value:'{cellsTpl}' + }, + /** + * \u5355\u5143\u683c\u7684\u6a21\u7248 + * @type {String} + */ + cellTpl:{ + view:true, + value:'
                {text}
                ' + }, + /** + * \u5217\u7684\u914d\u7f6e\u6a21\u7248 + * @type {String} + */ + columnTpl : { + view:true, + value : '
                {title}
                ' + }, + /** + * @private + */ + events :{ + + value : { + + } + }, + xview : { + value : simpleGridView + } + } + },{ + xclass:'simple-grid' + }); + + simpleGrid.View = simpleGridView; + return simpleGrid; +});/** + * @fileOverview This class specifies the definition for a column of a grid. + * @author dxq613@gmail.com + * @ignore + */ + +define('bui/grid/column',['bui/common'],function (require) { + + var BUI = require('bui/common'), + PREFIX = BUI.prefix, + CLS_HD_TITLE = PREFIX + 'grid-hd-title', + CLS_OPEN = PREFIX + 'grid-hd-open', + SORT_PREFIX = 'sort-', + SORT_ASC = 'ASC', + SORT_DESC = 'DESC', + CLS_TRIGGER = PREFIX + 'grid-hd-menu-trigger', + CLS_HD_TRIGGER = 'grid-hd-menu-trigger'; + + /** + * \u8868\u683c\u5217\u7684\u89c6\u56fe\u7c7b + * @class BUI.Grid.ColumnView + * @extends BUI.Component.View + * @private + */ + var columnView = BUI.Component.View.extend({ + + /** + * @protected + * @ignore + */ + setTplContent : function(attrs){ + var _self = this, + sortTpl = _self.get('sortTpl'), + triggerTpl = _self.get('triggerTpl'), + el = _self.get('el'), + titleEl; + + columnView.superclass.setTplContent.call(_self,attrs); + titleEl = el.find('.' + CLS_HD_TITLE); + $(sortTpl).insertAfter(titleEl); + $(triggerTpl).insertAfter(titleEl); + + }, + //use template to fill the column + _setContent:function () { + this.setTplContent(); + }, + _uiSetShowMenu : function(v){ + var _self = this, + triggerTpl = _self.get('triggerTpl'), + el = _self.get('el'), + titleEl = el.find('.' + CLS_HD_TITLE); + if(v){ + $(triggerTpl).insertAfter(titleEl); + }else{ + el.find('.' + CLS_TRIGGER).remove(); + } + }, + //set the title of column + _uiSetTitle:function (title) { + if (!this.get('rendered')) { + return; + } + this._setContent(); + }, + //set the draggable of column + _uiSetDraggable:function (v) { + if (!this.get('rendered')) { + return; + } + this._setContent(); + }, + //set the sortableof column + _uiSetSortable:function (v) { + + if (!this.get('rendered')) { + return; + } + this._setContent(); + }, + //set the template of column + _uiSetTpl:function (v) { + if (!this.get('rendered')) { + return; + } + this._setContent(); + }, + //set the sort state of column + _uiSetSortState:function (v) { + var _self = this, + el = _self.get('el'), + method = v ? 'addClass' : 'removeClass', + ascCls = SORT_PREFIX + 'asc', + desCls = SORT_PREFIX + 'desc'; + el.removeClass(ascCls + ' ' + desCls); + if (v === 'ASC') { + el.addClass(ascCls); + } else if (v === 'DESC') { + el.addClass(desCls); + } + }, + //\u5c55\u5f00\u8868\u5934 + _uiSetOpen : function (v) { + var _self = this, + el = _self.get('el'); + if(v){ + el.addClass(CLS_OPEN); + }else{ + el.removeClass(CLS_OPEN); + } + } + }, { + ATTRS:{ + + /** + * @private + */ + sortTpl : { + view: true, + getter: function(){ + var _self = this, + sortable = _self.get('sortable'); + if(sortable){ + return ' '; + } + return ''; + } + }, + tpl:{ + } + } + }); + + /** + * \u8868\u683c\u7684\u5217\u5bf9\u8c61\uff0c\u5b58\u50a8\u5217\u4fe1\u606f\uff0c\u6b64\u5bf9\u8c61\u4e0d\u4f1a\u7531\u7528\u6237\u521b\u5efa\uff0c\u800c\u662f\u914d\u7f6e\u5728Grid\u4e2d + * xclass:'grid-column' + *
                
                +     * columns = [{
                +     *        title : '\u8868\u59341',
                +     *        dataIndex :'a',
                +     *        width:100
                +     *      },{
                +     *        title : '\u8868\u59342',
                +     *        dataIndex :'b',
                +     *        visible : false, //\u9690\u85cf
                +     *        width:200
                +     *      },{
                +     *        title : '\u8868\u59343',
                +     *        dataIndex : 'c',
                +     *        width:200
                +     *    }];
                +     * 
                + * @class BUI.Grid.Column + * @extends BUI.Component.Controller + */ + var column = BUI.Component.Controller.extend( + /** + * @lends BUI.Grid.Column.prototype + * @ignore + */ + { //toggle sort state of this column ,if no sort state set 'ASC',else toggle 'ASC' and 'DESC' + _toggleSortState:function () { + var _self = this, + sortState = _self.get('sortState'), + v = sortState ? (sortState === SORT_ASC ? SORT_DESC : SORT_ASC) : SORT_ASC; + _self.set('sortState', v); + }, + /** + * {BUI.Component.Controller#performActionInternal} + * @ignore + */ + performActionInternal:function (ev) { + var _self = this, + sender = $(ev.target), + prefix = _self.get('prefixCls'); + if (sender.hasClass(prefix + CLS_HD_TRIGGER)) { + + } else { + if (_self.get('sortable')) { + _self._toggleSortState(); + } + } + //_self.fire('click',{domTarget:ev.target}); + }, + _uiSetWidth : function(v){ + if(v){ + this.set('originWidth',v); + } + } + }, { + ATTRS: + /*** + * @lends BUI.Grid.Column.prototype + * @ignore + */ + { + /** + * The tag name of the rendered column + * @private + */ + elTagName:{ + value:'th' + }, + /** + * \u8868\u5934\u5c55\u5f00\u663e\u793a\u83dc\u5355\uff0c + * @type {Boolean} + * @protected + */ + open : { + view : true, + value : false + }, + /** + * \u6b64\u5217\u5bf9\u5e94\u663e\u793a\u6570\u636e\u7684\u5b57\u6bb5\u540d\u79f0 + *
                
                +                 * {
                +                 *     title : '\u8868\u59341',
                +                 *     dataIndex :'a', //\u5bf9\u5e94\u7684\u6570\u636e\u7684\u5b57\u6bb5\u540d\u79f0\uff0c\u5982 \uff1a {a:'123',b:'456'}
                +                 *     width:100
                +                 * }
                +                 * 
                + * @cfg {String} dataIndex + */ + /** + * \u6b64\u5217\u5bf9\u5e94\u663e\u793a\u6570\u636e\u7684\u5b57\u6bb5\u540d\u79f0 + * @type {String} + * @default {String} empty string + */ + dataIndex:{ + view:true, + value:'' + }, + /** + * \u662f\u5426\u53ef\u62d6\u62fd\uff0c\u6682\u65f6\u672a\u652f\u6301 + * @private + * @type {Boolean} + * @defalut true + */ + draggable:{ + sync:false, + view:true, + value:true + }, + /** + * \u7f16\u8f91\u5668,\u7528\u4e8e\u53ef\u7f16\u8f91\u8868\u683c\u4e2d
                + * ** \u5e38\u7528\u7f16\u8f91\u5668 ** + * - xtype \u6307\u7684\u662f\u8868\u5355\u5b57\u6bb5\u7684\u7c7b\u578b {@link BUI.Form.Field} + * - \u5176\u4ed6\u7684\u914d\u7f6e\u9879\u5bf9\u5e94\u4e8e\u8868\u5355\u5b57\u6bb5\u7684\u914d\u7f6e\u9879 + *
                
                +                 * columns = [
                +                 *   {title : '\u6587\u672c',dataIndex :'a',editor : {xtype : 'text'}}, 
                +                 *   {title : '\u6570\u5b57', dataIndex :'b',editor : {xtype : 'number',rules : {required : true}}},
                +                 *   {title : '\u65e5\u671f',dataIndex :'c', editor : {xtype : 'date'},renderer : Grid.Format.dateRenderer},
                +                 *   {title : '\u5355\u9009',dataIndex : 'd', editor : {xtype :'select',items : enumObj},renderer : Grid.Format.enumRenderer(enumObj)},
                +                 *   {title : '\u591a\u9009',dataIndex : 'e', editor : {xtype :'select',select:{multipleSelect : true},items : enumObj},
                +                 *       renderer : Grid.Format.multipleItemsRenderer(enumObj)
                +                 *   }
                +                 * ]
                +                 * 
                + * @type {Object} + */ + editor:{ + + }, + /** + * \u662f\u5426\u53ef\u4ee5\u83b7\u53d6\u7126\u70b9 + * @protected + */ + focusable:{ + value:false + }, + /** + * \u56fa\u5b9a\u5217,\u4e3b\u8981\u7528\u4e8e\u5728\u9996\u884c\u663e\u793a\u4e00\u4e9b\u7279\u6b8a\u5185\u5bb9\uff0c\u5982\u5355\u9009\u6846\uff0c\u590d\u9009\u6846\uff0c\u5e8f\u53f7\u7b49\u3002\u63d2\u4ef6\u4e0d\u80fd\u5bf9\u6b64\u5217\u8fdb\u884c\u7279\u6b8a\u64cd\u4f5c\uff0c\u5982\uff1a\u79fb\u52a8\u4f4d\u7f6e\uff0c\u9690\u85cf\u7b49 + * @cfg {Boolean} fixed + */ + fixed : { + value : false + }, + /** + * \u63a7\u4ef6\u7684\u7f16\u53f7 + * @cfg {String} id + */ + id:{ + + }, + /** + * \u6e32\u67d3\u8868\u683c\u5355\u5143\u683c\u7684\u683c\u5f0f\u5316\u51fd\u6570 + * "function(value,obj,index){return value;}" + *
                
                +                 * {title : '\u64cd\u4f5c',renderer : function(){
                +                 *     return '\u7f16\u8f91'
                +                 *   }}
                +                 * 
                + * @cfg {Function} renderer + */ + renderer:{ + + }, + /** + * \u662f\u5426\u53ef\u4ee5\u8c03\u6574\u5bbd\u5ea6\uff0c\u5e94\u7528\u4e8e\u62d6\u62fd\u6216\u8005\u81ea\u9002\u5e94\u5bbd\u5ea6\u65f6 + * @type {Boolean} + * @protected + * @default true + */ + resizable:{ + value:true + }, + /* \u662f\u5426\u53ef\u4ee5\u6309\u7167\u6b64\u5217\u6392\u5e8f\uff0c\u5982\u679c\u8bbe\u7f6etrue,\u90a3\u4e48\u70b9\u51fb\u5217\u5934\u65f6 + *
                
                +                 *     {title : '\u6570\u5b57', dataIndex :'b',sortable : false},
                +                 * 
                + * @cfg {Boolean} [sortable=true] + */ + sortable:{ + sync:false, + view:true, + value:true + }, + /** + * \u6392\u5e8f\u72b6\u6001\uff0c\u5f53\u524d\u6392\u5e8f\u662f\u6309\u7167\u5347\u5e8f\u3001\u964d\u5e8f\u3002\u67093\u79cd\u503c null, 'ASC','DESC' + * @type {String} + * @protected + * @default null + */ + sortState:{ + view:true, + value:null + }, + /** + * \u5217\u6807\u9898 + * @cfg {String} [title= ] + */ + /** + * \u5217\u6807\u9898 + *
                
                +                 * var column = grid.findColumn('id');
                +                 * column.get('title');
                +                 * 
                + * Note: to have a clickable header with no text displayed you can use the default of   aka  . + * @type {String} + * @default {String}   + */ + title:{ + sync:false, + view:true, + value:' ' + }, + + /** + * \u5217\u7684\u5bbd\u5ea6,\u53ef\u4ee5\u4f7f\u6570\u5b57\u6216\u8005\u767e\u5206\u6bd4,\u4e0d\u8981\u4f7f\u7528 width : '100'\u6216\u8005width : '100px' + *
                
                +                 *  {title : '\u6587\u672c',width:100,dataIndex :'a',editor : {xtype : 'text'}}
                +                 *  
                +                 *  {title : '\u6587\u672c',width:'10%',dataIndex :'a',editor : {xtype : 'text'}}
                +                 * 
                + * @cfg {Number} [width = 80] + */ + + /** + * \u5217\u5bbd\u5ea6 + *
                
                +                 *  grid.findColumn(id).set('width',200);
                +                 * 
                + * + * @type {Number} + */ + width:{ + value:100 + }, + /** + * \u662f\u5426\u663e\u793a\u83dc\u5355 + * @cfg {Boolean} [showMenu=false] + */ + /** + * \u662f\u5426\u663e\u793a\u83dc\u5355 + * @type {Boolean} + * @default false + */ + showMenu:{ + view:true, + value:false + }, + /** + * @private + * @type {Object} + */ + triggerTpl:{ + view:true, + value:'' + + }, + /** + * An template used to create the internal structure inside this Component's encapsulating Element. + * User can use the syntax of KISSY 's template component. + * Only in the configuration of the column can set this property. + * @type {String} + */ + tpl:{ + sync:false, + view:true, + value:'
                ' + + '{title}' + + '
                ' + }, + /** + * \u5355\u5143\u683c\u7684\u6a21\u677f\uff0c\u5728\u5217\u4e0a\u8bbe\u7f6e\u5355\u5143\u683c\u7684\u6a21\u677f\uff0c\u53ef\u4ee5\u5728\u6e32\u67d3\u5355\u5143\u683c\u65f6\u4f7f\u7528\uff0c\u66f4\u6539\u5355\u5143\u683c\u7684\u5185\u5bb9 + * @cfg {String} cellTpl + */ + /** + * \u5355\u5143\u683c\u7684\u6a21\u677f\uff0c\u5728\u5217\u4e0a\u8bbe\u7f6e\u5355\u5143\u683c\u7684\u6a21\u677f\uff0c\u53ef\u4ee5\u5728\u6e32\u67d3\u5355\u5143\u683c\u65f6\u4f7f\u7528\uff0c\u66f4\u6539\u5355\u5143\u683c\u7684\u5185\u5bb9 + * @type {String} + */ + cellTpl:{ + value:'' + }, + /** + * the collection of column's events + * @protected + * @type {Array} + */ + events:{ + value:{ + /** + * @event + * Fires when this column's width changed + * @param {jQuery.Event} e the event object + * @param {BUI.Grid.Column} target + */ + 'afterWidthChange' : true, + /** + * @event + * Fires when this column's sort changed + * @param {jQuery.Event} e the event object + * @param {BUI.Grid.Column} e.target + */ + 'afterSortStateChange' : true, + /** + * @event + * Fires when this column's hide or show + * @param {jQuery.Event} e the event object + * @param {BUI.Grid.Column} e.target + */ + 'afterVisibleChange' : true, + /** + * @event + * Fires when use clicks the column + * @param {jQuery.Event} e the event object + * @param {BUI.Grid.Column} e.target + * @param {HTMLElement} domTarget the dom target of this event + */ + 'click' : true, + /** + * @event + * Fires after the component is resized. + * @param {BUI.Grid.Column} target + * @param {Number} adjWidth The box-adjusted width that was set + * @param {Number} adjHeight The box-adjusted height that was set + */ + 'resize' : true, + /** + * @event + * Fires after the component is moved. + * @param {jQuery.Event} e the event object + * @param {BUI.Grid.Column} e.target + * @param {Number} x The new x position + * @param {Number} y The new y position + */ + 'move' : true + } + }, + /** + * @private + */ + xview:{ + value:columnView + } + + } + }, { + xclass:'grid-hd', + priority:1 + }); + + column.Empty = column.extend({ + + }, { + ATTRS:{ + type:{ + value:'empty' + }, + sortable:{ + view:true, + value:false + }, + width:{ + view:true, + value:null + }, + tpl:{ + view:true, + value:'
                ' + } + } + }, { + xclass:'grid-hd-empty', + priority:1 + }); + + return column; + +}); + +/** + * @fileOverview \u8868\u683c\u7684\u5934\u90e8 + * @author dxq613@gmail.com, yiminghe@gmail.com + * @ignore + */ + +define('bui/grid/header',['bui/common','bui/grid/column'],function(require) { + + var BUI = require('bui/common'), + PREFIX = BUI.prefix, + Grid = BUI.namespace('Grid'), + Column = require('bui/grid/column'), + View = BUI.Component.View, + Controller = BUI.Component.Controller, + CLS_SCROLL_WITH = 17, + UA = BUI.UA; + + /** + * \u8868\u683c\u63a7\u4ef6\u4e2d\u8868\u5934\u7684\u89c6\u56fe\u7c7b + * @class BUI.Grid.HeaderView + * @extends BUI.Component.View + * @private + */ + var headerView = View.extend({ + + /** + * @see {Component.Render#getContentElement} + * @ignore + */ + getContentElement:function () { + return this.get('el').find('tr'); + }, + scrollTo:function (obj) { + var _self = this, + el = _self.get('el'); + if (obj.top !== undefined) { + el.scrollTop(obj.top); + } + if (obj.left !== undefined) { + el.scrollLeft(obj.left); + } + }, + _uiSetTableCls : function(v){ + var _self = this, + tableEl = _self.get('el').find('table'); + tableEl.attr('class',v); + } + }, { + ATTRS:{ + emptyCellEl:{}, + tableCls : { + + } + } + },{ + xclass : 'header-view' + }); + /** + * Container which holds headers and is docked at the top or bottom of a Grid. + * The HeaderContainer drives resizing/moving/hiding of columns within the GridView. + * As headers are hidden, moved or resized, + * the header container is responsible for triggering changes within the view. + * If you are not in the writing plugins, don't direct manipulation this control. + * @class BUI.Grid.Header + * @protected + * xclass:'grid-header' + * @extends BUI.Component.Controller + */ + var header = Controller.extend( + /** + * @lends BUI.Grid.Header.prototype + * @ignore + */ + { + /** + * add a columns to header + * @param {Object|BUI.Grid.Column} c The column object or column config. + * @index {Number} index The position of the column in a header,0 based. + */ + addColumn:function (c, index) { + var _self = this, + insertIndex = 0, + columns = _self.get('columns'); + c = _self._createColumn(c); + if (index === undefined) { + index = columns.length; + insertIndex = _self.get('children').length - 1; + } + columns.splice(index, 0, c); + _self.addChild(c, insertIndex); + _self.fire('add', {column:c, index:index}); + return c; + }, + /** + * remove a columns from header + * @param {BUI.Grid.Column|Number} c is The column object or The position of the column in a header,0 based. + */ + removeColumn:function (c) { + var _self = this, + columns = _self.get('columns'), + index; + c = BUI.isNumber(c) ? columns[c] : c; + index = BUI.Array.indexOf(c, columns); + columns.splice(index, 1); + _self.fire('remove', {column:c, index:index}); + return _self.removeChild(c, true); + }, + /** + * For overridden. + * @see Component.Controller#bindUI + */ + bindUI:function () { + var _self = this; + _self._bindColumnsEvent(); + }, + /* + * For overridden. + * @protected + * + */ + initializer:function () { + var _self = this, + children = _self.get('children'), + columns = _self.get('columns'), + emptyColumn = _self._createEmptyColumn(); + $.each(columns, function (index,item) { + var columnControl = _self._createColumn(item); + children[index] = columnControl; + columns[index] = columnControl; + }); + children.push(emptyColumn); + _self.set('emptyColumn',emptyColumn); + }, + /** + * get the columns of this header,the result equals the 'children' property . + * @return {Array} columns + * @example var columns = header.getColumns(); + *
                or
                + * var columns = header.get('children'); + */ + getColumns:function () { + return this.get('columns'); + }, + /** + * Obtain the sum of the width of all columns + * @return {Number} + */ + getColumnsWidth:function () { + var _self = this, + columns = _self.getColumns(), + totalWidth = 0; + + $.each(columns, function (index,column) { + if (column.get('visible')) { + totalWidth += column.get('el').outerWidth();//column.get('width') + } + }); + return totalWidth; + }, + getColumnOriginWidth : function(){ + var _self = this, + columns = _self.getColumns(), + totalWidth = 0; + + $.each(columns, function (index,column) { + if (column.get('visible')) { + var width = column.get('originWidth') || column.get('width'); + totalWidth += width; + } + }); + return totalWidth; + }, + /** + * get {@link BUI.Grid.Column} instance by index,when column moved ,the index changed. + * @param {Number} index The index of columns + * @return {BUI.Grid.Column} the column in the header,if the index outof the range,the result is null + */ + getColumnByIndex:function (index) { + var _self = this, + columns = _self.getColumns(), + result = columns[index]; + return result; + }, + /** + * \u67e5\u627e\u5217 + * @param {Function} func \u5339\u914d\u51fd\u6570\uff0cfunction(column){} + * @return {BUI.Grid.Column} \u67e5\u627e\u5230\u7684\u5217 + */ + getColumn:function (func) { + var _self = this, + columns = _self.getColumns(), + result = null; + $.each(columns, function (index,column) { + if (func(column)) { + result = column; + return false; + } + }); + return result; + }, + /** + * get {@link BUI.Grid.Column} instance by id,when column rendered ,this id can't to be changed + * @param {String|Number}id The id of columns + * @return {BUI.Grid.Column} the column in the header,if the index out of the range,the result is null + */ + getColumnById:function (id) { + var _self = this; + return _self.getColumn(function(column){ + return column.get('id') === id; + }); + }, + /** + * get {@link BUI.Grid.Column} instance's index,when column moved ,the index changed. + * @param {BUI.Grid.Column} column The instance of column + * @return {Number} the index of column in the header,if the column not in the header,the index is -1 + */ + getColumnIndex:function (column) { + var _self = this, + columns = _self.getColumns(); + return BUI.Array.indexOf(column, columns); + }, + /** + * move the header followed by body's or document's scrolling + * @param {Object} obj the scroll object which has two value:top(scrollTop),left(scrollLeft) + */ + scrollTo:function (obj) { + this.get('view').scrollTo(obj); + }, + //when column's event fire ,this header must handle them. + _bindColumnsEvent:function () { + var _self = this; + + _self.on('afterWidthChange', function (e) { + var sender = e.target; + if (sender !== _self) { + _self.setTableWidth(); + } + }); + _self.on('afterVisibleChange', function (e) { + var sender = e.target; + if (sender !== _self) { + _self.setTableWidth(); + } + }); + _self.on('afterSortStateChange', function (e) { + var sender = e.target, + columns = _self.getColumns(), + val = e.newVal; + if (val) { + $.each(columns, function (index,column) { + if (column !== sender) { + column.set('sortState', ''); + } + }); + } + }); + + _self.on('add',function(){ + _self.setTableWidth(); + }); + _self.on('remove',function(){ + _self.setTableWidth(); + }); + }, + //create the column control + _createColumn:function (cfg) { + if (cfg instanceof Column) { + return cfg; + } + if (!cfg.id) { + cfg.id = BUI.guid('col'); + } + return new Column(cfg); + }, + _createEmptyColumn:function () { + return new Column.Empty(); + }, + //when set grid's height, scroll bar emerged. + _isAllowScrollLeft:function () { + var _self = this, + parent = _self.get('parent'); + + return parent && !!parent.get('height'); + }, + /** + * force every column fit the table's width + */ + forceFitColumns:function () { + + var _self = this, + columns = _self.getColumns(), + width = _self.get('width'), + totalWidth = width, + totalColumnsWidth = _self.getColumnOriginWidth(), + realWidth = 0, + appendWidth = 0, + lastShowColumn = null, + allowScroll = _self._isAllowScrollLeft(); + + /** + * @private + */ + function setColoumnWidthSilent(column,colWidth){ + var columnEl = column.get('el'); + column.set('width',colWidth , { + silent:1 + }); + columnEl.width(colWidth); + } + //if there is not a width config of grid ,The forceFit action can't work + if (width) { + if (allowScroll) { + width -= CLS_SCROLL_WITH; + totalWidth = width; + } + + var adjustCount = 0; + + $.each(columns, function (index,column) { + if (column.get('visible') && column.get('resizable')) { + adjustCount++; + } + if (column.get('visible') && !column.get('resizable')) { + var colWidth = column.get('el').outerWidth(); + totalWidth -= colWidth; + totalColumnsWidth -= colWidth; + } + }); + + var colWidth = Math.floor(totalWidth / adjustCount), + ratio = totalWidth / totalColumnsWidth; + if(ratio ===1){ + return; + } + $.each(columns, function (index,column) { + if (column.get('visible') && column.get('resizable')) { + + var borderWidth = _self._getColumnBorderWith(column,index), + originWidth = column.get('originWidth'); + if(!originWidth){ + column.set('originWidth',column.get('width')); + originWidth = column.get('width'); + } + colWidth = Math.floor((originWidth + borderWidth) * ratio); + /* parseInt(columnEl.css('border-left-width')) || 0 + + parseInt(columnEl.css('border-right-width')) || 0;*/ + // \uff01 note + // + // \u4f1a\u518d\u8c03\u7528 setTableWidth\uff0c \u5faa\u73af\u8c03\u7528 || + setColoumnWidthSilent(column,colWidth - borderWidth); + realWidth += colWidth; + lastShowColumn = column; + } + }); + + if(lastShowColumn){ + appendWidth = totalWidth - realWidth; + setColoumnWidthSilent(lastShowColumn,lastShowColumn.get('width') + appendWidth); + } + + _self.fire('forceFitWidth'); + } + + }, + _getColumnBorderWith : function(column,index){ + //chrome \u4e0bborder-left-width\u53d6\u7684\u503c\u4e0d\u5c0f\u6570\uff0c\u6240\u4ee5\u6682\u65f6\u4f7f\u7528\u56fa\u5b9a\u8fb9\u6846 + //\u7b2c\u4e00\u4e2a\u8fb9\u6846\u65e0\u5bbd\u5ea6\uff0cie \u4e0b\u4ecd\u7136\u5b58\u5728Bug\uff0c\u6240\u4ee5\u505aie \u7684\u517c\u5bb9 + var columnEl = column.get('el'), + borderWidth = Math.round(parseFloat(columnEl.css('border-left-width')) || 0) + + Math.round(parseFloat(columnEl.css('border-right-width')) || 0); + + borderWidth = UA.ie && UA.ie < 8 ? (index === 0 ? 1 : borderWidth) : borderWidth; + return borderWidth; + }, + /** + * set the header's inner table's width + */ + setTableWidth:function () { + var _self = this, + width = _self.get('width'), + totalWidth = 0, + emptyColumn = null; + if(width == 'auto'){ + //_self.get('el').find('table').width() + return; + } + if (_self.get('forceFit')) { + _self.forceFitColumns(); + }else if(_self._isAllowScrollLeft()){ + totalWidth = _self.getColumnsWidth(); + emptyColumn = _self.get('emptyColumn'); + if(width < totalWidth){ + emptyColumn.get('el').width(CLS_SCROLL_WITH); + }else{ + emptyColumn.get('el').width('auto'); + } + } + }, + //when header's width changed, it also effects its columns. + _uiSetWidth:function () { + var _self = this; + _self.setTableWidth(); + }, + _uiSetForceFit:function (v) { + var _self = this; + if (v) { + _self.setTableWidth(); + } + } + + }, { + ATTRS: + /** + * @lends BUI.Grid.Header.prototype + * @ignore + * */ + { + /** + * \u5217\u96c6\u5408 + * @type {Array} + */ + columns:{ + value:[] + }, + /** + * @private + */ + emptyColumn:{ + + }, + /** + * \u662f\u5426\u53ef\u4ee5\u83b7\u53d6\u7126\u70b9 + * @protected + */ + focusable:{ + value:false + }, + /** + * true to force the columns to fit into the available width. Headers are first sized according to configuration, whether that be a specific width, or flex. + * Then they are all proportionally changed in width so that the entire content width is used. + * @type {Boolean} + * @default 'false' + */ + forceFit:{ + sync:false, + view:true, + value:false + }, + /** + * \u8868\u5934\u7684\u6a21\u7248 + * @type {String} + */ + tpl : { + + view : true, + value : '' + + '' + + '
                ' + }, + /** + * \u8868\u683c\u5e94\u7528\u7684\u6837\u5f0f. + */ + tableCls:{ + view:true + }, + /** + * @private + */ + xview:{ + value:headerView + }, + /** + * the collection of header's events + * @type {Array} + * @protected + */ + events:{ + value:{ + /** + * @event + * \u6dfb\u52a0\u5217\u65f6\u89e6\u53d1 + * @param {jQuery.Event} e the event object + * @param {BUI.Grid.Column} e.column which column added + * @param {Number} index the add column's index in this header + * + */ + 'add' : false, + /** + * @event + * \u79fb\u9664\u5217\u65f6\u89e6\u53d1 + * @param {jQuery.Event} e the event object + * @param {BUI.Grid.Column} e.column which column removed + * @param {Number} index the removed column's index in this header + */ + 'remove' : false + } + } + } + }, { + xclass:'grid-header', + priority:1 + }); + + return header; +});/** + * @fileOverview \u8868\u683c + * @ignore + * @author dxq613@gmail.com + */ + +define('bui/grid/grid',['bui/common','bui/mask','bui/toolbar','bui/list','bui/grid/header','bui/grid/column'],function (require) { + + var BUI = require('bui/common'), + Mask = require('bui/mask'), + UA = BUI.UA, + Component = BUI.Component, + toolbar = require('bui/toolbar'), + List = require('bui/list'), + Header = require('bui/grid/header'), + Column = require('bui/grid/column'); + + function isPercent(str){ + if(BUI.isString(str)){ + return str.indexOf('%') !== -1; + } + return false; + } + + var PREFIX = BUI.prefix, + CLS_GRID_HEADER_CONTAINER = PREFIX + 'grid-header-container', + CLS_GRID_BODY = PREFIX + 'grid-body', + CLS_GRID_WITH = PREFIX + 'grid-width', + CLS_GRID_HEIGHT = PREFIX + 'grid-height', + CLS_GRID_BORDER = PREFIX + 'grid-border', + CLS_GRID_TBAR = PREFIX + 'grid-tbar', + CLS_GRID_BBAR = PREFIX + 'grid-bbar', + CLS_BUTTON_BAR= PREFIX + 'grid-button-bar', + CLS_GRID_STRIPE = PREFIX + 'grid-strip', + CLS_GRID_ROW = PREFIX + 'grid-row', + CLS_ROW_ODD = PREFIX + 'grid-row-odd', + CLS_ROW_EVEN = PREFIX + 'grid-row-even', + CLS_ROW_FIRST = PREFIX + 'grid-row-first', + CLS_GRID_CELL = PREFIX + 'grid-cell', + CLS_GRID_CELL_INNER = PREFIX + 'grid-cell-inner', + CLS_TD_PREFIX = 'grid-td-', + CLS_CELL_TEXT = PREFIX + 'grid-cell-text', + CLS_CELL_EMPTY = PREFIX + 'grid-cell-empty', + CLS_SCROLL_WITH = '17', + CLS_HIDE = PREFIX + 'hidden', + ATTR_COLUMN_FIELD = 'data-column-field', + WIDTH_BORDER = 2, + HEIGHT_BAR_PADDING = 1; + + function getInnerWidth(width){ + var _self = this; + if(BUI.isNumber(width)){ + width -= WIDTH_BORDER; + } + return width; + } + + /** + * @class BUI.Grid.GridView + * @private + * @extends BUI.List.SimpleListView + * \u8868\u683c\u7684\u89c6\u56fe\u5c42 + */ + var gridView = List.SimpleListView.extend({ + + //\u8bbe\u7f6e body\u548ctable\u7684\u6807\u7b7e + renderUI : function(){ + var _self = this, + el = _self.get('el'), + bodyEl = el.find('.' + CLS_GRID_BODY); + _self.set('bodyEl',bodyEl); + _self._setTableTpl(); + }, + /** + * \u83b7\u53d6\u884c\u6a21\u677f + * @ignore + */ + getItemTpl : function (record,index) { + var _self = this, + columns = _self._getColumns(), + tbodyEl = _self.get('tbodyEl'), + rowTpl = _self.get('rowTpl'), + oddCls = index % 2 === 0 ? CLS_ROW_ODD : CLS_ROW_EVEN, + cellsTpl = [], + rowEl; + + $.each(columns, function (index,column) { + var dataIndex = column.get('dataIndex'); + cellsTpl.push(_self._getCellTpl(column, dataIndex, record)); + }); + + if(_self.get('useEmptyCell')){ + cellsTpl.push(_self._getEmptyCellTpl()); + } + + rowTpl = BUI.substitute(rowTpl,{cellsTpl:cellsTpl.join(''), oddCls:oddCls}); + return rowTpl; + }, + /** + * find the dom by the record in this component + * @param {Object} record the record used to find row dom + * @return jQuery + */ + findRow:function (record) { + var _self = this; + return $(_self.findElement(record)); + }, + /** + * find the cell dom by record and column id + * @param {String} id the column id + * @param {jQuery} rowEl the dom that showed in this component + * @return {jQuery} + */ + findCell : function(id,rowEl){ + var cls = CLS_TD_PREFIX + id; + return rowEl.find('.' + cls); + }, + /** + * \u91cd\u65b0\u521b\u5efa\u8868\u683c\u7684\u9996\u884c\uff0c\u4e00\u822c\u5728\u8868\u683c\u521d\u59cb\u5316\u5b8c\u6210\u540e\uff0c\u6216\u8005\u5217\u53d1\u751f\u6539\u53d8\u65f6 + */ + resetHeaderRow:function () { + if(!this.get('useHeaderRow')){ + return; + } + var _self = this, + headerRowEl = _self.get('headerRowEl'), + tbodyEl = _self.get('tbodyEl'); + if(headerRowEl){ + headerRowEl.remove(); + } + headerRowEl = _self._createHeaderRow(); + headerRowEl.prependTo(tbodyEl); + _self.set('headerRowEl', headerRowEl); + }, + /** + * when header's column width changed, column in this component changed followed + * @ignore + */ + resetColumnsWidth:function (column,width) { + var _self = this, + headerRowEl = _self.get('headerRowEl'), + cell = _self.findCell(column.get('id'), headerRowEl); + width = width || column.get('width'); + if (cell) { + cell.width(width); + } + _self.setTableWidth(); + }, + //set table width + setTableWidth:function (columnsWidth) { + if(!columnsWidth && isPercent(this.get('width'))){ + this.get('tableEl').width('100%'); + return; + } + var _self = this, + width = _self._getInnerWidth(), + height = _self.get('height'), + tableEl = _self.get('tableEl'), + forceFit = _self.get('forceFit'), + headerRowEl = _self.get('headerRowEl'); + //\u4f7f\u7528\u767e\u5206\u6bd4\u7684\u5bbd\u5ea6\uff0c\u4e0d\u8fdb\u884c\u8ba1\u7b97 + if(!isPercent(columnsWidth)){ + + columnsWidth = columnsWidth || _self._getColumnsWidth(); + if (!width) { + return; + } + if (width >= columnsWidth) { + columnsWidth = width; + if (height) { + var scrollWidth = (UA.ie == 6 || UA.ie == 7) ? CLS_SCROLL_WITH + 2 : CLS_SCROLL_WITH; + columnsWidth = width - scrollWidth; + } + } + } + + tableEl.width(columnsWidth); + }, + /** + * \u8868\u683c\u8868\u4f53\u7684\u5bbd\u5ea6 + * @param {Number} width \u5bbd\u5ea6 + */ + setBodyWidth : function(width){ + var _self = this, + bodyEl = _self.get('bodyEl'); + width = width || _self._getInnerWidth(); + bodyEl.width(width); + + }, + /** + * \u8bbe\u7f6e\u8868\u4f53\u9ad8\u5ea6 + * @param {Number} height \u9ad8\u5ea6 + */ + setBodyHeight : function(height){ + var _self = this, + bodyEl = _self.get('bodyEl'), + bodyHeight = height, + siblings = bodyEl.siblings(); + + BUI.each(siblings,function(item){ + if($(item).css('display') !== 'none'){ + bodyHeight -= $(item).outerHeight(); + } + }); + bodyEl.height(bodyHeight); + }, + //show or hide column + setColumnVisible:function (column) { + var _self = this, + hide = !column.get('visible'), + colId = column.get('id'), + tbodyEl = _self.get('tbodyEl'), + cells = $('.' + CLS_TD_PREFIX + colId,tbodyEl); + if (hide) { + cells.hide(); + } else { + cells.show(); + } + }, + /** + * \u66f4\u65b0\u6570\u636e + * @param {Object} record \u66f4\u65b0\u7684\u6570\u636e + */ + updateItem : function(record){ + var _self = this, + items = _self.getItems(), + index = BUI.Array.indexOf(record,items), + columns = _self._getColumns(), + element = null, + tpl; + if(index >=0 ){ + element = _self.findElement(record); + + BUI.each(columns,function(column){ + var cellEl = _self.findCell(column.get('id'),$(element)), + innerEl = cellEl.find('.' + CLS_GRID_CELL_INNER), + textTpl = _self._getCellText(column,record); + innerEl.html(textTpl); + }); + return element; + } + }, + /** + * \u663e\u793a\u6ca1\u6709\u6570\u636e\u65f6\u7684\u63d0\u793a\u4fe1\u606f + */ + showEmptyText : function(){ + var _self = this, + bodyEl = _self.get('bodyEl'), + emptyDataTpl = _self.get('emptyDataTpl'), + emptyEl = _self.get('emptyEl'); + if(emptyEl){ + emptyEl.remove(); + } + var emptyEl = $(emptyDataTpl).appendTo(bodyEl); + _self.set('emptyEl',emptyEl); + }, + /** + * \u6e05\u9664\u6ca1\u6709\u6570\u636e\u65f6\u7684\u63d0\u793a\u4fe1\u606f + */ + clearEmptyText : function(){ + var _self = this, + emptyEl = _self.get('emptyEl'); + if(emptyEl){ + emptyEl.remove(); + } + }, + //\u8bbe\u7f6e\u7b2c\u4e00\u884c\u7a7a\u767d\u884c\uff0c\u4e0d\u663e\u793a\u4efb\u4f55\u6570\u636e\uff0c\u4ec5\u7528\u4e8e\u8bbe\u7f6e\u5217\u7684\u5bbd\u5ea6 + _createHeaderRow:function () { + var _self = this, + columns = _self._getColumns(), + tbodyEl = _self.get('tbodyEl'), + rowTpl = _self.get('headerRowTpl'), + rowEl, + cellsTpl = []; + + $.each(columns, function (index,column) { + cellsTpl.push(_self._getHeaderCellTpl(column)); + }); + + //if this component set width,add a empty column to fit row width + if(_self.get('useEmptyCell')){ + cellsTpl.push(_self._getEmptyCellTpl()); + } + rowTpl = BUI.substitute(rowTpl,{cellsTpl:cellsTpl.join('')}); + rowEl = $(rowTpl).appendTo(tbodyEl); + return rowEl; + }, + //get the sum of the columns' width + _getColumnsWidth:function () { + var _self = this, + columns = _self.get('columns'), + totalWidth = 0; + + BUI.each(columns, function (column) { + if (column.get('visible')) { + totalWidth += column.get('el').outerWidth(); + } + }); + return totalWidth; + }, + //\u83b7\u53d6\u5217\u96c6\u5408 + _getColumns : function(){ + return this.get('columns'); + }, + //get cell text by record and column + _getCellText:function (column, record) { + var _self = this, + dataIndex = column.get('dataIndex'), + textTpl = column.get('cellTpl') || _self.get('cellTextTpl'), + text = _self._getCellInnerText(column,dataIndex, record); + return BUI.substitute(textTpl,{text:text, tips:_self._getTips(column, dataIndex, record)}); + }, + _getCellInnerText : function(column,dataIndex, record){ + //renderer \u65f6\u53d1\u751f\u9519\u8bef\u53ef\u80fd\u6027\u5f88\u9ad8 + try{ + var _self = this, + renderer = column.get('renderer'), + text = renderer ? renderer(record[dataIndex], record) : record[dataIndex]; + return text == null ? '' : text; + }catch(ex){ + throw 'column:' + column.get('title') +' fomat error!'; + } + }, + //get cell template by config and record + _getCellTpl:function (column, dataIndex, record) { + var _self = this, + cellText = _self._getCellText(column, record), + cellTpl = _self.get('cellTpl'); + return BUI.substitute(cellTpl,{ + elCls : column.get('elCls'), + id:column.get('id'), + dataIndex:dataIndex, + cellText:cellText, + hideCls:!column.get('visible') ? CLS_HIDE : '' + }); + }, + //\u83b7\u53d6\u7a7a\u767d\u5355\u5143\u683c\u7684\u6a21\u677f + _getEmptyCellTpl:function () { + return ' '; + }, + //\u83b7\u53d6\u7a7a\u767d\u884c\u5355\u5143\u683c\u6a21\u677f + _getHeaderCellTpl:function (column) { + var _self = this, + headerCellTpl = _self.get('headerCellTpl'); + return BUI.substitute(headerCellTpl,{ + id:column.get('id'), + width:column.get('width'), + hideCls:!column.get('visible') ? CLS_HIDE : '' + }); + }, + //\u83b7\u53d6\u8868\u683c\u5185\u5bbd\u5ea6 + _getInnerWidth : function(){ + return getInnerWidth(this.get('width')); + }, + //get cell tips + _getTips:function (column, dataIndex, record) { + var showTip = column.get('showTip'), + value = ''; + if (showTip) { + value = record[dataIndex]; + if (BUI.isFunction(showTip)) { + value = showTip(value, record); + } + } + return value; + }, + //\u8bbe\u7f6e\u5355\u5143\u683c\u8fb9\u6846 + _uiSetInnerBorder : function(v){ + var _self = this, + el = _self.get('el'); + if(v){ + el.addClass(CLS_GRID_BORDER); + }else{ + el.removeClass(CLS_GRID_BORDER); + } + }, + //\u8bbe\u7f6e\u8868\u683c\u6a21\u677f + _setTableTpl : function(tpl){ + var _self = this, + bodyEl = _self.get('bodyEl'); + + tpl = tpl || _self.get('tableTpl'); + $(tpl).appendTo(bodyEl); + var tableEl = bodyEl.find('table'), + tbodyEl = bodyEl.find('tbody'); + //headerRowEl = _self._createHeaderRow(); + + _self.set('tableEl',tableEl); + _self.set('tbodyEl',tbodyEl); + //_self.set('headerRowEl', headerRowEl); + _self.set('itemContainer',tbodyEl); + _self._setTableCls(_self.get('tableCls')); + }, + //\u8bbe\u7f6etable\u4e0a\u7684\u6837\u5f0f + _uiSetTableCls : function(v){ + this._setTableCls(v); + }, + //when set grid's height,the scroll can effect the width of its body and header + _uiSetHeight:function (h) { + var _self = this, + bodyEl = _self.get('bodyEl'); + _self.get('el').height(h); + _self.get('el').addClass(CLS_GRID_HEIGHT); + + }, + _uiSetWidth:function (w) { + var _self = this; + _self.get('el').width(w); + _self.setBodyWidth(_self._getInnerWidth(w)); + _self.get('el').addClass(CLS_GRID_WITH); + + }, + _uiSetStripeRows : function(v){ + var _self = this, + method = v ? 'addClass' : 'removeClass'; + _self.get('el')[method](CLS_GRID_STRIPE); + }, + _setTableCls : function(cls){ + var _self = this, + tableEl = _self.get('tableEl'); + tableEl.attr('class',cls); + } + },{ + ATTRS : { + tableCls : {}, + bodyEl : {}, + tbodyEl : {}, + headerRowEl:{}, + tableEl : {}, + emptyEl : {} + } + },{ + xclass : 'grid-view' + }); + + /** + * @class BUI.Grid.Grid + * + * \u8868\u683c\u63a7\u4ef6,\u8868\u683c\u63a7\u4ef6\u7c7b\u56fe\uff0c\u4e00\u822c\u60c5\u51b5\u4e0b\u914d\u5408{@link BUI.Data.Store} \u4e00\u8d77\u4f7f\u7528 + *

                + * + *

                + *

                \u8868\u683c\u63d2\u4ef6\u7684\u7c7b\u56fe\uff1a

                + *

                + * + *

                + * + *
                
                +   *  BUI.use(['bui/grid','bui/data'],function(Grid,Data){
                +   *    var Grid = Grid,
                +   *      Store = Data.Store,
                +   *      columns = [{  //\u58f0\u660e\u5217\u6a21\u578b
                +   *          title : '\u8868\u59341(20%)',
                +   *          dataIndex :'a',
                +   *          width:'20%'
                +   *        },{
                +   *          id: '123',
                +   *          title : '\u8868\u59342(30%)',
                +   *          dataIndex :'b',
                +   *          width:'30%'
                +   *        },{
                +   *          title : '\u8868\u59343(50%)',
                +   *          dataIndex : 'c',
                +   *          width:'50%'
                +   *      }],
                +   *      data = [{a:'123'},{a:'cdd',b:'edd'},{a:'1333',c:'eee',d:2}]; //\u663e\u793a\u7684\u6570\u636e
                +   *
                +   *    var store = new Store({
                +   *        data : data,
                +   *        autoLoad:true
                +   *      }),
                +   *       grid = new Grid.Grid({
                +   *         render:'#grid',
                +   *         width:'100%',//\u8fd9\u4e2a\u5c5e\u6027\u4e00\u5b9a\u8981\u8bbe\u7f6e
                +   *         columns : columns,
                +   *         idField : 'a',
                +   *         store : store
                +   *       });
                +   *
                +   *     grid.render();
                +   *   });
                +   * 
                + * @extends BUI.List.SimpleList + */ + var grid = List.SimpleList.extend({ + + /** + * \u521d\u59cb\u5316\uff0c\u5982\u679c\u672a\u8bbe\u7f6e\u5bbd\u5ea6\uff0c\u5219\u4f7f\u7528\u8868\u683c\u5bb9\u5668\u7684\u5bbd\u5ea6 + * @protected + * @ignore + */ + initializer : function(){ + var _self = this, + render = _self.get('render'), + width = _self.get('width'); + if(!width){ + _self.set('width',$(render).width()); + } + }, + /** + * @protected + * @ignore + */ + createDom:function () { + var _self = this; + + // \u63d0\u524d,\u4e2d\u9014\u8bbe\u7f6e\u5bbd\u5ea6\u65f6\u4f1a\u5931\u8d25\uff01\uff01 + if (_self.get('width')) { + _self.get('el').addClass(CLS_GRID_WITH); + } + + if (_self.get('height')) { + _self.get('el').addClass(CLS_GRID_HEIGHT); + } + + //\u56e0\u4e3a\u5185\u90e8\u7684\u8fb9\u8ddd\u5f71\u54cdheader\u7684forceFit\u8ba1\u7b97\uff0c\u6240\u4ee5\u5fc5\u987b\u5728header\u8ba1\u7b97forceFit\u524d\u7f6e\u6b64\u9879 + if(_self.get('innerBorder')){ + _self.get('el').addClass(CLS_GRID_BORDER); + } + }, + /** + * @protected + * @ignore + */ + renderUI : function(){ + var _self = this; + _self._initHeader(); + _self._initBars(); + _self._initLoadMask(); + _self.get('view').resetHeaderRow(); + }, + /** + * @private + */ + bindUI:function () { + var _self = this; + _self._bindHeaderEvent(); + _self._bindBodyEvent(); + _self._bindItemsEvent(); + }, + /** + * \u6dfb\u52a0\u5217 + *
                
                +     *   //\u6dfb\u52a0\u5230\u6700\u540e
                +     *   grid.addColumn({title : 'new column',dataIndex : 'new',width:100});
                +     *   //\u6dfb\u52a0\u5230\u6700\u524d
                +     *   grid.addColumn({title : 'new column',dataIndex : 'new',width:100},0);
                +     * 
                + * @param {Object|BUI.Grid.Column} column \u5217\u7684\u914d\u7f6e\uff0c\u5217\u7c7b\u7684\u5b9a\u4e49 {@link BUI.Grid.Column} + * @param {Number} index \u6dfb\u52a0\u5230\u7684\u4f4d\u7f6e + * @return {BUI.Grid.Column} + */ + addColumn : function(column, index){ + var _self = this, + header = _self.get('header'); + + if(header){ + column = header.addColumn(column, index); + }else{ + column = new Column(column); + _self.get('columns').splice(index,0,column); + } + return column; + }, + /** + * \u6e05\u9664\u663e\u793a\u7684\u6570\u636e + *
                
                +     *   grid.clearData();
                +     * 
                + */ + clearData : function(){ + this.clearItems(); + }, + /** + * \u5f53\u524d\u663e\u793a\u5728\u8868\u683c\u4e2d\u7684\u6570\u636e + * @return {Array} \u7eaa\u5f55\u96c6\u5408 + * @private + */ + getRecords : function(){ + return this.getItems(); + }, + /** + * \u4f7f\u7528\u7d22\u5f15\u6216\u8005id\u67e5\u627e\u5217 + *
                
                +     *  //\u8bbe\u7f6e\u5217\u7684id,\u5426\u5219\u4f1a\u81ea\u52a8\u751f\u6210
                +     *  {id : '1',title : '\u8868\u5934',dataIndex : 'a'}
                +     *  //\u83b7\u53d6\u5217
                +     *  var column = grid.findColumn('id');
                +     *  //\u64cd\u4f5c\u5217
                +     *  column.set('visible',false);
                +     * 
                + * @param {String|Number} id|index \u6587\u672c\u503c\u4ee3\u8868\u7f16\u53f7\uff0c\u6570\u5b57\u4ee3\u8868\u7d22\u5f15 + */ + findColumn : function(id){ + var _self = this, + header = _self.get('header'); + if(BUI.isNumber(id)){ + return header.getColumnByIndex(id); + }else{ + return header.getColumnById(id); + } + }, + /** + * \u4f7f\u7528\u5b57\u6bb5\u540d\u67e5\u627e\u5217 + *
                
                +     * //\u8bbe\u7f6e\u5217dataIndex
                +     *  {id : '1',title : '\u8868\u5934',dataIndex : 'a'}
                +     *  //\u83b7\u53d6\u5217
                +     *  var column = grid.findColumnByField('a');
                +     *  //\u64cd\u4f5c\u5217
                +     *  column.set('visible',false);
                +     * 
                + * @param {String} field \u5217\u7684\u5b57\u6bb5\u540d dataIndex + */ + findColumnByField : function(field){ + var _self = this, + header = _self.get('header'); + return header.getColumn(function(column){ + return column.get('dataIndex') === field; + }); + }, + /** + * \u6839\u636e\u5217\u7684Id\u67e5\u627e\u5bf9\u5e94\u7684\u5355\u5143\u683c + * @param {String|Number} id \u5217id + * @param {Object|jQuery} record \u672c\u884c\u5bf9\u5e94\u7684\u8bb0\u5f55\uff0c\u6216\u8005\u662f\u672c\u884c\u7684\uff24\uff2f\uff2d\u5bf9\u8c61 + * @protected + * @return {jQuery} + */ + findCell:function (id, record) { + var _self = this, + rowEl = null; + if (record instanceof $) { + rowEl = record; + } else { + rowEl = _self.findRow(record); + } + if (rowEl) { + return _self.get('view').findCell(id, rowEl); + } + return null; + }, + /** + * find the dom by the record in this component + * @param {Object} record the record used to find row dom + * @protected + * @return jQuery + */ + findRow:function (record) { + var _self = this; + return _self.get('view').findRow(record); + }, + /** + * \u79fb\u9664\u5217 + *
                
                +     *   var column = grid.findColumn('id');
                +     *   grid.removeColumn(column);
                +     * 
                + * @param {BUI.Grid.Column} column \u8981\u79fb\u9664\u7684\u5217 + */ + removeColumn:function (column) { + var _self = this; + _self.get('header').removeColumn(column); + }, + /** + * \u663e\u793a\u6570\u636e,\u5f53\u4e0d\u4f7f\u7528store\u65f6\uff0c\u53ef\u4ee5\u5355\u72ec\u663e\u793a\u6570\u636e + *
                
                +     *   var data = [{},{}];
                +     *   grid.showData(data);
                +     * 
                + * @param {Array} data \u663e\u793a\u7684\u6570\u636e\u96c6\u5408 + */ + showData : function(data){ + var _self = this; + _self.set('items',data); + }, + /** + * \u91cd\u7f6e\u5217\uff0c\u5f53\u5217\u53d1\u751f\u6539\u53d8\u65f6\u540c\u6b65DOM\u548c\u6570\u636e + * @protected + */ + resetColumns:function () { + var _self = this, + store = _self.get('store'); + //recreate the header row + _self.get('view').resetHeaderRow(); + //show data + if (store) { + _self.onLoad(); + } + }, + //when body scrolled,the other component of grid also scrolled + _bindScrollEvent:function () { + var _self = this, + el = _self.get('el'), + bodyEl = el.find('.' + CLS_GRID_BODY), + header = _self.get('header'); + + bodyEl.on('scroll', function () { + var left = bodyEl.scrollLeft(), + top = bodyEl.scrollTop(); + header.scrollTo({left:left, top:top}); + _self.fire('scroll', {scrollLeft:left, scrollTop:top,bodyWidth : bodyEl.width(),bodyHeight : bodyEl.height()}); + }); + }, + //bind header event,when column changed,followed this component + _bindHeaderEvent:function () { + var _self = this, + header = _self.get('header'), + view = _self.get('view'), + store = _self.get('store'); + header.on('afterWidthChange', function (e) { + var sender = e.target; + if (sender !== header) { + view.resetColumnsWidth(sender); + } + }); + + header.on('afterSortStateChange', function (e) { + var column = e.target, + val = e.newVal; + if (val && store) { + store.sort(column.get('dataIndex'), column.get('sortState')); + } + }); + + header.on('afterVisibleChange', function (e) { + var sender = e.target; + if (sender !== header) { + view.setColumnVisible(sender); + _self.fire('columnvisiblechange',{column:sender}); + } + }); + + header.on('click', function (e) { + var sender = e.target; + if (sender !== header) { + _self.fire('columnclick',{column:sender,domTarget:e.domTarget}); + } + }); + + header.on('forceFitWidth', function () { + if (_self.get('rendered')) { + _self.resetColumns(); + } + }); + + header.on('add', function (e) { + if (_self.get('rendered')) { + _self.fire('columnadd',{column:e.column,index:e.index}); + _self.resetColumns(); + } + }); + + header.on('remove', function (e) { + if (_self.get('rendered')) { + _self.resetColumns(); + _self.fire('columnremoved',{column:e.column,index:e.index}); + } + }); + + }, + //when body scrolled, header can followed + _bindBodyEvent:function () { + var _self = this; + _self._bindScrollEvent(); + }, + //\u7ed1\u5b9a\u8bb0\u5f55DOM\u76f8\u5173\u7684\u4e8b\u4ef6 + _bindItemsEvent : function(){ + var _self = this, + store = _self.get('store'); + + _self.on('itemsshow',function(){ + _self.fire('aftershow'); + + if(_self.get('emptyDataTpl')){ + if(store && store.getCount() == 0){ + _self.get('view').showEmptyText(); + }else{ + _self.get('view').clearEmptyText(); + } + } + }); + + _self.on('itemsclear',function(){ + _self.fire('clear'); + }); + + _self.on('itemclick',function(ev){ + var target = ev.domTarget, + record = ev.item, + cell = $(target).closest('.' + CLS_GRID_CELL), + rowEl = $(target).closest('.' + CLS_GRID_ROW), + rst; //\u7528\u4e8e\u662f\u5426\u963b\u6b62\u4e8b\u4ef6\u89e6\u53d1 + + if(cell.length){ + rst = _self.fire('cellclick', {record:record, row:rowEl[0], cell:cell[0], field:cell.attr(ATTR_COLUMN_FIELD), domTarget:target,domEvent:ev.domEvent}); + } + + if(rst === false){ + return rst; + } + + return _self.fire('rowclick', {record:record, row:rowEl[0], domTarget:target}); + + }); + + _self.on('itemunselected',function(ev){ + _self.fire('rowunselected',getEventObj(ev)); + }); + + _self.on('itemselected',function(ev){ + _self.fire('rowselected',getEventObj(ev)); + }); + + _self.on('itemrendered',function(ev){ + _self.fire('rowcreated',getEventObj(ev)); + }); + + _self.on('itemremoved',function(ev){ + _self.fire('rowremoved',getEventObj(ev)); + }); + + _self.on('itemupdated',function(ev){ + _self.fire('rowupdated',getEventObj(ev)); + }); + + function getEventObj(ev){ + return {record : ev.item, row : ev.domTarget, domTarget : ev.domTarget}; + } + }, + //\u83b7\u53d6\u8868\u683c\u5185\u90e8\u7684\u5bbd\u5ea6\uff0c\u53d7\u8fb9\u6846\u7684\u5f71\u54cd\uff0c + //\u5185\u90e8\u7684\u5bbd\u5ea6\u4e0d\u80fd\u7b49\u4e8e\u8868\u683c\u5bbd\u5ea6 + _getInnerWidth : function(width){ + width = width || this.get('width'); + return getInnerWidth(width); + }, + //init header,if there is not a header property in config,instance it + _initHeader:function () { + var _self = this, + header = _self.get('header'), + container = _self.get('el').find('.'+ CLS_GRID_HEADER_CONTAINER); + if (!header) { + header = new Header({ + columns:_self.get('columns'), + tableCls:_self.get('tableCls'), + forceFit:_self.get('forceFit'), + width:_self._getInnerWidth(), + render: container, + parent : _self + }).render(); + //_self.addChild(header); + _self.set('header', header); + } + }, + //\u521d\u59cb\u5316 \u4e0a\u4e0b\u5de5\u5177\u680f + _initBars:function () { + var _self = this, + bbar = _self.get('bbar'), + tbar = _self.get('tbar'); + _self._initBar(bbar, CLS_GRID_BBAR, 'bbar'); + _self._initBar(tbar, CLS_GRID_TBAR, 'tbar'); + }, + //set bar's elCls to identify top bar or bottom bar + _initBar:function (bar, cls, name) { + var _self = this, + store = null, + pagingBarCfg = null; + if (bar) { + //\u672a\u6307\u5b9axclass,\u540c\u65f6\u4e0d\u662fController\u65f6 + if(!bar.xclass && !(bar instanceof Component.Controller)){ + bar.xclass = 'bar'; + bar.children = bar.children || []; + + if(bar.items){ + bar.children.push({ + xclass : 'bar', + defaultChildClass : "bar-item-button", + elCls : CLS_BUTTON_BAR, + children : bar.items + }); + bar.items=null; + } + + // modify by fuzheng + if(bar.pagingBar){ + store = _self.get('store'); + pagingBarCfg = { + xclass : 'pagingbar', + store : store, + pageSize : store.pageSize + }; + if(bar.pagingBar !== true){ + pagingBarCfg = S.merge(pagingBarCfg, bar.pagingBar); + } + bar.children.push(pagingBarCfg); + } + } + if (bar.xclass) { + var barContainer = _self.get('el').find('.' + cls); + barContainer.show(); + bar.render = barContainer; + //bar.parent=_self; + bar.elTagName = 'div'; + bar.autoRender = true; + bar = _self.addChild(bar); //Component.create(bar).create(); + } + _self.set(name, bar); + } + return bar; + }, + //when set 'loadMask = true' ,create a loadMask instance + _initLoadMask:function () { + var _self = this, + loadMask = _self.get('loadMask'); + if (loadMask && !loadMask.show) { + loadMask = new BUI.Mask.LoadMask({el:_self.get('el')}); + _self.set('loadMask', loadMask); + } + }, + //\u8c03\u6574\u5bbd\u5ea6\u65f6\uff0c\u8c03\u6574\u5185\u90e8\u63a7\u4ef6\u5bbd\u5ea6 + _uiSetWidth:function (w) { + var _self = this; + if (_self.get('rendered')) { + if(!isPercent(w)){ + _self.get('header').set('width', _self._getInnerWidth(w)); + }else{ + _self.get('header').set('width','100%'); + } + + } + _self.get('view').setTableWidth(); + }, + //\u8bbe\u7f6e\u81ea\u9002\u5e94\u5bbd\u5ea6 + _uiSetForceFit:function (v) { + var _self = this; + _self.get('header').set('forceFit', v); + }, + //when set grid's height,the scroll can effect the width of its body and header + _uiSetHeight:function (h,obj) { + var _self = this, + header = _self.get('header'); + _self.get('view').setBodyHeight(h); + if (_self.get('rendered')) { + if (_self.get('forceFit') && !obj.prevVal) { + header.forceFitColumns(); + //\u5f3a\u8feb\u5bf9\u9f50\u65f6\uff0c\u7531\u672a\u8bbe\u7f6e\u9ad8\u5ea6\u6539\u6210\u8bbe\u7f6e\u9ad8\u5ea6\uff0c\u589e\u52a0\u4e8617\u50cf\u7d20\u7684\u6eda\u52a8\u6761\u5bbd\u5ea6\uff0c\u6240\u4ee5\u91cd\u7f6e\u8868\u683c\u5bbd\u5ea6 + _self.get('view').setTableWidth(); + } + header.setTableWidth(); + } + + } + },{ + ATTRS : { + /** + * \u8868\u5934\u5bf9\u8c61 + * @type {BUI.Grid.Header} + * @protected + */ + header:{ + + }, + /** + * @see {BUI.Grid.Grid#tbar} + *
                
                +       * grid = new Grid.Grid({
                +       *    render:'#grid',
                +       *    columns : columns,
                +       *    width : 700,
                +       *    forceFit : true,
                +       *    tbar:{ //\u6dfb\u52a0\u3001\u5220\u9664
                +       *        items : [{
                +       *          btnCls : 'button button-small',
                +       *          text : '\u6dfb\u52a0',
                +       *          listeners : {
                +       *            'click' : addFunction
                +       *          }
                +       *        },
                +       *        {
                +       *          btnCls : 'button button-small',
                +       *          text : '\u5220\u9664',
                +       *          listeners : {
                +       *            'click' : delFunction
                +       *          }
                +       *        }]
                +       *    },
                +       *    store : store
                +       *  });
                +       *
                +       * grid.render();
                +       * 
                + * @cfg {Object|BUI.Toolbar.Bar} bbar + */ + /** + * @see {BUI.Grid.Grid#tbar} + * @type {Object} + * @ignore + */ + bbar:{ + + }, + itemCls : { + value : CLS_GRID_ROW + }, + /** + * \u5217\u7684\u914d\u7f6e \u7528\u6765\u914d\u7f6e \u8868\u5934 \u548c \u8868\u5185\u5bb9\u3002{@link BUI.Grid.Column} + * @cfg {Array} columns + */ + columns:{ + view : true, + value:[] + }, + /** + * \u5f3a\u8feb\u5217\u81ea\u9002\u5e94\u5bbd\u5ea6\uff0c\u5982\u679c\u5217\u5bbd\u5ea6\u5927\u4e8eGrid\u6574\u4f53\u5bbd\u5ea6\uff0c\u7b49\u6bd4\u4f8b\u7f29\u51cf\uff0c\u5426\u5219\u7b49\u6bd4\u4f8b\u589e\u52a0 + *
                
                +       *  var grid = new Grid.Grid({
                +       *    render:'#grid',
                +       *    columns : columns,
                +       *    width : 700,
                +       *    forceFit : true, //\u81ea\u9002\u5e94\u5bbd\u5ea6
                +       *    store : store
                +       *  });
                +       * 
                + * @cfg {Boolean} [forceFit= false] + */ + /** + * \u5f3a\u8feb\u5217\u81ea\u9002\u5e94\u5bbd\u5ea6\uff0c\u5982\u679c\u5217\u5bbd\u5ea6\u5927\u4e8eGrid\u6574\u4f53\u5bbd\u5ea6\uff0c\u7b49\u6bd4\u4f8b\u7f29\u51cf\uff0c\u5426\u5219\u7b49\u6bd4\u4f8b\u589e\u52a0 + *
                
                +       *  grid.set('forceFit',true);
                +       * 
                + * @type {Boolean} + * @default 'false' + */ + forceFit:{ + sync:false, + value:false + }, + /** + * \u6570\u636e\u4e3a\u7a7a\u65f6\uff0c\u663e\u793a\u7684\u63d0\u793a\u5185\u5bb9 + *
                
                +       *  var grid = new Grid({
                +       *   render:'#J_Grid4',
                +       *   columns : columns,
                +       *   store : store,
                +       *   emptyDataTpl : '<div class="centered"><img alt="Crying" src="http://img03.taobaocdn.com/tps/i3/T1amCdXhXqXXXXXXXX-60-67.png"><h2>\u67e5\u8be2\u7684\u6570\u636e\u4e0d\u5b58\u5728</h2></div>',
                +       *   width:'100%'
                +       *
                +       * });
                +       * 
                +       * grid.render();
                +       * 
                + ** @cfg {Object} emptyDataTpl + */ + emptyDataTpl : { + view : true + }, + /** + * \u8868\u683c\u9996\u884c\u8bb0\u5f55\u6a21\u677f\uff0c\u9996\u884c\u8bb0\u5f55\uff0c\u9690\u85cf\u663e\u793a\uff0c\u7528\u4e8e\u786e\u5b9a\u8868\u683c\u5404\u5217\u7684\u5bbd\u5ea6 + * @type {String} + * @protected + */ + headerRowTpl:{ + view:true, + value:'{cellsTpl}' + }, + /** + * \u8868\u683c\u9996\u884c\u8bb0\u5f55\u7684\u5355\u5143\u683c\u6a21\u677f + * @protected + * @type {String} + */ + headerCellTpl:{ + view:true, + value:'' + }, + /** + * \u8868\u683c\u6570\u636e\u884c\u7684\u6a21\u677f + * @type {String} + * @default
                '<tr class="' + CLS_GRID_ROW + ' {{oddCls}}">{{cellsTpl}}</tr>'
                + */ + rowTpl:{ + view:true, + value:'{cellsTpl}' + }, + /** + * \u5355\u5143\u683c\u7684\u6a21\u677f + * @type {String} + *
                +       *     '<td  class="' + CLS_GRID_CELL + ' grid-td-{{id}}" data-column-id="{{id}}" data-column-field = {{dataIndex}}>'+
                +       *        '<div class="' + CLS_GRID_CELL_INNER + '" >{{cellText}}</div>'+
                +       *    '</td>'
                +       *
                + */ + cellTpl:{ + view:true, + value:'' + + '
                {cellText}
                ' + + '' + + }, + /** + * \u5355\u5143\u683c\u6587\u672c\u7684\u6a21\u677f + * @default <span class="' + CLS_CELL_TEXT + ' " title = "{{tips}}">{{text}}</span> + * @type {String} + */ + cellTextTpl:{ + view:true, + value:'{text}' + }, + /** + * \u4e8b\u4ef6\u96c6\u5408 + * @type {Object} + */ + events:{ + value:{ + /** + * \u663e\u793a\u5b8c\u6570\u636e\u89e6\u53d1 + * @event + */ + 'aftershow' : false, + /** + * \u8868\u683c\u7684\u6570\u636e\u6e05\u7406\u5b8c\u6210\u540e + * @event + */ + 'clear' : false, + /** + * \u70b9\u51fb\u5355\u5143\u683c\u65f6\u89e6\u53d1,\u5982\u679creturn false,\u5219\u4f1a\u963b\u6b62 'rowclick' ,'rowselected','rowunselected'\u4e8b\u4ef6 + * @event + * @param {jQuery.Event} e \u4e8b\u4ef6\u5bf9\u8c61 + * @param {Object} e.record \u6b64\u884c\u7684\u8bb0\u5f55 + * @param {String} e.field \u70b9\u51fb\u5355\u5143\u683c\u5217\u5bf9\u5e94\u7684\u5b57\u6bb5\u540d\u79f0 + * @param {HTMLElement} e.row \u70b9\u51fb\u884c\u5bf9\u5e94\u7684DOM + * @param {HTMLElement} e.cell \u70b9\u51fb\u5bf9\u5e94\u7684\u5355\u5143\u683c\u7684DOM + * @param {HTMLElement} e.domTarget \u70b9\u51fb\u7684DOM + * @param {jQuery.Event} e.domEvent \u70b9\u51fb\u7684jQuery\u4e8b\u4ef6 + */ + 'cellclick' : false, + /** + * \u70b9\u51fb\u8868\u5934 + * @event + * @param {jQuery.Event} e \u4e8b\u4ef6\u5bf9\u8c61 + * @param {BUI.Grid.Column} e.column \u5217\u5bf9\u8c61 + * @param {HTMLElement} e.domTarget \u70b9\u51fb\u7684DOM + */ + 'columnclick' : false, + /** + * \u70b9\u51fb\u884c\u65f6\u89e6\u53d1\uff0c\u5982\u679creturn false,\u5219\u4f1a\u963b\u6b62'rowselected','rowunselected'\u4e8b\u4ef6 + * @event + * @param {jQuery.Event} e \u4e8b\u4ef6\u5bf9\u8c61 + * @param {Object} e.record \u6b64\u884c\u7684\u8bb0\u5f55 + * @param {HTMLElement} e.row \u70b9\u51fb\u884c\u5bf9\u5e94\u7684DOM + * @param {HTMLElement} e.domTarget \u70b9\u51fb\u7684DOM + */ + 'rowclick' : false, + /** + * \u5f53\u4e00\u884c\u6570\u636e\u663e\u793a\u5728\u8868\u683c\u4e2d\u540e\u89e6\u53d1 + * @event + * @param {jQuery.Event} e \u4e8b\u4ef6\u5bf9\u8c61 + * @param {Object} e.record \u6b64\u884c\u7684\u8bb0\u5f55 + * @param {HTMLElement} e.row \u884c\u5bf9\u5e94\u7684DOM + * @param {HTMLElement} e.domTarget \u6b64\u4e8b\u4ef6\u4e2d\u7b49\u4e8e\u884c\u5bf9\u5e94\u7684DOM + */ + 'rowcreated' : false, + /** + * \u79fb\u9664\u4e00\u884c\u7684DOM\u540e\u89e6\u53d1 + * @event + * @param {jQuery.Event} e \u4e8b\u4ef6\u5bf9\u8c61 + * @param {Object} e.record \u6b64\u884c\u7684\u8bb0\u5f55 + * @param {HTMLElement} e.row \u884c\u5bf9\u5e94\u7684DOM + * @param {HTMLElement} e.domTarget \u6b64\u4e8b\u4ef6\u4e2d\u7b49\u4e8e\u884c\u5bf9\u5e94\u7684DOM + */ + 'rowremoved' : false, + /** + * \u9009\u4e2d\u4e00\u884c\u65f6\u89e6\u53d1 + * @event + * @param {jQuery.Event} e \u4e8b\u4ef6\u5bf9\u8c61 + * @param {Object} e.record \u6b64\u884c\u7684\u8bb0\u5f55 + * @param {HTMLElement} e.row \u884c\u5bf9\u5e94\u7684DOM + * @param {HTMLElement} e.domTarget \u6b64\u4e8b\u4ef6\u4e2d\u7b49\u4e8e\u884c\u5bf9\u5e94\u7684DOM + */ + 'rowselected' : false, + /** + * \u6e05\u9664\u9009\u4e2d\u4e00\u884c\u65f6\u89e6\u53d1\uff0c\u53ea\u6709\u591a\u9009\u60c5\u51b5\u4e0b\u89e6\u53d1 + * @event + * @param {jQuery.Event} e \u4e8b\u4ef6\u5bf9\u8c61 + * @param {Object} e.record \u6b64\u884c\u7684\u8bb0\u5f55 + * @param {HTMLElement} e.row \u884c\u5bf9\u5e94\u7684DOM + * @param {HTMLElement} e.domTarget \u6b64\u4e8b\u4ef6\u4e2d\u7b49\u4e8e\u884c\u5bf9\u5e94\u7684DOM + */ + 'rowunselected' : false, + /** + * \u8868\u683c\u5185\u90e8\u53d1\u751f\u6eda\u52a8\u65f6\u89e6\u53d1 + * @event + * @param {jQuery.Event} e \u4e8b\u4ef6\u5bf9\u8c61 + * @param {Number} e.scrollLeft \u6eda\u52a8\u5230\u7684\u6a2a\u5750\u6807 + * @param {Number} e.scrollTop \u6eda\u52a8\u5230\u7684\u7eb5\u5750\u6807 + * @param {Number} e.bodyWidth \u8868\u683c\u5185\u90e8\u7684\u5bbd\u5ea6 + * @param {Number} e.bodyHeight \u8868\u683c\u5185\u90e8\u7684\u9ad8\u5ea6 + */ + 'scroll' : false + } + }, + /** + * \u662f\u5426\u5947\u5076\u884c\u6dfb\u52a0\u5206\u5272\u8272 + * @type {Boolean} + * @default true + */ + stripeRows:{ + view:true, + value:true + }, + /** + * \u9876\u5c42\u7684\u5de5\u5177\u680f\uff0c\u8ddfbbar\u7ed3\u6784\u4e00\u81f4,\u53ef\u4ee5\u662f\u5de5\u5177\u680f\u5bf9\u8c61@see {BUI.Toolbar.Bar},\u4e5f\u53ef\u4ee5\u662fxclass\u5f62\u5f0f\u7684\u914d\u7f6e\u9879\uff0c + * \u8fd8\u53ef\u4ee5\u662f\u5305\u542b\u4ee5\u4e0b\u5b57\u6bb5\u7684\u914d\u7f6e\u9879 + *
                  + *
                1. items:\u5de5\u5177\u680f\u7684\u9879\uff0c + * - \u9ed8\u8ba4\u662f\u6309\u94ae(xtype : button)\u3001 + * - \u6587\u672c(xtype : text)\u3001 + * - \u94fe\u63a5(xtype : link)\u3001 + * - \u5206\u9694\u7b26(bar-item-separator)\u4ee5\u53ca\u81ea\u5b9a\u4e49\u9879 + *
                2. + *
                3. pagingBar:\u8868\u660e\u5305\u542b\u5206\u9875\u680f
                4. + *
                + * @type {Object|BUI.Toolbar.Bar} + * @example + * tbar:{ + * items:[ + * { + * text:'\u547d\u4ee4\u4e00' //\u9ed8\u8ba4\u662f\u6309\u94ae + * + * }, + * { + * xtype:'text', + * text:'\u6587\u672c' + * } + * ], + * pagingBar:true + * } + */ + tbar:{ + + }, + /** + * \u53ef\u4ee5\u9644\u52a0\u5230\u8868\u683c\u4e0a\u7684\u6837\u5f0f. + * @cfg {String} tableCls + * @default 'bui-grid-table' this css cannot be overridden + */ + tableCls:{ + view : true, + sync : false, + value:PREFIX + 'grid-table' + }, + /** + * \u8868\u4f53\u7684\u6a21\u677f + * @protected + * @type {String} + */ + tableTpl : { + view:true, + value:'' + + '' + + '
                ' + }, + tpl : { + value : '
                ' + }, + /** + * \u5355\u5143\u683c\u5de6\u53f3\u4e4b\u95f4\u662f\u5426\u51fa\u73b0\u8fb9\u6846 + * + * @cfg {Boolean} [innerBorder=true] + */ + /** + * \u5355\u5143\u683c\u5de6\u53f3\u4e4b\u95f4\u662f\u5426\u51fa\u73b0\u8fb9\u6846 + *
                
                +       *   var  grid = new Grid.Grid({
                +       *     render:'#grid',
                +       *     innerBorder: false, // \u9ed8\u8ba4\u4e3atrue
                +       *     columns : columns,
                +       *     store : store
                +       *   });
                +       * 
                + * @type {Boolean} + * @default true + */ + innerBorder : { + sync:false, + value : true + }, + /** + * \u662f\u5426\u4f7f\u7528\u7a7a\u767d\u5355\u5143\u683c\u7528\u4e8e\u5360\u4f4d\uff0c\u4f7f\u5217\u5bbd\u7b49\u4e8e\u8bbe\u7f6e\u7684\u5bbd\u5ea6 + * @type {Boolean} + * @private + */ + useEmptyCell : { + view : true, + value : true + }, + /** + * \u662f\u5426\u9996\u884c\u4f7f\u7528\u7a7a\u767d\u884c\uff0c\u7528\u4ee5\u786e\u5b9a\u8868\u683c\u5217\u7684\u5bbd\u5ea6 + * @type {Boolean} + * @private + */ + useHeaderRow : { + view : true, + value : true + }, + /** + * Grid \u7684\u89c6\u56fe\u7c7b\u578b + * @type {BUI.Grid.GridView} + */ + xview : { + value : gridView + } + } + },{ + xclass : 'grid' + }); + + return grid; +}); + +/** + * @ignore + * 2013.1.18 + * \u8fd9\u662f\u4e00\u4e2a\u91cd\u6784\u7684\u7248\u672c\uff0c\u5c06Body\u53d6\u6d88\u6389\u4e86\uff0c\u76ee\u7684\u662f\u4e3a\u4e86\u53ef\u4ee5\u5c06Grid\u548cSimpleGrid\u8054\u7cfb\u8d77\u6765\uff0c + * \u540c\u65f6\u5c06selection \u7edf\u4e00 + *//** + * @fileOverview this class details some util tools of grid,like loadMask, formatter for grid's cell render + * @author dxq613@gmail.com, yiminghe@gmail.com + * @ignore + */ +define('bui/grid/format',function (require) { + + function formatTimeUnit(v) { + if (v < 10) { + return '0' + v; + } + return v; + } + + /** + * This class specifies some formatter for grid's cell renderer + * @class BUI.Grid.Format + * @singleton + */ + var Format = + /** + * @lends BUI.Grid.Format + * @ignore + */ + { + /** + * \u65e5\u671f\u683c\u5f0f\u5316\u51fd\u6570 + * @param {Number|Date} d \u683c\u5f0f\u8bdd\u7684\u65e5\u671f\uff0c\u4e00\u822c\u4e3a1970 \u5e74 1 \u6708 1 \u65e5\u81f3\u4eca\u7684\u6beb\u79d2\u6570 + * @return {String} \u683c\u5f0f\u5316\u540e\u7684\u65e5\u671f\u683c\u5f0f\u4e3a 2011-10-31 + * @example + * \u4e00\u822c\u7528\u6cd5\uff1a
                + * BUI.Grid.Format.dateRenderer(1320049890544);\u8f93\u51fa\uff1a2011-10-31
                + * \u8868\u683c\u4e2d\u7528\u4e8e\u6e32\u67d3\u5217\uff1a
                + * {title:"\u51fa\u5e93\u65e5\u671f",dataIndex:"date",renderer:BUI.Grid.Format.dateRenderer} + */ + dateRenderer:function (d) { + if (!d) { + return ''; + } + if (BUI.isString(d)) { + return d; + } + var date = null; + try { + date = new Date(d); + } catch (e) { + return ''; + } + if (!date || !date.getFullYear) { + return ''; + } + return date.getFullYear() + '-' + formatTimeUnit(date.getMonth() + 1) + '-' + formatTimeUnit(date.getDate()); + }, + /** + * @description \u65e5\u671f\u65f6\u95f4\u683c\u5f0f\u5316\u51fd\u6570 + * @param {Number|Date} d \u683c\u5f0f\u8bdd\u7684\u65e5\u671f\uff0c\u4e00\u822c\u4e3a1970 \u5e74 1 \u6708 1 \u65e5\u81f3\u4eca\u7684\u6beb\u79d2\u6570 + * @return {String} \u683c\u5f0f\u5316\u540e\u7684\u65e5\u671f\u683c\u5f0f\u65f6\u95f4\u4e3a 2011-10-31 16 : 41 : 02 + */ + datetimeRenderer:function (d) { + if (!d) { + return ''; + } + if (BUI.isString(d)) { + return d; + } + var date = null; + try { + date = new Date(d); + } catch (e) { + return ''; + } + if (!date || !date.getFullYear) { + return ''; + } + return date.getFullYear() + '-' + formatTimeUnit(date.getMonth() + 1) + '-' + formatTimeUnit(date.getDate()) + ' ' + formatTimeUnit(date.getHours()) + ':' + formatTimeUnit(date.getMinutes()) + ':' + formatTimeUnit(date.getSeconds()); + }, + /** + * \u6587\u672c\u622a\u53d6\u51fd\u6570\uff0c\u5f53\u6587\u672c\u8d85\u51fa\u4e00\u5b9a\u6570\u5b57\u65f6\uff0c\u4f1a\u622a\u53d6\u6587\u672c\uff0c\u6dfb\u52a0... + * @param {Number} length \u622a\u53d6\u591a\u5c11\u5b57\u7b26 + * @return {Function} \u8fd4\u56de\u5904\u7406\u51fd\u6570 \u8fd4\u56de\u622a\u53d6\u540e\u7684\u5b57\u7b26\u4e32\uff0c\u5982\u679c\u672c\u8eab\u5c0f\u4e8e\u6307\u5b9a\u7684\u6570\u5b57\uff0c\u8fd4\u56de\u539f\u5b57\u7b26\u4e32\u3002\u5982\u679c\u5927\u4e8e\uff0c\u5219\u8fd4\u56de\u622a\u65ad\u540e\u7684\u5b57\u7b26\u4e32\uff0c\u5e76\u9644\u52a0... + */ + cutTextRenderer:function (length) { + return function (value) { + value = value || ''; + if (value.toString().length > length) { + return value.toString().substring(0, length) + '...'; + } + return value; + }; + }, + /** + * \u679a\u4e3e\u683c\u5f0f\u5316\u51fd\u6570 + * @param {Object} enumObj \u952e\u503c\u5bf9\u7684\u679a\u4e3e\u5bf9\u8c61 {"1":"\u5927","2":"\u5c0f"} + * @return {Function} \u8fd4\u56de\u6307\u5b9a\u679a\u4e3e\u7684\u683c\u5f0f\u5316\u51fd\u6570 + * @example + * //Grid \u7684\u5217\u5b9a\u4e49 + * {title:"\u72b6\u6001",dataIndex:"status",renderer:BUI.Grid.Format.enumRenderer({"1":"\u5165\u5e93","2":"\u51fa\u5e93"})} + */ + enumRenderer:function (enumObj) { + return function (value) { + return enumObj[value] || ''; + }; + }, + /* + * \u5c06\u591a\u4e2a\u503c\u8f6c\u6362\u6210\u4e00\u4e2a\u5b57\u7b26\u4e32 + * @param {Object} enumObj \u952e\u503c\u5bf9\u7684\u679a\u4e3e\u5bf9\u8c61 {"1":"\u5927","2":"\u5c0f"} + * @return {Function} \u8fd4\u56de\u6307\u5b9a\u679a\u4e3e\u7684\u683c\u5f0f\u5316\u51fd\u6570 + * @example + * + * //Grid \u7684\u5217\u5b9a\u4e49 + * {title:"\u72b6\u6001",dataIndex:"status",renderer:BUI.Grid.Format.multipleItemsRenderer({"1":"\u5165\u5e93","2":"\u51fa\u5e93","3":"\u9000\u8d27"})} + * //\u6570\u636e\u6e90\u662f[1,2] \u65f6\uff0c\u5219\u8fd4\u56de "\u5165\u5e93,\u51fa\u5e93" + * + */ + multipleItemsRenderer:function (enumObj) { + var enumFun = Format.enumRenderer(enumObj); + return function (values) { + var result = []; + if (!values) { + return ''; + } + if (!BUI.isArray(values)) { + values = values.toString().split(','); + } + $.each(values, function (index,value) { + result.push(enumFun(value)); + }); + + return result.join(','); + }; + }, + /* + * \u5c06\u8d22\u52a1\u6570\u636e\u5206\u8f6c\u6362\u6210\u5143 + * @param {Number|String} enumObj \u952e\u503c\u5bf9\u7684\u679a\u4e3e\u5bf9\u8c61 {"1":"\u5927","2":"\u5c0f"} + * @return {Number} \u8fd4\u56de\u5c06\u5206\u8f6c\u6362\u6210\u5143\u7684\u6570\u5b57 + */ + moneyCentRenderer:function (v) { + if (BUI.isString(v)) { + v = parseFloat(v); + } + if ($.isNumberic(v)) { + return (v * 0.01).toFixed(2); + } + return v; + } + }; + + return Format; +});/** + * @fileOverview \u8868\u683c\u63d2\u4ef6\u7684\u5165\u53e3 + * @author dxq613@gmail.com, yiminghe@gmail.com + * @ignore + */ +;(function(){ +var BASE = 'bui/grid/plugins/'; +define('bui/grid/plugins',['bui/common',BASE + 'selection',BASE + 'cascade',BASE + 'cellediting',BASE + 'rowediting',BASE + 'dialogediting',BASE + 'menu',BASE + 'summary'],function (r) { + var BUI = r('bui/common'), + Selection = r(BASE + 'selection'), + + Plugins = {}; + + BUI.mix(Plugins,{ + CheckSelection : Selection.CheckSelection, + RadioSelection : Selection.RadioSelection, + Cascade : r(BASE + 'cascade'), + CellEditing : r(BASE + 'cellediting'), + RowEditing : r(BASE + 'rowediting'), + DialogEditing : r(BASE + 'dialogediting'), + GridMenu : r(BASE + 'menu'), + Summary : r(BASE + 'summary') + }); + + return Plugins; +}); +})(); +/** + * @fileOverview Grid \u83dc\u5355 + * @ignore + */ +define('bui/grid/plugins/menu',['bui/common','bui/menu'],function (require) { + + var BUI = require('bui/common'), + Menu = require('bui/menu'), + PREFIX = BUI.prefix, + ID_SORT_ASC = 'sort-asc', + ID_SORT_DESC = 'sort-desc', + ID_COLUMNS_SET = 'column-setting', + CLS_COLUMN_CHECKED = 'icon-check'; + + /** + * @class BUI.Grid.Plugins.GridMenu + * @extends BUI.Base + * \u8868\u683c\u83dc\u5355\u63d2\u4ef6 + */ + var gridMenu = function (config) { + gridMenu.superclass.constructor.call(this,config); + }; + + BUI.extend(gridMenu,BUI.Base); + + gridMenu.ATTRS = + { + /** + * \u5f39\u51fa\u83dc\u5355 + * @type {BUI.Menu.ContextMenu} + */ + menu : { + + }, + /** + * @private + */ + activedColumn : { + + }, + triggerCls : { + value : PREFIX + 'grid-hd-menu-trigger' + }, + /** + * \u83dc\u5355\u7684\u914d\u7f6e\u9879 + * @type {Array} + */ + items : { + value : [ + { + id:ID_SORT_ASC, + text:'\u5347\u5e8f', + iconCls:'icon-arrow-up' + }, + { + id:ID_SORT_DESC, + text:'\u964d\u5e8f', + iconCls : 'icon-arrow-down' + }, + { + xclass:'menu-item-sparator' + }, + { + id : ID_COLUMNS_SET, + text:'\u8bbe\u7f6e\u5217', + iconCls:'icon-list-alt' + } + ] + } + }; + + BUI.augment(gridMenu,{ + /** + * \u521d\u59cb\u5316 + * @protected + */ + initializer : function (grid) { + var _self = this; + _self.set('grid',grid); + + }, + /** + * \u6e32\u67d3DOM + */ + renderUI : function(grid){ + var _self = this, + columns = grid.get('columns'); + BUI.each(columns,function(column){ + _self._addShowMenu(column); + }); + }, + /** + * \u7ed1\u5b9a\u8868\u683c + * @protected + */ + bindUI : function (grid){ + var _self = this; + + grid.on('columnadd',function(ev){ + _self._addShowMenu(ev.column); + }); + grid.on('columnclick',function (ev) { + var sender = $(ev.domTarget), + column = ev.column, + menu; + + _self.set('activedColumn',column); + + if(sender.hasClass(_self.get('triggerCls'))){ + menu = _self.get('menu') || _self._initMenu(); + menu.set('align',{ + node: sender, // \u53c2\u8003\u5143\u7d20, falsy \u6216 window \u4e3a\u53ef\u89c6\u533a\u57df, 'trigger' \u4e3a\u89e6\u53d1\u5143\u7d20, \u5176\u4ed6\u4e3a\u6307\u5b9a\u5143\u7d20 + points: ['bl','tl'], // ['tr', 'tl'] \u8868\u793a overlay \u7684 tl \u4e0e\u53c2\u8003\u8282\u70b9\u7684 tr \u5bf9\u9f50 + offset: [0, 0] + }); + menu.show(); + _self._afterShow(column,menu); + } + }); + }, + _addShowMenu : function(column){ + if(!column.get('fixed')){ + column.set('showMenu',true); + } + }, + //\u83dc\u5355\u663e\u793a\u540e + _afterShow : function (column,menu) { + var _self = this, + grid = _self.get('grid'); + + menu = menu || _self.get('menu'); + _self._resetSortMenuItems(column,menu); + _self._resetColumnsVisible(menu); + }, + //\u8bbe\u7f6e\u83dc\u5355\u9879\u662f\u5426\u9009\u4e2d + _resetColumnsVisible : function (menu) { + var _self = this, + settingItem = menu.findItemById(ID_COLUMNS_SET), + subMenu = settingItem.get('subMenu') || _self._initColumnsMenu(settingItem), + columns = _self.get('grid').get('columns'); + subMenu.removeChildren(true); + $.each(columns,function (index,column) { + if(!column.get('fixed')){ + var config = { + xclass : 'context-menu-item', + text : column.get('title'), + column : column, + iconCls : 'icon' + }, + menuItem = subMenu.addChild(config); + if(column.get('visible')){ + menuItem.set('selected',true); + } + } + }); + }, + //\u8bbe\u7f6e\u6392\u5e8f\u83dc\u5355\u9879\u662f\u5426\u53ef\u7528 + _resetSortMenuItems : function(column,menu) { + var ascItem = menu.findItemById(ID_SORT_ASC), + descItem = menu.findItemById(ID_SORT_DESC); + if(column.get('sortable')){ + ascItem.set('disabled',false); + descItem.set('disabled',false); + }else{ + ascItem.set('disabled',true); + descItem.set('disabled',true); + } + }, + //\u521d\u59cb\u5316\u83dc\u5355 + _initMenu : function () { + var _self = this, + menu = _self.get('menu'), + menuItems; + + if(!menu){ + menuItems = _self.get('items'); + $.each(menuItems,function (index,item) { + if(!item.xclass){ + item.xclass = 'context-menu-item' + } + }); + menu = new Menu.ContextMenu({ + children : menuItems, + elCls : 'grid-menu' + }); + _self._initMenuEvent(menu); + _self.set('menu',menu) + } + return menu; + }, + _initMenuEvent : function (menu) { + var _self = this; + + menu.on('itemclick',function(ev) { + var item = ev.item, + id = item.get('id'), + activedColumn = _self.get('activedColumn'); + if(id === ID_SORT_ASC){ + activedColumn.set('sortState','ASC'); + }else if(id === ID_SORT_DESC){ + activedColumn.set('sortState','DESC'); + } + }); + + menu.on('afterVisibleChange',function (ev) { + var visible = ev.newVal, + activedColumn = _self.get('activedColumn'); + if(visible && activedColumn){ + activedColumn.set('open',true); + }else{ + activedColumn.set('open',false); + } + }); + }, + _initColumnsMenu : function (settingItem) { + var subMenu = new Menu.ContextMenu({ + multipleSelect : true, + elCls : 'grid-column-menu' + }); + settingItem.set('subMenu',subMenu); + subMenu.on('itemclick',function (ev) { + var item = ev.item, + column = item.get('column'), + selected = item.get('selected'); + if(selected){ + column.set('visible',true); + }else{ + column.set('visible',false); + } + }); + return subMenu; + }, + destructor:function () { + var _self = this, + menu = _self.get('menu'); + if(menu){ + menu.destroy(); + } + _self.off(); + _self.clearAttrVals(); + } + + }); + + return gridMenu; + +});/** + * @fileOverview \u7ea7\u8054\u8868\u683c + * @ignore + */ + +define('bui/grid/plugins/cascade',['bui/common'],function(require){ + + var BUI = require('bui/common'), + PREFIX = BUI.prefix, + CLS_GRID_CASCADE = '', + DATA_RECORD = 'data-record', + CLS_CASCADE = PREFIX + 'grid-cascade', + CLS_CASCADE_EXPAND = CLS_CASCADE + '-expand', + CLS_CASCADE_ROW = CLS_CASCADE + '-row', + CLS_CASCADE_CELL = CLS_CASCADE + '-cell', + CLS_CASCADE_ROW_COLLAPSE = CLS_CASCADE + '-collapse'; + + /** + * \u7ea7\u8054\u8868\u683c + *
                
                +   *  // \u5b9e\u4f8b\u5316 Grid.Plugins.Cascade \u63d2\u4ef6
                +   *    var cascade = new Grid.Plugins.Cascade({
                +   *      renderer : function(record){
                +   *        return '

                \u8be6\u60c5\u4fe1\u606f

                ' + record.detail + '

                '; + * } + * }); + * var store = new Store({ + * data : data, + * autoLoad:true + * }), + * grid = new Grid.Grid({ + * render:'#grid', + * columns : columns, + * store: store, + * plugins: [cascade] // Grid.Plugins.Cascade \u63d2\u4ef6 + * }); + * + * grid.render(); + * + * cascade.expandAll();//\u5c55\u5f00\u6240\u6709 + *
                + * @class BUI.Grid.Plugins.Cascade + * @extends BUI.Base + */ + var cascade = function(config){ + cascade.superclass.constructor.call(this, config); + }; + + BUI.extend(cascade,BUI.Base); + + cascade.ATTRS = + /** + * @lends BUI.Grid.Plugins.Cascade# + * @ignore + */ + { + /** + * \u663e\u793a\u5c55\u5f00\u6309\u94ae\u5217\u7684\u5bbd\u5ea6 + * @cfg {Number} width + */ + /** + * \u663e\u793a\u5c55\u5f00\u6309\u94ae\u5217\u7684\u5bbd\u5ea6 + * @type {Number} + * @default 40 + */ + width:{ + value:40 + }, + /** + * \u5c55\u5f00\u5217\u7684\u9ed8\u8ba4\u5185\u5bb9 + * @type {String} + * @protected + */ + cellInner:{ + value:'' + }, + /** + * \u5c55\u5f00\u884c\u7684\u6a21\u7248 + * @protected + * @type {String} + */ + rowTpl : { + value:'' + }, + /** + * \u751f\u6210\u7ea7\u8054\u5217\u65f6\u9700\u8981\u6e32\u67d3\u7684\u5185\u5bb9 + * @cfg {Function} renderer + */ + /** + * \u751f\u6210\u7ea7\u8054\u5217\u65f6\u9700\u8981\u6e32\u67d3\u7684\u5185\u5bb9 + * @type {Function} + */ + renderer:{ + + }, + events : [ + /** + * \u5c55\u5f00\u7ea7\u8054\u5185\u5bb9\u65f6\u89e6\u53d1 + * @name BUI.Grid.Plugins.Cascade#expand + * @event + * @param {jQuery.Event} e \u4e8b\u4ef6\u5bf9\u8c61 + * @param {Object} e.record \u7ea7\u8054\u5185\u5bb9\u5bf9\u5e94\u7684\u7eaa\u5f55 + * @param {HTMLElement} e.row \u7ea7\u8054\u7684\u884cDOM + */ + 'expand', + /** + * \u6298\u53e0\u7ea7\u8054\u5185\u5bb9\u65f6\u89e6\u53d1 + * @name BUI.Grid.Plugins.Cascade#collapse + * @event + * @param {jQuery.Event} e \u4e8b\u4ef6\u5bf9\u8c61 + * @param {Object} e.record \u7ea7\u8054\u5185\u5bb9\u5bf9\u5e94\u7684\u7eaa\u5f55 + * @param {HTMLElement} e.row \u7ea7\u8054\u7684\u884cDOM + */ + 'collapse', + /** + * \u5220\u9664\u7ea7\u8054\u5185\u5bb9\u65f6\u89e6\u53d1 + * @name BUI.Grid.Plugins.Cascade#removed + * @event + * @param {jQuery.Event} e \u4e8b\u4ef6\u5bf9\u8c61 + * @param {Object} e.record \u7ea7\u8054\u5185\u5bb9\u5bf9\u5e94\u7684\u7eaa\u5f55 + * @param {HTMLElement} e.row \u7ea7\u8054\u7684\u884cDOM + */ + 'removed' + ] + }; + + BUI.augment(cascade, + /** + * @lends BUI.Grid.Plugins.Cascade.prototype + * @ignore + */ + { + /** + * \u521d\u59cb\u5316 + * @protected + */ + initializer:function(grid){ + var _self = this; + var cfg = { + title : '', + elCls:'center',//\u5c45\u4e2d\u5bf9\u9f50 + width : _self.get('width'), + resizable:false, + fixed : true, + sortable : false, + cellTpl : _self.get('cellInner') + }, + expandColumn = grid.addColumn(cfg,0); + //\u5217\u4e4b\u95f4\u7684\u7ebf\u53bb\u6389 + grid.set('innerBorder',false); + + _self.set('grid',grid); + }, + /** + * \u7ed1\u5b9a\u4e8b\u4ef6 + * @protected + */ + bindUI:function(grid){ + var _self = this; + grid.on('cellclick',function(ev){ + var sender = $(ev.domTarget), + cascadeEl = sender.closest('.' + CLS_CASCADE); + //\u5982\u679c\u70b9\u51fb\u5c55\u5f00\u3001\u6298\u53e0\u6309\u94ae + if(cascadeEl.length){ + if(!cascadeEl.hasClass(CLS_CASCADE_EXPAND)){ + _self._onExpand(ev.record,ev.row,cascadeEl); + }else{ + _self._onCollapse(ev.record,ev.row,cascadeEl); + } + } + }); + + grid.on('columnvisiblechange',function(){ + _self._resetColspan(); + }); + + grid.on('rowremoved',function(ev){ + _self.remove(ev.record); + }); + + grid.on('clear',function(){ + _self.removeAll(); + }); + }, + /** + * \u5c55\u5f00\u6240\u6709\u7ea7\u8054\u6570\u636e + *
                
                +     *   cascade.expandAll();
                +     * 
                + */ + expandAll : function(){ + var _self = this, + grid = _self.get('grid'), + records = grid.getRecords(); + $.each(records,function(index,record){ + _self.expand(record); + }); + }, + /** + * \u5c55\u5f00\u67d0\u6761\u7eaa\u5f55 + *
                
                +     *   var record = grid.getItem('a');
                +     *   cascade.expand(record);
                +     * 
                + * @param {Object} record \u7eaa\u5f55 + */ + expand : function(record){ + var _self = this, + grid = _self.get('grid'); + + var row = grid.findRow(record); + if(row){ + _self._onExpand(record,row); + } + }, + /** + * \u6298\u53e0\u67d0\u6761\u7eaa\u5f55 + *
                
                +     *   var record = grid.getItem('a');
                +     *   cascade.collapse(record);
                +     * 
                + * @param {Object} record \u7eaa\u5f55 + */ + collapse : function(record){ + var _self = this, + grid = _self.get('grid'); + + var row = grid.findRow(record); + if(row){ + _self._onCollapse(record,row); + } + }, + /** + * \u79fb\u9664\u6240\u6709\u7ea7\u8054\u6570\u636e\u7684\uff24\uff2f\uff2d + * @protected + */ + removeAll : function(){ + var _self = this, + rows = _self._getAllCascadeRows(); + + rows.each(function(index,row){ + + _self._removeCascadeRow(row); + }); + }, + /** + * \u6839\u636e\u7eaa\u5f55\u5220\u9664\u7ea7\u8054\u4fe1\u606f + * @protected + * @param {Object} record \u7ea7\u8054\u4fe1\u606f\u5bf9\u5e94\u7684\u7eaa\u5f55 + */ + remove : function(record){ + var _self = this, + cascadeRow = _self._findCascadeRow(record); + if(cascadeRow){ + _self._removeCascadeRow(cascadeRow); + } + + }, + /** + * \u6298\u53e0\u6240\u6709\u7ea7\u8054\u6570\u636e + *
                
                +     *  cascade.collapseAll();
                +     * 
                + */ + collapseAll : function(){ + var _self = this, + grid = _self.get('grid'), + records = grid.getRecords(); + $.each(records,function(index,record){ + _self.collapse(record); + }); + }, + //\u83b7\u53d6\u7ea7\u8054\u6570\u636e + _getRowRecord : function(cascadeRow){ + return $(cascadeRow).data(DATA_RECORD); + }, + //\u79fb\u9664\u7ea7\u8054\u884c + _removeCascadeRow : function(row){ + + this.fire('removed',{record: $(row).data(DATA_RECORD),row : row}); + $(row).remove(); + }, + //\u901a\u8fc7\u7eaa\u5f55\u67e5\u627e + _findCascadeRow: function(record){ + var _self = this, + rows = _self._getAllCascadeRows(), + result = null; + + $.each(rows,function(index,row){ + if(_self._getRowRecord(row) === record){ + result = row; + return false; + } + }); + return result; + }, + _getAllCascadeRows : function(){ + var _self = this, + grid = _self.get('grid'); + return grid.get('el').find('.' + CLS_CASCADE_ROW); + }, + //\u83b7\u53d6\u751f\u6210\u7684\u7ea7\u8054\u884c + _getCascadeRow : function(gridRow){ + var nextRow = $(gridRow).next(); + if((nextRow).hasClass(CLS_CASCADE_ROW)){ + return nextRow; + } + return null; + //return $(gridRow).next('.' + CLS_CASCADE_ROW); + }, + //\u83b7\u53d6\u7ea7\u8054\u5185\u5bb9 + _getRowContent : function(record){ + var _self = this, + renderer = _self.get('renderer'), + content = renderer ? renderer(record) : ''; + return content; + }, + //\u521b\u5efa\u7ea7\u8054\u884c + _createCascadeRow : function(record,gridRow){ + var _self = this, + rowTpl = _self.get('rowTpl'), + content = _self._getRowContent(record), + rowEl = $(rowTpl).insertAfter(gridRow); + + rowEl.find('.' + CLS_CASCADE_CELL).append($(content)); + rowEl.data(DATA_RECORD,record); + return rowEl; + }, + //\u5c55\u5f00 + _onExpand : function(record,row,cascadeEl){ + var _self = this, + cascadeRow = _self._getCascadeRow(row), + colspan = _self._getColumnCount(row); + + cascadeEl = cascadeEl || $(row).find('.'+CLS_CASCADE); + cascadeEl.addClass(CLS_CASCADE_EXPAND); + + if(!cascadeRow || !cascadeRow.length){ + cascadeRow = _self._createCascadeRow(record,row); + } + $(cascadeRow).removeClass(CLS_CASCADE_ROW_COLLAPSE); + + _self._setColSpan(cascadeRow,row); + + _self.fire('expand',{record : record,row : cascadeRow[0]}); + }, + //\u6298\u53e0 + _onCollapse : function(record,row,cascadeEl){ + + var _self = this, + cascadeRow = _self._getCascadeRow(row); + cascadeEl = cascadeEl || $(row).find('.'+CLS_CASCADE); + cascadeEl.removeClass(CLS_CASCADE_EXPAND); + + if(cascadeRow || !cascadeRow.length){ + $(cascadeRow).addClass(CLS_CASCADE_ROW_COLLAPSE); + _self.fire('collapse',{record : record,row : cascadeRow[0]}); + } + + }, + //\u83b7\u53d6\u663e\u793a\u7684\u5217\u6570 + _getColumnCount : function(row){ + return $(row).children().filter(function(){ + return $(this).css('display') !== 'none'; + }).length; + }, + //\u8bbe\u7f6ecolspan + _setColSpan : function(cascadeRow,gridRow){ + gridRow = gridRow || $(cascadeRow).prev(); + var _self = this, + colspan = _self._getColumnCount(gridRow); + + $(cascadeRow).find('.' + CLS_CASCADE_CELL).attr('colspan',colspan) + }, + //\u91cd\u7f6e\u6240\u6709\u7684colspan + _resetColspan : function(){ + var _self = this, + cascadeRows = _self._getAllCascadeRows(); + $.each(cascadeRows,function(index,cascadeRow){ + _self._setColSpan(cascadeRow); + }); + }, + /** + * \u6790\u6784\u51fd\u6570 + */ + destructor : function(){ + var _self = this; + _self.removeAll(); + _self.off(); + _self.clearAttrVals(); + } + }); + + return cascade; +});/** + * @fileOverview \u9009\u62e9\u7684\u63d2\u4ef6 + * @ignore + */ + +define('bui/grid/plugins/selection',['bui/common'],function(require){ + + var BUI = require('bui/common'), + PREFIX = BUI.prefix, + CLS_CHECKBOX = PREFIX + 'grid-checkBox', + CLS_CHECK_ICON = 'x-grid-checkbox', + CLS_RADIO = PREFIX + 'grid-radio'; + + /** + * \u9009\u62e9\u884c\u63d2\u4ef6 + *
                
                +  ** var store = new Store({
                +  *       data : data,
                +  *       autoLoad:true
                +  *     }),
                +  *     grid = new Grid.Grid({
                +  *       render:'#grid',
                +  *       columns : columns,
                +  *       itemStatusFields : { //\u8bbe\u7f6e\u6570\u636e\u8ddf\u72b6\u6001\u7684\u5bf9\u5e94\u5173\u7cfb
                +  *         selected : 'selected',
                +  *         disabled : 'disabled'
                +  *       },
                +  *       store : store,
                +  *       plugins : [Grid.Plugins.CheckSelection] // \u63d2\u4ef6\u5f62\u5f0f\u5f15\u5165\u591a\u9009\u8868\u683c
                +  *      //multiSelect: true  // \u63a7\u5236\u8868\u683c\u662f\u5426\u53ef\u4ee5\u591a\u9009\uff0c\u4f46\u662f\u8fd9\u79cd\u65b9\u5f0f\u6ca1\u6709\u524d\u9762\u7684\u590d\u9009\u6846 \u9ed8\u8ba4\u4e3afalse
                +  *     });
                +  *
                +  *   grid.render();
                +  * 
                + * @class BUI.Grid.Plugins.CheckSelection + * @extends BUI.Base + */ + function checkSelection(config){ + checkSelection.superclass.constructor.call(this, config); + } + + BUI.extend(checkSelection,BUI.Base); + + checkSelection.ATTRS = + /** + * @lends BUI.Grid.Plugins.CheckSelection.prototype + * @ignore + */ + { + /** + * column's width which contains the checkbox + */ + width : { + value : 40 + }, + /** + * @private + */ + column : { + + }, + /** + * @private + * + */ + cellInner : { + value : '
                ' + } + }; + + BUI.augment(checkSelection, + /** + * @lends BUI.Grid.Plugins.CheckSelection.prototype + * @ignore + */ + { + createDom : function(grid){ + var _self = this; + var cfg = { + title : '', + width : _self.get('width'), + fixed : true, + resizable:false, + sortable : false, + tpl : '
                ' + _self.get('cellInner') + '', + cellTpl : _self.get('cellInner') + }, + checkColumn = grid.addColumn(cfg,0); + grid.set('multipleSelect',true); + _self.set('column',checkColumn); + }, + /** + * @private + */ + bindUI : function(grid){ + var _self = this, + col = _self.get('column'), + colEl = col.get('el'), + checkBox = colEl.find('.' + CLS_CHECK_ICON); + checkBox.on('click',function(){ + var checked = colEl.hasClass('checked'); + if(!checked){ + grid.setAllSelection(); + colEl.addClass('checked'); + }else{ + grid.clearSelection(); + colEl.removeClass('checked'); + } + }); + grid.on('rowunselected',function(e){ + + colEl.removeClass('checked'); + }); + + //\u6e05\u9664\u7eaa\u5f55\u65f6\u53d6\u5168\u9009 + grid.on('clear',function(){ + //checkBox.attr('checked',false); + colEl.removeClass('checked'); + }); + } + }); + + /** + * \u8868\u683c\u5355\u9009\u63d2\u4ef6 + * @class BUI.Grid.Plugins.RadioSelection + * @extends BUI.Base + */ + var radioSelection = function(config){ + radioSelection.superclass.constructor.call(this, config); + }; + + BUI.extend(radioSelection,BUI.Base); + + radioSelection.ATTRS = + /** + * @lends BUI.Grid.Plugins.RadioSelection# + * @ignore + */ + { + /** + * column's width which contains the checkbox + */ + width : { + value : 40 + }, + /** + * @private + */ + column : { + + }, + /** + * @private + */ + cellInner : { + value : '
                ' + } + }; + + BUI.augment(radioSelection, { + createDom : function(grid){ + var _self = this; + var cfg = { + title : '', + width : _self.get('width'), + resizable:false, + fixed : true, + sortable : false, + cellTpl : _self.get('cellInner') + }, + column = grid.addColumn(cfg,0); + grid.set('multipleSelect',false); + _self.set('column',column); + }, + /** + * @private + */ + bindUI : function(grid){ + var _self = this; + + grid.on('rowselected',function(e){ + _self._setRowChecked(e.row,true); + }); + + grid.on('rowunselected',function(e){ + _self._setRowChecked(e.row,false); + }); + }, + _setRowChecked : function(row,checked){ + var rowEl = $(row), + radio = rowEl.find('.' + CLS_RADIO); + radio.attr('checked',checked); + } + }); + + /** + * @name BUI.Grid.Plugins + * @namespace \u8868\u683c\u63d2\u4ef6\u547d\u540d\u7a7a\u95f4 + * @ignore + */ + var Selection = { + CheckSelection : checkSelection, + RadioSelection : radioSelection + }; + + + return Selection; +});/** + * @fileOverview \u8868\u683c\u6570\u636e\u6c47\u603b + * @author dxq613@gmail.com + * @ignore + */ +define('bui/grid/plugins/summary',['bui/common'],function (require) { + + var BUI = require('bui/common'), + PREFIX = BUI.prefix, + CLS_GRID_ROW = PREFIX + 'grid-row', + CLS_GRID_BODY = PREFIX + 'grid-body', + CLS_SUMMARY_ROW = PREFIX + 'grid-summary-row', + CLS_GRID_CELL_INNER = PREFIX + 'grid-cell-inner', + CLS_COLUMN_PREFIX = 'grid-td-', + CLS_GRID_CELL_TEXT = PREFIX + 'grid-cell-text', + CLS_GRID_CELL = PREFIX + 'grid-cell'; + + /** + * @private + * @ignore + */ + function getEmptyCellTemplate(colspan){ + if(colspan > 0) { + return ' '; + } + return ''; + } + + /** + * @private + * @ignore + */ + function getCellTemplate(text,id){ + return '' + + getInnerTemplate(text) + + ''; + } + + /** + * @private + * @ignore + */ + function getInnerTemplate(text){ + return '
                ' + + '' + text + '' + + '
                ' ; + } + + /** + * @private + * @ignore + */ + function getLastEmptyCell(){ + return ' '; + } + + + /** + * \u8868\u683c\u83dc\u5355\u63d2\u4ef6 + *
                
                +   * var store = new Store({
                +   *      url : 'data/summary.json',
                +   *      pageSize : 10,
                +   *      autoLoad:true
                +   *    }),
                +   *    grid = new Grid.Grid({
                +   *      render:'#grid',
                +   *      columns : columns,
                +   *      store: store,
                +   *      bbar : {pagingBar : true},
                +   *      plugins : [Grid.Plugins.Summary] // \u63d2\u4ef6\u5f62\u5f0f\u5f15\u5165\u5355\u9009\u8868\u683c
                +   *    });
                +   *
                +   *  grid.render();
                +   * 
                + * @class BUI.Grid.Plugins.Summary + */ + var summary = function (config) { + summary.superclass.constructor.call(this,config); + }; + + summary.ATTRS = + { + + footerTpl : { + value : '' + }, + footerEl : { + + }, + /** + * \u603b\u6c47\u603b\u884c\u7684\u6807\u9898 + * @type {String} + * @default '\u603b\u6c47\u603b' + */ + summaryTitle : { + value : '\u67e5\u8be2\u5408\u8ba1' + }, + /** + * \u672c\u9875\u6c47\u603b\u7684\u6807\u9898 + * @type {String} + */ + pageSummaryTitle : { + value : '\u672c\u9875\u5408\u8ba1' + }, + /** + * \u5728\u5217\u5bf9\u8c61\u4e2d\u914d\u7f6e\u7684\u5b57\u6bb5 + * @type {String} + * @default 'summary' + */ + field : { + value : 'summary' + }, + /** + * \u672c\u9875\u6c47\u603b\u503c\u7684\u8bb0\u5f55 + * @type {String} + */ + pageSummaryField: { + value : 'pageSummary' + }, + /** + * \u603b\u6c47\u603b\u503c\u7684\u8bb0\u5f55 + * @type {String} + */ + summaryField : { + value : 'summary' + }, + /** + * @private + * \u672c\u9875\u6c47\u603b\u503c + * @type {Object} + */ + pageSummary : { + + }, + /** + * @private + * \u603b\u6c47\u603b + * @type {Object} + */ + summary : { + + } + }; + + BUI.extend(summary,BUI.Base); + + BUI.augment(summary,{ + //\u521d\u59cb\u5316 + initializer : function (grid) { + var _self = this; + _self.set('grid',grid); + }, + //\u6dfb\u52a0DOM\u7ed3\u6784 + renderUI : function(grid){ + var _self = this, + bodyEl = grid.get('el').find('.' + CLS_GRID_BODY), + bodyTable = bodyEl.find('table'), + footerEl = $(_self.get('footerTpl')).appendTo(bodyTable); + _self.set('footerEl',footerEl); + }, + //\u7ed1\u5b9a\u4e8b\u4ef6 + bindUI : function(grid){ + //\u7ed1\u5b9a\u83b7\u53d6\u6570\u636e + var _self = this, + store = grid.get('store'); + if(store){ + store.on('beforeProcessLoad',function(data){ + _self._processSummary(data); + }); + store.on('add',function(){ + _self.resetPageSummary(); + }); + store.on('remove',function(){ + _self.resetPageSummary(); + }); + store.on('update',function(){ + _self.resetPageSummary(); + }); + } + grid.on('aftershow',function(){ + _self.resetSummary(); + }); + + grid.get('header').on('afterVisibleChange',function(){ + _self.resetSummary(); + }); + }, + //\u5904\u7406\u6c47\u603b\u6570\u636e + _processSummary : function(data){ + var _self = this, + footerEl = _self.get('footerEl'); + + footerEl.empty(); + if(!data){ + return; + } + + var pageSummary = data[_self.get('pageSummaryField')], + summary = data[_self.get('summaryField')]; + + _self.set('pageSummary',pageSummary); + _self.set('summary',summary); + }, + /** + * \u91cd\u65b0\u8bbe\u7f6e\u672c\u9875\u6c47\u603b + */ + resetPageSummary : function(){ + var _self = this, + grid = _self.get('grid'), + columns = grid.get('columns'), + pageSummary = _self._calculatePageSummary(), + pageEl = _self.get('pageEl'); + _self.set('pageSummary',pageSummary); + if(pageEl){ + BUI.each(columns,function(column){ + if(column.get('summary') && column.get('visible')){ + var id = column.get('id'), + cellEl = pageEl.find('.' + CLS_COLUMN_PREFIX + id), + text = _self._getSummaryCellText(column,pageSummary); + cellEl.find('.' + CLS_GRID_CELL_TEXT).text(text); + } + }); + _self._updateFirstRow(pageEl,_self.get('pageSummaryTitle')); + } + }, + //\u91cd\u7f6e\u6c47\u603b\u6570\u636e + resetSummary : function(pageSummary,summary){ + var _self = this, + footerEl = _self.get('footerEl'), + pageEl = null; + + footerEl.empty(); + + pageSummary = pageSummary || _self.get('pageSummary'); + if(!pageSummary){ + pageSummary = _self._calculatePageSummary(); + _self.set('pageSummary',pageSummary); + } + summary = summary || _self.get('summary'); + pageEl = _self._creatSummaryRow(pageSummary,_self.get('pageSummaryTitle')); + _self.set('pageEl',pageEl); + _self._creatSummaryRow(summary,_self.get('summaryTitle')); + }, + //\u521b\u5efa\u6c47\u603b + _creatSummaryRow : function(summary,title){ + if(!summary){ + return null; + } + var _self = this, + footerEl = _self.get('footerEl'), + tpl = _self._getSummaryTpl(summary), + rowEl = $(tpl).appendTo(footerEl); + + _self._updateFirstRow(rowEl,title); + return rowEl; + }, + _updateFirstRow : function(rowEl,title){ + var firstCell = rowEl.find('td').first(), + textEl = firstCell.find('.' + CLS_GRID_CELL_INNER); + if(textEl.length){ + var textPrefix = title + ': '; + text = textEl.text(); + if(text.indexOf(textPrefix) === -1){ + text = textPrefix + text; + } + firstCell.html(getInnerTemplate(text)); + }else{ + firstCell.html(getInnerTemplate(title + ':')); + } + }, + //\u83b7\u53d6\u6c47\u603b\u6a21\u677f + _getSummaryTpl : function(summary){ + var _self = this, + grid = _self.get('grid'), + columns = grid.get('columns'), + cellTempArray = [], + prePosition = -1, //\u4e0a\u6b21\u6c47\u603b\u5217\u7684\u4f4d\u7f6e + currentPosition = -1,//\u5f53\u524d\u4f4d\u7f6e + rowTemplate = null; + + $.each(columns, function (colindex,column) { + if(column.get('visible')){ + currentPosition += 1; + if(column.get('summary')){ + cellTempArray.push(getEmptyCellTemplate(currentPosition-prePosition - 1)); + + var text = _self._getSummaryCellText(column,summary), + temp = getCellTemplate(text,column.get('id')); + cellTempArray.push(temp); + prePosition = currentPosition; + } + } + }); + if(prePosition !== currentPosition){ + cellTempArray.push(getEmptyCellTemplate(currentPosition-prePosition)); + } + + rowTemplate = ['', cellTempArray.join(''),getLastEmptyCell(), ''].join(''); + return rowTemplate; + }, + //\u83b7\u53d6\u6c47\u603b\u5355\u5143\u683c\u5185\u5bb9 + _getSummaryCellText : function(column,summary){ + var _self = this, + val = summary[column.get('dataIndex')], + value = val == null ? '' : val, + renderer = column.get('renderer'), + text = renderer ? renderer(value,summary) : value; + return text; + }, + _calculatePageSummary : function(){ + var _self = this, + grid = _self.get('grid'), + store = grid.get('store'), + columns = grid.get('columns'), + rst = {}; + + BUI.each(columns,function(column){ + if(column.get('summary')){ + var dataIndex = column.get('dataIndex'); + rst[dataIndex] = store.sum(dataIndex); + } + }); + + return rst; + } + }); + + return summary; +});/** + * @fileOverview \u8868\u683c\u7f16\u8f91\u63d2\u4ef6 + * @ignore + */ + +define('bui/grid/plugins/editing',function (require) { + + var CLS_CELL_INNER = BUI.prefix + 'grid-cell-inner', + CLS_CELL_ERROR = BUI.prefix + 'grid-cell-error'; + /** + * \u8868\u683c\u7684\u7f16\u8f91\u63d2\u4ef6 + * @class BUI.Grid.Plugins.Editing + */ + function Editing(config){ + Editing.superclass.constructor.call(this, config); + } + + BUI.extend(Editing,BUI.Base); + + Editing.ATTRS = { + /** + * @protected + * \u7f16\u8f91\u5668\u7684\u5bf9\u9f50\u8bbe\u7f6e + * @type {Object} + */ + align : { + value : { + points: ['cl','cl'] + } + }, + /** + * \u662f\u5426\u76f4\u63a5\u5728\u8868\u683c\u4e0a\u663e\u793a\u9519\u8bef\u4fe1\u606f + * @type {Boolean} + */ + showError : { + value : true + }, + errorTpl : { + value : '!' + }, + /** + * \u662f\u5426\u521d\u59cb\u5316\u8fc7\u7f16\u8f91\u5668 + * @protected + * @type {Boolean} + */ + isInitEditors : { + value : false + }, + /** + * \u6b63\u5728\u7f16\u8f91\u7684\u8bb0\u5f55 + * @type {Object} + */ + record : { + + }, + /** + * \u5f53\u524d\u7f16\u8f91\u7684\u7f16\u8f91\u5668 + * @type {Object} + */ + curEditor : { + + }, + /** + * \u662f\u5426\u53d1\u751f\u8fc7\u9a8c\u8bc1 + * @type {Boolean} + */ + hasValid : { + + }, + /** + * \u7f16\u8f91\u5668 + * @protected + * @type {Object} + */ + editors : { + value : [] + }, + /** + * \u89e6\u53d1\u7f16\u8f91\u6837\u5f0f\uff0c\u4e3a\u7a7a\u65f6\u9ed8\u8ba4\u70b9\u51fb\u6574\u884c\u90fd\u4f1a\u89e6\u53d1\u7f16\u8f91 + * @type {String} + */ + triggerCls : { + + }, + /** + * \u8fdb\u884c\u7f16\u8f91\u65f6\u662f\u5426\u89e6\u53d1\u9009\u4e2d + * @type {Boolean} + */ + triggerSelected : { + value : true + } + }; + + BUI.augment(Editing,{ + /** + * \u521d\u59cb\u5316 + * @protected + */ + initializer : function (grid) { + var _self = this; + _self.set('grid',grid); + _self.initEditing(grid); + + }, + renderUI : function(){ + var _self = this, + grid = _self.get('grid'); + //\u5ef6\u8fdf\u52a0\u8f7d editor\u6a21\u5757 + BUI.use('bui/editor',function(Editor){ + _self.initEditors(Editor); + _self._initGridEvent(grid); + _self.set('isInitEditors',true); + }); + }, + /** + * \u521d\u59cb\u5316\u63d2\u4ef6 + * @protected + */ + initEditing : function(grid){ + + }, + _getCurEditor : function(){ + return this.get('curEditor'); + }, + _initGridEvent : function(grid){ + var _self = this, + header = grid.get('header'); + + grid.on('cellclick',function(ev){ + + var editor = null, + domTarget = ev.domTarget, + triggerCls = _self.get('triggerCls'), + curEditor = _self._getCurEditor(); + if(curEditor && curEditor.get('acceptEvent')){ + curEditor.accept(); + curEditor.hide(); + }else{ + curEditor && curEditor.cancel(); + } + + //if(ev.field){ + editor = _self.getEditor(ev.field); + //} + if(editor && $(domTarget).closest('.' + triggerCls).length){ + _self.showEditor(editor,ev); + //if(curEditor && curEditor.get('acceptEvent')){ + if(!_self.get('triggerSelected')){ + return false; //\u6b64\u65f6\u4e0d\u89e6\u53d1\u9009\u4e2d\u4e8b\u4ef6 + } + + //} + } + }); + + grid.on('rowcreated',function(ev){ + validRow(ev.record,ev.row); + }); + + grid.on('rowremoved',function(ev){ + if(_self.get('record') == ev.record){ + _self.cancel(); + } + }); + + grid.on('rowupdated',function(ev){ + validRow(ev.record,ev.row); + }); + + grid.on('scroll',function(ev){ + var editor = _self._getCurEditor(); + if(editor){ + + var align = editor.get('align'), + node = align.node, + pos = node.position(); + if(pos.top < 0 || pos.top > ev.bodyHeight){ + editor.hide(); + }else{ + editor.set('align',align); + editor.show(); + } + + } + }); + + header.on('afterVisibleChange',function(ev){ + if(ev.target && ev.target != header){ + var column = ev.target; + _self.onColumnVisibleChange(column); + } + }); + + function validRow(record,row){ + if(_self.get('hasValid')){ + _self.validRecord(record,_self.getFields(),$(row)); + } + } + + }, + /** + * \u521d\u59cb\u5316\u6240\u6709 + * @protected + */ + initEditors : function(Editor){ + var _self = this, + grid = _self.get('grid'), + fields = [], + columns = grid.get('columns'); + BUI.each(columns,function(column){ + var field = _self.getFieldConfig(column); + if(field){ + field.name = column.get('dataIndex'); + field.id = column.get('id'); + if(field.validator){ + field.validator = _self.wrapValidator(field.validator); + } + fields.push(field); + } + }); + var cfgs = _self.getEditorCfgs(fields); + BUI.each(cfgs,function(cfg){ + _self.initEidtor(cfg,Editor); + }); + }, + /** + * @protected + * \u83b7\u53d6\u5217\u5b9a\u4e49\u4e2d\u7684\u5b57\u6bb5\u5b9a\u4e49\u4fe1\u606f + * @param {BUI.Grid.Column} column \u5217\u5b9a\u4e49 + * @return {Object} \u5b57\u6bb5\u5b9a\u4e49 + */ + getFieldConfig : function(column){ + return column.get('editor'); + }, + /** + * \u5c01\u88c5\u9a8c\u8bc1\u65b9\u6cd5 + * @protected + */ + wrapValidator : function(validator){ + var _self = this; + return function(value){ + var record = _self.get('record'); + return validator(value,record); + }; + }, + /** + * @protected + * \u5217\u663e\u793a\u9690\u85cf\u65f6 + */ + onColumnVisibleChange : function(column){ + + }, + /** + * @protected + * \u83b7\u53d6\u7f16\u8f91\u5668\u7684\u914d\u7f6e + * @template + * @param {Array} fields \u5b57\u6bb5\u914d\u7f6e + * @return {Array} \u7f16\u8f91\u5668\u7684\u914d\u7f6e\u9879 + */ + getEditorCfgs : function(fields){ + + }, + /** + * \u83b7\u53d6\u7f16\u8f91\u5668\u7684\u6784\u9020\u51fd\u6570 + * @param {Object} Editor \u547d\u540d\u7a7a\u95f4 + * @return {Function} \u6784\u9020\u51fd\u6570 + */ + getEditorConstructor : function(Editor){ + return Editor.Editor; + }, + /** + * \u521d\u59cb\u5316\u7f16\u8f91\u5668 + * @private + */ + initEidtor : function(cfg,Editor){ + var _self = this, + con = _self.getEditorConstructor(Editor), + editor = new con(cfg); + editor.render(); + _self.get('editors').push(editor); + _self.bindEidtor(editor); + return editor; + }, + /** + * @protected + * \u7ed1\u5b9a\u7f16\u8f91\u5668\u4e8b\u4ef6 + * @param {BUI.Editor.Editor} editor \u7f16\u8f91\u5668 + */ + bindEidtor : function(editor){ + var _self = this, + grid = _self.get('grid'), + store = grid.get('store'); + editor.on('accept',function(){ + var record = _self.get('record'); + _self.updateRecord(store,record,editor); + _self.set('curEditor',null); + }); + + editor.on('cancel',function(){ + _self.set('curEditor',null); + }); + }, + /** + * \u83b7\u53d6\u7f16\u8f91\u5668 + * @protected + * @param {String} field \u5b57\u6bb5\u503c + * @return {BUI.Editor.Editor} \u7f16\u8f91\u5668 + */ + getEditor : function(options){ + + }, + /** + * @protected + * \u83b7\u53d6\u5bf9\u9f50\u7684\u8282\u70b9 + * @template + * @param {Object} options \u70b9\u51fb\u5355\u5143\u683c\u7684\u4e8b\u4ef6\u5bf9\u8c61 + * @return {jQuery} + */ + getAlignNode : function(options){ + + }, + /** + * @protected + * \u83b7\u53d6\u7f16\u8f91\u7684\u503c + * @param {Object} options \u70b9\u51fb\u5355\u5143\u683c\u7684\u4e8b\u4ef6\u5bf9\u8c61 + * @return {*} \u7f16\u8f91\u7684\u503c + */ + getEditValue : function(options){ + + }, + /** + * \u663e\u793a\u7f16\u8f91\u5668 + * @protected + * @param {BUI.Editor.Editor} editor + */ + showEditor : function(editor,options){ + var _self = this, + value = _self.getEditValue(options), + alignNode = _self.getAlignNode(options); + + _self.beforeShowEditor(editor,options); + _self.set('record',options.record); + editor.setValue(value); + if(alignNode){ + var align = _self.get('align'); + align.node = alignNode; + editor.set('align',align); + } + + editor.show(); + _self.focusEditor(editor,options.field); + _self.set('curEditor',editor); + }, + /** + * @protected + * \u7f16\u8f91\u5668\u5b57\u6bb5\u5b9a\u4f4d + */ + focusEditor : function(editor,field){ + editor.focus(); + }, + /** + * \u663e\u793a\u7f16\u8f91\u5668\u524d + * @protected + * @template + * @param {BUI.Editor.Editor} editor + * @param {Object} options + */ + beforeShowEditor : function(editor,options){ + + }, + //\u521b\u5efa\u7f16\u8f91\u7684\u914d\u7f6e\u9879 + _createEditOptions : function(record,field){ + var _self = this, + grid = _self.get('grid'), + rowEl = grid.findRow(record), + column = grid.findColumnByField(field), + cellEl = grid.findCell(column.get('id'),rowEl); + return { + record : record, + field : field, + cell : cellEl[0], + row : rowEl[0] + }; + }, + /** + * \u9a8c\u8bc1\u8868\u683c\u662f\u5426\u901a\u8fc7\u9a8c\u8bc1 + */ + valid : function(){ + var _self = this, + grid = _self.get('grid'), + store = grid.get('store'); + + if(store){ + var records = store.getResult(); + BUI.each(records,function(record){ + _self.validRecord(record,_self.getFields()); + }); + } + _self.set('hasValid',true); + }, + isValid : function(){ + var _self = this, + grid = _self.get('grid'); + if(!_self.get('hasValid')){ + _self.valid(); + } + return !grid.get('el').find('.' + CLS_CELL_ERROR).length; + }, + /** + * \u6e05\u7406\u9519\u8bef + */ + clearErrors : function(){ + var _self = this, + grid = _self.get('grid'); + grid.get('el').find('.' + CLS_CELL_ERROR).remove(); + }, + /** + * \u83b7\u53d6\u7f16\u8f91\u7684\u5b57\u6bb5 + * @protected + * @param {Array} editors \u7f16\u8f91\u5668 + * @return {Array} \u5b57\u6bb5\u96c6\u5408 + */ + getFields : function(editors){ + + }, + /** + * \u6821\u9a8c\u8bb0\u5f55 + * @protected + * @param {Object} record \u6821\u9a8c\u7684\u8bb0\u5f55 + * @param {Array} fields \u5b57\u6bb5\u7684\u96c6\u5408 + */ + validRecord : function(record,fields,row){ + var _self = this, + errors = []; + _self.setInternal('record',record); + fields = fields || _self.getFields(); + BUI.each(fields,function(field){ + var name = field.get('name'), + value = record[name] || '', + error = field.getValidError(value); + if(error){ + errors.push({name : name,error : error,id : field.get('id')}); + } + }); + _self.showRecordError(record,errors,row); + }, + showRecordError : function(record,errors,row){ + var _self = this, + grid = _self.get('grid'); + row = row || grid.findRow(record); + if(row){ + _self._clearRowError(row); + BUI.each(errors,function(item){ + var cell = grid.findCell(item.id,row); + _self._showCellError(cell,item.error); + }); + } + }, + /** + * \u66f4\u65b0\u6570\u636e + * @protected + * @param {Object} record \u7f16\u8f91\u7684\u6570\u636e + * @param {*} value \u7f16\u8f91\u503c + */ + updateRecord : function(store,record,editor){ + + }, + _clearRowError : function(row){ + row.find('.' + CLS_CELL_ERROR).remove(); + }, + _showCellError : function(cell,error){ + var _self = this, + errorTpl = BUI.substitute(_self.get('errorTpl'),{error : error}), + innerEl = cell.find('.' + CLS_CELL_INNER); + $(errorTpl).appendTo(innerEl); + }, + /** + * \u7f16\u8f91\u8bb0\u5f55 + * @param {Object} record \u9700\u8981\u7f16\u8f91\u7684\u8bb0\u5f55 + * @param {String} field \u7f16\u8f91\u7684\u5b57\u6bb5 + */ + edit : function(record,field){ + var _self = this, + options = _self._createEditOptions(record,field), + editor = _self.getEditor(field); + _self.showEditor(editor,options); + }, + /** + * \u53d6\u6d88\u7f16\u8f91 + */ + cancel : function(){ + var _self = this, + editors = _self.get('editors'); + BUI.each(editors,function(editor){ + if(editor.get('visible')){ + editor.cancel(); + } + }); + _self.set('curEditor',null); + _self.set('record',null); + }, + /** + * \u6790\u6784\u51fd\u6570 + * @protected + */ + destructor:function () { + var _self = this, + editors = _self.get('editors'); + + BUI.each(editors,function(editor){ + editor.destroy || editor.destroy(); + }); + _self.off(); + _self.clearAttrVals(); + } + + }); + + return Editing; +});/** + * @fileOverview \u8868\u683c\u5355\u5143\u683c\u7f16\u8f91 + * @ignore + */ + +define('bui/grid/plugins/cellediting',['bui/grid/plugins/editing'],function (require) { + var Editing = require('bui/grid/plugins/editing'), + CLS_BODY = BUI.prefix + 'grid-body', + CLS_CELL = BUI.prefix + 'grid-cell'; + + /** + * @class BUI.Grid.Plugins.CellEditing + * @extends BUI.Grid.Plugins.Editing + * \u5355\u5143\u683c\u7f16\u8f91\u63d2\u4ef6 + */ + var CellEditing = function(config){ + CellEditing.superclass.constructor.call(this, config); + }; + + CellEditing.ATTRS = { + /** + * \u89e6\u53d1\u7f16\u8f91\u6837\u5f0f\uff0c\u4e3a\u7a7a\u65f6\u9ed8\u8ba4\u70b9\u51fb\u6574\u884c\u90fd\u4f1a\u89e6\u53d1\u7f16\u8f91 + * @cfg {String} [triggerCls = 'bui-grid-cell'] + */ + triggerCls : { + value : CLS_CELL + } + }; + + BUI.extend(CellEditing,Editing); + + BUI.augment(CellEditing,{ + /** + * @protected + * \u83b7\u53d6\u7f16\u8f91\u5668\u7684\u914d\u7f6e\u9879 + * @param {Array} fields \u5b57\u6bb5\u914d\u7f6e + */ + getEditorCfgs : function(fields){ + var _self = this, + grid = _self.get('grid'), + bodyNode = grid.get('el').find('.' + CLS_BODY), + rst = []; + BUI.each(fields,function(field){ + rst.push({field : field,changeSourceEvent : null,hideExceptNode : bodyNode,autoUpdate : false,preventHide : false}); + }); + + return rst; + }, + /** + * \u83b7\u53d6\u7f16\u8f91\u5668 + * @protected + * @param {String} field \u5b57\u6bb5\u503c + * @return {BUI.Editor.Editor} \u7f16\u8f91\u5668 + */ + getEditor : function(field){ + if(!field){ + return null; + } + var _self = this, + editors = _self.get('editors'), + editor = null; + + BUI.each(editors,function(item){ + if(item.get('field').get('name') === field){ + editor = item; + return false; + } + }); + return editor; + }, + /** + * \u663e\u793a\u7f16\u8f91\u5668\u524d + * @protected + * @param {BUI.Editor.Editor} editor + * @param {Object} options + */ + beforeShowEditor : function(editor,options){ + var _self = this, + cell = $(options.cell); + _self.resetWidth(editor,cell.outerWidth()); + }, + resetWidth : function(editor,width){ + editor.set('width',width); + }, + /** + * \u66f4\u65b0\u6570\u636e + * @protected + * @param {Object} record \u7f16\u8f91\u7684\u6570\u636e + * @param {*} value \u7f16\u8f91\u503c + */ + updateRecord : function(store,record,editor){ + var _self = this, + value = editor.getValue(), + fieldName = editor.get('field').get('name'), + preValue = record[fieldName]; + value = BUI.isDate(value) ? value.getTime() : value; + if(preValue !== value){ + store.setValue(record,fieldName,value); + } + }, + /** + * @protected + * \u83b7\u53d6\u5bf9\u9f50\u7684\u8282\u70b9 + * @override + * @param {Object} options \u70b9\u51fb\u5355\u5143\u683c\u7684\u4e8b\u4ef6\u5bf9\u8c61 + * @return {jQuery} + */ + getAlignNode : function(options){ + return $(options.cell); + }, + /** + * \u83b7\u53d6\u7f16\u8f91\u7684\u5b57\u6bb5 + * @protected + * @return {Array} \u5b57\u6bb5\u96c6\u5408 + */ + getFields : function(){ + var rst = [], + _self = this, + editors = _self.get('editors'); + BUI.each(editors,function(editor){ + rst.push(editor.get('field')); + }); + return rst; + }, + /** + * @protected + * \u83b7\u53d6\u8981\u7f16\u8f91\u7684\u503c + * @param {Object} options \u70b9\u51fb\u5355\u5143\u683c\u7684\u4e8b\u4ef6\u5bf9\u8c61 + * @return {*} \u7f16\u8f91\u7684\u503c + */ + getEditValue : function(options){ + if(options.record && options.field){ + var value = options.record[options.field]; + return value == null ? '' : value; + } + return ''; + } + }); + + return CellEditing; +});/** + * @fileOverview \u8868\u683c\u884c\u7f16\u8f91 + * @ignore + */ + +define('bui/grid/plugins/rowediting',['bui/common','bui/grid/plugins/editing'],function (require) { + var BUI = require('bui/common'), + Editing = require('bui/grid/plugins/editing'), + CLS_ROW = BUI.prefix + 'grid-row'; + + /** + * @class BUI.Grid.Plugins.RowEditing + * @extends BUI.Grid.Plugins.Editing + * \u5355\u5143\u683c\u7f16\u8f91\u63d2\u4ef6 + */ + var RowEditing = function(config){ + RowEditing.superclass.constructor.call(this, config); + }; + + RowEditing.ATTRS = { + /** + * @protected + * \u7f16\u8f91\u5668\u7684\u5bf9\u9f50\u8bbe\u7f6e + * @type {Object} + */ + align : { + value : { + points: ['tl','tl'], + offset : [-2,0] + } + }, + /** + * \u89e6\u53d1\u7f16\u8f91\u6837\u5f0f\uff0c\u4e3a\u7a7a\u65f6\u9ed8\u8ba4\u70b9\u51fb\u6574\u884c\u90fd\u4f1a\u89e6\u53d1\u7f16\u8f91 + * @cfg {String} [triggerCls = 'bui-grid-row'] + */ + triggerCls : { + value : CLS_ROW + } + }; + + BUI.extend(RowEditing,Editing); + + BUI.augment(RowEditing,{ + + /** + * @protected + * \u83b7\u53d6\u7f16\u8f91\u5668\u7684\u914d\u7f6e\u9879 + * @param {Array} fields \u5b57\u6bb5\u914d\u7f6e + */ + getEditorCfgs : function(fields){ + var rst = []; + rst.push({ + changeSourceEvent : null, + autoUpdate : false, + form : { + children : fields, + buttonBar : { + elCls : 'centered toolbar' + } + } + }); + return rst; + }, + /** + * \u5c01\u88c5\u9a8c\u8bc1\u65b9\u6cd5 + * @protected + */ + wrapValidator : function(validator){ + var _self = this; + return function(value){ + var editor = _self.get('curEditor'), + record = editor ? editor.getValue() : _self.get('record'); + if(record){ + return validator(value,record); + } + }; + }, + /** + * @protected + * \u7f16\u8f91\u5668\u5b57\u6bb5\u5b9a\u4f4d + */ + focusEditor : function(editor,field){ + var form = editor.get('form'), + control = form.getField(field); + if(control){ + control.focus(); + } + }, + /** + * @protected + * \u83b7\u53d6\u5217\u5b9a\u4e49\u4e2d\u7684\u5b57\u6bb5\u5b9a\u4e49\u4fe1\u606f + * @param {BUI.Grid.Column} column \u5217\u5b9a\u4e49 + * @return {Object} \u5b57\u6bb5\u5b9a\u4e49 + */ + getFieldConfig : function(column){ + var editor = column.get('editor'); + if(editor){ + return editor; + } + var cfg = {xtype : 'plain'}; + if(column.get('dataIndex') && column.get('renderer')){ + cfg.renderer = column.get('renderer'); + //cfg.id = column.get('id'); + } + return cfg; + }, + /** + * \u66f4\u65b0\u6570\u636e + * @protected + * @param {Object} record \u7f16\u8f91\u7684\u6570\u636e + * @param {*} value \u7f16\u8f91\u503c + */ + updateRecord : function(store,record,editor){ + var _self = this, + value = editor.getValue(); + BUI.each(value,function(v,k){ + if(BUI.isDate(v)){ + value[k] = v.getTime(); + } + }); + BUI.mix(record,value); + + store.update(record); + }, + /** + * \u83b7\u53d6\u7f16\u8f91\u6b64\u5355\u5143\u683c\u7684\u7f16\u8f91\u5668 + * @protected + * @param {String} field \u70b9\u51fb\u5355\u5143\u683c\u7684\u5b57\u6bb5 + * @return {BUI.Editor.Editor} \u7f16\u8f91\u5668 + */ + getEditor : function(field){ + var _self = this, + editors = _self.get('editors'); + return editors[0]; + }, + /** + * @override + * \u5217\u53d1\u751f\u6539\u53d8 + */ + onColumnVisibleChange : function(column){ + var _self = this, + id = column.get('id'), + editor = _self.getEditor(), + field = editor.getChild(id,true); + if(field){ + field.set('visible',column.get('visible')); + } + }, + /** + * \u663e\u793a\u7f16\u8f91\u5668\u524d + * @protected + * @template + * @param {BUI.Editor.Editor} editor + * @param {Object} options + */ + beforeShowEditor : function(editor,options){ + var _self = this, + grid = _self.get('grid'), + columns = grid.get('columns'), + form = editor.get('form'), + row = $(options.row); + editor.set('width',row.width()); + BUI.each(columns,function(column){ + if(!column.get('visible')){ + field.set('visible',false); + }else{ + var fieldName = column.get('dataIndex'), + field = form.getField(fieldName), + width = column.get('el').outerWidth() - field.getAppendWidth(); + field.set('width',width); + } + }); + }, + /** + * @protected + * \u83b7\u53d6\u8981\u7f16\u8f91\u7684\u503c + * @param {Object} options \u70b9\u51fb\u5355\u5143\u683c\u7684\u4e8b\u4ef6\u5bf9\u8c61 + * @return {*} \u7f16\u8f91\u7684\u503c + */ + getEditValue : function(options){ + return options.record; + }, + /** + * \u83b7\u53d6\u7f16\u8f91\u5668\u7684\u6784\u9020\u51fd\u6570 + * @param {Object} Editor \u547d\u540d\u7a7a\u95f4 + * @return {Function} \u6784\u9020\u51fd\u6570 + */ + getEditorConstructor : function(Editor){ + return Editor.RecordEditor; + }, + /** + * @protected + * \u83b7\u53d6\u5bf9\u9f50\u7684\u8282\u70b9 + * @override + * @param {Object} options \u70b9\u51fb\u5355\u5143\u683c\u7684\u4e8b\u4ef6\u5bf9\u8c61 + * @return {jQuery} + */ + getAlignNode : function(options){ + return $(options.row); + }, + /** + * \u83b7\u53d6\u7f16\u8f91\u7684\u5b57\u6bb5 + * @protected + * @return {Array} \u5b57\u6bb5\u96c6\u5408 + */ + getFields : function(){ + var _self = this, + editors = _self.get('editors'); + return editors[0].get('form').get('children'); + } + }); + return RowEditing; +});/** + * @fileOverview \u8868\u683c\u8ddf\u8868\u5355\u8054\u7528 + * @ignore + */ + +define('bui/grid/plugins/dialogediting',['bui/common'],function (require) { + var BUI = require('bui/common'), + TYPE_ADD = 'add', + TYPE_EDIT = 'edit'; + + /** + * \u8868\u683c\u7684\u7f16\u8f91\u63d2\u4ef6 + * @class BUI.Grid.Plugins.DialogEditing + */ + function Dialog(config){ + Dialog.superclass.constructor.call(this, config); + } + + Dialog.ATTRS = { + /** + * \u7f16\u8f91\u7684\u8bb0\u5f55 + * @type {Object} + * @readOnly + */ + record : { + + }, + /** + * @private + * \u7f16\u8f91\u8bb0\u5f55\u7684index + * @type {Object} + */ + curIndex : { + + }, + /** + * Dialog\u7684\u5185\u5bb9\uff0c\u5185\u90e8\u5305\u542b\u8868\u5355(form) + * @cfg {String} contentId + */ + /** + * Dialog\u7684\u5185\u5bb9\uff0c\u5185\u90e8\u5305\u542b\u8868\u5355(form) + * @type {String} + */ + contentId:{ + + }, + /** + * \u7f16\u8f91\u5668 + * @type {BUI.Editor.DialogEditor} + * @readOnly + */ + editor : { + + }, + /** + * Dialog\u4e2d\u7684\u8868\u5355 + * @type {BUI.Form.Form} + * @readOnly + */ + form : { + + }, + events : { + value : { + /** + * @event + * \u7f16\u8f91\u7684\u8bb0\u5f55\u53d1\u751f\u66f4\u6539 + * @param {Object} e \u4e8b\u4ef6\u5bf9\u8c61 + * @param {Object} e.record \u8bb0\u5f55 + * @param {Object} e.editType \u7f16\u8f91\u7684\u7c7b\u578b add \u6216\u8005 edit + */ + recordchange : false + } + }, + editType : { + + } + }; + + BUI.extend(Dialog,BUI.Base); + + BUI.augment(Dialog,{ + /** + * \u521d\u59cb\u5316 + * @protected + */ + initializer : function (grid) { + var _self = this; + _self.set('grid',grid); + //\u5ef6\u8fdf\u52a0\u8f7d editor\u6a21\u5757 + BUI.use('bui/editor',function(Editor){ + _self._initEditor(Editor); + }); + }, + bindUI : function(grid){ + var _self = this, + triggerCls = _self.get('triggerCls'); + if(triggerCls){ + grid.on('cellclick',function(ev){ + var sender = $(ev.domTarget), + editor = _self.get('editor'); + if(sender.hasClass(triggerCls) && editor){ + + _self.edit(ev.record); + if(grid.get('multipleSelect')){ + return false; + } + } + }); + } + }, + //\u521d\u59cb\u5316\u7f16\u8f91\u5668 + _initEditor : function(Editor){ + var _self = this, + contentId = _self.get('contentId'), + formNode = $('#' + contentId).find('form'), + editor = _self.get('editor'), + cfg = BUI.merge(editor,{ + contentId : contentId, + form : { + srcNode : formNode + } + }); + + editor = new Editor.DialogEditor(cfg); + _self._bindEditor(editor); + _self.set('editor',editor); + _self.set('form',editor.get('form')); + }, + //\u7ed1\u5b9a\u7f16\u8f91\u5668\u4e8b\u4ef6 + _bindEditor : function(editor){ + var _self = this; + editor.on('accept',function(){ + var form = editor.get('form'), + record = form.serializeToObject(); + _self.saveRecord(record); + }); + }, + /** + * \u7f16\u8f91\u8bb0\u5f55 + * @param {Object} record \u8bb0\u5f55 + */ + edit : function(record){ + var _self = this; + _self.set('editType',TYPE_EDIT); + _self.showEditor(record); + }, + /** + * \u6dfb\u52a0\u8bb0\u5f55 + * @param {Object} record \u8bb0\u5f55 + * @param {Number} [index] \u6dfb\u52a0\u5230\u7684\u4f4d\u7f6e\uff0c\u9ed8\u8ba4\u6dfb\u52a0\u5728\u6700\u540e + */ + add : function(record,index){ + var _self = this; + _self.set('editType',TYPE_ADD); + _self.set('curIndex',index); + _self.showEditor(record); + }, + /** + * @private + * \u4fdd\u5b58\u8bb0\u5f55 + */ + saveRecord : function(record){ + var _self = this, + grid = _self.get('grid'), + editType = _self.get('editType'), + curIndex = _self.get('curIndex'), + store = grid.get('store'), + curRecord = _self.get('record'); + + BUI.mix(curRecord,record); + + if(editType == TYPE_ADD){ + if(curIndex != null){ + store.addAt(curRecord,curIndex); + }else{ + store.add(curRecord); + } + }else{ + store.update(curRecord); + } + }, + /** + * @private + * \u663e\u793a\u7f16\u8f91\u5668 + */ + showEditor : function(record){ + var _self = this, + editor = _self.get('editor'); + + editor.show(); + editor.setValue(record); + _self.set('record',record); + _self.fire('recordchange',{record : record,editType : _self.get('editType')}); + }, + /** + * \u53d6\u6d88\u7f16\u8f91 + */ + cancel : function(){ + var _self = this, + editor = _self.get('editor'); + editor.cancel(); + }, + destructor : function(){ + var _self = this, + editor = _self.get('editor'); + editor && editor.destroy(); + _self.off(); + _self.clearAttrVals(); + } + + }); + + return Dialog; +});/** + * @fileOverview \u9009\u62e9\u6846\u547d\u540d\u7a7a\u95f4\u5165\u53e3\u6587\u4ef6 + * @ignore + */ + +define('bui/tree',['bui/common','bui/tree/treemixin','bui/tree/treelist'],function (require) { + var BUI = require('bui/common'), + Tree = BUI.namespace('Tree'); + + BUI.mix(Tree,{ + TreeList : require('bui/tree/treelist'), + Mixin : require('bui/tree/treemixin') + }); + return Tree; +});/** + * @fileOverview \u6811\u5f62\u6269\u5c55\uff0c\u57fa\u4e8elist\u6269\u5c55\uff0c\u53ef\u4ee5\u7ec4\u5408\u51fatree list,tree grid ,tree menu + * @ignore + */ + +define('bui/tree/treemixin',['bui/common','bui/data'],function (require) { + + //\u5c06id \u8f6c\u6362\u6210node + function makeSureNode(self,node){ + if(BUI.isString(node)){ + node = self.getItem(node); + } + return node; + } + + var BUI = require('bui/common'), + Data = require('bui/data'), + EXPAND = 'expanded', + LOADING = 'loading', + CHECKED = 'checked', + PARTIAL_CHECKED = 'partial-checked', + MAP_TYPES = { + NONE : 'none', + ALL : 'all', + CUSTOM : 'custom', + ONLY_LEAF : 'onlyLeaf' + }, + CLS_ICON = 'x-tree-icon', + CLS_ELBOW = 'x-tree-elbow', + CLS_SHOW_LINE = 'x-tree-show-line', + CLS_ICON_PREFIX = CLS_ELBOW + '-', + CLS_ICON_WRAPER = CLS_ICON + '-wraper', + CLS_LINE = CLS_ICON_PREFIX + 'line', + CLS_END = CLS_ICON_PREFIX + 'end', + CLS_EMPTY = CLS_ICON_PREFIX + 'empty', + CLS_EXPANDER = CLS_ICON_PREFIX + 'expander', + CLS_CHECKBOX = CLS_ICON + '-checkbox', + CLS_EXPANDER_END = CLS_EXPANDER + '-end', + Mixin = function(){ + + }; + + /** + * @class BUI.Tree.Mixin + * \u6811\u63a7\u4ef6\u7684\u6269\u5c55\uff0c\u53ef\u4ee5\u5e94\u7528\u4e8eList,Grid\u7b49\u63a7\u4ef6 + */ + Mixin.ATTRS = { + + + /** + * \u6811\u7684\u6570\u636e\u7f13\u51b2\u7c7b\u5bf9\u8c61,\u7528\u4e8e\u64cd\u4f5c\u6570\u636e\u7684\u52a0\u8f7d\u3001\u589e\u5220\u6539 + *
                
                +     * //\u6570\u636e\u7f13\u51b2\u7c7b
                +     * var store = new Data.TreeStore({
                +     *     root : {
                +     *       id : '0',
                +     *      text : '0'
                +     *     },
                +     *     url : 'data/nodes.php'
                +     *   });
                +     *   
                +     * var tree = new Tree.TreeList({
                +     *   render : '#t1',
                +     *   showLine : true,
                +     *   height:300,
                +     *   store : store,
                +     *   showRoot : true
                +     * });
                +     * tree.render();
                +     * 
                +     * 
                + * @cfg {BUI.Data.TreeStore} store + */ + /** + * \u6811\u7684\u6570\u636e\u7f13\u51b2\u7c7b\u5bf9\u8c61,\u9ed8\u8ba4\u90fd\u4f1a\u751f\u6210\u5bf9\u5e94\u7684\u7f13\u51b2\u5bf9\u8c61 + *
                
                +     * var store = tree.get('store');
                +     * 
                + * @type {BUI.Data.TreeStore} + */ + store : { + getter : function(v){ + if(!v){ + var _self = this, + store = new Data.TreeStore({ + root : _self.get('root'), + data : _self.get('nodes') + }); + _self.setInternal('store',store); + return store; + } + return v; + } + }, + /** + * \u6811\u7684\u6839\u8282\u70b9 + *
                
                +     *   //\u5982\u679c\u6570\u636e\u5b58\u5728\u6839\u8282\u70b9\uff0c\u5219\u914d\u7f6e\u6839\u8282\u70b9\uff0c\u4ee5\u4fbf\u4e8e\u663e\u793a
                +     *   var tree = new TreeList({
                +     *     root : {id: '0',text : '0',children:[{},{}]},
                +     *     showRoot : true
                +     *   });
                +     *   //\u5982\u679c\u914d\u7f6estore\uff0c\u5219\u4e0d\u9700\u8981\u914d\u7f6e\u6b64\u5c5e\u6027
                +     *   var store = new Data.TreeStore({
                +     *     root : {id: '0',text : '0',children:[{},{}]}
                +     *   });
                +     *   
                +     *   var tree = new TreeList({
                +     *     store : store,
                +     *     showRoot : true
                +     *   });
                +     * 
                + * @cfg {Object} root + */ + root : { + + }, + /** + * \u5b50\u8282\u70b9\u96c6\u5408 + *
                
                +     *   //\u5982\u679c\u4e0d\u663e\u793a\u6839\u8282\u70b9\uff0c\u5e76\u4e14\u6570\u636e\u6e90\u4e2d\u4e0d\u5b58\u5728\u6839\u8282\u70b9\uff0c\u53ef\u4ee5\u4ec5\u914d\u7f6e\u6b64\u5c5e\u6027
                +     *   var tree = new TreeList({
                +     *     nodes:[{},{}]
                +     *   });
                +     * 
                + * @cfg {Array} nodes + */ + nodes : { + sync : false + }, + /** + * \u653e\u7f6e\u8282\u70b9Icon\u7684\u5bb9\u5668,\u4e3a\u7a7a\u65f6\uff0c\u653e\u7f6e\u5728\u8282\u70b9\u7684\u6700\u524d\u9762 + * @protected + * @type {String} + */ + iconContainer : { + + }, + /** + * \u653e\u7f6eicon\u5916\u5c42\u7684\u6a21\u677f\uff0c\u7a7a\u767dicon\u3001\u53f6\u5b50\u8282\u70b9\u7684icon\u3001\u975e\u53f6\u5b50\u8282\u70b9\u7684Icon + * @protected + * @type {String} + */ + iconWraperTpl : { + value : '{icons}' + }, + /** + * \u662f\u5426\u663e\u793a\u8fde\u63a5\u7ebf + *
                
                +     *  var tree = new TreeList({
                +     *    nodes : [],
                +     *    showLine : true
                +     *  });
                +     * 
                + * @cfg {Boolean} showLine + */ + /** + * \u662f\u5426\u663e\u793a\u8fde\u63a5\u7ebf + * @type {Boolean} showLine + */ + showLine : { + value : false + }, + /** + * \u56fe\u6807\u6240\u4f7f\u7528\u7684\u6a21\u677f + * @protected + * @type {Object} + */ + iconTpl : { + value : '' + }, + /** + * \u53f6\u5b50\u8282\u70b9\u5e94\u7528\u7684\u6837\u5f0f + *
                
                +     *  var tree = new TreeList({
                +     *    nodes : [{},{}],
                +     *    leafCls : 'file',
                +     *    dirCls : 'folder' 
                +     *  });
                +     * 
                + * @cfg {String} [leafCls = 'x-tree-elbow-leaf'] + */ + leafCls : { + value : CLS_ICON_PREFIX + 'leaf' + }, + + /** + * \u975e\u53f6\u5b50\u8282\u70b9\u5e94\u7528\u7684\u6837\u5f0f + * @cfg {String} [dirCls = 'x-tree-elbow-dir'] + */ + dirCls : { + value : CLS_ICON_PREFIX + 'dir' + }, + /** + * \u52fe\u9009\u7c7b\u578b\uff0c\u76ee\u524d\u63d0\u4f9b\u4e00\u4e0b\u51e0\u79cd\u52fe\u9009\u65b9\u5f0f: + *
                  + *
                1. all : \u5168\u90e8\u8282\u70b9\u53ef\u4ee5\u52fe\u9009
                2. + *
                3. onlyLeaf : \u53ea\u6709\u5b50\u8282\u70b9\u53ef\u4ee5\u52fe\u9009
                4. + *
                5. custom : \u81ea\u5b9a\u4e49\u52fe\u9009\uff0c\u53ea\u6709\u8282\u70b9\u6570\u636e\u4e0a\u6709checked\u5b57\u6bb5\u624d\u5141\u8bb8\u52fe\u9009
                6. + *
                7. none : \u5168\u90e8\u8282\u70b9\u4e0d\u53ef\u52fe\u9009
                8. + *
                + * @cfg {Object} [checkType = 'custom'] + */ + checkType : { + value : 'custom' + }, + /** + * @private + * \u52fe\u9009\u5b57\u6bb5 + * @type {String} + */ + checkedField : { + valueFn : function(){ + return this.getStatusField('checked'); + } + }, + /** + * \u9009\u9879\u5bf9\u8c61\u4e2d\u5c5e\u6027\u4f1a\u76f4\u63a5\u5f71\u54cd\u76f8\u5e94\u7684\u72b6\u6001,\u9ed8\u8ba4\uff1a + *
                
                +     * //\u9ed8\u8ba4\u503c
                +     * {
                +     *   expanded : 'expanded',
                +     *   disabled : 'disabled',
                +     *   checked : 'checked'
                +     * }
                +     * //\u5bf9\u8c61
                +     * var node = {id : '1',text : '1',checked : true,expanded : true};
                +     * 
                +     * //\u5982\u679c\u4f60\u7684\u6570\u636e\u6e90\u4e2d\u7684\u5b57\u6bb5\u540d\u8ddf\u8fd9\u4e9b\u72b6\u6001\u540d\u4e0d\u4e00\u81f4\uff0c\u4f60\u53ef\u4ee5\u81ea\u5df1\u4fee\u6539
                +     * var tree = new TreeList({
                +     *   nodes : [],
                +     *   itemStatusFields : {
                +     *     disabled : 'hasDisabled', 
                +     *     custom : 'custom'  //\u6dfb\u52a0\u81ea\u5b9a\u4e49\u5c5e\u6027\uff0c\u6b64\u65f6\u8282\u70b9\u751f\u6210\u540e\u4f1a\u81ea\u52a8\u6dfb\u52a0\u5bf9\u5e94\u7684\u6837\u5f0f bui + xclass + 'custom'
                +     *   }
                +     * });
                +     * 
                + * @override + * @cfg {Object} itemStatusFields + */ + itemStatusFields : { + value : { + expanded : 'expanded', + disabled : 'disabled', + checked : 'checked' + } + }, + /** + * \u6587\u4ef6\u5939\u662f\u5426\u53ef\u9009\uff0c\u7528\u4e8e\u9009\u62e9\u8282\u70b9\u65f6\uff0c\u907f\u514d\u9009\u4e2d\u975e\u53f6\u5b50\u8282\u70b9 + * @cfg {Boolean} [dirSelectable = true] + */ + dirSelectable : { + value : true + }, + /** + * \u662f\u5426\u663e\u793a\u6839\u8282\u70b9 + *
                
                +     *
                +     *  var tree = new TreeList({
                +     *    root : {id : '0',text : '0',childrent : []},
                +     *    showRoot : true
                +     *  });
                +     *   
                +     * 
                + * @type {Boolean} + */ + showRoot : { + value : false + }, + events : { + value : { + /** + * @event + * \u5c55\u5f00\u8282\u70b9 + * @param {Object} e \u4e8b\u4ef6\u5bf9\u8c61 + * @param {Object} e.Node \u8282\u70b9 + * @param {HTMLElement} e.element \u8282\u70b9\u7684DOM + */ + expanded : false, + /** + * @event + * \u6298\u53e0\u8282\u70b9 + * @param {Object} e \u4e8b\u4ef6\u5bf9\u8c61 + * @param {Object} e.Node \u8282\u70b9 + * @param {HTMLElement} e.element \u8282\u70b9\u7684DOM + */ + collapsed : false, + /** + * @event + * \u52fe\u9009\u6539\u53d8\u4e8b\u4ef6 + * @param {Object} e \u4e8b\u4ef6\u5bf9\u8c61 + * @param {Object} e.Node \u8282\u70b9 + * @param {Boolean} e.checked \u9009\u4e2d\u72b6\u6001 + * @param {HTMLElement} e.element \u8282\u70b9\u7684DOM + */ + checkchange : false + } + }, + /** + * \u5f00\u59cb\u7684\u5c42\u7ea7\uff0c\u5982\u679c\u663e\u793a\u6839\u8282\u70b9\uff0c\u4ece0\u5f00\u59cb\uff0c\u4e0d\u663e\u793a\u6839\u8282\u70b9\u4ece1\u5f00\u59cb + * @private + * @readOnly + * @type {Number} + */ + startLevel : { + value : 1 + } + }; + + BUI.augment(Mixin,{ + /** + * \u6298\u53e0\u6240\u6709 + *
                
                +     *  tree.collapseAll();
                +     * 
                + */ + collapseAll: function(){ + var _self = this, + elements = _self.get('view').getAllElements(); + + BUI.each(elements,function(element){ + var item = _self.getItemByElement(element); + if(item){ + _self._collapseNode(item,element,true); + } + }); + }, + /** + * \u6298\u53e0\u8282\u70b9 + *
                
                +     *  //\u83b7\u53d6\u8282\u70b9\u540e\uff0c\u6298\u53e0
                +     *  var node = tree.findNode('id');
                +     *  tree.collapseNode(node);
                +     *  //\u76f4\u63a5\u901a\u8fc7id \u6298\u53e0
                +     *  tree.collapseNode('id');
                +     * 
                + * @param {String|Object|BUI.Data.Node} node \u8282\u70b9 + */ + collapseNode : function(node){ + var _self = this, + element; + if(BUI.isString(node)){ + node = _self.findNode(node); + } + element = _self.findElement(node); + + _self._collapseNode(node,element); + }, + /* + * \u5c55\u5f00\u6240\u6709 + *
                
                +     *  tree.expandAll();
                +     * 
                + */ + expandAll : function(){ + var _self = this, + elements = _self.get('view').getAllElements(); + + BUI.each(elements,function(element){ + var item = _self.getItemByElement(element); + _self._expandNode(item,element,true); + }); + }, + /** + * \u5c55\u5f00\u8282\u70b9 + *
                
                +     *  //\u83b7\u53d6\u8282\u70b9\u540e\u5c55\u5f00
                +     *  var node = tree.findNode('id');
                +     *  tree.expandNode(node);
                +     *  //\u4f7f\u7528store\u65f6\uff0c\u83b7\u53d6\u8282\u70b9\uff0c\u7136\u540e\u5c55\u5f00
                +     *  var node = store.findNode('id');
                +     *  tree.expandNode(node);
                +     *  //\u76f4\u63a5\u4f7f\u7528id \u5c55\u5f00
                +     *  tree.expandNode('id');
                +     * 
                + * ** Notes ** + * \u7531\u4e8e\u6811\u63a7\u4ef6\u5176\u5b9e\u662f\u4e00\u4e2a\u5217\u8868\uff0c\u6240\u4ee5\u672a\u5c55\u5f00\u8282\u70b9\u7684\u5b50\u8282\u70b9\u5176\u5b9e\u4e0d\u5728\u5217\u8868\u4e2d\uff0c\u6240\u4ee5\u8fd9\u4e9b\u8282\u70b9\u901a\u8fc7tree.getItem('id'),\u6b64\u65f6\u67e5\u627e\u4e0d\u5230\u5bf9\u5e94\u7684\u8282\u70b9 + * @param {String|Object|BUI.Data.Node} node \u8282\u70b9\u6216\u8005 \u8282\u70b9id + */ + expandNode : function(node,deep){ + var _self = this, + element; + if(BUI.isString(node)){ + node = _self.findNode(node); + } + + if(node.parent && !_self.isExpanded(node.parent)){ + _self.expandNode(node.parent); + } + + element = _self.findElement(node); + _self._expandNode(node,element,deep); + }, + /** + * \u6cbf\u7740path(id\u7684\u8fde\u63a5\u4e32) \u5c55\u5f00 + *
                +     *  
                +     *    var path = "0,1,12,121"; //\u6cbf\u7740\u6839\u8282\u70b90\uff0c\u6811\u8282\u70b9 1,12\u76f4\u5230121\u7684\u8def\u5f84\u5c55\u5f00
                +     *    tree.expandPath(path); //\u5982\u679c\u4e2d\u95f4\u6709\u8282\u70b9\u4e0d\u5b58\u5728\uff0c\u7ec8\u6b62\u5c55\u5f00
                +     *  
                +     * 
                + * @param {String} path \u8282\u70b9\u7684path\uff0c\u4ece\u6839\u8282\u70b9\uff0c\u5230\u5f53\u524d\u8282\u70b9\u7684id\u7ec4\u5408 + */ + expandPath : function(path,async,startIndex){ + if(!path){ + return; + } + startIndex = startIndex || 0; + var _self = this, + store = _self.get('store'), + preNode, + node, + i, + id, + arr = path.split(','); + + preNode = _self.findNode(arr[startIndex]); + for(i = startIndex + 1; i < arr.length ; i++){ + id = arr[i]; + node = _self.findNode(id,preNode); + if(preNode && node){ //\u7236\u5143\u7d20\uff0c\u5b50\u5143\u7d20\u540c\u65f6\u5b58\u5728 + _self.expandNode(preNode); + preNode = node; + }else if(preNode && async){ + store.load({id : preNode.id},function(){ //\u52a0\u8f7d\u5b8c\u6210\u540e + node = _self.findNode(id,preNode); + if(node){ + _self.expandPath(path,async,i); + } + }); + break; + } + } + }, + /** + * \u67e5\u627e\u8282\u70b9 + *
                
                +     *  var node = tree.findNode('1');//\u4ece\u6839\u8282\u70b9\u5f00\u59cb\u67e5\u627e\u8282\u70b9
                +     *  
                +     *  var subNode = tree.findNode('123',node); //\u4ece\u6307\u5b9a\u8282\u70b9\u5f00\u59cb\u67e5\u627e
                +     * 
                + * @param {String} id \u8282\u70b9Id + * @param {BUI.Data.Node} [parent] \u7236\u8282\u70b9 + * @return {BUI.Data.Node} \u8282\u70b9 + */ + findNode : function(id,parent){ + return this.get('store').findNode(id,parent); + }, + /** + * \u83b7\u53d6\u6240\u6709\u52fe\u9009\u7684\u5b50\u8282\u70b9 + *
                
                +     *  //\u83b7\u53d6\u6240\u6709\u9009\u4e2d\u7684\u53f6\u5b50\u8282\u70b9
                +     *  var nodes = tree.getCheckedLeaf();
                +     *  
                +     *  //\u83b7\u53d6\u6307\u5b9a\u8282\u70b9\u9009\u4e2d\u7684\u53f6\u5b50\u8282\u70b9
                +     *  var node = tree.findNode('1'),
                +     *    nodes = tree.getCheckedLeaf(node);
                +     *  
                +     * 
                + * @param {BUI.Data.Node} [parent] \u7236\u8282\u70b9 + * @return {Array} \u8282\u70b9\u5217\u8868 + */ + getCheckedLeaf : function(parent){ + var _self = this, + store = _self.get('store'); + + return store.findNodesBy(function(node){ + return node.leaf && _self.isChecked(node); + },parent); + }, + /** + * \u83b7\u53d6\u52fe\u9009\u4e2d\u7684\u8282\u70b9\u5217\u8868 + *
                
                +     *  //\u83b7\u53d6\u6240\u6709\u9009\u4e2d\u8282\u70b9
                +     *  var nodes = tree.getCheckedNodes();
                +     *  
                +     *  //\u83b7\u53d6\u6307\u5b9a\u8282\u70b9\u9009\u4e2d\u7684\u8282\u70b9
                +     *  var node = tree.findNode('1'),
                +     *    nodes = tree.getCheckedNodes(node);
                +     *  
                +     * 
                + * @param {BUI.Data.Node} [parent] \u7236\u8282\u70b9 + * @return {Array} \u8282\u70b9\u5217\u8868 + */ + getCheckedNodes : function(parent){ + var _self = this, + store = _self.get('store'); + + return store.findNodesBy(function(node){ + return _self.isChecked(node); + },parent); + }, + /** + * \u8282\u70b9\u662f\u5426\u5c55\u5f00,\u5982\u679c\u8282\u70b9\u662f\u53f6\u5b50\u8282\u70b9\uff0c\u5219\u59cb\u7ec8\u662ffalse + *
                
                +     *  tree.isExpanded(node);
                +     * 
                + * @return {Boolean} \u662f\u5426\u5c55\u5f00 + */ + isExpanded : function(node){ + if(!node || node.leaf){ + return false; + } + var _self = this, + element; + if(_self._isRoot(node) && !_self.get('showRoot')){ //\u6839\u8282\u70b9\uff0c\u5207\u4e0d\u663e\u793a\u6839\u8282\u70b9\u65f6\uff0c\u8ba4\u4e3a\u6839\u8282\u70b9\u65f6\u5c55\u5f00\u7684 + return true; + } + if(BUI.isString(node)){ + item = _self.getItem(node); + } + element = _self.findElement(node); + return this._isExpanded(node,element); + }, + /** + * \u8282\u70b9\u662f\u5426\u52fe\u9009 + *
                
                +     *  tree.isChecked(node);
                +     * 
                + * @return {Boolean} \u8282\u70b9\u662f\u5426\u52fe\u9009 + */ + isChecked : function(node){ + if(!node){ + return false; + } + return node[this.get('checkedField')];//this.getStatusValue(node,'checked'); + }, + /** + * \u5207\u6362\u663e\u793a\u9690\u85cf + *
                
                +     *  var node = tree.getItem('id');
                +     *  tree.collapseNode(node); //\u8282\u70b9\u6536\u7f29
                +     *  tree.toggleExpand(node); //\u8282\u70b9\u5c55\u5f00
                +     *  tree.toggleExpand(node); //\u8282\u70b9\u6536\u7f29
                +     * 
                + * @param {String|Object|BUI.Data.Node} node \u8282\u70b9 + */ + toggleExpand : function(node){ + var _self = this, + element; + if(BUI.isString(node)){ + item = _self.getItem(node); + } + element = _self.findElement(node); + _self._toggleExpand(node,element); + }, + /** + * \u8bbe\u7f6e\u8282\u70b9\u52fe\u9009\u72b6\u6001 + *
                
                +     *  var node = tree.findNode('1');
                +     *  tree.setNodeChecked(node,true); //\u52fe\u9009
                +     *  tree.setNodeChecked(node,false); //\u53d6\u6d88\u52fe\u9009
                +     * 
                + * @param {String|Object|BUI.Data.Node} node \u8282\u70b9\u6216\u8005\u8282\u70b9id + * @param {Boolean} checked \u662f\u5426\u52fe\u9009 + */ + setNodeChecked : function(node,checked,deep){ + deep = deep == null ? true : deep; + var _self = this, + parent, + element; + node = makeSureNode(this,node); + parent = node.parent; + if(!_self.isCheckable(node)){ + return; + } + + if(_self.isChecked(node) !== checked || _self.hasStatus(node,'checked') !== checked){ + + element = _self.findElement(node); + if(element){ + _self.setItemStatus(node,CHECKED,checked,element); //\u8bbe\u7f6e\u9009\u4e2d\u72b6\u6001 + _self._resetPatialChecked(node,checked,checked,element); //\u8bbe\u7f6e\u90e8\u5206\u52fe\u9009\u72b6\u6001 + }else if(!_self.isItemDisabled(node)){ + _self.setStatusValue(node,'checked',checked); + } + if(parent){ //\u8bbe\u7f6e\u7236\u5143\u7d20\u9009\u4e2d + if(_self.isChecked(parent) != checked){ + _self._resetParentChecked(parent); + }else{ + _self._resetPatialChecked(parent,null,null,null,true); + } + } + _self.fire('checkchange',{node : node,element: element,checked : checked}); + + } + if(!node.leaf && deep){ //\u6811\u8282\u70b9\uff0c\u52fe\u9009\u6240\u6709\u5b50\u8282\u70b9 + BUI.each(node.children,function(subNode){ + _self.setNodeChecked(subNode,checked,deep); + }); + } + }, + + //\u521d\u59cb\u5316\u6839\u8282\u70b9 + _initRoot : function(){ + var _self = this, + store = _self.get('store'), + root, + showRoot = _self.get('showRoot'), + nodes; + if(store){ + root = store.get('root'); + _self.setInternal('root',root); + if(showRoot){ + nodes = [root]; + }else{ + nodes = root.children; + } + + BUI.each(nodes,function(subNode){ + _self._initChecked(subNode,true); + }); + _self.clearItems(); + _self.addItems(nodes); + //_self.set('nodes',nodes); + } + + }, + //\u521d\u59cb\u5316\u8282\u70b9\u7684\u52fe\u9009 + _initChecked : function(node,deep){ + var _self = this, + checkType = _self.get('checkType'), + checkedField = _self.get('checkedField'), + parent; + if(checkType === MAP_TYPES.NONE){ //\u4e0d\u5141\u8bb8\u9009\u4e2d + delete node[checkedField]; + return; + } + + if(checkType === MAP_TYPES.ONLY_LEAF){ //\u4ec5\u53f6\u5b50\u8282\u70b9\u53ef\u9009 + if(node.leaf){ + node[checkedField] = node[checkedField] || false; + }else{ + delete node[checkedField]; + if(deep){ + BUI.each(node.children,function(subNode){ + _self._initChecked(subNode,deep); + }); + } + } + return; + } + + if(checkType === MAP_TYPES.ALL){ //\u6240\u6709\u5141\u8bb8\u9009\u4e2d + node[checkedField] = node[checkedField] || false; + } + + if(!node || !_self.isCheckable(node)){ //\u5982\u679c\u4e0d\u53ef\u9009\uff0c\u5219\u4e0d\u5904\u7406\u52fe\u9009 + return; + } + parent = node.parent; + if(!_self.isChecked(node)){ //\u8282\u70b9\u672a\u88ab\u9009\u62e9\uff0c\u6839\u636e\u7236\u3001\u5b50\u8282\u70b9\u5904\u7406\u52fe\u9009 + if(parent && _self.isChecked(parent)){ //\u5982\u679c\u7236\u8282\u70b9\u9009\u4e2d\uff0c\u5f53\u524d\u8282\u70b9\u5fc5\u987b\u52fe\u9009 + _self.setStatusValue(node,'checked',true); + } + if(_self._isAllChildrenChecked(node)){ + _self.setStatusValue(node,'checked',true); + } + } + if(deep){ + BUI.each(node.children,function(subNode){ + _self._initChecked(subNode,deep); + }); + } + + }, + //\u8bbe\u7f6e\u90e8\u5206\u9009\u4e2d\u6548\u679c + _resetPatialChecked : function(node,checked,hasChecked,element,upper){ + if(!node || node.leaf){ + return true; + } + var _self = this, + hasChecked; + checked = checked == null ? _self.isChecked(node) : checked; + if(checked){ + _self.setItemStatus(node,PARTIAL_CHECKED,false,element); + return; + } + hasChecked = hasChecked == null ? _self._hasChildChecked(node) : hasChecked; + + _self.setItemStatus(node,PARTIAL_CHECKED,hasChecked,element); + if(upper && node.parent){ + _self._resetPatialChecked(node.parent,false,hasChecked ? hasChecked : null,null,upper) + } + + }, + //\u5b50\u8282\u70b9\u53d8\u5316\uff0c\u91cd\u7f6e\u7236\u8282\u70b9\u52fe\u9009 + _resetParentChecked : function(parentNode){ + if(!this.isCheckable(parentNode)){ + return; + } + var _self = this, + allChecked = _self._isAllChildrenChecked(parentNode); + _self.setStatusValue(parentNode,'checked',allChecked); + _self.setNodeChecked(parentNode,allChecked,false); + _self._resetPatialChecked(parentNode,allChecked,null,null); + }, + //\u7ed1\u5b9a\u4e8b\u4ef6 + __bindUI : function(){ + var _self = this, + el = _self.get('el'); + + //\u70b9\u51fb\u9009\u9879 + _self.on('itemclick',function(ev){ + var sender = $(ev.domTarget), + element = ev.element, + node = ev.item; + if(sender.hasClass(CLS_EXPANDER)){ + _self._toggleExpand(node,element); //\u70b9\u51fb\u5c55\u5f00\u6536\u7f29\u8282\u70b9\uff0c\u4e0d\u89e6\u53d1\u9009\u4e2d\u4e8b\u4ef6 + return false; + }else if(sender.hasClass(CLS_CHECKBOX)){ + var checked = _self.isChecked(node); + _self.setNodeChecked(node,!checked); + } + + }); + + _self.on('itemdblclick',function(ev){ + var sender = $(ev.domTarget), + element = ev.element, + node = ev.item; + if(!sender.hasClass(CLS_EXPANDER)){ + _self._toggleExpand(node,element); + } + }); + + _self.on('beforeselectedchange',function(ev){ + var dirSelectable = _self.get('dirSelectable'), + node = ev.item; + if(!dirSelectable && !node.leaf){ //\u5982\u679c\u963b\u6b62\u975e\u53f6\u5b50\u8282\u70b9\u9009\u4e2d + return false; + } + }); + + _self.on('itemrendered',function(ev){ + var node = ev.item, + element = ev.domTarget; + _self._resetIcons(node,element); + if(_self.isCheckable(node)){ + _self._resetPatialChecked(node,null,null,element); + } + if(_self._isExpanded(node,element)){ + _self._showChildren(node); + } + + }); + }, + //\u662f\u5426\u6240\u6709\u5b50\u8282\u70b9\u88ab\u9009\u4e2d + _isAllChildrenChecked : function(node){ + if(!node || node.leaf){ + return false; + } + var _self = this, + children = node.children, + rst = true; + BUI.each(children,function(subNode){ + rst = rst && _self.isChecked(subNode); + if(!rst){ //\u5b58\u5728\u672a\u9009\u4e2d\u7684\uff0c\u8fd4\u56de + return false; + } + }); + return rst; + }, + //\u662f\u5426\u6709\u5b50\u8282\u70b9\u9009\u4e2d + _hasChildChecked : function(node){ + if(!node || node.leaf){ + return false; + } + var _self = this; + + return _self.getCheckedNodes(node).length != 0; + }, + //\u662f\u5426\u662f\u6839\u8282\u70b9 + _isRoot : function(node){ + var _self = this, + store = _self.get('store'); + if(store && store.get('root') == node){ + return true; + } + return false; + }, + //\u8bbe\u7f6e\u52a0\u8f7d\u72b6\u6001 + _setLoadStatus : function(node,element,loading){ + var _self = this; + _self.setItemStatus(node,LOADING,loading,element); + }, + //\u52a0\u8f7d\u8282\u70b9\u524d + _beforeLoadNode : function(node){ + var _self = this, + element; + if(BUI.isString(node)){ + node = _self.findNode(node); + } + element = _self.findElement(node) + if(element){ + _self._setLoadStatus(node,element,true); + } + if(node){ + BUI.each(node.children,function(subNode){ + _self._removeNode(subNode); + }); + + } + + }, + /** + * @override + * @protected + * \u52a0\u8f7d\u8282\u70b9\u524d\u89e6\u53d1 + */ + onBeforeLoad : function(e){ + var _self = this, + params = e.params, + id = params.id, + node = _self.findNode(id) || _self.get('root'); + _self._beforeLoadNode(node); + }, + //\u6dfb\u52a0\u8282\u70b9 + _addNode : function(node,index){ + var _self = this, + parent = node.parent, + scount,//\u5144\u5f1f\u8282\u70b9\u7684\u6570\u91cf + prevNode, //\u524d\u4e00\u4e2a\u8282\u70b9 + nextNode, //\u540e\u4e00\u4e2a\u8282\u70b9\uff0c\u7528\u4e8e\u8ba1\u7b97\u672c\u8282\u70b9\u653e\u7f6e\u7684\u4f4d\u7f6e,\u4e0d\u4e00\u5b9a\u662f\u540c\u7ea7\u8282\u70b9 + cIndex;//\u8282\u70b9\u63d2\u5165\u7684\u4f4d\u7f6e + _self._initChecked(node,true); + if(parent){ + if(_self.isExpanded(parent)){ //\u5c55\u5f00\u7684\u8282\u70b9 + scount = parent.children.length; + + cIndex = _self._getInsetIndex(node);//\u4e0b\u4e00\u4e2a\u8282\u70b9\u7684\u4f4d\u7f6e + _self.addItemAt(node,cIndex); + if(index == scount -1 && index > 0){ //\u4f5c\u4e3a\u6700\u540e\u4e00\u4e2a\u8282\u70b9\uff0c\u66f4\u65b0\u524d\u4e00\u4e2a\u5144\u5f1f\u8282\u70b9\u7684\u56fe\u6807 + prevNode = parent.children[index - 1]; + _self._updateIcons(prevNode); + } + } + _self._updateIcons(parent); //\u66f4\u65b0\u7236\u8282\u70b9\u7684icon + }else{ //\u6ca1\u6709\u7236\u8282\u70b9\uff0c\u5219\u6dfb\u52a0\u5230\u8ddf\u8282\u70b9\u4e0b + cIndex = _self._getInsetIndex(node); + _self.addItemAt(node,cIndex); + prevNode = _self.get('nodes')[index - 1]; + _self._updateIcons(prevNode); + } + }, + //\u83b7\u53d6\u8282\u70b9\u7684\u63d2\u5165\u4f4d\u7f6e + _getInsetIndex : function(node){ + var _self = this, + nextNode, + rst = null; + nextNode = _self._getNextItem(node); + if(nextNode){ + return _self.indexOfItem(nextNode); + } + return _self.getItemCount(); + }, + //\u83b7\u53d6\u663e\u793a\u5728\u5217\u8868\u4e0a\u7684\u4e0b\u4e00\u9879\uff0c\u4e0d\u4ec5\u4ec5\u662f\u540c\u7ea7\u8282\u70b9 + _getNextItem : function(item){ + var _self = this, + parent = item.parent, + slibings, + cIndex, + rst = null; + if(!parent){ + return null; + } + slibings = parent.children; + cIndex = BUI.Array.indexOf(item,slibings) + rst = slibings[cIndex + 1]; + + return rst || _self._getNextItem(parent); + }, + /** + * @override + * @protected + * \u91cd\u5199\u6dfb\u52a0\u8282\u70b9\u65b9\u6cd5 + */ + onAdd : function(e){ + var _self = this, + node = e.node, + index = e.index; + _self._addNode(node,index); + }, + //\u66f4\u65b0\u8282\u70b9 + _updateNode : function(node){ + var _self = this; + _self.updateItem(node); + _self._updateIcons(node); + }, + /** + * @override + * @protected + * \u91cd\u5199\u66f4\u65b0\u8282\u70b9\u65b9\u6cd5 + */ + onUpdate : function(e){ + var _self = this, + node = e.node; + _self._updateNode(node); + }, + //\u5220\u9664\u8282\u70b9 + _removeNode : function(node,index){ + var _self = this, + parent = node.parent, + scount, + prevNode; + _self.collapseNode(node); //\u6536\u7f29\u8282\u70b9\uff0c\u4ee5\u4fbf\u4e8e\u540c\u65f6\u5220\u9664\u5b50\u8282\u70b9 + if(!parent){ + return; + } + _self.removeItem(node); + if(_self.isExpanded(parent)){ //\u5982\u679c\u7236\u8282\u70b9\u5c55\u5f00 + + scount = parent.children.length; + if(scount == index && index !== 0){ //\u5982\u679c\u5220\u9664\u7684\u662f\u6700\u540e\u4e00\u4e2a\uff0c\u66f4\u65b0\u524d\u4e00\u4e2a\u8282\u70b9\u56fe\u6807 + prevNode = parent.children[index - 1]; + _self._updateIcons(prevNode); + } + } + _self._updateIcons(parent); + _self._resetParentChecked(parent); + }, + /** + * @override + * @protected + * \u91cd\u5199\u5220\u9664\u8282\u70b9\u65b9\u6cd5 + */ + onRemove : function(e){ + var _self = this, + node = e.node, + index = e.index; + _self._removeNode(node,index); + }, + //\u52a0\u8f7d\u5b8c\u8282\u70b9 + _loadNode : function(node){ + var _self = this; + _self.expandNode(node); + _self._updateIcons(node); + _self.setItemStatus(node,LOADING,false); + }, + /** + * @override + * @protected + * \u52a0\u8f7d\u8282\u70b9 + */ + onLoad : function(e){ + var _self = this, + store = _self.get('store'), + root = store.get('root'), + node; + + if(!e || e.node == root){ //\u521d\u59cb\u5316\u52a0\u8f7d\u65f6,\u6216\u8005\u52a0\u8f7d\u6839\u8282\u70b9 + _self._initRoot(); + } + if(e && e.node){ + _self._loadNode(e.node); + } + }, + _isExpanded : function(node,element){ + return this.hasStatus(node,EXPAND,element); + }, + //\u83b7\u53d6Icon\u7684\u6a21\u677f + _getIconsTpl : function(node){ + var _self = this, + level = node.level, + start = _self.get('startLevel'), + iconWraperTpl = _self.get('iconWraperTpl'), + icons = [], + i; + for(i = start ; i < level ; i = i + 1){ + icons.push(_self._getLevelIcon(node,i)); + } + icons.push(_self._getExpandIcon(node)); + icons.push(_self._getCheckedIcon(node)); + icons.push(_self._getNodeTypeIcon(node)); + return BUI.substitute(iconWraperTpl,{icons : icons.join('')}); + }, + //\u83b7\u53d6\u52fe\u9009icon + _getCheckedIcon : function(node){ + var _self = this, + checkable = _self.isCheckable(node); + if(checkable){ + return _self._getIcon(CLS_CHECKBOX); + } + return ''; + }, + /** + * \u662f\u5426\u53ef\u4ee5\u52fe\u9009 + * @protected + * @param {Object | BUI.Data.Node} node \u8282\u70b9 + * @return {Boolean} \u662f\u5426\u53ef\u4ee5\u52fe\u9009 + */ + isCheckable : function(node){ + return node[this.get('checkedField')] != null; + }, + //\u83b7\u53d6\u5c55\u5f00\u6298\u53e0\u7684icon + _getExpandIcon : function(node){ + var _self = this, + cls = CLS_EXPANDER; + if(node.leaf){ + return _self._getLevelIcon(node); + } + if(_self._isLastNode(node)){ + cls = cls + ' ' + CLS_EXPANDER_END; + } + return _self._getIcon(cls); + }, + //\u53f6\u5b50\u8282\u70b9\u548c\u6811\u8282\u70b9\u6709\u4e0d\u540c\u7684icon + _getNodeTypeIcon : function(node){ + var _self = this, + cls = node.cls ? node.cls :(node.leaf ? _self.get('leafCls') : _self.get('dirCls')); + return _self._getIcon(cls); + }, + //\u83b7\u53d6\u5bf9\u5e94Level\u7684icon + _getLevelIcon : function(node,level){ + var _self = this, + showLine = _self.get('showLine'), + cls = CLS_EMPTY, + levelNode; + if(showLine){ //\u5982\u679c\u663e\u793a\u8fde\u63a5\u7ebf + if(node.level === level || level == null){ //\u5f53\u524d\u7684\u8fde\u63a5\u7ebf + cls = _self._isLastNode(node) ? CLS_END : CLS_ELBOW; + }else{ //\u4e0a\u4e00\u7ea7\u7684\u8fde\u63a5\u7ebf + levelNode = _self._getParentNode(node,level); + cls = _self._isLastNode(levelNode) ? CLS_EMPTY : CLS_LINE; + } + } + return _self._getIcon(cls); + }, + //\u83b7\u53d6\u5bf9\u5e94level\u7684\u7236\u8282\u70b9 + _getParentNode : function(node,level){ + var nodeLevel = node.level, + parent = node.parent, + i = nodeLevel - 1; + if(nodeLevel <= level){ + return null; + } + while(i > level){ + parent = parent.parent; + i = i - 1; + } + return parent; + }, + //\u83b7\u53d6icon + _getIcon : function(cls){ + var _self = this, + iconTpl = _self.get('iconTpl'); + return BUI.substitute(iconTpl,{cls : cls}); + }, + //\u662f\u5426\u662f\u7236\u8282\u70b9\u7684\u6700\u540e\u4e00\u4e2a\u8282\u70b9 + _isLastNode : function(node){ + + if(!node){ + return false; + } + if(node == this.get('root')){ + return true; + } + + var _self = this, + parent = node.parent, + siblings = parent ? parent.children : _self.get('nodes'), + count; + + count = siblings.length; + return siblings[count - 1] === node; + }, + //\u521d\u59cb\u5316\u6240\u6709\u8282\u70b9\uff0c\u8bbe\u7f6elevel \u548c leaf + _initNodes : function(nodes,level,parent){ + var _self = this; + BUI.each(nodes,function(node){ + node.level = level; + if(node.leaf == null){ + node.leaf = node.children ? false : true; + } + if(parent && !node.parent){ + node.parent = parent; + } + _self._initChecked(node); + if(node.children){ + _self._initNodes(node.children,level + 1,node); + } + + }); + }, + //\u6298\u53e0\u8282\u70b9 + _collapseNode : function(node,element,deep){ + var _self = this; + if(node.leaf){ + return; + } + if(_self.hasStatus(node,EXPAND,element)){ + _self.setItemStatus(node,EXPAND,false,element); + if(deep){ + _self._collapseChildren(node,deep); + _self.removeItems(node.children); + }else{ + _self._hideChildrenNodes(node); + } + _self.fire('collapsed',{node : node ,element : element}); + //node[_self.get('expandField')] = false; + } + }, + //\u9690\u85cf\u5b57\u8282\u70b9 + _hideChildrenNodes : function(node){ + var _self = this, + children = node.children; + BUI.each(children,function(subNode){ + _self.removeItem(subNode); + _self._hideChildrenNodes(subNode); + }); + }, + _collapseChildren : function(parentNode,deep){ + var _self = this, + children = parentNode.children; + + BUI.each(children,function(node){ + _self.collapseNode(node,deep); + }); + }, + //\u5c55\u5f00\u9009\u9879 + _expandNode : function(node,element,deep){ + var _self = this, + store = _self.get('store'); + if(node.leaf){ //\u5b50\u8282\u70b9\u4e0d\u5c55\u5f00 + return; + } + if(!_self.hasStatus(node,EXPAND,element)){ + if(store && !store.isLoaded(node)){ //\u8282\u70b9\u672a\u52a0\u8f7d\uff0c\u5219\u52a0\u8f7d\u8282\u70b9 + if(!_self._isLoading(node,element)){ + store.loadNode(node); + } + }else if(element){ + _self.setItemStatus(node,EXPAND,true,element); + //_self.addItemsAt(node.children,index + 1); + _self._showChildren(node); + _self.fire('expanded',{node : node ,element : element}); + } + } + BUI.each(node.children,function(subNode){ + if(deep || _self.isExpanded(subNode)){ + _self.expandNode(subNode,deep); + } + }); + + }, + //\u663e\u793a\u5b50\u8282\u70b9 + _showChildren : function(node){ + if(!node || !node.children){ + return; + } + var _self = this, + index = _self.indexOfItem(node), + length = node.children.length, + subNode, + i; + for (i = length - 1; i >= 0; i--) { + subNode = node.children[i]; + if(!_self.getItem(subNode)){ + _self.addItemAt(subNode,index + 1); + } + }; + }, + _isLoading : function(node,element){ + var _self = this; + return _self.hasStatus(node,LOADING,element); + }, + //\u91cd\u7f6e\u9009\u9879\u7684\u56fe\u6807 + _resetIcons :function(node,element){ + var _self = this, + iconContainer = _self.get('iconContainer'), + containerEl, + iconsTpl = _self._getIconsTpl(node); + $(element).find('.' + CLS_ICON_WRAPER).remove(); //\u79fb\u9664\u6389\u4ee5\u524d\u7684\u56fe\u6807 + containerEl = $(element).find('.' + iconContainer); + if(iconContainer && containerEl.length){ + $(iconsTpl).appendTo(containerEl); + }else{ + $(element).prepend($(iconsTpl)); + } + }, + //\u5207\u6362\u663e\u793a\u9690\u85cf + _toggleExpand : function(node,element){ + var _self = this; + if(_self._isExpanded(node,element)){ + _self._collapseNode(node,element); + }else{ + _self._expandNode(node,element); + } + }, + //\u66f4\u65b0\u8282\u70b9\u56fe\u6807 + _updateIcons : function(node){ + var _self = this, + element = _self.findElement(node); + if(element){ + _self._resetIcons(node,element); + if(_self._isExpanded(node,element) && !node.leaf){ //\u5982\u679c\u8282\u70b9\u5c55\u5f00\uff0c\u90a3\u4e48\u66f4\u65b0\u5b50\u8282\u70b9\u7684\u56fe\u6807\u6837\u5f0f + BUI.each(node.children,function(subNode){ + _self._updateIcons(subNode); + }); + } + } + }, + //\u8bbe\u7f6e\u663e\u793a\u6839\u8282\u70b9 + _uiSetShowRoot : function(v){ + var _self = this, + start = this.get('showRoot') ? 0 : 1; + _self.set('startLevel',start); + }, + _uiSetNodes : function(v){ + var _self = this, + store = _self.get('store'); + store.setResult(v); + }, + _uiSetShowLine : function(v){ + var _self = this, + el = _self.get('el'); + if(v){ + el.addClass(CLS_SHOW_LINE); + }else{ + el.removeClass(CLS_SHOW_LINE); + } + } + }); + + return Mixin; +})/** + * @fileOverview \u6811\u5f62\u5217\u8868 + * @ignore + */ + +define('bui/tree/treelist',['bui/common','bui/list','bui/tree/treemixin'],function (require) { + var BUI = require('bui/common'), + List = require('bui/list'), + Mixin = require('bui/tree/treemixin'); + + /** + * @class BUI.Tree.TreeList + * \u6811\u5f62\u5217\u8868\u63a7\u4ef6 + * ** \u4f60\u53ef\u4ee5\u7b80\u5355\u7684\u4f7f\u7528\u914d\u7f6e\u6570\u636e ** + *
                
                +   *  BUI.use('bui/tree',function(Tree){
                +   *    var tree = new Tree.TreeList({
                +   *      render : '#t1',
                +   *      nodes : [
                +   *        {id : '1',text : '1',children : [{id : '11',text : '11'}]},
                +   *        {id : '2',text : '2'}
                +   *      ]
                +   *    });
                +   *    tree.render();
                +   *  });
                +   * 
                + * ** \u4f60\u4e5f\u53ef\u4ee5\u663e\u793a\u6839\u8282\u70b9 ** + *
                
                +   *  BUI.use('bui/tree',function(Tree){
                +   *    var tree = new Tree.TreeList({
                +   *      render : '#t1',
                +   *      root :{
                +   *        id : '0',
                +   *        text : '0',
                +   *        children : [
                +   *          {id : '1',text : '1',children : [{id : '11',text : '11'}]},
                +   *          {id : '2',text : '2'}
                +   *        ]
                +   *      },
                +   *      showRoot : true
                +   *    });
                +   *    tree.render();
                +   *  });
                +   * 
                + * + * ** \u4f60\u4e5f\u53ef\u4ee5\u5f02\u6b65\u52a0\u8f7d\u6570\u636e ** + *
                
                +   *  BUI.use(['bui/tree','bui/data'],function(Tree,Data){
                +   *    var store = new Data.TreeStore({
                +   *        root :{
                +   *          id : '0',
                +   *          text : '0'
                +   *        },
                +   *        url : 'data/nodes.php'
                +   *      }),
                +   *      tree = new Tree.TreeList({
                +   *        render : '#t1',
                +   *        store : store,
                +   *        showRoot : true //\u53ef\u4ee5\u4e0d\u914d\u7f6e\uff0c\u5219\u4e0d\u663e\u793a\u6839\u8282\u70b9
                +   *      });
                +   *    tree.render();
                +   *    store.load({id : '0'});//\u52a0\u8f7d\u6839\u8282\u70b9\uff0c\u4e5f\u53ef\u4ee5\u8ba9\u7528\u6237\u70b9\u51fb\u52a0\u8f7d
                +   *  });
                +   * 
                + * + * ** \u4f60\u8fd8\u53ef\u4ee5\u66ff\u6362icon ** + *
                
                +   *  BUI.use('bui/tree',function(Tree){
                +   *    var tree = new Tree.TreeList({
                +   *      render : '#t1',
                +   *      dirCls : 'folder', //\u66ff\u6362\u6811\u8282\u70b9\u7684\u6837\u5f0f
                +   *      leafCls : 'file', //\u53f6\u5b50\u8282\u70b9\u7684\u6837\u5f0f
                +   *      nodes : [ //\u6570\u636e\u4e2d\u5b58\u5728cls \u4f1a\u66ff\u6362\u8282\u70b9\u7684\u56fe\u6807\u6837\u5f0f
                +   *        {id : '1',text : '1'cls:'task-folder',children : [{id : '11',text : '11',cls:'task'}]},
                +   *        {id : '2',text : '2'}
                +   *      ]
                +   *    });
                +   *    tree.render();
                +   *  });
                +   * @mixin BUI.Tree.Mixin
                +   * @extends BUI.List.SimpleList
                +   */
                +  var TreeList = List.SimpleList.extend([Mixin],{
                +    
                +  },{
                +    ATTRS : {
                +      itemCls : {
                +        value : BUI.prefix + 'tree-item'
                +      },
                +      itemTpl : {
                +        value : '
              • {text}
              • ' + }, + idField : { + value : 'id' + } + } + },{ + xclass : 'tree-list' + }); + + return TreeList; +}); + +/** + * @fileOverview \u63d0\u793a\u7684\u5165\u53e3\u6587\u4ef6 + * @ignore + */ + +define('bui/tooltip',['bui/common','bui/tooltip/tip','bui/tooltip/tips'],function (require) { + var BUI = require('bui/common'), + Tooltip = BUI.namespace('Tooltip'), + Tip = require('bui/tooltip/tip'), + Tips = require('bui/tooltip/tips'); + + BUI.mix(Tooltip,{ + Tip : Tip, + Tips : Tips + }); + return Tooltip; +});/** + * @fileOverview \u7b80\u5355\u6613\u7528\u7684\u63d0\u793a\u4fe1\u606f + * @ignore + */ + +define('bui/tooltip/tip',['bui/common','bui/overlay'],function (require) { + var BUI = require('bui/common'), + Overlay = require('bui/overlay'), + CLS_ALIGN_PREFIX = 'x-align-', + MAP_TYPES = { + left : ['cl','cr'], //\u5c45\u5de6 + right : ['cr','cl'], //\u5c45\u53f3 + top : ['tc','bc'], //\u5c45\u4e0a + bottom : ['bc','tc'], //\u5c45\u4e0b + 'top-left' : ['tl','bl'], + 'top-right' : ['tr','br'], + 'bottom-left' : ['bl','tl'], + 'bottom-right' : ['br','tr'] + }; + //\u83b7\u53d6\u8ddd\u79bb + function getOffset(type,offset){ + if(type === 'left'){ + return [-1 * offset,-4]; + } + if(type === 'right'){ + return [offset,-4]; + } + if(type.indexOf('top')){ + return [0,offset]; + } + + if(type.indexOf('bottom')){ + return [0,-1 * offset]; + } + } + + var TipView = Overlay.OverlayView.extend({ + renderUI : function(){ + + }, + //\u83b7\u53d6\u663e\u793a\u6587\u672c\u7684\u5bb9\u5668 + _getTitleContainer : function(){ + return this.get('el'); + }, + //\u8bbe\u7f6e\u6587\u672c + _uiSetTitle : function(title){ + var _self = this, + titleTpl = _self.get('titleTpl'), + container = _self._getTitleContainer(), + titleEl = _self.get('titleEl'), + tem; + if(titleEl){ + titleEl.remove(); + } + title = title || ''; + if(BUI.isString(title)){ + title = {title : title}; + } + tem = BUI.substitute(titleTpl,title); + titleEl = $(tem).appendTo(container); + _self.set('titleEl',titleEl); + }, + //\u8bbe\u7f6e\u5bf9\u9f50\u6837\u5f0f + _uiSetAlignType : function(type,ev){ + var _self = this; + if(ev && ev.prevVal){ + _self.get('el').removeClass(CLS_ALIGN_PREFIX + ev.prevVal); + } + if(type){ + _self.get('el').addClass(CLS_ALIGN_PREFIX + type); + } + } + },{ + ATTRS : { + title : {}, + titleEl : {}, + alignType : {} + } + },{ + xclass : 'tooltip-view' + }); + + /** + * @class BUI.Tooltip.Tip + * @extends BUI.Overlay.Overlay + * \u7b80\u6613\u7684\u63d0\u793a\u4fe1\u606f + * + * ** \u4f60\u53ef\u4ee5\u7b80\u5355\u7684\u4f7f\u7528\u5355\u4e2atip ** + *
                
                +   * BUI.use('bui/tooltip',function (Tooltip) {
                +   *  //\u4e0d\u4f7f\u7528\u6a21\u677f\u7684\uff0c\u5de6\u4fa7\u663e\u793a
                +   *   var t1 = new Tooltip.Tip({
                +   *     trigger : '#t1',
                +   *     alignType : 'left', //\u65b9\u5411
                +   *     showArrow : false, //\u4e0d\u663e\u793a\u7bad\u5934
                +   *     offset : 5, //\u8ddd\u79bb\u5de6\u8fb9\u7684\u8ddd\u79bb
                +   *     title : '\u65e0\u4efb\u4f55\u6837\u5f0f\uff0c
                \u5de6\u8fb9\u7684\u63d0\u793a\u4fe1\u606f' + * }); + * t1.render(); + * }); + *
                + * + * ** \u4e5f\u53ef\u4ee5\u914d\u7f6e\u6a21\u677f ** + *
                
                +   * BUI.use('bui/tooltip',function (Tooltip) {
                +   *  //\u4f7f\u7528\u6a21\u677f\u7684\uff0c\u5de6\u4fa7\u663e\u793a
                +   *   var t1 = new Tooltip.Tip({
                +   *     trigger : '#t1',
                +   *     alignType : 'left', //\u65b9\u5411
                +   *     titleTpl : '<span class="x-icon x-icon-small x-icon-success"><i class="icon icon-white icon-question"></i></span>\
                +   *     <div class="tips-content">{title}</div>',
                +   *     offset : 5, //\u8ddd\u79bb\u5de6\u8fb9\u7684\u8ddd\u79bb
                +   *     title : '\u65e0\u4efb\u4f55\u6837\u5f0f\uff0c<br>\u5de6\u8fb9\u7684\u63d0\u793a\u4fe1\u606f'
                +   *   });
                +   *   t1.render();
                +   *  });
                +   * 
                + */ + var Tip = Overlay.Overlay.extend({ + //\u8bbe\u7f6e\u5bf9\u9f50\u65b9\u5f0f + _uiSetAlignType : function(type){ + var _self = this, + offset = _self.get('offset'), + align = _self.get('align') || {}, + points = MAP_TYPES[type]; + if(points){ + align.points = points; + if(offset){ + align.offset = getOffset(type,offset); + } + _self.set('align',align); + } + } + },{ + ATTRS : { + //\u4f7f\u7528\u59d4\u6258\u7684\u65b9\u5f0f\u663e\u793a\u63d0\u793a\u4fe1\u606f + delegateTigger : { + value : true + }, + /** + * \u5bf9\u9f50\u7c7b\u578b\uff0c\u5305\u62ec\uff1a top,left,right,bottom\u56db\u79cd\u5e38\u7528\u65b9\u5f0f\uff0c\u5176\u4ed6\u5bf9\u9f50\u65b9\u5f0f\uff0c\u53ef\u4ee5\u4f7f\u7528@see{BUI.Tooltip.Tip#property-align}\u5c5e\u6027 + * + * @type {String} + */ + alignType : { + view : true + }, + /** + * \u663e\u793a\u7684\u5185\u5bb9\uff0c\u6587\u672c\u6216\u8005\u952e\u503c\u5bf9 + *
                
                +       *     var tip =  new Tip({
                +       *        title : {a : 'text a',b:'text b'}, //\u5c5e\u6027\u662f\u5bf9\u8c61
                +       *        titleTpl : '

                this is {a},because {b}

                ' //

                this is text a,because text b

                + * }); + *
                + * @cfg {String|Object} title + */ + /** + * \u663e\u793a\u7684\u5185\u5bb9 + *
                
                +       *  //\u8bbe\u7f6e\u6587\u672c
                +       *  tip.set('title','new title');
                +       *
                +       *  //\u8bbe\u7f6e\u5bf9\u8c61
                +       *  tip.set('title',{a : 'a',b : 'b'})
                +       * 
                + * @type {Object} + */ + title : { + view : true + }, + /** + * \u663e\u793a\u5bf9\u9f50\u7bad\u5934 + * @override + * @default true + * @cfg {Boolean} [showArrow = true] + */ + showArrow : { + value : true + }, + /** + * \u7bad\u5934\u653e\u7f6e\u5728\u7684\u4f4d\u7f6e\uff0c\u662f\u4e00\u4e2a\u9009\u62e9\u5668\uff0c\u4f8b\u5982 .arrow-wraper + *
                
                +       *     new Tip({ //\u53ef\u4ee5\u8bbe\u7f6e\u6574\u4e2a\u63a7\u4ef6\u7684\u6a21\u677f
                +       *       arrowContainer : '.arrow-wraper',
                +       *       tpl : '
                ' + * }); + * + * new Tip({ //\u4e5f\u53ef\u4ee5\u8bbe\u7f6etitle\u7684\u6a21\u677f + * arrowContainer : '.arrow-wraper', + * titleTpl : '
                {title}
                ' + * }); + *
                + * @cfg {String} arrowContainer + */ + arrowContainer : { + view : true + }, + //\u81ea\u52a8\u663e\u793a + autoHide : { + value : true + }, + //\u8986\u76d6\u81ea\u52a8\u9690\u85cf\u7c7b\u578b + autoHideType : { + value : 'leave' + }, + /** + * \u663e\u793a\u7684tip \u8ddd\u79bb\u89e6\u53d1\u5668Dom\u7684\u8ddd\u79bb + *
                
                +      *  var tip =  new Tip({
                +      *    title : {a : 'text a',b:'text b'}, //\u5c5e\u6027\u662f\u5bf9\u8c61
                +      *    offset : 10, //\u8ddd\u79bb
                +      *    titleTpl : '

                this is {a},because {b}

                ' //

                this is text a,because text b

                + * }); + *
                + * @cfg {Number} offset + */ + offset : { + value : 0 + }, + /** + * \u89e6\u53d1\u663e\u793atip\u7684\u4e8b\u4ef6\u540d\u79f0\uff0c\u9ed8\u8ba4\u4e3amouseover + * @type {String} + * @protected + */ + triggerEvent : { + value : 'mouseover' + }, + /** + * \u663e\u793a\u6587\u672c\u7684\u6a21\u677f + *
                
                +       *  var tip =  new Tip({
                +       *    title : {a : 'text a',b:'text b'}, //\u5c5e\u6027\u662f\u5bf9\u8c61
                +       *    offset : 10, //\u8ddd\u79bb
                +       *    titleTpl : '

                this is {a},because {b}

                ' //

                this is text a,because text b

                + * }); + *
                + * @type {String} + */ + titleTpl : { + view : true, + value : '{title}' + }, + xview : { + value : TipView + } + } + },{ + xclass : 'tooltip' + }); + + Tip.View = TipView; + + return Tip; +});/** + * @fileOverview \u6279\u91cf\u663e\u793a\u63d0\u793a\u4fe1\u606f + * @ignore + */ + +define('bui/tooltip/tips',['bui/common','bui/tooltip/tip'],function(require) { + + //\u662f\u5426json\u5bf9\u8c61\u6784\u6210\u7684\u5b57\u7b26\u4e32 + function isObjectString(str){ + return /^{.*}$/.test(str); + } + + var BUI = require('bui/common'), + Tip = require('bui/tooltip/tip'), + /** + * @class BUI.Tooltip.Tips + * \u6279\u91cf\u663e\u793a\u63d0\u793a\u4fe1\u606f + *
                
                +     * BUI.use('bui/tooltip',function(){
                +     *   var tips = new Tooltip.Tips({
                +     *     tip : {
                +     *       trigger : '#t1 a', //\u51fa\u73b0\u6b64\u6837\u5f0f\u7684\u5143\u7d20\u663e\u793atip
                +     *       alignType : 'top', //\u9ed8\u8ba4\u65b9\u5411
                +     *       elCls : 'tips tips-no-icon tip1',
                +     *       titleTpl : '<span class="x-icon x-icon-small x-icon-success"><i class="icon icon-white icon-question"></i></span>\
                +   *           <div class="tips-content">{title}</div>',
                +     *       offset : 10 //\u8ddd\u79bb\u5de6\u8fb9\u7684\u8ddd\u79bb
                +     *     }
                +     *   });
                +     *   tips.render();
                +     * })
                +     * 
                +     * 
                + */ + Tips = function(config){ + Tips.superclass.constructor.call(this,config); + }; + + Tips.ATTRS = { + + /** + * \u4f7f\u7528\u7684\u63d0\u793a\u63a7\u4ef6\u6216\u8005\u914d\u7f6e\u4fe1\u606f @see {BUI.Tooltip.Tip} + *
                
                +     *    //\u4e0d\u4f7f\u7528\u6a21\u677f\u7684\uff0c\u5de6\u4fa7\u663e\u793a
                +     * var tips = new Tooltip.Tips({
                +     *   tip : {
                +     *     trigger : '#t1 a', //\u51fa\u73b0\u6b64\u6837\u5f0f\u7684\u5143\u7d20\u663e\u793atip
                +     *     alignType : 'top', //\u9ed8\u8ba4\u65b9\u5411
                +     *     elCls : 'tips tips-no-icon tip1',
                +     *     offset : 10 //\u8ddd\u79bb\u5de6\u8fb9\u7684\u8ddd\u79bb
                +     *   }
                +     * });
                +     * tips.render();
                +     * 
                + * @cfg {BUI.Tooltip.Tip|Object} tip + */ + /** + * \u4f7f\u7528\u7684\u63d0\u793a\u63a7\u4ef6 @see {BUI.Tooltip.Tip} + *
                
                +     *    var tip = tips.get('tip');
                +     * 
                + * @type {BUI.Tooltip.Tip} + * @readOnly + */ + tip : { + + }, + /** + * \u9ed8\u8ba4\u7684\u5bf9\u9f50\u65b9\u5f0f,\u5982\u679c\u4e0d\u6307\u5b9atip\u7684\u5bf9\u9f50\u65b9\u5f0f\uff0c\u90a3\u4e48\u4f7f\u7528\u6b64\u5c5e\u6027 + *
                
                +     * //\u4e0d\u4f7f\u7528\u6a21\u677f\u7684\uff0c\u5de6\u4fa7\u663e\u793a
                +     * var tips = new Tooltip.Tips({
                +     *   tip : {
                +     *     trigger : '#t1 a', //\u51fa\u73b0\u6b64\u6837\u5f0f\u7684\u5143\u7d20\u663e\u793atip
                +     *     defaultAlignType : 'top', //\u9ed8\u8ba4\u65b9\u5411
                +     *     elCls : 'tips tips-no-icon tip1',
                +     *     offset : 10 //\u8ddd\u79bb\u5de6\u8fb9\u7684\u8ddd\u79bb
                +     *   }
                +     * });
                +     * tips.render();
                +     * 
                + * @cfg {Object} defaultAlignType + */ + defaultAlignType : { + + } + }; + + BUI.extend(Tips,BUI.Base); + + BUI.augment(Tips,{ + //\u521d\u59cb\u5316 + _init : function(){ + this._initDom(); + this._initEvent(); + }, + //\u521d\u59cb\u5316DOM + _initDom : function(){ + var _self = this, + tip = _self.get('tip'), + defaultAlignType; + if(tip && !tip.isController){ + defaultAlignType = tip.alignType; //\u8bbe\u7f6e\u9ed8\u8ba4\u7684\u5bf9\u9f50\u65b9\u5f0f + tip = new Tip(tip); + tip.render(); + _self.set('tip',tip); + if(defaultAlignType){ + _self.set('defaultAlignType',defaultAlignType); + } + } + }, + //\u521d\u59cb\u5316\u4e8b\u4ef6 + _initEvent : function(){ + var _self = this, + tip = _self.get('tip'); + tip.on('triggerchange',function(ev){ + var curTrigger = ev.curTrigger; + _self._replaceTitle(curTrigger); + _self._setTitle(curTrigger,tip); + }); + }, + //\u66ff\u6362\u6389title + _replaceTitle : function(triggerEl){ + var title = triggerEl.attr('title'); + if(title){ + triggerEl.attr('data-title',title); + triggerEl[0].removeAttribute('title'); + } + }, + //\u8bbe\u7f6etitle + _setTitle : function(triggerEl,tip){ + var _self = this, + title = triggerEl.attr('data-title'), + alignType = triggerEl.attr('data-align') || _self.get('defaultAlignType'); + + if(isObjectString(title)){ + title = BUI.JSON.looseParse(title); + } + tip.set('title',title); + if(alignType){ + tip.set('alignType',alignType); + } + }, + /** + * \u6e32\u67d3\u63d0\u793a\u4fe1\u606f + * @chainable + */ + render : function(){ + this._init(); + return this; + } + }); + + return Tips; +});BUI.use(['bui/common','bui/data','bui/list','bui/picker', + 'bui/menu','bui/toolbar','bui/progressbar','bui/cookie', + 'bui/form','bui/mask','bui/select','bui/tab', + 'bui/calendar','bui/overlay','bui/editor','bui/grid','bui/tree','bui/tooltip' +]); diff --git a/源码/src/main/webapp/resource/assets/js/common/build.xml b/源码/src/main/webapp/resource/assets/js/common/build.xml new file mode 100644 index 0000000..d08a55f --- /dev/null +++ b/源码/src/main/webapp/resource/assets/js/common/build.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/源码/src/main/webapp/resource/assets/js/common/main-min.js b/源码/src/main/webapp/resource/assets/js/common/main-min.js new file mode 100644 index 0000000..4fb5775 --- /dev/null +++ b/源码/src/main/webapp/resource/assets/js/common/main-min.js @@ -0,0 +1 @@ +BUI.use(["bui/menu","bui/tab"],function(h,l){var k=BUI.app("PageUtil");var p="dl-selected",c="ks-hidden",y="dl-last",x="dl-hover",n="nav-item",s="dl-second-slib",f="dl-tab-item",t="dl-collapse",v="dl-hide-current",u="data-index",j=145;function g(z){window.topManager=z}function b(z,A){if(z.indexOf("?")!==-1){return z+"&"+A}else{return z+"?"+A}}function i(B,E,H,F,A){var I=this,C=new h.SideMenu(H),D=new l.NavTab(E),J=$(H.render),z=J.next("."+s+"-con"),G=J.parents("."+f);if(z){z.on("click",function(){G.toggleClass(t)});z.parent().height(E.height)}if(F){G.addClass(t)}C.on("menuclick",function(L){var K=L.item;if(K){I.tab.addTab({id:K.get("id"),title:K.get("text"),href:K.get("href"),closeable:K.get("closeable")},true)}});C.on("itemselected",function(L){var K=L.item;if(K){e(B,K.get("id"))}});D.on("activeChange",function(L){var K=L.item;if(K){I.menu.setSelectedByField(K.get("id"))}else{I.menu.clearSelection()}});I.tab=D;I.menu=C;I.homePage=A;D.render();C.render()}function e(A,z){z=z||"";var B="#"+A;if(z){B+="/"+z}location.hash=B}function d(){var D=location.hash,C=0,z="",A=D.indexOf("/"),B=null;if(!D){return null}if(A>=0){C=D.substring(1,A);z=D.substring(A+1);B=r(z);if(B){z=z.replace("?"+B,"")}}else{C=D.substring(1)}return{moduleId:C,pageId:z,search:B}}function r(z){var A=z.indexOf("?");if(A>=0){return z.substring(A+1)}return null}function m(z){if(!$.isArray(z)){return}var A=q(z);while(A!==-1){z.splice(A,1);A=q(z)}return z}function q(A){var z=-1;$.each(A,function(B,C){if(C===null||C===undefined){z=B;return false}});return z}function a(){var z=BUI.viewportHeight(),A=70;return z-A}function o(z){var A=$(z);if(A.hasClass(n)){return z}return A.parent("."+n)[0]}var w=function(z){m(z);w.superclass.constructor.call(this,z);this._init();g(this)};w.ATTRS={currentModelIndex:{},hideItmes:{value:[]},hideList:{},modules:{value:[]},modulesConfig:{},navList:{valueFn:function(){return $("#J_Nav")}},navContent:{valueFn:function(){return $("#J_NavContent")}},navItems:{valueFn:function(){return $("#J_Nav").children("."+n)}},navTabs:{valueFn:function(){return this.get("navContent").children("."+f)}},urlSuffix:{value:".html"}};BUI.extend(w,BUI.Base);BUI.augment(w,{openPage:function(O){var J=this,E=O.moduleId||J._getCurrentModuleId(),C=O.id,L=O.title||"\u65b0\u7684\u6807\u7b7e\u9875",B=O.href,N=O.isClose,D=O.closeable,A=O.reload,P=O.search;var G=J._getModule(E);if(G){var H=G.tab,F=G.menu,z=F.getItem(C),K=H.getActivedItem(),M=K?K.get("id"):null,I=J._getModuleIndex(E);if(E!=J._getCurrentModuleId()){J._setModuleSelected(I)}if(z){J._setPageSelected(I,C,A,P)}else{H.addTab({id:C,title:L,href:B,sourceId:M,closeable:D},A)}if(N){K.close()}}},closePage:function(A,z){this.operatePage(z,A,"close")},reloadPage:function(A,z){this.operatePage(z,A,"reload")},setPageTitle:function(A,B,z){this.operatePage(z,B,"setTitle",[A])},operatePage:function(E,G,F,A){E=E||this._getCurrentModuleId();A=A||[];var z=this,B=z._getModule(E);if(B){var C=B.tab,D=G?C.getItemById(G):C.getActivedItem();if(D&&D[F]){D[F].apply(D,A)}}},_createModule:function(E){var z=this,C=z._getModuleConfig(E),B=z.get("modules");if(!C){return null}var E=C.id,A="#J_"+E+"Tab",D="#J_"+E+"Tree";module=new i(E,{render:A,height:a()-5},{render:D,items:C.menu,height:a()-5},C.collapsed,C.homePage);B[E]=module;return module},_hideHideList:function(){this.get("hideList").hide()},_init:function(){var z=this;z._initDom();z._initNavItems();z._initEvent()},_initNavItems:function(){var I=this,C=I.get("navItems"),B=I.get("hideItmes");if(C.length===0){return}$('').appendTo($(C));var G=C.length,K=BUI.viewportWidth(),H=j,F=H*G,z=0;if(F<=K){return}$.each(C,function(L,M){$(M).attr(u,L);$(M).removeClass(y)});z=parseInt(K/H);var A=C[z-1];I._setLastItem(A);B.push($(A).clone()[0]);for(var E=z;E
                '].join("");new $(C).appendTo(A)})},_initDom:function(){var z=this;z._initContents();z._initLocation()},_initEvent:function(){var z=this,A=z.get("navItems");A.each(function(B,C){var C=$(C);C.on("click",function(){var D=$(this);if(D.hasClass(p)){return}z._setModuleSelected(B,D)}).on("mouseenter",function(){$(this).addClass(x)}).on("mouseleave",function(){$(this).removeClass(x)})});z._initNavListEvent()},_initNavListEvent:function(){var A=this,z=A.get("hideList"),B=A.get("navList");B.on("mouseover",function(E){var D=o(E.target),C=$(D),F=null;if(C&&C.hasClass(y)&&z){F=C.offset();F.top+=37;F.left+=2;A._showHideList(F)}}).on("mouseout",function(D){var C=D.toElement;if(C&&z&&!$.contains(z[0],C)&&C!==z[0]){A._hideHideList()}})},_initLocation:function(){var z=this,D=d();if(D){var B=D.pageId,E=D.search,C=z._getModuleIndex(D.moduleId);z._setModuleSelected(C);z._setPageSelected(C,B,true,E)}else{var A=z.get("currentModelIndex"),F=z._getModuleId(A);if(A==null){z._setModuleSelected(0)}else{e(F)}}},_getModule:function(B){var z=this,A=z.get("modules")[B];if(!A){A=z._createModule(B)}return A},_getModuleIndex:function(B){var A=this,z=0;$.each(A.get("modulesConfig"),function(D,C){if(C.id===B){z=D;return false}});return z},_getModuleConfig:function(B){var A=this,z=null;$.each(A.get("modulesConfig"),function(D,C){if(C.id===B){z=C;return false}});return z},_getModuleId:function(z){var A=this.get("modulesConfig");if(A[z]){return A[z].id}else{return z}},_getCurrentPageId:function(){var z=this,D=z._getCurrentModuleId(),B=z._getModule(D),A="";if(B){var C=B.menu.getSelected();if(C){A=C.get("id")}}return A},_getCurrentModuleId:function(){return this._getModuleId(this.get("currentModelIndex"))},_isModuleInitial:function(z){return !!this.get("modules")[z]},_setLastItem:function(D){var z=this,A=z.get("lastShowItem");if(A===D){return}var B=null,C=$(A);itemEl=$(D);if(A){B=C.find("."+v);C.removeClass(y);C.addClass(c)}itemEl.addClass(y);itemEl.removeClass(c);if(!B){B=$('  ')}B.appendTo(itemEl.children(".nav-item-inner"));z.set("lastShowItem",D)},_setModuleSelected:function(F,E){var H=this,D=H.get("navItems"),B=H.get("navTabs"),G=H.get("currentModelIndex");if(G!==F){var z=H._getModuleId(F),A=null,C=H.get("lastShowItem"),I=true;if(!H._isModuleInitial(z)){I=false}A=H._getModule(z);E=E||$(H.get("navItems")[F]);if(E.hasClass(c)&&C){H._setLastItem(E[0]);H._setSelectHideItem(F)}D.removeClass(p);E.addClass(p);B.addClass(c);$(B[F]).removeClass(c);G=F;H.set("currentModelIndex",G);curPageId=H._getCurrentPageId();e(z,curPageId);if(!curPageId&&A.homePage){H._setPageSelected(F,A.homePage)}}},_setPageSelected:function(E,F,G,K){var H=this,B=H._getModuleId(E)||E,C=H._getModule(B);if(C&&F){C.menu.setSelectedByField(F);var J=C.menu.getSelected(),D=C.tab,A="",z=-1;if(J&&J.get("id")===F){A=J.get("href");A=K?(b(A,K)):A;C.tab.addTab({id:J.get("id"),title:J.get("text"),closeable:J.get("closeable"),href:A},!!G)}else{if(F){var I=F.replace("-","/");if(I.indexOf("/")===-1){I=B+"/"+I}if((z=F.indexOf("."))===-1){I+=H.get("urlSuffix")}A=K?(I+"?"+K):I;D.addTab({id:F,title:"",href:A},!!G)}}}},_showHideList:function(B){var A=this,z=A.get("hideList");z.css("left",B.left);z.css("top",B.top);z.show()},_setSelectHideItem:function(D){var B=this,A=B.get("hideList"),z=B.get("hideItmes"),E=null,C=null,G=null,F=null;BUI.each(z,function(I){var H=$(I);if(H.attr(u)==D){C=I}if(H.hasClass(y)){E=I}});if(E!==C){if(E){F=$(E).find(".dl-hide-current");$(E).removeClass(y)}$(C).addClass(y);if(!F){F=new Node('  ')}G=$(C);F.appendTo(G.children(".nav-item-inner"));G.prependTo(A)}}});k.MainPage=w}); diff --git a/源码/src/main/webapp/resource/assets/js/common/main.js b/源码/src/main/webapp/resource/assets/js/common/main.js new file mode 100644 index 0000000..395f64b --- /dev/null +++ b/源码/src/main/webapp/resource/assets/js/common/main.js @@ -0,0 +1,721 @@ + +BUI.use(['bui/menu','bui/tab'],function(Menu,Tab) { + //定义全局命名空间 + var PageUtil = BUI.app('PageUtil'); + + var CLS_SELECTE = 'dl-selected',//选中的模块样式 + CLS_HIDDEN = 'ks-hidden',//隐藏的模块样式 + CLS_LAST = 'dl-last',//最后一个元素 + CLS_HOVER = 'dl-hover', + CLS_ITEM = 'nav-item', + CLS_LEFT_SLIB = 'dl-second-slib', + CLS_TAB_ITEM = 'dl-tab-item', + CLS_CALLAPSE = 'dl-collapse', + CLS_HIDE_CURRENT = 'dl-hide-current', + ATTTR_INDEX ='data-index', + WIDTH_ITERM = 145; + + function setTopManager(mainPageObj){ + window.topManager = mainPageObj; + } + + function addSearch(href,search){ + if(href.indexOf('?') !== -1){ + return href + '&' + search; + }else{ + return href + '?' + search; + } + } + //创建菜单和Tab,并绑定关联,是否收缩,是否有首页 + function tabNav(moduleId,tabConfig,menuConfig,collapsed,homePage){ + + var _self =this, + menu = new Menu.SideMenu(menuConfig), + tab = new Tab.NavTab(tabConfig), + menuContainerEl = $(menuConfig.render), + slibEl = menuContainerEl.next('.' + CLS_LEFT_SLIB + '-con'), + navContainerEl = menuContainerEl.parents('.'+CLS_TAB_ITEM); + + if(slibEl){ + slibEl.on('click',function(){ + navContainerEl.toggleClass(CLS_CALLAPSE); + }); + slibEl.parent().height(tabConfig.height); + } + if(collapsed){ + navContainerEl.addClass(CLS_CALLAPSE); + } + + //点击菜单,切换Tab,并刷新 + menu.on('menuclick',function(ev){ + var item = ev.item; + if(item){ + _self.tab.addTab({id: item.get('id'), title: item.get('text'), href: item.get('href'),closeable : item.get('closeable')},true); + } + + }); + + //选中的菜单发生改变后,更新链接上的页面编号 + menu.on('itemselected',function(ev){ + var item = ev.item; + if(item){ + setNavPosition(moduleId,item.get('id')); + } + + }); + + //切换Tab激活菜单 + tab.on('activeChange',function(ev){ + var item = ev.item; + if(item){ + _self.menu.setSelectedByField(item.get('id')); + }else{ + _self.menu.clearSelection(); + } + + }); + + _self.tab = tab; + _self.menu = menu; + _self.homePage = homePage; + tab.render(); + menu.render(); + + } + + //更改地址栏连接 + function setNavPosition(moduleId,pageId){ + pageId = pageId||''; + + var str = '#'+moduleId; + + if(pageId){ + str += '/'+pageId; + } + location.hash =str; + } + + function getNavPositionSetting(){ + var pos = location.hash, + moduleIndex = 0, + pageId ='', + splitIndex = pos.indexOf('/'), + search = null; + if(!pos){ + return null; + } + + if(splitIndex >= 0){ + moduleIndex = pos.substring(1,splitIndex); + pageId = pos.substring(splitIndex + 1); + search = getParam(pageId); + if(search){ + pageId = pageId.replace('?'+search,''); + } + }else{ + moduleIndex=pos.substring(1); + } + + return {moduleId : moduleIndex,pageId : pageId,search : search}; + } + + function getParam(pageId){ + var index = pageId.indexOf('?'); + if(index >= 0){ + return pageId.substring(index + 1); + } + return null; + } + + //清理权限系统带来的 “,“引起的Bug + function initModuleConfig(mconfig){ + if(!$.isArray(mconfig)){ + return; + } + var emptyIndex = findEmptyIndex(mconfig); + while(emptyIndex !== -1){ + mconfig.splice(emptyIndex,1); + emptyIndex = findEmptyIndex(mconfig); + } + return mconfig; + } + + //查找为空的纪录 + function findEmptyIndex(array){ + var result = -1; + $.each(array,function(index,item){ + if(item === null || item === undefined){ + result = index; + return false; + } + }); + return result; + } + + //获取用户工作区域 + function getAutoHeight(){ + var height = BUI.viewportHeight(), + subHeight = 70; + return height - subHeight; + } + + function findItem(element){ + var el = $(element); + if (el.hasClass(CLS_ITEM)) { + return element; + } + return el.parent('.' + CLS_ITEM)[0]; + } + + var mainPage = function(config){ + initModuleConfig(config); + mainPage.superclass.constructor.call(this,config); + this._init(); + setTopManager(this); + }; + + mainPage.ATTRS = { + /** + * 当前模块的索引 + * @type {Number} + */ + currentModelIndex:{ + + }, + hideItmes : { + value : [] + }, + //隐藏导航项列表 + hideList : { + + }, + /** + * 模块集合 + * @type {Array} + */ + modules : { + value : [] + }, + /** + * 模块的配置项 + * @type {Array} + */ + modulesConfig: { + + }, + /** + * 一级导航的容器 + * @type {jQuery} + */ + navList : { + valueFn : function () { + return $('#J_Nav');// body... + } + }, + /** + * 导航内容的容器 + * @type {jQuery} + */ + navContent : { + valueFn : function () { + return $('#J_NavContent'); + } + }, + /** + * 导航项 + * @type {jQuery} + */ + navItems : { + valueFn : function () { + return $('#J_Nav').children('.' + CLS_ITEM);// body... + } + }, + navTabs:{ + valueFn : function(){ + return this.get('navContent').children('.'+CLS_TAB_ITEM) + } + }, + /** + * 页面的后缀 + * @type {Object} + */ + urlSuffix : { + value : '.html' + } + }; + + BUI.extend(mainPage,BUI.Base); + + BUI.augment(mainPage,{ + //打开页面 + openPage : function(pageInfo){ + var _self = this, + moduleId = pageInfo.moduleId || _self._getCurrentModuleId(), + id = pageInfo.id, + title = pageInfo.title || '新的标签页', + href = pageInfo.href, + isClose = pageInfo.isClose, + closeable = pageInfo.closeable, + reload = pageInfo.reload, + search = pageInfo.search; + + var module = _self._getModule(moduleId); + if(module){ + var tab = module.tab, + menu = module.menu, + menuItem = menu.getItem(id), + curTabPage = tab.getActivedItem(), + sourceId = curTabPage ? curTabPage.get('id') : null, + moduleIndex = _self._getModuleIndex(moduleId); + if(moduleId != _self._getCurrentModuleId()){ + _self._setModuleSelected(moduleIndex); + } + if(menuItem){ + _self._setPageSelected(moduleIndex,id,reload,search); + }else{ + tab.addTab({id: id, title: title, href: href, sourceId: sourceId,closeable: closeable},reload); + } + + if(isClose){ + curTabPage.close(); + } + } + }, + //关闭页面 + closePage:function(id,moduleId){ + this.operatePage(moduleId,id,'close'); + }, + //刷新 + reloadPage : function(id,moduleId){ + this.operatePage(moduleId,id,'reload'); + }, + //更改标题 + setPageTitle : function(title,id,moduleId){ + this.operatePage(moduleId,id,'setTitle',[title]); + }, + //操作页面 + operatePage : function(moduleId,id,action,args){ + + moduleId = moduleId || this._getCurrentModuleId(); + args = args || []; + var _self = this, + module = _self._getModule(moduleId); + if(module){ + var tab = module.tab, + item = id ? tab.getItemById(id) : tab.getActivedItem(); + if(item && item[action]){ + item[action].apply(item,args); + } + } + }, + //创建模块 + _createModule:function(id){ + var _self = this, + item= _self._getModuleConfig(id), + modules = _self.get('modules'); + if(!item){ + return null; + } + var id =item.id, + tabId = '#J_'+id+'Tab', + treeId = '#J_'+id+'Tree'; + module = new tabNav(id,{render:tabId,height:getAutoHeight() - 5},{render:treeId,items:item.menu,height:getAutoHeight() - 5},item.collapsed,item.homePage); + modules[id]= module; + return module; + }, + //隐藏列表 + _hideHideList :function(){ + this.get('hideList').hide(); + }, + _init : function(){ + var _self = this; + _self._initDom(); + _self._initNavItems(); + _self._initEvent(); + }, + //进行自适应计算 + _initNavItems : function(){ + + var _self = this, + navItems = _self.get('navItems'), + hideItmes = _self.get('hideItmes'); + //如果不存在导航项,不用进行自适应计算 + if(navItems.length === 0) + { + return; + } + + $('').appendTo($(navItems)); + + var count = navItems.length, + clientWidth = BUI.viewportWidth(),//获取窗口宽度 + itemWidth = WIDTH_ITERM, + totalWidth = itemWidth * count, + showCount = 0; + + //如果导航项总宽度小于用户可视区域,不用进行自适应计算 + if(totalWidth <= clientWidth){ + return; + } + + //初始化dataIndex + $.each(navItems,function(index,item){ + $(item).attr(ATTTR_INDEX,index); + $(item).removeClass(CLS_LAST); + + }); + + showCount = parseInt(clientWidth / itemWidth); + var lastShowItem = navItems[showCount - 1]; + _self._setLastItem(lastShowItem); + + hideItmes.push($(lastShowItem).clone()[0]); + for(var i = showCount; i < count; i++){ + var itemEl = $(navItems[i]), + cloneItme = null; + + cloneItme = itemEl.clone()[0]; + hideItmes.push(cloneItme); + itemEl.addClass(CLS_HIDDEN); + + } + + _self._initHideList(); + + }, + _initHideList : function(){ + var _self = this, + hideList = _self.get('hideList'), + hideItmes = _self.get('hideItmes'); + + if(hideList){ + return; + } + + var template = '
                  ', + hideListEl = $(template).appendTo('body'); + hideList = hideListEl; + $.each(hideItmes,function(index,item){ + $(item).appendTo(hideList); + }); + _self.set('hideList',hideList); + _self._initHideListEvent(); + }, + _initHideListEvent:function(){ + var _self = this, + hideList = _self.get('hideList'); + + if(hideList == null){ + return; + } + + hideList.on('mouseleave',function(){ + _self._hideHideList(); + }); + + hideList.on('click',function(event){ + var item = findItem(event.target), + el = null, + dataIndex = 0; + if(item){ + el = $(item); + dataIndex = el.attr(ATTTR_INDEX); + _self._setModuleSelected(dataIndex); + _self._hideHideList(); + } + }); + }, + _initContents : function () { + var _self = this, + modulesConfig = _self.get('modulesConfig'), + navContent = _self.get('navContent'); + + //清空模块容器 + navContent.children().remove(); + + //初始化二级菜单一级Tab + $.each(modulesConfig,function(index,module){ + var id = module.id, + temp =['
                • '].join(''); + new $(temp).appendTo(navContent); + }); + }, + _initDom : function(){ + var _self = this; + + _self._initContents(); + _self._initLocation(); + + }, + _initEvent : function(){ + var _self = this, + navItems = _self.get('navItems'); + navItems.each(function(index,item){ + var item = $(item); + item.on('click',function(){ + var sender =$(this); + if(sender.hasClass(CLS_SELECTE)){ + return; + } + //sender.addClass(CLS_SELECTE); + _self._setModuleSelected(index,sender); + }).on('mouseenter',function(){ + + $(this).addClass(CLS_HOVER); + }).on('mouseleave',function(){ + $(this).removeClass(CLS_HOVER); + }); + }); + _self._initNavListEvent(); + }, + _initNavListEvent : function(){ + var _self = this, + hideList = _self.get('hideList'), + navList = _self.get('navList'); + + navList.on('mouseover',function(event){ + var item = findItem(event.target), + el = $(item), + offset = null; + + if(el && el.hasClass(CLS_LAST) && hideList){ + offset = el.offset(); + offset.top += 37; + + offset.left += 2; + _self._showHideList(offset); + } + }).on('mouseout',function(event){ + var toElement = event.toElement; + if(toElement && hideList && !$.contains(hideList[0],toElement) && toElement !== hideList[0]){ + _self._hideHideList(); + } + + }); + }, + //初始化选中的模块和页面 + _initLocation :function (){ + + //从链接中获取用户定位到的模块,便于刷新和转到指定模块使用 + var _self = this, + defaultSetting = getNavPositionSetting(); + if(defaultSetting){ + var pageId = defaultSetting.pageId, //页面编号 + search = defaultSetting.search, + index = _self._getModuleIndex(defaultSetting.moduleId); //附加参数 + + _self._setModuleSelected(index); + _self._setPageSelected(index,pageId,true,search); + }else{ + var currentModelIndex = _self.get('currentModelIndex'), + moduleId = _self._getModuleId(currentModelIndex); + if(currentModelIndex == null){ + _self._setModuleSelected(0); + }else{ + setNavPosition(moduleId); + } + } + }, + //获取模块,如果未初始化则初始化模块 + _getModule : function(id){ + var _self = this, + module = _self.get('modules')[id]; + if(!module){ + module = _self._createModule(id); + } + return module; + }, + _getModuleIndex : function(id){ + var _self = this, + result = 0; + + $.each(_self.get('modulesConfig'),function(index,conf){ + if(conf.id === id){ + result = index; + return false; + } + }); + return result; + }, + _getModuleConfig : function(id){ + var _self = this, + result =null; + $.each(_self.get('modulesConfig'),function(index,conf){ + if(conf.id === id){ + result = conf; + return false; + } + }); + return result; + }, + //获取模块编号 + _getModuleId : function(index){ + + var modulesConfig = this.get('modulesConfig'); + if(modulesConfig[index]){ + return modulesConfig[index].id; + }else{ + return index; + } + }, + _getCurrentPageId : function(){ + var _self = this, + moduleId = _self._getCurrentModuleId(), + module = _self._getModule(moduleId), + pageId =''; + if(module){ + var item = module.menu.getSelected(); + if(item){ + pageId = item.get('id'); + } + } + return pageId; + }, + _getCurrentModuleId : function(){ + return this._getModuleId(this.get('currentModelIndex')); + }, + //模块是否已经初始化 + _isModuleInitial : function(id){ + return !!this.get('modules')[id]; + }, + //设置最后一个 + _setLastItem : function(item){ + var _self = this, + lastShowItem = _self.get('lastShowItem'); + + if(lastShowItem === item){ + return; + } + + var appendNode = null, + lastShowItemEl = $(lastShowItem); + itemEl = $(item); + if(lastShowItem){ + appendNode = lastShowItemEl.find('.'+CLS_HIDE_CURRENT); + lastShowItemEl.removeClass(CLS_LAST); + lastShowItemEl.addClass(CLS_HIDDEN); + } + itemEl.addClass(CLS_LAST); + itemEl.removeClass(CLS_HIDDEN); + if(!appendNode){ + appendNode = $('  '); + } + appendNode.appendTo(itemEl.children('.nav-item-inner')); + _self.set('lastShowItem',item) + }, + //设置选中的模块 + _setModuleSelected : function(index,sender){ + var _self = this, + navItems = _self.get('navItems'), + navTabs = _self.get('navTabs'), + currentModelIndex = _self.get('currentModelIndex'); + + if(currentModelIndex !==index){ + var moduleId = _self._getModuleId(index), + module = null, + lastShowItem = _self.get('lastShowItem'), + isCreated = true;//模块是否已经创建 + + if(!_self._isModuleInitial(moduleId)){ + isCreated = false; + } + + module = _self._getModule(moduleId); + + + sender = sender ||$(_self.get('navItems')[index]); + //如果模块隐藏 + if(sender.hasClass(CLS_HIDDEN) && lastShowItem){ + _self._setLastItem(sender[0]); + _self._setSelectHideItem(index); + }/**/ + navItems.removeClass(CLS_SELECTE); + sender.addClass(CLS_SELECTE); + navTabs.addClass(CLS_HIDDEN); + $(navTabs[index]).removeClass(CLS_HIDDEN); + + currentModelIndex = index; + _self.set('currentModelIndex',currentModelIndex); + curPageId = _self._getCurrentPageId(); + setNavPosition(moduleId,curPageId); + + if(!curPageId && module.homePage){ + _self._setPageSelected(index,module.homePage); + } + } + }, + _setPageSelected:function(moduleIndex,pageId,isReload,search){ + var _self = this, + moduleId = _self._getModuleId(moduleIndex)||moduleIndex, + module = _self._getModule(moduleId); + if(module && pageId){ + module.menu.setSelectedByField(pageId); + var item = module.menu.getSelected(), + tab = module.tab, + href = '', + suffixIndex = -1; + if(item && item.get('id') === pageId){ + href = item.get('href'); + href = search ? (addSearch(href,search)) : href; + module.tab.addTab({id: item.get('id'), title: item.get('text'),closeable : item.get('closeable'), href: href},!!isReload); + + }else if(pageId){ + + var subDir = pageId.replace('-','/'); + if(subDir.indexOf('/') === -1){ + subDir = moduleId + '/' + subDir; + } + if((suffixIndex = pageId.indexOf('.')) === -1){ + subDir += _self.get('urlSuffix'); + } + href = search ? (subDir + '?' + search) : subDir; + tab.addTab({id:pageId,title:'',href:href},!!isReload); + } + } + }, + _showHideList:function(offset){ + var _self = this, + hideList = _self.get('hideList'); + + hideList.css('left',offset.left); + hideList.css('top',offset.top); + hideList.show(); + }, + _setSelectHideItem : function (index) { + var _self = this, + hideList = _self.get('hideList'), + hideItmes = _self.get('hideItmes'), + currentItem = null, + selectItem = null, + selectEl = null, + appendNode = null; + BUI.each(hideItmes,function(item){ + var itemEl = $(item); + if(itemEl.attr(ATTTR_INDEX) == index){ + selectItem = item; + } + + if(itemEl.hasClass(CLS_LAST)){ + currentItem = item; + } + }); + + if(currentItem !== selectItem){ + if(currentItem){ + appendNode = $(currentItem).find('.dl-hide-current'); + $(currentItem).removeClass(CLS_LAST); + } + $(selectItem).addClass(CLS_LAST); + if(!appendNode){ + appendNode = new Node('  '); + } + selectEl = $(selectItem); + appendNode.appendTo(selectEl.children('.nav-item-inner')); + selectEl.prependTo(hideList); + } + + } + + }); + PageUtil.MainPage = mainPage; +}); \ No newline at end of file diff --git a/源码/src/main/webapp/resource/assets/js/common/page-min.js b/源码/src/main/webapp/resource/assets/js/common/page-min.js new file mode 100644 index 0000000..8b5249e --- /dev/null +++ b/源码/src/main/webapp/resource/assets/js/common/page-min.js @@ -0,0 +1 @@ +$(function(){var a="page-action",c={"data-id":"id",title:"title","data-href":"href","data-close":"isClose","data-search":"search","data-mid":"moduleId","data-type":"type"};function b(d){var e={};$.each(d,function(h,f){var g=f.nodeName,i=c[g];if(i){e[i]=f.nodeValue}});return e}if(top.topManager){$("body").delegate("."+a,"click",function(f){var e=f.currentTarget,d=e.attributes,g=b(d);if(!g.type||g.type=="open"){top.topManager.openPage(g);f.preventDefault()}else{if(g.type=="setTitle"){top.topManager.setPageTitle(g.title,g.moduleId)}else{f.preventDefault();top.topManager.operatePage(g.moduleId,g.id,g.type)}}});if(0){alert("\u4f60\u597d\u4e48")}}}); diff --git a/源码/src/main/webapp/resource/assets/js/common/page.js b/源码/src/main/webapp/resource/assets/js/common/page.js new file mode 100644 index 0000000..08c69e6 --- /dev/null +++ b/源码/src/main/webapp/resource/assets/js/common/page.js @@ -0,0 +1,43 @@ +$(function () { + + var CLS_ACTION = 'page-action', + FIELD_MAP = { + 'data-id' :'id', + 'title' : 'title', + 'data-href' : 'href', + 'data-close' : 'isClose', + 'data-search' : 'search', + 'data-mid' : 'moduleId', + 'data-type' : 'type' + }; + + function parseParams(attrs){ + var rst = {}; + $.each(attrs,function(index,attr){ + var name = attr.nodeName, + filedName = FIELD_MAP[name]; + if(filedName){ + rst[filedName] = attr.nodeValue; + } + }); + return rst; + } + //只有在被框架页嵌套时,才起效 + if(top.topManager){ + $('body').delegate('.' + CLS_ACTION, 'click',function(ev){ + var sender = ev.currentTarget, + attrs = sender.attributes, + params = parseParams(attrs); + if(!params.type || params.type == 'open'){ + top.topManager.openPage(params); + ev.preventDefault(); + }else if(params.type == 'setTitle'){ + top.topManager.setPageTitle(params.title,params.moduleId); + }else{ + ev.preventDefault(); + top.topManager.operatePage(params.moduleId,params.id,params.type); + } + }); + } + +}); \ No newline at end of file diff --git a/源码/src/main/webapp/resource/assets/js/common/search-min.js b/源码/src/main/webapp/resource/assets/js/common/search-min.js new file mode 100644 index 0000000..0a7cdab --- /dev/null +++ b/源码/src/main/webapp/resource/assets/js/common/search-min.js @@ -0,0 +1 @@ +define("common/search",["bui/common","bui/grid","bui/form","bui/data","bui/overlay"],function(e){var g=e("bui/common"),b=e("bui/grid"),f=e("bui/data"),a=e("bui/overlay"),d=e("bui/form");function c(h){c.superclass.constructor.call(this,h);this._init()}c.ATTRS={autoSearch:{value:true},gridId:{value:"grid"},formId:{value:"searchForm"},btnId:{value:"btnSearch"},formCfg:{value:{}},gridCfg:{},form:{},grid:{},store:{}};g.extend(c,g.Base);g.augment(c,{_init:function(){var h=this;h._initForm();h._initStoreEvent();h._initGrid();h._initEvent();h._initData()},_initEvent:function(){this._initDomEvent();this._initFormEvent();this._initGridEvent()},_initDomEvent:function(){var h=this,k=h.get("btnId"),i=h.get("store"),j=h.get("form");$("#"+k).on("click",function(l){l.preventDefault();j.valid();if(j.isValid()){h.load(true)}})},_initForm:function(){var h=this,j=h.get("form");if(!j){var i=g.merge(h.get("formCfg"),{srcNode:"#"+h.get("formId")});j=new d.HForm(i);j.render();h.set("form",j)}},_initFormEvent:function(){},_initGrid:function(){var h=this,k=h.get("grid");if(!k){var i=h.get("gridCfg"),j=h.get("store");i.store=j;i.render="#"+h.get("gridId"),k=new b.Grid(i);k.render();h.set("grid",k)}},_initGridEvent:function(){},_initData:function(){var h=this,i=h.get("autoSearch");if(i){h.load(true)}},_initStoreEvent:function(){var h=this,i=h.get("store");i.on("exception",function(j){g.Message.Alert(j.error)})},load:function(k){var h=this,j=h.get("form"),i=h.get("store"),l=j.serializeToObject();if(k){l.start=0;l.pageIndex=0}i.load(l)}});c.createStore=function(i,h){h=g.merge({autoLoad:false,url:i,pageSize:30},h);return new f.Store(h)};c.createGridCfg=function(i,h){h=g.merge({columns:i,loadMask:true,bbar:{pagingBar:true}},h);return h};c.createLink=function(h){var i='{text}';return g.substitute(i,h)};return c}); diff --git a/源码/src/main/webapp/resource/assets/js/common/search.js b/源码/src/main/webapp/resource/assets/js/common/search.js new file mode 100644 index 0000000..04bd964 --- /dev/null +++ b/源码/src/main/webapp/resource/assets/js/common/search.js @@ -0,0 +1,213 @@ +/** + * @fileOverview 搜索页面业务控件 + * @ignore + */ + +define('common/search',['bui/common','bui/grid','bui/form','bui/data','bui/overlay'],function (require) { + var BUI = require('bui/common'), + Grid = require('bui/grid'), + Data = require('bui/data'), + Overlay = require('bui/overlay'), + Form = require('bui/form'); + + /** + * @class Search + * 搜索页类 + */ + function Search(config){ + + Search.superclass.constructor.call(this, config); + this._init(); + } + + Search.ATTRS = { + /** + * 是否自动查询,打开页面时未点击查询按钮时是否自动查询 + * @type {Boolean} + */ + autoSearch :{ + value : true + }, + /** + * grid 容器的 id + * @type {String} + */ + gridId : { + value : 'grid' + }, + /** + * 表单的容器的id + * @type {String} + */ + formId : { + value : 'searchForm' + }, + /** + * 查询按钮的id + * @type {Object} + */ + btnId : { + value : 'btnSearch' + }, + /** + * 表单的配置项 + * @type {Object} + */ + formCfg : { + value : {} + }, + /** + * grid 表格的配置项 + * @type {Object} + */ + gridCfg : { + + }, + /** + * 表单对象 + * @type {Object} + */ + form : { + + }, + /** + * 表格对象 + * @type {Object} + */ + grid : { + + }, + /** + * 数据缓冲类 + * @type {Object} + */ + store : { + + } + } + + BUI.extend(Search,BUI.Base); + + BUI.augment(Search,{ + _init : function(){ + var _self = this; + + _self._initForm(); + _self._initStoreEvent(); + _self._initGrid(); + _self._initEvent(); + _self._initData(); + }, + //初始化事件 + _initEvent : function(){ + this._initDomEvent(); + this._initFormEvent(); + this._initGridEvent(); + }, + _initDomEvent : function(){ + var _self = this, + btnId = _self.get('btnId'), + store = _self.get('store'), + form = _self.get('form'); + $('#'+btnId).on('click',function(ev){ + ev.preventDefault(); + form.valid(); + if(form.isValid()){ + _self.load(true); + } + }); + }, + //初始化form + _initForm : function(){ + var _self = this, + form = _self.get('form'); + if(!form){ + var formCfg = BUI.merge(_self.get('formCfg'),{ + srcNode : '#' + _self.get('formId') + }); + form = new Form.HForm(formCfg); + form.render(); + _self.set('form',form); + } + }, + _initFormEvent : function(){ + + }, + //初始化表格 + _initGrid : function(){ + var _self = this, + grid = _self.get('grid'); + if(!grid){ + var gridCfg = _self.get('gridCfg'), + store = _self.get('store'); + gridCfg.store = store; + gridCfg.render = '#' +_self.get('gridId'), + grid = new Grid.Grid(gridCfg); + grid.render(); + _self.set('grid',grid); + } + }, + _initGridEvent : function(){ + + }, + _initData : function(){ + var _self = this, + autoSearch = _self.get('autoSearch'); + if(autoSearch){ + _self.load(true); + } + }, + //初始化数据加载事件 + _initStoreEvent : function(){ + var _self = this, + store = _self.get('store'); + //处理异常 + store.on('exception',function(ev){ + BUI.Message.Alert(ev.error); + }); + }, + /** + * 加载数据 + * @param {Boolean} reset 是否重置表格查询的页数 + */ + load : function(reset){ + var _self =this, + form = _self.get('form'), + store = _self.get('store'), + param = form.serializeToObject(); + if(reset){ + param.start=0; + param.pageIndex = 0; + } + store.load(param); + } + }); + + Search.createStore = function(url,cfg){ + + cfg = BUI.merge({ + autoLoad : false, + url : url, + pageSize : 30 + },cfg); + return new Data.Store(cfg); + }; + + Search.createGridCfg = function(columns,cfg){ + cfg = BUI.merge({ + columns : columns, + loadMask : true, + bbar:{ + pagingBar:true + } + },cfg); + + return cfg; + }; + + Search.createLink = function(cfg){ + var temp = '{text}'; + return BUI.substitute(temp,cfg); + } + return Search; +}); \ No newline at end of file diff --git a/源码/src/main/webapp/resource/assets/js/config-min.js b/源码/src/main/webapp/resource/assets/js/config-min.js new file mode 100644 index 0000000..76383fd --- /dev/null +++ b/源码/src/main/webapp/resource/assets/js/config-min.js @@ -0,0 +1 @@ +(function(f){var d="",e="/assets/js";function a(h){if(!/:/.test(h)){return true}}function c(h){if(a(h)){var i=b();return i+"/"+h}return h}function b(){var h=location.href,i;h=h.replace(/\?.*$/,"").replace(/\#.*$/,"");i=h.lastIndexOf("/");return h.substring(0,i)}function g(){var h=f("script"),i="";f.each(h,function(k,j){var l=j.src,m=l.indexOf(e+"/config");if(m!==-1){i=l.substring(0,m);return false}});return c(i)}if(!d){d=g()}BUI.config({alias:{common:d+e+"/common",module:d+e+"/module"},map:[[/module\/(.*)-min.js/,"module/$1.js"]]})})(jQuery); diff --git a/源码/src/main/webapp/resource/assets/js/config.js b/源码/src/main/webapp/resource/assets/js/config.js new file mode 100644 index 0000000..ab4b156 --- /dev/null +++ b/源码/src/main/webapp/resource/assets/js/config.js @@ -0,0 +1,55 @@ +(function ($) { + + var baseUrl = '', //网站的根目录地址,发布到线上时使用 + jsBase = '/assets/js'; + + function isRelative(url){ + if(!/:/.test(url)){ + return true; + } + } + function formatUrl(url){ + if(isRelative(url)){ + var path = getCurrentPath(); + return path +'/'+ url; + } + return url; + } + function getCurrentPath(){ + var url = location.href, + lastIndex; + url = url.replace(/\?.*$/,'').replace(/\#.*$/,''); + lastIndex = url.lastIndexOf('/'); + return url.substring(0,lastIndex); + } + function getBaseUrl(){ //根据config.js的路径取baseUrl + var scripts = $('script'), + rst = ''; + $.each(scripts,function(index,script){ + var src = script.src, + lastIndex = src.indexOf(jsBase + '/config'); + if(lastIndex !== -1){ + rst = src.substring(0,lastIndex); + return false; + } + }); + return formatUrl(rst); + } + + if(!baseUrl){//如果未指定项目路径,进行匹配。 + baseUrl = getBaseUrl(); + } + + BUI.config({ + alias : { + 'common' : baseUrl + jsBase + '/common', + 'module' : baseUrl + jsBase + '/module' + },/**/ + map : [ //调试环境下使用'*.js',如果发布上线前,使用*-min.js去掉下面的map + //[/common\/(.*)-min.js/,'common/$1.js'], + [/module\/(.*)-min.js/,'module/$1.js'] + ] + + }); + +})(jQuery); \ No newline at end of file diff --git a/源码/src/main/webapp/resource/assets/js/editor-min.js b/源码/src/main/webapp/resource/assets/js/editor-min.js new file mode 100644 index 0000000..3a7fd84 --- /dev/null +++ b/源码/src/main/webapp/resource/assets/js/editor-min.js @@ -0,0 +1,4 @@ +/** + * @fileOverview \u7f16\u8f91\u5668\u547d\u540d\u7a7a\u95f4\u5165\u53e3 + * @ignore + */define("bui/editor",["bui/common","bui/form","bui/editor/editor","bui/editor/record","bui/editor/dialog"],function(e){var t=e("bui/common"),n=e("bui/form"),r=t.namespace("Editor");return t.mix(r,{Editor:e("bui/editor/editor"),RecordEditor:e("bui/editor/record"),DialogEditor:e("bui/editor/dialog")}),r}),define("bui/editor/mixin",function(e){function t(e){var t=e,n=t.get("controlCfgField"),r=t.get(n),i=t.addChild(r);t.setInternal(n,i)}var n=function(){t(this)};return n.ATTRS={acceptEvent:{value:"autohide"},preventHide:{value:!0},changeSourceEvent:{value:"show triggerchange"},ignoreInputFields:{value:!1},innerValueField:{},emptyValue:{},controlCfgField:{},autoUpdate:{value:!0},events:{value:{accept:!1,cancel:!1}}},n.prototype={__bindUI:function(){var e=this,t=e.get("acceptEvent"),n=e.get("changeSourceEvent");t&&e.on(t,function(){if(e.accept())return;if(e.get("preventHide"))return!1;e.cancel()}),n&&e.on(n,function(){e.setValue(e.getSourceValue()),e.get("visible")&&e.focus()})},getInnerControl:function(){var e=this,t=e.get("children");return t[0]},setValue:function(e){var t=this,n=t.getInnerControl();t.set("editValue",e),t.clearControlValue(),n.set(t.get("innerValueField"),e),e||t.valid()},getValue:function(){var e=this,t=e.getInnerControl();return t.get(e.get("innerValueField"))},isValid:function(){var e=this,t=e.getInnerControl();return t.isValid?t.isValid():!0},valid:function(){var e=this,t=e.getInnerControl();t.valid&&t.valid()},getErrors:function(){var e=this,t=e.getInnerControl();return t.getErrors?t.getErrors():[]},isChange:function(){var e=this,t=e.get("editValue"),n=e.getValue();return t!==n},clearValue:function(){this.clearControlValue(),this.clearErrors()},clearControlValue:function(){var e=this,t=e.getInnerControl();t.set(e.get("innerValueField"),e.get("emptyValue"))},clearErrors:function(){var e=this,t=e.getInnerControl();t.clearErrors()},getSourceValue:function(){},updateSource:function(){},handleNavEsc:function(){this.cancel()},handleNavEnter:function(e){var t=e.target;if(t.tagName==="TEXTAREA")return;t.tagName==="BUTTON"&&$(t).trigger("click"),this.accept()},focus:function(){var e=this,t=e.getInnerControl();t.focus&&t.focus()},accept:function(){var e=this,t;e.valid();if(!e.isValid())return!1;t=e.getValue(),e.get("autoUpdate")&&e.updateSource(t);if(e.fire("beforeaccept",{value:t})==0)return;return e.fire("accept",{value:t,editValue:e.get("editValue")}),e.hide(),!0},cancel:function(){this.fire("cancel"),this.clearValue(),this.hide()}},n}),define("bui/editor/editor",["bui/common","bui/overlay","bui/editor/mixin"],function(e){var t=e("bui/common"),n=e("bui/overlay").Overlay;CLS_TIPS="x-editor-tips",Mixin=e("bui/editor/mixin");var r=n.extend([Mixin],{bindUI:function(){var e=this,t=e.getInnerControl();e.on("validchange",function(t){!e.isValid()&&e.get("visible")?e._showError(e.getErrors()):e._hideError()}),e.on("hide",function(){e._hideError()}),e.on("show",function(){e.isValid()||e._showError(e.getErrors())})},_initOverlay:function(){var e=this,t=new n({children:[{xclass:"simple-list",itemTpl:'
                • ! {error}
                • '}],elCls:CLS_TIPS,autoRender:!0});return e.set("overlay",t),t},_getErrorList:function(){var e=this,t=e.get("overlay");return t&&t.get("children")[0]},_showError:function(e){var n=this,r=n.get("overlay")||n._initOverlay(),i=n._getErrorList(),s=n.get("errorAlign"),o=t.Array.map(e,function(e){return{error:e}});i.set("items",o),s.node=n.get("el"),r.set("align",s),r.show()},_hideError:function(){var e=this,t=e.get("overlay");t&&t.hide()},getSourceValue:function(){var e=this,t=e.get("curTrigger");return t.text()},updateSource:function(e){var t=this,n=t.get("curTrigger");n&&n.length&&n.text(e)},_uiSetWidth:function(e){var t=this;if(e!=null){var n=t.getInnerControl();n.set&&n.set("width",e)}}},{ATTRS:{innerValueField:{value:"value"},emptyValue:{value:""},autoHide:{value:!0},controlCfgField:{value:"field"},defaultChildCfg:{value:{tpl:"",forceFit:!0,errorTpl:""}},defaultChildClass:{value:"form-field"},align:{value:{points:["tl","tl"]}},errorAlign:{value:{points:["bl","tl"],offset:[0,10]}},overlay:{},field:{value:{}}}},{xclass:"editor"});return r}),define("bui/editor/record",["bui/common","bui/editor/editor"],function(e){var t=e("bui/common"),n=e("bui/editor/editor"),r=n.extend({getSourceValue:function(){return this.get("record")},updateSource:function(e){var n=this,r=n.get("record");t.mix(r,e)},_uiSetRecord:function(e){this.setValue(e)}},{ATTRS:{innerValueField:{value:"record"},acceptEvent:{value:""},emptyValue:{value:{}},autoHide:{value:!1},record:{value:{}},controlCfgField:{value:"form"},form:{value:{}},errorAlign:{value:{points:["tr","tl"],offset:[10,0]}},defaultChildCfg:{valueFn:function(){var e=this;return{xclass:"form",errorTpl:"",showError:!0,showChildError:!0,defaultChildCfg:{elCls:"bui-inline-block",tpl:"",forceFit:!0},buttons:[{btnCls:"button button-primary",text:"\u786e\u5b9a",handler:function(){e.accept()}},{btnCls:"button",text:"\u53d6\u6d88",handler:function(){e.cancel()}}]}}}}},{xclass:"record-editor"});return r}),define("bui/editor/dialog",["bui/overlay","bui/editor/mixin"],function(e){var t=e("bui/overlay").Dialog,n=e("bui/editor/mixin"),r=t.extend([n],{getSourceValue:function(){return this.get("record")},handleNavEnter:function(e){var t=this,n=t.get("success"),r=e.target;if(r.tagName==="TEXTAREA")return;r.tagName==="BUTTON"&&$(r).trigger("click"),n?n.call(t):this.accept()},updateSource:function(e){var t=this,n=t.get("record");BUI.mix(n,e)},_uiSetRecord:function(e){this.setValue(e)}},{ATTRS:{innerValueField:{value:"record"},acceptEvent:{value:""},record:{value:{}},emptyValue:{value:{}},controlCfgField:{value:"form"},changeSourceEvent:{value:""},defaultChildCfg:{value:{xclass:"form-horizontal"}},focusable:{value:!0},success:{value:function(){this.accept()}},form:{value:{}}}},{xclass:"dialog-editor"});return r}); diff --git a/源码/src/main/webapp/resource/assets/js/jquery-1.8.1.min.js b/源码/src/main/webapp/resource/assets/js/jquery-1.8.1.min.js new file mode 100644 index 0000000..ee68f35 --- /dev/null +++ b/源码/src/main/webapp/resource/assets/js/jquery-1.8.1.min.js @@ -0,0 +1,2 @@ +/*! jQuery v@1.8.1 jquery.com | jquery.org/license */ +(function(a,b){function G(a){var b=F[a]={};return p.each(a.split(s),function(a,c){b[c]=!0}),b}function J(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(I,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:+d+""===d?+d:H.test(d)?p.parseJSON(d):d}catch(f){}p.data(a,c,d)}else d=b}return d}function K(a){var b;for(b in a){if(b==="data"&&p.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function ba(){return!1}function bb(){return!0}function bh(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function bi(a,b){do a=a[b];while(a&&a.nodeType!==1);return a}function bj(a,b,c){b=b||0;if(p.isFunction(b))return p.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return p.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=p.grep(a,function(a){return a.nodeType===1});if(be.test(b))return p.filter(b,d,!c);b=p.filter(b,d)}return p.grep(a,function(a,d){return p.inArray(a,b)>=0===c})}function bk(a){var b=bl.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function bC(a,b){return a.getElementsByTagName(b)[0]||a.appendChild(a.ownerDocument.createElement(b))}function bD(a,b){if(b.nodeType!==1||!p.hasData(a))return;var c,d,e,f=p._data(a),g=p._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;d").appendTo(e.body),c=b.css("display");b.remove();if(c==="none"||c===""){bI=e.body.appendChild(bI||p.extend(e.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!bJ||!bI.createElement)bJ=(bI.contentWindow||bI.contentDocument).document,bJ.write(""),bJ.close();b=bJ.body.appendChild(bJ.createElement(a)),c=bH(b,"display"),e.body.removeChild(bI)}return bS[a]=c,c}function ci(a,b,c,d){var e;if(p.isArray(b))p.each(b,function(b,e){c||ce.test(a)?d(a,e):ci(a+"["+(typeof e=="object"?b:"")+"]",e,c,d)});else if(!c&&p.type(b)==="object")for(e in b)ci(a+"["+e+"]",b[e],c,d);else d(a,b)}function cz(a){return function(b,c){typeof b!="string"&&(c=b,b="*");var d,e,f,g=b.toLowerCase().split(s),h=0,i=g.length;if(p.isFunction(c))for(;h)[^>]*$|#([\w\-]*)$)/,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^[\],:{}\s]*$/,x=/(?:^|:|,)(?:\s*\[)+/g,y=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,z=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,A=/^-ms-/,B=/-([\da-z])/gi,C=function(a,b){return(b+"").toUpperCase()},D=function(){e.addEventListener?(e.removeEventListener("DOMContentLoaded",D,!1),p.ready()):e.readyState==="complete"&&(e.detachEvent("onreadystatechange",D),p.ready())},E={};p.fn=p.prototype={constructor:p,init:function(a,c,d){var f,g,h,i;if(!a)return this;if(a.nodeType)return this.context=this[0]=a,this.length=1,this;if(typeof a=="string"){a.charAt(0)==="<"&&a.charAt(a.length-1)===">"&&a.length>=3?f=[null,a,null]:f=u.exec(a);if(f&&(f[1]||!c)){if(f[1])return c=c instanceof p?c[0]:c,i=c&&c.nodeType?c.ownerDocument||c:e,a=p.parseHTML(f[1],i,!0),v.test(f[1])&&p.isPlainObject(c)&&this.attr.call(a,c,!0),p.merge(this,a);g=e.getElementById(f[2]);if(g&&g.parentNode){if(g.id!==f[2])return d.find(a);this.length=1,this[0]=g}return this.context=e,this.selector=a,this}return!c||c.jquery?(c||d).find(a):this.constructor(c).find(a)}return p.isFunction(a)?d.ready(a):(a.selector!==b&&(this.selector=a.selector,this.context=a.context),p.makeArray(a,this))},selector:"",jquery:"1.8.1",length:0,size:function(){return this.length},toArray:function(){return k.call(this)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=p.merge(this.constructor(),a);return d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")"),d},each:function(a,b){return p.each(this,a,b)},ready:function(a){return p.ready.promise().done(a),this},eq:function(a){return a=+a,a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(k.apply(this,arguments),"slice",k.call(arguments).join(","))},map:function(a){return this.pushStack(p.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:j,sort:[].sort,splice:[].splice},p.fn.init.prototype=p.fn,p.extend=p.fn.extend=function(){var a,c,d,e,f,g,h=arguments[0]||{},i=1,j=arguments.length,k=!1;typeof h=="boolean"&&(k=h,h=arguments[1]||{},i=2),typeof h!="object"&&!p.isFunction(h)&&(h={}),j===i&&(h=this,--i);for(;i0)return;d.resolveWith(e,[p]),p.fn.trigger&&p(e).trigger("ready").off("ready")},isFunction:function(a){return p.type(a)==="function"},isArray:Array.isArray||function(a){return p.type(a)==="array"},isWindow:function(a){return a!=null&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):E[m.call(a)]||"object"},isPlainObject:function(a){if(!a||p.type(a)!=="object"||a.nodeType||p.isWindow(a))return!1;try{if(a.constructor&&!n.call(a,"constructor")&&!n.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||n.call(a,d)},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},error:function(a){throw new Error(a)},parseHTML:function(a,b,c){var d;return!a||typeof a!="string"?null:(typeof b=="boolean"&&(c=b,b=0),b=b||e,(d=v.exec(a))?[b.createElement(d[1])]:(d=p.buildFragment([a],b,c?null:[]),p.merge([],(d.cacheable?p.clone(d.fragment):d.fragment).childNodes)))},parseJSON:function(b){if(!b||typeof b!="string")return null;b=p.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(w.test(b.replace(y,"@").replace(z,"]").replace(x,"")))return(new Function("return "+b))();p.error("Invalid JSON: "+b)},parseXML:function(c){var d,e;if(!c||typeof c!="string")return null;try{a.DOMParser?(e=new DOMParser,d=e.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(f){d=b}return(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&p.error("Invalid XML: "+c),d},noop:function(){},globalEval:function(b){b&&r.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(A,"ms-").replace(B,C)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var e,f=0,g=a.length,h=g===b||p.isFunction(a);if(d){if(h){for(e in a)if(c.apply(a[e],d)===!1)break}else for(;f0&&a[0]&&a[i-1]||i===0||p.isArray(a));if(j)for(;h-1)i.splice(c,1),e&&(c<=g&&g--,c<=h&&h--)}),this},has:function(a){return p.inArray(a,i)>-1},empty:function(){return i=[],this},disable:function(){return i=j=c=b,this},disabled:function(){return!i},lock:function(){return j=b,c||l.disable(),this},locked:function(){return!j},fireWith:function(a,b){return b=b||[],b=[a,b.slice?b.slice():b],i&&(!d||j)&&(e?j.push(b):k(b)),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!d}};return l},p.extend({Deferred:function(a){var b=[["resolve","done",p.Callbacks("once memory"),"resolved"],["reject","fail",p.Callbacks("once memory"),"rejected"],["notify","progress",p.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return p.Deferred(function(c){p.each(b,function(b,d){var f=d[0],g=a[b];e[d[1]](p.isFunction(g)?function(){var a=g.apply(this,arguments);a&&p.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f+"With"](this===e?c:this,[a])}:c[f])}),a=null}).promise()},promise:function(a){return typeof a=="object"?p.extend(a,d):d}},e={};return d.pipe=d.then,p.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[a^1][2].disable,b[2][2].lock),e[f[0]]=g.fire,e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=k.call(arguments),d=c.length,e=d!==1||a&&p.isFunction(a.promise)?d:0,f=e===1?a:p.Deferred(),g=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?k.call(arguments):d,c===h?f.notifyWith(b,c):--e||f.resolveWith(b,c)}},h,i,j;if(d>1){h=new Array(d),i=new Array(d),j=new Array(d);for(;b
                  a",c=n.getElementsByTagName("*"),d=n.getElementsByTagName("a")[0],d.style.cssText="top:1px;float:left;opacity:.5";if(!c||!c.length||!d)return{};f=e.createElement("select"),g=f.appendChild(e.createElement("option")),h=n.getElementsByTagName("input")[0],b={leadingWhitespace:n.firstChild.nodeType===3,tbody:!n.getElementsByTagName("tbody").length,htmlSerialize:!!n.getElementsByTagName("link").length,style:/top/.test(d.getAttribute("style")),hrefNormalized:d.getAttribute("href")==="/a",opacity:/^0.5/.test(d.style.opacity),cssFloat:!!d.style.cssFloat,checkOn:h.value==="on",optSelected:g.selected,getSetAttribute:n.className!=="t",enctype:!!e.createElement("form").enctype,html5Clone:e.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",boxModel:e.compatMode==="CSS1Compat",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},h.checked=!0,b.noCloneChecked=h.cloneNode(!0).checked,f.disabled=!0,b.optDisabled=!g.disabled;try{delete n.test}catch(o){b.deleteExpando=!1}!n.addEventListener&&n.attachEvent&&n.fireEvent&&(n.attachEvent("onclick",m=function(){b.noCloneEvent=!1}),n.cloneNode(!0).fireEvent("onclick"),n.detachEvent("onclick",m)),h=e.createElement("input"),h.value="t",h.setAttribute("type","radio"),b.radioValue=h.value==="t",h.setAttribute("checked","checked"),h.setAttribute("name","t"),n.appendChild(h),i=e.createDocumentFragment(),i.appendChild(n.lastChild),b.checkClone=i.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=h.checked,i.removeChild(h),i.appendChild(n);if(n.attachEvent)for(k in{submit:!0,change:!0,focusin:!0})j="on"+k,l=j in n,l||(n.setAttribute(j,"return;"),l=typeof n[j]=="function"),b[k+"Bubbles"]=l;return p(function(){var c,d,f,g,h="padding:0;margin:0;border:0;display:block;overflow:hidden;",i=e.getElementsByTagName("body")[0];if(!i)return;c=e.createElement("div"),c.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",i.insertBefore(c,i.firstChild),d=e.createElement("div"),c.appendChild(d),d.innerHTML="
                  t
                  ",f=d.getElementsByTagName("td"),f[0].style.cssText="padding:0;margin:0;border:0;display:none",l=f[0].offsetHeight===0,f[0].style.display="",f[1].style.display="none",b.reliableHiddenOffsets=l&&f[0].offsetHeight===0,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",b.boxSizing=d.offsetWidth===4,b.doesNotIncludeMarginInBodyOffset=i.offsetTop!==1,a.getComputedStyle&&(b.pixelPosition=(a.getComputedStyle(d,null)||{}).top!=="1%",b.boxSizingReliable=(a.getComputedStyle(d,null)||{width:"4px"}).width==="4px",g=e.createElement("div"),g.style.cssText=d.style.cssText=h,g.style.marginRight=g.style.width="0",d.style.width="1px",d.appendChild(g),b.reliableMarginRight=!parseFloat((a.getComputedStyle(g,null)||{}).marginRight)),typeof d.style.zoom!="undefined"&&(d.innerHTML="",d.style.cssText=h+"width:1px;padding:1px;display:inline;zoom:1",b.inlineBlockNeedsLayout=d.offsetWidth===3,d.style.display="block",d.style.overflow="visible",d.innerHTML="
                  ",d.firstChild.style.width="5px",b.shrinkWrapBlocks=d.offsetWidth!==3,c.style.zoom=1),i.removeChild(c),c=d=f=g=null}),i.removeChild(n),c=d=f=g=h=i=n=null,b}();var H=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,I=/([A-Z])/g;p.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(p.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){return a=a.nodeType?p.cache[a[p.expando]]:a[p.expando],!!a&&!K(a)},data:function(a,c,d,e){if(!p.acceptData(a))return;var f,g,h=p.expando,i=typeof c=="string",j=a.nodeType,k=j?p.cache:a,l=j?a[h]:a[h]&&h;if((!l||!k[l]||!e&&!k[l].data)&&i&&d===b)return;l||(j?a[h]=l=p.deletedIds.pop()||++p.uuid:l=h),k[l]||(k[l]={},j||(k[l].toJSON=p.noop));if(typeof c=="object"||typeof c=="function")e?k[l]=p.extend(k[l],c):k[l].data=p.extend(k[l].data,c);return f=k[l],e||(f.data||(f.data={}),f=f.data),d!==b&&(f[p.camelCase(c)]=d),i?(g=f[c],g==null&&(g=f[p.camelCase(c)])):g=f,g},removeData:function(a,b,c){if(!p.acceptData(a))return;var d,e,f,g=a.nodeType,h=g?p.cache:a,i=g?a[p.expando]:p.expando;if(!h[i])return;if(b){d=c?h[i]:h[i].data;if(d){p.isArray(b)||(b in d?b=[b]:(b=p.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,f=b.length;e1,null,!1))},removeData:function(a){return this.each(function(){p.removeData(this,a)})}}),p.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=p._data(a,b),c&&(!d||p.isArray(c)?d=p._data(a,b,p.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=p.queue(a,b),d=c.length,e=c.shift(),f=p._queueHooks(a,b),g=function(){p.dequeue(a,b)};e==="inprogress"&&(e=c.shift(),d--),e&&(b==="fx"&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return p._data(a,c)||p._data(a,c,{empty:p.Callbacks("once memory").add(function(){p.removeData(a,b+"queue",!0),p.removeData(a,c,!0)})})}}),p.fn.extend({queue:function(a,c){var d=2;return typeof a!="string"&&(c=a,a="fx",d--),arguments.length1)},removeAttr:function(a){return this.each(function(){p.removeAttr(this,a)})},prop:function(a,b){return p.access(this,p.prop,a,b,arguments.length>1)},removeProp:function(a){return a=p.propFix[a]||a,this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,f,g,h;if(p.isFunction(a))return this.each(function(b){p(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(s);for(c=0,d=this.length;c-1)d=d.replace(" "+c[f]+" "," ");e.className=a?p.trim(d):""}}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";return p.isFunction(a)?this.each(function(c){p(this).toggleClass(a.call(this,c,this.className,b),b)}):this.each(function(){if(c==="string"){var e,f=0,g=p(this),h=b,i=a.split(s);while(e=i[f++])h=d?h:!g.hasClass(e),g[h?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&p._data(this,"__className__",this.className),this.className=this.className||a===!1?"":p._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c-1)return!0;return!1},val:function(a){var c,d,e,f=this[0];if(!arguments.length){if(f)return c=p.valHooks[f.type]||p.valHooks[f.nodeName.toLowerCase()],c&&"get"in c&&(d=c.get(f,"value"))!==b?d:(d=f.value,typeof d=="string"?d.replace(P,""):d==null?"":d);return}return e=p.isFunction(a),this.each(function(d){var f,g=p(this);if(this.nodeType!==1)return;e?f=a.call(this,d,g.val()):f=a,f==null?f="":typeof f=="number"?f+="":p.isArray(f)&&(f=p.map(f,function(a){return a==null?"":a+""})),c=p.valHooks[this.type]||p.valHooks[this.nodeName.toLowerCase()];if(!c||!("set"in c)||c.set(this,f,"value")===b)this.value=f})}}),p.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,f=a.selectedIndex,g=[],h=a.options,i=a.type==="select-one";if(f<0)return null;c=i?f:0,d=i?f+1:h.length;for(;c=0}),c.length||(a.selectedIndex=-1),c}}},attrFn:{},attr:function(a,c,d,e){var f,g,h,i=a.nodeType;if(!a||i===3||i===8||i===2)return;if(e&&p.isFunction(p.fn[c]))return p(a)[c](d);if(typeof a.getAttribute=="undefined")return p.prop(a,c,d);h=i!==1||!p.isXMLDoc(a),h&&(c=c.toLowerCase(),g=p.attrHooks[c]||(T.test(c)?M:L));if(d!==b){if(d===null){p.removeAttr(a,c);return}return g&&"set"in g&&h&&(f=g.set(a,d,c))!==b?f:(a.setAttribute(c,""+d),d)}return g&&"get"in g&&h&&(f=g.get(a,c))!==null?f:(f=a.getAttribute(c),f===null?b:f)},removeAttr:function(a,b){var c,d,e,f,g=0;if(b&&a.nodeType===1){d=b.split(s);for(;g=0}})});var V=/^(?:textarea|input|select)$/i,W=/^([^\.]*|)(?:\.(.+)|)$/,X=/(?:^|\s)hover(\.\S+|)\b/,Y=/^key/,Z=/^(?:mouse|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=function(a){return p.event.special.hover?a:a.replace(X,"mouseenter$1 mouseleave$1")};p.event={add:function(a,c,d,e,f){var g,h,i,j,k,l,m,n,o,q,r;if(a.nodeType===3||a.nodeType===8||!c||!d||!(g=p._data(a)))return;d.handler&&(o=d,d=o.handler,f=o.selector),d.guid||(d.guid=p.guid++),i=g.events,i||(g.events=i={}),h=g.handle,h||(g.handle=h=function(a){return typeof p!="undefined"&&(!a||p.event.triggered!==a.type)?p.event.dispatch.apply(h.elem,arguments):b},h.elem=a),c=p.trim(_(c)).split(" ");for(j=0;j=0&&(s=s.slice(0,-1),i=!0),s.indexOf(".")>=0&&(t=s.split("."),s=t.shift(),t.sort());if((!f||p.event.customEvent[s])&&!p.event.global[s])return;c=typeof c=="object"?c[p.expando]?c:new p.Event(s,c):new p.Event(s),c.type=s,c.isTrigger=!0,c.exclusive=i,c.namespace=t.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+t.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,m=s.indexOf(":")<0?"on"+s:"";if(!f){h=p.cache;for(j in h)h[j].events&&h[j].events[s]&&p.event.trigger(c,d,h[j].handle.elem,!0);return}c.result=b,c.target||(c.target=f),d=d!=null?p.makeArray(d):[],d.unshift(c),n=p.event.special[s]||{};if(n.trigger&&n.trigger.apply(f,d)===!1)return;q=[[f,n.bindType||s]];if(!g&&!n.noBubble&&!p.isWindow(f)){r=n.delegateType||s,k=$.test(r+s)?f:f.parentNode;for(l=f;k;k=k.parentNode)q.push([k,r]),l=k;l===(f.ownerDocument||e)&&q.push([l.defaultView||l.parentWindow||a,r])}for(j=0;j=0),h[l]&&j.push(k);j.length&&t.push({elem:f,matches:j})}n.length>o&&t.push({elem:this,matches:n.slice(o)});for(d=0;d0?this.on(b,null,a,c):this.trigger(b)},Y.test(b)&&(p.event.fixHooks[b]=p.event.keyHooks),Z.test(b)&&(p.event.fixHooks[b]=p.event.mouseHooks)}),function(a,b){function $(a,b,c,d){c=c||[],b=b||q;var e,f,g,j,k=b.nodeType;if(k!==1&&k!==9)return[];if(!a||typeof a!="string")return c;g=h(b);if(!g&&!d)if(e=L.exec(a))if(j=e[1]){if(k===9){f=b.getElementById(j);if(!f||!f.parentNode)return c;if(f.id===j)return c.push(f),c}else if(b.ownerDocument&&(f=b.ownerDocument.getElementById(j))&&i(b,f)&&f.id===j)return c.push(f),c}else{if(e[2])return u.apply(c,t.call(b.getElementsByTagName(a),0)),c;if((j=e[3])&&X&&b.getElementsByClassName)return u.apply(c,t.call(b.getElementsByClassName(j),0)),c}return bk(a,b,c,d,g)}function _(a){return function(b){var c=b.nodeName.toLowerCase();return c==="input"&&b.type===a}}function ba(a){return function(b){var c=b.nodeName.toLowerCase();return(c==="input"||c==="button")&&b.type===a}}function bb(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}function bc(a,b,c,d){var e,g,h,i,j,k,l,m,n,p,r=!c&&b!==q,s=(r?"":"")+a.replace(H,"$1"),u=y[o][s];if(u)return d?0:t.call(u,0);j=a,k=[],m=0,n=f.preFilter,p=f.filter;while(j){if(!e||(g=I.exec(j)))g&&(j=j.slice(g[0].length),h.selector=l),k.push(h=[]),l="",r&&(j=" "+j);e=!1;if(g=J.exec(j))l+=g[0],j=j.slice(g[0].length),e=h.push({part:g.pop().replace(H," "),string:g[0],captures:g});for(i in p)(g=S[i].exec(j))&&(!n[i]||(g=n[i](g,b,c)))&&(l+=g[0],j=j.slice(g[0].length),e=h.push({part:i,string:g.shift(),captures:g}));if(!e)break}return l&&(h.selector=l),d?j.length:j?$.error(a):t.call(y(s,k),0)}function bd(a,b,e,f){var g=b.dir,h=s++;return a||(a=function(a){return a===e}),b.first?function(b){while(b=b[g])if(b.nodeType===1)return a(b)&&b}:f?function(b){while(b=b[g])if(b.nodeType===1&&a(b))return b}:function(b){var e,f=h+"."+c,i=f+"."+d;while(b=b[g])if(b.nodeType===1){if((e=b[o])===i)return b.sizset;if(typeof e=="string"&&e.indexOf(f)===0){if(b.sizset)return b}else{b[o]=i;if(a(b))return b.sizset=!0,b;b.sizset=!1}}}}function be(a,b){return a?function(c){var d=b(c);return d&&a(d===!0?c:d)}:b}function bf(a,b,c){var d,e,g=0;for(;d=a[g];g++)f.relative[d.part]?e=bd(e,f.relative[d.part],b,c):e=be(e,f.filter[d.part].apply(null,d.captures.concat(b,c)));return e}function bg(a){return function(b){var c,d=0;for(;c=a[d];d++)if(c(b))return!0;return!1}}function bh(a,b,c,d){var e=0,f=b.length;for(;e0?i(h,c,g):[]}function bj(a,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q,r,s=0,t=a.length,v=S.POS,w=new RegExp("^"+v.source+"(?!"+A+")","i"),x=function(){var a=1,c=arguments.length-2;for(;al){g+=k.slice(l,n.index),l=p,q=[c],J.test(g)&&(m&&(q=m),m=e);if(r=O.test(g))g=g.slice(0,-5).replace(J,"$&*"),l++;n.length>1&&n[0].replace(w,x),m=bi(g,n[1],n[2],q,m,r)}g=""}}o||(g+=k),o=!1}g?J.test(g)?bh(g,m||[c],d,e):$(g,c,d,e?e.concat(m):m):u.apply(d,m)}return t===1?d:$.uniqueSort(d)}function bk(a,b,e,g,h){a=a.replace(H,"$1");var i,k,l,m,n,o,p,q,r,s,v=bc(a,b,h),w=b.nodeType;if(S.POS.test(a))return bj(v,b,e,g);if(g)i=t.call(g,0);else if(v.length===1){if((o=t.call(v[0],0)).length>2&&(p=o[0]).part==="ID"&&w===9&&!h&&f.relative[o[1].part]){b=f.find.ID(p.captures[0].replace(R,""),b,h)[0];if(!b)return e;a=a.slice(o.shift().string.length)}r=(v=N.exec(o[0].string))&&!v.index&&b.parentNode||b,q="";for(n=o.length-1;n>=0;n--){p=o[n],s=p.part,q=p.string+q;if(f.relative[s])break;if(f.order.test(s)){i=f.find[s](p.captures[0].replace(R,""),r,h);if(i==null)continue;a=a.slice(0,a.length-q.length)+q.replace(S[s],""),a||u.apply(e,t.call(i,0));break}}}if(a){k=j(a,b,h),c=k.dirruns++,i==null&&(i=f.find.TAG("*",N.test(a)&&b.parentNode||b));for(n=0;m=i[n];n++)d=k.runs++,k(m)&&e.push(m)}return e}var c,d,e,f,g,h,i,j,k,l,m=!0,n="undefined",o=("sizcache"+Math.random()).replace(".",""),q=a.document,r=q.documentElement,s=0,t=[].slice,u=[].push,v=function(a,b){return a[o]=b||!0,a},w=function(){var a={},b=[];return v(function(c,d){return b.push(c)>f.cacheLength&&delete a[b.shift()],a[c]=d},a)},x=w(),y=w(),z=w(),A="[\\x20\\t\\r\\n\\f]",B="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",C=B.replace("w","w#"),D="([*^$|!~]?=)",E="\\["+A+"*("+B+")"+A+"*(?:"+D+A+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+C+")|)|)"+A+"*\\]",F=":("+B+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+E+")|[^:]|\\\\.)*|.*))\\)|)",G=":(nth|eq|gt|lt|first|last|even|odd)(?:\\(((?:-\\d)?\\d*)\\)|)(?=[^-]|$)",H=new RegExp("^"+A+"+|((?:^|[^\\\\])(?:\\\\.)*)"+A+"+$","g"),I=new RegExp("^"+A+"*,"+A+"*"),J=new RegExp("^"+A+"*([\\x20\\t\\r\\n\\f>+~])"+A+"*"),K=new RegExp(F),L=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,M=/^:not/,N=/[\x20\t\r\n\f]*[+~]/,O=/:not\($/,P=/h\d/i,Q=/input|select|textarea|button/i,R=/\\(?!\\)/g,S={ID:new RegExp("^#("+B+")"),CLASS:new RegExp("^\\.("+B+")"),NAME:new RegExp("^\\[name=['\"]?("+B+")['\"]?\\]"),TAG:new RegExp("^("+B.replace("w","w*")+")"),ATTR:new RegExp("^"+E),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|nth|last|first)-child(?:\\("+A+"*(even|odd|(([+-]|)(\\d*)n|)"+A+"*(?:([+-]|)"+A+"*(\\d+)|))"+A+"*\\)|)","i"),POS:new RegExp(G,"ig"),needsContext:new RegExp("^"+A+"*[>+~]|"+G,"i")},T=function(a){var b=q.createElement("div");try{return a(b)}catch(c){return!1}finally{b=null}},U=T(function(a){return a.appendChild(q.createComment("")),!a.getElementsByTagName("*").length}),V=T(function(a){return a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!==n&&a.firstChild.getAttribute("href")==="#"}),W=T(function(a){a.innerHTML="";var b=typeof a.lastChild.getAttribute("multiple");return b!=="boolean"&&b!=="string"}),X=T(function(a){return a.innerHTML="",!a.getElementsByClassName||!a.getElementsByClassName("e").length?!1:(a.lastChild.className="e",a.getElementsByClassName("e").length===2)}),Y=T(function(a){a.id=o+0,a.innerHTML="
                  ",r.insertBefore(a,r.firstChild);var b=q.getElementsByName&&q.getElementsByName(o).length===2+q.getElementsByName(o+0).length;return e=!q.getElementById(o),r.removeChild(a),b});try{t.call(r.childNodes,0)[0].nodeType}catch(Z){t=function(a){var b,c=[];for(;b=this[a];a++)c.push(b);return c}}$.matches=function(a,b){return $(a,null,null,b)},$.matchesSelector=function(a,b){return $(b,null,null,[a]).length>0},g=$.getText=function(a){var b,c="",d=0,e=a.nodeType;if(e){if(e===1||e===9||e===11){if(typeof a.textContent=="string")return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=g(a)}else if(e===3||e===4)return a.nodeValue}else for(;b=a[d];d++)c+=g(b);return c},h=$.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?b.nodeName!=="HTML":!1},i=$.contains=r.contains?function(a,b){var c=a.nodeType===9?a.documentElement:a,d=b&&b.parentNode;return a===d||!!(d&&d.nodeType===1&&c.contains&&c.contains(d))}:r.compareDocumentPosition?function(a,b){return b&&!!(a.compareDocumentPosition(b)&16)}:function(a,b){while(b=b.parentNode)if(b===a)return!0;return!1},$.attr=function(a,b){var c,d=h(a);return d||(b=b.toLowerCase()),f.attrHandle[b]?f.attrHandle[b](a):W||d?a.getAttribute(b):(c=a.getAttributeNode(b),c?typeof a[b]=="boolean"?a[b]?b:null:c.specified?c.value:null:null)},f=$.selectors={cacheLength:50,createPseudo:v,match:S,order:new RegExp("ID|TAG"+(Y?"|NAME":"")+(X?"|CLASS":"")),attrHandle:V?{}:{href:function(a){return a.getAttribute("href",2)},type:function(a){return a.getAttribute("type")}},find:{ID:e?function(a,b,c){if(typeof b.getElementById!==n&&!c){var d=b.getElementById(a);return d&&d.parentNode?[d]:[]}}:function(a,c,d){if(typeof c.getElementById!==n&&!d){var e=c.getElementById(a);return e?e.id===a||typeof e.getAttributeNode!==n&&e.getAttributeNode("id").value===a?[e]:b:[]}},TAG:U?function(a,b){if(typeof b.getElementsByTagName!==n)return b.getElementsByTagName(a)}:function(a,b){var c=b.getElementsByTagName(a);if(a==="*"){var d,e=[],f=0;for(;d=c[f];f++)d.nodeType===1&&e.push(d);return e}return c},NAME:function(a,b){if(typeof b.getElementsByName!==n)return b.getElementsByName(name)},CLASS:function(a,b,c){if(typeof b.getElementsByClassName!==n&&!c)return b.getElementsByClassName(a)}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(R,""),a[3]=(a[4]||a[5]||"").replace(R,""),a[2]==="~="&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),a[1]==="nth"?(a[2]||$.error(a[0]),a[3]=+(a[3]?a[4]+(a[5]||1):2*(a[2]==="even"||a[2]==="odd")),a[4]=+(a[6]+a[7]||a[2]==="odd")):a[2]&&$.error(a[0]),a},PSEUDO:function(a,b,c){var d,e;if(S.CHILD.test(a[0]))return null;if(a[3])a[2]=a[3];else if(d=a[4])K.test(d)&&(e=bc(d,b,c,!0))&&(e=d.indexOf(")",d.length-e)-d.length)&&(d=d.slice(0,e),a[0]=a[0].slice(0,e)),a[2]=d;return a.slice(0,3)}},filter:{ID:e?function(a){return a=a.replace(R,""),function(b){return b.getAttribute("id")===a}}:function(a){return a=a.replace(R,""),function(b){var c=typeof b.getAttributeNode!==n&&b.getAttributeNode("id");return c&&c.value===a}},TAG:function(a){return a==="*"?function(){return!0}:(a=a.replace(R,"").toLowerCase(),function(b){return b.nodeName&&b.nodeName.toLowerCase()===a})},CLASS:function(a){var b=x[o][a];return b||(b=x(a,new RegExp("(^|"+A+")"+a+"("+A+"|$)"))),function(a){return b.test(a.className||typeof a.getAttribute!==n&&a.getAttribute("class")||"")}},ATTR:function(a,b,c){return b?function(d){var e=$.attr(d,a),f=e+"";if(e==null)return b==="!=";switch(b){case"=":return f===c;case"!=":return f!==c;case"^=":return c&&f.indexOf(c)===0;case"*=":return c&&f.indexOf(c)>-1;case"$=":return c&&f.substr(f.length-c.length)===c;case"~=":return(" "+f+" ").indexOf(c)>-1;case"|=":return f===c||f.substr(0,c.length+1)===c+"-"}}:function(b){return $.attr(b,a)!=null}},CHILD:function(a,b,c,d){if(a==="nth"){var e=s++;return function(a){var b,f,g=0,h=a;if(c===1&&d===0)return!0;b=a.parentNode;if(b&&(b[o]!==e||!a.sizset)){for(h=b.firstChild;h;h=h.nextSibling)if(h.nodeType===1){h.sizset=++g;if(h===a)break}b[o]=e}return f=a.sizset-d,c===0?f===0:f%c===0&&f/c>=0}}return function(b){var c=b;switch(a){case"only":case"first":while(c=c.previousSibling)if(c.nodeType===1)return!1;if(a==="first")return!0;c=b;case"last":while(c=c.nextSibling)if(c.nodeType===1)return!1;return!0}}},PSEUDO:function(a,b,c,d){var e,g=f.pseudos[a]||f.pseudos[a.toLowerCase()];return g||$.error("unsupported pseudo: "+a),g[o]?g(b,c,d):g.length>1?(e=[a,a,"",b],function(a){return g(a,0,e)}):g}},pseudos:{not:v(function(a,b,c){var d=j(a.replace(H,"$1"),b,c);return function(a){return!d(a)}}),enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&!!a.checked||b==="option"&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},parent:function(a){return!f.pseudos.empty(a)},empty:function(a){var b;a=a.firstChild;while(a){if(a.nodeName>"@"||(b=a.nodeType)===3||b===4)return!1;a=a.nextSibling}return!0},contains:v(function(a){return function(b){return(b.textContent||b.innerText||g(b)).indexOf(a)>-1}}),has:v(function(a){return function(b){return $(a,b).length>0}}),header:function(a){return P.test(a.nodeName)},text:function(a){var b,c;return a.nodeName.toLowerCase()==="input"&&(b=a.type)==="text"&&((c=a.getAttribute("type"))==null||c.toLowerCase()===b)},radio:_("radio"),checkbox:_("checkbox"),file:_("file"),password:_("password"),image:_("image"),submit:ba("submit"),reset:ba("reset"),button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&a.type==="button"||b==="button"},input:function(a){return Q.test(a.nodeName)},focus:function(a){var b=a.ownerDocument;return a===b.activeElement&&(!b.hasFocus||b.hasFocus())&&(!!a.type||!!a.href)},active:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b,c){return c?a.slice(1):[a[0]]},last:function(a,b,c){var d=a.pop();return c?a:[d]},even:function(a,b,c){var d=[],e=c?1:0,f=a.length;for(;e",a.querySelectorAll("[selected]").length||e.push("\\["+A+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),a.querySelectorAll(":checked").length||e.push(":checked")}),T(function(a){a.innerHTML="

                  ",a.querySelectorAll("[test^='']").length&&e.push("[*^$]="+A+"*(?:\"\"|'')"),a.innerHTML="",a.querySelectorAll(":enabled").length||e.push(":enabled",":disabled")}),e=e.length&&new RegExp(e.join("|")),bk=function(a,d,f,g,h){if(!g&&!h&&(!e||!e.test(a)))if(d.nodeType===9)try{return u.apply(f,t.call(d.querySelectorAll(a),0)),f}catch(i){}else if(d.nodeType===1&&d.nodeName.toLowerCase()!=="object"){var j,k,l,m=d.getAttribute("id"),n=m||o,p=N.test(a)&&d.parentNode||d;m?n=n.replace(c,"\\$&"):d.setAttribute("id",n),j=bc(a,d,h),n="[id='"+n+"']";for(k=0,l=j.length;k0})}(),f.setFilters.nth=f.setFilters.eq,f.filters=f.pseudos,$.attr=p.attr,p.find=$,p.expr=$.selectors,p.expr[":"]=p.expr.pseudos,p.unique=$.uniqueSort,p.text=$.getText,p.isXMLDoc=$.isXML,p.contains=$.contains}(a);var bc=/Until$/,bd=/^(?:parents|prev(?:Until|All))/,be=/^.[^:#\[\.,]*$/,bf=p.expr.match.needsContext,bg={children:!0,contents:!0,next:!0,prev:!0};p.fn.extend({find:function(a){var b,c,d,e,f,g,h=this;if(typeof a!="string")return p(a).filter(function(){for(b=0,c=h.length;b0)for(e=d;e=0:p.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c,d=0,e=this.length,f=[],g=bf.test(a)||typeof a!="string"?p(a,b||this.context):0;for(;d-1:p.find.matchesSelector(c,a)){f.push(c);break}c=c.parentNode}}return f=f.length>1?p.unique(f):f,this.pushStack(f,"closest",a)},index:function(a){return a?typeof a=="string"?p.inArray(this[0],p(a)):p.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(a,b){var c=typeof a=="string"?p(a,b):p.makeArray(a&&a.nodeType?[a]:a),d=p.merge(this.get(),c);return this.pushStack(bh(c[0])||bh(d[0])?d:p.unique(d))},addBack:function(a){return this.add(a==null?this.prevObject:this.prevObject.filter(a))}}),p.fn.andSelf=p.fn.addBack,p.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return p.dir(a,"parentNode")},parentsUntil:function(a,b,c){return p.dir(a,"parentNode",c)},next:function(a){return bi(a,"nextSibling")},prev:function(a){return bi(a,"previousSibling")},nextAll:function(a){return p.dir(a,"nextSibling")},prevAll:function(a){return p.dir(a,"previousSibling")},nextUntil:function(a,b,c){return p.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return p.dir(a,"previousSibling",c)},siblings:function(a){return p.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return p.sibling(a.firstChild)},contents:function(a){return p.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:p.merge([],a.childNodes)}},function(a,b){p.fn[a]=function(c,d){var e=p.map(this,b,c);return bc.test(a)||(d=c),d&&typeof d=="string"&&(e=p.filter(d,e)),e=this.length>1&&!bg[a]?p.unique(e):e,this.length>1&&bd.test(a)&&(e=e.reverse()),this.pushStack(e,a,k.call(arguments).join(","))}}),p.extend({filter:function(a,b,c){return c&&(a=":not("+a+")"),b.length===1?p.find.matchesSelector(b[0],a)?[b[0]]:[]:p.find.matches(a,b)},dir:function(a,c,d){var e=[],f=a[c];while(f&&f.nodeType!==9&&(d===b||f.nodeType!==1||!p(f).is(d)))f.nodeType===1&&e.push(f),f=f[c];return e},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var bl="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",bm=/ jQuery\d+="(?:null|\d+)"/g,bn=/^\s+/,bo=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bp=/<([\w:]+)/,bq=/]","i"),bv=/^(?:checkbox|radio)$/,bw=/checked\s*(?:[^=]|=\s*.checked.)/i,bx=/\/(java|ecma)script/i,by=/^\s*\s*$/g,bz={option:[1,""],legend:[1,"
                  ","
                  "],thead:[1,"","
                  "],tr:[2,"","
                  "],td:[3,"","
                  "],col:[2,"","
                  "],area:[1,"",""],_default:[0,"",""]},bA=bk(e),bB=bA.appendChild(e.createElement("div"));bz.optgroup=bz.option,bz.tbody=bz.tfoot=bz.colgroup=bz.caption=bz.thead,bz.th=bz.td,p.support.htmlSerialize||(bz._default=[1,"X
                  ","
                  "]),p.fn.extend({text:function(a){return p.access(this,function(a){return a===b?p.text(this):this.empty().append((this[0]&&this[0].ownerDocument||e).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(p.isFunction(a))return this.each(function(b){p(this).wrapAll(a.call(this,b))});if(this[0]){var b=p(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return p.isFunction(a)?this.each(function(b){p(this).wrapInner(a.call(this,b))}):this.each(function(){var b=p(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=p.isFunction(a);return this.each(function(c){p(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){p.nodeName(this,"body")||p(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){(this.nodeType===1||this.nodeType===11)&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){(this.nodeType===1||this.nodeType===11)&&this.insertBefore(a,this.firstChild)})},before:function(){if(!bh(this[0]))return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=p.clean(arguments);return this.pushStack(p.merge(a,this),"before",this.selector)}},after:function(){if(!bh(this[0]))return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=p.clean(arguments);return this.pushStack(p.merge(this,a),"after",this.selector)}},remove:function(a,b){var c,d=0;for(;(c=this[d])!=null;d++)if(!a||p.filter(a,[c]).length)!b&&c.nodeType===1&&(p.cleanData(c.getElementsByTagName("*")),p.cleanData([c])),c.parentNode&&c.parentNode.removeChild(c);return this},empty:function(){var a,b=0;for(;(a=this[b])!=null;b++){a.nodeType===1&&p.cleanData(a.getElementsByTagName("*"));while(a.firstChild)a.removeChild(a.firstChild)}return this},clone:function(a,b){return a=a==null?!1:a,b=b==null?a:b,this.map(function(){return p.clone(this,a,b)})},html:function(a){return p.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nodeType===1?c.innerHTML.replace(bm,""):b;if(typeof a=="string"&&!bs.test(a)&&(p.support.htmlSerialize||!bu.test(a))&&(p.support.leadingWhitespace||!bn.test(a))&&!bz[(bp.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(bo,"<$1>");try{for(;d1&&typeof j=="string"&&bw.test(j))return this.each(function(){p(this).domManip(a,c,d)});if(p.isFunction(j))return this.each(function(e){var f=p(this);a[0]=j.call(this,e,c?f.html():b),f.domManip(a,c,d)});if(this[0]){e=p.buildFragment(a,this,k),g=e.fragment,f=g.firstChild,g.childNodes.length===1&&(g=f);if(f){c=c&&p.nodeName(f,"tr");for(h=e.cacheable||l-1;i0?this.clone(!0):this).get(),p(g[e])[b](d),f=f.concat(d);return this.pushStack(f,a,g.selector)}}),p.extend({clone:function(a,b,c){var d,e,f,g;p.support.html5Clone||p.isXMLDoc(a)||!bu.test("<"+a.nodeName+">")?g=a.cloneNode(!0):(bB.innerHTML=a.outerHTML,bB.removeChild(g=bB.firstChild));if((!p.support.noCloneEvent||!p.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!p.isXMLDoc(a)){bE(a,g),d=bF(a),e=bF(g);for(f=0;d[f];++f)e[f]&&bE(d[f],e[f])}if(b){bD(a,g);if(c){d=bF(a),e=bF(g);for(f=0;d[f];++f)bD(d[f],e[f])}}return d=e=null,g},clean:function(a,b,c,d){var f,g,h,i,j,k,l,m,n,o,q,r,s=b===e&&bA,t=[];if(!b||typeof b.createDocumentFragment=="undefined")b=e;for(f=0;(h=a[f])!=null;f++){typeof h=="number"&&(h+="");if(!h)continue;if(typeof h=="string")if(!br.test(h))h=b.createTextNode(h);else{s=s||bk(b),l=b.createElement("div"),s.appendChild(l),h=h.replace(bo,"<$1>"),i=(bp.exec(h)||["",""])[1].toLowerCase(),j=bz[i]||bz._default,k=j[0],l.innerHTML=j[1]+h+j[2];while(k--)l=l.lastChild;if(!p.support.tbody){m=bq.test(h),n=i==="table"&&!m?l.firstChild&&l.firstChild.childNodes:j[1]===""&&!m?l.childNodes:[];for(g=n.length-1;g>=0;--g)p.nodeName(n[g],"tbody")&&!n[g].childNodes.length&&n[g].parentNode.removeChild(n[g])}!p.support.leadingWhitespace&&bn.test(h)&&l.insertBefore(b.createTextNode(bn.exec(h)[0]),l.firstChild),h=l.childNodes,l.parentNode.removeChild(l)}h.nodeType?t.push(h):p.merge(t,h)}l&&(h=l=s=null);if(!p.support.appendChecked)for(f=0;(h=t[f])!=null;f++)p.nodeName(h,"input")?bG(h):typeof h.getElementsByTagName!="undefined"&&p.grep(h.getElementsByTagName("input"),bG);if(c){q=function(a){if(!a.type||bx.test(a.type))return d?d.push(a.parentNode?a.parentNode.removeChild(a):a):c.appendChild(a)};for(f=0;(h=t[f])!=null;f++)if(!p.nodeName(h,"script")||!q(h))c.appendChild(h),typeof h.getElementsByTagName!="undefined"&&(r=p.grep(p.merge([],h.getElementsByTagName("script")),q),t.splice.apply(t,[f+1,0].concat(r)),f+=r.length)}return t},cleanData:function(a,b){var c,d,e,f,g=0,h=p.expando,i=p.cache,j=p.support.deleteExpando,k=p.event.special;for(;(e=a[g])!=null;g++)if(b||p.acceptData(e)){d=e[h],c=d&&i[d];if(c){if(c.events)for(f in c.events)k[f]?p.event.remove(e,f):p.removeEvent(e,f,c.handle);i[d]&&(delete i[d],j?delete e[h]:e.removeAttribute?e.removeAttribute(h):e[h]=null,p.deletedIds.push(d))}}}}),function(){var a,b;p.uaMatch=function(a){a=a.toLowerCase();var b=/(chrome)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||a.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},a=p.uaMatch(g.userAgent),b={},a.browser&&(b[a.browser]=!0,b.version=a.version),b.chrome?b.webkit=!0:b.webkit&&(b.safari=!0),p.browser=b,p.sub=function(){function a(b,c){return new a.fn.init(b,c)}p.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function c(c,d){return d&&d instanceof p&&!(d instanceof a)&&(d=a(d)),p.fn.init.call(this,c,d,b)},a.fn.init.prototype=a.fn;var b=a(e);return a}}();var bH,bI,bJ,bK=/alpha\([^)]*\)/i,bL=/opacity=([^)]*)/,bM=/^(top|right|bottom|left)$/,bN=/^(none|table(?!-c[ea]).+)/,bO=/^margin/,bP=new RegExp("^("+q+")(.*)$","i"),bQ=new RegExp("^("+q+")(?!px)[a-z%]+$","i"),bR=new RegExp("^([-+])=("+q+")","i"),bS={},bT={position:"absolute",visibility:"hidden",display:"block"},bU={letterSpacing:0,fontWeight:400},bV=["Top","Right","Bottom","Left"],bW=["Webkit","O","Moz","ms"],bX=p.fn.toggle;p.fn.extend({css:function(a,c){return p.access(this,function(a,c,d){return d!==b?p.style(a,c,d):p.css(a,c)},a,c,arguments.length>1)},show:function(){return b$(this,!0)},hide:function(){return b$(this)},toggle:function(a,b){var c=typeof a=="boolean";return p.isFunction(a)&&p.isFunction(b)?bX.apply(this,arguments):this.each(function(){(c?a:bZ(this))?p(this).show():p(this).hide()})}}),p.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bH(a,"opacity");return c===""?"1":c}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":p.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!a||a.nodeType===3||a.nodeType===8||!a.style)return;var f,g,h,i=p.camelCase(c),j=a.style;c=p.cssProps[i]||(p.cssProps[i]=bY(j,i)),h=p.cssHooks[c]||p.cssHooks[i];if(d===b)return h&&"get"in h&&(f=h.get(a,!1,e))!==b?f:j[c];g=typeof d,g==="string"&&(f=bR.exec(d))&&(d=(f[1]+1)*f[2]+parseFloat(p.css(a,c)),g="number");if(d==null||g==="number"&&isNaN(d))return;g==="number"&&!p.cssNumber[i]&&(d+="px");if(!h||!("set"in h)||(d=h.set(a,d,e))!==b)try{j[c]=d}catch(k){}},css:function(a,c,d,e){var f,g,h,i=p.camelCase(c);return c=p.cssProps[i]||(p.cssProps[i]=bY(a.style,i)),h=p.cssHooks[c]||p.cssHooks[i],h&&"get"in h&&(f=h.get(a,!0,e)),f===b&&(f=bH(a,c)),f==="normal"&&c in bU&&(f=bU[c]),d||e!==b?(g=parseFloat(f),d||p.isNumeric(g)?g||0:f):f},swap:function(a,b,c){var d,e,f={};for(e in b)f[e]=a.style[e],a.style[e]=b[e];d=c.call(a);for(e in b)a.style[e]=f[e];return d}}),a.getComputedStyle?bH=function(b,c){var d,e,f,g,h=a.getComputedStyle(b,null),i=b.style;return h&&(d=h[c],d===""&&!p.contains(b.ownerDocument,b)&&(d=p.style(b,c)),bQ.test(d)&&bO.test(c)&&(e=i.width,f=i.minWidth,g=i.maxWidth,i.minWidth=i.maxWidth=i.width=d,d=h.width,i.width=e,i.minWidth=f,i.maxWidth=g)),d}:e.documentElement.currentStyle&&(bH=function(a,b){var c,d,e=a.currentStyle&&a.currentStyle[b],f=a.style;return e==null&&f&&f[b]&&(e=f[b]),bQ.test(e)&&!bM.test(b)&&(c=f.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":e,e=f.pixelLeft+"px",f.left=c,d&&(a.runtimeStyle.left=d)),e===""?"auto":e}),p.each(["height","width"],function(a,b){p.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth===0&&bN.test(bH(a,"display"))?p.swap(a,bT,function(){return cb(a,b,d)}):cb(a,b,d)},set:function(a,c,d){return b_(a,c,d?ca(a,b,d,p.support.boxSizing&&p.css(a,"boxSizing")==="border-box"):0)}}}),p.support.opacity||(p.cssHooks.opacity={get:function(a,b){return bL.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=p.isNumeric(b)?"alpha(opacity="+b*100+")":"",f=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&p.trim(f.replace(bK,""))===""&&c.removeAttribute){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bK.test(f)?f.replace(bK,e):f+" "+e}}),p(function(){p.support.reliableMarginRight||(p.cssHooks.marginRight={get:function(a,b){return p.swap(a,{display:"inline-block"},function(){if(b)return bH(a,"marginRight")})}}),!p.support.pixelPosition&&p.fn.position&&p.each(["top","left"],function(a,b){p.cssHooks[b]={get:function(a,c){if(c){var d=bH(a,b);return bQ.test(d)?p(a).position()[b]+"px":d}}}})}),p.expr&&p.expr.filters&&(p.expr.filters.hidden=function(a){return a.offsetWidth===0&&a.offsetHeight===0||!p.support.reliableHiddenOffsets&&(a.style&&a.style.display||bH(a,"display"))==="none"},p.expr.filters.visible=function(a){return!p.expr.filters.hidden(a)}),p.each({margin:"",padding:"",border:"Width"},function(a,b){p.cssHooks[a+b]={expand:function(c){var d,e=typeof c=="string"?c.split(" "):[c],f={};for(d=0;d<4;d++)f[a+bV[d]+b]=e[d]||e[d-2]||e[0];return f}},bO.test(a)||(p.cssHooks[a+b].set=b_)});var cd=/%20/g,ce=/\[\]$/,cf=/\r?\n/g,cg=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,ch=/^(?:select|textarea)/i;p.fn.extend({serialize:function(){return p.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?p.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ch.test(this.nodeName)||cg.test(this.type))}).map(function(a,b){var c=p(this).val();return c==null?null:p.isArray(c)?p.map(c,function(a,c){return{name:b.name,value:a.replace(cf,"\r\n")}}):{name:b.name,value:c.replace(cf,"\r\n")}}).get()}}),p.param=function(a,c){var d,e=[],f=function(a,b){b=p.isFunction(b)?b():b==null?"":b,e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=p.ajaxSettings&&p.ajaxSettings.traditional);if(p.isArray(a)||a.jquery&&!p.isPlainObject(a))p.each(a,function(){f(this.name,this.value)});else for(d in a)ci(d,a[d],c,f);return e.join("&").replace(cd,"+")};var cj,ck,cl=/#.*$/,cm=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,cn=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,co=/^(?:GET|HEAD)$/,cp=/^\/\//,cq=/\?/,cr=/)<[^<]*)*<\/script>/gi,cs=/([?&])_=[^&]*/,ct=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,cu=p.fn.load,cv={},cw={},cx=["*/"]+["*"];try{cj=f.href}catch(cy){cj=e.createElement("a"),cj.href="",cj=cj.href}ck=ct.exec(cj.toLowerCase())||[],p.fn.load=function(a,c,d){if(typeof a!="string"&&cu)return cu.apply(this,arguments);if(!this.length)return this;var e,f,g,h=this,i=a.indexOf(" ");return i>=0&&(e=a.slice(i,a.length),a=a.slice(0,i)),p.isFunction(c)?(d=c,c=b):c&&typeof c=="object"&&(f="POST"),p.ajax({url:a,type:f,dataType:"html",data:c,complete:function(a,b){d&&h.each(d,g||[a.responseText,b,a])}}).done(function(a){g=arguments,h.html(e?p("
                  ").append(a.replace(cr,"")).find(e):a)}),this},p.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){p.fn[b]=function(a){return this.on(b,a)}}),p.each(["get","post"],function(a,c){p[c]=function(a,d,e,f){return p.isFunction(d)&&(f=f||e,e=d,d=b),p.ajax({type:c,url:a,data:d,success:e,dataType:f})}}),p.extend({getScript:function(a,c){return p.get(a,b,c,"script")},getJSON:function(a,b,c){return p.get(a,b,c,"json")},ajaxSetup:function(a,b){return b?cB(a,p.ajaxSettings):(b=a,a=p.ajaxSettings),cB(a,b),a},ajaxSettings:{url:cj,isLocal:cn.test(ck[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":cx},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":p.parseJSON,"text xml":p.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:cz(cv),ajaxTransport:cz(cw),ajax:function(a,c){function y(a,c,f,i){var k,s,t,u,w,y=c;if(v===2)return;v=2,h&&clearTimeout(h),g=b,e=i||"",x.readyState=a>0?4:0,f&&(u=cC(l,x,f));if(a>=200&&a<300||a===304)l.ifModified&&(w=x.getResponseHeader("Last-Modified"),w&&(p.lastModified[d]=w),w=x.getResponseHeader("Etag"),w&&(p.etag[d]=w)),a===304?(y="notmodified",k=!0):(k=cD(l,u),y=k.state,s=k.data,t=k.error,k=!t);else{t=y;if(!y||a)y="error",a<0&&(a=0)}x.status=a,x.statusText=""+(c||y),k?o.resolveWith(m,[s,y,x]):o.rejectWith(m,[x,y,t]),x.statusCode(r),r=b,j&&n.trigger("ajax"+(k?"Success":"Error"),[x,l,k?s:t]),q.fireWith(m,[x,y]),j&&(n.trigger("ajaxComplete",[x,l]),--p.active||p.event.trigger("ajaxStop"))}typeof a=="object"&&(c=a,a=b),c=c||{};var d,e,f,g,h,i,j,k,l=p.ajaxSetup({},c),m=l.context||l,n=m!==l&&(m.nodeType||m instanceof p)?p(m):p.event,o=p.Deferred(),q=p.Callbacks("once memory"),r=l.statusCode||{},t={},u={},v=0,w="canceled",x={readyState:0,setRequestHeader:function(a,b){if(!v){var c=a.toLowerCase();a=u[c]=u[c]||a,t[a]=b}return this},getAllResponseHeaders:function(){return v===2?e:null},getResponseHeader:function(a){var c;if(v===2){if(!f){f={};while(c=cm.exec(e))f[c[1].toLowerCase()]=c[2]}c=f[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){return v||(l.mimeType=a),this},abort:function(a){return a=a||w,g&&g.abort(a),y(0,a),this}};o.promise(x),x.success=x.done,x.error=x.fail,x.complete=q.add,x.statusCode=function(a){if(a){var b;if(v<2)for(b in a)r[b]=[r[b],a[b]];else b=a[x.status],x.always(b)}return this},l.url=((a||l.url)+"").replace(cl,"").replace(cp,ck[1]+"//"),l.dataTypes=p.trim(l.dataType||"*").toLowerCase().split(s),l.crossDomain==null&&(i=ct.exec(l.url.toLowerCase()),l.crossDomain=!(!i||i[1]==ck[1]&&i[2]==ck[2]&&(i[3]||(i[1]==="http:"?80:443))==(ck[3]||(ck[1]==="http:"?80:443)))),l.data&&l.processData&&typeof l.data!="string"&&(l.data=p.param(l.data,l.traditional)),cA(cv,l,c,x);if(v===2)return x;j=l.global,l.type=l.type.toUpperCase(),l.hasContent=!co.test(l.type),j&&p.active++===0&&p.event.trigger("ajaxStart");if(!l.hasContent){l.data&&(l.url+=(cq.test(l.url)?"&":"?")+l.data,delete l.data),d=l.url;if(l.cache===!1){var z=p.now(),A=l.url.replace(cs,"$1_="+z);l.url=A+(A===l.url?(cq.test(l.url)?"&":"?")+"_="+z:"")}}(l.data&&l.hasContent&&l.contentType!==!1||c.contentType)&&x.setRequestHeader("Content-Type",l.contentType),l.ifModified&&(d=d||l.url,p.lastModified[d]&&x.setRequestHeader("If-Modified-Since",p.lastModified[d]),p.etag[d]&&x.setRequestHeader("If-None-Match",p.etag[d])),x.setRequestHeader("Accept",l.dataTypes[0]&&l.accepts[l.dataTypes[0]]?l.accepts[l.dataTypes[0]]+(l.dataTypes[0]!=="*"?", "+cx+"; q=0.01":""):l.accepts["*"]);for(k in l.headers)x.setRequestHeader(k,l.headers[k]);if(!l.beforeSend||l.beforeSend.call(m,x,l)!==!1&&v!==2){w="abort";for(k in{success:1,error:1,complete:1})x[k](l[k]);g=cA(cw,l,c,x);if(!g)y(-1,"No Transport");else{x.readyState=1,j&&n.trigger("ajaxSend",[x,l]),l.async&&l.timeout>0&&(h=setTimeout(function(){x.abort("timeout")},l.timeout));try{v=1,g.send(t,y)}catch(B){if(v<2)y(-1,B);else throw B}}return x}return x.abort()},active:0,lastModified:{},etag:{}});var cE=[],cF=/\?/,cG=/(=)\?(?=&|$)|\?\?/,cH=p.now();p.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=cE.pop()||p.expando+"_"+cH++;return this[a]=!0,a}}),p.ajaxPrefilter("json jsonp",function(c,d,e){var f,g,h,i=c.data,j=c.url,k=c.jsonp!==!1,l=k&&cG.test(j),m=k&&!l&&typeof i=="string"&&!(c.contentType||"").indexOf("application/x-www-form-urlencoded")&&cG.test(i);if(c.dataTypes[0]==="jsonp"||l||m)return f=c.jsonpCallback=p.isFunction(c.jsonpCallback)?c.jsonpCallback():c.jsonpCallback,g=a[f],l?c.url=j.replace(cG,"$1"+f):m?c.data=i.replace(cG,"$1"+f):k&&(c.url+=(cF.test(j)?"&":"?")+c.jsonp+"="+f),c.converters["script json"]=function(){return h||p.error(f+" was not called"),h[0]},c.dataTypes[0]="json",a[f]=function(){h=arguments},e.always(function(){a[f]=g,c[f]&&(c.jsonpCallback=d.jsonpCallback,cE.push(f)),h&&p.isFunction(g)&&g(h[0]),h=g=b}),"script"}),p.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){return p.globalEval(a),a}}}),p.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),p.ajaxTransport("script",function(a){if(a.crossDomain){var c,d=e.head||e.getElementsByTagName("head")[0]||e.documentElement;return{send:function(f,g){c=e.createElement("script"),c.async="async",a.scriptCharset&&(c.charset=a.scriptCharset),c.src=a.url,c.onload=c.onreadystatechange=function(a,e){if(e||!c.readyState||/loaded|complete/.test(c.readyState))c.onload=c.onreadystatechange=null,d&&c.parentNode&&d.removeChild(c),c=b,e||g(200,"success")},d.insertBefore(c,d.firstChild)},abort:function(){c&&c.onload(0,1)}}}});var cI,cJ=a.ActiveXObject?function(){for(var a in cI)cI[a](0,1)}:!1,cK=0;p.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&cL()||cM()}:cL,function(a){p.extend(p.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(p.ajaxSettings.xhr()),p.support.ajax&&p.ajaxTransport(function(c){if(!c.crossDomain||p.support.cors){var d;return{send:function(e,f){var g,h,i=c.xhr();c.username?i.open(c.type,c.url,c.async,c.username,c.password):i.open(c.type,c.url,c.async);if(c.xhrFields)for(h in c.xhrFields)i[h]=c.xhrFields[h];c.mimeType&&i.overrideMimeType&&i.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(h in e)i.setRequestHeader(h,e[h])}catch(j){}i.send(c.hasContent&&c.data||null),d=function(a,e){var h,j,k,l,m;try{if(d&&(e||i.readyState===4)){d=b,g&&(i.onreadystatechange=p.noop,cJ&&delete cI[g]);if(e)i.readyState!==4&&i.abort();else{h=i.status,k=i.getAllResponseHeaders(),l={},m=i.responseXML,m&&m.documentElement&&(l.xml=m);try{l.text=i.responseText}catch(a){}try{j=i.statusText}catch(n){j=""}!h&&c.isLocal&&!c.crossDomain?h=l.text?200:404:h===1223&&(h=204)}}}catch(o){e||f(-1,o)}l&&f(h,j,l,k)},c.async?i.readyState===4?setTimeout(d,0):(g=++cK,cJ&&(cI||(cI={},p(a).unload(cJ)),cI[g]=d),i.onreadystatechange=d):d()},abort:function(){d&&d(0,1)}}}});var cN,cO,cP=/^(?:toggle|show|hide)$/,cQ=new RegExp("^(?:([-+])=|)("+q+")([a-z%]*)$","i"),cR=/queueHooks$/,cS=[cY],cT={"*":[function(a,b){var c,d,e,f=this.createTween(a,b),g=cQ.exec(b),h=f.cur(),i=+h||0,j=1;if(g){c=+g[2],d=g[3]||(p.cssNumber[a]?"":"px");if(d!=="px"&&i){i=p.css(f.elem,a,!0)||c||1;do e=j=j||".5",i=i/j,p.style(f.elem,a,i+d),j=f.cur()/h;while(j!==1&&j!==e)}f.unit=d,f.start=i,f.end=g[1]?i+(g[1]+1)*c:c}return f}]};p.Animation=p.extend(cW,{tweener:function(a,b){p.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");var c,d=0,e=a.length;for(;d-1,j={},k={},l,m;i?(k=e.position(),l=k.top,m=k.left):(l=parseFloat(g)||0,m=parseFloat(h)||0),p.isFunction(b)&&(b=b.call(a,c,f)),b.top!=null&&(j.top=b.top-f.top+l),b.left!=null&&(j.left=b.left-f.left+m),"using"in b?b.using.call(a,j):e.css(j)}},p.fn.extend({position:function(){if(!this[0])return;var a=this[0],b=this.offsetParent(),c=this.offset(),d=c_.test(b[0].nodeName)?{top:0,left:0}:b.offset();return c.top-=parseFloat(p.css(a,"marginTop"))||0,c.left-=parseFloat(p.css(a,"marginLeft"))||0,d.top+=parseFloat(p.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(p.css(b[0],"borderLeftWidth"))||0,{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||e.body;while(a&&!c_.test(a.nodeName)&&p.css(a,"position")==="static")a=a.offsetParent;return a||e.body})}}),p.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);p.fn[a]=function(e){return p.access(this,function(a,e,f){var g=da(a);if(f===b)return g?c in g?g[c]:g.document.documentElement[e]:a[e];g?g.scrollTo(d?p(g).scrollLeft():f,d?f:p(g).scrollTop()):a[e]=f},a,e,arguments.length,null)}}),p.each({Height:"height",Width:"width"},function(a,c){p.each({padding:"inner"+a,content:c,"":"outer"+a},function(d,e){p.fn[e]=function(e,f){var g=arguments.length&&(d||typeof e!="boolean"),h=d||(e===!0||f===!0?"margin":"border");return p.access(this,function(c,d,e){var f;return p.isWindow(c)?c.document.documentElement["client"+a]:c.nodeType===9?(f=c.documentElement,Math.max(c.body["scroll"+a],f["scroll"+a],c.body["offset"+a],f["offset"+a],f["client"+a])):e===b?p.css(c,d,e,h):p.style(c,d,e,h)},c,g?e:b,g,null)}})}),a.jQuery=a.$=p,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return p})})(window); \ No newline at end of file diff --git a/源码/src/main/webapp/resource/assets/js/module/build.xml b/源码/src/main/webapp/resource/assets/js/module/build.xml new file mode 100644 index 0000000..d08a55f --- /dev/null +++ b/源码/src/main/webapp/resource/assets/js/module/build.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/源码/src/main/webapp/resource/assets/js/prettify.js b/源码/src/main/webapp/resource/assets/js/prettify.js new file mode 100644 index 0000000..eef5ad7 --- /dev/null +++ b/源码/src/main/webapp/resource/assets/js/prettify.js @@ -0,0 +1,28 @@ +var q=null;window.PR_SHOULD_USE_CONTINUATION=!0; +(function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var b=a.charAt(1);return(f=r[b])?f:"0"<=b&&b<="7"?parseInt(a.substring(1),8):b==="u"||b==="x"?parseInt(a.substring(2),16):a.charCodeAt(1)}function e(a){if(a<32)return(a<16?"\\x0":"\\x")+a.toString(16);a=String.fromCharCode(a);if(a==="\\"||a==="-"||a==="["||a==="]")a="\\"+a;return a}function h(a){for(var f=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a= +[],b=[],o=f[0]==="^",c=o?1:0,i=f.length;c122||(d<65||j>90||b.push([Math.max(65,j)|32,Math.min(d,90)|32]),d<97||j>122||b.push([Math.max(97,j)&-33,Math.min(d,122)&-33]))}}b.sort(function(a,f){return a[0]-f[0]||f[1]-a[1]});f=[];j=[NaN,NaN];for(c=0;ci[0]&&(i[1]+1>i[0]&&b.push("-"),b.push(e(i[1])));b.push("]");return b.join("")}function y(a){for(var f=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),b=f.length,d=[],c=0,i=0;c=2&&a==="["?f[c]=h(j):a!=="\\"&&(f[c]=j.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return f.join("")}for(var t=0,s=!1,l=!1,p=0,d=a.length;p=5&&"lang-"===b.substring(0,5))&&!(o&&typeof o[1]==="string"))c=!1,b="src";c||(r[f]=b)}i=d;d+=f.length;if(c){c=o[1];var j=f.indexOf(c),k=j+c.length;o[2]&&(k=f.length-o[2].length,j=k-c.length);b=b.substring(5);B(l+i,f.substring(0,j),e,p);B(l+i+j,c,C(b,c),p);B(l+i+k,f.substring(k),e,p)}else p.push(l+i,b)}a.e=p}var h={},y;(function(){for(var e=a.concat(m), +l=[],p={},d=0,g=e.length;d=0;)h[n.charAt(k)]=r;r=r[1];n=""+r;p.hasOwnProperty(n)||(l.push(r),p[n]=q)}l.push(/[\S\s]/);y=L(l)})();var t=m.length;return e}function u(a){var m=[],e=[];a.tripleQuotedStrings?m.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?m.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/, +q,"'\"`"]):m.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&e.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var h=a.hashComments;h&&(a.cStyleComments?(h>1?m.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):m.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),e.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):m.push(["com",/^#[^\n\r]*/, +q,"#"]));a.cStyleComments&&(e.push(["com",/^\/\/[^\n\r]*/,q]),e.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));a.regexLiterals&&e.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]);(h=a.types)&&e.push(["typ",h]);a=(""+a.keywords).replace(/^ | $/g, +"");a.length&&e.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]);m.push(["pln",/^\s+/,q," \r\n\t\xa0"]);e.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]);return x(m,e)}function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.className))break;if("BR"===a.nodeName)h(a), +a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)e(a);break;case 3:case 4:if(p){var b=a.nodeValue,d=b.match(t);if(d){var c=b.substring(0,d.index);a.nodeValue=c;(b=b.substring(d.index+d[0].length))&&a.parentNode.insertBefore(s.createTextNode(b),a.nextSibling);h(a);c||a.parentNode.removeChild(a)}}}}function h(a){function b(a,d){var e=d?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),g=a.nextSibling;f.appendChild(e);for(var h=g;h;h=g)g=h.nextSibling,f.appendChild(h)}return e} +for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),e;(e=a.parentNode)&&e.nodeType===1;)a=e;d.push(a)}var k=/(?:^|\s)nocode(?:\s|$)/,t=/\r\n?|\n/,s=a.ownerDocument,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=s.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);for(l=s.createElement("LI");a.firstChild;)l.appendChild(a.firstChild);for(var d=[l],g=0;g=0;){var h=m[e];A.hasOwnProperty(h)?window.console&&console.warn("cannot override language handler %s",h):A[h]=a}}function C(a,m){if(!a||!A.hasOwnProperty(a))a=/^\s*=o&&(h+=2);e>=c&&(a+=2)}}catch(w){"console"in window&&console.log(w&&w.stack?w.stack:w)}}var v=["break,continue,do,else,for,if,return,while"],w=[[v,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"], +"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],F=[w,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],G=[w,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"], +H=[G,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],w=[w,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],I=[v,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"], +J=[v,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],v=[v,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],K=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,N=/\S/,O=u({keywords:[F,H,w,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+ +I,J,v],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),A={};k(O,["default-code"]);k(x([],[["pln",/^[^]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]), +["default-markup","htm","html","mxml","xhtml","xml","xsl"]);k(x([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css", +/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);k(x([],[["atv",/^[\S\s]+/]]),["uq.val"]);k(u({keywords:F,hashComments:!0,cStyleComments:!0,types:K}),["c","cc","cpp","cxx","cyc","m"]);k(u({keywords:"null,true,false"}),["json"]);k(u({keywords:H,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:K}),["cs"]);k(u({keywords:G,cStyleComments:!0}),["java"]);k(u({keywords:v,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]);k(u({keywords:I,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}), +["cv","py"]);k(u({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]);k(u({keywords:J,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]);k(u({keywords:w,cStyleComments:!0,regexLiterals:!0}),["js"]);k(u({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes", +hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);k(x([],[["str",/^[\S\s]+/]]),["regex"]);window.prettyPrintOne=function(a,m,e){var h=document.createElement("PRE");h.innerHTML=a;e&&D(h,e);E({g:m,i:e,h:h});return h.innerHTML};window.prettyPrint=function(a){function m(){for(var e=window.PR_SHOULD_USE_CONTINUATION?l.now()+250:Infinity;p=0){var k=k.match(g),f,b;if(b= +!k){b=n;for(var o=void 0,c=b.firstChild;c;c=c.nextSibling)var i=c.nodeType,o=i===1?o?b:c:i===3?N.test(c.nodeValue)?b:o:o;b=(f=o===b?void 0:o)&&"CODE"===f.tagName}b&&(k=f.className.match(g));k&&(k=k[1]);b=!1;for(o=n.parentNode;o;o=o.parentNode)if((o.tagName==="pre"||o.tagName==="code"||o.tagName==="xmp")&&o.className&&o.className.indexOf("prettyprint")>=0){b=!0;break}b||((b=(b=n.className.match(/\blinenums\b(?::(\d+))?/))?b[1]&&b[1].length?+b[1]:!0:!1)&&D(n,b),d={g:k,h:n,i:b},E(d))}}p{text}'},btnCls:{sync:!1},text:{sync:!1,value:""}}},{xclass:"bar-item-button",priority:2}),o=i.extend({renderUI:function(){var e=this.get("el");e.attr("role","separator")}},{xclass:"bar-item-separator",priority:2}),u=i.extend({},{ATTRS:{width:{view:!0,value:2}}},{xclass:"bar-item-spacer",priority:2}),a=i.extend({_uiSetText:function(e){var t=this,n=t.get("el");n.html(e)}},{ATTRS:{text:{value:""}}},{xclass:"bar-item-text",priority:2});return i.types={button:s,separator:o,spacer:u,text:a},i}),define("bui/toolbar/bar",function(){var e=BUI.Component,t=e.UIBase,n=e.View.extend({renderUI:function(){var e=this.get("el");e.attr("role","toolbar"),e.attr("id")||e.attr("id",BUI.guid("bar"))}}),r=e.Controller.extend([t.ChildList],{getItem:function(e){return this.getChild(e)}},{ATTRS:{elTagName:{view:!0,value:"ul"},defaultChildClass:{value:"bar-item"},focusable:{value:!1},xview:{value:n}}},{xclass:"bar",priority:1});return r}),define("bui/toolbar/pagingbar",["bui/toolbar/bar"],function(e){var t=e("bui/toolbar/bar"),n=BUI.Component,r=n.UIBase.Bindable,i=BUI.prefix,s="first",o="prev",u="next",a="last",f="skip",l="totalPage",c="curPage",h="totalCount",p=t.extend([r],{initializer:function(){var e=this,t=e.get("children"),n=e.get("items"),r=e.get("store");if(!n||n.length)n=e._getItems(),BUI.each(n,function(e){t.push(e)});r&&r.get("pageSize")&&e.set("pageSize",r.get("pageSize"))},bindUI:function(){var e=this;e._bindButtonEvent()},jumpToPage:function(e){if(e<=0||e>this.get("totalPage"))return;var t=this,n=t.get("store"),r=t.get("pageSize"),i=e-1,s=i*r,o=t.fire("beforepagechange",{from:t.get("curPage"),to:e});n&&o!==!1&&n.load({start:s,limit:r,pageIndex:i})},_afterStoreLoad:function(e,t){var n=this,r=n.get("pageSize"),i=0,s,o,u,a;i=e.get("start"),o=e.getTotalCount(),s=o-i>r?i+e.getCount():o,a=parseInt((o+r-1)/r,10),a=a>0?a:1,u=parseInt(i/r,10)+1,n.set("start",i),n.set("end",s),n.set("totalCount",o),n.set("curPage",u),n.set("totalPage",a),n._setAllButtonsState(),n._setNumberPages()},_bindButtonEvent:function(){function n(){var t=parseInt(e._getCurrentPageValue(),10);e._isPageAllowRedirect(t)?e.jumpToPage(t):e._setCurrentPageValue(e.get("curPage"))}var e=this;e._bindButtonItemEvent(s,function(){e.jumpToPage(1)}),e._bindButtonItemEvent(o,function(){e.jumpToPage(e.get("curPage")-1)}),e._bindButtonItemEvent(u,function(){e.jumpToPage(e.get("curPage")+1)}),e._bindButtonItemEvent(a,function(){e.jumpToPage(e.get("totalPage"))}),e._bindButtonItemEvent(f,function(){n()});var t=e.getItem(c);t&&t.get("el").on("keyup",function(e){e.stopPropagation(),e.keyCode===13&&n()})},_bindButtonItemEvent:function(e,t){var n=this,r=n.getItem(e);r&&r.on("click",t)},onLoad:function(e){var t=this,n=t.get("store");t._afterStoreLoad(n,e)},_getItems:function(){var e=this,t=e.get("items");return t&&t.length?t:(t=[],t.push(e._getButtonItem(s)),t.push(e._getButtonItem(o)),t.push(e._getSeparator()),t.push(e._getTextItem(l)),t.push(e._getTextItem(c)),t.push(e._getButtonItem(f)),t.push(e._getSeparator()),t.push(e._getButtonItem(u)),t.push(e._getButtonItem(a)),t.push(e._getSeparator()),t.push(e._getTextItem(h)),t)},_getButtonItem:function(e){var t=this;return{id:e,xclass:"bar-item-button",text:t.get(e+"Text"),disabled:!0,elCls:t.get(e+"Cls")}},_getSeparator:function(){return{xclass:"bar-item-separator"}},_getTextItem:function(e){var t=this;return{id:e,xclass:"bar-item-text",text:t._getTextItemTpl(e)}},_getTextItemTpl:function(e){var t=this,n={};return n[e]=t.get(e),BUI.substitute(this.get(e+"Tpl"),n)},_isPageAllowRedirect:function(e){var t=this;return e&&e>0&&e<=t.get("totalPage")&&e!==t.get("curPage")},_setAllButtonsState:function(){var e=this,t=e.get("store");t&&e._setButtonsState([o,u,s,a,f],!0),e.get("curPage")===1&&e._setButtonsState([o,s],!1),e.get("curPage")===e.get("totalPage")&&e._setButtonsState([u,a],!1)},_setButtonsState:function(e,t){var n=this,r=n.get("children");BUI.each(r,function(n){BUI.Array.indexOf(n.get("id"),e)!==-1&&n.set("disabled",!t)})},_setNumberPages:function(){var e=this,t=e.getItem(l),n=e.getItem(h);t&&t.set("content",e._getTextItemTpl(l)),e._setCurrentPageValue(e.get(c)),n&&n.set("content",e._getTextItemTpl(h))},_getCurrentPageValue:function(e){var t=this;e=e||t.getItem(c);var n=e.get("el").find("input");return n.val()},_setCurrentPageValue:function(e,t){var n=this;t=t||n.getItem(c);var r=t.get("el").find("input");r.val(e)}},{ATTRS:{firstText:{value:"\u9996 \u9875"},firstCls:{value:i+"pb-first"},prevText:{value:"\u4e0a\u4e00\u9875"},prevCls:{value:i+"pb-prev"},nextText:{value:"\u4e0b\u4e00\u9875"},nextCls:{value:i+"pb-next"},lastText:{value:"\u672b \u9875"},lastCls:{value:i+"pb-last"},skipText:{value:"\u786e\u5b9a"},skipCls:{value:i+"pb-skip"},totalPageTpl:{value:"\u5171 {totalPage} \u9875"},curPageTpl:{value:'\u7b2c \u9875'},totalCountTpl:{value:"\u5171{totalCount}\u6761\u8bb0\u5f55"},curPage:{value:0},totalPage:{value:0},totalCount:{value:0},pageSize:{value:30},store:{}},ID_FIRST:s,ID_PREV:o,ID_NEXT:u,ID_LAST:a,ID_SKIP:f,ID_TOTAL_PAGE:l,ID_CURRENT_PAGE:c,ID_TOTAL_COUNT:h},{xclass:"pagingbar",priority:2});return p}),define("bui/toolbar/numberpagingbar",["bui/toolbar/pagingbar"],function(e){var t=BUI.Component,n=e("bui/toolbar/pagingbar"),r=BUI.prefix,i="numberContainer",s=r+"button-number",o=n.extend({_getItems:function(){var e=this,t=e.get("items");return t?t:(t=[],t.push(e._getButtonItem(n.ID_PREV)),t.push(e._getButtonItem(n.ID_NEXT)),t)},_getButtonItem:function(e){var t=this;return{id:e,content:''+t.get(e+"Text")+"",disabled:!0}},_bindButtonEvent:function(){var e=this,t=e.get("numberButtonCls");e.constructor.superclass._bindButtonEvent.call(this),e.get("el").delegate("a","click",function(e){e.preventDefault()}),e.on("click",function(n){var r=n.target;if(r&&r.get("el").hasClass(t)){var i=r.get("id");e.jumpToPage(i)}})},_setNumberPages:function(){var e=this;e._setNumberButtons()},_setNumberButtons:function(){var e=this,t=e.get("curPage"),n=e.get("totalPage"),r=e._getNumberItems(t,n),i;e._clearNumberButtons(),BUI.each(r,function(t){e._appendNumberButton(t)}),i=e.getItem(t),i&&i.set("selected",!0)},_appendNumberButton:function(e){var t=this,n=t.getItemCount(),r=t.addItemAt(e,n-1)},_clearNumberButtons:function(){var e=this,t=e.getItems(),n=e.getItemCount();while(n>2)e.removeItemAt(n-2),n=e.getItemCount()},_getNumberItems:function(e,t){function u(e,t){for(var i=e;i<=t;i++)r.push(n._getNumberItem(i))}function a(){r.push(n._getEllipsisItem())}var n=this,r=[],i=n.get("maxLimitCount"),s=n.get("showRangeCount"),o;if(ti?l:i:t;f>1&&(u(1,1),f>2&&a()),o=c,u(f,c)}return o{id}'},prevText:{value:"<<"},nextText:{value:">>"},maxLimitCount:{value:4},showRangeCount:{value:1},numberButtonCls:{value:s},ellipsisTpl:{value:'...'}}},{xclass:"pagingbar-number",priority:3});return o}); diff --git a/源码/src/main/webapp/resource/assets/js/tree-min.js b/源码/src/main/webapp/resource/assets/js/tree-min.js new file mode 100644 index 0000000..24193ff --- /dev/null +++ b/源码/src/main/webapp/resource/assets/js/tree-min.js @@ -0,0 +1,4 @@ +/** + * @fileOverview \u9009\u62e9\u6846\u547d\u540d\u7a7a\u95f4\u5165\u53e3\u6587\u4ef6 + * @ignore + */define("bui/tree",["bui/common","bui/tree/treemixin","bui/tree/treelist"],function(e){var t=e("bui/common"),n=t.namespace("Tree");return t.mix(n,{TreeList:e("bui/tree/treelist"),Mixin:e("bui/tree/treemixin")}),n}),define("bui/tree/treemixin",["bui/common","bui/data"],function(e){function t(e,t){return n.isString(t)&&(t=e.getItem(t)),t}var n=e("bui/common"),r=e("bui/data"),i="expanded",s="loading",o="checked",u="partial-checked",a={NONE:"none",ALL:"all",CUSTOM:"custom",ONLY_LEAF:"onlyLeaf"},f="x-tree-icon",l="x-tree-elbow",c="x-tree-show-line",h=l+"-",p=f+"-wraper",d=h+"line",v=h+"end",m=h+"empty",g=h+"expander",y=f+"-checkbox",b=g+"-end",w=function(){};return w.ATTRS={store:{getter:function(e){if(!e){var t=this,n=new r.TreeStore({root:t.get("root"),data:t.get("nodes")});return t.setInternal("store",n),n}return e}},root:{},nodes:{sync:!1},iconContainer:{},iconWraperTpl:{value:'{icons}'},showLine:{value:!1},iconTpl:{value:''},leafCls:{value:h+"leaf"},dirCls:{value:h+"dir"},checkType:{value:"custom"},checkedField:{valueFn:function(){return this.getStatusField("checked")}},itemStatusFields:{value:{expanded:"expanded",disabled:"disabled",checked:"checked"}},dirSelectable:{value:!0},showRoot:{value:!1},events:{value:{expanded:!1,collapsed:!1,checkchange:!1}},startLevel:{value:1}},n.augment(w,{collapseAll:function(){var e=this,t=e.get("view").getAllElements();n.each(t,function(t){var n=e.getItemByElement(t);n&&e._collapseNode(n,t,!0)})},collapseNode:function(e){var t=this,r;n.isString(e)&&(e=t.findNode(e)),r=t.findElement(e),t._collapseNode(e,r)},expandAll:function(){var e=this,t=e.get("view").getAllElements();n.each(t,function(t){var n=e.getItemByElement(t);e._expandNode(n,t,!0)})},expandNode:function(e,t){var r=this,i;n.isString(e)&&(e=r.findNode(e)),e.parent&&!r.isExpanded(e.parent)&&r.expandNode(e.parent),i=r.findElement(e),r._expandNode(e,i,t)},expandPath:function(e,t,n){if(!e)return;n=n||0;var r=this,i=r.get("store"),s,o,u,a,f=e.split(",");s=r.findNode(f[n]);for(u=n+1;u0&&(s=r.children[t-1],n._updateIcons(s))),n._updateIcons(r)):(u=n._getInsetIndex(e),n.addItemAt(e,u),s=n.get("nodes")[t-1],n._updateIcons(s))},_getInsetIndex:function(e){var t=this,n,r=null;return n=t._getNextItem(e),n?t.indexOfItem(n):t.getItemCount()},_getNextItem:function(e){var t=this,r=e.parent,i,s,o=null;return r?(i=r.children,s=n.Array.indexOf(e,i),o=i[s+1],o||t._getNextItem(r)):null},onAdd:function(e){var t=this,n=e.node,r=e.index;t._addNode(n,r)},_updateNode:function(e){var t=this;t.updateItem(e),t._updateIcons(e)},onUpdate:function(e){var t=this,n=e.node;t._updateNode(n)},_removeNode:function(e,t){var n=this,r=e.parent,i,s;n.collapseNode(e);if(!r)return;n.removeItem(e),n.isExpanded(r)&&(i=r.children.length,i==t&&t!==0&&(s=r.children[t-1],n._updateIcons(s))),n._updateIcons(r),n._resetParentChecked(r)},onRemove:function(e){var t=this,n=e.node,r=e.index;t._removeNode(n,r)},_loadNode:function(e){var t=this;t.expandNode(e),t._updateIcons(e),t.setItemStatus(e,s,!1)},onLoad:function(e){var t=this,n=t.get("store"),r=n.get("root"),i;(!e||e.node==r)&&t._initRoot(),e&&e.node&&t._loadNode(e.node)},_isExpanded:function(e,t){return this.hasStatus(e,i,t)},_getIconsTpl:function(e){var t=this,r=e.level,i=t.get("startLevel"),s=t.get("iconWraperTpl"),o=[],u;for(u=i;ut)r=r.parent,i-=1;return r},_getIcon:function(e){var t=this,r=t.get("iconTpl");return n.substitute(r,{cls:e})},_isLastNode:function(e){if(!e)return!1;if(e==this.get("root"))return!0;var t=this,n=e.parent,r=n?n.children:t.get("nodes"),i;return i=r.length,r[i-1]===e},_initNodes:function(e,t,r){var i=this;n.each(e,function(e){e.level=t,e.leaf==null&&(e.leaf=e.children?!1:!0),r&&!e.parent&&(e.parent=r),i._initChecked(e),e.children&&i._initNodes(e.children,t+1,e)})},_collapseNode:function(e,t,n){var r=this;if(e.leaf)return;r.hasStatus(e,i,t)&&(r.setItemStatus(e,i,!1,t),n?(r._collapseChildren(e,n),r.removeItems(e.children)):r._hideChildrenNodes(e),r.fire("collapsed",{node:e,element:t}))},_hideChildrenNodes:function(e){var t=this,r=e.children;n.each(r,function(e){t.removeItem(e),t._hideChildrenNodes(e)})},_collapseChildren:function(e,t){var r=this,i=e.children;n.each(i,function(e){r.collapseNode(e,t)})},_expandNode:function(e,t,r){var s=this,o=s.get("store");if(e.leaf)return;s.hasStatus(e,i,t)||(o&&!o.isLoaded(e)?s._isLoading(e,t)||o.loadNode(e):t&&(s.setItemStatus(e,i,!0,t),s._showChildren(e),s.fire("expanded",{node:e,element:t}))),n.each(e.children,function(e){(r||s.isExpanded(e))&&s.expandNode(e,r)})},_showChildren:function(e){if(!e||!e.children)return;var t=this,n=t.indexOfItem(e),r=e.children.length,i,s;for(s=r-1;s>=0;s--)i=e.children[s],t.getItem(i)||t.addItemAt(i,n+1)},_isLoading:function(e,t){var n=this;return n.hasStatus(e,s,t)},_resetIcons:function(e,t){var n=this,r=n.get("iconContainer"),i,s=n._getIconsTpl(e);$(t).find("."+p).remove(),i=$(t).find("."+r),r&&i.length?$(s).appendTo(i):$(t).prepend($(s))},_toggleExpand:function(e,t){var n=this;n._isExpanded(e,t)?n._collapseNode(e,t):n._expandNode(e,t)},_updateIcons:function(e){var t=this,r=t.findElement(e);r&&(t._resetIcons(e,r),t._isExpanded(e,r)&&!e.leaf&&n.each(e.children,function(e){t._updateIcons(e)}))},_uiSetShowRoot:function(e){var t=this,n=this.get("showRoot")?0:1;t.set("startLevel",n)},_uiSetNodes:function(e){var t=this,n=t.get("store");n.setResult(e)},_uiSetShowLine:function(e){var t=this,n=t.get("el");e?n.addClass(c):n.removeClass(c)}}),w}),define("bui/tree/treelist",["bui/common","bui/list","bui/tree/treemixin"],function(e){var t=e("bui/common"),n=e("bui/list"),r=e("bui/tree/treemixin"),i=n.SimpleList.extend([r],{},{ATTRS:{itemCls:{value:t.prefix+"tree-item"},itemTpl:{value:"
                • {text}
                • "},idField:{value:"id"}}},{xclass:"tree-list"});return i}); diff --git a/源码/src/main/webapp/resource/boot/css/bootstrap-theme.css b/源码/src/main/webapp/resource/boot/css/bootstrap-theme.css new file mode 100644 index 0000000..b82bd72 --- /dev/null +++ b/源码/src/main/webapp/resource/boot/css/bootstrap-theme.css @@ -0,0 +1,457 @@ +/*! + * Bootstrap v3.3.0 (http://getbootstrap.com) + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + */ + +.btn-default, +.btn-primary, +.btn-success, +.btn-info, +.btn-warning, +.btn-danger { + text-shadow: 0 -1px 0 rgba(0, 0, 0, .2); + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075); +} +.btn-default:active, +.btn-primary:active, +.btn-success:active, +.btn-info:active, +.btn-warning:active, +.btn-danger:active, +.btn-default.active, +.btn-primary.active, +.btn-success.active, +.btn-info.active, +.btn-warning.active, +.btn-danger.active { + -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); + box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); +} +.btn-default .badge, +.btn-primary .badge, +.btn-success .badge, +.btn-info .badge, +.btn-warning .badge, +.btn-danger .badge { + text-shadow: none; +} +.btn:active, +.btn.active { + background-image: none; +} +.btn-default { + text-shadow: 0 1px 0 #fff; + background-image: -webkit-linear-gradient(top, #fff 0%, #e0e0e0 100%); + background-image: -o-linear-gradient(top, #fff 0%, #e0e0e0 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#e0e0e0)); + background-image: linear-gradient(to bottom, #fff 0%, #e0e0e0 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + background-repeat: repeat-x; + border-color: #dbdbdb; + border-color: #ccc; +} +.btn-default:hover, +.btn-default:focus { + background-color: #e0e0e0; + background-position: 0 -15px; +} +.btn-default:active, +.btn-default.active { + background-color: #e0e0e0; + border-color: #dbdbdb; +} +.btn-default:disabled, +.btn-default[disabled] { + background-color: #e0e0e0; + background-image: none; +} +.btn-primary { + background-image: -webkit-linear-gradient(top, #428bca 0%, #2d6ca2 100%); + background-image: -o-linear-gradient(top, #428bca 0%, #2d6ca2 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#428bca), to(#2d6ca2)); + background-image: linear-gradient(to bottom, #428bca 0%, #2d6ca2 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff2d6ca2', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + background-repeat: repeat-x; + border-color: #2b669a; +} +.btn-primary:hover, +.btn-primary:focus { + background-color: #2d6ca2; + background-position: 0 -15px; +} +.btn-primary:active, +.btn-primary.active { + background-color: #2d6ca2; + border-color: #2b669a; +} +.btn-primary:disabled, +.btn-primary[disabled] { + background-color: #2d6ca2; + background-image: none; +} +.btn-success { + background-image: -webkit-linear-gradient(top, #5cb85c 0%, #419641 100%); + background-image: -o-linear-gradient(top, #5cb85c 0%, #419641 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#419641)); + background-image: linear-gradient(to bottom, #5cb85c 0%, #419641 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + background-repeat: repeat-x; + border-color: #3e8f3e; +} +.btn-success:hover, +.btn-success:focus { + background-color: #419641; + background-position: 0 -15px; +} +.btn-success:active, +.btn-success.active { + background-color: #419641; + border-color: #3e8f3e; +} +.btn-success:disabled, +.btn-success[disabled] { + background-color: #419641; + background-image: none; +} +.btn-info { + background-image: -webkit-linear-gradient(top, #5bc0de 0%, #2aabd2 100%); + background-image: -o-linear-gradient(top, #5bc0de 0%, #2aabd2 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#2aabd2)); + background-image: linear-gradient(to bottom, #5bc0de 0%, #2aabd2 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + background-repeat: repeat-x; + border-color: #28a4c9; +} +.btn-info:hover, +.btn-info:focus { + background-color: #2aabd2; + background-position: 0 -15px; +} +.btn-info:active, +.btn-info.active { + background-color: #2aabd2; + border-color: #28a4c9; +} +.btn-info:disabled, +.btn-info[disabled] { + background-color: #2aabd2; + background-image: none; +} +.btn-warning { + background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #eb9316 100%); + background-image: -o-linear-gradient(top, #f0ad4e 0%, #eb9316 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#eb9316)); + background-image: linear-gradient(to bottom, #f0ad4e 0%, #eb9316 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + background-repeat: repeat-x; + border-color: #e38d13; +} +.btn-warning:hover, +.btn-warning:focus { + background-color: #eb9316; + background-position: 0 -15px; +} +.btn-warning:active, +.btn-warning.active { + background-color: #eb9316; + border-color: #e38d13; +} +.btn-warning:disabled, +.btn-warning[disabled] { + background-color: #eb9316; + background-image: none; +} +.btn-danger { + background-image: -webkit-linear-gradient(top, #d9534f 0%, #c12e2a 100%); + background-image: -o-linear-gradient(top, #d9534f 0%, #c12e2a 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c12e2a)); + background-image: linear-gradient(to bottom, #d9534f 0%, #c12e2a 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + background-repeat: repeat-x; + border-color: #b92c28; +} +.btn-danger:hover, +.btn-danger:focus { + background-color: #c12e2a; + background-position: 0 -15px; +} +.btn-danger:active, +.btn-danger.active { + background-color: #c12e2a; + border-color: #b92c28; +} +.btn-danger:disabled, +.btn-danger[disabled] { + background-color: #c12e2a; + background-image: none; +} +.thumbnail, +.img-thumbnail { + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075); + box-shadow: 0 1px 2px rgba(0, 0, 0, .075); +} +.dropdown-menu > li > a:hover, +.dropdown-menu > li > a:focus { + background-color: #e8e8e8; + background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); + background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8)); + background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0); + background-repeat: repeat-x; +} +.dropdown-menu > .active > a, +.dropdown-menu > .active > a:hover, +.dropdown-menu > .active > a:focus { + background-color: #357ebd; + background-image: -webkit-linear-gradient(top, #428bca 0%, #357ebd 100%); + background-image: -o-linear-gradient(top, #428bca 0%, #357ebd 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#428bca), to(#357ebd)); + background-image: linear-gradient(to bottom, #428bca 0%, #357ebd 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0); + background-repeat: repeat-x; +} +.navbar-default { + background-image: -webkit-linear-gradient(top, #fff 0%, #f8f8f8 100%); + background-image: -o-linear-gradient(top, #fff 0%, #f8f8f8 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#f8f8f8)); + background-image: linear-gradient(to bottom, #fff 0%, #f8f8f8 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + background-repeat: repeat-x; + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075); +} +.navbar-default .navbar-nav > .open > a, +.navbar-default .navbar-nav > .active > a { + background-image: -webkit-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%); + background-image: -o-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#dbdbdb), to(#e2e2e2)); + background-image: linear-gradient(to bottom, #dbdbdb 0%, #e2e2e2 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0); + background-repeat: repeat-x; + -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075); + box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075); +} +.navbar-brand, +.navbar-nav > li > a { + text-shadow: 0 1px 0 rgba(255, 255, 255, .25); +} +.navbar-inverse { + background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #222 100%); + background-image: -o-linear-gradient(top, #3c3c3c 0%, #222 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#3c3c3c), to(#222)); + background-image: linear-gradient(to bottom, #3c3c3c 0%, #222 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + background-repeat: repeat-x; +} +.navbar-inverse .navbar-nav > .open > a, +.navbar-inverse .navbar-nav > .active > a { + background-image: -webkit-linear-gradient(top, #080808 0%, #0f0f0f 100%); + background-image: -o-linear-gradient(top, #080808 0%, #0f0f0f 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#080808), to(#0f0f0f)); + background-image: linear-gradient(to bottom, #080808 0%, #0f0f0f 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0); + background-repeat: repeat-x; + -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25); + box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25); +} +.navbar-inverse .navbar-brand, +.navbar-inverse .navbar-nav > li > a { + text-shadow: 0 -1px 0 rgba(0, 0, 0, .25); +} +.navbar-static-top, +.navbar-fixed-top, +.navbar-fixed-bottom { + border-radius: 0; +} +.alert { + text-shadow: 0 1px 0 rgba(255, 255, 255, .2); + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05); +} +.alert-success { + background-image: -webkit-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%); + background-image: -o-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#c8e5bc)); + background-image: linear-gradient(to bottom, #dff0d8 0%, #c8e5bc 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0); + background-repeat: repeat-x; + border-color: #b2dba1; +} +.alert-info { + background-image: -webkit-linear-gradient(top, #d9edf7 0%, #b9def0 100%); + background-image: -o-linear-gradient(top, #d9edf7 0%, #b9def0 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#b9def0)); + background-image: linear-gradient(to bottom, #d9edf7 0%, #b9def0 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0); + background-repeat: repeat-x; + border-color: #9acfea; +} +.alert-warning { + background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%); + background-image: -o-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#f8efc0)); + background-image: linear-gradient(to bottom, #fcf8e3 0%, #f8efc0 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0); + background-repeat: repeat-x; + border-color: #f5e79e; +} +.alert-danger { + background-image: -webkit-linear-gradient(top, #f2dede 0%, #e7c3c3 100%); + background-image: -o-linear-gradient(top, #f2dede 0%, #e7c3c3 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#e7c3c3)); + background-image: linear-gradient(to bottom, #f2dede 0%, #e7c3c3 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0); + background-repeat: repeat-x; + border-color: #dca7a7; +} +.progress { + background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%); + background-image: -o-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#ebebeb), to(#f5f5f5)); + background-image: linear-gradient(to bottom, #ebebeb 0%, #f5f5f5 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0); + background-repeat: repeat-x; +} +.progress-bar { + background-image: -webkit-linear-gradient(top, #428bca 0%, #3071a9 100%); + background-image: -o-linear-gradient(top, #428bca 0%, #3071a9 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#428bca), to(#3071a9)); + background-image: linear-gradient(to bottom, #428bca 0%, #3071a9 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff3071a9', GradientType=0); + background-repeat: repeat-x; +} +.progress-bar-success { + background-image: -webkit-linear-gradient(top, #5cb85c 0%, #449d44 100%); + background-image: -o-linear-gradient(top, #5cb85c 0%, #449d44 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#449d44)); + background-image: linear-gradient(to bottom, #5cb85c 0%, #449d44 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0); + background-repeat: repeat-x; +} +.progress-bar-info { + background-image: -webkit-linear-gradient(top, #5bc0de 0%, #31b0d5 100%); + background-image: -o-linear-gradient(top, #5bc0de 0%, #31b0d5 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#31b0d5)); + background-image: linear-gradient(to bottom, #5bc0de 0%, #31b0d5 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0); + background-repeat: repeat-x; +} +.progress-bar-warning { + background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #ec971f 100%); + background-image: -o-linear-gradient(top, #f0ad4e 0%, #ec971f 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#ec971f)); + background-image: linear-gradient(to bottom, #f0ad4e 0%, #ec971f 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0); + background-repeat: repeat-x; +} +.progress-bar-danger { + background-image: -webkit-linear-gradient(top, #d9534f 0%, #c9302c 100%); + background-image: -o-linear-gradient(top, #d9534f 0%, #c9302c 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c9302c)); + background-image: linear-gradient(to bottom, #d9534f 0%, #c9302c 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0); + background-repeat: repeat-x; +} +.progress-bar-striped { + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); +} +.list-group { + border-radius: 4px; + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075); + box-shadow: 0 1px 2px rgba(0, 0, 0, .075); +} +.list-group-item.active, +.list-group-item.active:hover, +.list-group-item.active:focus { + text-shadow: 0 -1px 0 #3071a9; + background-image: -webkit-linear-gradient(top, #428bca 0%, #3278b3 100%); + background-image: -o-linear-gradient(top, #428bca 0%, #3278b3 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#428bca), to(#3278b3)); + background-image: linear-gradient(to bottom, #428bca 0%, #3278b3 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff3278b3', GradientType=0); + background-repeat: repeat-x; + border-color: #3278b3; +} +.list-group-item.active .badge, +.list-group-item.active:hover .badge, +.list-group-item.active:focus .badge { + text-shadow: none; +} +.panel { + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .05); + box-shadow: 0 1px 2px rgba(0, 0, 0, .05); +} +.panel-default > .panel-heading { + background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); + background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8)); + background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0); + background-repeat: repeat-x; +} +.panel-primary > .panel-heading { + background-image: -webkit-linear-gradient(top, #428bca 0%, #357ebd 100%); + background-image: -o-linear-gradient(top, #428bca 0%, #357ebd 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#428bca), to(#357ebd)); + background-image: linear-gradient(to bottom, #428bca 0%, #357ebd 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0); + background-repeat: repeat-x; +} +.panel-success > .panel-heading { + background-image: -webkit-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%); + background-image: -o-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#d0e9c6)); + background-image: linear-gradient(to bottom, #dff0d8 0%, #d0e9c6 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0); + background-repeat: repeat-x; +} +.panel-info > .panel-heading { + background-image: -webkit-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%); + background-image: -o-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#c4e3f3)); + background-image: linear-gradient(to bottom, #d9edf7 0%, #c4e3f3 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0); + background-repeat: repeat-x; +} +.panel-warning > .panel-heading { + background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%); + background-image: -o-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#faf2cc)); + background-image: linear-gradient(to bottom, #fcf8e3 0%, #faf2cc 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0); + background-repeat: repeat-x; +} +.panel-danger > .panel-heading { + background-image: -webkit-linear-gradient(top, #f2dede 0%, #ebcccc 100%); + background-image: -o-linear-gradient(top, #f2dede 0%, #ebcccc 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#ebcccc)); + background-image: linear-gradient(to bottom, #f2dede 0%, #ebcccc 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0); + background-repeat: repeat-x; +} +.well { + background-image: -webkit-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%); + background-image: -o-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#e8e8e8), to(#f5f5f5)); + background-image: linear-gradient(to bottom, #e8e8e8 0%, #f5f5f5 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0); + background-repeat: repeat-x; + border-color: #dcdcdc; + -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1); + box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1); +} +/*# sourceMappingURL=bootstrap-theme.css.map */ diff --git a/源码/src/main/webapp/resource/boot/css/bootstrap-theme.css.map b/源码/src/main/webapp/resource/boot/css/bootstrap-theme.css.map new file mode 100644 index 0000000..1ea032a --- /dev/null +++ b/源码/src/main/webapp/resource/boot/css/bootstrap-theme.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["less/theme.less","less/mixins/vendor-prefixes.less","bootstrap-theme.css","less/mixins/gradients.less","less/mixins/reset-filter.less"],"names":[],"mappings":"AAcA;;;;;;EAME,0CAAA;ECgDA,6FAAA;EACQ,qFAAA;EC5DT;AFgBC;;;;;;;;;;;;EC2CA,0DAAA;EACQ,kDAAA;EC7CT;AFVD;;;;;;EAiBI,mBAAA;EECH;AFgCC;;EAEE,wBAAA;EE9BH;AFmCD;EGlDI,0EAAA;EACA,qEAAA;EACA,+FAAA;EAAA,wEAAA;EAEA,wHAAA;ECnBF,qEAAA;EJiCA,6BAAA;EACA,uBAAA;EA+B2C,2BAAA;EAA2B,oBAAA;EExBvE;AFLC;;EAEE,2BAAA;EACA,8BAAA;EEOH;AFJC;;EAEE,2BAAA;EACA,uBAAA;EEMH;AFHC;;EAEE,2BAAA;EACA,wBAAA;EEKH;AFUD;EGnDI,0EAAA;EACA,qEAAA;EACA,+FAAA;EAAA,wEAAA;EAEA,wHAAA;ECnBF,qEAAA;EJiCA,6BAAA;EACA,uBAAA;EE+BD;AF7BC;;EAEE,2BAAA;EACA,8BAAA;EE+BH;AF5BC;;EAEE,2BAAA;EACA,uBAAA;EE8BH;AF3BC;;EAEE,2BAAA;EACA,wBAAA;EE6BH;AFbD;EGpDI,0EAAA;EACA,qEAAA;EACA,+FAAA;EAAA,wEAAA;EAEA,wHAAA;ECnBF,qEAAA;EJiCA,6BAAA;EACA,uBAAA;EEuDD;AFrDC;;EAEE,2BAAA;EACA,8BAAA;EEuDH;AFpDC;;EAEE,2BAAA;EACA,uBAAA;EEsDH;AFnDC;;EAEE,2BAAA;EACA,wBAAA;EEqDH;AFpCD;EGrDI,0EAAA;EACA,qEAAA;EACA,+FAAA;EAAA,wEAAA;EAEA,wHAAA;ECnBF,qEAAA;EJiCA,6BAAA;EACA,uBAAA;EE+ED;AF7EC;;EAEE,2BAAA;EACA,8BAAA;EE+EH;AF5EC;;EAEE,2BAAA;EACA,uBAAA;EE8EH;AF3EC;;EAEE,2BAAA;EACA,wBAAA;EE6EH;AF3DD;EGtDI,0EAAA;EACA,qEAAA;EACA,+FAAA;EAAA,wEAAA;EAEA,wHAAA;ECnBF,qEAAA;EJiCA,6BAAA;EACA,uBAAA;EEuGD;AFrGC;;EAEE,2BAAA;EACA,8BAAA;EEuGH;AFpGC;;EAEE,2BAAA;EACA,uBAAA;EEsGH;AFnGC;;EAEE,2BAAA;EACA,wBAAA;EEqGH;AFlFD;EGvDI,0EAAA;EACA,qEAAA;EACA,+FAAA;EAAA,wEAAA;EAEA,wHAAA;ECnBF,qEAAA;EJiCA,6BAAA;EACA,uBAAA;EE+HD;AF7HC;;EAEE,2BAAA;EACA,8BAAA;EE+HH;AF5HC;;EAEE,2BAAA;EACA,uBAAA;EE8HH;AF3HC;;EAEE,2BAAA;EACA,wBAAA;EE6HH;AFnGD;;ECfE,oDAAA;EACQ,4CAAA;ECsHT;AF9FD;;EGxEI,0EAAA;EACA,qEAAA;EACA,+FAAA;EAAA,wEAAA;EACA,6BAAA;EACA,wHAAA;EHuEF,2BAAA;EEoGD;AFlGD;;;EG7EI,0EAAA;EACA,qEAAA;EACA,+FAAA;EAAA,wEAAA;EACA,6BAAA;EACA,wHAAA;EH6EF,2BAAA;EEwGD;AF/FD;EG1FI,0EAAA;EACA,qEAAA;EACA,+FAAA;EAAA,wEAAA;EACA,6BAAA;EACA,wHAAA;ECnBF,qEAAA;EJ4GA,oBAAA;EC9CA,6FAAA;EACQ,qFAAA;ECoJT;AF1GD;;EG1FI,0EAAA;EACA,qEAAA;EACA,+FAAA;EAAA,wEAAA;EACA,6BAAA;EACA,wHAAA;EF2CF,0DAAA;EACQ,kDAAA;EC8JT;AFvGD;;EAEE,gDAAA;EEyGD;AFrGD;EG7GI,0EAAA;EACA,qEAAA;EACA,+FAAA;EAAA,wEAAA;EACA,6BAAA;EACA,wHAAA;ECnBF,qEAAA;EFyOD;AF7GD;;EG7GI,0EAAA;EACA,qEAAA;EACA,+FAAA;EAAA,wEAAA;EACA,6BAAA;EACA,wHAAA;EF2CF,yDAAA;EACQ,iDAAA;ECoLT;AFvHD;;EAYI,2CAAA;EE+GH;AF1GD;;;EAGE,kBAAA;EE4GD;AFnGD;EACE,+CAAA;EC5FA,4FAAA;EACQ,oFAAA;ECkMT;AF3FD;EGvJI,0EAAA;EACA,qEAAA;EACA,+FAAA;EAAA,wEAAA;EACA,6BAAA;EACA,wHAAA;EH+IF,uBAAA;EEuGD;AFlGD;EGxJI,0EAAA;EACA,qEAAA;EACA,+FAAA;EAAA,wEAAA;EACA,6BAAA;EACA,wHAAA;EH+IF,uBAAA;EE+GD;AFzGD;EGzJI,0EAAA;EACA,qEAAA;EACA,+FAAA;EAAA,wEAAA;EACA,6BAAA;EACA,wHAAA;EH+IF,uBAAA;EEuHD;AFhHD;EG1JI,0EAAA;EACA,qEAAA;EACA,+FAAA;EAAA,wEAAA;EACA,6BAAA;EACA,wHAAA;EH+IF,uBAAA;EE+HD;AFhHD;EGlKI,0EAAA;EACA,qEAAA;EACA,+FAAA;EAAA,wEAAA;EACA,6BAAA;EACA,wHAAA;EDqRH;AF7GD;EG5KI,0EAAA;EACA,qEAAA;EACA,+FAAA;EAAA,wEAAA;EACA,6BAAA;EACA,wHAAA;ED4RH;AFnHD;EG7KI,0EAAA;EACA,qEAAA;EACA,+FAAA;EAAA,wEAAA;EACA,6BAAA;EACA,wHAAA;EDmSH;AFzHD;EG9KI,0EAAA;EACA,qEAAA;EACA,+FAAA;EAAA,wEAAA;EACA,6BAAA;EACA,wHAAA;ED0SH;AF/HD;EG/KI,0EAAA;EACA,qEAAA;EACA,+FAAA;EAAA,wEAAA;EACA,6BAAA;EACA,wHAAA;EDiTH;AFrID;EGhLI,0EAAA;EACA,qEAAA;EACA,+FAAA;EAAA,wEAAA;EACA,6BAAA;EACA,wHAAA;EDwTH;AFxID;EGnJI,+MAAA;EACA,0MAAA;EACA,uMAAA;ED8RH;AFpID;EACE,oBAAA;EC/IA,oDAAA;EACQ,4CAAA;ECsRT;AFrID;;;EAGE,+BAAA;EGpME,0EAAA;EACA,qEAAA;EACA,+FAAA;EAAA,wEAAA;EACA,6BAAA;EACA,wHAAA;EHkMF,uBAAA;EE2ID;AFhJD;;;EAQI,mBAAA;EE6IH;AFnID;ECpKE,mDAAA;EACQ,2CAAA;EC0ST;AF7HD;EG7NI,0EAAA;EACA,qEAAA;EACA,+FAAA;EAAA,wEAAA;EACA,6BAAA;EACA,wHAAA;ED6VH;AFnID;EG9NI,0EAAA;EACA,qEAAA;EACA,+FAAA;EAAA,wEAAA;EACA,6BAAA;EACA,wHAAA;EDoWH;AFzID;EG/NI,0EAAA;EACA,qEAAA;EACA,+FAAA;EAAA,wEAAA;EACA,6BAAA;EACA,wHAAA;ED2WH;AF/ID;EGhOI,0EAAA;EACA,qEAAA;EACA,+FAAA;EAAA,wEAAA;EACA,6BAAA;EACA,wHAAA;EDkXH;AFrJD;EGjOI,0EAAA;EACA,qEAAA;EACA,+FAAA;EAAA,wEAAA;EACA,6BAAA;EACA,wHAAA;EDyXH;AF3JD;EGlOI,0EAAA;EACA,qEAAA;EACA,+FAAA;EAAA,wEAAA;EACA,6BAAA;EACA,wHAAA;EDgYH;AF3JD;EGzOI,0EAAA;EACA,qEAAA;EACA,+FAAA;EAAA,wEAAA;EACA,6BAAA;EACA,wHAAA;EHuOF,uBAAA;EC5LA,2FAAA;EACQ,mFAAA;EC8VT","file":"bootstrap-theme.css","sourcesContent":["\n//\n// Load core variables and mixins\n// --------------------------------------------------\n\n@import \"variables.less\";\n@import \"mixins.less\";\n\n\n//\n// Buttons\n// --------------------------------------------------\n\n// Common styles\n.btn-default,\n.btn-primary,\n.btn-success,\n.btn-info,\n.btn-warning,\n.btn-danger {\n text-shadow: 0 -1px 0 rgba(0,0,0,.2);\n @shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 1px rgba(0,0,0,.075);\n .box-shadow(@shadow);\n\n // Reset the shadow\n &:active,\n &.active {\n .box-shadow(inset 0 3px 5px rgba(0,0,0,.125));\n }\n\n .badge {\n text-shadow: none;\n }\n}\n\n// Mixin for generating new styles\n.btn-styles(@btn-color: #555) {\n #gradient > .vertical(@start-color: @btn-color; @end-color: darken(@btn-color, 12%));\n .reset-filter(); // Disable gradients for IE9 because filter bleeds through rounded corners\n background-repeat: repeat-x;\n border-color: darken(@btn-color, 14%);\n\n &:hover,\n &:focus {\n background-color: darken(@btn-color, 12%);\n background-position: 0 -15px;\n }\n\n &:active,\n &.active {\n background-color: darken(@btn-color, 12%);\n border-color: darken(@btn-color, 14%);\n }\n\n &:disabled,\n &[disabled] {\n background-color: darken(@btn-color, 12%);\n background-image: none;\n }\n}\n\n// Common styles\n.btn {\n // Remove the gradient for the pressed/active state\n &:active,\n &.active {\n background-image: none;\n }\n}\n\n// Apply the mixin to the buttons\n.btn-default { .btn-styles(@btn-default-bg); text-shadow: 0 1px 0 #fff; border-color: #ccc; }\n.btn-primary { .btn-styles(@btn-primary-bg); }\n.btn-success { .btn-styles(@btn-success-bg); }\n.btn-info { .btn-styles(@btn-info-bg); }\n.btn-warning { .btn-styles(@btn-warning-bg); }\n.btn-danger { .btn-styles(@btn-danger-bg); }\n\n\n//\n// Images\n// --------------------------------------------------\n\n.thumbnail,\n.img-thumbnail {\n .box-shadow(0 1px 2px rgba(0,0,0,.075));\n}\n\n\n//\n// Dropdowns\n// --------------------------------------------------\n\n.dropdown-menu > li > a:hover,\n.dropdown-menu > li > a:focus {\n #gradient > .vertical(@start-color: @dropdown-link-hover-bg; @end-color: darken(@dropdown-link-hover-bg, 5%));\n background-color: darken(@dropdown-link-hover-bg, 5%);\n}\n.dropdown-menu > .active > a,\n.dropdown-menu > .active > a:hover,\n.dropdown-menu > .active > a:focus {\n #gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%));\n background-color: darken(@dropdown-link-active-bg, 5%);\n}\n\n\n//\n// Navbar\n// --------------------------------------------------\n\n// Default navbar\n.navbar-default {\n #gradient > .vertical(@start-color: lighten(@navbar-default-bg, 10%); @end-color: @navbar-default-bg);\n .reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered\n border-radius: @navbar-border-radius;\n @shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 5px rgba(0,0,0,.075);\n .box-shadow(@shadow);\n\n .navbar-nav > .open > a,\n .navbar-nav > .active > a {\n #gradient > .vertical(@start-color: darken(@navbar-default-link-active-bg, 5%); @end-color: darken(@navbar-default-link-active-bg, 2%));\n .box-shadow(inset 0 3px 9px rgba(0,0,0,.075));\n }\n}\n.navbar-brand,\n.navbar-nav > li > a {\n text-shadow: 0 1px 0 rgba(255,255,255,.25);\n}\n\n// Inverted navbar\n.navbar-inverse {\n #gradient > .vertical(@start-color: lighten(@navbar-inverse-bg, 10%); @end-color: @navbar-inverse-bg);\n .reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered\n\n .navbar-nav > .open > a,\n .navbar-nav > .active > a {\n #gradient > .vertical(@start-color: @navbar-inverse-link-active-bg; @end-color: lighten(@navbar-inverse-link-active-bg, 2.5%));\n .box-shadow(inset 0 3px 9px rgba(0,0,0,.25));\n }\n\n .navbar-brand,\n .navbar-nav > li > a {\n text-shadow: 0 -1px 0 rgba(0,0,0,.25);\n }\n}\n\n// Undo rounded corners in static and fixed navbars\n.navbar-static-top,\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n border-radius: 0;\n}\n\n\n//\n// Alerts\n// --------------------------------------------------\n\n// Common styles\n.alert {\n text-shadow: 0 1px 0 rgba(255,255,255,.2);\n @shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 2px rgba(0,0,0,.05);\n .box-shadow(@shadow);\n}\n\n// Mixin for generating new styles\n.alert-styles(@color) {\n #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 7.5%));\n border-color: darken(@color, 15%);\n}\n\n// Apply the mixin to the alerts\n.alert-success { .alert-styles(@alert-success-bg); }\n.alert-info { .alert-styles(@alert-info-bg); }\n.alert-warning { .alert-styles(@alert-warning-bg); }\n.alert-danger { .alert-styles(@alert-danger-bg); }\n\n\n//\n// Progress bars\n// --------------------------------------------------\n\n// Give the progress background some depth\n.progress {\n #gradient > .vertical(@start-color: darken(@progress-bg, 4%); @end-color: @progress-bg)\n}\n\n// Mixin for generating new styles\n.progress-bar-styles(@color) {\n #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 10%));\n}\n\n// Apply the mixin to the progress bars\n.progress-bar { .progress-bar-styles(@progress-bar-bg); }\n.progress-bar-success { .progress-bar-styles(@progress-bar-success-bg); }\n.progress-bar-info { .progress-bar-styles(@progress-bar-info-bg); }\n.progress-bar-warning { .progress-bar-styles(@progress-bar-warning-bg); }\n.progress-bar-danger { .progress-bar-styles(@progress-bar-danger-bg); }\n\n// Reset the striped class because our mixins don't do multiple gradients and\n// the above custom styles override the new `.progress-bar-striped` in v3.2.0.\n.progress-bar-striped {\n #gradient > .striped();\n}\n\n\n//\n// List groups\n// --------------------------------------------------\n\n.list-group {\n border-radius: @border-radius-base;\n .box-shadow(0 1px 2px rgba(0,0,0,.075));\n}\n.list-group-item.active,\n.list-group-item.active:hover,\n.list-group-item.active:focus {\n text-shadow: 0 -1px 0 darken(@list-group-active-bg, 10%);\n #gradient > .vertical(@start-color: @list-group-active-bg; @end-color: darken(@list-group-active-bg, 7.5%));\n border-color: darken(@list-group-active-border, 7.5%);\n\n .badge {\n text-shadow: none;\n }\n}\n\n\n//\n// Panels\n// --------------------------------------------------\n\n// Common styles\n.panel {\n .box-shadow(0 1px 2px rgba(0,0,0,.05));\n}\n\n// Mixin for generating new styles\n.panel-heading-styles(@color) {\n #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 5%));\n}\n\n// Apply the mixin to the panel headings only\n.panel-default > .panel-heading { .panel-heading-styles(@panel-default-heading-bg); }\n.panel-primary > .panel-heading { .panel-heading-styles(@panel-primary-heading-bg); }\n.panel-success > .panel-heading { .panel-heading-styles(@panel-success-heading-bg); }\n.panel-info > .panel-heading { .panel-heading-styles(@panel-info-heading-bg); }\n.panel-warning > .panel-heading { .panel-heading-styles(@panel-warning-heading-bg); }\n.panel-danger > .panel-heading { .panel-heading-styles(@panel-danger-heading-bg); }\n\n\n//\n// Wells\n// --------------------------------------------------\n\n.well {\n #gradient > .vertical(@start-color: darken(@well-bg, 5%); @end-color: @well-bg);\n border-color: darken(@well-bg, 10%);\n @shadow: inset 0 1px 3px rgba(0,0,0,.05), 0 1px 0 rgba(255,255,255,.1);\n .box-shadow(@shadow);\n}\n","// Vendor Prefixes\n//\n// All vendor mixins are deprecated as of v3.2.0 due to the introduction of\n// Autoprefixer in our Gruntfile. They will be removed in v4.\n\n// - Animations\n// - Backface visibility\n// - Box shadow\n// - Box sizing\n// - Content columns\n// - Hyphens\n// - Placeholder text\n// - Transformations\n// - Transitions\n// - User Select\n\n\n// Animations\n.animation(@animation) {\n -webkit-animation: @animation;\n -o-animation: @animation;\n animation: @animation;\n}\n.animation-name(@name) {\n -webkit-animation-name: @name;\n animation-name: @name;\n}\n.animation-duration(@duration) {\n -webkit-animation-duration: @duration;\n animation-duration: @duration;\n}\n.animation-timing-function(@timing-function) {\n -webkit-animation-timing-function: @timing-function;\n animation-timing-function: @timing-function;\n}\n.animation-delay(@delay) {\n -webkit-animation-delay: @delay;\n animation-delay: @delay;\n}\n.animation-iteration-count(@iteration-count) {\n -webkit-animation-iteration-count: @iteration-count;\n animation-iteration-count: @iteration-count;\n}\n.animation-direction(@direction) {\n -webkit-animation-direction: @direction;\n animation-direction: @direction;\n}\n.animation-fill-mode(@fill-mode) {\n -webkit-animation-fill-mode: @fill-mode;\n animation-fill-mode: @fill-mode;\n}\n\n// Backface visibility\n// Prevent browsers from flickering when using CSS 3D transforms.\n// Default value is `visible`, but can be changed to `hidden`\n\n.backface-visibility(@visibility){\n -webkit-backface-visibility: @visibility;\n -moz-backface-visibility: @visibility;\n backface-visibility: @visibility;\n}\n\n// Drop shadows\n//\n// Note: Deprecated `.box-shadow()` as of v3.1.0 since all of Bootstrap's\n// supported browsers that have box shadow capabilities now support it.\n\n.box-shadow(@shadow) {\n -webkit-box-shadow: @shadow; // iOS <4.3 & Android <4.1\n box-shadow: @shadow;\n}\n\n// Box sizing\n.box-sizing(@boxmodel) {\n -webkit-box-sizing: @boxmodel;\n -moz-box-sizing: @boxmodel;\n box-sizing: @boxmodel;\n}\n\n// CSS3 Content Columns\n.content-columns(@column-count; @column-gap: @grid-gutter-width) {\n -webkit-column-count: @column-count;\n -moz-column-count: @column-count;\n column-count: @column-count;\n -webkit-column-gap: @column-gap;\n -moz-column-gap: @column-gap;\n column-gap: @column-gap;\n}\n\n// Optional hyphenation\n.hyphens(@mode: auto) {\n word-wrap: break-word;\n -webkit-hyphens: @mode;\n -moz-hyphens: @mode;\n -ms-hyphens: @mode; // IE10+\n -o-hyphens: @mode;\n hyphens: @mode;\n}\n\n// Placeholder text\n.placeholder(@color: @input-color-placeholder) {\n // Firefox\n &::-moz-placeholder {\n color: @color;\n opacity: 1; // See https://github.com/twbs/bootstrap/pull/11526\n }\n &:-ms-input-placeholder { color: @color; } // Internet Explorer 10+\n &::-webkit-input-placeholder { color: @color; } // Safari and Chrome\n}\n\n// Transformations\n.scale(@ratio) {\n -webkit-transform: scale(@ratio);\n -ms-transform: scale(@ratio); // IE9 only\n -o-transform: scale(@ratio);\n transform: scale(@ratio);\n}\n.scale(@ratioX; @ratioY) {\n -webkit-transform: scale(@ratioX, @ratioY);\n -ms-transform: scale(@ratioX, @ratioY); // IE9 only\n -o-transform: scale(@ratioX, @ratioY);\n transform: scale(@ratioX, @ratioY);\n}\n.scaleX(@ratio) {\n -webkit-transform: scaleX(@ratio);\n -ms-transform: scaleX(@ratio); // IE9 only\n -o-transform: scaleX(@ratio);\n transform: scaleX(@ratio);\n}\n.scaleY(@ratio) {\n -webkit-transform: scaleY(@ratio);\n -ms-transform: scaleY(@ratio); // IE9 only\n -o-transform: scaleY(@ratio);\n transform: scaleY(@ratio);\n}\n.skew(@x; @y) {\n -webkit-transform: skewX(@x) skewY(@y);\n -ms-transform: skewX(@x) skewY(@y); // See https://github.com/twbs/bootstrap/issues/4885; IE9+\n -o-transform: skewX(@x) skewY(@y);\n transform: skewX(@x) skewY(@y);\n}\n.translate(@x; @y) {\n -webkit-transform: translate(@x, @y);\n -ms-transform: translate(@x, @y); // IE9 only\n -o-transform: translate(@x, @y);\n transform: translate(@x, @y);\n}\n.translate3d(@x; @y; @z) {\n -webkit-transform: translate3d(@x, @y, @z);\n transform: translate3d(@x, @y, @z);\n}\n.rotate(@degrees) {\n -webkit-transform: rotate(@degrees);\n -ms-transform: rotate(@degrees); // IE9 only\n -o-transform: rotate(@degrees);\n transform: rotate(@degrees);\n}\n.rotateX(@degrees) {\n -webkit-transform: rotateX(@degrees);\n -ms-transform: rotateX(@degrees); // IE9 only\n -o-transform: rotateX(@degrees);\n transform: rotateX(@degrees);\n}\n.rotateY(@degrees) {\n -webkit-transform: rotateY(@degrees);\n -ms-transform: rotateY(@degrees); // IE9 only\n -o-transform: rotateY(@degrees);\n transform: rotateY(@degrees);\n}\n.perspective(@perspective) {\n -webkit-perspective: @perspective;\n -moz-perspective: @perspective;\n perspective: @perspective;\n}\n.perspective-origin(@perspective) {\n -webkit-perspective-origin: @perspective;\n -moz-perspective-origin: @perspective;\n perspective-origin: @perspective;\n}\n.transform-origin(@origin) {\n -webkit-transform-origin: @origin;\n -moz-transform-origin: @origin;\n -ms-transform-origin: @origin; // IE9 only\n transform-origin: @origin;\n}\n\n\n// Transitions\n\n.transition(@transition) {\n -webkit-transition: @transition;\n -o-transition: @transition;\n transition: @transition;\n}\n.transition-property(@transition-property) {\n -webkit-transition-property: @transition-property;\n transition-property: @transition-property;\n}\n.transition-delay(@transition-delay) {\n -webkit-transition-delay: @transition-delay;\n transition-delay: @transition-delay;\n}\n.transition-duration(@transition-duration) {\n -webkit-transition-duration: @transition-duration;\n transition-duration: @transition-duration;\n}\n.transition-timing-function(@timing-function) {\n -webkit-transition-timing-function: @timing-function;\n transition-timing-function: @timing-function;\n}\n.transition-transform(@transition) {\n -webkit-transition: -webkit-transform @transition;\n -moz-transition: -moz-transform @transition;\n -o-transition: -o-transform @transition;\n transition: transform @transition;\n}\n\n\n// User select\n// For selecting text on the page\n\n.user-select(@select) {\n -webkit-user-select: @select;\n -moz-user-select: @select;\n -ms-user-select: @select; // IE10+\n user-select: @select;\n}\n",".btn-default,\n.btn-primary,\n.btn-success,\n.btn-info,\n.btn-warning,\n.btn-danger {\n text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);\n -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075);\n}\n.btn-default:active,\n.btn-primary:active,\n.btn-success:active,\n.btn-info:active,\n.btn-warning:active,\n.btn-danger:active,\n.btn-default.active,\n.btn-primary.active,\n.btn-success.active,\n.btn-info.active,\n.btn-warning.active,\n.btn-danger.active {\n -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n}\n.btn-default .badge,\n.btn-primary .badge,\n.btn-success .badge,\n.btn-info .badge,\n.btn-warning .badge,\n.btn-danger .badge {\n text-shadow: none;\n}\n.btn:active,\n.btn.active {\n background-image: none;\n}\n.btn-default {\n background-image: -webkit-linear-gradient(top, #ffffff 0%, #e0e0e0 100%);\n background-image: -o-linear-gradient(top, #ffffff 0%, #e0e0e0 100%);\n background-image: linear-gradient(to bottom, #ffffff 0%, #e0e0e0 100%);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n background-repeat: repeat-x;\n border-color: #dbdbdb;\n text-shadow: 0 1px 0 #fff;\n border-color: #ccc;\n}\n.btn-default:hover,\n.btn-default:focus {\n background-color: #e0e0e0;\n background-position: 0 -15px;\n}\n.btn-default:active,\n.btn-default.active {\n background-color: #e0e0e0;\n border-color: #dbdbdb;\n}\n.btn-default:disabled,\n.btn-default[disabled] {\n background-color: #e0e0e0;\n background-image: none;\n}\n.btn-primary {\n background-image: -webkit-linear-gradient(top, #428bca 0%, #2d6ca2 100%);\n background-image: -o-linear-gradient(top, #428bca 0%, #2d6ca2 100%);\n background-image: linear-gradient(to bottom, #428bca 0%, #2d6ca2 100%);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff2d6ca2', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n background-repeat: repeat-x;\n border-color: #2b669a;\n}\n.btn-primary:hover,\n.btn-primary:focus {\n background-color: #2d6ca2;\n background-position: 0 -15px;\n}\n.btn-primary:active,\n.btn-primary.active {\n background-color: #2d6ca2;\n border-color: #2b669a;\n}\n.btn-primary:disabled,\n.btn-primary[disabled] {\n background-color: #2d6ca2;\n background-image: none;\n}\n.btn-success {\n background-image: -webkit-linear-gradient(top, #5cb85c 0%, #419641 100%);\n background-image: -o-linear-gradient(top, #5cb85c 0%, #419641 100%);\n background-image: linear-gradient(to bottom, #5cb85c 0%, #419641 100%);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n background-repeat: repeat-x;\n border-color: #3e8f3e;\n}\n.btn-success:hover,\n.btn-success:focus {\n background-color: #419641;\n background-position: 0 -15px;\n}\n.btn-success:active,\n.btn-success.active {\n background-color: #419641;\n border-color: #3e8f3e;\n}\n.btn-success:disabled,\n.btn-success[disabled] {\n background-color: #419641;\n background-image: none;\n}\n.btn-info {\n background-image: -webkit-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);\n background-image: -o-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);\n background-image: linear-gradient(to bottom, #5bc0de 0%, #2aabd2 100%);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n background-repeat: repeat-x;\n border-color: #28a4c9;\n}\n.btn-info:hover,\n.btn-info:focus {\n background-color: #2aabd2;\n background-position: 0 -15px;\n}\n.btn-info:active,\n.btn-info.active {\n background-color: #2aabd2;\n border-color: #28a4c9;\n}\n.btn-info:disabled,\n.btn-info[disabled] {\n background-color: #2aabd2;\n background-image: none;\n}\n.btn-warning {\n background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);\n background-image: -o-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);\n background-image: linear-gradient(to bottom, #f0ad4e 0%, #eb9316 100%);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n background-repeat: repeat-x;\n border-color: #e38d13;\n}\n.btn-warning:hover,\n.btn-warning:focus {\n background-color: #eb9316;\n background-position: 0 -15px;\n}\n.btn-warning:active,\n.btn-warning.active {\n background-color: #eb9316;\n border-color: #e38d13;\n}\n.btn-warning:disabled,\n.btn-warning[disabled] {\n background-color: #eb9316;\n background-image: none;\n}\n.btn-danger {\n background-image: -webkit-linear-gradient(top, #d9534f 0%, #c12e2a 100%);\n background-image: -o-linear-gradient(top, #d9534f 0%, #c12e2a 100%);\n background-image: linear-gradient(to bottom, #d9534f 0%, #c12e2a 100%);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n background-repeat: repeat-x;\n border-color: #b92c28;\n}\n.btn-danger:hover,\n.btn-danger:focus {\n background-color: #c12e2a;\n background-position: 0 -15px;\n}\n.btn-danger:active,\n.btn-danger.active {\n background-color: #c12e2a;\n border-color: #b92c28;\n}\n.btn-danger:disabled,\n.btn-danger[disabled] {\n background-color: #c12e2a;\n background-image: none;\n}\n.thumbnail,\n.img-thumbnail {\n -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);\n}\n.dropdown-menu > li > a:hover,\n.dropdown-menu > li > a:focus {\n background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);\n background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);\n background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);\n background-color: #e8e8e8;\n}\n.dropdown-menu > .active > a,\n.dropdown-menu > .active > a:hover,\n.dropdown-menu > .active > a:focus {\n background-image: -webkit-linear-gradient(top, #428bca 0%, #357ebd 100%);\n background-image: -o-linear-gradient(top, #428bca 0%, #357ebd 100%);\n background-image: linear-gradient(to bottom, #428bca 0%, #357ebd 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0);\n background-color: #357ebd;\n}\n.navbar-default {\n background-image: -webkit-linear-gradient(top, #ffffff 0%, #f8f8f8 100%);\n background-image: -o-linear-gradient(top, #ffffff 0%, #f8f8f8 100%);\n background-image: linear-gradient(to bottom, #ffffff 0%, #f8f8f8 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n border-radius: 4px;\n -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 5px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 5px rgba(0, 0, 0, 0.075);\n}\n.navbar-default .navbar-nav > .open > a,\n.navbar-default .navbar-nav > .active > a {\n background-image: -webkit-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%);\n background-image: -o-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%);\n background-image: linear-gradient(to bottom, #dbdbdb 0%, #e2e2e2 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0);\n -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.075);\n}\n.navbar-brand,\n.navbar-nav > li > a {\n text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);\n}\n.navbar-inverse {\n background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #222222 100%);\n background-image: -o-linear-gradient(top, #3c3c3c 0%, #222222 100%);\n background-image: linear-gradient(to bottom, #3c3c3c 0%, #222222 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n}\n.navbar-inverse .navbar-nav > .open > a,\n.navbar-inverse .navbar-nav > .active > a {\n background-image: -webkit-linear-gradient(top, #080808 0%, #0f0f0f 100%);\n background-image: -o-linear-gradient(top, #080808 0%, #0f0f0f 100%);\n background-image: linear-gradient(to bottom, #080808 0%, #0f0f0f 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0);\n -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.25);\n box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.25);\n}\n.navbar-inverse .navbar-brand,\n.navbar-inverse .navbar-nav > li > a {\n text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);\n}\n.navbar-static-top,\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n border-radius: 0;\n}\n.alert {\n text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);\n -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);\n}\n.alert-success {\n background-image: -webkit-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);\n background-image: -o-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);\n background-image: linear-gradient(to bottom, #dff0d8 0%, #c8e5bc 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);\n border-color: #b2dba1;\n}\n.alert-info {\n background-image: -webkit-linear-gradient(top, #d9edf7 0%, #b9def0 100%);\n background-image: -o-linear-gradient(top, #d9edf7 0%, #b9def0 100%);\n background-image: linear-gradient(to bottom, #d9edf7 0%, #b9def0 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);\n border-color: #9acfea;\n}\n.alert-warning {\n background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);\n background-image: -o-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);\n background-image: linear-gradient(to bottom, #fcf8e3 0%, #f8efc0 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);\n border-color: #f5e79e;\n}\n.alert-danger {\n background-image: -webkit-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);\n background-image: -o-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);\n background-image: linear-gradient(to bottom, #f2dede 0%, #e7c3c3 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);\n border-color: #dca7a7;\n}\n.progress {\n background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);\n background-image: -o-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);\n background-image: linear-gradient(to bottom, #ebebeb 0%, #f5f5f5 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);\n}\n.progress-bar {\n background-image: -webkit-linear-gradient(top, #428bca 0%, #3071a9 100%);\n background-image: -o-linear-gradient(top, #428bca 0%, #3071a9 100%);\n background-image: linear-gradient(to bottom, #428bca 0%, #3071a9 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff3071a9', GradientType=0);\n}\n.progress-bar-success {\n background-image: -webkit-linear-gradient(top, #5cb85c 0%, #449d44 100%);\n background-image: -o-linear-gradient(top, #5cb85c 0%, #449d44 100%);\n background-image: linear-gradient(to bottom, #5cb85c 0%, #449d44 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);\n}\n.progress-bar-info {\n background-image: -webkit-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);\n background-image: -o-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);\n background-image: linear-gradient(to bottom, #5bc0de 0%, #31b0d5 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);\n}\n.progress-bar-warning {\n background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);\n background-image: -o-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);\n background-image: linear-gradient(to bottom, #f0ad4e 0%, #ec971f 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);\n}\n.progress-bar-danger {\n background-image: -webkit-linear-gradient(top, #d9534f 0%, #c9302c 100%);\n background-image: -o-linear-gradient(top, #d9534f 0%, #c9302c 100%);\n background-image: linear-gradient(to bottom, #d9534f 0%, #c9302c 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);\n}\n.progress-bar-striped {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n.list-group {\n border-radius: 4px;\n -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);\n}\n.list-group-item.active,\n.list-group-item.active:hover,\n.list-group-item.active:focus {\n text-shadow: 0 -1px 0 #3071a9;\n background-image: -webkit-linear-gradient(top, #428bca 0%, #3278b3 100%);\n background-image: -o-linear-gradient(top, #428bca 0%, #3278b3 100%);\n background-image: linear-gradient(to bottom, #428bca 0%, #3278b3 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff3278b3', GradientType=0);\n border-color: #3278b3;\n}\n.list-group-item.active .badge,\n.list-group-item.active:hover .badge,\n.list-group-item.active:focus .badge {\n text-shadow: none;\n}\n.panel {\n -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);\n}\n.panel-default > .panel-heading {\n background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);\n background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);\n background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);\n}\n.panel-primary > .panel-heading {\n background-image: -webkit-linear-gradient(top, #428bca 0%, #357ebd 100%);\n background-image: -o-linear-gradient(top, #428bca 0%, #357ebd 100%);\n background-image: linear-gradient(to bottom, #428bca 0%, #357ebd 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0);\n}\n.panel-success > .panel-heading {\n background-image: -webkit-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);\n background-image: -o-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);\n background-image: linear-gradient(to bottom, #dff0d8 0%, #d0e9c6 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);\n}\n.panel-info > .panel-heading {\n background-image: -webkit-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);\n background-image: -o-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);\n background-image: linear-gradient(to bottom, #d9edf7 0%, #c4e3f3 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);\n}\n.panel-warning > .panel-heading {\n background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);\n background-image: -o-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);\n background-image: linear-gradient(to bottom, #fcf8e3 0%, #faf2cc 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);\n}\n.panel-danger > .panel-heading {\n background-image: -webkit-linear-gradient(top, #f2dede 0%, #ebcccc 100%);\n background-image: -o-linear-gradient(top, #f2dede 0%, #ebcccc 100%);\n background-image: linear-gradient(to bottom, #f2dede 0%, #ebcccc 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);\n}\n.well {\n background-image: -webkit-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);\n background-image: -o-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);\n background-image: linear-gradient(to bottom, #e8e8e8 0%, #f5f5f5 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);\n border-color: #dcdcdc;\n -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 0 rgba(255, 255, 255, 0.1);\n box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 0 rgba(255, 255, 255, 0.1);\n}\n/*# sourceMappingURL=bootstrap-theme.css.map */","// Gradients\n\n#gradient {\n\n // Horizontal gradient, from left to right\n //\n // Creates two color stops, start and end, by specifying a color and position for each color stop.\n // Color stops are not available in IE9 and below.\n .horizontal(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n background-image: -webkit-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Opera 12\n background-image: linear-gradient(to right, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n background-repeat: repeat-x;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down\n }\n\n // Vertical gradient, from top to bottom\n //\n // Creates two color stops, start and end, by specifying a color and position for each color stop.\n // Color stops are not available in IE9 and below.\n .vertical(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n background-image: -webkit-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Opera 12\n background-image: linear-gradient(to bottom, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n background-repeat: repeat-x;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down\n }\n\n .directional(@start-color: #555; @end-color: #333; @deg: 45deg) {\n background-repeat: repeat-x;\n background-image: -webkit-linear-gradient(@deg, @start-color, @end-color); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(@deg, @start-color, @end-color); // Opera 12\n background-image: linear-gradient(@deg, @start-color, @end-color); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n }\n .horizontal-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n background-image: -webkit-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);\n background-image: -o-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);\n background-image: linear-gradient(to right, @start-color, @mid-color @color-stop, @end-color);\n background-repeat: no-repeat;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n }\n .vertical-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n background-image: -webkit-linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-image: -o-linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-image: linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-repeat: no-repeat;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n }\n .radial(@inner-color: #555; @outer-color: #333) {\n background-image: -webkit-radial-gradient(circle, @inner-color, @outer-color);\n background-image: radial-gradient(circle, @inner-color, @outer-color);\n background-repeat: no-repeat;\n }\n .striped(@color: rgba(255,255,255,.15); @angle: 45deg) {\n background-image: -webkit-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n background-image: linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n }\n}\n","// Reset filters for IE\n//\n// When you need to remove a gradient background, do not forget to use this to reset\n// the IE filter for IE9 and below.\n\n.reset-filter() {\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(enabled = false)\"));\n}\n"]} \ No newline at end of file diff --git a/源码/src/main/webapp/resource/boot/css/bootstrap-theme.min.css b/源码/src/main/webapp/resource/boot/css/bootstrap-theme.min.css new file mode 100644 index 0000000..3bbb050 --- /dev/null +++ b/源码/src/main/webapp/resource/boot/css/bootstrap-theme.min.css @@ -0,0 +1,5 @@ +/*! + * Bootstrap v3.3.0 (http://getbootstrap.com) + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + */.btn-default,.btn-primary,.btn-success,.btn-info,.btn-warning,.btn-danger{text-shadow:0 -1px 0 rgba(0,0,0,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075)}.btn-default:active,.btn-primary:active,.btn-success:active,.btn-info:active,.btn-warning:active,.btn-danger:active,.btn-default.active,.btn-primary.active,.btn-success.active,.btn-info.active,.btn-warning.active,.btn-danger.active{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-default .badge,.btn-primary .badge,.btn-success .badge,.btn-info .badge,.btn-warning .badge,.btn-danger .badge{text-shadow:none}.btn:active,.btn.active{background-image:none}.btn-default{text-shadow:0 1px 0 #fff;background-image:-webkit-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-o-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e0e0e0));background-image:linear-gradient(to bottom,#fff 0,#e0e0e0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#dbdbdb;border-color:#ccc}.btn-default:hover,.btn-default:focus{background-color:#e0e0e0;background-position:0 -15px}.btn-default:active,.btn-default.active{background-color:#e0e0e0;border-color:#dbdbdb}.btn-default:disabled,.btn-default[disabled]{background-color:#e0e0e0;background-image:none}.btn-primary{background-image:-webkit-linear-gradient(top,#428bca 0,#2d6ca2 100%);background-image:-o-linear-gradient(top,#428bca 0,#2d6ca2 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#428bca),to(#2d6ca2));background-image:linear-gradient(to bottom,#428bca 0,#2d6ca2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff2d6ca2', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#2b669a}.btn-primary:hover,.btn-primary:focus{background-color:#2d6ca2;background-position:0 -15px}.btn-primary:active,.btn-primary.active{background-color:#2d6ca2;border-color:#2b669a}.btn-primary:disabled,.btn-primary[disabled]{background-color:#2d6ca2;background-image:none}.btn-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#419641 100%);background-image:-o-linear-gradient(top,#5cb85c 0,#419641 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5cb85c),to(#419641));background-image:linear-gradient(to bottom,#5cb85c 0,#419641 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#3e8f3e}.btn-success:hover,.btn-success:focus{background-color:#419641;background-position:0 -15px}.btn-success:active,.btn-success.active{background-color:#419641;border-color:#3e8f3e}.btn-success:disabled,.btn-success[disabled]{background-color:#419641;background-image:none}.btn-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#2aabd2 100%);background-image:-o-linear-gradient(top,#5bc0de 0,#2aabd2 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5bc0de),to(#2aabd2));background-image:linear-gradient(to bottom,#5bc0de 0,#2aabd2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#28a4c9}.btn-info:hover,.btn-info:focus{background-color:#2aabd2;background-position:0 -15px}.btn-info:active,.btn-info.active{background-color:#2aabd2;border-color:#28a4c9}.btn-info:disabled,.btn-info[disabled]{background-color:#2aabd2;background-image:none}.btn-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#eb9316 100%);background-image:-o-linear-gradient(top,#f0ad4e 0,#eb9316 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f0ad4e),to(#eb9316));background-image:linear-gradient(to bottom,#f0ad4e 0,#eb9316 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#e38d13}.btn-warning:hover,.btn-warning:focus{background-color:#eb9316;background-position:0 -15px}.btn-warning:active,.btn-warning.active{background-color:#eb9316;border-color:#e38d13}.btn-warning:disabled,.btn-warning[disabled]{background-color:#eb9316;background-image:none}.btn-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c12e2a 100%);background-image:-o-linear-gradient(top,#d9534f 0,#c12e2a 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9534f),to(#c12e2a));background-image:linear-gradient(to bottom,#d9534f 0,#c12e2a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#b92c28}.btn-danger:hover,.btn-danger:focus{background-color:#c12e2a;background-position:0 -15px}.btn-danger:active,.btn-danger.active{background-color:#c12e2a;border-color:#b92c28}.btn-danger:disabled,.btn-danger[disabled]{background-color:#c12e2a;background-image:none}.thumbnail,.img-thumbnail{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus{background-color:#e8e8e8;background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-o-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#e8e8e8));background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-repeat:repeat-x}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{background-color:#357ebd;background-image:-webkit-linear-gradient(top,#428bca 0,#357ebd 100%);background-image:-o-linear-gradient(top,#428bca 0,#357ebd 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#428bca),to(#357ebd));background-image:linear-gradient(to bottom,#428bca 0,#357ebd 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0);background-repeat:repeat-x}.navbar-default{background-image:-webkit-linear-gradient(top,#fff 0,#f8f8f8 100%);background-image:-o-linear-gradient(top,#fff 0,#f8f8f8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#f8f8f8));background-image:linear-gradient(to bottom,#fff 0,#f8f8f8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075)}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.active>a{background-image:-webkit-linear-gradient(top,#dbdbdb 0,#e2e2e2 100%);background-image:-o-linear-gradient(top,#dbdbdb 0,#e2e2e2 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dbdbdb),to(#e2e2e2));background-image:linear-gradient(to bottom,#dbdbdb 0,#e2e2e2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0);background-repeat:repeat-x;-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.075);box-shadow:inset 0 3px 9px rgba(0,0,0,.075)}.navbar-brand,.navbar-nav>li>a{text-shadow:0 1px 0 rgba(255,255,255,.25)}.navbar-inverse{background-image:-webkit-linear-gradient(top,#3c3c3c 0,#222 100%);background-image:-o-linear-gradient(top,#3c3c3c 0,#222 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#3c3c3c),to(#222));background-image:linear-gradient(to bottom,#3c3c3c 0,#222 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.active>a{background-image:-webkit-linear-gradient(top,#080808 0,#0f0f0f 100%);background-image:-o-linear-gradient(top,#080808 0,#0f0f0f 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#080808),to(#0f0f0f));background-image:linear-gradient(to bottom,#080808 0,#0f0f0f 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0);background-repeat:repeat-x;-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.25);box-shadow:inset 0 3px 9px rgba(0,0,0,.25)}.navbar-inverse .navbar-brand,.navbar-inverse .navbar-nav>li>a{text-shadow:0 -1px 0 rgba(0,0,0,.25)}.navbar-static-top,.navbar-fixed-top,.navbar-fixed-bottom{border-radius:0}.alert{text-shadow:0 1px 0 rgba(255,255,255,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05)}.alert-success{background-image:-webkit-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-o-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dff0d8),to(#c8e5bc));background-image:linear-gradient(to bottom,#dff0d8 0,#c8e5bc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);background-repeat:repeat-x;border-color:#b2dba1}.alert-info{background-image:-webkit-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:-o-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9edf7),to(#b9def0));background-image:linear-gradient(to bottom,#d9edf7 0,#b9def0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);background-repeat:repeat-x;border-color:#9acfea}.alert-warning{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#f8efc0 100%);background-image:-o-linear-gradient(top,#fcf8e3 0,#f8efc0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fcf8e3),to(#f8efc0));background-image:linear-gradient(to bottom,#fcf8e3 0,#f8efc0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);background-repeat:repeat-x;border-color:#f5e79e}.alert-danger{background-image:-webkit-linear-gradient(top,#f2dede 0,#e7c3c3 100%);background-image:-o-linear-gradient(top,#f2dede 0,#e7c3c3 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f2dede),to(#e7c3c3));background-image:linear-gradient(to bottom,#f2dede 0,#e7c3c3 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);background-repeat:repeat-x;border-color:#dca7a7}.progress{background-image:-webkit-linear-gradient(top,#ebebeb 0,#f5f5f5 100%);background-image:-o-linear-gradient(top,#ebebeb 0,#f5f5f5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#ebebeb),to(#f5f5f5));background-image:linear-gradient(to bottom,#ebebeb 0,#f5f5f5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);background-repeat:repeat-x}.progress-bar{background-image:-webkit-linear-gradient(top,#428bca 0,#3071a9 100%);background-image:-o-linear-gradient(top,#428bca 0,#3071a9 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#428bca),to(#3071a9));background-image:linear-gradient(to bottom,#428bca 0,#3071a9 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff3071a9', GradientType=0);background-repeat:repeat-x}.progress-bar-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#449d44 100%);background-image:-o-linear-gradient(top,#5cb85c 0,#449d44 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5cb85c),to(#449d44));background-image:linear-gradient(to bottom,#5cb85c 0,#449d44 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);background-repeat:repeat-x}.progress-bar-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:-o-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5bc0de),to(#31b0d5));background-image:linear-gradient(to bottom,#5bc0de 0,#31b0d5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);background-repeat:repeat-x}.progress-bar-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:-o-linear-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f0ad4e),to(#ec971f));background-image:linear-gradient(to bottom,#f0ad4e 0,#ec971f 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);background-repeat:repeat-x}.progress-bar-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:-o-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9534f),to(#c9302c));background-image:linear-gradient(to bottom,#d9534f 0,#c9302c 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);background-repeat:repeat-x}.progress-bar-striped{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.list-group{border-radius:4px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.list-group-item.active,.list-group-item.active:hover,.list-group-item.active:focus{text-shadow:0 -1px 0 #3071a9;background-image:-webkit-linear-gradient(top,#428bca 0,#3278b3 100%);background-image:-o-linear-gradient(top,#428bca 0,#3278b3 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#428bca),to(#3278b3));background-image:linear-gradient(to bottom,#428bca 0,#3278b3 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff3278b3', GradientType=0);background-repeat:repeat-x;border-color:#3278b3}.list-group-item.active .badge,.list-group-item.active:hover .badge,.list-group-item.active:focus .badge{text-shadow:none}.panel{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.05);box-shadow:0 1px 2px rgba(0,0,0,.05)}.panel-default>.panel-heading{background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-o-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#e8e8e8));background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-repeat:repeat-x}.panel-primary>.panel-heading{background-image:-webkit-linear-gradient(top,#428bca 0,#357ebd 100%);background-image:-o-linear-gradient(top,#428bca 0,#357ebd 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#428bca),to(#357ebd));background-image:linear-gradient(to bottom,#428bca 0,#357ebd 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0);background-repeat:repeat-x}.panel-success>.panel-heading{background-image:-webkit-linear-gradient(top,#dff0d8 0,#d0e9c6 100%);background-image:-o-linear-gradient(top,#dff0d8 0,#d0e9c6 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dff0d8),to(#d0e9c6));background-image:linear-gradient(to bottom,#dff0d8 0,#d0e9c6 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);background-repeat:repeat-x}.panel-info>.panel-heading{background-image:-webkit-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:-o-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9edf7),to(#c4e3f3));background-image:linear-gradient(to bottom,#d9edf7 0,#c4e3f3 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);background-repeat:repeat-x}.panel-warning>.panel-heading{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:-o-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fcf8e3),to(#faf2cc));background-image:linear-gradient(to bottom,#fcf8e3 0,#faf2cc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);background-repeat:repeat-x}.panel-danger>.panel-heading{background-image:-webkit-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:-o-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f2dede),to(#ebcccc));background-image:linear-gradient(to bottom,#f2dede 0,#ebcccc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);background-repeat:repeat-x}.well{background-image:-webkit-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:-o-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#e8e8e8),to(#f5f5f5));background-image:linear-gradient(to bottom,#e8e8e8 0,#f5f5f5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);background-repeat:repeat-x;border-color:#dcdcdc;-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1)} \ No newline at end of file diff --git a/源码/src/main/webapp/resource/boot/css/bootstrap.css b/源码/src/main/webapp/resource/boot/css/bootstrap.css new file mode 100644 index 0000000..4165d41 --- /dev/null +++ b/源码/src/main/webapp/resource/boot/css/bootstrap.css @@ -0,0 +1,6358 @@ +/*! + * Bootstrap v3.3.0 (http://getbootstrap.com) + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + */ + +/*! normalize.css v3.0.2 | MIT License | git.io/normalize */ +html { + font-family: sans-serif; + -webkit-text-size-adjust: 100%; + -ms-text-size-adjust: 100%; +} +body { + margin: 0; +} +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +main, +menu, +nav, +section, +summary { + display: block; +} +audio, +canvas, +progress, +video { + display: inline-block; + vertical-align: baseline; +} +audio:not([controls]) { + display: none; + height: 0; +} +[hidden], +template { + display: none; +} +a { + background-color: transparent; +} +a:active, +a:hover { + outline: 0; +} +abbr[title] { + border-bottom: 1px dotted; +} +b, +strong { + font-weight: bold; +} +dfn { + font-style: italic; +} +h1 { + margin: .67em 0; + font-size: 2em; +} +mark { + color: #000; + background: #ff0; +} +small { + font-size: 80%; +} +sub, +sup { + position: relative; + font-size: 75%; + line-height: 0; + vertical-align: baseline; +} +sup { + top: -.5em; +} +sub { + bottom: -.25em; +} +img { + border: 0; +} +svg:not(:root) { + overflow: hidden; +} +figure { + margin: 1em 40px; +} +hr { + height: 0; + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; +} +pre { + overflow: auto; +} +code, +kbd, +pre, +samp { + font-family: monospace, monospace; + font-size: 1em; +} +button, +input, +optgroup, +select, +textarea { + margin: 0; + font: inherit; + color: inherit; +} +button { + overflow: visible; +} +button, +select { + text-transform: none; +} +button, +html input[type="button"], +input[type="reset"], +input[type="submit"] { + -webkit-appearance: button; + cursor: pointer; +} +button[disabled], +html input[disabled] { + cursor: default; +} +button::-moz-focus-inner, +input::-moz-focus-inner { + padding: 0; + border: 0; +} +input { + line-height: normal; +} +input[type="checkbox"], +input[type="radio"] { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + padding: 0; +} +input[type="number"]::-webkit-inner-spin-button, +input[type="number"]::-webkit-outer-spin-button { + height: auto; +} +input[type="search"] { + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; + -webkit-appearance: textfield; +} +input[type="search"]::-webkit-search-cancel-button, +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} +fieldset { + padding: .35em .625em .75em; + margin: 0 2px; + border: 1px solid #c0c0c0; +} +legend { + padding: 0; + border: 0; +} +textarea { + overflow: auto; +} +optgroup { + font-weight: bold; +} +table { + border-spacing: 0; + border-collapse: collapse; +} +td, +th { + padding: 0; +} +/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */ +@media print { + *, + *:before, + *:after { + color: #000 !important; + text-shadow: none !important; + background: transparent !important; + -webkit-box-shadow: none !important; + box-shadow: none !important; + } + a, + a:visited { + text-decoration: underline; + } + a[href]:after { + content: " (" attr(href) ")"; + } + abbr[title]:after { + content: " (" attr(title) ")"; + } + a[href^="#"]:after, + a[href^="javascript:"]:after { + content: ""; + } + pre, + blockquote { + border: 1px solid #999; + + page-break-inside: avoid; + } + thead { + display: table-header-group; + } + tr, + img { + page-break-inside: avoid; + } + img { + max-width: 100% !important; + } + p, + h2, + h3 { + orphans: 3; + widows: 3; + } + h2, + h3 { + page-break-after: avoid; + } + select { + background: #fff !important; + } + .navbar { + display: none; + } + .btn > .caret, + .dropup > .btn > .caret { + border-top-color: #000 !important; + } + .label { + border: 1px solid #000; + } + .table { + border-collapse: collapse !important; + } + .table td, + .table th { + background-color: #fff !important; + } + .table-bordered th, + .table-bordered td { + border: 1px solid #ddd !important; + } +} +@font-face { + font-family: 'Glyphicons Halflings'; + + src: url('../fonts/glyphicons-halflings-regular.eot'); + src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg'); +} +.glyphicon { + position: relative; + top: 1px; + display: inline-block; + font-family: 'Glyphicons Halflings'; + font-style: normal; + font-weight: normal; + line-height: 1; + + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} +.glyphicon-asterisk:before { + content: "\2a"; +} +.glyphicon-plus:before { + content: "\2b"; +} +.glyphicon-euro:before, +.glyphicon-eur:before { + content: "\20ac"; +} +.glyphicon-minus:before { + content: "\2212"; +} +.glyphicon-cloud:before { + content: "\2601"; +} +.glyphicon-envelope:before { + content: "\2709"; +} +.glyphicon-pencil:before { + content: "\270f"; +} +.glyphicon-glass:before { + content: "\e001"; +} +.glyphicon-music:before { + content: "\e002"; +} +.glyphicon-search:before { + content: "\e003"; +} +.glyphicon-heart:before { + content: "\e005"; +} +.glyphicon-star:before { + content: "\e006"; +} +.glyphicon-star-empty:before { + content: "\e007"; +} +.glyphicon-user:before { + content: "\e008"; +} +.glyphicon-film:before { + content: "\e009"; +} +.glyphicon-th-large:before { + content: "\e010"; +} +.glyphicon-th:before { + content: "\e011"; +} +.glyphicon-th-list:before { + content: "\e012"; +} +.glyphicon-ok:before { + content: "\e013"; +} +.glyphicon-remove:before { + content: "\e014"; +} +.glyphicon-zoom-in:before { + content: "\e015"; +} +.glyphicon-zoom-out:before { + content: "\e016"; +} +.glyphicon-off:before { + content: "\e017"; +} +.glyphicon-signal:before { + content: "\e018"; +} +.glyphicon-cog:before { + content: "\e019"; +} +.glyphicon-trash:before { + content: "\e020"; +} +.glyphicon-home:before { + content: "\e021"; +} +.glyphicon-file:before { + content: "\e022"; +} +.glyphicon-time:before { + content: "\e023"; +} +.glyphicon-road:before { + content: "\e024"; +} +.glyphicon-download-alt:before { + content: "\e025"; +} +.glyphicon-download:before { + content: "\e026"; +} +.glyphicon-upload:before { + content: "\e027"; +} +.glyphicon-inbox:before { + content: "\e028"; +} +.glyphicon-play-circle:before { + content: "\e029"; +} +.glyphicon-repeat:before { + content: "\e030"; +} +.glyphicon-refresh:before { + content: "\e031"; +} +.glyphicon-list-alt:before { + content: "\e032"; +} +.glyphicon-lock:before { + content: "\e033"; +} +.glyphicon-flag:before { + content: "\e034"; +} +.glyphicon-headphones:before { + content: "\e035"; +} +.glyphicon-volume-off:before { + content: "\e036"; +} +.glyphicon-volume-down:before { + content: "\e037"; +} +.glyphicon-volume-up:before { + content: "\e038"; +} +.glyphicon-qrcode:before { + content: "\e039"; +} +.glyphicon-barcode:before { + content: "\e040"; +} +.glyphicon-tag:before { + content: "\e041"; +} +.glyphicon-tags:before { + content: "\e042"; +} +.glyphicon-book:before { + content: "\e043"; +} +.glyphicon-bookmark:before { + content: "\e044"; +} +.glyphicon-print:before { + content: "\e045"; +} +.glyphicon-camera:before { + content: "\e046"; +} +.glyphicon-font:before { + content: "\e047"; +} +.glyphicon-bold:before { + content: "\e048"; +} +.glyphicon-italic:before { + content: "\e049"; +} +.glyphicon-text-height:before { + content: "\e050"; +} +.glyphicon-text-width:before { + content: "\e051"; +} +.glyphicon-align-left:before { + content: "\e052"; +} +.glyphicon-align-center:before { + content: "\e053"; +} +.glyphicon-align-right:before { + content: "\e054"; +} +.glyphicon-align-justify:before { + content: "\e055"; +} +.glyphicon-list:before { + content: "\e056"; +} +.glyphicon-indent-left:before { + content: "\e057"; +} +.glyphicon-indent-right:before { + content: "\e058"; +} +.glyphicon-facetime-video:before { + content: "\e059"; +} +.glyphicon-picture:before { + content: "\e060"; +} +.glyphicon-map-marker:before { + content: "\e062"; +} +.glyphicon-adjust:before { + content: "\e063"; +} +.glyphicon-tint:before { + content: "\e064"; +} +.glyphicon-edit:before { + content: "\e065"; +} +.glyphicon-share:before { + content: "\e066"; +} +.glyphicon-check:before { + content: "\e067"; +} +.glyphicon-move:before { + content: "\e068"; +} +.glyphicon-step-backward:before { + content: "\e069"; +} +.glyphicon-fast-backward:before { + content: "\e070"; +} +.glyphicon-backward:before { + content: "\e071"; +} +.glyphicon-play:before { + content: "\e072"; +} +.glyphicon-pause:before { + content: "\e073"; +} +.glyphicon-stop:before { + content: "\e074"; +} +.glyphicon-forward:before { + content: "\e075"; +} +.glyphicon-fast-forward:before { + content: "\e076"; +} +.glyphicon-step-forward:before { + content: "\e077"; +} +.glyphicon-eject:before { + content: "\e078"; +} +.glyphicon-chevron-left:before { + content: "\e079"; +} +.glyphicon-chevron-right:before { + content: "\e080"; +} +.glyphicon-plus-sign:before { + content: "\e081"; +} +.glyphicon-minus-sign:before { + content: "\e082"; +} +.glyphicon-remove-sign:before { + content: "\e083"; +} +.glyphicon-ok-sign:before { + content: "\e084"; +} +.glyphicon-question-sign:before { + content: "\e085"; +} +.glyphicon-info-sign:before { + content: "\e086"; +} +.glyphicon-screenshot:before { + content: "\e087"; +} +.glyphicon-remove-circle:before { + content: "\e088"; +} +.glyphicon-ok-circle:before { + content: "\e089"; +} +.glyphicon-ban-circle:before { + content: "\e090"; +} +.glyphicon-arrow-left:before { + content: "\e091"; +} +.glyphicon-arrow-right:before { + content: "\e092"; +} +.glyphicon-arrow-up:before { + content: "\e093"; +} +.glyphicon-arrow-down:before { + content: "\e094"; +} +.glyphicon-share-alt:before { + content: "\e095"; +} +.glyphicon-resize-full:before { + content: "\e096"; +} +.glyphicon-resize-small:before { + content: "\e097"; +} +.glyphicon-exclamation-sign:before { + content: "\e101"; +} +.glyphicon-gift:before { + content: "\e102"; +} +.glyphicon-leaf:before { + content: "\e103"; +} +.glyphicon-fire:before { + content: "\e104"; +} +.glyphicon-eye-open:before { + content: "\e105"; +} +.glyphicon-eye-close:before { + content: "\e106"; +} +.glyphicon-warning-sign:before { + content: "\e107"; +} +.glyphicon-plane:before { + content: "\e108"; +} +.glyphicon-calendar:before { + content: "\e109"; +} +.glyphicon-random:before { + content: "\e110"; +} +.glyphicon-comment:before { + content: "\e111"; +} +.glyphicon-magnet:before { + content: "\e112"; +} +.glyphicon-chevron-up:before { + content: "\e113"; +} +.glyphicon-chevron-down:before { + content: "\e114"; +} +.glyphicon-retweet:before { + content: "\e115"; +} +.glyphicon-shopping-cart:before { + content: "\e116"; +} +.glyphicon-folder-close:before { + content: "\e117"; +} +.glyphicon-folder-open:before { + content: "\e118"; +} +.glyphicon-resize-vertical:before { + content: "\e119"; +} +.glyphicon-resize-horizontal:before { + content: "\e120"; +} +.glyphicon-hdd:before { + content: "\e121"; +} +.glyphicon-bullhorn:before { + content: "\e122"; +} +.glyphicon-bell:before { + content: "\e123"; +} +.glyphicon-certificate:before { + content: "\e124"; +} +.glyphicon-thumbs-up:before { + content: "\e125"; +} +.glyphicon-thumbs-down:before { + content: "\e126"; +} +.glyphicon-hand-right:before { + content: "\e127"; +} +.glyphicon-hand-left:before { + content: "\e128"; +} +.glyphicon-hand-up:before { + content: "\e129"; +} +.glyphicon-hand-down:before { + content: "\e130"; +} +.glyphicon-circle-arrow-right:before { + content: "\e131"; +} +.glyphicon-circle-arrow-left:before { + content: "\e132"; +} +.glyphicon-circle-arrow-up:before { + content: "\e133"; +} +.glyphicon-circle-arrow-down:before { + content: "\e134"; +} +.glyphicon-globe:before { + content: "\e135"; +} +.glyphicon-wrench:before { + content: "\e136"; +} +.glyphicon-tasks:before { + content: "\e137"; +} +.glyphicon-filter:before { + content: "\e138"; +} +.glyphicon-briefcase:before { + content: "\e139"; +} +.glyphicon-fullscreen:before { + content: "\e140"; +} +.glyphicon-dashboard:before { + content: "\e141"; +} +.glyphicon-paperclip:before { + content: "\e142"; +} +.glyphicon-heart-empty:before { + content: "\e143"; +} +.glyphicon-link:before { + content: "\e144"; +} +.glyphicon-phone:before { + content: "\e145"; +} +.glyphicon-pushpin:before { + content: "\e146"; +} +.glyphicon-usd:before { + content: "\e148"; +} +.glyphicon-gbp:before { + content: "\e149"; +} +.glyphicon-sort:before { + content: "\e150"; +} +.glyphicon-sort-by-alphabet:before { + content: "\e151"; +} +.glyphicon-sort-by-alphabet-alt:before { + content: "\e152"; +} +.glyphicon-sort-by-order:before { + content: "\e153"; +} +.glyphicon-sort-by-order-alt:before { + content: "\e154"; +} +.glyphicon-sort-by-attributes:before { + content: "\e155"; +} +.glyphicon-sort-by-attributes-alt:before { + content: "\e156"; +} +.glyphicon-unchecked:before { + content: "\e157"; +} +.glyphicon-expand:before { + content: "\e158"; +} +.glyphicon-collapse-down:before { + content: "\e159"; +} +.glyphicon-collapse-up:before { + content: "\e160"; +} +.glyphicon-log-in:before { + content: "\e161"; +} +.glyphicon-flash:before { + content: "\e162"; +} +.glyphicon-log-out:before { + content: "\e163"; +} +.glyphicon-new-window:before { + content: "\e164"; +} +.glyphicon-record:before { + content: "\e165"; +} +.glyphicon-save:before { + content: "\e166"; +} +.glyphicon-open:before { + content: "\e167"; +} +.glyphicon-saved:before { + content: "\e168"; +} +.glyphicon-import:before { + content: "\e169"; +} +.glyphicon-export:before { + content: "\e170"; +} +.glyphicon-send:before { + content: "\e171"; +} +.glyphicon-floppy-disk:before { + content: "\e172"; +} +.glyphicon-floppy-saved:before { + content: "\e173"; +} +.glyphicon-floppy-remove:before { + content: "\e174"; +} +.glyphicon-floppy-save:before { + content: "\e175"; +} +.glyphicon-floppy-open:before { + content: "\e176"; +} +.glyphicon-credit-card:before { + content: "\e177"; +} +.glyphicon-transfer:before { + content: "\e178"; +} +.glyphicon-cutlery:before { + content: "\e179"; +} +.glyphicon-header:before { + content: "\e180"; +} +.glyphicon-compressed:before { + content: "\e181"; +} +.glyphicon-earphone:before { + content: "\e182"; +} +.glyphicon-phone-alt:before { + content: "\e183"; +} +.glyphicon-tower:before { + content: "\e184"; +} +.glyphicon-stats:before { + content: "\e185"; +} +.glyphicon-sd-video:before { + content: "\e186"; +} +.glyphicon-hd-video:before { + content: "\e187"; +} +.glyphicon-subtitles:before { + content: "\e188"; +} +.glyphicon-sound-stereo:before { + content: "\e189"; +} +.glyphicon-sound-dolby:before { + content: "\e190"; +} +.glyphicon-sound-5-1:before { + content: "\e191"; +} +.glyphicon-sound-6-1:before { + content: "\e192"; +} +.glyphicon-sound-7-1:before { + content: "\e193"; +} +.glyphicon-copyright-mark:before { + content: "\e194"; +} +.glyphicon-registration-mark:before { + content: "\e195"; +} +.glyphicon-cloud-download:before { + content: "\e197"; +} +.glyphicon-cloud-upload:before { + content: "\e198"; +} +.glyphicon-tree-conifer:before { + content: "\e199"; +} +.glyphicon-tree-deciduous:before { + content: "\e200"; +} +* { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +*:before, +*:after { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +html { + font-size: 10px; + + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); +} +body { + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 14px; + line-height: 1.42857143; + color: #333; + background-color: #fff; +} +input, +button, +select, +textarea { + font-family: inherit; + font-size: inherit; + line-height: inherit; +} +a { + color: #428bca; + text-decoration: none; +} +a:hover, +a:focus { + color: #2a6496; + text-decoration: underline; +} +a:focus { + outline: thin dotted; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} +figure { + margin: 0; +} +img { + vertical-align: middle; +} +.img-responsive, +.thumbnail > img, +.thumbnail a > img, +.carousel-inner > .item > img, +.carousel-inner > .item > a > img { + display: block; + max-width: 100%; + height: auto; +} +.img-rounded { + border-radius: 6px; +} +.img-thumbnail { + display: inline-block; + max-width: 100%; + height: auto; + padding: 4px; + line-height: 1.42857143; + background-color: #fff; + border: 1px solid #ddd; + border-radius: 4px; + -webkit-transition: all .2s ease-in-out; + -o-transition: all .2s ease-in-out; + transition: all .2s ease-in-out; +} +.img-circle { + border-radius: 50%; +} +hr { + margin-top: 20px; + margin-bottom: 20px; + border: 0; + border-top: 1px solid #eee; +} +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + border: 0; +} +.sr-only-focusable:active, +.sr-only-focusable:focus { + position: static; + width: auto; + height: auto; + margin: 0; + overflow: visible; + clip: auto; +} +h1, +h2, +h3, +h4, +h5, +h6, +.h1, +.h2, +.h3, +.h4, +.h5, +.h6 { + font-family: inherit; + font-weight: 500; + line-height: 1.1; + color: inherit; +} +h1 small, +h2 small, +h3 small, +h4 small, +h5 small, +h6 small, +.h1 small, +.h2 small, +.h3 small, +.h4 small, +.h5 small, +.h6 small, +h1 .small, +h2 .small, +h3 .small, +h4 .small, +h5 .small, +h6 .small, +.h1 .small, +.h2 .small, +.h3 .small, +.h4 .small, +.h5 .small, +.h6 .small { + font-weight: normal; + line-height: 1; + color: #777; +} +h1, +.h1, +h2, +.h2, +h3, +.h3 { + margin-top: 20px; + margin-bottom: 10px; +} +h1 small, +.h1 small, +h2 small, +.h2 small, +h3 small, +.h3 small, +h1 .small, +.h1 .small, +h2 .small, +.h2 .small, +h3 .small, +.h3 .small { + font-size: 65%; +} +h4, +.h4, +h5, +.h5, +h6, +.h6 { + margin-top: 10px; + margin-bottom: 10px; +} +h4 small, +.h4 small, +h5 small, +.h5 small, +h6 small, +.h6 small, +h4 .small, +.h4 .small, +h5 .small, +.h5 .small, +h6 .small, +.h6 .small { + font-size: 75%; +} +h1, +.h1 { + font-size: 36px; +} +h2, +.h2 { + font-size: 30px; +} +h3, +.h3 { + font-size: 24px; +} +h4, +.h4 { + font-size: 18px; +} +h5, +.h5 { + font-size: 14px; +} +h6, +.h6 { + font-size: 12px; +} +p { + margin: 0 0 10px; +} +.lead { + margin-bottom: 20px; + font-size: 16px; + font-weight: 300; + line-height: 1.4; +} +@media (min-width: 768px) { + .lead { + font-size: 21px; + } +} +small, +.small { + font-size: 85%; +} +mark, +.mark { + padding: .2em; + background-color: #fcf8e3; +} +.text-left { + text-align: left; +} +.text-right { + text-align: right; +} +.text-center { + text-align: center; +} +.text-justify { + text-align: justify; +} +.text-nowrap { + white-space: nowrap; +} +.text-lowercase { + text-transform: lowercase; +} +.text-uppercase { + text-transform: uppercase; +} +.text-capitalize { + text-transform: capitalize; +} +.text-muted { + color: #777; +} +.text-primary { + color: #428bca; +} +a.text-primary:hover { + color: #3071a9; +} +.text-success { + color: #3c763d; +} +a.text-success:hover { + color: #2b542c; +} +.text-info { + color: #31708f; +} +a.text-info:hover { + color: #245269; +} +.text-warning { + color: #8a6d3b; +} +a.text-warning:hover { + color: #66512c; +} +.text-danger { + color: #a94442; +} +a.text-danger:hover { + color: #843534; +} +.bg-primary { + color: #fff; + background-color: #428bca; +} +a.bg-primary:hover { + background-color: #3071a9; +} +.bg-success { + background-color: #dff0d8; +} +a.bg-success:hover { + background-color: #c1e2b3; +} +.bg-info { + background-color: #d9edf7; +} +a.bg-info:hover { + background-color: #afd9ee; +} +.bg-warning { + background-color: #fcf8e3; +} +a.bg-warning:hover { + background-color: #f7ecb5; +} +.bg-danger { + background-color: #f2dede; +} +a.bg-danger:hover { + background-color: #e4b9b9; +} +.page-header { + padding-bottom: 9px; + margin: 40px 0 20px; + border-bottom: 1px solid #eee; +} +ul, +ol { + margin-top: 0; + margin-bottom: 10px; +} +ul ul, +ol ul, +ul ol, +ol ol { + margin-bottom: 0; +} +.list-unstyled { + padding-left: 0; + list-style: none; +} +.list-inline { + padding-left: 0; + margin-left: -5px; + list-style: none; +} +.list-inline > li { + display: inline-block; + padding-right: 5px; + padding-left: 5px; +} +dl { + margin-top: 0; + margin-bottom: 20px; +} +dt, +dd { + line-height: 1.42857143; +} +dt { + font-weight: bold; +} +dd { + margin-left: 0; +} +@media (min-width: 768px) { + .dl-horizontal dt { + float: left; + width: 160px; + overflow: hidden; + clear: left; + text-align: right; + text-overflow: ellipsis; + white-space: nowrap; + } + .dl-horizontal dd { + margin-left: 180px; + } +} +abbr[title], +abbr[data-original-title] { + cursor: help; + border-bottom: 1px dotted #777; +} +.initialism { + font-size: 90%; + text-transform: uppercase; +} +blockquote { + padding: 10px 20px; + margin: 0 0 20px; + font-size: 17.5px; + border-left: 5px solid #eee; +} +blockquote p:last-child, +blockquote ul:last-child, +blockquote ol:last-child { + margin-bottom: 0; +} +blockquote footer, +blockquote small, +blockquote .small { + display: block; + font-size: 80%; + line-height: 1.42857143; + color: #777; +} +blockquote footer:before, +blockquote small:before, +blockquote .small:before { + content: '\2014 \00A0'; +} +.blockquote-reverse, +blockquote.pull-right { + padding-right: 15px; + padding-left: 0; + text-align: right; + border-right: 5px solid #eee; + border-left: 0; +} +.blockquote-reverse footer:before, +blockquote.pull-right footer:before, +.blockquote-reverse small:before, +blockquote.pull-right small:before, +.blockquote-reverse .small:before, +blockquote.pull-right .small:before { + content: ''; +} +.blockquote-reverse footer:after, +blockquote.pull-right footer:after, +.blockquote-reverse small:after, +blockquote.pull-right small:after, +.blockquote-reverse .small:after, +blockquote.pull-right .small:after { + content: '\00A0 \2014'; +} +address { + margin-bottom: 20px; + font-style: normal; + line-height: 1.42857143; +} +code, +kbd, +pre, +samp { + font-family: Menlo, Monaco, Consolas, "Courier New", monospace; +} +code { + padding: 2px 4px; + font-size: 90%; + color: #c7254e; + background-color: #f9f2f4; + border-radius: 4px; +} +kbd { + padding: 2px 4px; + font-size: 90%; + color: #fff; + background-color: #333; + border-radius: 3px; + -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25); + box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25); +} +kbd kbd { + padding: 0; + font-size: 100%; + font-weight: bold; + -webkit-box-shadow: none; + box-shadow: none; +} +pre { + display: block; + padding: 9.5px; + margin: 0 0 10px; + font-size: 13px; + line-height: 1.42857143; + color: #333; + word-break: break-all; + word-wrap: break-word; + background-color: #f5f5f5; + border: 1px solid #ccc; + border-radius: 4px; +} +pre code { + padding: 0; + font-size: inherit; + color: inherit; + white-space: pre-wrap; + background-color: transparent; + border-radius: 0; +} +.pre-scrollable { + max-height: 340px; + overflow-y: scroll; +} +.container { + padding-right: 15px; + padding-left: 15px; + margin-right: auto; + margin-left: auto; +} +@media (min-width: 768px) { + .container { + width: 750px; + } +} +@media (min-width: 992px) { + .container { + width: 970px; + } +} +@media (min-width: 1200px) { + .container { + width: 1170px; + } +} +.container-fluid { + padding-right: 15px; + padding-left: 15px; + margin-right: auto; + margin-left: auto; +} +.row { + margin-right: -15px; + margin-left: -15px; +} +.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 { + position: relative; + min-height: 1px; + padding-right: 15px; + padding-left: 15px; +} +.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 { + float: left; +} +.col-xs-12 { + width: 100%; +} +.col-xs-11 { + width: 91.66666667%; +} +.col-xs-10 { + width: 83.33333333%; +} +.col-xs-9 { + width: 75%; +} +.col-xs-8 { + width: 66.66666667%; +} +.col-xs-7 { + width: 58.33333333%; +} +.col-xs-6 { + width: 50%; +} +.col-xs-5 { + width: 41.66666667%; +} +.col-xs-4 { + width: 33.33333333%; +} +.col-xs-3 { + width: 25%; +} +.col-xs-2 { + width: 16.66666667%; +} +.col-xs-1 { + width: 8.33333333%; +} +.col-xs-pull-12 { + right: 100%; +} +.col-xs-pull-11 { + right: 91.66666667%; +} +.col-xs-pull-10 { + right: 83.33333333%; +} +.col-xs-pull-9 { + right: 75%; +} +.col-xs-pull-8 { + right: 66.66666667%; +} +.col-xs-pull-7 { + right: 58.33333333%; +} +.col-xs-pull-6 { + right: 50%; +} +.col-xs-pull-5 { + right: 41.66666667%; +} +.col-xs-pull-4 { + right: 33.33333333%; +} +.col-xs-pull-3 { + right: 25%; +} +.col-xs-pull-2 { + right: 16.66666667%; +} +.col-xs-pull-1 { + right: 8.33333333%; +} +.col-xs-pull-0 { + right: auto; +} +.col-xs-push-12 { + left: 100%; +} +.col-xs-push-11 { + left: 91.66666667%; +} +.col-xs-push-10 { + left: 83.33333333%; +} +.col-xs-push-9 { + left: 75%; +} +.col-xs-push-8 { + left: 66.66666667%; +} +.col-xs-push-7 { + left: 58.33333333%; +} +.col-xs-push-6 { + left: 50%; +} +.col-xs-push-5 { + left: 41.66666667%; +} +.col-xs-push-4 { + left: 33.33333333%; +} +.col-xs-push-3 { + left: 25%; +} +.col-xs-push-2 { + left: 16.66666667%; +} +.col-xs-push-1 { + left: 8.33333333%; +} +.col-xs-push-0 { + left: auto; +} +.col-xs-offset-12 { + margin-left: 100%; +} +.col-xs-offset-11 { + margin-left: 91.66666667%; +} +.col-xs-offset-10 { + margin-left: 83.33333333%; +} +.col-xs-offset-9 { + margin-left: 75%; +} +.col-xs-offset-8 { + margin-left: 66.66666667%; +} +.col-xs-offset-7 { + margin-left: 58.33333333%; +} +.col-xs-offset-6 { + margin-left: 50%; +} +.col-xs-offset-5 { + margin-left: 41.66666667%; +} +.col-xs-offset-4 { + margin-left: 33.33333333%; +} +.col-xs-offset-3 { + margin-left: 25%; +} +.col-xs-offset-2 { + margin-left: 16.66666667%; +} +.col-xs-offset-1 { + margin-left: 8.33333333%; +} +.col-xs-offset-0 { + margin-left: 0; +} +@media (min-width: 768px) { + .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 { + float: left; + } + .col-sm-12 { + width: 100%; + } + .col-sm-11 { + width: 91.66666667%; + } + .col-sm-10 { + width: 83.33333333%; + } + .col-sm-9 { + width: 75%; + } + .col-sm-8 { + width: 66.66666667%; + } + .col-sm-7 { + width: 58.33333333%; + } + .col-sm-6 { + width: 50%; + } + .col-sm-5 { + width: 41.66666667%; + } + .col-sm-4 { + width: 33.33333333%; + } + .col-sm-3 { + width: 25%; + } + .col-sm-2 { + width: 16.66666667%; + } + .col-sm-1 { + width: 8.33333333%; + } + .col-sm-pull-12 { + right: 100%; + } + .col-sm-pull-11 { + right: 91.66666667%; + } + .col-sm-pull-10 { + right: 83.33333333%; + } + .col-sm-pull-9 { + right: 75%; + } + .col-sm-pull-8 { + right: 66.66666667%; + } + .col-sm-pull-7 { + right: 58.33333333%; + } + .col-sm-pull-6 { + right: 50%; + } + .col-sm-pull-5 { + right: 41.66666667%; + } + .col-sm-pull-4 { + right: 33.33333333%; + } + .col-sm-pull-3 { + right: 25%; + } + .col-sm-pull-2 { + right: 16.66666667%; + } + .col-sm-pull-1 { + right: 8.33333333%; + } + .col-sm-pull-0 { + right: auto; + } + .col-sm-push-12 { + left: 100%; + } + .col-sm-push-11 { + left: 91.66666667%; + } + .col-sm-push-10 { + left: 83.33333333%; + } + .col-sm-push-9 { + left: 75%; + } + .col-sm-push-8 { + left: 66.66666667%; + } + .col-sm-push-7 { + left: 58.33333333%; + } + .col-sm-push-6 { + left: 50%; + } + .col-sm-push-5 { + left: 41.66666667%; + } + .col-sm-push-4 { + left: 33.33333333%; + } + .col-sm-push-3 { + left: 25%; + } + .col-sm-push-2 { + left: 16.66666667%; + } + .col-sm-push-1 { + left: 8.33333333%; + } + .col-sm-push-0 { + left: auto; + } + .col-sm-offset-12 { + margin-left: 100%; + } + .col-sm-offset-11 { + margin-left: 91.66666667%; + } + .col-sm-offset-10 { + margin-left: 83.33333333%; + } + .col-sm-offset-9 { + margin-left: 75%; + } + .col-sm-offset-8 { + margin-left: 66.66666667%; + } + .col-sm-offset-7 { + margin-left: 58.33333333%; + } + .col-sm-offset-6 { + margin-left: 50%; + } + .col-sm-offset-5 { + margin-left: 41.66666667%; + } + .col-sm-offset-4 { + margin-left: 33.33333333%; + } + .col-sm-offset-3 { + margin-left: 25%; + } + .col-sm-offset-2 { + margin-left: 16.66666667%; + } + .col-sm-offset-1 { + margin-left: 8.33333333%; + } + .col-sm-offset-0 { + margin-left: 0; + } +} +@media (min-width: 992px) { + .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 { + float: left; + } + .col-md-12 { + width: 100%; + } + .col-md-11 { + width: 91.66666667%; + } + .col-md-10 { + width: 83.33333333%; + } + .col-md-9 { + width: 75%; + } + .col-md-8 { + width: 66.66666667%; + } + .col-md-7 { + width: 58.33333333%; + } + .col-md-6 { + width: 50%; + } + .col-md-5 { + width: 41.66666667%; + } + .col-md-4 { + width: 33.33333333%; + } + .col-md-3 { + width: 25%; + } + .col-md-2 { + width: 16.66666667%; + } + .col-md-1 { + width: 8.33333333%; + } + .col-md-pull-12 { + right: 100%; + } + .col-md-pull-11 { + right: 91.66666667%; + } + .col-md-pull-10 { + right: 83.33333333%; + } + .col-md-pull-9 { + right: 75%; + } + .col-md-pull-8 { + right: 66.66666667%; + } + .col-md-pull-7 { + right: 58.33333333%; + } + .col-md-pull-6 { + right: 50%; + } + .col-md-pull-5 { + right: 41.66666667%; + } + .col-md-pull-4 { + right: 33.33333333%; + } + .col-md-pull-3 { + right: 25%; + } + .col-md-pull-2 { + right: 16.66666667%; + } + .col-md-pull-1 { + right: 8.33333333%; + } + .col-md-pull-0 { + right: auto; + } + .col-md-push-12 { + left: 100%; + } + .col-md-push-11 { + left: 91.66666667%; + } + .col-md-push-10 { + left: 83.33333333%; + } + .col-md-push-9 { + left: 75%; + } + .col-md-push-8 { + left: 66.66666667%; + } + .col-md-push-7 { + left: 58.33333333%; + } + .col-md-push-6 { + left: 50%; + } + .col-md-push-5 { + left: 41.66666667%; + } + .col-md-push-4 { + left: 33.33333333%; + } + .col-md-push-3 { + left: 25%; + } + .col-md-push-2 { + left: 16.66666667%; + } + .col-md-push-1 { + left: 8.33333333%; + } + .col-md-push-0 { + left: auto; + } + .col-md-offset-12 { + margin-left: 100%; + } + .col-md-offset-11 { + margin-left: 91.66666667%; + } + .col-md-offset-10 { + margin-left: 83.33333333%; + } + .col-md-offset-9 { + margin-left: 75%; + } + .col-md-offset-8 { + margin-left: 66.66666667%; + } + .col-md-offset-7 { + margin-left: 58.33333333%; + } + .col-md-offset-6 { + margin-left: 50%; + } + .col-md-offset-5 { + margin-left: 41.66666667%; + } + .col-md-offset-4 { + margin-left: 33.33333333%; + } + .col-md-offset-3 { + margin-left: 25%; + } + .col-md-offset-2 { + margin-left: 16.66666667%; + } + .col-md-offset-1 { + margin-left: 8.33333333%; + } + .col-md-offset-0 { + margin-left: 0; + } +} +@media (min-width: 1200px) { + .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 { + float: left; + } + .col-lg-12 { + width: 100%; + } + .col-lg-11 { + width: 91.66666667%; + } + .col-lg-10 { + width: 83.33333333%; + } + .col-lg-9 { + width: 75%; + } + .col-lg-8 { + width: 66.66666667%; + } + .col-lg-7 { + width: 58.33333333%; + } + .col-lg-6 { + width: 50%; + } + .col-lg-5 { + width: 41.66666667%; + } + .col-lg-4 { + width: 33.33333333%; + } + .col-lg-3 { + width: 25%; + } + .col-lg-2 { + width: 16.66666667%; + } + .col-lg-1 { + width: 8.33333333%; + } + .col-lg-pull-12 { + right: 100%; + } + .col-lg-pull-11 { + right: 91.66666667%; + } + .col-lg-pull-10 { + right: 83.33333333%; + } + .col-lg-pull-9 { + right: 75%; + } + .col-lg-pull-8 { + right: 66.66666667%; + } + .col-lg-pull-7 { + right: 58.33333333%; + } + .col-lg-pull-6 { + right: 50%; + } + .col-lg-pull-5 { + right: 41.66666667%; + } + .col-lg-pull-4 { + right: 33.33333333%; + } + .col-lg-pull-3 { + right: 25%; + } + .col-lg-pull-2 { + right: 16.66666667%; + } + .col-lg-pull-1 { + right: 8.33333333%; + } + .col-lg-pull-0 { + right: auto; + } + .col-lg-push-12 { + left: 100%; + } + .col-lg-push-11 { + left: 91.66666667%; + } + .col-lg-push-10 { + left: 83.33333333%; + } + .col-lg-push-9 { + left: 75%; + } + .col-lg-push-8 { + left: 66.66666667%; + } + .col-lg-push-7 { + left: 58.33333333%; + } + .col-lg-push-6 { + left: 50%; + } + .col-lg-push-5 { + left: 41.66666667%; + } + .col-lg-push-4 { + left: 33.33333333%; + } + .col-lg-push-3 { + left: 25%; + } + .col-lg-push-2 { + left: 16.66666667%; + } + .col-lg-push-1 { + left: 8.33333333%; + } + .col-lg-push-0 { + left: auto; + } + .col-lg-offset-12 { + margin-left: 100%; + } + .col-lg-offset-11 { + margin-left: 91.66666667%; + } + .col-lg-offset-10 { + margin-left: 83.33333333%; + } + .col-lg-offset-9 { + margin-left: 75%; + } + .col-lg-offset-8 { + margin-left: 66.66666667%; + } + .col-lg-offset-7 { + margin-left: 58.33333333%; + } + .col-lg-offset-6 { + margin-left: 50%; + } + .col-lg-offset-5 { + margin-left: 41.66666667%; + } + .col-lg-offset-4 { + margin-left: 33.33333333%; + } + .col-lg-offset-3 { + margin-left: 25%; + } + .col-lg-offset-2 { + margin-left: 16.66666667%; + } + .col-lg-offset-1 { + margin-left: 8.33333333%; + } + .col-lg-offset-0 { + margin-left: 0; + } +} +table { + background-color: transparent; +} +caption { + padding-top: 8px; + padding-bottom: 8px; + color: #777; + text-align: left; +} +th { + text-align: left; +} +.table { + width: 100%; + max-width: 100%; + margin-bottom: 20px; +} +.table > thead > tr > th, +.table > tbody > tr > th, +.table > tfoot > tr > th, +.table > thead > tr > td, +.table > tbody > tr > td, +.table > tfoot > tr > td { + padding: 8px; + line-height: 1.42857143; + vertical-align: top; + border-top: 1px solid #ddd; +} +.table > thead > tr > th { + vertical-align: bottom; + border-bottom: 2px solid #ddd; +} +.table > caption + thead > tr:first-child > th, +.table > colgroup + thead > tr:first-child > th, +.table > thead:first-child > tr:first-child > th, +.table > caption + thead > tr:first-child > td, +.table > colgroup + thead > tr:first-child > td, +.table > thead:first-child > tr:first-child > td { + border-top: 0; +} +.table > tbody + tbody { + border-top: 2px solid #ddd; +} +.table .table { + background-color: #fff; +} +.table-condensed > thead > tr > th, +.table-condensed > tbody > tr > th, +.table-condensed > tfoot > tr > th, +.table-condensed > thead > tr > td, +.table-condensed > tbody > tr > td, +.table-condensed > tfoot > tr > td { + padding: 5px; +} +.table-bordered { + border: 1px solid #ddd; +} +.table-bordered > thead > tr > th, +.table-bordered > tbody > tr > th, +.table-bordered > tfoot > tr > th, +.table-bordered > thead > tr > td, +.table-bordered > tbody > tr > td, +.table-bordered > tfoot > tr > td { + border: 1px solid #ddd; +} +.table-bordered > thead > tr > th, +.table-bordered > thead > tr > td { + border-bottom-width: 2px; +} +.table-striped > tbody > tr:nth-child(odd) { + background-color: #f9f9f9; +} +.table-hover > tbody > tr:hover { + background-color: #f5f5f5; +} +table col[class*="col-"] { + position: static; + display: table-column; + float: none; +} +table td[class*="col-"], +table th[class*="col-"] { + position: static; + display: table-cell; + float: none; +} +.table > thead > tr > td.active, +.table > tbody > tr > td.active, +.table > tfoot > tr > td.active, +.table > thead > tr > th.active, +.table > tbody > tr > th.active, +.table > tfoot > tr > th.active, +.table > thead > tr.active > td, +.table > tbody > tr.active > td, +.table > tfoot > tr.active > td, +.table > thead > tr.active > th, +.table > tbody > tr.active > th, +.table > tfoot > tr.active > th { + background-color: #f5f5f5; +} +.table-hover > tbody > tr > td.active:hover, +.table-hover > tbody > tr > th.active:hover, +.table-hover > tbody > tr.active:hover > td, +.table-hover > tbody > tr:hover > .active, +.table-hover > tbody > tr.active:hover > th { + background-color: #e8e8e8; +} +.table > thead > tr > td.success, +.table > tbody > tr > td.success, +.table > tfoot > tr > td.success, +.table > thead > tr > th.success, +.table > tbody > tr > th.success, +.table > tfoot > tr > th.success, +.table > thead > tr.success > td, +.table > tbody > tr.success > td, +.table > tfoot > tr.success > td, +.table > thead > tr.success > th, +.table > tbody > tr.success > th, +.table > tfoot > tr.success > th { + background-color: #dff0d8; +} +.table-hover > tbody > tr > td.success:hover, +.table-hover > tbody > tr > th.success:hover, +.table-hover > tbody > tr.success:hover > td, +.table-hover > tbody > tr:hover > .success, +.table-hover > tbody > tr.success:hover > th { + background-color: #d0e9c6; +} +.table > thead > tr > td.info, +.table > tbody > tr > td.info, +.table > tfoot > tr > td.info, +.table > thead > tr > th.info, +.table > tbody > tr > th.info, +.table > tfoot > tr > th.info, +.table > thead > tr.info > td, +.table > tbody > tr.info > td, +.table > tfoot > tr.info > td, +.table > thead > tr.info > th, +.table > tbody > tr.info > th, +.table > tfoot > tr.info > th { + background-color: #d9edf7; +} +.table-hover > tbody > tr > td.info:hover, +.table-hover > tbody > tr > th.info:hover, +.table-hover > tbody > tr.info:hover > td, +.table-hover > tbody > tr:hover > .info, +.table-hover > tbody > tr.info:hover > th { + background-color: #c4e3f3; +} +.table > thead > tr > td.warning, +.table > tbody > tr > td.warning, +.table > tfoot > tr > td.warning, +.table > thead > tr > th.warning, +.table > tbody > tr > th.warning, +.table > tfoot > tr > th.warning, +.table > thead > tr.warning > td, +.table > tbody > tr.warning > td, +.table > tfoot > tr.warning > td, +.table > thead > tr.warning > th, +.table > tbody > tr.warning > th, +.table > tfoot > tr.warning > th { + background-color: #fcf8e3; +} +.table-hover > tbody > tr > td.warning:hover, +.table-hover > tbody > tr > th.warning:hover, +.table-hover > tbody > tr.warning:hover > td, +.table-hover > tbody > tr:hover > .warning, +.table-hover > tbody > tr.warning:hover > th { + background-color: #faf2cc; +} +.table > thead > tr > td.danger, +.table > tbody > tr > td.danger, +.table > tfoot > tr > td.danger, +.table > thead > tr > th.danger, +.table > tbody > tr > th.danger, +.table > tfoot > tr > th.danger, +.table > thead > tr.danger > td, +.table > tbody > tr.danger > td, +.table > tfoot > tr.danger > td, +.table > thead > tr.danger > th, +.table > tbody > tr.danger > th, +.table > tfoot > tr.danger > th { + background-color: #f2dede; +} +.table-hover > tbody > tr > td.danger:hover, +.table-hover > tbody > tr > th.danger:hover, +.table-hover > tbody > tr.danger:hover > td, +.table-hover > tbody > tr:hover > .danger, +.table-hover > tbody > tr.danger:hover > th { + background-color: #ebcccc; +} +.table-responsive { + min-height: .01%; + overflow-x: auto; +} +@media screen and (max-width: 767px) { + .table-responsive { + width: 100%; + margin-bottom: 15px; + overflow-y: hidden; + -ms-overflow-style: -ms-autohiding-scrollbar; + border: 1px solid #ddd; + } + .table-responsive > .table { + margin-bottom: 0; + } + .table-responsive > .table > thead > tr > th, + .table-responsive > .table > tbody > tr > th, + .table-responsive > .table > tfoot > tr > th, + .table-responsive > .table > thead > tr > td, + .table-responsive > .table > tbody > tr > td, + .table-responsive > .table > tfoot > tr > td { + white-space: nowrap; + } + .table-responsive > .table-bordered { + border: 0; + } + .table-responsive > .table-bordered > thead > tr > th:first-child, + .table-responsive > .table-bordered > tbody > tr > th:first-child, + .table-responsive > .table-bordered > tfoot > tr > th:first-child, + .table-responsive > .table-bordered > thead > tr > td:first-child, + .table-responsive > .table-bordered > tbody > tr > td:first-child, + .table-responsive > .table-bordered > tfoot > tr > td:first-child { + border-left: 0; + } + .table-responsive > .table-bordered > thead > tr > th:last-child, + .table-responsive > .table-bordered > tbody > tr > th:last-child, + .table-responsive > .table-bordered > tfoot > tr > th:last-child, + .table-responsive > .table-bordered > thead > tr > td:last-child, + .table-responsive > .table-bordered > tbody > tr > td:last-child, + .table-responsive > .table-bordered > tfoot > tr > td:last-child { + border-right: 0; + } + .table-responsive > .table-bordered > tbody > tr:last-child > th, + .table-responsive > .table-bordered > tfoot > tr:last-child > th, + .table-responsive > .table-bordered > tbody > tr:last-child > td, + .table-responsive > .table-bordered > tfoot > tr:last-child > td { + border-bottom: 0; + } +} +fieldset { + min-width: 0; + padding: 0; + margin: 0; + border: 0; +} +legend { + display: block; + width: 100%; + padding: 0; + margin-bottom: 20px; + font-size: 21px; + line-height: inherit; + color: #333; + border: 0; + border-bottom: 1px solid #e5e5e5; +} +label { + display: inline-block; + max-width: 100%; + margin-bottom: 5px; + font-weight: bold; +} +input[type="search"] { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +input[type="radio"], +input[type="checkbox"] { + margin: 4px 0 0; + margin-top: 1px \9; + line-height: normal; +} +input[type="file"] { + display: block; +} +input[type="range"] { + display: block; + width: 100%; +} +select[multiple], +select[size] { + height: auto; +} +input[type="file"]:focus, +input[type="radio"]:focus, +input[type="checkbox"]:focus { + outline: thin dotted; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} +output { + display: block; + padding-top: 7px; + font-size: 14px; + line-height: 1.42857143; + color: #555; +} +.form-control { + display: block; + width: 100%; + height: 34px; + padding: 6px 12px; + font-size: 14px; + line-height: 1.42857143; + color: #555; + background-color: #fff; + background-image: none; + border: 1px solid #ccc; + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); + -webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s; + -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; + transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; +} +.form-control:focus { + border-color: #66afe9; + outline: 0; + -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6); + box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6); +} +.form-control::-moz-placeholder { + color: #999; + opacity: 1; +} +.form-control:-ms-input-placeholder { + color: #999; +} +.form-control::-webkit-input-placeholder { + color: #999; +} +.form-control[disabled], +.form-control[readonly], +fieldset[disabled] .form-control { + cursor: not-allowed; + background-color: #eee; + opacity: 1; +} +textarea.form-control { + height: auto; +} +input[type="search"] { + -webkit-appearance: none; +} +input[type="date"], +input[type="time"], +input[type="datetime-local"], +input[type="month"] { + line-height: 34px; + line-height: 1.42857143 \0; +} +input[type="date"].input-sm, +input[type="time"].input-sm, +input[type="datetime-local"].input-sm, +input[type="month"].input-sm { + line-height: 30px; + line-height: 1.5 \0; +} +input[type="date"].input-lg, +input[type="time"].input-lg, +input[type="datetime-local"].input-lg, +input[type="month"].input-lg { + line-height: 46px; + line-height: 1.33 \0; +} +_:-ms-fullscreen, +:root input[type="date"], +_:-ms-fullscreen, +:root input[type="time"], +_:-ms-fullscreen, +:root input[type="datetime-local"], +_:-ms-fullscreen, +:root input[type="month"] { + line-height: 1.42857143; +} +_:-ms-fullscreen.input-sm, +:root input[type="date"].input-sm, +_:-ms-fullscreen.input-sm, +:root input[type="time"].input-sm, +_:-ms-fullscreen.input-sm, +:root input[type="datetime-local"].input-sm, +_:-ms-fullscreen.input-sm, +:root input[type="month"].input-sm { + line-height: 1.5; +} +_:-ms-fullscreen.input-lg, +:root input[type="date"].input-lg, +_:-ms-fullscreen.input-lg, +:root input[type="time"].input-lg, +_:-ms-fullscreen.input-lg, +:root input[type="datetime-local"].input-lg, +_:-ms-fullscreen.input-lg, +:root input[type="month"].input-lg { + line-height: 1.33; +} +.form-group { + margin-bottom: 15px; +} +.radio, +.checkbox { + position: relative; + display: block; + margin-top: 10px; + margin-bottom: 10px; +} +.radio label, +.checkbox label { + min-height: 20px; + padding-left: 20px; + margin-bottom: 0; + font-weight: normal; + cursor: pointer; +} +.radio input[type="radio"], +.radio-inline input[type="radio"], +.checkbox input[type="checkbox"], +.checkbox-inline input[type="checkbox"] { + position: absolute; + margin-top: 4px \9; + margin-left: -20px; +} +.radio + .radio, +.checkbox + .checkbox { + margin-top: -5px; +} +.radio-inline, +.checkbox-inline { + display: inline-block; + padding-left: 20px; + margin-bottom: 0; + font-weight: normal; + vertical-align: middle; + cursor: pointer; +} +.radio-inline + .radio-inline, +.checkbox-inline + .checkbox-inline { + margin-top: 0; + margin-left: 10px; +} +input[type="radio"][disabled], +input[type="checkbox"][disabled], +input[type="radio"].disabled, +input[type="checkbox"].disabled, +fieldset[disabled] input[type="radio"], +fieldset[disabled] input[type="checkbox"] { + cursor: not-allowed; +} +.radio-inline.disabled, +.checkbox-inline.disabled, +fieldset[disabled] .radio-inline, +fieldset[disabled] .checkbox-inline { + cursor: not-allowed; +} +.radio.disabled label, +.checkbox.disabled label, +fieldset[disabled] .radio label, +fieldset[disabled] .checkbox label { + cursor: not-allowed; +} +.form-control-static { + padding-top: 7px; + padding-bottom: 7px; + margin-bottom: 0; +} +.form-control-static.input-lg, +.form-control-static.input-sm { + padding-right: 0; + padding-left: 0; +} +.input-sm, +.form-group-sm .form-control { + height: 30px; + padding: 5px 10px; + font-size: 12px; + line-height: 1.5; + border-radius: 3px; +} +select.input-sm, +select.form-group-sm .form-control { + height: 30px; + line-height: 30px; +} +textarea.input-sm, +textarea.form-group-sm .form-control, +select[multiple].input-sm, +select[multiple].form-group-sm .form-control { + height: auto; +} +.input-lg, +.form-group-lg .form-control { + height: 46px; + padding: 10px 16px; + font-size: 18px; + line-height: 1.33; + border-radius: 6px; +} +select.input-lg, +select.form-group-lg .form-control { + height: 46px; + line-height: 46px; +} +textarea.input-lg, +textarea.form-group-lg .form-control, +select[multiple].input-lg, +select[multiple].form-group-lg .form-control { + height: auto; +} +.has-feedback { + position: relative; +} +.has-feedback .form-control { + padding-right: 42.5px; +} +.form-control-feedback { + position: absolute; + top: 0; + right: 0; + z-index: 2; + display: block; + width: 34px; + height: 34px; + line-height: 34px; + text-align: center; + pointer-events: none; +} +.input-lg + .form-control-feedback { + width: 46px; + height: 46px; + line-height: 46px; +} +.input-sm + .form-control-feedback { + width: 30px; + height: 30px; + line-height: 30px; +} +.has-success .help-block, +.has-success .control-label, +.has-success .radio, +.has-success .checkbox, +.has-success .radio-inline, +.has-success .checkbox-inline, +.has-success.radio label, +.has-success.checkbox label, +.has-success.radio-inline label, +.has-success.checkbox-inline label { + color: #3c763d; +} +.has-success .form-control { + border-color: #3c763d; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); +} +.has-success .form-control:focus { + border-color: #2b542c; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168; +} +.has-success .input-group-addon { + color: #3c763d; + background-color: #dff0d8; + border-color: #3c763d; +} +.has-success .form-control-feedback { + color: #3c763d; +} +.has-warning .help-block, +.has-warning .control-label, +.has-warning .radio, +.has-warning .checkbox, +.has-warning .radio-inline, +.has-warning .checkbox-inline, +.has-warning.radio label, +.has-warning.checkbox label, +.has-warning.radio-inline label, +.has-warning.checkbox-inline label { + color: #8a6d3b; +} +.has-warning .form-control { + border-color: #8a6d3b; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); +} +.has-warning .form-control:focus { + border-color: #66512c; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b; +} +.has-warning .input-group-addon { + color: #8a6d3b; + background-color: #fcf8e3; + border-color: #8a6d3b; +} +.has-warning .form-control-feedback { + color: #8a6d3b; +} +.has-error .help-block, +.has-error .control-label, +.has-error .radio, +.has-error .checkbox, +.has-error .radio-inline, +.has-error .checkbox-inline, +.has-error.radio label, +.has-error.checkbox label, +.has-error.radio-inline label, +.has-error.checkbox-inline label { + color: #a94442; +} +.has-error .form-control { + border-color: #a94442; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); +} +.has-error .form-control:focus { + border-color: #843534; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483; +} +.has-error .input-group-addon { + color: #a94442; + background-color: #f2dede; + border-color: #a94442; +} +.has-error .form-control-feedback { + color: #a94442; +} +.has-feedback label ~ .form-control-feedback { + top: 25px; +} +.has-feedback label.sr-only ~ .form-control-feedback { + top: 0; +} +.help-block { + display: block; + margin-top: 5px; + margin-bottom: 10px; + color: #737373; +} +@media (min-width: 768px) { + .form-inline .form-group { + display: inline-block; + margin-bottom: 0; + vertical-align: middle; + } + .form-inline .form-control { + display: inline-block; + width: auto; + vertical-align: middle; + } + .form-inline .form-control-static { + display: inline-block; + } + .form-inline .input-group { + display: inline-table; + vertical-align: middle; + } + .form-inline .input-group .input-group-addon, + .form-inline .input-group .input-group-btn, + .form-inline .input-group .form-control { + width: auto; + } + .form-inline .input-group > .form-control { + width: 100%; + } + .form-inline .control-label { + margin-bottom: 0; + vertical-align: middle; + } + .form-inline .radio, + .form-inline .checkbox { + display: inline-block; + margin-top: 0; + margin-bottom: 0; + vertical-align: middle; + } + .form-inline .radio label, + .form-inline .checkbox label { + padding-left: 0; + } + .form-inline .radio input[type="radio"], + .form-inline .checkbox input[type="checkbox"] { + position: relative; + margin-left: 0; + } + .form-inline .has-feedback .form-control-feedback { + top: 0; + } +} +.form-horizontal .radio, +.form-horizontal .checkbox, +.form-horizontal .radio-inline, +.form-horizontal .checkbox-inline { + padding-top: 7px; + margin-top: 0; + margin-bottom: 0; +} +.form-horizontal .radio, +.form-horizontal .checkbox { + min-height: 27px; +} +.form-horizontal .form-group { + margin-right: -15px; + margin-left: -15px; +} +@media (min-width: 768px) { + .form-horizontal .control-label { + padding-top: 7px; + margin-bottom: 0; + text-align: right; + } +} +.form-horizontal .has-feedback .form-control-feedback { + right: 15px; +} +@media (min-width: 768px) { + .form-horizontal .form-group-lg .control-label { + padding-top: 14.3px; + } +} +@media (min-width: 768px) { + .form-horizontal .form-group-sm .control-label { + padding-top: 6px; + } +} +.btn { + display: inline-block; + padding: 6px 12px; + margin-bottom: 0; + font-size: 14px; + font-weight: normal; + line-height: 1.42857143; + text-align: center; + white-space: nowrap; + vertical-align: middle; + -ms-touch-action: manipulation; + touch-action: manipulation; + cursor: pointer; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + background-image: none; + border: 1px solid transparent; + border-radius: 4px; +} +.btn:focus, +.btn:active:focus, +.btn.active:focus, +.btn.focus, +.btn:active.focus, +.btn.active.focus { + outline: thin dotted; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} +.btn:hover, +.btn:focus, +.btn.focus { + color: #333; + text-decoration: none; +} +.btn:active, +.btn.active { + background-image: none; + outline: 0; + -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); + box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); +} +.btn.disabled, +.btn[disabled], +fieldset[disabled] .btn { + pointer-events: none; + cursor: not-allowed; + filter: alpha(opacity=65); + -webkit-box-shadow: none; + box-shadow: none; + opacity: .65; +} +.btn-default { + color: #333; + background-color: #fff; + border-color: #ccc; +} +.btn-default:hover, +.btn-default:focus, +.btn-default.focus, +.btn-default:active, +.btn-default.active, +.open > .dropdown-toggle.btn-default { + color: #333; + background-color: #e6e6e6; + border-color: #adadad; +} +.btn-default:active, +.btn-default.active, +.open > .dropdown-toggle.btn-default { + background-image: none; +} +.btn-default.disabled, +.btn-default[disabled], +fieldset[disabled] .btn-default, +.btn-default.disabled:hover, +.btn-default[disabled]:hover, +fieldset[disabled] .btn-default:hover, +.btn-default.disabled:focus, +.btn-default[disabled]:focus, +fieldset[disabled] .btn-default:focus, +.btn-default.disabled.focus, +.btn-default[disabled].focus, +fieldset[disabled] .btn-default.focus, +.btn-default.disabled:active, +.btn-default[disabled]:active, +fieldset[disabled] .btn-default:active, +.btn-default.disabled.active, +.btn-default[disabled].active, +fieldset[disabled] .btn-default.active { + background-color: #fff; + border-color: #ccc; +} +.btn-default .badge { + color: #fff; + background-color: #333; +} +.btn-primary { + color: #fff; + background-color: #428bca; + border-color: #357ebd; +} +.btn-primary:hover, +.btn-primary:focus, +.btn-primary.focus, +.btn-primary:active, +.btn-primary.active, +.open > .dropdown-toggle.btn-primary { + color: #fff; + background-color: #3071a9; + border-color: #285e8e; +} +.btn-primary:active, +.btn-primary.active, +.open > .dropdown-toggle.btn-primary { + background-image: none; +} +.btn-primary.disabled, +.btn-primary[disabled], +fieldset[disabled] .btn-primary, +.btn-primary.disabled:hover, +.btn-primary[disabled]:hover, +fieldset[disabled] .btn-primary:hover, +.btn-primary.disabled:focus, +.btn-primary[disabled]:focus, +fieldset[disabled] .btn-primary:focus, +.btn-primary.disabled.focus, +.btn-primary[disabled].focus, +fieldset[disabled] .btn-primary.focus, +.btn-primary.disabled:active, +.btn-primary[disabled]:active, +fieldset[disabled] .btn-primary:active, +.btn-primary.disabled.active, +.btn-primary[disabled].active, +fieldset[disabled] .btn-primary.active { + background-color: #428bca; + border-color: #357ebd; +} +.btn-primary .badge { + color: #428bca; + background-color: #fff; +} +.btn-success { + color: #fff; + background-color: #5cb85c; + border-color: #4cae4c; +} +.btn-success:hover, +.btn-success:focus, +.btn-success.focus, +.btn-success:active, +.btn-success.active, +.open > .dropdown-toggle.btn-success { + color: #fff; + background-color: #449d44; + border-color: #398439; +} +.btn-success:active, +.btn-success.active, +.open > .dropdown-toggle.btn-success { + background-image: none; +} +.btn-success.disabled, +.btn-success[disabled], +fieldset[disabled] .btn-success, +.btn-success.disabled:hover, +.btn-success[disabled]:hover, +fieldset[disabled] .btn-success:hover, +.btn-success.disabled:focus, +.btn-success[disabled]:focus, +fieldset[disabled] .btn-success:focus, +.btn-success.disabled.focus, +.btn-success[disabled].focus, +fieldset[disabled] .btn-success.focus, +.btn-success.disabled:active, +.btn-success[disabled]:active, +fieldset[disabled] .btn-success:active, +.btn-success.disabled.active, +.btn-success[disabled].active, +fieldset[disabled] .btn-success.active { + background-color: #5cb85c; + border-color: #4cae4c; +} +.btn-success .badge { + color: #5cb85c; + background-color: #fff; +} +.btn-info { + color: #fff; + background-color: #5bc0de; + border-color: #46b8da; +} +.btn-info:hover, +.btn-info:focus, +.btn-info.focus, +.btn-info:active, +.btn-info.active, +.open > .dropdown-toggle.btn-info { + color: #fff; + background-color: #31b0d5; + border-color: #269abc; +} +.btn-info:active, +.btn-info.active, +.open > .dropdown-toggle.btn-info { + background-image: none; +} +.btn-info.disabled, +.btn-info[disabled], +fieldset[disabled] .btn-info, +.btn-info.disabled:hover, +.btn-info[disabled]:hover, +fieldset[disabled] .btn-info:hover, +.btn-info.disabled:focus, +.btn-info[disabled]:focus, +fieldset[disabled] .btn-info:focus, +.btn-info.disabled.focus, +.btn-info[disabled].focus, +fieldset[disabled] .btn-info.focus, +.btn-info.disabled:active, +.btn-info[disabled]:active, +fieldset[disabled] .btn-info:active, +.btn-info.disabled.active, +.btn-info[disabled].active, +fieldset[disabled] .btn-info.active { + background-color: #5bc0de; + border-color: #46b8da; +} +.btn-info .badge { + color: #5bc0de; + background-color: #fff; +} +.btn-warning { + color: #fff; + background-color: #f0ad4e; + border-color: #eea236; +} +.btn-warning:hover, +.btn-warning:focus, +.btn-warning.focus, +.btn-warning:active, +.btn-warning.active, +.open > .dropdown-toggle.btn-warning { + color: #fff; + background-color: #ec971f; + border-color: #d58512; +} +.btn-warning:active, +.btn-warning.active, +.open > .dropdown-toggle.btn-warning { + background-image: none; +} +.btn-warning.disabled, +.btn-warning[disabled], +fieldset[disabled] .btn-warning, +.btn-warning.disabled:hover, +.btn-warning[disabled]:hover, +fieldset[disabled] .btn-warning:hover, +.btn-warning.disabled:focus, +.btn-warning[disabled]:focus, +fieldset[disabled] .btn-warning:focus, +.btn-warning.disabled.focus, +.btn-warning[disabled].focus, +fieldset[disabled] .btn-warning.focus, +.btn-warning.disabled:active, +.btn-warning[disabled]:active, +fieldset[disabled] .btn-warning:active, +.btn-warning.disabled.active, +.btn-warning[disabled].active, +fieldset[disabled] .btn-warning.active { + background-color: #f0ad4e; + border-color: #eea236; +} +.btn-warning .badge { + color: #f0ad4e; + background-color: #fff; +} +.btn-danger { + color: #fff; + background-color: #d9534f; + border-color: #d43f3a; +} +.btn-danger:hover, +.btn-danger:focus, +.btn-danger.focus, +.btn-danger:active, +.btn-danger.active, +.open > .dropdown-toggle.btn-danger { + color: #fff; + background-color: #c9302c; + border-color: #ac2925; +} +.btn-danger:active, +.btn-danger.active, +.open > .dropdown-toggle.btn-danger { + background-image: none; +} +.btn-danger.disabled, +.btn-danger[disabled], +fieldset[disabled] .btn-danger, +.btn-danger.disabled:hover, +.btn-danger[disabled]:hover, +fieldset[disabled] .btn-danger:hover, +.btn-danger.disabled:focus, +.btn-danger[disabled]:focus, +fieldset[disabled] .btn-danger:focus, +.btn-danger.disabled.focus, +.btn-danger[disabled].focus, +fieldset[disabled] .btn-danger.focus, +.btn-danger.disabled:active, +.btn-danger[disabled]:active, +fieldset[disabled] .btn-danger:active, +.btn-danger.disabled.active, +.btn-danger[disabled].active, +fieldset[disabled] .btn-danger.active { + background-color: #d9534f; + border-color: #d43f3a; +} +.btn-danger .badge { + color: #d9534f; + background-color: #fff; +} +.btn-link { + font-weight: normal; + color: #428bca; + border-radius: 0; +} +.btn-link, +.btn-link:active, +.btn-link.active, +.btn-link[disabled], +fieldset[disabled] .btn-link { + background-color: transparent; + -webkit-box-shadow: none; + box-shadow: none; +} +.btn-link, +.btn-link:hover, +.btn-link:focus, +.btn-link:active { + border-color: transparent; +} +.btn-link:hover, +.btn-link:focus { + color: #2a6496; + text-decoration: underline; + background-color: transparent; +} +.btn-link[disabled]:hover, +fieldset[disabled] .btn-link:hover, +.btn-link[disabled]:focus, +fieldset[disabled] .btn-link:focus { + color: #777; + text-decoration: none; +} +.btn-lg, +.btn-group-lg > .btn { + padding: 10px 16px; + font-size: 18px; + line-height: 1.33; + border-radius: 6px; +} +.btn-sm, +.btn-group-sm > .btn { + padding: 5px 10px; + font-size: 12px; + line-height: 1.5; + border-radius: 3px; +} +.btn-xs, +.btn-group-xs > .btn { + padding: 1px 5px; + font-size: 12px; + line-height: 1.5; + border-radius: 3px; +} +.btn-block { + display: block; + width: 100%; +} +.btn-block + .btn-block { + margin-top: 5px; +} +input[type="submit"].btn-block, +input[type="reset"].btn-block, +input[type="button"].btn-block { + width: 100%; +} +.fade { + opacity: 0; + -webkit-transition: opacity .15s linear; + -o-transition: opacity .15s linear; + transition: opacity .15s linear; +} +.fade.in { + opacity: 1; +} +.collapse { + display: none; + visibility: hidden; +} +.collapse.in { + display: block; + visibility: visible; +} +tr.collapse.in { + display: table-row; +} +tbody.collapse.in { + display: table-row-group; +} +.collapsing { + position: relative; + height: 0; + overflow: hidden; + -webkit-transition-timing-function: ease; + -o-transition-timing-function: ease; + transition-timing-function: ease; + -webkit-transition-duration: .35s; + -o-transition-duration: .35s; + transition-duration: .35s; + -webkit-transition-property: height, visibility; + -o-transition-property: height, visibility; + transition-property: height, visibility; +} +.caret { + display: inline-block; + width: 0; + height: 0; + margin-left: 2px; + vertical-align: middle; + border-top: 4px solid; + border-right: 4px solid transparent; + border-left: 4px solid transparent; +} +.dropdown { + position: relative; +} +.dropdown-toggle:focus { + outline: 0; +} +.dropdown-menu { + position: absolute; + top: 100%; + left: 0; + z-index: 1000; + display: none; + float: left; + min-width: 160px; + padding: 5px 0; + margin: 2px 0 0; + font-size: 14px; + text-align: left; + list-style: none; + background-color: #fff; + -webkit-background-clip: padding-box; + background-clip: padding-box; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, .15); + border-radius: 4px; + -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, .175); + box-shadow: 0 6px 12px rgba(0, 0, 0, .175); +} +.dropdown-menu.pull-right { + right: 0; + left: auto; +} +.dropdown-menu .divider { + height: 1px; + margin: 9px 0; + overflow: hidden; + background-color: #e5e5e5; +} +.dropdown-menu > li > a { + display: block; + padding: 3px 20px; + clear: both; + font-weight: normal; + line-height: 1.42857143; + color: #333; + white-space: nowrap; +} +.dropdown-menu > li > a:hover, +.dropdown-menu > li > a:focus { + color: #262626; + text-decoration: none; + background-color: #f5f5f5; +} +.dropdown-menu > .active > a, +.dropdown-menu > .active > a:hover, +.dropdown-menu > .active > a:focus { + color: #fff; + text-decoration: none; + background-color: #428bca; + outline: 0; +} +.dropdown-menu > .disabled > a, +.dropdown-menu > .disabled > a:hover, +.dropdown-menu > .disabled > a:focus { + color: #777; +} +.dropdown-menu > .disabled > a:hover, +.dropdown-menu > .disabled > a:focus { + text-decoration: none; + cursor: not-allowed; + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.open > .dropdown-menu { + display: block; +} +.open > a { + outline: 0; +} +.dropdown-menu-right { + right: 0; + left: auto; +} +.dropdown-menu-left { + right: auto; + left: 0; +} +.dropdown-header { + display: block; + padding: 3px 20px; + font-size: 12px; + line-height: 1.42857143; + color: #777; + white-space: nowrap; +} +.dropdown-backdrop { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 990; +} +.pull-right > .dropdown-menu { + right: 0; + left: auto; +} +.dropup .caret, +.navbar-fixed-bottom .dropdown .caret { + content: ""; + border-top: 0; + border-bottom: 4px solid; +} +.dropup .dropdown-menu, +.navbar-fixed-bottom .dropdown .dropdown-menu { + top: auto; + bottom: 100%; + margin-bottom: 1px; +} +@media (min-width: 768px) { + .navbar-right .dropdown-menu { + right: 0; + left: auto; + } + .navbar-right .dropdown-menu-left { + right: auto; + left: 0; + } +} +.btn-group, +.btn-group-vertical { + position: relative; + display: inline-block; + vertical-align: middle; +} +.btn-group > .btn, +.btn-group-vertical > .btn { + position: relative; + float: left; +} +.btn-group > .btn:hover, +.btn-group-vertical > .btn:hover, +.btn-group > .btn:focus, +.btn-group-vertical > .btn:focus, +.btn-group > .btn:active, +.btn-group-vertical > .btn:active, +.btn-group > .btn.active, +.btn-group-vertical > .btn.active { + z-index: 2; +} +.btn-group > .btn:focus, +.btn-group-vertical > .btn:focus { + outline: 0; +} +.btn-group .btn + .btn, +.btn-group .btn + .btn-group, +.btn-group .btn-group + .btn, +.btn-group .btn-group + .btn-group { + margin-left: -1px; +} +.btn-toolbar { + margin-left: -5px; +} +.btn-toolbar .btn-group, +.btn-toolbar .input-group { + float: left; +} +.btn-toolbar > .btn, +.btn-toolbar > .btn-group, +.btn-toolbar > .input-group { + margin-left: 5px; +} +.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) { + border-radius: 0; +} +.btn-group > .btn:first-child { + margin-left: 0; +} +.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} +.btn-group > .btn:last-child:not(:first-child), +.btn-group > .dropdown-toggle:not(:first-child) { + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} +.btn-group > .btn-group { + float: left; +} +.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn { + border-radius: 0; +} +.btn-group > .btn-group:first-child > .btn:last-child, +.btn-group > .btn-group:first-child > .dropdown-toggle { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} +.btn-group > .btn-group:last-child > .btn:first-child { + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} +.btn-group .dropdown-toggle:active, +.btn-group.open .dropdown-toggle { + outline: 0; +} +.btn-group > .btn + .dropdown-toggle { + padding-right: 8px; + padding-left: 8px; +} +.btn-group > .btn-lg + .dropdown-toggle { + padding-right: 12px; + padding-left: 12px; +} +.btn-group.open .dropdown-toggle { + -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); + box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); +} +.btn-group.open .dropdown-toggle.btn-link { + -webkit-box-shadow: none; + box-shadow: none; +} +.btn .caret { + margin-left: 0; +} +.btn-lg .caret { + border-width: 5px 5px 0; + border-bottom-width: 0; +} +.dropup .btn-lg .caret { + border-width: 0 5px 5px; +} +.btn-group-vertical > .btn, +.btn-group-vertical > .btn-group, +.btn-group-vertical > .btn-group > .btn { + display: block; + float: none; + width: 100%; + max-width: 100%; +} +.btn-group-vertical > .btn-group > .btn { + float: none; +} +.btn-group-vertical > .btn + .btn, +.btn-group-vertical > .btn + .btn-group, +.btn-group-vertical > .btn-group + .btn, +.btn-group-vertical > .btn-group + .btn-group { + margin-top: -1px; + margin-left: 0; +} +.btn-group-vertical > .btn:not(:first-child):not(:last-child) { + border-radius: 0; +} +.btn-group-vertical > .btn:first-child:not(:last-child) { + border-top-right-radius: 4px; + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; +} +.btn-group-vertical > .btn:last-child:not(:first-child) { + border-top-left-radius: 0; + border-top-right-radius: 0; + border-bottom-left-radius: 4px; +} +.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn { + border-radius: 0; +} +.btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child, +.btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle { + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; +} +.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child { + border-top-left-radius: 0; + border-top-right-radius: 0; +} +.btn-group-justified { + display: table; + width: 100%; + table-layout: fixed; + border-collapse: separate; +} +.btn-group-justified > .btn, +.btn-group-justified > .btn-group { + display: table-cell; + float: none; + width: 1%; +} +.btn-group-justified > .btn-group .btn { + width: 100%; +} +.btn-group-justified > .btn-group .dropdown-menu { + left: auto; +} +[data-toggle="buttons"] > .btn input[type="radio"], +[data-toggle="buttons"] > .btn-group > .btn input[type="radio"], +[data-toggle="buttons"] > .btn input[type="checkbox"], +[data-toggle="buttons"] > .btn-group > .btn input[type="checkbox"] { + position: absolute; + clip: rect(0, 0, 0, 0); + pointer-events: none; +} +.input-group { + position: relative; + display: table; + border-collapse: separate; +} +.input-group[class*="col-"] { + float: none; + padding-right: 0; + padding-left: 0; +} +.input-group .form-control { + position: relative; + z-index: 2; + float: left; + width: 100%; + margin-bottom: 0; +} +.input-group-lg > .form-control, +.input-group-lg > .input-group-addon, +.input-group-lg > .input-group-btn > .btn { + height: 46px; + padding: 10px 16px; + font-size: 18px; + line-height: 1.33; + border-radius: 6px; +} +select.input-group-lg > .form-control, +select.input-group-lg > .input-group-addon, +select.input-group-lg > .input-group-btn > .btn { + height: 46px; + line-height: 46px; +} +textarea.input-group-lg > .form-control, +textarea.input-group-lg > .input-group-addon, +textarea.input-group-lg > .input-group-btn > .btn, +select[multiple].input-group-lg > .form-control, +select[multiple].input-group-lg > .input-group-addon, +select[multiple].input-group-lg > .input-group-btn > .btn { + height: auto; +} +.input-group-sm > .form-control, +.input-group-sm > .input-group-addon, +.input-group-sm > .input-group-btn > .btn { + height: 30px; + padding: 5px 10px; + font-size: 12px; + line-height: 1.5; + border-radius: 3px; +} +select.input-group-sm > .form-control, +select.input-group-sm > .input-group-addon, +select.input-group-sm > .input-group-btn > .btn { + height: 30px; + line-height: 30px; +} +textarea.input-group-sm > .form-control, +textarea.input-group-sm > .input-group-addon, +textarea.input-group-sm > .input-group-btn > .btn, +select[multiple].input-group-sm > .form-control, +select[multiple].input-group-sm > .input-group-addon, +select[multiple].input-group-sm > .input-group-btn > .btn { + height: auto; +} +.input-group-addon, +.input-group-btn, +.input-group .form-control { + display: table-cell; +} +.input-group-addon:not(:first-child):not(:last-child), +.input-group-btn:not(:first-child):not(:last-child), +.input-group .form-control:not(:first-child):not(:last-child) { + border-radius: 0; +} +.input-group-addon, +.input-group-btn { + width: 1%; + white-space: nowrap; + vertical-align: middle; +} +.input-group-addon { + padding: 6px 12px; + font-size: 14px; + font-weight: normal; + line-height: 1; + color: #555; + text-align: center; + background-color: #eee; + border: 1px solid #ccc; + border-radius: 4px; +} +.input-group-addon.input-sm { + padding: 5px 10px; + font-size: 12px; + border-radius: 3px; +} +.input-group-addon.input-lg { + padding: 10px 16px; + font-size: 18px; + border-radius: 6px; +} +.input-group-addon input[type="radio"], +.input-group-addon input[type="checkbox"] { + margin-top: 0; +} +.input-group .form-control:first-child, +.input-group-addon:first-child, +.input-group-btn:first-child > .btn, +.input-group-btn:first-child > .btn-group > .btn, +.input-group-btn:first-child > .dropdown-toggle, +.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle), +.input-group-btn:last-child > .btn-group:not(:last-child) > .btn { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} +.input-group-addon:first-child { + border-right: 0; +} +.input-group .form-control:last-child, +.input-group-addon:last-child, +.input-group-btn:last-child > .btn, +.input-group-btn:last-child > .btn-group > .btn, +.input-group-btn:last-child > .dropdown-toggle, +.input-group-btn:first-child > .btn:not(:first-child), +.input-group-btn:first-child > .btn-group:not(:first-child) > .btn { + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} +.input-group-addon:last-child { + border-left: 0; +} +.input-group-btn { + position: relative; + font-size: 0; + white-space: nowrap; +} +.input-group-btn > .btn { + position: relative; +} +.input-group-btn > .btn + .btn { + margin-left: -1px; +} +.input-group-btn > .btn:hover, +.input-group-btn > .btn:focus, +.input-group-btn > .btn:active { + z-index: 2; +} +.input-group-btn:first-child > .btn, +.input-group-btn:first-child > .btn-group { + margin-right: -1px; +} +.input-group-btn:last-child > .btn, +.input-group-btn:last-child > .btn-group { + margin-left: -1px; +} +.nav { + padding-left: 0; + margin-bottom: 0; + list-style: none; +} +.nav > li { + position: relative; + display: block; +} +.nav > li > a { + position: relative; + display: block; + padding: 10px 15px; +} +.nav > li > a:hover, +.nav > li > a:focus { + text-decoration: none; + background-color: #eee; +} +.nav > li.disabled > a { + color: #777; +} +.nav > li.disabled > a:hover, +.nav > li.disabled > a:focus { + color: #777; + text-decoration: none; + cursor: not-allowed; + background-color: transparent; +} +.nav .open > a, +.nav .open > a:hover, +.nav .open > a:focus { + background-color: #eee; + border-color: #428bca; +} +.nav .nav-divider { + height: 1px; + margin: 9px 0; + overflow: hidden; + background-color: #e5e5e5; +} +.nav > li > a > img { + max-width: none; +} +.nav-tabs { + border-bottom: 1px solid #ddd; +} +.nav-tabs > li { + float: left; + margin-bottom: -1px; +} +.nav-tabs > li > a { + margin-right: 2px; + line-height: 1.42857143; + border: 1px solid transparent; + border-radius: 4px 4px 0 0; +} +.nav-tabs > li > a:hover { + border-color: #eee #eee #ddd; +} +.nav-tabs > li.active > a, +.nav-tabs > li.active > a:hover, +.nav-tabs > li.active > a:focus { + color: #555; + cursor: default; + background-color: #fff; + border: 1px solid #ddd; + border-bottom-color: transparent; +} +.nav-tabs.nav-justified { + width: 100%; + border-bottom: 0; +} +.nav-tabs.nav-justified > li { + float: none; +} +.nav-tabs.nav-justified > li > a { + margin-bottom: 5px; + text-align: center; +} +.nav-tabs.nav-justified > .dropdown .dropdown-menu { + top: auto; + left: auto; +} +@media (min-width: 768px) { + .nav-tabs.nav-justified > li { + display: table-cell; + width: 1%; + } + .nav-tabs.nav-justified > li > a { + margin-bottom: 0; + } +} +.nav-tabs.nav-justified > li > a { + margin-right: 0; + border-radius: 4px; +} +.nav-tabs.nav-justified > .active > a, +.nav-tabs.nav-justified > .active > a:hover, +.nav-tabs.nav-justified > .active > a:focus { + border: 1px solid #ddd; +} +@media (min-width: 768px) { + .nav-tabs.nav-justified > li > a { + border-bottom: 1px solid #ddd; + border-radius: 4px 4px 0 0; + } + .nav-tabs.nav-justified > .active > a, + .nav-tabs.nav-justified > .active > a:hover, + .nav-tabs.nav-justified > .active > a:focus { + border-bottom-color: #fff; + } +} +.nav-pills > li { + float: left; +} +.nav-pills > li > a { + border-radius: 4px; +} +.nav-pills > li + li { + margin-left: 2px; +} +.nav-pills > li.active > a, +.nav-pills > li.active > a:hover, +.nav-pills > li.active > a:focus { + color: #fff; + background-color: #428bca; +} +.nav-stacked > li { + float: none; +} +.nav-stacked > li + li { + margin-top: 2px; + margin-left: 0; +} +.nav-justified { + width: 100%; +} +.nav-justified > li { + float: none; +} +.nav-justified > li > a { + margin-bottom: 5px; + text-align: center; +} +.nav-justified > .dropdown .dropdown-menu { + top: auto; + left: auto; +} +@media (min-width: 768px) { + .nav-justified > li { + display: table-cell; + width: 1%; + } + .nav-justified > li > a { + margin-bottom: 0; + } +} +.nav-tabs-justified { + border-bottom: 0; +} +.nav-tabs-justified > li > a { + margin-right: 0; + border-radius: 4px; +} +.nav-tabs-justified > .active > a, +.nav-tabs-justified > .active > a:hover, +.nav-tabs-justified > .active > a:focus { + border: 1px solid #ddd; +} +@media (min-width: 768px) { + .nav-tabs-justified > li > a { + border-bottom: 1px solid #ddd; + border-radius: 4px 4px 0 0; + } + .nav-tabs-justified > .active > a, + .nav-tabs-justified > .active > a:hover, + .nav-tabs-justified > .active > a:focus { + border-bottom-color: #fff; + } +} +.tab-content > .tab-pane { + display: none; + visibility: hidden; +} +.tab-content > .active { + display: block; + visibility: visible; +} +.nav-tabs .dropdown-menu { + margin-top: -1px; + border-top-left-radius: 0; + border-top-right-radius: 0; +} +.navbar { + position: relative; + min-height: 50px; + margin-bottom: 20px; + border: 1px solid transparent; +} +@media (min-width: 768px) { + .navbar { + border-radius: 4px; + } +} +@media (min-width: 768px) { + .navbar-header { + float: left; + } +} +.navbar-collapse { + padding-right: 15px; + padding-left: 15px; + overflow-x: visible; + -webkit-overflow-scrolling: touch; + border-top: 1px solid transparent; + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1); +} +.navbar-collapse.in { + overflow-y: auto; +} +@media (min-width: 768px) { + .navbar-collapse { + width: auto; + border-top: 0; + -webkit-box-shadow: none; + box-shadow: none; + } + .navbar-collapse.collapse { + display: block !important; + height: auto !important; + padding-bottom: 0; + overflow: visible !important; + visibility: visible !important; + } + .navbar-collapse.in { + overflow-y: visible; + } + .navbar-fixed-top .navbar-collapse, + .navbar-static-top .navbar-collapse, + .navbar-fixed-bottom .navbar-collapse { + padding-right: 0; + padding-left: 0; + } +} +.navbar-fixed-top .navbar-collapse, +.navbar-fixed-bottom .navbar-collapse { + max-height: 340px; +} +@media (max-device-width: 480px) and (orientation: landscape) { + .navbar-fixed-top .navbar-collapse, + .navbar-fixed-bottom .navbar-collapse { + max-height: 200px; + } +} +.container > .navbar-header, +.container-fluid > .navbar-header, +.container > .navbar-collapse, +.container-fluid > .navbar-collapse { + margin-right: -15px; + margin-left: -15px; +} +@media (min-width: 768px) { + .container > .navbar-header, + .container-fluid > .navbar-header, + .container > .navbar-collapse, + .container-fluid > .navbar-collapse { + margin-right: 0; + margin-left: 0; + } +} +.navbar-static-top { + z-index: 1000; + border-width: 0 0 1px; +} +@media (min-width: 768px) { + .navbar-static-top { + border-radius: 0; + } +} +.navbar-fixed-top, +.navbar-fixed-bottom { + position: fixed; + right: 0; + left: 0; + z-index: 1030; +} +@media (min-width: 768px) { + .navbar-fixed-top, + .navbar-fixed-bottom { + border-radius: 0; + } +} +.navbar-fixed-top { + top: 0; + border-width: 0 0 1px; +} +.navbar-fixed-bottom { + bottom: 0; + margin-bottom: 0; + border-width: 1px 0 0; +} +.navbar-brand { + float: left; + height: 50px; + padding: 15px 15px; + font-size: 18px; + line-height: 20px; +} +.navbar-brand:hover, +.navbar-brand:focus { + text-decoration: none; +} +.navbar-brand > img { + display: block; +} +@media (min-width: 768px) { + .navbar > .container .navbar-brand, + .navbar > .container-fluid .navbar-brand { + margin-left: -15px; + } +} +.navbar-toggle { + position: relative; + float: right; + padding: 9px 10px; + margin-top: 8px; + margin-right: 15px; + margin-bottom: 8px; + background-color: transparent; + background-image: none; + border: 1px solid transparent; + border-radius: 4px; +} +.navbar-toggle:focus { + outline: 0; +} +.navbar-toggle .icon-bar { + display: block; + width: 22px; + height: 2px; + border-radius: 1px; +} +.navbar-toggle .icon-bar + .icon-bar { + margin-top: 4px; +} +@media (min-width: 768px) { + .navbar-toggle { + display: none; + } +} +.navbar-nav { + margin: 7.5px -15px; +} +.navbar-nav > li > a { + padding-top: 10px; + padding-bottom: 10px; + line-height: 20px; +} +@media (max-width: 767px) { + .navbar-nav .open .dropdown-menu { + position: static; + float: none; + width: auto; + margin-top: 0; + background-color: transparent; + border: 0; + -webkit-box-shadow: none; + box-shadow: none; + } + .navbar-nav .open .dropdown-menu > li > a, + .navbar-nav .open .dropdown-menu .dropdown-header { + padding: 5px 15px 5px 25px; + } + .navbar-nav .open .dropdown-menu > li > a { + line-height: 20px; + } + .navbar-nav .open .dropdown-menu > li > a:hover, + .navbar-nav .open .dropdown-menu > li > a:focus { + background-image: none; + } +} +@media (min-width: 768px) { + .navbar-nav { + float: left; + margin: 0; + } + .navbar-nav > li { + float: left; + } + .navbar-nav > li > a { + padding-top: 15px; + padding-bottom: 15px; + } +} +.navbar-form { + padding: 10px 15px; + margin-top: 8px; + margin-right: -15px; + margin-bottom: 8px; + margin-left: -15px; + border-top: 1px solid transparent; + border-bottom: 1px solid transparent; + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1); +} +@media (min-width: 768px) { + .navbar-form .form-group { + display: inline-block; + margin-bottom: 0; + vertical-align: middle; + } + .navbar-form .form-control { + display: inline-block; + width: auto; + vertical-align: middle; + } + .navbar-form .form-control-static { + display: inline-block; + } + .navbar-form .input-group { + display: inline-table; + vertical-align: middle; + } + .navbar-form .input-group .input-group-addon, + .navbar-form .input-group .input-group-btn, + .navbar-form .input-group .form-control { + width: auto; + } + .navbar-form .input-group > .form-control { + width: 100%; + } + .navbar-form .control-label { + margin-bottom: 0; + vertical-align: middle; + } + .navbar-form .radio, + .navbar-form .checkbox { + display: inline-block; + margin-top: 0; + margin-bottom: 0; + vertical-align: middle; + } + .navbar-form .radio label, + .navbar-form .checkbox label { + padding-left: 0; + } + .navbar-form .radio input[type="radio"], + .navbar-form .checkbox input[type="checkbox"] { + position: relative; + margin-left: 0; + } + .navbar-form .has-feedback .form-control-feedback { + top: 0; + } +} +@media (max-width: 767px) { + .navbar-form .form-group { + margin-bottom: 5px; + } + .navbar-form .form-group:last-child { + margin-bottom: 0; + } +} +@media (min-width: 768px) { + .navbar-form { + width: auto; + padding-top: 0; + padding-bottom: 0; + margin-right: 0; + margin-left: 0; + border: 0; + -webkit-box-shadow: none; + box-shadow: none; + } +} +.navbar-nav > li > .dropdown-menu { + margin-top: 0; + border-top-left-radius: 0; + border-top-right-radius: 0; +} +.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu { + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; +} +.navbar-btn { + margin-top: 8px; + margin-bottom: 8px; +} +.navbar-btn.btn-sm { + margin-top: 10px; + margin-bottom: 10px; +} +.navbar-btn.btn-xs { + margin-top: 14px; + margin-bottom: 14px; +} +.navbar-text { + margin-top: 15px; + margin-bottom: 15px; +} +@media (min-width: 768px) { + .navbar-text { + float: left; + margin-right: 15px; + margin-left: 15px; + } +} +@media (min-width: 768px) { + .navbar-left { + float: left !important; + } + .navbar-right { + float: right !important; + margin-right: -15px; + } + .navbar-right ~ .navbar-right { + margin-right: 0; + } +} +.navbar-default { + background-color: #f8f8f8; + border-color: #e7e7e7; +} +.navbar-default .navbar-brand { + color: #777; +} +.navbar-default .navbar-brand:hover, +.navbar-default .navbar-brand:focus { + color: #5e5e5e; + background-color: transparent; +} +.navbar-default .navbar-text { + color: #777; +} +.navbar-default .navbar-nav > li > a { + color: #777; +} +.navbar-default .navbar-nav > li > a:hover, +.navbar-default .navbar-nav > li > a:focus { + color: #333; + background-color: transparent; +} +.navbar-default .navbar-nav > .active > a, +.navbar-default .navbar-nav > .active > a:hover, +.navbar-default .navbar-nav > .active > a:focus { + color: #555; + background-color: #e7e7e7; +} +.navbar-default .navbar-nav > .disabled > a, +.navbar-default .navbar-nav > .disabled > a:hover, +.navbar-default .navbar-nav > .disabled > a:focus { + color: #ccc; + background-color: transparent; +} +.navbar-default .navbar-toggle { + border-color: #ddd; +} +.navbar-default .navbar-toggle:hover, +.navbar-default .navbar-toggle:focus { + background-color: #ddd; +} +.navbar-default .navbar-toggle .icon-bar { + background-color: #888; +} +.navbar-default .navbar-collapse, +.navbar-default .navbar-form { + border-color: #e7e7e7; +} +.navbar-default .navbar-nav > .open > a, +.navbar-default .navbar-nav > .open > a:hover, +.navbar-default .navbar-nav > .open > a:focus { + color: #555; + background-color: #e7e7e7; +} +@media (max-width: 767px) { + .navbar-default .navbar-nav .open .dropdown-menu > li > a { + color: #777; + } + .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover, + .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus { + color: #333; + background-color: transparent; + } + .navbar-default .navbar-nav .open .dropdown-menu > .active > a, + .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover, + .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus { + color: #555; + background-color: #e7e7e7; + } + .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a, + .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover, + .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus { + color: #ccc; + background-color: transparent; + } +} +.navbar-default .navbar-link { + color: #777; +} +.navbar-default .navbar-link:hover { + color: #333; +} +.navbar-default .btn-link { + color: #777; +} +.navbar-default .btn-link:hover, +.navbar-default .btn-link:focus { + color: #333; +} +.navbar-default .btn-link[disabled]:hover, +fieldset[disabled] .navbar-default .btn-link:hover, +.navbar-default .btn-link[disabled]:focus, +fieldset[disabled] .navbar-default .btn-link:focus { + color: #ccc; +} +.navbar-inverse { + background-color: #222; + border-color: #080808; +} +.navbar-inverse .navbar-brand { + color: #9d9d9d; +} +.navbar-inverse .navbar-brand:hover, +.navbar-inverse .navbar-brand:focus { + color: #fff; + background-color: transparent; +} +.navbar-inverse .navbar-text { + color: #9d9d9d; +} +.navbar-inverse .navbar-nav > li > a { + color: #9d9d9d; +} +.navbar-inverse .navbar-nav > li > a:hover, +.navbar-inverse .navbar-nav > li > a:focus { + color: #fff; + background-color: transparent; +} +.navbar-inverse .navbar-nav > .active > a, +.navbar-inverse .navbar-nav > .active > a:hover, +.navbar-inverse .navbar-nav > .active > a:focus { + color: #fff; + background-color: #080808; +} +.navbar-inverse .navbar-nav > .disabled > a, +.navbar-inverse .navbar-nav > .disabled > a:hover, +.navbar-inverse .navbar-nav > .disabled > a:focus { + color: #444; + background-color: transparent; +} +.navbar-inverse .navbar-toggle { + border-color: #333; +} +.navbar-inverse .navbar-toggle:hover, +.navbar-inverse .navbar-toggle:focus { + background-color: #333; +} +.navbar-inverse .navbar-toggle .icon-bar { + background-color: #fff; +} +.navbar-inverse .navbar-collapse, +.navbar-inverse .navbar-form { + border-color: #101010; +} +.navbar-inverse .navbar-nav > .open > a, +.navbar-inverse .navbar-nav > .open > a:hover, +.navbar-inverse .navbar-nav > .open > a:focus { + color: #fff; + background-color: #080808; +} +@media (max-width: 767px) { + .navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header { + border-color: #080808; + } + .navbar-inverse .navbar-nav .open .dropdown-menu .divider { + background-color: #080808; + } + .navbar-inverse .navbar-nav .open .dropdown-menu > li > a { + color: #9d9d9d; + } + .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover, + .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus { + color: #fff; + background-color: transparent; + } + .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a, + .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover, + .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus { + color: #fff; + background-color: #080808; + } + .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a, + .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover, + .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus { + color: #444; + background-color: transparent; + } +} +.navbar-inverse .navbar-link { + color: #9d9d9d; +} +.navbar-inverse .navbar-link:hover { + color: #fff; +} +.navbar-inverse .btn-link { + color: #9d9d9d; +} +.navbar-inverse .btn-link:hover, +.navbar-inverse .btn-link:focus { + color: #fff; +} +.navbar-inverse .btn-link[disabled]:hover, +fieldset[disabled] .navbar-inverse .btn-link:hover, +.navbar-inverse .btn-link[disabled]:focus, +fieldset[disabled] .navbar-inverse .btn-link:focus { + color: #444; +} +.breadcrumb { + padding: 8px 15px; + margin-bottom: 20px; + list-style: none; + background-color: #f5f5f5; + border-radius: 4px; +} +.breadcrumb > li { + display: inline-block; +} +.breadcrumb > li + li:before { + padding: 0 5px; + color: #ccc; + content: "/\00a0"; +} +.breadcrumb > .active { + color: #777; +} +.pagination { + display: inline-block; + padding-left: 0; + margin: 20px 0; + border-radius: 4px; +} +.pagination > li { + display: inline; +} +.pagination > li > a, +.pagination > li > span { + position: relative; + float: left; + padding: 6px 12px; + margin-left: -1px; + line-height: 1.42857143; + color: #428bca; + text-decoration: none; + background-color: #fff; + border: 1px solid #ddd; +} +.pagination > li:first-child > a, +.pagination > li:first-child > span { + margin-left: 0; + border-top-left-radius: 4px; + border-bottom-left-radius: 4px; +} +.pagination > li:last-child > a, +.pagination > li:last-child > span { + border-top-right-radius: 4px; + border-bottom-right-radius: 4px; +} +.pagination > li > a:hover, +.pagination > li > span:hover, +.pagination > li > a:focus, +.pagination > li > span:focus { + color: #2a6496; + background-color: #eee; + border-color: #ddd; +} +.pagination > .active > a, +.pagination > .active > span, +.pagination > .active > a:hover, +.pagination > .active > span:hover, +.pagination > .active > a:focus, +.pagination > .active > span:focus { + z-index: 2; + color: #fff; + cursor: default; + background-color: #428bca; + border-color: #428bca; +} +.pagination > .disabled > span, +.pagination > .disabled > span:hover, +.pagination > .disabled > span:focus, +.pagination > .disabled > a, +.pagination > .disabled > a:hover, +.pagination > .disabled > a:focus { + color: #777; + cursor: not-allowed; + background-color: #fff; + border-color: #ddd; +} +.pagination-lg > li > a, +.pagination-lg > li > span { + padding: 10px 16px; + font-size: 18px; +} +.pagination-lg > li:first-child > a, +.pagination-lg > li:first-child > span { + border-top-left-radius: 6px; + border-bottom-left-radius: 6px; +} +.pagination-lg > li:last-child > a, +.pagination-lg > li:last-child > span { + border-top-right-radius: 6px; + border-bottom-right-radius: 6px; +} +.pagination-sm > li > a, +.pagination-sm > li > span { + padding: 5px 10px; + font-size: 12px; +} +.pagination-sm > li:first-child > a, +.pagination-sm > li:first-child > span { + border-top-left-radius: 3px; + border-bottom-left-radius: 3px; +} +.pagination-sm > li:last-child > a, +.pagination-sm > li:last-child > span { + border-top-right-radius: 3px; + border-bottom-right-radius: 3px; +} +.pager { + padding-left: 0; + margin: 20px 0; + text-align: center; + list-style: none; +} +.pager li { + display: inline; +} +.pager li > a, +.pager li > span { + display: inline-block; + padding: 5px 14px; + background-color: #fff; + border: 1px solid #ddd; + border-radius: 15px; +} +.pager li > a:hover, +.pager li > a:focus { + text-decoration: none; + background-color: #eee; +} +.pager .next > a, +.pager .next > span { + float: right; +} +.pager .previous > a, +.pager .previous > span { + float: left; +} +.pager .disabled > a, +.pager .disabled > a:hover, +.pager .disabled > a:focus, +.pager .disabled > span { + color: #777; + cursor: not-allowed; + background-color: #fff; +} +.label { + display: inline; + padding: .2em .6em .3em; + font-size: 75%; + font-weight: bold; + line-height: 1; + color: #fff; + text-align: center; + white-space: nowrap; + vertical-align: baseline; + border-radius: .25em; +} +a.label:hover, +a.label:focus { + color: #fff; + text-decoration: none; + cursor: pointer; +} +.label:empty { + display: none; +} +.btn .label { + position: relative; + top: -1px; +} +.label-default { + background-color: #777; +} +.label-default[href]:hover, +.label-default[href]:focus { + background-color: #5e5e5e; +} +.label-primary { + background-color: #428bca; +} +.label-primary[href]:hover, +.label-primary[href]:focus { + background-color: #3071a9; +} +.label-success { + background-color: #5cb85c; +} +.label-success[href]:hover, +.label-success[href]:focus { + background-color: #449d44; +} +.label-info { + background-color: #5bc0de; +} +.label-info[href]:hover, +.label-info[href]:focus { + background-color: #31b0d5; +} +.label-warning { + background-color: #f0ad4e; +} +.label-warning[href]:hover, +.label-warning[href]:focus { + background-color: #ec971f; +} +.label-danger { + background-color: #d9534f; +} +.label-danger[href]:hover, +.label-danger[href]:focus { + background-color: #c9302c; +} +.badge { + display: inline-block; + min-width: 10px; + padding: 3px 7px; + font-size: 12px; + font-weight: bold; + line-height: 1; + color: #fff; + text-align: center; + white-space: nowrap; + vertical-align: baseline; + background-color: #777; + border-radius: 10px; +} +.badge:empty { + display: none; +} +.btn .badge { + position: relative; + top: -1px; +} +.btn-xs .badge { + top: 0; + padding: 1px 5px; +} +a.badge:hover, +a.badge:focus { + color: #fff; + text-decoration: none; + cursor: pointer; +} +a.list-group-item.active > .badge, +.nav-pills > .active > a > .badge { + color: #428bca; + background-color: #fff; +} +.nav-pills > li > a > .badge { + margin-left: 3px; +} +.jumbotron { + padding: 30px 15px; + margin-bottom: 30px; + color: inherit; + background-color: #eee; +} +.jumbotron h1, +.jumbotron .h1 { + color: inherit; +} +.jumbotron p { + margin-bottom: 15px; + font-size: 21px; + font-weight: 200; +} +.jumbotron > hr { + border-top-color: #d5d5d5; +} +.container .jumbotron, +.container-fluid .jumbotron { + border-radius: 6px; +} +.jumbotron .container { + max-width: 100%; +} +@media screen and (min-width: 768px) { + .jumbotron { + padding: 48px 0; + } + .container .jumbotron { + padding-right: 60px; + padding-left: 60px; + } + .jumbotron h1, + .jumbotron .h1 { + font-size: 63px; + } +} +.thumbnail { + display: block; + padding: 4px; + margin-bottom: 20px; + line-height: 1.42857143; + background-color: #fff; + border: 1px solid #ddd; + border-radius: 4px; + -webkit-transition: border .2s ease-in-out; + -o-transition: border .2s ease-in-out; + transition: border .2s ease-in-out; +} +.thumbnail > img, +.thumbnail a > img { + margin-right: auto; + margin-left: auto; +} +a.thumbnail:hover, +a.thumbnail:focus, +a.thumbnail.active { + border-color: #428bca; +} +.thumbnail .caption { + padding: 9px; + color: #333; +} +.alert { + padding: 15px; + margin-bottom: 20px; + border: 1px solid transparent; + border-radius: 4px; +} +.alert h4 { + margin-top: 0; + color: inherit; +} +.alert .alert-link { + font-weight: bold; +} +.alert > p, +.alert > ul { + margin-bottom: 0; +} +.alert > p + p { + margin-top: 5px; +} +.alert-dismissable, +.alert-dismissible { + padding-right: 35px; +} +.alert-dismissable .close, +.alert-dismissible .close { + position: relative; + top: -2px; + right: -21px; + color: inherit; +} +.alert-success { + color: #3c763d; + background-color: #dff0d8; + border-color: #d6e9c6; +} +.alert-success hr { + border-top-color: #c9e2b3; +} +.alert-success .alert-link { + color: #2b542c; +} +.alert-info { + color: #31708f; + background-color: #d9edf7; + border-color: #bce8f1; +} +.alert-info hr { + border-top-color: #a6e1ec; +} +.alert-info .alert-link { + color: #245269; +} +.alert-warning { + color: #8a6d3b; + background-color: #fcf8e3; + border-color: #faebcc; +} +.alert-warning hr { + border-top-color: #f7e1b5; +} +.alert-warning .alert-link { + color: #66512c; +} +.alert-danger { + color: #a94442; + background-color: #f2dede; + border-color: #ebccd1; +} +.alert-danger hr { + border-top-color: #e4b9c0; +} +.alert-danger .alert-link { + color: #843534; +} +@-webkit-keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} +@-o-keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} +@keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} +.progress { + height: 20px; + margin-bottom: 20px; + overflow: hidden; + background-color: #f5f5f5; + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1); + box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1); +} +.progress-bar { + float: left; + width: 0; + height: 100%; + font-size: 12px; + line-height: 20px; + color: #fff; + text-align: center; + background-color: #428bca; + -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15); + box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15); + -webkit-transition: width .6s ease; + -o-transition: width .6s ease; + transition: width .6s ease; +} +.progress-striped .progress-bar, +.progress-bar-striped { + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + -webkit-background-size: 40px 40px; + background-size: 40px 40px; +} +.progress.active .progress-bar, +.progress-bar.active { + -webkit-animation: progress-bar-stripes 2s linear infinite; + -o-animation: progress-bar-stripes 2s linear infinite; + animation: progress-bar-stripes 2s linear infinite; +} +.progress-bar-success { + background-color: #5cb85c; +} +.progress-striped .progress-bar-success { + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); +} +.progress-bar-info { + background-color: #5bc0de; +} +.progress-striped .progress-bar-info { + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); +} +.progress-bar-warning { + background-color: #f0ad4e; +} +.progress-striped .progress-bar-warning { + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); +} +.progress-bar-danger { + background-color: #d9534f; +} +.progress-striped .progress-bar-danger { + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); +} +.media { + margin-top: 15px; +} +.media:first-child { + margin-top: 0; +} +.media-right, +.media > .pull-right { + padding-left: 10px; +} +.media-left, +.media > .pull-left { + padding-right: 10px; +} +.media-left, +.media-right, +.media-body { + display: table-cell; + vertical-align: top; +} +.media-middle { + vertical-align: middle; +} +.media-bottom { + vertical-align: bottom; +} +.media-heading { + margin-top: 0; + margin-bottom: 5px; +} +.media-list { + padding-left: 0; + list-style: none; +} +.list-group { + padding-left: 0; + margin-bottom: 20px; +} +.list-group-item { + position: relative; + display: block; + padding: 10px 15px; + margin-bottom: -1px; + background-color: #fff; + border: 1px solid #ddd; +} +.list-group-item:first-child { + border-top-left-radius: 4px; + border-top-right-radius: 4px; +} +.list-group-item:last-child { + margin-bottom: 0; + border-bottom-right-radius: 4px; + border-bottom-left-radius: 4px; +} +.list-group-item > .badge { + float: right; +} +.list-group-item > .badge + .badge { + margin-right: 5px; +} +a.list-group-item { + color: #555; +} +a.list-group-item .list-group-item-heading { + color: #333; +} +a.list-group-item:hover, +a.list-group-item:focus { + color: #555; + text-decoration: none; + background-color: #f5f5f5; +} +.list-group-item.disabled, +.list-group-item.disabled:hover, +.list-group-item.disabled:focus { + color: #777; + cursor: not-allowed; + background-color: #eee; +} +.list-group-item.disabled .list-group-item-heading, +.list-group-item.disabled:hover .list-group-item-heading, +.list-group-item.disabled:focus .list-group-item-heading { + color: inherit; +} +.list-group-item.disabled .list-group-item-text, +.list-group-item.disabled:hover .list-group-item-text, +.list-group-item.disabled:focus .list-group-item-text { + color: #777; +} +.list-group-item.active, +.list-group-item.active:hover, +.list-group-item.active:focus { + z-index: 2; + color: #fff; + background-color: #428bca; + border-color: #428bca; +} +.list-group-item.active .list-group-item-heading, +.list-group-item.active:hover .list-group-item-heading, +.list-group-item.active:focus .list-group-item-heading, +.list-group-item.active .list-group-item-heading > small, +.list-group-item.active:hover .list-group-item-heading > small, +.list-group-item.active:focus .list-group-item-heading > small, +.list-group-item.active .list-group-item-heading > .small, +.list-group-item.active:hover .list-group-item-heading > .small, +.list-group-item.active:focus .list-group-item-heading > .small { + color: inherit; +} +.list-group-item.active .list-group-item-text, +.list-group-item.active:hover .list-group-item-text, +.list-group-item.active:focus .list-group-item-text { + color: #e1edf7; +} +.list-group-item-success { + color: #3c763d; + background-color: #dff0d8; +} +a.list-group-item-success { + color: #3c763d; +} +a.list-group-item-success .list-group-item-heading { + color: inherit; +} +a.list-group-item-success:hover, +a.list-group-item-success:focus { + color: #3c763d; + background-color: #d0e9c6; +} +a.list-group-item-success.active, +a.list-group-item-success.active:hover, +a.list-group-item-success.active:focus { + color: #fff; + background-color: #3c763d; + border-color: #3c763d; +} +.list-group-item-info { + color: #31708f; + background-color: #d9edf7; +} +a.list-group-item-info { + color: #31708f; +} +a.list-group-item-info .list-group-item-heading { + color: inherit; +} +a.list-group-item-info:hover, +a.list-group-item-info:focus { + color: #31708f; + background-color: #c4e3f3; +} +a.list-group-item-info.active, +a.list-group-item-info.active:hover, +a.list-group-item-info.active:focus { + color: #fff; + background-color: #31708f; + border-color: #31708f; +} +.list-group-item-warning { + color: #8a6d3b; + background-color: #fcf8e3; +} +a.list-group-item-warning { + color: #8a6d3b; +} +a.list-group-item-warning .list-group-item-heading { + color: inherit; +} +a.list-group-item-warning:hover, +a.list-group-item-warning:focus { + color: #8a6d3b; + background-color: #faf2cc; +} +a.list-group-item-warning.active, +a.list-group-item-warning.active:hover, +a.list-group-item-warning.active:focus { + color: #fff; + background-color: #8a6d3b; + border-color: #8a6d3b; +} +.list-group-item-danger { + color: #a94442; + background-color: #f2dede; +} +a.list-group-item-danger { + color: #a94442; +} +a.list-group-item-danger .list-group-item-heading { + color: inherit; +} +a.list-group-item-danger:hover, +a.list-group-item-danger:focus { + color: #a94442; + background-color: #ebcccc; +} +a.list-group-item-danger.active, +a.list-group-item-danger.active:hover, +a.list-group-item-danger.active:focus { + color: #fff; + background-color: #a94442; + border-color: #a94442; +} +.list-group-item-heading { + margin-top: 0; + margin-bottom: 5px; +} +.list-group-item-text { + margin-bottom: 0; + line-height: 1.3; +} +.panel { + margin-bottom: 20px; + background-color: #fff; + border: 1px solid transparent; + border-radius: 4px; + -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .05); + box-shadow: 0 1px 1px rgba(0, 0, 0, .05); +} +.panel-body { + padding: 15px; +} +.panel-heading { + padding: 10px 15px; + border-bottom: 1px solid transparent; + border-top-left-radius: 3px; + border-top-right-radius: 3px; +} +.panel-heading > .dropdown .dropdown-toggle { + color: inherit; +} +.panel-title { + margin-top: 0; + margin-bottom: 0; + font-size: 16px; + color: inherit; +} +.panel-title > a { + color: inherit; +} +.panel-footer { + padding: 10px 15px; + background-color: #f5f5f5; + border-top: 1px solid #ddd; + border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px; +} +.panel > .list-group, +.panel > .panel-collapse > .list-group { + margin-bottom: 0; +} +.panel > .list-group .list-group-item, +.panel > .panel-collapse > .list-group .list-group-item { + border-width: 1px 0; + border-radius: 0; +} +.panel > .list-group:first-child .list-group-item:first-child, +.panel > .panel-collapse > .list-group:first-child .list-group-item:first-child { + border-top: 0; + border-top-left-radius: 3px; + border-top-right-radius: 3px; +} +.panel > .list-group:last-child .list-group-item:last-child, +.panel > .panel-collapse > .list-group:last-child .list-group-item:last-child { + border-bottom: 0; + border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px; +} +.panel-heading + .list-group .list-group-item:first-child { + border-top-width: 0; +} +.list-group + .panel-footer { + border-top-width: 0; +} +.panel > .table, +.panel > .table-responsive > .table, +.panel > .panel-collapse > .table { + margin-bottom: 0; +} +.panel > .table caption, +.panel > .table-responsive > .table caption, +.panel > .panel-collapse > .table caption { + padding-right: 15px; + padding-left: 15px; +} +.panel > .table:first-child, +.panel > .table-responsive:first-child > .table:first-child { + border-top-left-radius: 3px; + border-top-right-radius: 3px; +} +.panel > .table:first-child > thead:first-child > tr:first-child, +.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child, +.panel > .table:first-child > tbody:first-child > tr:first-child, +.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child { + border-top-left-radius: 3px; + border-top-right-radius: 3px; +} +.panel > .table:first-child > thead:first-child > tr:first-child td:first-child, +.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:first-child, +.panel > .table:first-child > tbody:first-child > tr:first-child td:first-child, +.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:first-child, +.panel > .table:first-child > thead:first-child > tr:first-child th:first-child, +.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:first-child, +.panel > .table:first-child > tbody:first-child > tr:first-child th:first-child, +.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:first-child { + border-top-left-radius: 3px; +} +.panel > .table:first-child > thead:first-child > tr:first-child td:last-child, +.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:last-child, +.panel > .table:first-child > tbody:first-child > tr:first-child td:last-child, +.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:last-child, +.panel > .table:first-child > thead:first-child > tr:first-child th:last-child, +.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:last-child, +.panel > .table:first-child > tbody:first-child > tr:first-child th:last-child, +.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:last-child { + border-top-right-radius: 3px; +} +.panel > .table:last-child, +.panel > .table-responsive:last-child > .table:last-child { + border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px; +} +.panel > .table:last-child > tbody:last-child > tr:last-child, +.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child, +.panel > .table:last-child > tfoot:last-child > tr:last-child, +.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child { + border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px; +} +.panel > .table:last-child > tbody:last-child > tr:last-child td:first-child, +.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:first-child, +.panel > .table:last-child > tfoot:last-child > tr:last-child td:first-child, +.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:first-child, +.panel > .table:last-child > tbody:last-child > tr:last-child th:first-child, +.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:first-child, +.panel > .table:last-child > tfoot:last-child > tr:last-child th:first-child, +.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:first-child { + border-bottom-left-radius: 3px; +} +.panel > .table:last-child > tbody:last-child > tr:last-child td:last-child, +.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:last-child, +.panel > .table:last-child > tfoot:last-child > tr:last-child td:last-child, +.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:last-child, +.panel > .table:last-child > tbody:last-child > tr:last-child th:last-child, +.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:last-child, +.panel > .table:last-child > tfoot:last-child > tr:last-child th:last-child, +.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:last-child { + border-bottom-right-radius: 3px; +} +.panel > .panel-body + .table, +.panel > .panel-body + .table-responsive, +.panel > .table + .panel-body, +.panel > .table-responsive + .panel-body { + border-top: 1px solid #ddd; +} +.panel > .table > tbody:first-child > tr:first-child th, +.panel > .table > tbody:first-child > tr:first-child td { + border-top: 0; +} +.panel > .table-bordered, +.panel > .table-responsive > .table-bordered { + border: 0; +} +.panel > .table-bordered > thead > tr > th:first-child, +.panel > .table-responsive > .table-bordered > thead > tr > th:first-child, +.panel > .table-bordered > tbody > tr > th:first-child, +.panel > .table-responsive > .table-bordered > tbody > tr > th:first-child, +.panel > .table-bordered > tfoot > tr > th:first-child, +.panel > .table-responsive > .table-bordered > tfoot > tr > th:first-child, +.panel > .table-bordered > thead > tr > td:first-child, +.panel > .table-responsive > .table-bordered > thead > tr > td:first-child, +.panel > .table-bordered > tbody > tr > td:first-child, +.panel > .table-responsive > .table-bordered > tbody > tr > td:first-child, +.panel > .table-bordered > tfoot > tr > td:first-child, +.panel > .table-responsive > .table-bordered > tfoot > tr > td:first-child { + border-left: 0; +} +.panel > .table-bordered > thead > tr > th:last-child, +.panel > .table-responsive > .table-bordered > thead > tr > th:last-child, +.panel > .table-bordered > tbody > tr > th:last-child, +.panel > .table-responsive > .table-bordered > tbody > tr > th:last-child, +.panel > .table-bordered > tfoot > tr > th:last-child, +.panel > .table-responsive > .table-bordered > tfoot > tr > th:last-child, +.panel > .table-bordered > thead > tr > td:last-child, +.panel > .table-responsive > .table-bordered > thead > tr > td:last-child, +.panel > .table-bordered > tbody > tr > td:last-child, +.panel > .table-responsive > .table-bordered > tbody > tr > td:last-child, +.panel > .table-bordered > tfoot > tr > td:last-child, +.panel > .table-responsive > .table-bordered > tfoot > tr > td:last-child { + border-right: 0; +} +.panel > .table-bordered > thead > tr:first-child > td, +.panel > .table-responsive > .table-bordered > thead > tr:first-child > td, +.panel > .table-bordered > tbody > tr:first-child > td, +.panel > .table-responsive > .table-bordered > tbody > tr:first-child > td, +.panel > .table-bordered > thead > tr:first-child > th, +.panel > .table-responsive > .table-bordered > thead > tr:first-child > th, +.panel > .table-bordered > tbody > tr:first-child > th, +.panel > .table-responsive > .table-bordered > tbody > tr:first-child > th { + border-bottom: 0; +} +.panel > .table-bordered > tbody > tr:last-child > td, +.panel > .table-responsive > .table-bordered > tbody > tr:last-child > td, +.panel > .table-bordered > tfoot > tr:last-child > td, +.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > td, +.panel > .table-bordered > tbody > tr:last-child > th, +.panel > .table-responsive > .table-bordered > tbody > tr:last-child > th, +.panel > .table-bordered > tfoot > tr:last-child > th, +.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > th { + border-bottom: 0; +} +.panel > .table-responsive { + margin-bottom: 0; + border: 0; +} +.panel-group { + margin-bottom: 20px; +} +.panel-group .panel { + margin-bottom: 0; + border-radius: 4px; +} +.panel-group .panel + .panel { + margin-top: 5px; +} +.panel-group .panel-heading { + border-bottom: 0; +} +.panel-group .panel-heading + .panel-collapse > .panel-body, +.panel-group .panel-heading + .panel-collapse > .list-group { + border-top: 1px solid #ddd; +} +.panel-group .panel-footer { + border-top: 0; +} +.panel-group .panel-footer + .panel-collapse .panel-body { + border-bottom: 1px solid #ddd; +} +.panel-default { + border-color: #ddd; +} +.panel-default > .panel-heading { + color: #333; + background-color: #f5f5f5; + border-color: #ddd; +} +.panel-default > .panel-heading + .panel-collapse > .panel-body { + border-top-color: #ddd; +} +.panel-default > .panel-heading .badge { + color: #f5f5f5; + background-color: #333; +} +.panel-default > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: #ddd; +} +.panel-primary { + border-color: #428bca; +} +.panel-primary > .panel-heading { + color: #fff; + background-color: #428bca; + border-color: #428bca; +} +.panel-primary > .panel-heading + .panel-collapse > .panel-body { + border-top-color: #428bca; +} +.panel-primary > .panel-heading .badge { + color: #428bca; + background-color: #fff; +} +.panel-primary > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: #428bca; +} +.panel-success { + border-color: #d6e9c6; +} +.panel-success > .panel-heading { + color: #3c763d; + background-color: #dff0d8; + border-color: #d6e9c6; +} +.panel-success > .panel-heading + .panel-collapse > .panel-body { + border-top-color: #d6e9c6; +} +.panel-success > .panel-heading .badge { + color: #dff0d8; + background-color: #3c763d; +} +.panel-success > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: #d6e9c6; +} +.panel-info { + border-color: #bce8f1; +} +.panel-info > .panel-heading { + color: #31708f; + background-color: #d9edf7; + border-color: #bce8f1; +} +.panel-info > .panel-heading + .panel-collapse > .panel-body { + border-top-color: #bce8f1; +} +.panel-info > .panel-heading .badge { + color: #d9edf7; + background-color: #31708f; +} +.panel-info > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: #bce8f1; +} +.panel-warning { + border-color: #faebcc; +} +.panel-warning > .panel-heading { + color: #8a6d3b; + background-color: #fcf8e3; + border-color: #faebcc; +} +.panel-warning > .panel-heading + .panel-collapse > .panel-body { + border-top-color: #faebcc; +} +.panel-warning > .panel-heading .badge { + color: #fcf8e3; + background-color: #8a6d3b; +} +.panel-warning > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: #faebcc; +} +.panel-danger { + border-color: #ebccd1; +} +.panel-danger > .panel-heading { + color: #a94442; + background-color: #f2dede; + border-color: #ebccd1; +} +.panel-danger > .panel-heading + .panel-collapse > .panel-body { + border-top-color: #ebccd1; +} +.panel-danger > .panel-heading .badge { + color: #f2dede; + background-color: #a94442; +} +.panel-danger > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: #ebccd1; +} +.embed-responsive { + position: relative; + display: block; + height: 0; + padding: 0; + overflow: hidden; +} +.embed-responsive .embed-responsive-item, +.embed-responsive iframe, +.embed-responsive embed, +.embed-responsive object, +.embed-responsive video { + position: absolute; + top: 0; + bottom: 0; + left: 0; + width: 100%; + height: 100%; + border: 0; +} +.embed-responsive.embed-responsive-16by9 { + padding-bottom: 56.25%; +} +.embed-responsive.embed-responsive-4by3 { + padding-bottom: 75%; +} +.well { + min-height: 20px; + padding: 19px; + margin-bottom: 20px; + background-color: #f5f5f5; + border: 1px solid #e3e3e3; + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05); +} +.well blockquote { + border-color: #ddd; + border-color: rgba(0, 0, 0, .15); +} +.well-lg { + padding: 24px; + border-radius: 6px; +} +.well-sm { + padding: 9px; + border-radius: 3px; +} +.close { + float: right; + font-size: 21px; + font-weight: bold; + line-height: 1; + color: #000; + text-shadow: 0 1px 0 #fff; + filter: alpha(opacity=20); + opacity: .2; +} +.close:hover, +.close:focus { + color: #000; + text-decoration: none; + cursor: pointer; + filter: alpha(opacity=50); + opacity: .5; +} +button.close { + -webkit-appearance: none; + padding: 0; + cursor: pointer; + background: transparent; + border: 0; +} +.modal-open { + overflow: hidden; +} +.modal { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 1040; + display: none; + overflow: hidden; + -webkit-overflow-scrolling: touch; + outline: 0; +} +.modal.fade .modal-dialog { + -webkit-transition: -webkit-transform .3s ease-out; + -o-transition: -o-transform .3s ease-out; + transition: transform .3s ease-out; + -webkit-transform: translate(0, -25%); + -ms-transform: translate(0, -25%); + -o-transform: translate(0, -25%); + transform: translate(0, -25%); +} +.modal.in .modal-dialog { + -webkit-transform: translate(0, 0); + -ms-transform: translate(0, 0); + -o-transform: translate(0, 0); + transform: translate(0, 0); +} +.modal-open .modal { + overflow-x: hidden; + overflow-y: auto; +} +.modal-dialog { + position: relative; + width: auto; + margin: 10px; +} +.modal-content { + position: relative; + background-color: #fff; + -webkit-background-clip: padding-box; + background-clip: padding-box; + border: 1px solid #999; + border: 1px solid rgba(0, 0, 0, .2); + border-radius: 6px; + outline: 0; + -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, .5); + box-shadow: 0 3px 9px rgba(0, 0, 0, .5); +} +.modal-backdrop { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + background-color: #000; +} +.modal-backdrop.fade { + filter: alpha(opacity=0); + opacity: 0; +} +.modal-backdrop.in { + filter: alpha(opacity=50); + opacity: .5; +} +.modal-header { + min-height: 16.42857143px; + padding: 15px; + border-bottom: 1px solid #e5e5e5; +} +.modal-header .close { + margin-top: -2px; +} +.modal-title { + margin: 0; + line-height: 1.42857143; +} +.modal-body { + position: relative; + padding: 15px; +} +.modal-footer { + padding: 15px; + text-align: right; + border-top: 1px solid #e5e5e5; +} +.modal-footer .btn + .btn { + margin-bottom: 0; + margin-left: 5px; +} +.modal-footer .btn-group .btn + .btn { + margin-left: -1px; +} +.modal-footer .btn-block + .btn-block { + margin-left: 0; +} +.modal-scrollbar-measure { + position: absolute; + top: -9999px; + width: 50px; + height: 50px; + overflow: scroll; +} +@media (min-width: 768px) { + .modal-dialog { + width: 600px; + margin: 30px auto; + } + .modal-content { + -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, .5); + box-shadow: 0 5px 15px rgba(0, 0, 0, .5); + } + .modal-sm { + width: 300px; + } +} +@media (min-width: 992px) { + .modal-lg { + width: 900px; + } +} +.tooltip { + position: absolute; + z-index: 1070; + display: block; + font-size: 12px; + line-height: 1.4; + visibility: visible; + filter: alpha(opacity=0); + opacity: 0; +} +.tooltip.in { + filter: alpha(opacity=90); + opacity: .9; +} +.tooltip.top { + padding: 5px 0; + margin-top: -3px; +} +.tooltip.right { + padding: 0 5px; + margin-left: 3px; +} +.tooltip.bottom { + padding: 5px 0; + margin-top: 3px; +} +.tooltip.left { + padding: 0 5px; + margin-left: -3px; +} +.tooltip-inner { + max-width: 200px; + padding: 3px 8px; + color: #fff; + text-align: center; + text-decoration: none; + background-color: #000; + border-radius: 4px; +} +.tooltip-arrow { + position: absolute; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; +} +.tooltip.top .tooltip-arrow { + bottom: 0; + left: 50%; + margin-left: -5px; + border-width: 5px 5px 0; + border-top-color: #000; +} +.tooltip.top-left .tooltip-arrow { + bottom: 0; + left: 5px; + border-width: 5px 5px 0; + border-top-color: #000; +} +.tooltip.top-right .tooltip-arrow { + right: 5px; + bottom: 0; + border-width: 5px 5px 0; + border-top-color: #000; +} +.tooltip.right .tooltip-arrow { + top: 50%; + left: 0; + margin-top: -5px; + border-width: 5px 5px 5px 0; + border-right-color: #000; +} +.tooltip.left .tooltip-arrow { + top: 50%; + right: 0; + margin-top: -5px; + border-width: 5px 0 5px 5px; + border-left-color: #000; +} +.tooltip.bottom .tooltip-arrow { + top: 0; + left: 50%; + margin-left: -5px; + border-width: 0 5px 5px; + border-bottom-color: #000; +} +.tooltip.bottom-left .tooltip-arrow { + top: 0; + left: 5px; + border-width: 0 5px 5px; + border-bottom-color: #000; +} +.tooltip.bottom-right .tooltip-arrow { + top: 0; + right: 5px; + border-width: 0 5px 5px; + border-bottom-color: #000; +} +.popover { + position: absolute; + top: 0; + left: 0; + z-index: 1060; + display: none; + max-width: 276px; + padding: 1px; + font-size: 14px; + font-weight: normal; + line-height: 1.42857143; + text-align: left; + white-space: normal; + background-color: #fff; + -webkit-background-clip: padding-box; + background-clip: padding-box; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, .2); + border-radius: 6px; + -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, .2); + box-shadow: 0 5px 10px rgba(0, 0, 0, .2); +} +.popover.top { + margin-top: -10px; +} +.popover.right { + margin-left: 10px; +} +.popover.bottom { + margin-top: 10px; +} +.popover.left { + margin-left: -10px; +} +.popover-title { + padding: 8px 14px; + margin: 0; + font-size: 14px; + background-color: #f7f7f7; + border-bottom: 1px solid #ebebeb; + border-radius: 5px 5px 0 0; +} +.popover-content { + padding: 9px 14px; +} +.popover > .arrow, +.popover > .arrow:after { + position: absolute; + display: block; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; +} +.popover > .arrow { + border-width: 11px; +} +.popover > .arrow:after { + content: ""; + border-width: 10px; +} +.popover.top > .arrow { + bottom: -11px; + left: 50%; + margin-left: -11px; + border-top-color: #999; + border-top-color: rgba(0, 0, 0, .25); + border-bottom-width: 0; +} +.popover.top > .arrow:after { + bottom: 1px; + margin-left: -10px; + content: " "; + border-top-color: #fff; + border-bottom-width: 0; +} +.popover.right > .arrow { + top: 50%; + left: -11px; + margin-top: -11px; + border-right-color: #999; + border-right-color: rgba(0, 0, 0, .25); + border-left-width: 0; +} +.popover.right > .arrow:after { + bottom: -10px; + left: 1px; + content: " "; + border-right-color: #fff; + border-left-width: 0; +} +.popover.bottom > .arrow { + top: -11px; + left: 50%; + margin-left: -11px; + border-top-width: 0; + border-bottom-color: #999; + border-bottom-color: rgba(0, 0, 0, .25); +} +.popover.bottom > .arrow:after { + top: 1px; + margin-left: -10px; + content: " "; + border-top-width: 0; + border-bottom-color: #fff; +} +.popover.left > .arrow { + top: 50%; + right: -11px; + margin-top: -11px; + border-right-width: 0; + border-left-color: #999; + border-left-color: rgba(0, 0, 0, .25); +} +.popover.left > .arrow:after { + right: 1px; + bottom: -10px; + content: " "; + border-right-width: 0; + border-left-color: #fff; +} +.carousel { + position: relative; +} +.carousel-inner { + position: relative; + width: 100%; + overflow: hidden; +} +.carousel-inner > .item { + position: relative; + display: none; + -webkit-transition: .6s ease-in-out left; + -o-transition: .6s ease-in-out left; + transition: .6s ease-in-out left; +} +.carousel-inner > .item > img, +.carousel-inner > .item > a > img { + line-height: 1; +} +@media all and (transform-3d), (-webkit-transform-3d) { + .carousel-inner > .item { + -webkit-transition: -webkit-transform .6s ease-in-out; + -o-transition: -o-transform .6s ease-in-out; + transition: transform .6s ease-in-out; + + -webkit-backface-visibility: hidden; + backface-visibility: hidden; + -webkit-perspective: 1000; + perspective: 1000; + } + .carousel-inner > .item.next, + .carousel-inner > .item.active.right { + left: 0; + -webkit-transform: translate3d(100%, 0, 0); + transform: translate3d(100%, 0, 0); + } + .carousel-inner > .item.prev, + .carousel-inner > .item.active.left { + left: 0; + -webkit-transform: translate3d(-100%, 0, 0); + transform: translate3d(-100%, 0, 0); + } + .carousel-inner > .item.next.left, + .carousel-inner > .item.prev.right, + .carousel-inner > .item.active { + left: 0; + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } +} +.carousel-inner > .active, +.carousel-inner > .next, +.carousel-inner > .prev { + display: block; +} +.carousel-inner > .active { + left: 0; +} +.carousel-inner > .next, +.carousel-inner > .prev { + position: absolute; + top: 0; + width: 100%; +} +.carousel-inner > .next { + left: 100%; +} +.carousel-inner > .prev { + left: -100%; +} +.carousel-inner > .next.left, +.carousel-inner > .prev.right { + left: 0; +} +.carousel-inner > .active.left { + left: -100%; +} +.carousel-inner > .active.right { + left: 100%; +} +.carousel-control { + position: absolute; + top: 0; + bottom: 0; + left: 0; + width: 15%; + font-size: 20px; + color: #fff; + text-align: center; + text-shadow: 0 1px 2px rgba(0, 0, 0, .6); + filter: alpha(opacity=50); + opacity: .5; +} +.carousel-control.left { + background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%); + background-image: -o-linear-gradient(left, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%); + background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, .5)), to(rgba(0, 0, 0, .0001))); + background-image: linear-gradient(to right, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1); + background-repeat: repeat-x; +} +.carousel-control.right { + right: 0; + left: auto; + background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%); + background-image: -o-linear-gradient(left, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%); + background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, .0001)), to(rgba(0, 0, 0, .5))); + background-image: linear-gradient(to right, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1); + background-repeat: repeat-x; +} +.carousel-control:hover, +.carousel-control:focus { + color: #fff; + text-decoration: none; + filter: alpha(opacity=90); + outline: 0; + opacity: .9; +} +.carousel-control .icon-prev, +.carousel-control .icon-next, +.carousel-control .glyphicon-chevron-left, +.carousel-control .glyphicon-chevron-right { + position: absolute; + top: 50%; + z-index: 5; + display: inline-block; +} +.carousel-control .icon-prev, +.carousel-control .glyphicon-chevron-left { + left: 50%; + margin-left: -10px; +} +.carousel-control .icon-next, +.carousel-control .glyphicon-chevron-right { + right: 50%; + margin-right: -10px; +} +.carousel-control .icon-prev, +.carousel-control .icon-next { + width: 20px; + height: 20px; + margin-top: -10px; + font-family: serif; +} +.carousel-control .icon-prev:before { + content: '\2039'; +} +.carousel-control .icon-next:before { + content: '\203a'; +} +.carousel-indicators { + position: absolute; + bottom: 10px; + left: 50%; + z-index: 15; + width: 60%; + padding-left: 0; + margin-left: -30%; + text-align: center; + list-style: none; +} +.carousel-indicators li { + display: inline-block; + width: 10px; + height: 10px; + margin: 1px; + text-indent: -999px; + cursor: pointer; + background-color: #000 \9; + background-color: rgba(0, 0, 0, 0); + border: 1px solid #fff; + border-radius: 10px; +} +.carousel-indicators .active { + width: 12px; + height: 12px; + margin: 0; + background-color: #fff; +} +.carousel-caption { + position: absolute; + right: 15%; + bottom: 20px; + left: 15%; + z-index: 10; + padding-top: 20px; + padding-bottom: 20px; + color: #fff; + text-align: center; + text-shadow: 0 1px 2px rgba(0, 0, 0, .6); +} +.carousel-caption .btn { + text-shadow: none; +} +@media screen and (min-width: 768px) { + .carousel-control .glyphicon-chevron-left, + .carousel-control .glyphicon-chevron-right, + .carousel-control .icon-prev, + .carousel-control .icon-next { + width: 30px; + height: 30px; + margin-top: -15px; + font-size: 30px; + } + .carousel-control .glyphicon-chevron-left, + .carousel-control .icon-prev { + margin-left: -15px; + } + .carousel-control .glyphicon-chevron-right, + .carousel-control .icon-next { + margin-right: -15px; + } + .carousel-caption { + right: 20%; + left: 20%; + padding-bottom: 30px; + } + .carousel-indicators { + bottom: 20px; + } +} +.clearfix:before, +.clearfix:after, +.dl-horizontal dd:before, +.dl-horizontal dd:after, +.container:before, +.container:after, +.container-fluid:before, +.container-fluid:after, +.row:before, +.row:after, +.form-horizontal .form-group:before, +.form-horizontal .form-group:after, +.btn-toolbar:before, +.btn-toolbar:after, +.btn-group-vertical > .btn-group:before, +.btn-group-vertical > .btn-group:after, +.nav:before, +.nav:after, +.navbar:before, +.navbar:after, +.navbar-header:before, +.navbar-header:after, +.navbar-collapse:before, +.navbar-collapse:after, +.pager:before, +.pager:after, +.panel-body:before, +.panel-body:after, +.modal-footer:before, +.modal-footer:after { + display: table; + content: " "; +} +.clearfix:after, +.dl-horizontal dd:after, +.container:after, +.container-fluid:after, +.row:after, +.form-horizontal .form-group:after, +.btn-toolbar:after, +.btn-group-vertical > .btn-group:after, +.nav:after, +.navbar:after, +.navbar-header:after, +.navbar-collapse:after, +.pager:after, +.panel-body:after, +.modal-footer:after { + clear: both; +} +.center-block { + display: block; + margin-right: auto; + margin-left: auto; +} +.pull-right { + float: right !important; +} +.pull-left { + float: left !important; +} +.hide { + display: none !important; +} +.show { + display: block !important; +} +.invisible { + visibility: hidden; +} +.text-hide { + font: 0/0 a; + color: transparent; + text-shadow: none; + background-color: transparent; + border: 0; +} +.hidden { + display: none !important; + visibility: hidden !important; +} +.affix { + position: fixed; +} +@-ms-viewport { + width: device-width; +} +.visible-xs, +.visible-sm, +.visible-md, +.visible-lg { + display: none !important; +} +.visible-xs-block, +.visible-xs-inline, +.visible-xs-inline-block, +.visible-sm-block, +.visible-sm-inline, +.visible-sm-inline-block, +.visible-md-block, +.visible-md-inline, +.visible-md-inline-block, +.visible-lg-block, +.visible-lg-inline, +.visible-lg-inline-block { + display: none !important; +} +@media (max-width: 767px) { + .visible-xs { + display: block !important; + } + table.visible-xs { + display: table; + } + tr.visible-xs { + display: table-row !important; + } + th.visible-xs, + td.visible-xs { + display: table-cell !important; + } +} +@media (max-width: 767px) { + .visible-xs-block { + display: block !important; + } +} +@media (max-width: 767px) { + .visible-xs-inline { + display: inline !important; + } +} +@media (max-width: 767px) { + .visible-xs-inline-block { + display: inline-block !important; + } +} +@media (min-width: 768px) and (max-width: 991px) { + .visible-sm { + display: block !important; + } + table.visible-sm { + display: table; + } + tr.visible-sm { + display: table-row !important; + } + th.visible-sm, + td.visible-sm { + display: table-cell !important; + } +} +@media (min-width: 768px) and (max-width: 991px) { + .visible-sm-block { + display: block !important; + } +} +@media (min-width: 768px) and (max-width: 991px) { + .visible-sm-inline { + display: inline !important; + } +} +@media (min-width: 768px) and (max-width: 991px) { + .visible-sm-inline-block { + display: inline-block !important; + } +} +@media (min-width: 992px) and (max-width: 1199px) { + .visible-md { + display: block !important; + } + table.visible-md { + display: table; + } + tr.visible-md { + display: table-row !important; + } + th.visible-md, + td.visible-md { + display: table-cell !important; + } +} +@media (min-width: 992px) and (max-width: 1199px) { + .visible-md-block { + display: block !important; + } +} +@media (min-width: 992px) and (max-width: 1199px) { + .visible-md-inline { + display: inline !important; + } +} +@media (min-width: 992px) and (max-width: 1199px) { + .visible-md-inline-block { + display: inline-block !important; + } +} +@media (min-width: 1200px) { + .visible-lg { + display: block !important; + } + table.visible-lg { + display: table; + } + tr.visible-lg { + display: table-row !important; + } + th.visible-lg, + td.visible-lg { + display: table-cell !important; + } +} +@media (min-width: 1200px) { + .visible-lg-block { + display: block !important; + } +} +@media (min-width: 1200px) { + .visible-lg-inline { + display: inline !important; + } +} +@media (min-width: 1200px) { + .visible-lg-inline-block { + display: inline-block !important; + } +} +@media (max-width: 767px) { + .hidden-xs { + display: none !important; + } +} +@media (min-width: 768px) and (max-width: 991px) { + .hidden-sm { + display: none !important; + } +} +@media (min-width: 992px) and (max-width: 1199px) { + .hidden-md { + display: none !important; + } +} +@media (min-width: 1200px) { + .hidden-lg { + display: none !important; + } +} +.visible-print { + display: none !important; +} +@media print { + .visible-print { + display: block !important; + } + table.visible-print { + display: table; + } + tr.visible-print { + display: table-row !important; + } + th.visible-print, + td.visible-print { + display: table-cell !important; + } +} +.visible-print-block { + display: none !important; +} +@media print { + .visible-print-block { + display: block !important; + } +} +.visible-print-inline { + display: none !important; +} +@media print { + .visible-print-inline { + display: inline !important; + } +} +.visible-print-inline-block { + display: none !important; +} +@media print { + .visible-print-inline-block { + display: inline-block !important; + } +} +@media print { + .hidden-print { + display: none !important; + } +} +/*# sourceMappingURL=bootstrap.css.map */ diff --git a/源码/src/main/webapp/resource/boot/css/bootstrap.css.map b/源码/src/main/webapp/resource/boot/css/bootstrap.css.map new file mode 100644 index 0000000..fa5546b --- /dev/null +++ b/源码/src/main/webapp/resource/boot/css/bootstrap.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["bootstrap.css","less/normalize.less","less/print.less","less/glyphicons.less","less/scaffolding.less","less/mixins/vendor-prefixes.less","less/mixins/tab-focus.less","less/mixins/image.less","less/type.less","less/mixins/text-emphasis.less","less/mixins/background-variant.less","less/mixins/text-overflow.less","less/code.less","less/grid.less","less/mixins/grid.less","less/mixins/grid-framework.less","less/tables.less","less/mixins/table-row.less","less/forms.less","less/mixins/forms.less","less/buttons.less","less/mixins/buttons.less","less/mixins/opacity.less","less/component-animations.less","less/dropdowns.less","less/mixins/nav-divider.less","less/mixins/reset-filter.less","less/button-groups.less","less/mixins/border-radius.less","less/input-groups.less","less/navs.less","less/navbar.less","less/mixins/nav-vertical-align.less","less/utilities.less","less/breadcrumbs.less","less/pagination.less","less/mixins/pagination.less","less/pager.less","less/labels.less","less/mixins/labels.less","less/badges.less","less/jumbotron.less","less/thumbnails.less","less/alerts.less","less/mixins/alerts.less","less/progress-bars.less","less/mixins/gradients.less","less/mixins/progress-bar.less","less/media.less","less/list-group.less","less/mixins/list-group.less","less/panels.less","less/mixins/panels.less","less/responsive-embed.less","less/wells.less","less/close.less","less/modals.less","less/tooltip.less","less/popovers.less","less/carousel.less","less/mixins/clearfix.less","less/mixins/center-block.less","less/mixins/hide-text.less","less/responsive-utilities.less","less/mixins/responsive-visibility.less"],"names":[],"mappings":"AAAA,6DAA4D;ACQ5D;EACE,yBAAA;EACA,4BAAA;EACA,gCAAA;EDND;ACaD;EACE,WAAA;EDXD;ACwBD;;;;;;;;;;;;;EAaE,gBAAA;EDtBD;AC8BD;;;;EAIE,uBAAA;EACA,0BAAA;ED5BD;ACoCD;EACE,eAAA;EACA,WAAA;EDlCD;AC0CD;;EAEE,eAAA;EDxCD;ACkDD;EACE,+BAAA;EDhDD;ACuDD;;EAEE,YAAA;EDrDD;AC+DD;EACE,2BAAA;ED7DD;ACoED;;EAEE,mBAAA;EDlED;ACyED;EACE,oBAAA;EDvED;AC+ED;EACE,gBAAA;EACA,kBAAA;ED7ED;ACoFD;EACE,kBAAA;EACA,aAAA;EDlFD;ACyFD;EACE,gBAAA;EDvFD;AC8FD;;EAEE,gBAAA;EACA,gBAAA;EACA,oBAAA;EACA,0BAAA;ED5FD;AC+FD;EACE,aAAA;ED7FD;ACgGD;EACE,iBAAA;ED9FD;ACwGD;EACE,WAAA;EDtGD;AC6GD;EACE,kBAAA;ED3GD;ACqHD;EACE,kBAAA;EDnHD;AC0HD;EACE,8BAAA;EACA,iCAAA;UAAA,yBAAA;EACA,WAAA;EDxHD;AC+HD;EACE,gBAAA;ED7HD;ACoID;;;;EAIE,mCAAA;EACA,gBAAA;EDlID;ACoJD;;;;;EAKE,gBAAA;EACA,eAAA;EACA,WAAA;EDlJD;ACyJD;EACE,mBAAA;EDvJD;ACiKD;;EAEE,sBAAA;ED/JD;AC0KD;;;;EAIE,4BAAA;EACA,iBAAA;EDxKD;AC+KD;;EAEE,iBAAA;ED7KD;ACoLD;;EAEE,WAAA;EACA,YAAA;EDlLD;AC0LD;EACE,qBAAA;EDxLD;ACmMD;;EAEE,gCAAA;KAAA,6BAAA;UAAA,wBAAA;EACA,YAAA;EDjMD;AC0MD;;EAEE,cAAA;EDxMD;ACiND;EACE,+BAAA;EACA,8BAAA;EACA,iCAAA;EACA,yBAAA;ED/MD;ACwND;;EAEE,0BAAA;EDtND;AC6ND;EACE,2BAAA;EACA,eAAA;EACA,gCAAA;ED3ND;ACmOD;EACE,WAAA;EACA,YAAA;EDjOD;ACwOD;EACE,gBAAA;EDtOD;AC8OD;EACE,mBAAA;ED5OD;ACsPD;EACE,2BAAA;EACA,mBAAA;EDpPD;ACuPD;;EAEE,YAAA;EDrPD;AACD,sFAAqF;AE1ErF;EAnGI;;;IAGI,oCAAA;IACA,wBAAA;IACA,qCAAA;YAAA,6BAAA;IACA,8BAAA;IFgLL;EE7KC;;IAEI,4BAAA;IF+KL;EE5KC;IACI,8BAAA;IF8KL;EE3KC;IACI,+BAAA;IF6KL;EExKC;;IAEI,aAAA;IF0KL;EEvKC;;IAEI,wBAAA;IACA,0BAAA;IFyKL;EEtKC;IACI,6BAAA;IFwKL;EErKC;;IAEI,0BAAA;IFuKL;EEpKC;IACI,4BAAA;IFsKL;EEnKC;;;IAGI,YAAA;IACA,WAAA;IFqKL;EElKC;;IAEI,yBAAA;IFoKL;EE7JC;IACI,6BAAA;IF+JL;EE3JC;IACI,eAAA;IF6JL;EE3JC;;IAGQ,mCAAA;IF4JT;EEzJC;IACI,wBAAA;IF2JL;EExJC;IACI,sCAAA;IF0JL;EE3JC;;IAKQ,mCAAA;IF0JT;EEvJC;;IAGQ,mCAAA;IFwJT;EACF;AGpPD;EACE,qCAAA;EACA,uDAAA;EACA,6TAAA;EHsPD;AG/OD;EACE,oBAAA;EACA,UAAA;EACA,uBAAA;EACA,qCAAA;EACA,oBAAA;EACA,qBAAA;EACA,gBAAA;EACA,qCAAA;EACA,oCAAA;EHiPD;AG7OmC;EAAW,gBAAA;EHgP9C;AG/OmC;EAAW,gBAAA;EHkP9C;AGhPmC;;EAAW,kBAAA;EHoP9C;AGnPmC;EAAW,kBAAA;EHsP9C;AGrPmC;EAAW,kBAAA;EHwP9C;AGvPmC;EAAW,kBAAA;EH0P9C;AGzPmC;EAAW,kBAAA;EH4P9C;AG3PmC;EAAW,kBAAA;EH8P9C;AG7PmC;EAAW,kBAAA;EHgQ9C;AG/PmC;EAAW,kBAAA;EHkQ9C;AGjQmC;EAAW,kBAAA;EHoQ9C;AGnQmC;EAAW,kBAAA;EHsQ9C;AGrQmC;EAAW,kBAAA;EHwQ9C;AGvQmC;EAAW,kBAAA;EH0Q9C;AGzQmC;EAAW,kBAAA;EH4Q9C;AG3QmC;EAAW,kBAAA;EH8Q9C;AG7QmC;EAAW,kBAAA;EHgR9C;AG/QmC;EAAW,kBAAA;EHkR9C;AGjRmC;EAAW,kBAAA;EHoR9C;AGnRmC;EAAW,kBAAA;EHsR9C;AGrRmC;EAAW,kBAAA;EHwR9C;AGvRmC;EAAW,kBAAA;EH0R9C;AGzRmC;EAAW,kBAAA;EH4R9C;AG3RmC;EAAW,kBAAA;EH8R9C;AG7RmC;EAAW,kBAAA;EHgS9C;AG/RmC;EAAW,kBAAA;EHkS9C;AGjSmC;EAAW,kBAAA;EHoS9C;AGnSmC;EAAW,kBAAA;EHsS9C;AGrSmC;EAAW,kBAAA;EHwS9C;AGvSmC;EAAW,kBAAA;EH0S9C;AGzSmC;EAAW,kBAAA;EH4S9C;AG3SmC;EAAW,kBAAA;EH8S9C;AG7SmC;EAAW,kBAAA;EHgT9C;AG/SmC;EAAW,kBAAA;EHkT9C;AGjTmC;EAAW,kBAAA;EHoT9C;AGnTmC;EAAW,kBAAA;EHsT9C;AGrTmC;EAAW,kBAAA;EHwT9C;AGvTmC;EAAW,kBAAA;EH0T9C;AGzTmC;EAAW,kBAAA;EH4T9C;AG3TmC;EAAW,kBAAA;EH8T9C;AG7TmC;EAAW,kBAAA;EHgU9C;AG/TmC;EAAW,kBAAA;EHkU9C;AGjUmC;EAAW,kBAAA;EHoU9C;AGnUmC;EAAW,kBAAA;EHsU9C;AGrUmC;EAAW,kBAAA;EHwU9C;AGvUmC;EAAW,kBAAA;EH0U9C;AGzUmC;EAAW,kBAAA;EH4U9C;AG3UmC;EAAW,kBAAA;EH8U9C;AG7UmC;EAAW,kBAAA;EHgV9C;AG/UmC;EAAW,kBAAA;EHkV9C;AGjVmC;EAAW,kBAAA;EHoV9C;AGnVmC;EAAW,kBAAA;EHsV9C;AGrVmC;EAAW,kBAAA;EHwV9C;AGvVmC;EAAW,kBAAA;EH0V9C;AGzVmC;EAAW,kBAAA;EH4V9C;AG3VmC;EAAW,kBAAA;EH8V9C;AG7VmC;EAAW,kBAAA;EHgW9C;AG/VmC;EAAW,kBAAA;EHkW9C;AGjWmC;EAAW,kBAAA;EHoW9C;AGnWmC;EAAW,kBAAA;EHsW9C;AGrWmC;EAAW,kBAAA;EHwW9C;AGvWmC;EAAW,kBAAA;EH0W9C;AGzWmC;EAAW,kBAAA;EH4W9C;AG3WmC;EAAW,kBAAA;EH8W9C;AG7WmC;EAAW,kBAAA;EHgX9C;AG/WmC;EAAW,kBAAA;EHkX9C;AGjXmC;EAAW,kBAAA;EHoX9C;AGnXmC;EAAW,kBAAA;EHsX9C;AGrXmC;EAAW,kBAAA;EHwX9C;AGvXmC;EAAW,kBAAA;EH0X9C;AGzXmC;EAAW,kBAAA;EH4X9C;AG3XmC;EAAW,kBAAA;EH8X9C;AG7XmC;EAAW,kBAAA;EHgY9C;AG/XmC;EAAW,kBAAA;EHkY9C;AGjYmC;EAAW,kBAAA;EHoY9C;AGnYmC;EAAW,kBAAA;EHsY9C;AGrYmC;EAAW,kBAAA;EHwY9C;AGvYmC;EAAW,kBAAA;EH0Y9C;AGzYmC;EAAW,kBAAA;EH4Y9C;AG3YmC;EAAW,kBAAA;EH8Y9C;AG7YmC;EAAW,kBAAA;EHgZ9C;AG/YmC;EAAW,kBAAA;EHkZ9C;AGjZmC;EAAW,kBAAA;EHoZ9C;AGnZmC;EAAW,kBAAA;EHsZ9C;AGrZmC;EAAW,kBAAA;EHwZ9C;AGvZmC;EAAW,kBAAA;EH0Z9C;AGzZmC;EAAW,kBAAA;EH4Z9C;AG3ZmC;EAAW,kBAAA;EH8Z9C;AG7ZmC;EAAW,kBAAA;EHga9C;AG/ZmC;EAAW,kBAAA;EHka9C;AGjamC;EAAW,kBAAA;EHoa9C;AGnamC;EAAW,kBAAA;EHsa9C;AGramC;EAAW,kBAAA;EHwa9C;AGvamC;EAAW,kBAAA;EH0a9C;AGzamC;EAAW,kBAAA;EH4a9C;AG3amC;EAAW,kBAAA;EH8a9C;AG7amC;EAAW,kBAAA;EHgb9C;AG/amC;EAAW,kBAAA;EHkb9C;AGjbmC;EAAW,kBAAA;EHob9C;AGnbmC;EAAW,kBAAA;EHsb9C;AGrbmC;EAAW,kBAAA;EHwb9C;AGvbmC;EAAW,kBAAA;EH0b9C;AGzbmC;EAAW,kBAAA;EH4b9C;AG3bmC;EAAW,kBAAA;EH8b9C;AG7bmC;EAAW,kBAAA;EHgc9C;AG/bmC;EAAW,kBAAA;EHkc9C;AGjcmC;EAAW,kBAAA;EHoc9C;AGncmC;EAAW,kBAAA;EHsc9C;AGrcmC;EAAW,kBAAA;EHwc9C;AGvcmC;EAAW,kBAAA;EH0c9C;AGzcmC;EAAW,kBAAA;EH4c9C;AG3cmC;EAAW,kBAAA;EH8c9C;AG7cmC;EAAW,kBAAA;EHgd9C;AG/cmC;EAAW,kBAAA;EHkd9C;AGjdmC;EAAW,kBAAA;EHod9C;AGndmC;EAAW,kBAAA;EHsd9C;AGrdmC;EAAW,kBAAA;EHwd9C;AGvdmC;EAAW,kBAAA;EH0d9C;AGzdmC;EAAW,kBAAA;EH4d9C;AG3dmC;EAAW,kBAAA;EH8d9C;AG7dmC;EAAW,kBAAA;EHge9C;AG/dmC;EAAW,kBAAA;EHke9C;AGjemC;EAAW,kBAAA;EHoe9C;AGnemC;EAAW,kBAAA;EHse9C;AGremC;EAAW,kBAAA;EHwe9C;AGvemC;EAAW,kBAAA;EH0e9C;AGzemC;EAAW,kBAAA;EH4e9C;AG3emC;EAAW,kBAAA;EH8e9C;AG7emC;EAAW,kBAAA;EHgf9C;AG/emC;EAAW,kBAAA;EHkf9C;AGjfmC;EAAW,kBAAA;EHof9C;AGnfmC;EAAW,kBAAA;EHsf9C;AGrfmC;EAAW,kBAAA;EHwf9C;AGvfmC;EAAW,kBAAA;EH0f9C;AGzfmC;EAAW,kBAAA;EH4f9C;AG3fmC;EAAW,kBAAA;EH8f9C;AG7fmC;EAAW,kBAAA;EHggB9C;AG/fmC;EAAW,kBAAA;EHkgB9C;AGjgBmC;EAAW,kBAAA;EHogB9C;AGngBmC;EAAW,kBAAA;EHsgB9C;AGrgBmC;EAAW,kBAAA;EHwgB9C;AGvgBmC;EAAW,kBAAA;EH0gB9C;AGzgBmC;EAAW,kBAAA;EH4gB9C;AG3gBmC;EAAW,kBAAA;EH8gB9C;AG7gBmC;EAAW,kBAAA;EHghB9C;AG/gBmC;EAAW,kBAAA;EHkhB9C;AGjhBmC;EAAW,kBAAA;EHohB9C;AGnhBmC;EAAW,kBAAA;EHshB9C;AGrhBmC;EAAW,kBAAA;EHwhB9C;AGvhBmC;EAAW,kBAAA;EH0hB9C;AGzhBmC;EAAW,kBAAA;EH4hB9C;AG3hBmC;EAAW,kBAAA;EH8hB9C;AG7hBmC;EAAW,kBAAA;EHgiB9C;AG/hBmC;EAAW,kBAAA;EHkiB9C;AGjiBmC;EAAW,kBAAA;EHoiB9C;AGniBmC;EAAW,kBAAA;EHsiB9C;AGriBmC;EAAW,kBAAA;EHwiB9C;AGviBmC;EAAW,kBAAA;EH0iB9C;AGziBmC;EAAW,kBAAA;EH4iB9C;AG3iBmC;EAAW,kBAAA;EH8iB9C;AG7iBmC;EAAW,kBAAA;EHgjB9C;AG/iBmC;EAAW,kBAAA;EHkjB9C;AGjjBmC;EAAW,kBAAA;EHojB9C;AGnjBmC;EAAW,kBAAA;EHsjB9C;AGrjBmC;EAAW,kBAAA;EHwjB9C;AGvjBmC;EAAW,kBAAA;EH0jB9C;AGzjBmC;EAAW,kBAAA;EH4jB9C;AG3jBmC;EAAW,kBAAA;EH8jB9C;AG7jBmC;EAAW,kBAAA;EHgkB9C;AG/jBmC;EAAW,kBAAA;EHkkB9C;AGjkBmC;EAAW,kBAAA;EHokB9C;AGnkBmC;EAAW,kBAAA;EHskB9C;AGrkBmC;EAAW,kBAAA;EHwkB9C;AGvkBmC;EAAW,kBAAA;EH0kB9C;AGzkBmC;EAAW,kBAAA;EH4kB9C;AG3kBmC;EAAW,kBAAA;EH8kB9C;AG7kBmC;EAAW,kBAAA;EHglB9C;AG/kBmC;EAAW,kBAAA;EHklB9C;AGjlBmC;EAAW,kBAAA;EHolB9C;AGnlBmC;EAAW,kBAAA;EHslB9C;AGrlBmC;EAAW,kBAAA;EHwlB9C;AGvlBmC;EAAW,kBAAA;EH0lB9C;AGzlBmC;EAAW,kBAAA;EH4lB9C;AG3lBmC;EAAW,kBAAA;EH8lB9C;AG7lBmC;EAAW,kBAAA;EHgmB9C;AG/lBmC;EAAW,kBAAA;EHkmB9C;AGjmBmC;EAAW,kBAAA;EHomB9C;AGnmBmC;EAAW,kBAAA;EHsmB9C;AGrmBmC;EAAW,kBAAA;EHwmB9C;AGvmBmC;EAAW,kBAAA;EH0mB9C;AGzmBmC;EAAW,kBAAA;EH4mB9C;AG3mBmC;EAAW,kBAAA;EH8mB9C;AG7mBmC;EAAW,kBAAA;EHgnB9C;AG/mBmC;EAAW,kBAAA;EHknB9C;AGjnBmC;EAAW,kBAAA;EHonB9C;AGnnBmC;EAAW,kBAAA;EHsnB9C;AGrnBmC;EAAW,kBAAA;EHwnB9C;AGvnBmC;EAAW,kBAAA;EH0nB9C;AGznBmC;EAAW,kBAAA;EH4nB9C;AG3nBmC;EAAW,kBAAA;EH8nB9C;AI71BD;ECgEE,gCAAA;EACG,6BAAA;EACK,wBAAA;ELgyBT;AI/1BD;;EC6DE,gCAAA;EACG,6BAAA;EACK,wBAAA;ELsyBT;AI71BD;EACE,iBAAA;EACA,+CAAA;EJ+1BD;AI51BD;EACE,6DAAA;EACA,iBAAA;EACA,yBAAA;EACA,gBAAA;EACA,2BAAA;EJ81BD;AI11BD;;;;EAIE,sBAAA;EACA,oBAAA;EACA,sBAAA;EJ41BD;AIt1BD;EACE,gBAAA;EACA,uBAAA;EJw1BD;AIt1BC;;EAEE,gBAAA;EACA,4BAAA;EJw1BH;AIr1BC;EErDA,sBAAA;EAEA,4CAAA;EACA,sBAAA;EN44BD;AI/0BD;EACE,WAAA;EJi1BD;AI30BD;EACE,wBAAA;EJ60BD;AIz0BD;;;;;EGvEE,gBAAA;EACA,iBAAA;EACA,cAAA;EPu5BD;AI70BD;EACE,oBAAA;EJ+0BD;AIz0BD;EACE,cAAA;EACA,yBAAA;EACA,2BAAA;EACA,2BAAA;EACA,oBAAA;EC6FA,0CAAA;EACK,qCAAA;EACG,kCAAA;EEvLR,uBAAA;EACA,iBAAA;EACA,cAAA;EPu6BD;AIz0BD;EACE,oBAAA;EJ20BD;AIr0BD;EACE,kBAAA;EACA,qBAAA;EACA,WAAA;EACA,+BAAA;EJu0BD;AI/zBD;EACE,oBAAA;EACA,YAAA;EACA,aAAA;EACA,cAAA;EACA,YAAA;EACA,kBAAA;EACA,wBAAA;EACA,WAAA;EJi0BD;AIzzBC;;EAEE,kBAAA;EACA,aAAA;EACA,cAAA;EACA,WAAA;EACA,mBAAA;EACA,YAAA;EJ2zBH;AQt8BD;;;;;;;;;;;;EAEE,sBAAA;EACA,kBAAA;EACA,kBAAA;EACA,gBAAA;ERk9BD;AQv9BD;;;;;;;;;;;;;;;;;;;;;;;;EASI,qBAAA;EACA,gBAAA;EACA,gBAAA;ERw+BH;AQp+BD;;;;;;EAGE,kBAAA;EACA,qBAAA;ERy+BD;AQ7+BD;;;;;;;;;;;;EAQI,gBAAA;ERm/BH;AQh/BD;;;;;;EAGE,kBAAA;EACA,qBAAA;ERq/BD;AQz/BD;;;;;;;;;;;;EAQI,gBAAA;ER+/BH;AQ3/BD;;EAAU,iBAAA;ER+/BT;AQ9/BD;;EAAU,iBAAA;ERkgCT;AQjgCD;;EAAU,iBAAA;ERqgCT;AQpgCD;;EAAU,iBAAA;ERwgCT;AQvgCD;;EAAU,iBAAA;ER2gCT;AQ1gCD;;EAAU,iBAAA;ER8gCT;AQxgCD;EACE,kBAAA;ER0gCD;AQvgCD;EACE,qBAAA;EACA,iBAAA;EACA,kBAAA;EACA,kBAAA;ERygCD;AQpgCD;EAAA;IAFI,iBAAA;IR0gCD;EACF;AQlgCD;;EAEE,gBAAA;ERogCD;AQjgCD;;EAEE,2BAAA;EACA,eAAA;ERmgCD;AQ//BD;EAAuB,kBAAA;ERkgCtB;AQjgCD;EAAuB,mBAAA;ERogCtB;AQngCD;EAAuB,oBAAA;ERsgCtB;AQrgCD;EAAuB,qBAAA;ERwgCtB;AQvgCD;EAAuB,qBAAA;ER0gCtB;AQvgCD;EAAuB,2BAAA;ER0gCtB;AQzgCD;EAAuB,2BAAA;ER4gCtB;AQ3gCD;EAAuB,4BAAA;ER8gCtB;AQ3gCD;EACE,gBAAA;ER6gCD;AQ3gCD;ECrGE,gBAAA;ETmnCD;ASlnCC;EACE,gBAAA;ETonCH;AQ9gCD;ECxGE,gBAAA;ETynCD;ASxnCC;EACE,gBAAA;ET0nCH;AQjhCD;EC3GE,gBAAA;ET+nCD;AS9nCC;EACE,gBAAA;ETgoCH;AQphCD;EC9GE,gBAAA;ETqoCD;ASpoCC;EACE,gBAAA;ETsoCH;AQvhCD;ECjHE,gBAAA;ET2oCD;AS1oCC;EACE,gBAAA;ET4oCH;AQthCD;EAGE,aAAA;EE3HA,2BAAA;EVkpCD;AUjpCC;EACE,2BAAA;EVmpCH;AQvhCD;EE9HE,2BAAA;EVwpCD;AUvpCC;EACE,2BAAA;EVypCH;AQ1hCD;EEjIE,2BAAA;EV8pCD;AU7pCC;EACE,2BAAA;EV+pCH;AQ7hCD;EEpIE,2BAAA;EVoqCD;AUnqCC;EACE,2BAAA;EVqqCH;AQhiCD;EEvIE,2BAAA;EV0qCD;AUzqCC;EACE,2BAAA;EV2qCH;AQ9hCD;EACE,qBAAA;EACA,qBAAA;EACA,kCAAA;ERgiCD;AQxhCD;;EAEE,eAAA;EACA,qBAAA;ER0hCD;AQ7hCD;;;;EAMI,kBAAA;ER6hCH;AQthCD;EACE,iBAAA;EACA,kBAAA;ERwhCD;AQphCD;EALE,iBAAA;EACA,kBAAA;EAMA,mBAAA;ERuhCD;AQzhCD;EAKI,uBAAA;EACA,mBAAA;EACA,oBAAA;ERuhCH;AQlhCD;EACE,eAAA;EACA,qBAAA;ERohCD;AQlhCD;;EAEE,yBAAA;ERohCD;AQlhCD;EACE,mBAAA;ERohCD;AQlhCD;EACE,gBAAA;ERohCD;AQ3/BD;EAAA;IAVM,aAAA;IACA,cAAA;IACA,aAAA;IACA,mBAAA;IGtNJ,kBAAA;IACA,yBAAA;IACA,qBAAA;IXguCC;EQrgCH;IAHM,oBAAA;IR2gCH;EACF;AQlgCD;;EAGE,cAAA;EACA,mCAAA;ERmgCD;AQjgCD;EACE,gBAAA;EACA,2BAAA;ERmgCD;AQ//BD;EACE,oBAAA;EACA,kBAAA;EACA,mBAAA;EACA,gCAAA;ERigCD;AQ5/BG;;;EACE,kBAAA;ERggCL;AQ1gCD;;;EAmBI,gBAAA;EACA,gBAAA;EACA,yBAAA;EACA,gBAAA;ER4/BH;AQ1/BG;;;EACE,wBAAA;ER8/BL;AQt/BD;;EAEE,qBAAA;EACA,iBAAA;EACA,iCAAA;EACA,gBAAA;EACA,mBAAA;ERw/BD;AQl/BG;;;;;;EAAW,aAAA;ER0/Bd;AQz/BG;;;;;;EACE,wBAAA;ERggCL;AQ1/BD;EACE,qBAAA;EACA,oBAAA;EACA,yBAAA;ER4/BD;AYlyCD;;;;EAIE,gEAAA;EZoyCD;AYhyCD;EACE,kBAAA;EACA,gBAAA;EACA,gBAAA;EACA,2BAAA;EACA,oBAAA;EZkyCD;AY9xCD;EACE,kBAAA;EACA,gBAAA;EACA,gBAAA;EACA,2BAAA;EACA,oBAAA;EACA,wDAAA;UAAA,gDAAA;EZgyCD;AYtyCD;EASI,YAAA;EACA,iBAAA;EACA,mBAAA;EACA,0BAAA;UAAA,kBAAA;EZgyCH;AY3xCD;EACE,gBAAA;EACA,gBAAA;EACA,kBAAA;EACA,iBAAA;EACA,yBAAA;EACA,uBAAA;EACA,uBAAA;EACA,gBAAA;EACA,2BAAA;EACA,2BAAA;EACA,oBAAA;EZ6xCD;AYxyCD;EAeI,YAAA;EACA,oBAAA;EACA,gBAAA;EACA,uBAAA;EACA,+BAAA;EACA,kBAAA;EZ4xCH;AYvxCD;EACE,mBAAA;EACA,oBAAA;EZyxCD;Aan1CD;ECHE,oBAAA;EACA,mBAAA;EACA,oBAAA;EACA,qBAAA;Edy1CD;Aan1CC;EAAA;IAFE,cAAA;Iby1CD;EACF;Aar1CC;EAAA;IAFE,cAAA;Ib21CD;EACF;Aav1CD;EAAA;IAFI,eAAA;Ib61CD;EACF;Aap1CD;ECvBE,oBAAA;EACA,mBAAA;EACA,oBAAA;EACA,qBAAA;Ed82CD;Aaj1CD;ECvBE,oBAAA;EACA,qBAAA;Ed22CD;Ae32CG;EACE,oBAAA;EAEA,iBAAA;EAEA,oBAAA;EACA,qBAAA;Ef22CL;Ae31CG;EACE,aAAA;Ef61CL;Aet1CC;EACE,aAAA;Efw1CH;Aez1CC;EACE,qBAAA;Ef21CH;Ae51CC;EACE,qBAAA;Ef81CH;Ae/1CC;EACE,YAAA;Efi2CH;Ael2CC;EACE,qBAAA;Efo2CH;Aer2CC;EACE,qBAAA;Efu2CH;Aex2CC;EACE,YAAA;Ef02CH;Ae32CC;EACE,qBAAA;Ef62CH;Ae92CC;EACE,qBAAA;Efg3CH;Aej3CC;EACE,YAAA;Efm3CH;Aep3CC;EACE,qBAAA;Efs3CH;Aev3CC;EACE,oBAAA;Efy3CH;Ae32CC;EACE,aAAA;Ef62CH;Ae92CC;EACE,qBAAA;Efg3CH;Aej3CC;EACE,qBAAA;Efm3CH;Aep3CC;EACE,YAAA;Efs3CH;Aev3CC;EACE,qBAAA;Efy3CH;Ae13CC;EACE,qBAAA;Ef43CH;Ae73CC;EACE,YAAA;Ef+3CH;Aeh4CC;EACE,qBAAA;Efk4CH;Aen4CC;EACE,qBAAA;Efq4CH;Aet4CC;EACE,YAAA;Efw4CH;Aez4CC;EACE,qBAAA;Ef24CH;Ae54CC;EACE,oBAAA;Ef84CH;Ae14CC;EACE,aAAA;Ef44CH;Ae55CC;EACE,YAAA;Ef85CH;Ae/5CC;EACE,oBAAA;Efi6CH;Ael6CC;EACE,oBAAA;Efo6CH;Aer6CC;EACE,WAAA;Efu6CH;Aex6CC;EACE,oBAAA;Ef06CH;Ae36CC;EACE,oBAAA;Ef66CH;Ae96CC;EACE,WAAA;Efg7CH;Aej7CC;EACE,oBAAA;Efm7CH;Aep7CC;EACE,oBAAA;Efs7CH;Aev7CC;EACE,WAAA;Efy7CH;Ae17CC;EACE,oBAAA;Ef47CH;Ae77CC;EACE,mBAAA;Ef+7CH;Ae37CC;EACE,YAAA;Ef67CH;Ae/6CC;EACE,mBAAA;Efi7CH;Ael7CC;EACE,2BAAA;Efo7CH;Aer7CC;EACE,2BAAA;Efu7CH;Aex7CC;EACE,kBAAA;Ef07CH;Ae37CC;EACE,2BAAA;Ef67CH;Ae97CC;EACE,2BAAA;Efg8CH;Aej8CC;EACE,kBAAA;Efm8CH;Aep8CC;EACE,2BAAA;Efs8CH;Aev8CC;EACE,2BAAA;Efy8CH;Ae18CC;EACE,kBAAA;Ef48CH;Ae78CC;EACE,2BAAA;Ef+8CH;Aeh9CC;EACE,0BAAA;Efk9CH;Aen9CC;EACE,iBAAA;Efq9CH;Aaz9CD;EE9BI;IACE,aAAA;If0/CH;Een/CD;IACE,aAAA;Ifq/CD;Eet/CD;IACE,qBAAA;Ifw/CD;Eez/CD;IACE,qBAAA;If2/CD;Ee5/CD;IACE,YAAA;If8/CD;Ee//CD;IACE,qBAAA;IfigDD;EelgDD;IACE,qBAAA;IfogDD;EergDD;IACE,YAAA;IfugDD;EexgDD;IACE,qBAAA;If0gDD;Ee3gDD;IACE,qBAAA;If6gDD;Ee9gDD;IACE,YAAA;IfghDD;EejhDD;IACE,qBAAA;IfmhDD;EephDD;IACE,oBAAA;IfshDD;EexgDD;IACE,aAAA;If0gDD;Ee3gDD;IACE,qBAAA;If6gDD;Ee9gDD;IACE,qBAAA;IfghDD;EejhDD;IACE,YAAA;IfmhDD;EephDD;IACE,qBAAA;IfshDD;EevhDD;IACE,qBAAA;IfyhDD;Ee1hDD;IACE,YAAA;If4hDD;Ee7hDD;IACE,qBAAA;If+hDD;EehiDD;IACE,qBAAA;IfkiDD;EeniDD;IACE,YAAA;IfqiDD;EetiDD;IACE,qBAAA;IfwiDD;EeziDD;IACE,oBAAA;If2iDD;EeviDD;IACE,aAAA;IfyiDD;EezjDD;IACE,YAAA;If2jDD;Ee5jDD;IACE,oBAAA;If8jDD;Ee/jDD;IACE,oBAAA;IfikDD;EelkDD;IACE,WAAA;IfokDD;EerkDD;IACE,oBAAA;IfukDD;EexkDD;IACE,oBAAA;If0kDD;Ee3kDD;IACE,WAAA;If6kDD;Ee9kDD;IACE,oBAAA;IfglDD;EejlDD;IACE,oBAAA;IfmlDD;EeplDD;IACE,WAAA;IfslDD;EevlDD;IACE,oBAAA;IfylDD;Ee1lDD;IACE,mBAAA;If4lDD;EexlDD;IACE,YAAA;If0lDD;Ee5kDD;IACE,mBAAA;If8kDD;Ee/kDD;IACE,2BAAA;IfilDD;EellDD;IACE,2BAAA;IfolDD;EerlDD;IACE,kBAAA;IfulDD;EexlDD;IACE,2BAAA;If0lDD;Ee3lDD;IACE,2BAAA;If6lDD;Ee9lDD;IACE,kBAAA;IfgmDD;EejmDD;IACE,2BAAA;IfmmDD;EepmDD;IACE,2BAAA;IfsmDD;EevmDD;IACE,kBAAA;IfymDD;Ee1mDD;IACE,2BAAA;If4mDD;Ee7mDD;IACE,0BAAA;If+mDD;EehnDD;IACE,iBAAA;IfknDD;EACF;Aa9mDD;EEvCI;IACE,aAAA;IfwpDH;EejpDD;IACE,aAAA;IfmpDD;EeppDD;IACE,qBAAA;IfspDD;EevpDD;IACE,qBAAA;IfypDD;Ee1pDD;IACE,YAAA;If4pDD;Ee7pDD;IACE,qBAAA;If+pDD;EehqDD;IACE,qBAAA;IfkqDD;EenqDD;IACE,YAAA;IfqqDD;EetqDD;IACE,qBAAA;IfwqDD;EezqDD;IACE,qBAAA;If2qDD;Ee5qDD;IACE,YAAA;If8qDD;Ee/qDD;IACE,qBAAA;IfirDD;EelrDD;IACE,oBAAA;IforDD;EetqDD;IACE,aAAA;IfwqDD;EezqDD;IACE,qBAAA;If2qDD;Ee5qDD;IACE,qBAAA;If8qDD;Ee/qDD;IACE,YAAA;IfirDD;EelrDD;IACE,qBAAA;IforDD;EerrDD;IACE,qBAAA;IfurDD;EexrDD;IACE,YAAA;If0rDD;Ee3rDD;IACE,qBAAA;If6rDD;Ee9rDD;IACE,qBAAA;IfgsDD;EejsDD;IACE,YAAA;IfmsDD;EepsDD;IACE,qBAAA;IfssDD;EevsDD;IACE,oBAAA;IfysDD;EersDD;IACE,aAAA;IfusDD;EevtDD;IACE,YAAA;IfytDD;Ee1tDD;IACE,oBAAA;If4tDD;Ee7tDD;IACE,oBAAA;If+tDD;EehuDD;IACE,WAAA;IfkuDD;EenuDD;IACE,oBAAA;IfquDD;EetuDD;IACE,oBAAA;IfwuDD;EezuDD;IACE,WAAA;If2uDD;Ee5uDD;IACE,oBAAA;If8uDD;Ee/uDD;IACE,oBAAA;IfivDD;EelvDD;IACE,WAAA;IfovDD;EervDD;IACE,oBAAA;IfuvDD;EexvDD;IACE,mBAAA;If0vDD;EetvDD;IACE,YAAA;IfwvDD;Ee1uDD;IACE,mBAAA;If4uDD;Ee7uDD;IACE,2BAAA;If+uDD;EehvDD;IACE,2BAAA;IfkvDD;EenvDD;IACE,kBAAA;IfqvDD;EetvDD;IACE,2BAAA;IfwvDD;EezvDD;IACE,2BAAA;If2vDD;Ee5vDD;IACE,kBAAA;If8vDD;Ee/vDD;IACE,2BAAA;IfiwDD;EelwDD;IACE,2BAAA;IfowDD;EerwDD;IACE,kBAAA;IfuwDD;EexwDD;IACE,2BAAA;If0wDD;Ee3wDD;IACE,0BAAA;If6wDD;Ee9wDD;IACE,iBAAA;IfgxDD;EACF;AarwDD;EE9CI;IACE,aAAA;IfszDH;Ee/yDD;IACE,aAAA;IfizDD;EelzDD;IACE,qBAAA;IfozDD;EerzDD;IACE,qBAAA;IfuzDD;EexzDD;IACE,YAAA;If0zDD;Ee3zDD;IACE,qBAAA;If6zDD;Ee9zDD;IACE,qBAAA;Ifg0DD;Eej0DD;IACE,YAAA;Ifm0DD;Eep0DD;IACE,qBAAA;Ifs0DD;Eev0DD;IACE,qBAAA;Ify0DD;Ee10DD;IACE,YAAA;If40DD;Ee70DD;IACE,qBAAA;If+0DD;Eeh1DD;IACE,oBAAA;Ifk1DD;Eep0DD;IACE,aAAA;Ifs0DD;Eev0DD;IACE,qBAAA;Ify0DD;Ee10DD;IACE,qBAAA;If40DD;Ee70DD;IACE,YAAA;If+0DD;Eeh1DD;IACE,qBAAA;Ifk1DD;Een1DD;IACE,qBAAA;Ifq1DD;Eet1DD;IACE,YAAA;Ifw1DD;Eez1DD;IACE,qBAAA;If21DD;Ee51DD;IACE,qBAAA;If81DD;Ee/1DD;IACE,YAAA;Ifi2DD;Eel2DD;IACE,qBAAA;Ifo2DD;Eer2DD;IACE,oBAAA;Ifu2DD;Een2DD;IACE,aAAA;Ifq2DD;Eer3DD;IACE,YAAA;Ifu3DD;Eex3DD;IACE,oBAAA;If03DD;Ee33DD;IACE,oBAAA;If63DD;Ee93DD;IACE,WAAA;Ifg4DD;Eej4DD;IACE,oBAAA;Ifm4DD;Eep4DD;IACE,oBAAA;Ifs4DD;Eev4DD;IACE,WAAA;Ify4DD;Ee14DD;IACE,oBAAA;If44DD;Ee74DD;IACE,oBAAA;If+4DD;Eeh5DD;IACE,WAAA;Ifk5DD;Een5DD;IACE,oBAAA;Ifq5DD;Eet5DD;IACE,mBAAA;Ifw5DD;Eep5DD;IACE,YAAA;Ifs5DD;Eex4DD;IACE,mBAAA;If04DD;Ee34DD;IACE,2BAAA;If64DD;Ee94DD;IACE,2BAAA;Ifg5DD;Eej5DD;IACE,kBAAA;Ifm5DD;Eep5DD;IACE,2BAAA;Ifs5DD;Eev5DD;IACE,2BAAA;Ify5DD;Ee15DD;IACE,kBAAA;If45DD;Ee75DD;IACE,2BAAA;If+5DD;Eeh6DD;IACE,2BAAA;Ifk6DD;Een6DD;IACE,kBAAA;Ifq6DD;Eet6DD;IACE,2BAAA;Ifw6DD;Eez6DD;IACE,0BAAA;If26DD;Ee56DD;IACE,iBAAA;If86DD;EACF;AgBl/DD;EACE,+BAAA;EhBo/DD;AgBl/DD;EACE,kBAAA;EACA,qBAAA;EACA,gBAAA;EACA,kBAAA;EhBo/DD;AgBl/DD;EACE,kBAAA;EhBo/DD;AgB9+DD;EACE,aAAA;EACA,iBAAA;EACA,qBAAA;EhBg/DD;AgBn/DD;;;;;;EAWQ,cAAA;EACA,yBAAA;EACA,qBAAA;EACA,+BAAA;EhBg/DP;AgB9/DD;EAoBI,wBAAA;EACA,kCAAA;EhB6+DH;AgBlgED;;;;;;EA8BQ,eAAA;EhB4+DP;AgB1gED;EAoCI,+BAAA;EhBy+DH;AgB7gED;EAyCI,2BAAA;EhBu+DH;AgBh+DD;;;;;;EAOQ,cAAA;EhBi+DP;AgBt9DD;EACE,2BAAA;EhBw9DD;AgBz9DD;;;;;;EAQQ,2BAAA;EhBy9DP;AgBj+DD;;EAeM,0BAAA;EhBs9DL;AgB58DD;EAEI,2BAAA;EhB68DH;AgBp8DD;EAEI,2BAAA;EhBq8DH;AgB57DD;EACE,kBAAA;EACA,aAAA;EACA,uBAAA;EhB87DD;AgBz7DG;;EACE,kBAAA;EACA,aAAA;EACA,qBAAA;EhB47DL;AiBxkEC;;;;;;;;;;;;EAOI,2BAAA;EjB+kEL;AiBzkEC;;;;;EAMI,2BAAA;EjB0kEL;AiB7lEC;;;;;;;;;;;;EAOI,2BAAA;EjBomEL;AiB9lEC;;;;;EAMI,2BAAA;EjB+lEL;AiBlnEC;;;;;;;;;;;;EAOI,2BAAA;EjBynEL;AiBnnEC;;;;;EAMI,2BAAA;EjBonEL;AiBvoEC;;;;;;;;;;;;EAOI,2BAAA;EjB8oEL;AiBxoEC;;;;;EAMI,2BAAA;EjByoEL;AiB5pEC;;;;;;;;;;;;EAOI,2BAAA;EjBmqEL;AiB7pEC;;;;;EAMI,2BAAA;EjB8pEL;AgB5gED;EACE,kBAAA;EACA,mBAAA;EhB8gED;AgBj9DD;EAAA;IA1DI,aAAA;IACA,qBAAA;IACA,oBAAA;IACA,8CAAA;IACA,2BAAA;IhB+gED;EgBz9DH;IAlDM,kBAAA;IhB8gEH;EgB59DH;;;;;;IAzCY,qBAAA;IhB6gET;EgBp+DH;IAjCM,WAAA;IhBwgEH;EgBv+DH;;;;;;IAxBY,gBAAA;IhBugET;EgB/+DH;;;;;;IApBY,iBAAA;IhB2gET;EgBv/DH;;;;IAPY,kBAAA;IhBogET;EACF;AkB9tED;EACE,YAAA;EACA,WAAA;EACA,WAAA;EAIA,cAAA;ElB6tED;AkB1tED;EACE,gBAAA;EACA,aAAA;EACA,YAAA;EACA,qBAAA;EACA,iBAAA;EACA,sBAAA;EACA,gBAAA;EACA,WAAA;EACA,kCAAA;ElB4tED;AkBztED;EACE,uBAAA;EACA,iBAAA;EACA,oBAAA;EACA,mBAAA;ElB2tED;AkBhtED;Eb4BE,gCAAA;EACG,6BAAA;EACK,wBAAA;ELurET;AkBhtED;;EAEE,iBAAA;EACA,oBAAA;EACA,qBAAA;ElBktED;AkB9sED;EACE,gBAAA;ElBgtED;AkB5sED;EACE,gBAAA;EACA,aAAA;ElB8sED;AkB1sED;;EAEE,cAAA;ElB4sED;AkBxsED;;;EZxEE,sBAAA;EAEA,4CAAA;EACA,sBAAA;ENoxED;AkBxsED;EACE,gBAAA;EACA,kBAAA;EACA,iBAAA;EACA,yBAAA;EACA,gBAAA;ElB0sED;AkBhrED;EACE,gBAAA;EACA,aAAA;EACA,cAAA;EACA,mBAAA;EACA,iBAAA;EACA,yBAAA;EACA,gBAAA;EACA,2BAAA;EACA,wBAAA;EACA,2BAAA;EACA,oBAAA;EbzDA,0DAAA;EACQ,kDAAA;EAyHR,wFAAA;EACK,2EAAA;EACG,wEAAA;ELonET;AmB5vEC;EACE,uBAAA;EACA,YAAA;EdUF,wFAAA;EACQ,gFAAA;ELqvET;AKptEC;EACE,gBAAA;EACA,YAAA;ELstEH;AKptEC;EAA0B,gBAAA;ELutE3B;AKttEC;EAAgC,gBAAA;ELytEjC;AkBxrEC;;;EAGE,qBAAA;EACA,2BAAA;EACA,YAAA;ElB0rEH;AkBtrEC;EACE,cAAA;ElBwrEH;AkB5qED;EACE,0BAAA;ElB8qED;AkBlqED;;;;EAIE,mBAAA;EAEA,4BAAA;ElBmqED;AkBjqEC;;;;EACE,mBAAA;EACA,qBAAA;ElBsqEH;AkBpqEC;;;;EACE,mBAAA;EACA,sBAAA;ElByqEH;AkBpqED;;;;;;;;EAIE,yBAAA;ElB0qED;AkBxqEC;;;;;;;;EACE,kBAAA;ElBirEH;AkB/qEC;;;;;;;;EACE,mBAAA;ElBwrEH;AkB9qED;EACE,qBAAA;ElBgrED;AkBxqED;;EAEE,oBAAA;EACA,gBAAA;EACA,kBAAA;EACA,qBAAA;ElB0qED;AkB/qED;;EAQI,kBAAA;EACA,oBAAA;EACA,kBAAA;EACA,qBAAA;EACA,iBAAA;ElB2qEH;AkBxqED;;;;EAIE,oBAAA;EACA,oBAAA;EACA,oBAAA;ElB0qED;AkBvqED;;EAEE,kBAAA;ElByqED;AkBrqED;;EAEE,uBAAA;EACA,oBAAA;EACA,kBAAA;EACA,wBAAA;EACA,qBAAA;EACA,iBAAA;ElBuqED;AkBrqED;;EAEE,eAAA;EACA,mBAAA;ElBuqED;AkB9pEC;;;;;;EAGE,qBAAA;ElBmqEH;AkB7pEC;;;;EAEE,qBAAA;ElBiqEH;AkB3pEC;;;;EAGI,qBAAA;ElB8pEL;AkBnpED;EAEE,kBAAA;EACA,qBAAA;EAEA,kBAAA;ElBmpED;AkBjpEC;;EAEE,iBAAA;EACA,kBAAA;ElBmpEH;AkBzoED;;EChQE,cAAA;EACA,mBAAA;EACA,iBAAA;EACA,kBAAA;EACA,oBAAA;EnB64ED;AmB34EC;;EACE,cAAA;EACA,mBAAA;EnB84EH;AmB34EC;;;;EAEE,cAAA;EnB+4EH;AkBvpED;;ECrQE,cAAA;EACA,oBAAA;EACA,iBAAA;EACA,mBAAA;EACA,oBAAA;EnBg6ED;AmB95EC;;EACE,cAAA;EACA,mBAAA;EnBi6EH;AmB95EC;;;;EAEE,cAAA;EnBk6EH;AkBhqED;EAEE,oBAAA;ElBiqED;AkBnqED;EAMI,uBAAA;ElBgqEH;AkB5pED;EACE,oBAAA;EACA,QAAA;EACA,UAAA;EACA,YAAA;EACA,gBAAA;EACA,aAAA;EACA,cAAA;EACA,mBAAA;EACA,oBAAA;EACA,sBAAA;ElB8pED;AkB5pED;EACE,aAAA;EACA,cAAA;EACA,mBAAA;ElB8pED;AkB5pED;EACE,aAAA;EACA,cAAA;EACA,mBAAA;ElB8pED;AkB1pED;;;;;;;;;;ECrWI,gBAAA;EnB2gFH;AkBtqED;ECjWI,uBAAA;Ed+CF,0DAAA;EACQ,kDAAA;EL49ET;AmB1gFG;EACE,uBAAA;Ed4CJ,2EAAA;EACQ,mEAAA;ELi+ET;AkBhrED;ECvVI,gBAAA;EACA,uBAAA;EACA,2BAAA;EnB0gFH;AkBrrED;ECjVI,gBAAA;EnBygFH;AkBrrED;;;;;;;;;;ECxWI,gBAAA;EnByiFH;AkBjsED;ECpWI,uBAAA;Ed+CF,0DAAA;EACQ,kDAAA;EL0/ET;AmBxiFG;EACE,uBAAA;Ed4CJ,2EAAA;EACQ,mEAAA;EL+/ET;AkB3sED;EC1VI,gBAAA;EACA,uBAAA;EACA,2BAAA;EnBwiFH;AkBhtED;ECpVI,gBAAA;EnBuiFH;AkBhtED;;;;;;;;;;EC3WI,gBAAA;EnBukFH;AkB5tED;ECvWI,uBAAA;Ed+CF,0DAAA;EACQ,kDAAA;ELwhFT;AmBtkFG;EACE,uBAAA;Ed4CJ,2EAAA;EACQ,mEAAA;EL6hFT;AkBtuED;EC7VI,gBAAA;EACA,uBAAA;EACA,2BAAA;EnBskFH;AkB3uED;ECvVI,gBAAA;EnBqkFH;AkBvuEC;EACG,WAAA;ElByuEJ;AkBvuEC;EACG,QAAA;ElByuEJ;AkB/tED;EACE,gBAAA;EACA,iBAAA;EACA,qBAAA;EACA,gBAAA;ElBiuED;AkB7oED;EAAA;IA/DM,uBAAA;IACA,kBAAA;IACA,wBAAA;IlBgtEH;EkBnpEH;IAxDM,uBAAA;IACA,aAAA;IACA,wBAAA;IlB8sEH;EkBxpEH;IAjDM,uBAAA;IlB4sEH;EkB3pEH;IA7CM,uBAAA;IACA,wBAAA;IlB2sEH;EkB/pEH;;;IAvCQ,aAAA;IlB2sEL;EkBpqEH;IAjCM,aAAA;IlBwsEH;EkBvqEH;IA7BM,kBAAA;IACA,wBAAA;IlBusEH;EkB3qEH;;IApBM,uBAAA;IACA,eAAA;IACA,kBAAA;IACA,wBAAA;IlBmsEH;EkBlrEH;;IAdQ,iBAAA;IlBosEL;EkBtrEH;;IATM,oBAAA;IACA,gBAAA;IlBmsEH;EkB3rEH;IAHM,QAAA;IlBisEH;EACF;AkBvrED;;;;EASI,eAAA;EACA,kBAAA;EACA,kBAAA;ElBorEH;AkB/rED;;EAiBI,kBAAA;ElBkrEH;AkBnsED;EJleE,oBAAA;EACA,qBAAA;EdwqFD;AkBpqEC;EAAA;IANI,mBAAA;IACA,kBAAA;IACA,kBAAA;IlB8qEH;EACF;AkB9sED;EAwCI,aAAA;ElByqEH;AkB5pEC;EAAA;IAHM,qBAAA;IlBmqEL;EACF;AkB1pEC;EAAA;IAHM,kBAAA;IlBiqEL;EACF;AoBpsFD;EACE,uBAAA;EACA,kBAAA;EACA,qBAAA;EACA,oBAAA;EACA,wBAAA;EACA,gCAAA;MAAA,4BAAA;EACA,iBAAA;EACA,wBAAA;EACA,+BAAA;EACA,qBAAA;EC6BA,mBAAA;EACA,iBAAA;EACA,yBAAA;EACA,oBAAA;EhB4KA,2BAAA;EACG,wBAAA;EACC,uBAAA;EACI,mBAAA;EL+/ET;AoBvsFG;;;;;;EdrBF,sBAAA;EAEA,4CAAA;EACA,sBAAA;ENmuFD;AoB3sFC;;;EAGE,gBAAA;EACA,uBAAA;EpB6sFH;AoB1sFC;;EAEE,YAAA;EACA,wBAAA;Ef2BF,0DAAA;EACQ,kDAAA;ELkrFT;AoB1sFC;;;EAGE,qBAAA;EACA,sBAAA;EE9CF,eAAA;EAGA,2BAAA;EjB8DA,0BAAA;EACQ,kBAAA;EL4rFT;AoBtsFD;ECrDE,gBAAA;EACA,2BAAA;EACA,uBAAA;ErB8vFD;AqB5vFC;;;;;;EAME,gBAAA;EACA,2BAAA;EACI,uBAAA;ErB8vFP;AqB5vFC;;;EAGE,wBAAA;ErB8vFH;AqBzvFG;;;;;;;;;;;;;;;;;;EAME,2BAAA;EACI,uBAAA;ErBuwFT;AoB/uFD;ECnBI,gBAAA;EACA,2BAAA;ErBqwFH;AoBhvFD;ECxDE,gBAAA;EACA,2BAAA;EACA,uBAAA;ErB2yFD;AqBzyFC;;;;;;EAME,gBAAA;EACA,2BAAA;EACI,uBAAA;ErB2yFP;AqBzyFC;;;EAGE,wBAAA;ErB2yFH;AqBtyFG;;;;;;;;;;;;;;;;;;EAME,2BAAA;EACI,uBAAA;ErBozFT;AoBzxFD;ECtBI,gBAAA;EACA,2BAAA;ErBkzFH;AoBzxFD;EC5DE,gBAAA;EACA,2BAAA;EACA,uBAAA;ErBw1FD;AqBt1FC;;;;;;EAME,gBAAA;EACA,2BAAA;EACI,uBAAA;ErBw1FP;AqBt1FC;;;EAGE,wBAAA;ErBw1FH;AqBn1FG;;;;;;;;;;;;;;;;;;EAME,2BAAA;EACI,uBAAA;ErBi2FT;AoBl0FD;EC1BI,gBAAA;EACA,2BAAA;ErB+1FH;AoBl0FD;EChEE,gBAAA;EACA,2BAAA;EACA,uBAAA;ErBq4FD;AqBn4FC;;;;;;EAME,gBAAA;EACA,2BAAA;EACI,uBAAA;ErBq4FP;AqBn4FC;;;EAGE,wBAAA;ErBq4FH;AqBh4FG;;;;;;;;;;;;;;;;;;EAME,2BAAA;EACI,uBAAA;ErB84FT;AoB32FD;EC9BI,gBAAA;EACA,2BAAA;ErB44FH;AoB32FD;ECpEE,gBAAA;EACA,2BAAA;EACA,uBAAA;ErBk7FD;AqBh7FC;;;;;;EAME,gBAAA;EACA,2BAAA;EACI,uBAAA;ErBk7FP;AqBh7FC;;;EAGE,wBAAA;ErBk7FH;AqB76FG;;;;;;;;;;;;;;;;;;EAME,2BAAA;EACI,uBAAA;ErB27FT;AoBp5FD;EClCI,gBAAA;EACA,2BAAA;ErBy7FH;AoBp5FD;ECxEE,gBAAA;EACA,2BAAA;EACA,uBAAA;ErB+9FD;AqB79FC;;;;;;EAME,gBAAA;EACA,2BAAA;EACI,uBAAA;ErB+9FP;AqB79FC;;;EAGE,wBAAA;ErB+9FH;AqB19FG;;;;;;;;;;;;;;;;;;EAME,2BAAA;EACI,uBAAA;ErBw+FT;AoB77FD;ECtCI,gBAAA;EACA,2BAAA;ErBs+FH;AoBx7FD;EACE,gBAAA;EACA,qBAAA;EACA,kBAAA;EpB07FD;AoBx7FC;;;;;EAKE,+BAAA;Ef7BF,0BAAA;EACQ,kBAAA;ELw9FT;AoBz7FC;;;;EAIE,2BAAA;EpB27FH;AoBz7FC;;EAEE,gBAAA;EACA,4BAAA;EACA,+BAAA;EpB27FH;AoBv7FG;;;;EAEE,gBAAA;EACA,uBAAA;EpB27FL;AoBl7FD;;EC/EE,oBAAA;EACA,iBAAA;EACA,mBAAA;EACA,oBAAA;ErBqgGD;AoBr7FD;;ECnFE,mBAAA;EACA,iBAAA;EACA,kBAAA;EACA,oBAAA;ErB4gGD;AoBx7FD;;ECvFE,kBAAA;EACA,iBAAA;EACA,kBAAA;EACA,oBAAA;ErBmhGD;AoBv7FD;EACE,gBAAA;EACA,aAAA;EpBy7FD;AoBr7FD;EACE,iBAAA;EpBu7FD;AoBh7FC;;;EACE,aAAA;EpBo7FH;AuBxkGD;EACE,YAAA;ElBoLA,0CAAA;EACK,qCAAA;EACG,kCAAA;ELu5FT;AuB3kGC;EACE,YAAA;EvB6kGH;AuBzkGD;EACE,eAAA;EACA,oBAAA;EvB2kGD;AuBzkGC;EAAY,gBAAA;EAAgB,qBAAA;EvB6kG7B;AuB5kGC;EAAY,oBAAA;EvB+kGb;AuB9kGC;EAAY,0BAAA;EvBilGb;AuB9kGD;EACE,oBAAA;EACA,WAAA;EACA,kBAAA;ElBsKA,iDAAA;EACQ,4CAAA;KAAA,yCAAA;EAOR,oCAAA;EACQ,+BAAA;KAAA,4BAAA;EAGR,0CAAA;EACQ,qCAAA;KAAA,kCAAA;ELm6FT;AwB7mGD;EACE,uBAAA;EACA,UAAA;EACA,WAAA;EACA,kBAAA;EACA,wBAAA;EACA,uBAAA;EACA,qCAAA;EACA,oCAAA;ExB+mGD;AwB3mGD;EACE,oBAAA;ExB6mGD;AwBzmGD;EACE,YAAA;ExB2mGD;AwBvmGD;EACE,oBAAA;EACA,WAAA;EACA,SAAA;EACA,eAAA;EACA,eAAA;EACA,aAAA;EACA,kBAAA;EACA,gBAAA;EACA,iBAAA;EACA,kBAAA;EACA,iBAAA;EACA,kBAAA;EACA,2BAAA;EACA,2BAAA;EACA,uCAAA;EACA,oBAAA;EnBwBA,qDAAA;EACQ,6CAAA;EmBvBR,sCAAA;UAAA,8BAAA;ExB0mGD;AwBrmGC;EACE,UAAA;EACA,YAAA;ExBumGH;AwBhoGD;ECvBE,aAAA;EACA,eAAA;EACA,kBAAA;EACA,2BAAA;EzB0pGD;AwBtoGD;EAmCI,gBAAA;EACA,mBAAA;EACA,aAAA;EACA,qBAAA;EACA,yBAAA;EACA,gBAAA;EACA,qBAAA;ExBsmGH;AwBhmGC;;EAEE,uBAAA;EACA,gBAAA;EACA,2BAAA;ExBkmGH;AwB5lGC;;;EAGE,gBAAA;EACA,uBAAA;EACA,YAAA;EACA,2BAAA;ExB8lGH;AwBrlGC;;;EAGE,gBAAA;ExBulGH;AwBnlGC;;EAEE,uBAAA;EACA,+BAAA;EACA,wBAAA;EEzGF,qEAAA;EF2GE,qBAAA;ExBqlGH;AwBhlGD;EAGI,gBAAA;ExBglGH;AwBnlGD;EAQI,YAAA;ExB8kGH;AwBtkGD;EACE,YAAA;EACA,UAAA;ExBwkGD;AwBhkGD;EACE,SAAA;EACA,aAAA;ExBkkGD;AwB9jGD;EACE,gBAAA;EACA,mBAAA;EACA,iBAAA;EACA,yBAAA;EACA,gBAAA;EACA,qBAAA;ExBgkGD;AwB5jGD;EACE,iBAAA;EACA,SAAA;EACA,UAAA;EACA,WAAA;EACA,QAAA;EACA,cAAA;ExB8jGD;AwB1jGD;EACE,UAAA;EACA,YAAA;ExB4jGD;AwBpjGD;;EAII,eAAA;EACA,0BAAA;EACA,aAAA;ExBojGH;AwB1jGD;;EAUI,WAAA;EACA,cAAA;EACA,oBAAA;ExBojGH;AwB/hGD;EAXE;IAnEA,YAAA;IACA,UAAA;IxBinGC;EwB/iGD;IAzDA,SAAA;IACA,aAAA;IxB2mGC;EACF;A2BzvGD;;EAEE,oBAAA;EACA,uBAAA;EACA,wBAAA;E3B2vGD;A2B/vGD;;EAMI,oBAAA;EACA,aAAA;E3B6vGH;A2B3vGG;;;;;;;;EAIE,YAAA;E3BiwGL;A2B/vGG;;EAEE,YAAA;E3BiwGL;A2B3vGD;;;;EAKI,mBAAA;E3B4vGH;A2BvvGD;EACE,mBAAA;E3ByvGD;A2B1vGD;;EAMI,aAAA;E3BwvGH;A2B9vGD;;;EAWI,kBAAA;E3BwvGH;A2BpvGD;EACE,kBAAA;E3BsvGD;A2BlvGD;EACE,gBAAA;E3BovGD;A2BnvGC;ECrDA,+BAAA;EACG,4BAAA;E5B2yGJ;A2BlvGD;;EClDE,8BAAA;EACG,2BAAA;E5BwyGJ;A2BjvGD;EACE,aAAA;E3BmvGD;A2BjvGD;EACE,kBAAA;E3BmvGD;A2BjvGD;;ECtEE,+BAAA;EACG,4BAAA;E5B2zGJ;A2BhvGD;ECpEE,8BAAA;EACG,2BAAA;E5BuzGJ;A2B/uGD;;EAEE,YAAA;E3BivGD;A2BhuGD;EACE,mBAAA;EACA,oBAAA;E3BkuGD;A2BhuGD;EACE,oBAAA;EACA,qBAAA;E3BkuGD;A2B7tGD;EtBlDE,0DAAA;EACQ,kDAAA;ELkxGT;A2B7tGC;EtBtDA,0BAAA;EACQ,kBAAA;ELsxGT;A2B1tGD;EACE,gBAAA;E3B4tGD;A2BztGD;EACE,yBAAA;EACA,wBAAA;E3B2tGD;A2BxtGD;EACE,yBAAA;E3B0tGD;A2BntGD;;;EAII,gBAAA;EACA,aAAA;EACA,aAAA;EACA,iBAAA;E3BotGH;A2B3tGD;EAcM,aAAA;E3BgtGL;A2B9tGD;;;;EAsBI,kBAAA;EACA,gBAAA;E3B8sGH;A2BzsGC;EACE,kBAAA;E3B2sGH;A2BzsGC;EACE,8BAAA;ECvKF,+BAAA;EACC,8BAAA;E5Bm3GF;A2B1sGC;EACE,gCAAA;ECnLF,4BAAA;EACC,2BAAA;E5Bg4GF;A2B1sGD;EACE,kBAAA;E3B4sGD;A2B1sGD;;EClLE,+BAAA;EACC,8BAAA;E5Bg4GF;A2BzsGD;EChME,4BAAA;EACC,2BAAA;E5B44GF;A2BrsGD;EACE,gBAAA;EACA,aAAA;EACA,qBAAA;EACA,2BAAA;E3BusGD;A2B3sGD;;EAOI,aAAA;EACA,qBAAA;EACA,WAAA;E3BwsGH;A2BjtGD;EAYI,aAAA;E3BwsGH;A2BptGD;EAgBI,YAAA;E3BusGH;A2BtrGD;;;;EAKM,oBAAA;EACA,wBAAA;EACA,sBAAA;E3BurGL;A6Bp6GD;EACE,oBAAA;EACA,gBAAA;EACA,2BAAA;E7Bs6GD;A6Bn6GC;EACE,aAAA;EACA,iBAAA;EACA,kBAAA;E7Bq6GH;A6B96GD;EAeI,oBAAA;EACA,YAAA;EAKA,aAAA;EAEA,aAAA;EACA,kBAAA;E7B65GH;A6Bp5GD;;;EV8BE,cAAA;EACA,oBAAA;EACA,iBAAA;EACA,mBAAA;EACA,oBAAA;EnB23GD;AmBz3GC;;;EACE,cAAA;EACA,mBAAA;EnB63GH;AmB13GC;;;;;;EAEE,cAAA;EnBg4GH;A6Bt6GD;;;EVyBE,cAAA;EACA,mBAAA;EACA,iBAAA;EACA,kBAAA;EACA,oBAAA;EnBk5GD;AmBh5GC;;;EACE,cAAA;EACA,mBAAA;EnBo5GH;AmBj5GC;;;;;;EAEE,cAAA;EnBu5GH;A6Bp7GD;;;EAGE,qBAAA;E7Bs7GD;A6Bp7GC;;;EACE,kBAAA;E7Bw7GH;A6Bp7GD;;EAEE,WAAA;EACA,qBAAA;EACA,wBAAA;E7Bs7GD;A6Bj7GD;EACE,mBAAA;EACA,iBAAA;EACA,qBAAA;EACA,gBAAA;EACA,gBAAA;EACA,oBAAA;EACA,2BAAA;EACA,2BAAA;EACA,oBAAA;E7Bm7GD;A6Bh7GC;EACE,mBAAA;EACA,iBAAA;EACA,oBAAA;E7Bk7GH;A6Bh7GC;EACE,oBAAA;EACA,iBAAA;EACA,oBAAA;E7Bk7GH;A6Bt8GD;;EA0BI,eAAA;E7Bg7GH;A6B36GD;;;;;;;EDhGE,+BAAA;EACG,4BAAA;E5BohHJ;A6B56GD;EACE,iBAAA;E7B86GD;A6B56GD;;;;;;;EDpGE,8BAAA;EACG,2BAAA;E5ByhHJ;A6B76GD;EACE,gBAAA;E7B+6GD;A6B16GD;EACE,oBAAA;EAGA,cAAA;EACA,qBAAA;E7B06GD;A6B/6GD;EAUI,oBAAA;E7Bw6GH;A6Bl7GD;EAYM,mBAAA;E7By6GL;A6Bt6GG;;;EAGE,YAAA;E7Bw6GL;A6Bn6GC;;EAGI,oBAAA;E7Bo6GL;A6Bj6GC;;EAGI,mBAAA;E7Bk6GL;A8B5jHD;EACE,kBAAA;EACA,iBAAA;EACA,kBAAA;E9B8jHD;A8BjkHD;EAOI,oBAAA;EACA,gBAAA;E9B6jHH;A8BrkHD;EAWM,oBAAA;EACA,gBAAA;EACA,oBAAA;E9B6jHL;A8B5jHK;;EAEE,uBAAA;EACA,2BAAA;E9B8jHP;A8BzjHG;EACE,gBAAA;E9B2jHL;A8BzjHK;;EAEE,gBAAA;EACA,uBAAA;EACA,+BAAA;EACA,qBAAA;E9B2jHP;A8BpjHG;;;EAGE,2BAAA;EACA,uBAAA;E9BsjHL;A8B/lHD;ELHE,aAAA;EACA,eAAA;EACA,kBAAA;EACA,2BAAA;EzBqmHD;A8BrmHD;EA0DI,iBAAA;E9B8iHH;A8BriHD;EACE,kCAAA;E9BuiHD;A8BxiHD;EAGI,aAAA;EAEA,qBAAA;E9BuiHH;A8B5iHD;EASM,mBAAA;EACA,yBAAA;EACA,+BAAA;EACA,4BAAA;E9BsiHL;A8BriHK;EACE,uCAAA;E9BuiHP;A8BjiHK;;;EAGE,gBAAA;EACA,2BAAA;EACA,2BAAA;EACA,kCAAA;EACA,iBAAA;E9BmiHP;A8B9hHC;EAqDA,aAAA;EA8BA,kBAAA;E9B+8GD;A8BliHC;EAwDE,aAAA;E9B6+GH;A8BriHC;EA0DI,oBAAA;EACA,oBAAA;E9B8+GL;A8BziHC;EAgEE,WAAA;EACA,YAAA;E9B4+GH;A8Bh+GD;EAAA;IAPM,qBAAA;IACA,WAAA;I9B2+GH;E8Br+GH;IAJQ,kBAAA;I9B4+GL;EACF;A8BtjHC;EAuFE,iBAAA;EACA,oBAAA;E9Bk+GH;A8B1jHC;;;EA8FE,2BAAA;E9Bi+GH;A8Bn9GD;EAAA;IATM,kCAAA;IACA,4BAAA;I9Bg+GH;E8Bx9GH;;;IAHM,8BAAA;I9Bg+GH;EACF;A8BjkHD;EAEI,aAAA;E9BkkHH;A8BpkHD;EAMM,oBAAA;E9BikHL;A8BvkHD;EASM,kBAAA;E9BikHL;A8B5jHK;;;EAGE,gBAAA;EACA,2BAAA;E9B8jHP;A8BtjHD;EAEI,aAAA;E9BujHH;A8BzjHD;EAIM,iBAAA;EACA,gBAAA;E9BwjHL;A8B5iHD;EACE,aAAA;E9B8iHD;A8B/iHD;EAII,aAAA;E9B8iHH;A8BljHD;EAMM,oBAAA;EACA,oBAAA;E9B+iHL;A8BtjHD;EAYI,WAAA;EACA,YAAA;E9B6iHH;A8BjiHD;EAAA;IAPM,qBAAA;IACA,WAAA;I9B4iHH;E8BtiHH;IAJQ,kBAAA;I9B6iHL;EACF;A8BriHD;EACE,kBAAA;E9BuiHD;A8BxiHD;EAKI,iBAAA;EACA,oBAAA;E9BsiHH;A8B5iHD;;;EAYI,2BAAA;E9BqiHH;A8BvhHD;EAAA;IATM,kCAAA;IACA,4BAAA;I9BoiHH;E8B5hHH;;;IAHM,8BAAA;I9BoiHH;EACF;A8B3hHD;EAEI,eAAA;EACA,oBAAA;E9B4hHH;A8B/hHD;EAMI,gBAAA;EACA,qBAAA;E9B4hHH;A8BnhHD;EAEE,kBAAA;EF7OA,4BAAA;EACC,2BAAA;E5BkwHF;A+B5vHD;EACE,oBAAA;EACA,kBAAA;EACA,qBAAA;EACA,+BAAA;E/B8vHD;A+BtvHD;EAAA;IAFI,oBAAA;I/B4vHD;EACF;A+B7uHD;EAAA;IAFI,aAAA;I/BmvHD;EACF;A+BruHD;EACE,qBAAA;EACA,qBAAA;EACA,oBAAA;EACA,mCAAA;EACA,4DAAA;UAAA,oDAAA;EAEA,mCAAA;E/BsuHD;A+BpuHC;EACE,kBAAA;E/BsuHH;A+BzsHD;EAAA;IAzBI,aAAA;IACA,eAAA;IACA,0BAAA;YAAA,kBAAA;I/BsuHD;E+BpuHC;IACE,2BAAA;IACA,gCAAA;IACA,yBAAA;IACA,mBAAA;IACA,8BAAA;I/BsuHH;E+BnuHC;IACE,qBAAA;I/BquHH;E+BhuHC;;;IAGE,iBAAA;IACA,kBAAA;I/BkuHH;EACF;A+B9tHD;;EAGI,mBAAA;E/B+tHH;A+B1tHC;EAAA;;IAFI,mBAAA;I/BiuHH;EACF;A+BxtHD;;;;EAII,qBAAA;EACA,oBAAA;E/B0tHH;A+BptHC;EAAA;;;;IAHI,iBAAA;IACA,gBAAA;I/B8tHH;EACF;A+BltHD;EACE,eAAA;EACA,uBAAA;E/BotHD;A+B/sHD;EAAA;IAFI,kBAAA;I/BqtHD;EACF;A+BjtHD;;EAEE,iBAAA;EACA,UAAA;EACA,SAAA;EACA,eAAA;E/BmtHD;A+B7sHD;EAAA;;IAFI,kBAAA;I/BotHD;EACF;A+BltHD;EACE,QAAA;EACA,uBAAA;E/BotHD;A+BltHD;EACE,WAAA;EACA,kBAAA;EACA,uBAAA;E/BotHD;A+B9sHD;EACE,aAAA;EACA,oBAAA;EACA,iBAAA;EACA,mBAAA;EACA,cAAA;E/BgtHD;A+B9sHC;;EAEE,uBAAA;E/BgtHH;A+BztHD;EAaI,gBAAA;E/B+sHH;A+BtsHD;EALI;;IAEE,oBAAA;I/B8sHH;EACF;A+BpsHD;EACE,oBAAA;EACA,cAAA;EACA,oBAAA;EACA,mBAAA;EC/LA,iBAAA;EACA,oBAAA;EDgMA,+BAAA;EACA,wBAAA;EACA,+BAAA;EACA,oBAAA;E/BusHD;A+BnsHC;EACE,YAAA;E/BqsHH;A+BntHD;EAmBI,gBAAA;EACA,aAAA;EACA,aAAA;EACA,oBAAA;E/BmsHH;A+BztHD;EAyBI,iBAAA;E/BmsHH;A+B7rHD;EAAA;IAFI,eAAA;I/BmsHD;EACF;A+B1rHD;EACE,qBAAA;E/B4rHD;A+B7rHD;EAII,mBAAA;EACA,sBAAA;EACA,mBAAA;E/B4rHH;A+BjqHC;EAAA;IArBI,kBAAA;IACA,aAAA;IACA,aAAA;IACA,eAAA;IACA,+BAAA;IACA,WAAA;IACA,0BAAA;YAAA,kBAAA;I/B0rHH;E+B3qHD;;IAZM,4BAAA;I/B2rHL;E+B/qHD;IATM,mBAAA;I/B2rHL;E+B1rHK;;IAEE,wBAAA;I/B4rHP;EACF;A+B1qHD;EAAA;IAXI,aAAA;IACA,WAAA;I/ByrHD;E+B/qHH;IAPM,aAAA;I/ByrHH;E+BlrHH;IALQ,mBAAA;IACA,sBAAA;I/B0rHL;EACF;A+B/qHD;EACE,oBAAA;EACA,qBAAA;EACA,oBAAA;EACA,mCAAA;EACA,sCAAA;E1B/NA,8FAAA;EACQ,sFAAA;E2B/DR,iBAAA;EACA,oBAAA;EhCi9HD;AkB/+GD;EAAA;IA/DM,uBAAA;IACA,kBAAA;IACA,wBAAA;IlBkjHH;EkBr/GH;IAxDM,uBAAA;IACA,aAAA;IACA,wBAAA;IlBgjHH;EkB1/GH;IAjDM,uBAAA;IlB8iHH;EkB7/GH;IA7CM,uBAAA;IACA,wBAAA;IlB6iHH;EkBjgHH;;;IAvCQ,aAAA;IlB6iHL;EkBtgHH;IAjCM,aAAA;IlB0iHH;EkBzgHH;IA7BM,kBAAA;IACA,wBAAA;IlByiHH;EkB7gHH;;IApBM,uBAAA;IACA,eAAA;IACA,kBAAA;IACA,wBAAA;IlBqiHH;EkBphHH;;IAdQ,iBAAA;IlBsiHL;EkBxhHH;;IATM,oBAAA;IACA,gBAAA;IlBqiHH;EkB7hHH;IAHM,QAAA;IlBmiHH;EACF;A+BxtHC;EAAA;IANI,oBAAA;I/BkuHH;E+BhuHG;IACE,kBAAA;I/BkuHL;EACF;A+BjtHD;EAAA;IARI,aAAA;IACA,WAAA;IACA,gBAAA;IACA,iBAAA;IACA,gBAAA;IACA,mBAAA;I1B1PF,0BAAA;IACQ,kBAAA;ILw9HP;EACF;A+BvtHD;EACE,eAAA;EHrUA,4BAAA;EACC,2BAAA;E5B+hIF;A+BvtHD;EHjUE,+BAAA;EACC,8BAAA;E5B2hIF;A+BltHD;EC/UE,iBAAA;EACA,oBAAA;EhCoiID;A+BntHC;EClVA,kBAAA;EACA,qBAAA;EhCwiID;A+BptHC;ECrVA,kBAAA;EACA,qBAAA;EhC4iID;A+B9sHD;EC/VE,kBAAA;EACA,qBAAA;EhCgjID;A+B1sHD;EAAA;IAJI,aAAA;IACA,mBAAA;IACA,oBAAA;I/BktHD;EACF;A+BzrHD;EAZE;IEvWA,wBAAA;IjCgjIC;E+BxsHD;IE3WA,yBAAA;IF6WE,qBAAA;I/B0sHD;E+B5sHD;IAKI,iBAAA;I/B0sHH;EACF;A+BjsHD;EACE,2BAAA;EACA,uBAAA;E/BmsHD;A+BrsHD;EAKI,gBAAA;E/BmsHH;A+BlsHG;;EAEE,gBAAA;EACA,+BAAA;E/BosHL;A+B7sHD;EAcI,gBAAA;E/BksHH;A+BhtHD;EAmBM,gBAAA;E/BgsHL;A+B9rHK;;EAEE,gBAAA;EACA,+BAAA;E/BgsHP;A+B5rHK;;;EAGE,gBAAA;EACA,2BAAA;E/B8rHP;A+B1rHK;;;EAGE,gBAAA;EACA,+BAAA;E/B4rHP;A+BpuHD;EA8CI,uBAAA;E/ByrHH;A+BxrHG;;EAEE,2BAAA;E/B0rHL;A+B3uHD;EAoDM,2BAAA;E/B0rHL;A+B9uHD;;EA0DI,uBAAA;E/BwrHH;A+BjrHK;;;EAGE,2BAAA;EACA,gBAAA;E/BmrHP;A+BlpHC;EAAA;IAzBQ,gBAAA;I/B+qHP;E+B9qHO;;IAEE,gBAAA;IACA,+BAAA;I/BgrHT;E+B5qHO;;;IAGE,gBAAA;IACA,2BAAA;I/B8qHT;E+B1qHO;;;IAGE,gBAAA;IACA,+BAAA;I/B4qHT;EACF;A+B9wHD;EA8GI,gBAAA;E/BmqHH;A+BlqHG;EACE,gBAAA;E/BoqHL;A+BpxHD;EAqHI,gBAAA;E/BkqHH;A+BjqHG;;EAEE,gBAAA;E/BmqHL;A+B/pHK;;;;EAEE,gBAAA;E/BmqHP;A+B3pHD;EACE,2BAAA;EACA,uBAAA;E/B6pHD;A+B/pHD;EAKI,gBAAA;E/B6pHH;A+B5pHG;;EAEE,gBAAA;EACA,+BAAA;E/B8pHL;A+BvqHD;EAcI,gBAAA;E/B4pHH;A+B1qHD;EAmBM,gBAAA;E/B0pHL;A+BxpHK;;EAEE,gBAAA;EACA,+BAAA;E/B0pHP;A+BtpHK;;;EAGE,gBAAA;EACA,2BAAA;E/BwpHP;A+BppHK;;;EAGE,gBAAA;EACA,+BAAA;E/BspHP;A+B9rHD;EA+CI,uBAAA;E/BkpHH;A+BjpHG;;EAEE,2BAAA;E/BmpHL;A+BrsHD;EAqDM,2BAAA;E/BmpHL;A+BxsHD;;EA2DI,uBAAA;E/BipHH;A+B3oHK;;;EAGE,2BAAA;EACA,gBAAA;E/B6oHP;A+BtmHC;EAAA;IA/BQ,uBAAA;I/ByoHP;E+B1mHD;IA5BQ,2BAAA;I/ByoHP;E+B7mHD;IAzBQ,gBAAA;I/ByoHP;E+BxoHO;;IAEE,gBAAA;IACA,+BAAA;I/B0oHT;E+BtoHO;;;IAGE,gBAAA;IACA,2BAAA;I/BwoHT;E+BpoHO;;;IAGE,gBAAA;IACA,+BAAA;I/BsoHT;EACF;A+B9uHD;EA+GI,gBAAA;E/BkoHH;A+BjoHG;EACE,gBAAA;E/BmoHL;A+BpvHD;EAsHI,gBAAA;E/BioHH;A+BhoHG;;EAEE,gBAAA;E/BkoHL;A+B9nHK;;;;EAEE,gBAAA;E/BkoHP;AkC3wID;EACE,mBAAA;EACA,qBAAA;EACA,kBAAA;EACA,2BAAA;EACA,oBAAA;ElC6wID;AkClxID;EAQI,uBAAA;ElC6wIH;AkCrxID;EAWM,mBAAA;EACA,gBAAA;EACA,gBAAA;ElC6wIL;AkC1xID;EAkBI,gBAAA;ElC2wIH;AmC/xID;EACE,uBAAA;EACA,iBAAA;EACA,gBAAA;EACA,oBAAA;EnCiyID;AmCryID;EAOI,iBAAA;EnCiyIH;AmCxyID;;EAUM,oBAAA;EACA,aAAA;EACA,mBAAA;EACA,yBAAA;EACA,uBAAA;EACA,gBAAA;EACA,2BAAA;EACA,2BAAA;EACA,mBAAA;EnCkyIL;AmChyIG;;EAGI,gBAAA;EPXN,gCAAA;EACG,6BAAA;E5B6yIJ;AmC/xIG;;EPvBF,iCAAA;EACG,8BAAA;E5B0zIJ;AmC1xIG;;;;EAEE,gBAAA;EACA,2BAAA;EACA,uBAAA;EnC8xIL;AmCxxIG;;;;;;EAGE,YAAA;EACA,gBAAA;EACA,2BAAA;EACA,uBAAA;EACA,iBAAA;EnC6xIL;AmCn1ID;;;;;;EAiEM,gBAAA;EACA,2BAAA;EACA,uBAAA;EACA,qBAAA;EnC0xIL;AmCjxID;;EC1EM,oBAAA;EACA,iBAAA;EpC+1IL;AoC71IG;;ERMF,gCAAA;EACG,6BAAA;E5B21IJ;AoC51IG;;ERRF,iCAAA;EACG,8BAAA;E5Bw2IJ;AmC3xID;;EC/EM,mBAAA;EACA,iBAAA;EpC82IL;AoC52IG;;ERMF,gCAAA;EACG,6BAAA;E5B02IJ;AoC32IG;;ERRF,iCAAA;EACG,8BAAA;E5Bu3IJ;AqC13ID;EACE,iBAAA;EACA,gBAAA;EACA,kBAAA;EACA,oBAAA;ErC43ID;AqCh4ID;EAOI,iBAAA;ErC43IH;AqCn4ID;;EAUM,uBAAA;EACA,mBAAA;EACA,2BAAA;EACA,2BAAA;EACA,qBAAA;ErC63IL;AqC34ID;;EAmBM,uBAAA;EACA,2BAAA;ErC43IL;AqCh5ID;;EA2BM,cAAA;ErCy3IL;AqCp5ID;;EAkCM,aAAA;ErCs3IL;AqCx5ID;;;;EA2CM,gBAAA;EACA,2BAAA;EACA,qBAAA;ErCm3IL;AsCj6ID;EACE,iBAAA;EACA,yBAAA;EACA,gBAAA;EACA,mBAAA;EACA,gBAAA;EACA,gBAAA;EACA,oBAAA;EACA,qBAAA;EACA,0BAAA;EACA,sBAAA;EtCm6ID;AsC/5IG;;EAEE,gBAAA;EACA,uBAAA;EACA,iBAAA;EtCi6IL;AsC55IC;EACE,eAAA;EtC85IH;AsC15IC;EACE,oBAAA;EACA,WAAA;EtC45IH;AsCr5ID;ECtCE,2BAAA;EvC87ID;AuC37IG;;EAEE,2BAAA;EvC67IL;AsCx5ID;EC1CE,2BAAA;EvCq8ID;AuCl8IG;;EAEE,2BAAA;EvCo8IL;AsC35ID;EC9CE,2BAAA;EvC48ID;AuCz8IG;;EAEE,2BAAA;EvC28IL;AsC95ID;EClDE,2BAAA;EvCm9ID;AuCh9IG;;EAEE,2BAAA;EvCk9IL;AsCj6ID;ECtDE,2BAAA;EvC09ID;AuCv9IG;;EAEE,2BAAA;EvCy9IL;AsCp6ID;EC1DE,2BAAA;EvCi+ID;AuC99IG;;EAEE,2BAAA;EvCg+IL;AwCl+ID;EACE,uBAAA;EACA,iBAAA;EACA,kBAAA;EACA,iBAAA;EACA,mBAAA;EACA,gBAAA;EACA,gBAAA;EACA,0BAAA;EACA,qBAAA;EACA,oBAAA;EACA,2BAAA;EACA,qBAAA;ExCo+ID;AwCj+IC;EACE,eAAA;ExCm+IH;AwC/9IC;EACE,oBAAA;EACA,WAAA;ExCi+IH;AwC/9IC;EACE,QAAA;EACA,kBAAA;ExCi+IH;AwC59IG;;EAEE,gBAAA;EACA,uBAAA;EACA,iBAAA;ExC89IL;AwCz9IC;;EAEE,gBAAA;EACA,2BAAA;ExC29IH;AwCz9IC;EACE,kBAAA;ExC29IH;AyC1gJD;EACE,oBAAA;EACA,qBAAA;EACA,gBAAA;EACA,2BAAA;EzC4gJD;AyChhJD;;EAQI,gBAAA;EzC4gJH;AyCphJD;EAWI,qBAAA;EACA,iBAAA;EACA,kBAAA;EzC4gJH;AyCzhJD;EAiBI,2BAAA;EzC2gJH;AyCxgJC;;EAEE,oBAAA;EzC0gJH;AyChiJD;EA0BI,iBAAA;EzCygJH;AyCz/ID;EAAA;IAZI,iBAAA;IzCygJD;EyCvgJC;IACE,oBAAA;IACA,qBAAA;IzCygJH;EyCjgJH;;IAHM,iBAAA;IzCwgJH;EACF;A0C/iJD;EACE,gBAAA;EACA,cAAA;EACA,qBAAA;EACA,yBAAA;EACA,2BAAA;EACA,2BAAA;EACA,oBAAA;ErCiLA,6CAAA;EACK,wCAAA;EACG,qCAAA;ELi4IT;A0C3jJD;;EAaI,mBAAA;EACA,oBAAA;E1CkjJH;A0C9iJC;;;EAGE,uBAAA;E1CgjJH;A0CrkJD;EA0BI,cAAA;EACA,gBAAA;E1C8iJH;A2CvkJD;EACE,eAAA;EACA,qBAAA;EACA,+BAAA;EACA,oBAAA;E3CykJD;A2C7kJD;EAQI,eAAA;EAEA,gBAAA;E3CukJH;A2CjlJD;EAcI,mBAAA;E3CskJH;A2CplJD;;EAoBI,kBAAA;E3CokJH;A2CxlJD;EAuBI,iBAAA;E3CokJH;A2C5jJD;;EAEE,qBAAA;E3C8jJD;A2ChkJD;;EAMI,oBAAA;EACA,WAAA;EACA,cAAA;EACA,gBAAA;E3C8jJH;A2CtjJD;ECrDE,2BAAA;EACA,uBAAA;EACA,gBAAA;E5C8mJD;A2C3jJD;EChDI,2BAAA;E5C8mJH;A2C9jJD;EC7CI,gBAAA;E5C8mJH;A2C9jJD;ECxDE,2BAAA;EACA,uBAAA;EACA,gBAAA;E5CynJD;A2CnkJD;ECnDI,2BAAA;E5CynJH;A2CtkJD;EChDI,gBAAA;E5CynJH;A2CtkJD;EC3DE,2BAAA;EACA,uBAAA;EACA,gBAAA;E5CooJD;A2C3kJD;ECtDI,2BAAA;E5CooJH;A2C9kJD;ECnDI,gBAAA;E5CooJH;A2C9kJD;EC9DE,2BAAA;EACA,uBAAA;EACA,gBAAA;E5C+oJD;A2CnlJD;ECzDI,2BAAA;E5C+oJH;A2CtlJD;ECtDI,gBAAA;E5C+oJH;A6CjpJD;EACE;IAAQ,6BAAA;I7CopJP;E6CnpJD;IAAQ,0BAAA;I7CspJP;EACF;A6CnpJD;EACE;IAAQ,6BAAA;I7CspJP;E6CrpJD;IAAQ,0BAAA;I7CwpJP;EACF;A6C3pJD;EACE;IAAQ,6BAAA;I7CspJP;E6CrpJD;IAAQ,0BAAA;I7CwpJP;EACF;A6CjpJD;EACE,kBAAA;EACA,cAAA;EACA,qBAAA;EACA,2BAAA;EACA,oBAAA;ExCsCA,wDAAA;EACQ,gDAAA;EL8mJT;A6ChpJD;EACE,aAAA;EACA,WAAA;EACA,cAAA;EACA,iBAAA;EACA,mBAAA;EACA,gBAAA;EACA,oBAAA;EACA,2BAAA;ExCyBA,wDAAA;EACQ,gDAAA;EAyHR,qCAAA;EACK,gCAAA;EACG,6BAAA;ELkgJT;A6C7oJD;;ECCI,+MAAA;EACA,0MAAA;EACA,uMAAA;EDAF,oCAAA;UAAA,4BAAA;E7CipJD;A6C1oJD;;ExC5CE,4DAAA;EACK,uDAAA;EACG,oDAAA;EL0rJT;A6CvoJD;EErEE,2BAAA;E/C+sJD;A+C5sJC;EDgDE,+MAAA;EACA,0MAAA;EACA,uMAAA;E9C+pJH;A6C3oJD;EEzEE,2BAAA;E/CutJD;A+CptJC;EDgDE,+MAAA;EACA,0MAAA;EACA,uMAAA;E9CuqJH;A6C/oJD;EE7EE,2BAAA;E/C+tJD;A+C5tJC;EDgDE,+MAAA;EACA,0MAAA;EACA,uMAAA;E9C+qJH;A6CnpJD;EEjFE,2BAAA;E/CuuJD;A+CpuJC;EDgDE,+MAAA;EACA,0MAAA;EACA,uMAAA;E9CurJH;AgD/uJD;EAEE,kBAAA;EhDgvJD;AgD9uJC;EACE,eAAA;EhDgvJH;AgD5uJD;;EAEE,oBAAA;EhD8uJD;AgD3uJD;;EAEE,qBAAA;EhD6uJD;AgD1uJD;;;EAGE,qBAAA;EACA,qBAAA;EhD4uJD;AgDzuJD;EACE,wBAAA;EhD2uJD;AgDxuJD;EACE,wBAAA;EhD0uJD;AgDtuJD;EACE,eAAA;EACA,oBAAA;EhDwuJD;AgDluJD;EACE,iBAAA;EACA,kBAAA;EhDouJD;AiDxwJD;EAEE,qBAAA;EACA,iBAAA;EjDywJD;AiDjwJD;EACE,oBAAA;EACA,gBAAA;EACA,oBAAA;EAEA,qBAAA;EACA,2BAAA;EACA,2BAAA;EjDkwJD;AiD/vJC;ErB3BA,8BAAA;EACC,6BAAA;E5B6xJF;AiDhwJC;EACE,kBAAA;ErBvBF,iCAAA;EACC,gCAAA;E5B0xJF;AiDlxJD;EAoBI,cAAA;EjDiwJH;AiDrxJD;EAuBI,mBAAA;EjDiwJH;AiDvvJD;EACE,gBAAA;EjDyvJD;AiD1vJD;EAII,gBAAA;EjDyvJH;AiDrvJC;;EAEE,uBAAA;EACA,gBAAA;EACA,2BAAA;EjDuvJH;AiDjvJC;;;EAGE,2BAAA;EACA,gBAAA;EACA,qBAAA;EjDmvJH;AiDxvJC;;;EASI,gBAAA;EjDovJL;AiD7vJC;;;EAYI,gBAAA;EjDsvJL;AiDjvJC;;;EAGE,YAAA;EACA,gBAAA;EACA,2BAAA;EACA,uBAAA;EjDmvJH;AiDzvJC;;;;;;;;;EAYI,gBAAA;EjDwvJL;AiDpwJC;;;EAeI,gBAAA;EjD0vJL;AkD91JC;EACE,gBAAA;EACA,2BAAA;ElDg2JH;AkD91JG;EACE,gBAAA;ElDg2JL;AkDj2JG;EAII,gBAAA;ElDg2JP;AkD71JK;;EAEE,gBAAA;EACA,2BAAA;ElD+1JP;AkD71JK;;;EAGE,aAAA;EACA,2BAAA;EACA,uBAAA;ElD+1JP;AkDp3JC;EACE,gBAAA;EACA,2BAAA;ElDs3JH;AkDp3JG;EACE,gBAAA;ElDs3JL;AkDv3JG;EAII,gBAAA;ElDs3JP;AkDn3JK;;EAEE,gBAAA;EACA,2BAAA;ElDq3JP;AkDn3JK;;;EAGE,aAAA;EACA,2BAAA;EACA,uBAAA;ElDq3JP;AkD14JC;EACE,gBAAA;EACA,2BAAA;ElD44JH;AkD14JG;EACE,gBAAA;ElD44JL;AkD74JG;EAII,gBAAA;ElD44JP;AkDz4JK;;EAEE,gBAAA;EACA,2BAAA;ElD24JP;AkDz4JK;;;EAGE,aAAA;EACA,2BAAA;EACA,uBAAA;ElD24JP;AkDh6JC;EACE,gBAAA;EACA,2BAAA;ElDk6JH;AkDh6JG;EACE,gBAAA;ElDk6JL;AkDn6JG;EAII,gBAAA;ElDk6JP;AkD/5JK;;EAEE,gBAAA;EACA,2BAAA;ElDi6JP;AkD/5JK;;;EAGE,aAAA;EACA,2BAAA;EACA,uBAAA;ElDi6JP;AiD7zJD;EACE,eAAA;EACA,oBAAA;EjD+zJD;AiD7zJD;EACE,kBAAA;EACA,kBAAA;EjD+zJD;AmD37JD;EACE,qBAAA;EACA,2BAAA;EACA,+BAAA;EACA,oBAAA;E9C0DA,mDAAA;EACQ,2CAAA;ELo4JT;AmD17JD;EACE,eAAA;EnD47JD;AmDv7JD;EACE,oBAAA;EACA,sCAAA;EvBpBA,8BAAA;EACC,6BAAA;E5B88JF;AmD77JD;EAMI,gBAAA;EnD07JH;AmDr7JD;EACE,eAAA;EACA,kBAAA;EACA,iBAAA;EACA,gBAAA;EnDu7JD;AmD37JD;EAOI,gBAAA;EnDu7JH;AmDl7JD;EACE,oBAAA;EACA,2BAAA;EACA,+BAAA;EvBpCA,iCAAA;EACC,gCAAA;E5By9JF;AmD56JD;;EAGI,kBAAA;EnD66JH;AmDh7JD;;EAMM,qBAAA;EACA,kBAAA;EnD86JL;AmD16JG;;EAEI,eAAA;EvBnEN,8BAAA;EACC,6BAAA;E5Bg/JF;AmDz6JG;;EAEI,kBAAA;EvBlEN,iCAAA;EACC,gCAAA;E5B8+JF;AmDt6JD;EAEI,qBAAA;EnDu6JH;AmDp6JD;EACE,qBAAA;EnDs6JD;AmD95JD;;;EAII,kBAAA;EnD+5JH;AmDn6JD;;;EAOM,oBAAA;EACA,qBAAA;EnDi6JL;AmDz6JD;;EvB/FE,8BAAA;EACC,6BAAA;E5B4gKF;AmD96JD;;;;EAmBQ,6BAAA;EACA,8BAAA;EnDi6JP;AmDr7JD;;;;;;;;EAwBU,6BAAA;EnDu6JT;AmD/7JD;;;;;;;;EA4BU,8BAAA;EnD66JT;AmDz8JD;;EvBvFE,iCAAA;EACC,gCAAA;E5BoiKF;AmD98JD;;;;EAyCQ,gCAAA;EACA,iCAAA;EnD26JP;AmDr9JD;;;;;;;;EA8CU,gCAAA;EnDi7JT;AmD/9JD;;;;;;;;EAkDU,iCAAA;EnDu7JT;AmDz+JD;;;;EA2DI,+BAAA;EnDo7JH;AmD/+JD;;EA+DI,eAAA;EnDo7JH;AmDn/JD;;EAmEI,WAAA;EnDo7JH;AmDv/JD;;;;;;;;;;;;EA0EU,gBAAA;EnD27JT;AmDrgKD;;;;;;;;;;;;EA8EU,iBAAA;EnDq8JT;AmDnhKD;;;;;;;;EAuFU,kBAAA;EnDs8JT;AmD7hKD;;;;;;;;EAgGU,kBAAA;EnDu8JT;AmDviKD;EAsGI,WAAA;EACA,kBAAA;EnDo8JH;AmD17JD;EACE,qBAAA;EnD47JD;AmD77JD;EAKI,kBAAA;EACA,oBAAA;EnD27JH;AmDj8JD;EASM,iBAAA;EnD27JL;AmDp8JD;EAcI,kBAAA;EnDy7JH;AmDv8JD;;EAkBM,+BAAA;EnDy7JL;AmD38JD;EAuBI,eAAA;EnDu7JH;AmD98JD;EAyBM,kCAAA;EnDw7JL;AmDj7JD;EChPE,uBAAA;EpDoqKD;AoDlqKC;EACE,gBAAA;EACA,2BAAA;EACA,uBAAA;EpDoqKH;AoDvqKC;EAMI,2BAAA;EpDoqKL;AoD1qKC;EASI,gBAAA;EACA,2BAAA;EpDoqKL;AoDjqKC;EAEI,8BAAA;EpDkqKL;AmDh8JD;ECnPE,uBAAA;EpDsrKD;AoDprKC;EACE,gBAAA;EACA,2BAAA;EACA,uBAAA;EpDsrKH;AoDzrKC;EAMI,2BAAA;EpDsrKL;AoD5rKC;EASI,gBAAA;EACA,2BAAA;EpDsrKL;AoDnrKC;EAEI,8BAAA;EpDorKL;AmD/8JD;ECtPE,uBAAA;EpDwsKD;AoDtsKC;EACE,gBAAA;EACA,2BAAA;EACA,uBAAA;EpDwsKH;AoD3sKC;EAMI,2BAAA;EpDwsKL;AoD9sKC;EASI,gBAAA;EACA,2BAAA;EpDwsKL;AoDrsKC;EAEI,8BAAA;EpDssKL;AmD99JD;ECzPE,uBAAA;EpD0tKD;AoDxtKC;EACE,gBAAA;EACA,2BAAA;EACA,uBAAA;EpD0tKH;AoD7tKC;EAMI,2BAAA;EpD0tKL;AoDhuKC;EASI,gBAAA;EACA,2BAAA;EpD0tKL;AoDvtKC;EAEI,8BAAA;EpDwtKL;AmD7+JD;EC5PE,uBAAA;EpD4uKD;AoD1uKC;EACE,gBAAA;EACA,2BAAA;EACA,uBAAA;EpD4uKH;AoD/uKC;EAMI,2BAAA;EpD4uKL;AoDlvKC;EASI,gBAAA;EACA,2BAAA;EpD4uKL;AoDzuKC;EAEI,8BAAA;EpD0uKL;AmD5/JD;EC/PE,uBAAA;EpD8vKD;AoD5vKC;EACE,gBAAA;EACA,2BAAA;EACA,uBAAA;EpD8vKH;AoDjwKC;EAMI,2BAAA;EpD8vKL;AoDpwKC;EASI,gBAAA;EACA,2BAAA;EpD8vKL;AoD3vKC;EAEI,8BAAA;EpD4vKL;AqD5wKD;EACE,oBAAA;EACA,gBAAA;EACA,WAAA;EACA,YAAA;EACA,kBAAA;ErD8wKD;AqDnxKD;;;;;EAYI,oBAAA;EACA,QAAA;EACA,SAAA;EACA,WAAA;EACA,cAAA;EACA,aAAA;EACA,WAAA;ErD8wKH;AqD1wKC;EACE,wBAAA;ErD4wKH;AqDxwKC;EACE,qBAAA;ErD0wKH;AsDpyKD;EACE,kBAAA;EACA,eAAA;EACA,qBAAA;EACA,2BAAA;EACA,2BAAA;EACA,oBAAA;EjDwDA,yDAAA;EACQ,iDAAA;EL+uKT;AsD9yKD;EASI,oBAAA;EACA,mCAAA;EtDwyKH;AsDnyKD;EACE,eAAA;EACA,oBAAA;EtDqyKD;AsDnyKD;EACE,cAAA;EACA,oBAAA;EtDqyKD;AuD3zKD;EACE,cAAA;EACA,iBAAA;EACA,mBAAA;EACA,gBAAA;EACA,gBAAA;EACA,8BAAA;EjCRA,cAAA;EAGA,2BAAA;EtBo0KD;AuD5zKC;;EAEE,gBAAA;EACA,uBAAA;EACA,iBAAA;EjCfF,cAAA;EAGA,2BAAA;EtB40KD;AuDzzKC;EACE,YAAA;EACA,iBAAA;EACA,yBAAA;EACA,WAAA;EACA,0BAAA;EvD2zKH;AwD/0KD;EACE,kBAAA;ExDi1KD;AwD70KD;EACE,eAAA;EACA,kBAAA;EACA,iBAAA;EACA,QAAA;EACA,UAAA;EACA,WAAA;EACA,SAAA;EACA,eAAA;EACA,mCAAA;EAIA,YAAA;ExD40KD;AwDz0KC;EnD+GA,uCAAA;EACI,mCAAA;EACC,kCAAA;EACG,+BAAA;EAkER,qDAAA;EAEK,2CAAA;EACG,qCAAA;EL4pKT;AwD/0KC;EnD2GA,oCAAA;EACI,gCAAA;EACC,+BAAA;EACG,4BAAA;ELuuKT;AwDn1KD;EACE,oBAAA;EACA,kBAAA;ExDq1KD;AwDj1KD;EACE,oBAAA;EACA,aAAA;EACA,cAAA;ExDm1KD;AwD/0KD;EACE,oBAAA;EACA,2BAAA;EACA,2BAAA;EACA,sCAAA;EACA,oBAAA;EnDaA,kDAAA;EACQ,0CAAA;EmDZR,sCAAA;UAAA,8BAAA;EAEA,YAAA;ExDi1KD;AwD70KD;EACE,iBAAA;EACA,QAAA;EACA,UAAA;EACA,WAAA;EACA,SAAA;EACA,2BAAA;ExD+0KD;AwD70KC;ElCpEA,YAAA;EAGA,0BAAA;EtBk5KD;AwDh1KC;ElCrEA,cAAA;EAGA,2BAAA;EtBs5KD;AwD/0KD;EACE,eAAA;EACA,kCAAA;EACA,2BAAA;ExDi1KD;AwD90KD;EACE,kBAAA;ExDg1KD;AwD50KD;EACE,WAAA;EACA,yBAAA;ExD80KD;AwDz0KD;EACE,oBAAA;EACA,eAAA;ExD20KD;AwDv0KD;EACE,eAAA;EACA,mBAAA;EACA,+BAAA;ExDy0KD;AwD50KD;EAQI,kBAAA;EACA,kBAAA;ExDu0KH;AwDh1KD;EAaI,mBAAA;ExDs0KH;AwDn1KD;EAiBI,gBAAA;ExDq0KH;AwDh0KD;EACE,oBAAA;EACA,cAAA;EACA,aAAA;EACA,cAAA;EACA,kBAAA;ExDk0KD;AwDhzKD;EAZE;IACE,cAAA;IACA,mBAAA;IxD+zKD;EwD7zKD;InDtEA,mDAAA;IACQ,2CAAA;ILs4KP;EwD5zKD;IAAY,cAAA;IxD+zKX;EACF;AwD1zKD;EAFE;IAAY,cAAA;IxDg0KX;EACF;AyD98KD;EACE,oBAAA;EACA,eAAA;EACA,gBAAA;EACA,qBAAA;EACA,iBAAA;EACA,kBAAA;EnCTA,YAAA;EAGA,0BAAA;EtBw9KD;AyD/8KC;EnCZA,cAAA;EAGA,2BAAA;EtB49KD;AyDl9KC;EAAW,kBAAA;EAAmB,gBAAA;EzDs9K/B;AyDr9KC;EAAW,kBAAA;EAAmB,gBAAA;EzDy9K/B;AyDx9KC;EAAW,iBAAA;EAAmB,gBAAA;EzD49K/B;AyD39KC;EAAW,mBAAA;EAAmB,gBAAA;EzD+9K/B;AyD39KD;EACE,kBAAA;EACA,kBAAA;EACA,gBAAA;EACA,oBAAA;EACA,uBAAA;EACA,2BAAA;EACA,oBAAA;EzD69KD;AyDz9KD;EACE,oBAAA;EACA,UAAA;EACA,WAAA;EACA,2BAAA;EACA,qBAAA;EzD29KD;AyDx9KC;EACE,WAAA;EACA,WAAA;EACA,mBAAA;EACA,yBAAA;EACA,2BAAA;EzD09KH;AyDx9KC;EACE,WAAA;EACA,WAAA;EACA,yBAAA;EACA,2BAAA;EzD09KH;AyDx9KC;EACE,WAAA;EACA,YAAA;EACA,yBAAA;EACA,2BAAA;EzD09KH;AyDx9KC;EACE,UAAA;EACA,SAAA;EACA,kBAAA;EACA,6BAAA;EACA,6BAAA;EzD09KH;AyDx9KC;EACE,UAAA;EACA,UAAA;EACA,kBAAA;EACA,6BAAA;EACA,4BAAA;EzD09KH;AyDx9KC;EACE,QAAA;EACA,WAAA;EACA,mBAAA;EACA,yBAAA;EACA,8BAAA;EzD09KH;AyDx9KC;EACE,QAAA;EACA,WAAA;EACA,yBAAA;EACA,8BAAA;EzD09KH;AyDx9KC;EACE,QAAA;EACA,YAAA;EACA,yBAAA;EACA,8BAAA;EzD09KH;A0DjjLD;EACE,oBAAA;EACA,QAAA;EACA,SAAA;EACA,eAAA;EACA,eAAA;EACA,kBAAA;EACA,cAAA;EAEA,iBAAA;EACA,qBAAA;EACA,yBAAA;EACA,kBAAA;EACA,2BAAA;EACA,sCAAA;UAAA,8BAAA;EACA,2BAAA;EACA,sCAAA;EACA,oBAAA;ErD8CA,mDAAA;EACQ,2CAAA;EqD3CR,qBAAA;E1DijLD;A0D9iLC;EAAY,mBAAA;E1DijLb;A0DhjLC;EAAY,mBAAA;E1DmjLb;A0DljLC;EAAY,kBAAA;E1DqjLb;A0DpjLC;EAAY,oBAAA;E1DujLb;A0DpjLD;EACE,WAAA;EACA,mBAAA;EACA,iBAAA;EACA,2BAAA;EACA,kCAAA;EACA,4BAAA;E1DsjLD;A0DnjLD;EACE,mBAAA;E1DqjLD;A0D7iLC;;EAEE,oBAAA;EACA,gBAAA;EACA,UAAA;EACA,WAAA;EACA,2BAAA;EACA,qBAAA;E1D+iLH;A0D5iLD;EACE,oBAAA;E1D8iLD;A0D5iLD;EACE,oBAAA;EACA,aAAA;E1D8iLD;A0D1iLC;EACE,WAAA;EACA,oBAAA;EACA,wBAAA;EACA,2BAAA;EACA,uCAAA;EACA,eAAA;E1D4iLH;A0D3iLG;EACE,cAAA;EACA,aAAA;EACA,oBAAA;EACA,wBAAA;EACA,2BAAA;E1D6iLL;A0D1iLC;EACE,UAAA;EACA,aAAA;EACA,mBAAA;EACA,sBAAA;EACA,6BAAA;EACA,yCAAA;E1D4iLH;A0D3iLG;EACE,cAAA;EACA,WAAA;EACA,eAAA;EACA,sBAAA;EACA,6BAAA;E1D6iLL;A0D1iLC;EACE,WAAA;EACA,oBAAA;EACA,qBAAA;EACA,8BAAA;EACA,0CAAA;EACA,YAAA;E1D4iLH;A0D3iLG;EACE,cAAA;EACA,UAAA;EACA,oBAAA;EACA,qBAAA;EACA,8BAAA;E1D6iLL;A0DziLC;EACE,UAAA;EACA,cAAA;EACA,mBAAA;EACA,uBAAA;EACA,4BAAA;EACA,wCAAA;E1D2iLH;A0D1iLG;EACE,cAAA;EACA,YAAA;EACA,uBAAA;EACA,4BAAA;EACA,eAAA;E1D4iLL;A2DxqLD;EACE,oBAAA;E3D0qLD;A2DvqLD;EACE,oBAAA;EACA,kBAAA;EACA,aAAA;E3DyqLD;A2D5qLD;EAMI,eAAA;EACA,oBAAA;EtD6KF,2CAAA;EACK,sCAAA;EACG,mCAAA;EL6/KT;A2DnrLD;;EAcM,gBAAA;E3DyqLL;A2D/oLC;EAAA;IArBI,wDAAA;SAAA,8CAAA;YAAA,wCAAA;IACA,qCAAA;YAAA,6BAAA;IACA,2BAAA;YAAA,mBAAA;I3DwqLH;E2DtqLG;;IAEE,4CAAA;YAAA,oCAAA;IACA,SAAA;I3DwqLL;E2DtqLG;;IAEE,6CAAA;YAAA,qCAAA;IACA,SAAA;I3DwqLL;E2DtqLG;;;IAGE,yCAAA;YAAA,iCAAA;IACA,SAAA;I3DwqLL;EACF;A2D9sLD;;;EA6CI,gBAAA;E3DsqLH;A2DntLD;EAiDI,SAAA;E3DqqLH;A2DttLD;;EAsDI,oBAAA;EACA,QAAA;EACA,aAAA;E3DoqLH;A2D5tLD;EA4DI,YAAA;E3DmqLH;A2D/tLD;EA+DI,aAAA;E3DmqLH;A2DluLD;;EAmEI,SAAA;E3DmqLH;A2DtuLD;EAuEI,aAAA;E3DkqLH;A2DzuLD;EA0EI,YAAA;E3DkqLH;A2D1pLD;EACE,oBAAA;EACA,QAAA;EACA,SAAA;EACA,WAAA;EACA,YAAA;ErC9FA,cAAA;EAGA,2BAAA;EqC6FA,iBAAA;EACA,gBAAA;EACA,oBAAA;EACA,2CAAA;E3D6pLD;A2DxpLC;EblGE,oGAAA;EACA,+FAAA;EACA,sHAAA;EAAA,gGAAA;EACA,6BAAA;EACA,wHAAA;E9C6vLH;A2D5pLC;EACE,YAAA;EACA,UAAA;EbvGA,oGAAA;EACA,+FAAA;EACA,sHAAA;EAAA,gGAAA;EACA,6BAAA;EACA,wHAAA;E9CswLH;A2D9pLC;;EAEE,YAAA;EACA,gBAAA;EACA,uBAAA;ErCtHF,cAAA;EAGA,2BAAA;EtBqxLD;A2D/rLD;;;;EAsCI,oBAAA;EACA,UAAA;EACA,YAAA;EACA,uBAAA;E3D+pLH;A2DxsLD;;EA6CI,WAAA;EACA,oBAAA;E3D+pLH;A2D7sLD;;EAkDI,YAAA;EACA,qBAAA;E3D+pLH;A2DltLD;;EAuDI,aAAA;EACA,cAAA;EACA,mBAAA;EACA,oBAAA;E3D+pLH;A2D1pLG;EACE,kBAAA;E3D4pLL;A2DxpLG;EACE,kBAAA;E3D0pLL;A2DhpLD;EACE,oBAAA;EACA,cAAA;EACA,WAAA;EACA,aAAA;EACA,YAAA;EACA,mBAAA;EACA,iBAAA;EACA,kBAAA;EACA,oBAAA;E3DkpLD;A2D3pLD;EAYI,uBAAA;EACA,aAAA;EACA,cAAA;EACA,aAAA;EACA,qBAAA;EACA,2BAAA;EACA,qBAAA;EACA,iBAAA;EAUA,2BAAA;EACA,oCAAA;E3DyoLH;A2DvqLD;EAiCI,WAAA;EACA,aAAA;EACA,cAAA;EACA,2BAAA;E3DyoLH;A2DloLD;EACE,oBAAA;EACA,WAAA;EACA,YAAA;EACA,cAAA;EACA,aAAA;EACA,mBAAA;EACA,sBAAA;EACA,gBAAA;EACA,oBAAA;EACA,2CAAA;E3DooLD;A2DnoLC;EACE,mBAAA;E3DqoLH;A2D5lLD;EAhCE;;;;IAKI,aAAA;IACA,cAAA;IACA,mBAAA;IACA,iBAAA;I3D8nLH;E2DtoLD;;IAYI,oBAAA;I3D8nLH;E2D1oLD;;IAgBI,qBAAA;I3D8nLH;E2DznLD;IACE,WAAA;IACA,YAAA;IACA,sBAAA;I3D2nLD;E2DvnLD;IACE,cAAA;I3DynLD;EACF;A4Dr3LC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEE,cAAA;EACA,gBAAA;E5Dm5LH;A4Dj5LC;;;;;;;;;;;;;;;EACE,aAAA;E5Di6LH;AiCz6LD;E4BRE,gBAAA;EACA,mBAAA;EACA,oBAAA;E7Do7LD;AiC36LD;EACE,yBAAA;EjC66LD;AiC36LD;EACE,wBAAA;EjC66LD;AiCr6LD;EACE,0BAAA;EjCu6LD;AiCr6LD;EACE,2BAAA;EjCu6LD;AiCr6LD;EACE,oBAAA;EjCu6LD;AiCr6LD;E6BzBE,aAAA;EACA,oBAAA;EACA,mBAAA;EACA,+BAAA;EACA,WAAA;E9Di8LD;AiCn6LD;EACE,0BAAA;EACA,+BAAA;EjCq6LD;AiC95LD;EACE,iBAAA;EjCg6LD;A+Dl8LD;EACE,qBAAA;E/Do8LD;A+D97LD;;;;ECdE,0BAAA;EhEk9LD;A+D77LD;;;;;;;;;;;;EAYE,0BAAA;E/D+7LD;A+Dx7LD;EAAA;IChDE,2BAAA;IhE4+LC;EgE3+LD;IAAU,gBAAA;IhE8+LT;EgE7+LD;IAAU,+BAAA;IhEg/LT;EgE/+LD;;IACU,gCAAA;IhEk/LT;EACF;A+Dl8LD;EAAA;IAFI,2BAAA;I/Dw8LD;EACF;A+Dl8LD;EAAA;IAFI,4BAAA;I/Dw8LD;EACF;A+Dl8LD;EAAA;IAFI,kCAAA;I/Dw8LD;EACF;A+Dj8LD;EAAA;ICrEE,2BAAA;IhE0gMC;EgEzgMD;IAAU,gBAAA;IhE4gMT;EgE3gMD;IAAU,+BAAA;IhE8gMT;EgE7gMD;;IACU,gCAAA;IhEghMT;EACF;A+D38LD;EAAA;IAFI,2BAAA;I/Di9LD;EACF;A+D38LD;EAAA;IAFI,4BAAA;I/Di9LD;EACF;A+D38LD;EAAA;IAFI,kCAAA;I/Di9LD;EACF;A+D18LD;EAAA;IC1FE,2BAAA;IhEwiMC;EgEviMD;IAAU,gBAAA;IhE0iMT;EgEziMD;IAAU,+BAAA;IhE4iMT;EgE3iMD;;IACU,gCAAA;IhE8iMT;EACF;A+Dp9LD;EAAA;IAFI,2BAAA;I/D09LD;EACF;A+Dp9LD;EAAA;IAFI,4BAAA;I/D09LD;EACF;A+Dp9LD;EAAA;IAFI,kCAAA;I/D09LD;EACF;A+Dn9LD;EAAA;IC/GE,2BAAA;IhEskMC;EgErkMD;IAAU,gBAAA;IhEwkMT;EgEvkMD;IAAU,+BAAA;IhE0kMT;EgEzkMD;;IACU,gCAAA;IhE4kMT;EACF;A+D79LD;EAAA;IAFI,2BAAA;I/Dm+LD;EACF;A+D79LD;EAAA;IAFI,4BAAA;I/Dm+LD;EACF;A+D79LD;EAAA;IAFI,kCAAA;I/Dm+LD;EACF;A+D59LD;EAAA;IC5HE,0BAAA;IhE4lMC;EACF;A+D59LD;EAAA;ICjIE,0BAAA;IhEimMC;EACF;A+D59LD;EAAA;ICtIE,0BAAA;IhEsmMC;EACF;A+D59LD;EAAA;IC3IE,0BAAA;IhE2mMC;EACF;A+Dz9LD;ECnJE,0BAAA;EhE+mMD;A+Dt9LD;EAAA;ICjKE,2BAAA;IhE2nMC;EgE1nMD;IAAU,gBAAA;IhE6nMT;EgE5nMD;IAAU,+BAAA;IhE+nMT;EgE9nMD;;IACU,gCAAA;IhEioMT;EACF;A+Dp+LD;EACE,0BAAA;E/Ds+LD;A+Dj+LD;EAAA;IAFI,2BAAA;I/Du+LD;EACF;A+Dr+LD;EACE,0BAAA;E/Du+LD;A+Dl+LD;EAAA;IAFI,4BAAA;I/Dw+LD;EACF;A+Dt+LD;EACE,0BAAA;E/Dw+LD;A+Dn+LD;EAAA;IAFI,kCAAA;I/Dy+LD;EACF;A+Dl+LD;EAAA;ICpLE,0BAAA;IhE0pMC;EACF","file":"bootstrap.css","sourcesContent":["/*! normalize.css v3.0.2 | MIT License | git.io/normalize */\nhtml {\n font-family: sans-serif;\n -ms-text-size-adjust: 100%;\n -webkit-text-size-adjust: 100%;\n}\nbody {\n margin: 0;\n}\narticle,\naside,\ndetails,\nfigcaption,\nfigure,\nfooter,\nheader,\nhgroup,\nmain,\nmenu,\nnav,\nsection,\nsummary {\n display: block;\n}\naudio,\ncanvas,\nprogress,\nvideo {\n display: inline-block;\n vertical-align: baseline;\n}\naudio:not([controls]) {\n display: none;\n height: 0;\n}\n[hidden],\ntemplate {\n display: none;\n}\na {\n background-color: transparent;\n}\na:active,\na:hover {\n outline: 0;\n}\nabbr[title] {\n border-bottom: 1px dotted;\n}\nb,\nstrong {\n font-weight: bold;\n}\ndfn {\n font-style: italic;\n}\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\nmark {\n background: #ff0;\n color: #000;\n}\nsmall {\n font-size: 80%;\n}\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\nsup {\n top: -0.5em;\n}\nsub {\n bottom: -0.25em;\n}\nimg {\n border: 0;\n}\nsvg:not(:root) {\n overflow: hidden;\n}\nfigure {\n margin: 1em 40px;\n}\nhr {\n -moz-box-sizing: content-box;\n box-sizing: content-box;\n height: 0;\n}\npre {\n overflow: auto;\n}\ncode,\nkbd,\npre,\nsamp {\n font-family: monospace, monospace;\n font-size: 1em;\n}\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n color: inherit;\n font: inherit;\n margin: 0;\n}\nbutton {\n overflow: visible;\n}\nbutton,\nselect {\n text-transform: none;\n}\nbutton,\nhtml input[type=\"button\"],\ninput[type=\"reset\"],\ninput[type=\"submit\"] {\n -webkit-appearance: button;\n cursor: pointer;\n}\nbutton[disabled],\nhtml input[disabled] {\n cursor: default;\n}\nbutton::-moz-focus-inner,\ninput::-moz-focus-inner {\n border: 0;\n padding: 0;\n}\ninput {\n line-height: normal;\n}\ninput[type=\"checkbox\"],\ninput[type=\"radio\"] {\n box-sizing: border-box;\n padding: 0;\n}\ninput[type=\"number\"]::-webkit-inner-spin-button,\ninput[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\ninput[type=\"search\"] {\n -webkit-appearance: textfield;\n -moz-box-sizing: content-box;\n -webkit-box-sizing: content-box;\n box-sizing: content-box;\n}\ninput[type=\"search\"]::-webkit-search-cancel-button,\ninput[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\nfieldset {\n border: 1px solid #c0c0c0;\n margin: 0 2px;\n padding: 0.35em 0.625em 0.75em;\n}\nlegend {\n border: 0;\n padding: 0;\n}\ntextarea {\n overflow: auto;\n}\noptgroup {\n font-weight: bold;\n}\ntable {\n border-collapse: collapse;\n border-spacing: 0;\n}\ntd,\nth {\n padding: 0;\n}\n/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */\n@media print {\n *,\n *:before,\n *:after {\n background: transparent !important;\n color: #000 !important;\n box-shadow: none !important;\n text-shadow: none !important;\n }\n a,\n a:visited {\n text-decoration: underline;\n }\n a[href]:after {\n content: \" (\" attr(href) \")\";\n }\n abbr[title]:after {\n content: \" (\" attr(title) \")\";\n }\n a[href^=\"#\"]:after,\n a[href^=\"javascript:\"]:after {\n content: \"\";\n }\n pre,\n blockquote {\n border: 1px solid #999;\n page-break-inside: avoid;\n }\n thead {\n display: table-header-group;\n }\n tr,\n img {\n page-break-inside: avoid;\n }\n img {\n max-width: 100% !important;\n }\n p,\n h2,\n h3 {\n orphans: 3;\n widows: 3;\n }\n h2,\n h3 {\n page-break-after: avoid;\n }\n select {\n background: #fff !important;\n }\n .navbar {\n display: none;\n }\n .btn > .caret,\n .dropup > .btn > .caret {\n border-top-color: #000 !important;\n }\n .label {\n border: 1px solid #000;\n }\n .table {\n border-collapse: collapse !important;\n }\n .table td,\n .table th {\n background-color: #fff !important;\n }\n .table-bordered th,\n .table-bordered td {\n border: 1px solid #ddd !important;\n }\n}\n@font-face {\n font-family: 'Glyphicons Halflings';\n src: url('../fonts/glyphicons-halflings-regular.eot');\n src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');\n}\n.glyphicon {\n position: relative;\n top: 1px;\n display: inline-block;\n font-family: 'Glyphicons Halflings';\n font-style: normal;\n font-weight: normal;\n line-height: 1;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n.glyphicon-asterisk:before {\n content: \"\\2a\";\n}\n.glyphicon-plus:before {\n content: \"\\2b\";\n}\n.glyphicon-euro:before,\n.glyphicon-eur:before {\n content: \"\\20ac\";\n}\n.glyphicon-minus:before {\n content: \"\\2212\";\n}\n.glyphicon-cloud:before {\n content: \"\\2601\";\n}\n.glyphicon-envelope:before {\n content: \"\\2709\";\n}\n.glyphicon-pencil:before {\n content: \"\\270f\";\n}\n.glyphicon-glass:before {\n content: \"\\e001\";\n}\n.glyphicon-music:before {\n content: \"\\e002\";\n}\n.glyphicon-search:before {\n content: \"\\e003\";\n}\n.glyphicon-heart:before {\n content: \"\\e005\";\n}\n.glyphicon-star:before {\n content: \"\\e006\";\n}\n.glyphicon-star-empty:before {\n content: \"\\e007\";\n}\n.glyphicon-user:before {\n content: \"\\e008\";\n}\n.glyphicon-film:before {\n content: \"\\e009\";\n}\n.glyphicon-th-large:before {\n content: \"\\e010\";\n}\n.glyphicon-th:before {\n content: \"\\e011\";\n}\n.glyphicon-th-list:before {\n content: \"\\e012\";\n}\n.glyphicon-ok:before {\n content: \"\\e013\";\n}\n.glyphicon-remove:before {\n content: \"\\e014\";\n}\n.glyphicon-zoom-in:before {\n content: \"\\e015\";\n}\n.glyphicon-zoom-out:before {\n content: \"\\e016\";\n}\n.glyphicon-off:before {\n content: \"\\e017\";\n}\n.glyphicon-signal:before {\n content: \"\\e018\";\n}\n.glyphicon-cog:before {\n content: \"\\e019\";\n}\n.glyphicon-trash:before {\n content: \"\\e020\";\n}\n.glyphicon-home:before {\n content: \"\\e021\";\n}\n.glyphicon-file:before {\n content: \"\\e022\";\n}\n.glyphicon-time:before {\n content: \"\\e023\";\n}\n.glyphicon-road:before {\n content: \"\\e024\";\n}\n.glyphicon-download-alt:before {\n content: \"\\e025\";\n}\n.glyphicon-download:before {\n content: \"\\e026\";\n}\n.glyphicon-upload:before {\n content: \"\\e027\";\n}\n.glyphicon-inbox:before {\n content: \"\\e028\";\n}\n.glyphicon-play-circle:before {\n content: \"\\e029\";\n}\n.glyphicon-repeat:before {\n content: \"\\e030\";\n}\n.glyphicon-refresh:before {\n content: \"\\e031\";\n}\n.glyphicon-list-alt:before {\n content: \"\\e032\";\n}\n.glyphicon-lock:before {\n content: \"\\e033\";\n}\n.glyphicon-flag:before {\n content: \"\\e034\";\n}\n.glyphicon-headphones:before {\n content: \"\\e035\";\n}\n.glyphicon-volume-off:before {\n content: \"\\e036\";\n}\n.glyphicon-volume-down:before {\n content: \"\\e037\";\n}\n.glyphicon-volume-up:before {\n content: \"\\e038\";\n}\n.glyphicon-qrcode:before {\n content: \"\\e039\";\n}\n.glyphicon-barcode:before {\n content: \"\\e040\";\n}\n.glyphicon-tag:before {\n content: \"\\e041\";\n}\n.glyphicon-tags:before {\n content: \"\\e042\";\n}\n.glyphicon-book:before {\n content: \"\\e043\";\n}\n.glyphicon-bookmark:before {\n content: \"\\e044\";\n}\n.glyphicon-print:before {\n content: \"\\e045\";\n}\n.glyphicon-camera:before {\n content: \"\\e046\";\n}\n.glyphicon-font:before {\n content: \"\\e047\";\n}\n.glyphicon-bold:before {\n content: \"\\e048\";\n}\n.glyphicon-italic:before {\n content: \"\\e049\";\n}\n.glyphicon-text-height:before {\n content: \"\\e050\";\n}\n.glyphicon-text-width:before {\n content: \"\\e051\";\n}\n.glyphicon-align-left:before {\n content: \"\\e052\";\n}\n.glyphicon-align-center:before {\n content: \"\\e053\";\n}\n.glyphicon-align-right:before {\n content: \"\\e054\";\n}\n.glyphicon-align-justify:before {\n content: \"\\e055\";\n}\n.glyphicon-list:before {\n content: \"\\e056\";\n}\n.glyphicon-indent-left:before {\n content: \"\\e057\";\n}\n.glyphicon-indent-right:before {\n content: \"\\e058\";\n}\n.glyphicon-facetime-video:before {\n content: \"\\e059\";\n}\n.glyphicon-picture:before {\n content: \"\\e060\";\n}\n.glyphicon-map-marker:before {\n content: \"\\e062\";\n}\n.glyphicon-adjust:before {\n content: \"\\e063\";\n}\n.glyphicon-tint:before {\n content: \"\\e064\";\n}\n.glyphicon-edit:before {\n content: \"\\e065\";\n}\n.glyphicon-share:before {\n content: \"\\e066\";\n}\n.glyphicon-check:before {\n content: \"\\e067\";\n}\n.glyphicon-move:before {\n content: \"\\e068\";\n}\n.glyphicon-step-backward:before {\n content: \"\\e069\";\n}\n.glyphicon-fast-backward:before {\n content: \"\\e070\";\n}\n.glyphicon-backward:before {\n content: \"\\e071\";\n}\n.glyphicon-play:before {\n content: \"\\e072\";\n}\n.glyphicon-pause:before {\n content: \"\\e073\";\n}\n.glyphicon-stop:before {\n content: \"\\e074\";\n}\n.glyphicon-forward:before {\n content: \"\\e075\";\n}\n.glyphicon-fast-forward:before {\n content: \"\\e076\";\n}\n.glyphicon-step-forward:before {\n content: \"\\e077\";\n}\n.glyphicon-eject:before {\n content: \"\\e078\";\n}\n.glyphicon-chevron-left:before {\n content: \"\\e079\";\n}\n.glyphicon-chevron-right:before {\n content: \"\\e080\";\n}\n.glyphicon-plus-sign:before {\n content: \"\\e081\";\n}\n.glyphicon-minus-sign:before {\n content: \"\\e082\";\n}\n.glyphicon-remove-sign:before {\n content: \"\\e083\";\n}\n.glyphicon-ok-sign:before {\n content: \"\\e084\";\n}\n.glyphicon-question-sign:before {\n content: \"\\e085\";\n}\n.glyphicon-info-sign:before {\n content: \"\\e086\";\n}\n.glyphicon-screenshot:before {\n content: \"\\e087\";\n}\n.glyphicon-remove-circle:before {\n content: \"\\e088\";\n}\n.glyphicon-ok-circle:before {\n content: \"\\e089\";\n}\n.glyphicon-ban-circle:before {\n content: \"\\e090\";\n}\n.glyphicon-arrow-left:before {\n content: \"\\e091\";\n}\n.glyphicon-arrow-right:before {\n content: \"\\e092\";\n}\n.glyphicon-arrow-up:before {\n content: \"\\e093\";\n}\n.glyphicon-arrow-down:before {\n content: \"\\e094\";\n}\n.glyphicon-share-alt:before {\n content: \"\\e095\";\n}\n.glyphicon-resize-full:before {\n content: \"\\e096\";\n}\n.glyphicon-resize-small:before {\n content: \"\\e097\";\n}\n.glyphicon-exclamation-sign:before {\n content: \"\\e101\";\n}\n.glyphicon-gift:before {\n content: \"\\e102\";\n}\n.glyphicon-leaf:before {\n content: \"\\e103\";\n}\n.glyphicon-fire:before {\n content: \"\\e104\";\n}\n.glyphicon-eye-open:before {\n content: \"\\e105\";\n}\n.glyphicon-eye-close:before {\n content: \"\\e106\";\n}\n.glyphicon-warning-sign:before {\n content: \"\\e107\";\n}\n.glyphicon-plane:before {\n content: \"\\e108\";\n}\n.glyphicon-calendar:before {\n content: \"\\e109\";\n}\n.glyphicon-random:before {\n content: \"\\e110\";\n}\n.glyphicon-comment:before {\n content: \"\\e111\";\n}\n.glyphicon-magnet:before {\n content: \"\\e112\";\n}\n.glyphicon-chevron-up:before {\n content: \"\\e113\";\n}\n.glyphicon-chevron-down:before {\n content: \"\\e114\";\n}\n.glyphicon-retweet:before {\n content: \"\\e115\";\n}\n.glyphicon-shopping-cart:before {\n content: \"\\e116\";\n}\n.glyphicon-folder-close:before {\n content: \"\\e117\";\n}\n.glyphicon-folder-open:before {\n content: \"\\e118\";\n}\n.glyphicon-resize-vertical:before {\n content: \"\\e119\";\n}\n.glyphicon-resize-horizontal:before {\n content: \"\\e120\";\n}\n.glyphicon-hdd:before {\n content: \"\\e121\";\n}\n.glyphicon-bullhorn:before {\n content: \"\\e122\";\n}\n.glyphicon-bell:before {\n content: \"\\e123\";\n}\n.glyphicon-certificate:before {\n content: \"\\e124\";\n}\n.glyphicon-thumbs-up:before {\n content: \"\\e125\";\n}\n.glyphicon-thumbs-down:before {\n content: \"\\e126\";\n}\n.glyphicon-hand-right:before {\n content: \"\\e127\";\n}\n.glyphicon-hand-left:before {\n content: \"\\e128\";\n}\n.glyphicon-hand-up:before {\n content: \"\\e129\";\n}\n.glyphicon-hand-down:before {\n content: \"\\e130\";\n}\n.glyphicon-circle-arrow-right:before {\n content: \"\\e131\";\n}\n.glyphicon-circle-arrow-left:before {\n content: \"\\e132\";\n}\n.glyphicon-circle-arrow-up:before {\n content: \"\\e133\";\n}\n.glyphicon-circle-arrow-down:before {\n content: \"\\e134\";\n}\n.glyphicon-globe:before {\n content: \"\\e135\";\n}\n.glyphicon-wrench:before {\n content: \"\\e136\";\n}\n.glyphicon-tasks:before {\n content: \"\\e137\";\n}\n.glyphicon-filter:before {\n content: \"\\e138\";\n}\n.glyphicon-briefcase:before {\n content: \"\\e139\";\n}\n.glyphicon-fullscreen:before {\n content: \"\\e140\";\n}\n.glyphicon-dashboard:before {\n content: \"\\e141\";\n}\n.glyphicon-paperclip:before {\n content: \"\\e142\";\n}\n.glyphicon-heart-empty:before {\n content: \"\\e143\";\n}\n.glyphicon-link:before {\n content: \"\\e144\";\n}\n.glyphicon-phone:before {\n content: \"\\e145\";\n}\n.glyphicon-pushpin:before {\n content: \"\\e146\";\n}\n.glyphicon-usd:before {\n content: \"\\e148\";\n}\n.glyphicon-gbp:before {\n content: \"\\e149\";\n}\n.glyphicon-sort:before {\n content: \"\\e150\";\n}\n.glyphicon-sort-by-alphabet:before {\n content: \"\\e151\";\n}\n.glyphicon-sort-by-alphabet-alt:before {\n content: \"\\e152\";\n}\n.glyphicon-sort-by-order:before {\n content: \"\\e153\";\n}\n.glyphicon-sort-by-order-alt:before {\n content: \"\\e154\";\n}\n.glyphicon-sort-by-attributes:before {\n content: \"\\e155\";\n}\n.glyphicon-sort-by-attributes-alt:before {\n content: \"\\e156\";\n}\n.glyphicon-unchecked:before {\n content: \"\\e157\";\n}\n.glyphicon-expand:before {\n content: \"\\e158\";\n}\n.glyphicon-collapse-down:before {\n content: \"\\e159\";\n}\n.glyphicon-collapse-up:before {\n content: \"\\e160\";\n}\n.glyphicon-log-in:before {\n content: \"\\e161\";\n}\n.glyphicon-flash:before {\n content: \"\\e162\";\n}\n.glyphicon-log-out:before {\n content: \"\\e163\";\n}\n.glyphicon-new-window:before {\n content: \"\\e164\";\n}\n.glyphicon-record:before {\n content: \"\\e165\";\n}\n.glyphicon-save:before {\n content: \"\\e166\";\n}\n.glyphicon-open:before {\n content: \"\\e167\";\n}\n.glyphicon-saved:before {\n content: \"\\e168\";\n}\n.glyphicon-import:before {\n content: \"\\e169\";\n}\n.glyphicon-export:before {\n content: \"\\e170\";\n}\n.glyphicon-send:before {\n content: \"\\e171\";\n}\n.glyphicon-floppy-disk:before {\n content: \"\\e172\";\n}\n.glyphicon-floppy-saved:before {\n content: \"\\e173\";\n}\n.glyphicon-floppy-remove:before {\n content: \"\\e174\";\n}\n.glyphicon-floppy-save:before {\n content: \"\\e175\";\n}\n.glyphicon-floppy-open:before {\n content: \"\\e176\";\n}\n.glyphicon-credit-card:before {\n content: \"\\e177\";\n}\n.glyphicon-transfer:before {\n content: \"\\e178\";\n}\n.glyphicon-cutlery:before {\n content: \"\\e179\";\n}\n.glyphicon-header:before {\n content: \"\\e180\";\n}\n.glyphicon-compressed:before {\n content: \"\\e181\";\n}\n.glyphicon-earphone:before {\n content: \"\\e182\";\n}\n.glyphicon-phone-alt:before {\n content: \"\\e183\";\n}\n.glyphicon-tower:before {\n content: \"\\e184\";\n}\n.glyphicon-stats:before {\n content: \"\\e185\";\n}\n.glyphicon-sd-video:before {\n content: \"\\e186\";\n}\n.glyphicon-hd-video:before {\n content: \"\\e187\";\n}\n.glyphicon-subtitles:before {\n content: \"\\e188\";\n}\n.glyphicon-sound-stereo:before {\n content: \"\\e189\";\n}\n.glyphicon-sound-dolby:before {\n content: \"\\e190\";\n}\n.glyphicon-sound-5-1:before {\n content: \"\\e191\";\n}\n.glyphicon-sound-6-1:before {\n content: \"\\e192\";\n}\n.glyphicon-sound-7-1:before {\n content: \"\\e193\";\n}\n.glyphicon-copyright-mark:before {\n content: \"\\e194\";\n}\n.glyphicon-registration-mark:before {\n content: \"\\e195\";\n}\n.glyphicon-cloud-download:before {\n content: \"\\e197\";\n}\n.glyphicon-cloud-upload:before {\n content: \"\\e198\";\n}\n.glyphicon-tree-conifer:before {\n content: \"\\e199\";\n}\n.glyphicon-tree-deciduous:before {\n content: \"\\e200\";\n}\n* {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\n*:before,\n*:after {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\nhtml {\n font-size: 10px;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\nbody {\n font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n font-size: 14px;\n line-height: 1.42857143;\n color: #333333;\n background-color: #ffffff;\n}\ninput,\nbutton,\nselect,\ntextarea {\n font-family: inherit;\n font-size: inherit;\n line-height: inherit;\n}\na {\n color: #428bca;\n text-decoration: none;\n}\na:hover,\na:focus {\n color: #2a6496;\n text-decoration: underline;\n}\na:focus {\n outline: thin dotted;\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: -2px;\n}\nfigure {\n margin: 0;\n}\nimg {\n vertical-align: middle;\n}\n.img-responsive,\n.thumbnail > img,\n.thumbnail a > img,\n.carousel-inner > .item > img,\n.carousel-inner > .item > a > img {\n display: block;\n max-width: 100%;\n height: auto;\n}\n.img-rounded {\n border-radius: 6px;\n}\n.img-thumbnail {\n padding: 4px;\n line-height: 1.42857143;\n background-color: #ffffff;\n border: 1px solid #dddddd;\n border-radius: 4px;\n -webkit-transition: all 0.2s ease-in-out;\n -o-transition: all 0.2s ease-in-out;\n transition: all 0.2s ease-in-out;\n display: inline-block;\n max-width: 100%;\n height: auto;\n}\n.img-circle {\n border-radius: 50%;\n}\nhr {\n margin-top: 20px;\n margin-bottom: 20px;\n border: 0;\n border-top: 1px solid #eeeeee;\n}\n.sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n border: 0;\n}\n.sr-only-focusable:active,\n.sr-only-focusable:focus {\n position: static;\n width: auto;\n height: auto;\n margin: 0;\n overflow: visible;\n clip: auto;\n}\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\n.h1,\n.h2,\n.h3,\n.h4,\n.h5,\n.h6 {\n font-family: inherit;\n font-weight: 500;\n line-height: 1.1;\n color: inherit;\n}\nh1 small,\nh2 small,\nh3 small,\nh4 small,\nh5 small,\nh6 small,\n.h1 small,\n.h2 small,\n.h3 small,\n.h4 small,\n.h5 small,\n.h6 small,\nh1 .small,\nh2 .small,\nh3 .small,\nh4 .small,\nh5 .small,\nh6 .small,\n.h1 .small,\n.h2 .small,\n.h3 .small,\n.h4 .small,\n.h5 .small,\n.h6 .small {\n font-weight: normal;\n line-height: 1;\n color: #777777;\n}\nh1,\n.h1,\nh2,\n.h2,\nh3,\n.h3 {\n margin-top: 20px;\n margin-bottom: 10px;\n}\nh1 small,\n.h1 small,\nh2 small,\n.h2 small,\nh3 small,\n.h3 small,\nh1 .small,\n.h1 .small,\nh2 .small,\n.h2 .small,\nh3 .small,\n.h3 .small {\n font-size: 65%;\n}\nh4,\n.h4,\nh5,\n.h5,\nh6,\n.h6 {\n margin-top: 10px;\n margin-bottom: 10px;\n}\nh4 small,\n.h4 small,\nh5 small,\n.h5 small,\nh6 small,\n.h6 small,\nh4 .small,\n.h4 .small,\nh5 .small,\n.h5 .small,\nh6 .small,\n.h6 .small {\n font-size: 75%;\n}\nh1,\n.h1 {\n font-size: 36px;\n}\nh2,\n.h2 {\n font-size: 30px;\n}\nh3,\n.h3 {\n font-size: 24px;\n}\nh4,\n.h4 {\n font-size: 18px;\n}\nh5,\n.h5 {\n font-size: 14px;\n}\nh6,\n.h6 {\n font-size: 12px;\n}\np {\n margin: 0 0 10px;\n}\n.lead {\n margin-bottom: 20px;\n font-size: 16px;\n font-weight: 300;\n line-height: 1.4;\n}\n@media (min-width: 768px) {\n .lead {\n font-size: 21px;\n }\n}\nsmall,\n.small {\n font-size: 85%;\n}\nmark,\n.mark {\n background-color: #fcf8e3;\n padding: .2em;\n}\n.text-left {\n text-align: left;\n}\n.text-right {\n text-align: right;\n}\n.text-center {\n text-align: center;\n}\n.text-justify {\n text-align: justify;\n}\n.text-nowrap {\n white-space: nowrap;\n}\n.text-lowercase {\n text-transform: lowercase;\n}\n.text-uppercase {\n text-transform: uppercase;\n}\n.text-capitalize {\n text-transform: capitalize;\n}\n.text-muted {\n color: #777777;\n}\n.text-primary {\n color: #428bca;\n}\na.text-primary:hover {\n color: #3071a9;\n}\n.text-success {\n color: #3c763d;\n}\na.text-success:hover {\n color: #2b542c;\n}\n.text-info {\n color: #31708f;\n}\na.text-info:hover {\n color: #245269;\n}\n.text-warning {\n color: #8a6d3b;\n}\na.text-warning:hover {\n color: #66512c;\n}\n.text-danger {\n color: #a94442;\n}\na.text-danger:hover {\n color: #843534;\n}\n.bg-primary {\n color: #fff;\n background-color: #428bca;\n}\na.bg-primary:hover {\n background-color: #3071a9;\n}\n.bg-success {\n background-color: #dff0d8;\n}\na.bg-success:hover {\n background-color: #c1e2b3;\n}\n.bg-info {\n background-color: #d9edf7;\n}\na.bg-info:hover {\n background-color: #afd9ee;\n}\n.bg-warning {\n background-color: #fcf8e3;\n}\na.bg-warning:hover {\n background-color: #f7ecb5;\n}\n.bg-danger {\n background-color: #f2dede;\n}\na.bg-danger:hover {\n background-color: #e4b9b9;\n}\n.page-header {\n padding-bottom: 9px;\n margin: 40px 0 20px;\n border-bottom: 1px solid #eeeeee;\n}\nul,\nol {\n margin-top: 0;\n margin-bottom: 10px;\n}\nul ul,\nol ul,\nul ol,\nol ol {\n margin-bottom: 0;\n}\n.list-unstyled {\n padding-left: 0;\n list-style: none;\n}\n.list-inline {\n padding-left: 0;\n list-style: none;\n margin-left: -5px;\n}\n.list-inline > li {\n display: inline-block;\n padding-left: 5px;\n padding-right: 5px;\n}\ndl {\n margin-top: 0;\n margin-bottom: 20px;\n}\ndt,\ndd {\n line-height: 1.42857143;\n}\ndt {\n font-weight: bold;\n}\ndd {\n margin-left: 0;\n}\n@media (min-width: 768px) {\n .dl-horizontal dt {\n float: left;\n width: 160px;\n clear: left;\n text-align: right;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n .dl-horizontal dd {\n margin-left: 180px;\n }\n}\nabbr[title],\nabbr[data-original-title] {\n cursor: help;\n border-bottom: 1px dotted #777777;\n}\n.initialism {\n font-size: 90%;\n text-transform: uppercase;\n}\nblockquote {\n padding: 10px 20px;\n margin: 0 0 20px;\n font-size: 17.5px;\n border-left: 5px solid #eeeeee;\n}\nblockquote p:last-child,\nblockquote ul:last-child,\nblockquote ol:last-child {\n margin-bottom: 0;\n}\nblockquote footer,\nblockquote small,\nblockquote .small {\n display: block;\n font-size: 80%;\n line-height: 1.42857143;\n color: #777777;\n}\nblockquote footer:before,\nblockquote small:before,\nblockquote .small:before {\n content: '\\2014 \\00A0';\n}\n.blockquote-reverse,\nblockquote.pull-right {\n padding-right: 15px;\n padding-left: 0;\n border-right: 5px solid #eeeeee;\n border-left: 0;\n text-align: right;\n}\n.blockquote-reverse footer:before,\nblockquote.pull-right footer:before,\n.blockquote-reverse small:before,\nblockquote.pull-right small:before,\n.blockquote-reverse .small:before,\nblockquote.pull-right .small:before {\n content: '';\n}\n.blockquote-reverse footer:after,\nblockquote.pull-right footer:after,\n.blockquote-reverse small:after,\nblockquote.pull-right small:after,\n.blockquote-reverse .small:after,\nblockquote.pull-right .small:after {\n content: '\\00A0 \\2014';\n}\naddress {\n margin-bottom: 20px;\n font-style: normal;\n line-height: 1.42857143;\n}\ncode,\nkbd,\npre,\nsamp {\n font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace;\n}\ncode {\n padding: 2px 4px;\n font-size: 90%;\n color: #c7254e;\n background-color: #f9f2f4;\n border-radius: 4px;\n}\nkbd {\n padding: 2px 4px;\n font-size: 90%;\n color: #ffffff;\n background-color: #333333;\n border-radius: 3px;\n box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.25);\n}\nkbd kbd {\n padding: 0;\n font-size: 100%;\n font-weight: bold;\n box-shadow: none;\n}\npre {\n display: block;\n padding: 9.5px;\n margin: 0 0 10px;\n font-size: 13px;\n line-height: 1.42857143;\n word-break: break-all;\n word-wrap: break-word;\n color: #333333;\n background-color: #f5f5f5;\n border: 1px solid #cccccc;\n border-radius: 4px;\n}\npre code {\n padding: 0;\n font-size: inherit;\n color: inherit;\n white-space: pre-wrap;\n background-color: transparent;\n border-radius: 0;\n}\n.pre-scrollable {\n max-height: 340px;\n overflow-y: scroll;\n}\n.container {\n margin-right: auto;\n margin-left: auto;\n padding-left: 15px;\n padding-right: 15px;\n}\n@media (min-width: 768px) {\n .container {\n width: 750px;\n }\n}\n@media (min-width: 992px) {\n .container {\n width: 970px;\n }\n}\n@media (min-width: 1200px) {\n .container {\n width: 1170px;\n }\n}\n.container-fluid {\n margin-right: auto;\n margin-left: auto;\n padding-left: 15px;\n padding-right: 15px;\n}\n.row {\n margin-left: -15px;\n margin-right: -15px;\n}\n.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 {\n position: relative;\n min-height: 1px;\n padding-left: 15px;\n padding-right: 15px;\n}\n.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 {\n float: left;\n}\n.col-xs-12 {\n width: 100%;\n}\n.col-xs-11 {\n width: 91.66666667%;\n}\n.col-xs-10 {\n width: 83.33333333%;\n}\n.col-xs-9 {\n width: 75%;\n}\n.col-xs-8 {\n width: 66.66666667%;\n}\n.col-xs-7 {\n width: 58.33333333%;\n}\n.col-xs-6 {\n width: 50%;\n}\n.col-xs-5 {\n width: 41.66666667%;\n}\n.col-xs-4 {\n width: 33.33333333%;\n}\n.col-xs-3 {\n width: 25%;\n}\n.col-xs-2 {\n width: 16.66666667%;\n}\n.col-xs-1 {\n width: 8.33333333%;\n}\n.col-xs-pull-12 {\n right: 100%;\n}\n.col-xs-pull-11 {\n right: 91.66666667%;\n}\n.col-xs-pull-10 {\n right: 83.33333333%;\n}\n.col-xs-pull-9 {\n right: 75%;\n}\n.col-xs-pull-8 {\n right: 66.66666667%;\n}\n.col-xs-pull-7 {\n right: 58.33333333%;\n}\n.col-xs-pull-6 {\n right: 50%;\n}\n.col-xs-pull-5 {\n right: 41.66666667%;\n}\n.col-xs-pull-4 {\n right: 33.33333333%;\n}\n.col-xs-pull-3 {\n right: 25%;\n}\n.col-xs-pull-2 {\n right: 16.66666667%;\n}\n.col-xs-pull-1 {\n right: 8.33333333%;\n}\n.col-xs-pull-0 {\n right: auto;\n}\n.col-xs-push-12 {\n left: 100%;\n}\n.col-xs-push-11 {\n left: 91.66666667%;\n}\n.col-xs-push-10 {\n left: 83.33333333%;\n}\n.col-xs-push-9 {\n left: 75%;\n}\n.col-xs-push-8 {\n left: 66.66666667%;\n}\n.col-xs-push-7 {\n left: 58.33333333%;\n}\n.col-xs-push-6 {\n left: 50%;\n}\n.col-xs-push-5 {\n left: 41.66666667%;\n}\n.col-xs-push-4 {\n left: 33.33333333%;\n}\n.col-xs-push-3 {\n left: 25%;\n}\n.col-xs-push-2 {\n left: 16.66666667%;\n}\n.col-xs-push-1 {\n left: 8.33333333%;\n}\n.col-xs-push-0 {\n left: auto;\n}\n.col-xs-offset-12 {\n margin-left: 100%;\n}\n.col-xs-offset-11 {\n margin-left: 91.66666667%;\n}\n.col-xs-offset-10 {\n margin-left: 83.33333333%;\n}\n.col-xs-offset-9 {\n margin-left: 75%;\n}\n.col-xs-offset-8 {\n margin-left: 66.66666667%;\n}\n.col-xs-offset-7 {\n margin-left: 58.33333333%;\n}\n.col-xs-offset-6 {\n margin-left: 50%;\n}\n.col-xs-offset-5 {\n margin-left: 41.66666667%;\n}\n.col-xs-offset-4 {\n margin-left: 33.33333333%;\n}\n.col-xs-offset-3 {\n margin-left: 25%;\n}\n.col-xs-offset-2 {\n margin-left: 16.66666667%;\n}\n.col-xs-offset-1 {\n margin-left: 8.33333333%;\n}\n.col-xs-offset-0 {\n margin-left: 0%;\n}\n@media (min-width: 768px) {\n .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 {\n float: left;\n }\n .col-sm-12 {\n width: 100%;\n }\n .col-sm-11 {\n width: 91.66666667%;\n }\n .col-sm-10 {\n width: 83.33333333%;\n }\n .col-sm-9 {\n width: 75%;\n }\n .col-sm-8 {\n width: 66.66666667%;\n }\n .col-sm-7 {\n width: 58.33333333%;\n }\n .col-sm-6 {\n width: 50%;\n }\n .col-sm-5 {\n width: 41.66666667%;\n }\n .col-sm-4 {\n width: 33.33333333%;\n }\n .col-sm-3 {\n width: 25%;\n }\n .col-sm-2 {\n width: 16.66666667%;\n }\n .col-sm-1 {\n width: 8.33333333%;\n }\n .col-sm-pull-12 {\n right: 100%;\n }\n .col-sm-pull-11 {\n right: 91.66666667%;\n }\n .col-sm-pull-10 {\n right: 83.33333333%;\n }\n .col-sm-pull-9 {\n right: 75%;\n }\n .col-sm-pull-8 {\n right: 66.66666667%;\n }\n .col-sm-pull-7 {\n right: 58.33333333%;\n }\n .col-sm-pull-6 {\n right: 50%;\n }\n .col-sm-pull-5 {\n right: 41.66666667%;\n }\n .col-sm-pull-4 {\n right: 33.33333333%;\n }\n .col-sm-pull-3 {\n right: 25%;\n }\n .col-sm-pull-2 {\n right: 16.66666667%;\n }\n .col-sm-pull-1 {\n right: 8.33333333%;\n }\n .col-sm-pull-0 {\n right: auto;\n }\n .col-sm-push-12 {\n left: 100%;\n }\n .col-sm-push-11 {\n left: 91.66666667%;\n }\n .col-sm-push-10 {\n left: 83.33333333%;\n }\n .col-sm-push-9 {\n left: 75%;\n }\n .col-sm-push-8 {\n left: 66.66666667%;\n }\n .col-sm-push-7 {\n left: 58.33333333%;\n }\n .col-sm-push-6 {\n left: 50%;\n }\n .col-sm-push-5 {\n left: 41.66666667%;\n }\n .col-sm-push-4 {\n left: 33.33333333%;\n }\n .col-sm-push-3 {\n left: 25%;\n }\n .col-sm-push-2 {\n left: 16.66666667%;\n }\n .col-sm-push-1 {\n left: 8.33333333%;\n }\n .col-sm-push-0 {\n left: auto;\n }\n .col-sm-offset-12 {\n margin-left: 100%;\n }\n .col-sm-offset-11 {\n margin-left: 91.66666667%;\n }\n .col-sm-offset-10 {\n margin-left: 83.33333333%;\n }\n .col-sm-offset-9 {\n margin-left: 75%;\n }\n .col-sm-offset-8 {\n margin-left: 66.66666667%;\n }\n .col-sm-offset-7 {\n margin-left: 58.33333333%;\n }\n .col-sm-offset-6 {\n margin-left: 50%;\n }\n .col-sm-offset-5 {\n margin-left: 41.66666667%;\n }\n .col-sm-offset-4 {\n margin-left: 33.33333333%;\n }\n .col-sm-offset-3 {\n margin-left: 25%;\n }\n .col-sm-offset-2 {\n margin-left: 16.66666667%;\n }\n .col-sm-offset-1 {\n margin-left: 8.33333333%;\n }\n .col-sm-offset-0 {\n margin-left: 0%;\n }\n}\n@media (min-width: 992px) {\n .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 {\n float: left;\n }\n .col-md-12 {\n width: 100%;\n }\n .col-md-11 {\n width: 91.66666667%;\n }\n .col-md-10 {\n width: 83.33333333%;\n }\n .col-md-9 {\n width: 75%;\n }\n .col-md-8 {\n width: 66.66666667%;\n }\n .col-md-7 {\n width: 58.33333333%;\n }\n .col-md-6 {\n width: 50%;\n }\n .col-md-5 {\n width: 41.66666667%;\n }\n .col-md-4 {\n width: 33.33333333%;\n }\n .col-md-3 {\n width: 25%;\n }\n .col-md-2 {\n width: 16.66666667%;\n }\n .col-md-1 {\n width: 8.33333333%;\n }\n .col-md-pull-12 {\n right: 100%;\n }\n .col-md-pull-11 {\n right: 91.66666667%;\n }\n .col-md-pull-10 {\n right: 83.33333333%;\n }\n .col-md-pull-9 {\n right: 75%;\n }\n .col-md-pull-8 {\n right: 66.66666667%;\n }\n .col-md-pull-7 {\n right: 58.33333333%;\n }\n .col-md-pull-6 {\n right: 50%;\n }\n .col-md-pull-5 {\n right: 41.66666667%;\n }\n .col-md-pull-4 {\n right: 33.33333333%;\n }\n .col-md-pull-3 {\n right: 25%;\n }\n .col-md-pull-2 {\n right: 16.66666667%;\n }\n .col-md-pull-1 {\n right: 8.33333333%;\n }\n .col-md-pull-0 {\n right: auto;\n }\n .col-md-push-12 {\n left: 100%;\n }\n .col-md-push-11 {\n left: 91.66666667%;\n }\n .col-md-push-10 {\n left: 83.33333333%;\n }\n .col-md-push-9 {\n left: 75%;\n }\n .col-md-push-8 {\n left: 66.66666667%;\n }\n .col-md-push-7 {\n left: 58.33333333%;\n }\n .col-md-push-6 {\n left: 50%;\n }\n .col-md-push-5 {\n left: 41.66666667%;\n }\n .col-md-push-4 {\n left: 33.33333333%;\n }\n .col-md-push-3 {\n left: 25%;\n }\n .col-md-push-2 {\n left: 16.66666667%;\n }\n .col-md-push-1 {\n left: 8.33333333%;\n }\n .col-md-push-0 {\n left: auto;\n }\n .col-md-offset-12 {\n margin-left: 100%;\n }\n .col-md-offset-11 {\n margin-left: 91.66666667%;\n }\n .col-md-offset-10 {\n margin-left: 83.33333333%;\n }\n .col-md-offset-9 {\n margin-left: 75%;\n }\n .col-md-offset-8 {\n margin-left: 66.66666667%;\n }\n .col-md-offset-7 {\n margin-left: 58.33333333%;\n }\n .col-md-offset-6 {\n margin-left: 50%;\n }\n .col-md-offset-5 {\n margin-left: 41.66666667%;\n }\n .col-md-offset-4 {\n margin-left: 33.33333333%;\n }\n .col-md-offset-3 {\n margin-left: 25%;\n }\n .col-md-offset-2 {\n margin-left: 16.66666667%;\n }\n .col-md-offset-1 {\n margin-left: 8.33333333%;\n }\n .col-md-offset-0 {\n margin-left: 0%;\n }\n}\n@media (min-width: 1200px) {\n .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {\n float: left;\n }\n .col-lg-12 {\n width: 100%;\n }\n .col-lg-11 {\n width: 91.66666667%;\n }\n .col-lg-10 {\n width: 83.33333333%;\n }\n .col-lg-9 {\n width: 75%;\n }\n .col-lg-8 {\n width: 66.66666667%;\n }\n .col-lg-7 {\n width: 58.33333333%;\n }\n .col-lg-6 {\n width: 50%;\n }\n .col-lg-5 {\n width: 41.66666667%;\n }\n .col-lg-4 {\n width: 33.33333333%;\n }\n .col-lg-3 {\n width: 25%;\n }\n .col-lg-2 {\n width: 16.66666667%;\n }\n .col-lg-1 {\n width: 8.33333333%;\n }\n .col-lg-pull-12 {\n right: 100%;\n }\n .col-lg-pull-11 {\n right: 91.66666667%;\n }\n .col-lg-pull-10 {\n right: 83.33333333%;\n }\n .col-lg-pull-9 {\n right: 75%;\n }\n .col-lg-pull-8 {\n right: 66.66666667%;\n }\n .col-lg-pull-7 {\n right: 58.33333333%;\n }\n .col-lg-pull-6 {\n right: 50%;\n }\n .col-lg-pull-5 {\n right: 41.66666667%;\n }\n .col-lg-pull-4 {\n right: 33.33333333%;\n }\n .col-lg-pull-3 {\n right: 25%;\n }\n .col-lg-pull-2 {\n right: 16.66666667%;\n }\n .col-lg-pull-1 {\n right: 8.33333333%;\n }\n .col-lg-pull-0 {\n right: auto;\n }\n .col-lg-push-12 {\n left: 100%;\n }\n .col-lg-push-11 {\n left: 91.66666667%;\n }\n .col-lg-push-10 {\n left: 83.33333333%;\n }\n .col-lg-push-9 {\n left: 75%;\n }\n .col-lg-push-8 {\n left: 66.66666667%;\n }\n .col-lg-push-7 {\n left: 58.33333333%;\n }\n .col-lg-push-6 {\n left: 50%;\n }\n .col-lg-push-5 {\n left: 41.66666667%;\n }\n .col-lg-push-4 {\n left: 33.33333333%;\n }\n .col-lg-push-3 {\n left: 25%;\n }\n .col-lg-push-2 {\n left: 16.66666667%;\n }\n .col-lg-push-1 {\n left: 8.33333333%;\n }\n .col-lg-push-0 {\n left: auto;\n }\n .col-lg-offset-12 {\n margin-left: 100%;\n }\n .col-lg-offset-11 {\n margin-left: 91.66666667%;\n }\n .col-lg-offset-10 {\n margin-left: 83.33333333%;\n }\n .col-lg-offset-9 {\n margin-left: 75%;\n }\n .col-lg-offset-8 {\n margin-left: 66.66666667%;\n }\n .col-lg-offset-7 {\n margin-left: 58.33333333%;\n }\n .col-lg-offset-6 {\n margin-left: 50%;\n }\n .col-lg-offset-5 {\n margin-left: 41.66666667%;\n }\n .col-lg-offset-4 {\n margin-left: 33.33333333%;\n }\n .col-lg-offset-3 {\n margin-left: 25%;\n }\n .col-lg-offset-2 {\n margin-left: 16.66666667%;\n }\n .col-lg-offset-1 {\n margin-left: 8.33333333%;\n }\n .col-lg-offset-0 {\n margin-left: 0%;\n }\n}\ntable {\n background-color: transparent;\n}\ncaption {\n padding-top: 8px;\n padding-bottom: 8px;\n color: #777777;\n text-align: left;\n}\nth {\n text-align: left;\n}\n.table {\n width: 100%;\n max-width: 100%;\n margin-bottom: 20px;\n}\n.table > thead > tr > th,\n.table > tbody > tr > th,\n.table > tfoot > tr > th,\n.table > thead > tr > td,\n.table > tbody > tr > td,\n.table > tfoot > tr > td {\n padding: 8px;\n line-height: 1.42857143;\n vertical-align: top;\n border-top: 1px solid #dddddd;\n}\n.table > thead > tr > th {\n vertical-align: bottom;\n border-bottom: 2px solid #dddddd;\n}\n.table > caption + thead > tr:first-child > th,\n.table > colgroup + thead > tr:first-child > th,\n.table > thead:first-child > tr:first-child > th,\n.table > caption + thead > tr:first-child > td,\n.table > colgroup + thead > tr:first-child > td,\n.table > thead:first-child > tr:first-child > td {\n border-top: 0;\n}\n.table > tbody + tbody {\n border-top: 2px solid #dddddd;\n}\n.table .table {\n background-color: #ffffff;\n}\n.table-condensed > thead > tr > th,\n.table-condensed > tbody > tr > th,\n.table-condensed > tfoot > tr > th,\n.table-condensed > thead > tr > td,\n.table-condensed > tbody > tr > td,\n.table-condensed > tfoot > tr > td {\n padding: 5px;\n}\n.table-bordered {\n border: 1px solid #dddddd;\n}\n.table-bordered > thead > tr > th,\n.table-bordered > tbody > tr > th,\n.table-bordered > tfoot > tr > th,\n.table-bordered > thead > tr > td,\n.table-bordered > tbody > tr > td,\n.table-bordered > tfoot > tr > td {\n border: 1px solid #dddddd;\n}\n.table-bordered > thead > tr > th,\n.table-bordered > thead > tr > td {\n border-bottom-width: 2px;\n}\n.table-striped > tbody > tr:nth-child(odd) {\n background-color: #f9f9f9;\n}\n.table-hover > tbody > tr:hover {\n background-color: #f5f5f5;\n}\ntable col[class*=\"col-\"] {\n position: static;\n float: none;\n display: table-column;\n}\ntable td[class*=\"col-\"],\ntable th[class*=\"col-\"] {\n position: static;\n float: none;\n display: table-cell;\n}\n.table > thead > tr > td.active,\n.table > tbody > tr > td.active,\n.table > tfoot > tr > td.active,\n.table > thead > tr > th.active,\n.table > tbody > tr > th.active,\n.table > tfoot > tr > th.active,\n.table > thead > tr.active > td,\n.table > tbody > tr.active > td,\n.table > tfoot > tr.active > td,\n.table > thead > tr.active > th,\n.table > tbody > tr.active > th,\n.table > tfoot > tr.active > th {\n background-color: #f5f5f5;\n}\n.table-hover > tbody > tr > td.active:hover,\n.table-hover > tbody > tr > th.active:hover,\n.table-hover > tbody > tr.active:hover > td,\n.table-hover > tbody > tr:hover > .active,\n.table-hover > tbody > tr.active:hover > th {\n background-color: #e8e8e8;\n}\n.table > thead > tr > td.success,\n.table > tbody > tr > td.success,\n.table > tfoot > tr > td.success,\n.table > thead > tr > th.success,\n.table > tbody > tr > th.success,\n.table > tfoot > tr > th.success,\n.table > thead > tr.success > td,\n.table > tbody > tr.success > td,\n.table > tfoot > tr.success > td,\n.table > thead > tr.success > th,\n.table > tbody > tr.success > th,\n.table > tfoot > tr.success > th {\n background-color: #dff0d8;\n}\n.table-hover > tbody > tr > td.success:hover,\n.table-hover > tbody > tr > th.success:hover,\n.table-hover > tbody > tr.success:hover > td,\n.table-hover > tbody > tr:hover > .success,\n.table-hover > tbody > tr.success:hover > th {\n background-color: #d0e9c6;\n}\n.table > thead > tr > td.info,\n.table > tbody > tr > td.info,\n.table > tfoot > tr > td.info,\n.table > thead > tr > th.info,\n.table > tbody > tr > th.info,\n.table > tfoot > tr > th.info,\n.table > thead > tr.info > td,\n.table > tbody > tr.info > td,\n.table > tfoot > tr.info > td,\n.table > thead > tr.info > th,\n.table > tbody > tr.info > th,\n.table > tfoot > tr.info > th {\n background-color: #d9edf7;\n}\n.table-hover > tbody > tr > td.info:hover,\n.table-hover > tbody > tr > th.info:hover,\n.table-hover > tbody > tr.info:hover > td,\n.table-hover > tbody > tr:hover > .info,\n.table-hover > tbody > tr.info:hover > th {\n background-color: #c4e3f3;\n}\n.table > thead > tr > td.warning,\n.table > tbody > tr > td.warning,\n.table > tfoot > tr > td.warning,\n.table > thead > tr > th.warning,\n.table > tbody > tr > th.warning,\n.table > tfoot > tr > th.warning,\n.table > thead > tr.warning > td,\n.table > tbody > tr.warning > td,\n.table > tfoot > tr.warning > td,\n.table > thead > tr.warning > th,\n.table > tbody > tr.warning > th,\n.table > tfoot > tr.warning > th {\n background-color: #fcf8e3;\n}\n.table-hover > tbody > tr > td.warning:hover,\n.table-hover > tbody > tr > th.warning:hover,\n.table-hover > tbody > tr.warning:hover > td,\n.table-hover > tbody > tr:hover > .warning,\n.table-hover > tbody > tr.warning:hover > th {\n background-color: #faf2cc;\n}\n.table > thead > tr > td.danger,\n.table > tbody > tr > td.danger,\n.table > tfoot > tr > td.danger,\n.table > thead > tr > th.danger,\n.table > tbody > tr > th.danger,\n.table > tfoot > tr > th.danger,\n.table > thead > tr.danger > td,\n.table > tbody > tr.danger > td,\n.table > tfoot > tr.danger > td,\n.table > thead > tr.danger > th,\n.table > tbody > tr.danger > th,\n.table > tfoot > tr.danger > th {\n background-color: #f2dede;\n}\n.table-hover > tbody > tr > td.danger:hover,\n.table-hover > tbody > tr > th.danger:hover,\n.table-hover > tbody > tr.danger:hover > td,\n.table-hover > tbody > tr:hover > .danger,\n.table-hover > tbody > tr.danger:hover > th {\n background-color: #ebcccc;\n}\n.table-responsive {\n overflow-x: auto;\n min-height: 0.01%;\n}\n@media screen and (max-width: 767px) {\n .table-responsive {\n width: 100%;\n margin-bottom: 15px;\n overflow-y: hidden;\n -ms-overflow-style: -ms-autohiding-scrollbar;\n border: 1px solid #dddddd;\n }\n .table-responsive > .table {\n margin-bottom: 0;\n }\n .table-responsive > .table > thead > tr > th,\n .table-responsive > .table > tbody > tr > th,\n .table-responsive > .table > tfoot > tr > th,\n .table-responsive > .table > thead > tr > td,\n .table-responsive > .table > tbody > tr > td,\n .table-responsive > .table > tfoot > tr > td {\n white-space: nowrap;\n }\n .table-responsive > .table-bordered {\n border: 0;\n }\n .table-responsive > .table-bordered > thead > tr > th:first-child,\n .table-responsive > .table-bordered > tbody > tr > th:first-child,\n .table-responsive > .table-bordered > tfoot > tr > th:first-child,\n .table-responsive > .table-bordered > thead > tr > td:first-child,\n .table-responsive > .table-bordered > tbody > tr > td:first-child,\n .table-responsive > .table-bordered > tfoot > tr > td:first-child {\n border-left: 0;\n }\n .table-responsive > .table-bordered > thead > tr > th:last-child,\n .table-responsive > .table-bordered > tbody > tr > th:last-child,\n .table-responsive > .table-bordered > tfoot > tr > th:last-child,\n .table-responsive > .table-bordered > thead > tr > td:last-child,\n .table-responsive > .table-bordered > tbody > tr > td:last-child,\n .table-responsive > .table-bordered > tfoot > tr > td:last-child {\n border-right: 0;\n }\n .table-responsive > .table-bordered > tbody > tr:last-child > th,\n .table-responsive > .table-bordered > tfoot > tr:last-child > th,\n .table-responsive > .table-bordered > tbody > tr:last-child > td,\n .table-responsive > .table-bordered > tfoot > tr:last-child > td {\n border-bottom: 0;\n }\n}\nfieldset {\n padding: 0;\n margin: 0;\n border: 0;\n min-width: 0;\n}\nlegend {\n display: block;\n width: 100%;\n padding: 0;\n margin-bottom: 20px;\n font-size: 21px;\n line-height: inherit;\n color: #333333;\n border: 0;\n border-bottom: 1px solid #e5e5e5;\n}\nlabel {\n display: inline-block;\n max-width: 100%;\n margin-bottom: 5px;\n font-weight: bold;\n}\ninput[type=\"search\"] {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\ninput[type=\"radio\"],\ninput[type=\"checkbox\"] {\n margin: 4px 0 0;\n margin-top: 1px \\9;\n line-height: normal;\n}\ninput[type=\"file\"] {\n display: block;\n}\ninput[type=\"range\"] {\n display: block;\n width: 100%;\n}\nselect[multiple],\nselect[size] {\n height: auto;\n}\ninput[type=\"file\"]:focus,\ninput[type=\"radio\"]:focus,\ninput[type=\"checkbox\"]:focus {\n outline: thin dotted;\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: -2px;\n}\noutput {\n display: block;\n padding-top: 7px;\n font-size: 14px;\n line-height: 1.42857143;\n color: #555555;\n}\n.form-control {\n display: block;\n width: 100%;\n height: 34px;\n padding: 6px 12px;\n font-size: 14px;\n line-height: 1.42857143;\n color: #555555;\n background-color: #ffffff;\n background-image: none;\n border: 1px solid #cccccc;\n border-radius: 4px;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n}\n.form-control:focus {\n border-color: #66afe9;\n outline: 0;\n -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);\n box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);\n}\n.form-control::-moz-placeholder {\n color: #999999;\n opacity: 1;\n}\n.form-control:-ms-input-placeholder {\n color: #999999;\n}\n.form-control::-webkit-input-placeholder {\n color: #999999;\n}\n.form-control[disabled],\n.form-control[readonly],\nfieldset[disabled] .form-control {\n cursor: not-allowed;\n background-color: #eeeeee;\n opacity: 1;\n}\ntextarea.form-control {\n height: auto;\n}\ninput[type=\"search\"] {\n -webkit-appearance: none;\n}\ninput[type=\"date\"],\ninput[type=\"time\"],\ninput[type=\"datetime-local\"],\ninput[type=\"month\"] {\n line-height: 34px;\n line-height: 1.42857143 \\0;\n}\ninput[type=\"date\"].input-sm,\ninput[type=\"time\"].input-sm,\ninput[type=\"datetime-local\"].input-sm,\ninput[type=\"month\"].input-sm {\n line-height: 30px;\n line-height: 1.5 \\0;\n}\ninput[type=\"date\"].input-lg,\ninput[type=\"time\"].input-lg,\ninput[type=\"datetime-local\"].input-lg,\ninput[type=\"month\"].input-lg {\n line-height: 46px;\n line-height: 1.33 \\0;\n}\n_:-ms-fullscreen,\n:root input[type=\"date\"],\n_:-ms-fullscreen,\n:root input[type=\"time\"],\n_:-ms-fullscreen,\n:root input[type=\"datetime-local\"],\n_:-ms-fullscreen,\n:root input[type=\"month\"] {\n line-height: 1.42857143;\n}\n_:-ms-fullscreen.input-sm,\n:root input[type=\"date\"].input-sm,\n_:-ms-fullscreen.input-sm,\n:root input[type=\"time\"].input-sm,\n_:-ms-fullscreen.input-sm,\n:root input[type=\"datetime-local\"].input-sm,\n_:-ms-fullscreen.input-sm,\n:root input[type=\"month\"].input-sm {\n line-height: 1.5;\n}\n_:-ms-fullscreen.input-lg,\n:root input[type=\"date\"].input-lg,\n_:-ms-fullscreen.input-lg,\n:root input[type=\"time\"].input-lg,\n_:-ms-fullscreen.input-lg,\n:root input[type=\"datetime-local\"].input-lg,\n_:-ms-fullscreen.input-lg,\n:root input[type=\"month\"].input-lg {\n line-height: 1.33;\n}\n.form-group {\n margin-bottom: 15px;\n}\n.radio,\n.checkbox {\n position: relative;\n display: block;\n margin-top: 10px;\n margin-bottom: 10px;\n}\n.radio label,\n.checkbox label {\n min-height: 20px;\n padding-left: 20px;\n margin-bottom: 0;\n font-weight: normal;\n cursor: pointer;\n}\n.radio input[type=\"radio\"],\n.radio-inline input[type=\"radio\"],\n.checkbox input[type=\"checkbox\"],\n.checkbox-inline input[type=\"checkbox\"] {\n position: absolute;\n margin-left: -20px;\n margin-top: 4px \\9;\n}\n.radio + .radio,\n.checkbox + .checkbox {\n margin-top: -5px;\n}\n.radio-inline,\n.checkbox-inline {\n display: inline-block;\n padding-left: 20px;\n margin-bottom: 0;\n vertical-align: middle;\n font-weight: normal;\n cursor: pointer;\n}\n.radio-inline + .radio-inline,\n.checkbox-inline + .checkbox-inline {\n margin-top: 0;\n margin-left: 10px;\n}\ninput[type=\"radio\"][disabled],\ninput[type=\"checkbox\"][disabled],\ninput[type=\"radio\"].disabled,\ninput[type=\"checkbox\"].disabled,\nfieldset[disabled] input[type=\"radio\"],\nfieldset[disabled] input[type=\"checkbox\"] {\n cursor: not-allowed;\n}\n.radio-inline.disabled,\n.checkbox-inline.disabled,\nfieldset[disabled] .radio-inline,\nfieldset[disabled] .checkbox-inline {\n cursor: not-allowed;\n}\n.radio.disabled label,\n.checkbox.disabled label,\nfieldset[disabled] .radio label,\nfieldset[disabled] .checkbox label {\n cursor: not-allowed;\n}\n.form-control-static {\n padding-top: 7px;\n padding-bottom: 7px;\n margin-bottom: 0;\n}\n.form-control-static.input-lg,\n.form-control-static.input-sm {\n padding-left: 0;\n padding-right: 0;\n}\n.input-sm,\n.form-group-sm .form-control {\n height: 30px;\n padding: 5px 10px;\n font-size: 12px;\n line-height: 1.5;\n border-radius: 3px;\n}\nselect.input-sm,\nselect.form-group-sm .form-control {\n height: 30px;\n line-height: 30px;\n}\ntextarea.input-sm,\ntextarea.form-group-sm .form-control,\nselect[multiple].input-sm,\nselect[multiple].form-group-sm .form-control {\n height: auto;\n}\n.input-lg,\n.form-group-lg .form-control {\n height: 46px;\n padding: 10px 16px;\n font-size: 18px;\n line-height: 1.33;\n border-radius: 6px;\n}\nselect.input-lg,\nselect.form-group-lg .form-control {\n height: 46px;\n line-height: 46px;\n}\ntextarea.input-lg,\ntextarea.form-group-lg .form-control,\nselect[multiple].input-lg,\nselect[multiple].form-group-lg .form-control {\n height: auto;\n}\n.has-feedback {\n position: relative;\n}\n.has-feedback .form-control {\n padding-right: 42.5px;\n}\n.form-control-feedback {\n position: absolute;\n top: 0;\n right: 0;\n z-index: 2;\n display: block;\n width: 34px;\n height: 34px;\n line-height: 34px;\n text-align: center;\n pointer-events: none;\n}\n.input-lg + .form-control-feedback {\n width: 46px;\n height: 46px;\n line-height: 46px;\n}\n.input-sm + .form-control-feedback {\n width: 30px;\n height: 30px;\n line-height: 30px;\n}\n.has-success .help-block,\n.has-success .control-label,\n.has-success .radio,\n.has-success .checkbox,\n.has-success .radio-inline,\n.has-success .checkbox-inline,\n.has-success.radio label,\n.has-success.checkbox label,\n.has-success.radio-inline label,\n.has-success.checkbox-inline label {\n color: #3c763d;\n}\n.has-success .form-control {\n border-color: #3c763d;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n}\n.has-success .form-control:focus {\n border-color: #2b542c;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #67b168;\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #67b168;\n}\n.has-success .input-group-addon {\n color: #3c763d;\n border-color: #3c763d;\n background-color: #dff0d8;\n}\n.has-success .form-control-feedback {\n color: #3c763d;\n}\n.has-warning .help-block,\n.has-warning .control-label,\n.has-warning .radio,\n.has-warning .checkbox,\n.has-warning .radio-inline,\n.has-warning .checkbox-inline,\n.has-warning.radio label,\n.has-warning.checkbox label,\n.has-warning.radio-inline label,\n.has-warning.checkbox-inline label {\n color: #8a6d3b;\n}\n.has-warning .form-control {\n border-color: #8a6d3b;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n}\n.has-warning .form-control:focus {\n border-color: #66512c;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #c0a16b;\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #c0a16b;\n}\n.has-warning .input-group-addon {\n color: #8a6d3b;\n border-color: #8a6d3b;\n background-color: #fcf8e3;\n}\n.has-warning .form-control-feedback {\n color: #8a6d3b;\n}\n.has-error .help-block,\n.has-error .control-label,\n.has-error .radio,\n.has-error .checkbox,\n.has-error .radio-inline,\n.has-error .checkbox-inline,\n.has-error.radio label,\n.has-error.checkbox label,\n.has-error.radio-inline label,\n.has-error.checkbox-inline label {\n color: #a94442;\n}\n.has-error .form-control {\n border-color: #a94442;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n}\n.has-error .form-control:focus {\n border-color: #843534;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483;\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483;\n}\n.has-error .input-group-addon {\n color: #a94442;\n border-color: #a94442;\n background-color: #f2dede;\n}\n.has-error .form-control-feedback {\n color: #a94442;\n}\n.has-feedback label ~ .form-control-feedback {\n top: 25px;\n}\n.has-feedback label.sr-only ~ .form-control-feedback {\n top: 0;\n}\n.help-block {\n display: block;\n margin-top: 5px;\n margin-bottom: 10px;\n color: #737373;\n}\n@media (min-width: 768px) {\n .form-inline .form-group {\n display: inline-block;\n margin-bottom: 0;\n vertical-align: middle;\n }\n .form-inline .form-control {\n display: inline-block;\n width: auto;\n vertical-align: middle;\n }\n .form-inline .form-control-static {\n display: inline-block;\n }\n .form-inline .input-group {\n display: inline-table;\n vertical-align: middle;\n }\n .form-inline .input-group .input-group-addon,\n .form-inline .input-group .input-group-btn,\n .form-inline .input-group .form-control {\n width: auto;\n }\n .form-inline .input-group > .form-control {\n width: 100%;\n }\n .form-inline .control-label {\n margin-bottom: 0;\n vertical-align: middle;\n }\n .form-inline .radio,\n .form-inline .checkbox {\n display: inline-block;\n margin-top: 0;\n margin-bottom: 0;\n vertical-align: middle;\n }\n .form-inline .radio label,\n .form-inline .checkbox label {\n padding-left: 0;\n }\n .form-inline .radio input[type=\"radio\"],\n .form-inline .checkbox input[type=\"checkbox\"] {\n position: relative;\n margin-left: 0;\n }\n .form-inline .has-feedback .form-control-feedback {\n top: 0;\n }\n}\n.form-horizontal .radio,\n.form-horizontal .checkbox,\n.form-horizontal .radio-inline,\n.form-horizontal .checkbox-inline {\n margin-top: 0;\n margin-bottom: 0;\n padding-top: 7px;\n}\n.form-horizontal .radio,\n.form-horizontal .checkbox {\n min-height: 27px;\n}\n.form-horizontal .form-group {\n margin-left: -15px;\n margin-right: -15px;\n}\n@media (min-width: 768px) {\n .form-horizontal .control-label {\n text-align: right;\n margin-bottom: 0;\n padding-top: 7px;\n }\n}\n.form-horizontal .has-feedback .form-control-feedback {\n right: 15px;\n}\n@media (min-width: 768px) {\n .form-horizontal .form-group-lg .control-label {\n padding-top: 14.3px;\n }\n}\n@media (min-width: 768px) {\n .form-horizontal .form-group-sm .control-label {\n padding-top: 6px;\n }\n}\n.btn {\n display: inline-block;\n margin-bottom: 0;\n font-weight: normal;\n text-align: center;\n vertical-align: middle;\n touch-action: manipulation;\n cursor: pointer;\n background-image: none;\n border: 1px solid transparent;\n white-space: nowrap;\n padding: 6px 12px;\n font-size: 14px;\n line-height: 1.42857143;\n border-radius: 4px;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.btn:focus,\n.btn:active:focus,\n.btn.active:focus,\n.btn.focus,\n.btn:active.focus,\n.btn.active.focus {\n outline: thin dotted;\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: -2px;\n}\n.btn:hover,\n.btn:focus,\n.btn.focus {\n color: #333333;\n text-decoration: none;\n}\n.btn:active,\n.btn.active {\n outline: 0;\n background-image: none;\n -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n}\n.btn.disabled,\n.btn[disabled],\nfieldset[disabled] .btn {\n cursor: not-allowed;\n pointer-events: none;\n opacity: 0.65;\n filter: alpha(opacity=65);\n -webkit-box-shadow: none;\n box-shadow: none;\n}\n.btn-default {\n color: #333333;\n background-color: #ffffff;\n border-color: #cccccc;\n}\n.btn-default:hover,\n.btn-default:focus,\n.btn-default.focus,\n.btn-default:active,\n.btn-default.active,\n.open > .dropdown-toggle.btn-default {\n color: #333333;\n background-color: #e6e6e6;\n border-color: #adadad;\n}\n.btn-default:active,\n.btn-default.active,\n.open > .dropdown-toggle.btn-default {\n background-image: none;\n}\n.btn-default.disabled,\n.btn-default[disabled],\nfieldset[disabled] .btn-default,\n.btn-default.disabled:hover,\n.btn-default[disabled]:hover,\nfieldset[disabled] .btn-default:hover,\n.btn-default.disabled:focus,\n.btn-default[disabled]:focus,\nfieldset[disabled] .btn-default:focus,\n.btn-default.disabled.focus,\n.btn-default[disabled].focus,\nfieldset[disabled] .btn-default.focus,\n.btn-default.disabled:active,\n.btn-default[disabled]:active,\nfieldset[disabled] .btn-default:active,\n.btn-default.disabled.active,\n.btn-default[disabled].active,\nfieldset[disabled] .btn-default.active {\n background-color: #ffffff;\n border-color: #cccccc;\n}\n.btn-default .badge {\n color: #ffffff;\n background-color: #333333;\n}\n.btn-primary {\n color: #ffffff;\n background-color: #428bca;\n border-color: #357ebd;\n}\n.btn-primary:hover,\n.btn-primary:focus,\n.btn-primary.focus,\n.btn-primary:active,\n.btn-primary.active,\n.open > .dropdown-toggle.btn-primary {\n color: #ffffff;\n background-color: #3071a9;\n border-color: #285e8e;\n}\n.btn-primary:active,\n.btn-primary.active,\n.open > .dropdown-toggle.btn-primary {\n background-image: none;\n}\n.btn-primary.disabled,\n.btn-primary[disabled],\nfieldset[disabled] .btn-primary,\n.btn-primary.disabled:hover,\n.btn-primary[disabled]:hover,\nfieldset[disabled] .btn-primary:hover,\n.btn-primary.disabled:focus,\n.btn-primary[disabled]:focus,\nfieldset[disabled] .btn-primary:focus,\n.btn-primary.disabled.focus,\n.btn-primary[disabled].focus,\nfieldset[disabled] .btn-primary.focus,\n.btn-primary.disabled:active,\n.btn-primary[disabled]:active,\nfieldset[disabled] .btn-primary:active,\n.btn-primary.disabled.active,\n.btn-primary[disabled].active,\nfieldset[disabled] .btn-primary.active {\n background-color: #428bca;\n border-color: #357ebd;\n}\n.btn-primary .badge {\n color: #428bca;\n background-color: #ffffff;\n}\n.btn-success {\n color: #ffffff;\n background-color: #5cb85c;\n border-color: #4cae4c;\n}\n.btn-success:hover,\n.btn-success:focus,\n.btn-success.focus,\n.btn-success:active,\n.btn-success.active,\n.open > .dropdown-toggle.btn-success {\n color: #ffffff;\n background-color: #449d44;\n border-color: #398439;\n}\n.btn-success:active,\n.btn-success.active,\n.open > .dropdown-toggle.btn-success {\n background-image: none;\n}\n.btn-success.disabled,\n.btn-success[disabled],\nfieldset[disabled] .btn-success,\n.btn-success.disabled:hover,\n.btn-success[disabled]:hover,\nfieldset[disabled] .btn-success:hover,\n.btn-success.disabled:focus,\n.btn-success[disabled]:focus,\nfieldset[disabled] .btn-success:focus,\n.btn-success.disabled.focus,\n.btn-success[disabled].focus,\nfieldset[disabled] .btn-success.focus,\n.btn-success.disabled:active,\n.btn-success[disabled]:active,\nfieldset[disabled] .btn-success:active,\n.btn-success.disabled.active,\n.btn-success[disabled].active,\nfieldset[disabled] .btn-success.active {\n background-color: #5cb85c;\n border-color: #4cae4c;\n}\n.btn-success .badge {\n color: #5cb85c;\n background-color: #ffffff;\n}\n.btn-info {\n color: #ffffff;\n background-color: #5bc0de;\n border-color: #46b8da;\n}\n.btn-info:hover,\n.btn-info:focus,\n.btn-info.focus,\n.btn-info:active,\n.btn-info.active,\n.open > .dropdown-toggle.btn-info {\n color: #ffffff;\n background-color: #31b0d5;\n border-color: #269abc;\n}\n.btn-info:active,\n.btn-info.active,\n.open > .dropdown-toggle.btn-info {\n background-image: none;\n}\n.btn-info.disabled,\n.btn-info[disabled],\nfieldset[disabled] .btn-info,\n.btn-info.disabled:hover,\n.btn-info[disabled]:hover,\nfieldset[disabled] .btn-info:hover,\n.btn-info.disabled:focus,\n.btn-info[disabled]:focus,\nfieldset[disabled] .btn-info:focus,\n.btn-info.disabled.focus,\n.btn-info[disabled].focus,\nfieldset[disabled] .btn-info.focus,\n.btn-info.disabled:active,\n.btn-info[disabled]:active,\nfieldset[disabled] .btn-info:active,\n.btn-info.disabled.active,\n.btn-info[disabled].active,\nfieldset[disabled] .btn-info.active {\n background-color: #5bc0de;\n border-color: #46b8da;\n}\n.btn-info .badge {\n color: #5bc0de;\n background-color: #ffffff;\n}\n.btn-warning {\n color: #ffffff;\n background-color: #f0ad4e;\n border-color: #eea236;\n}\n.btn-warning:hover,\n.btn-warning:focus,\n.btn-warning.focus,\n.btn-warning:active,\n.btn-warning.active,\n.open > .dropdown-toggle.btn-warning {\n color: #ffffff;\n background-color: #ec971f;\n border-color: #d58512;\n}\n.btn-warning:active,\n.btn-warning.active,\n.open > .dropdown-toggle.btn-warning {\n background-image: none;\n}\n.btn-warning.disabled,\n.btn-warning[disabled],\nfieldset[disabled] .btn-warning,\n.btn-warning.disabled:hover,\n.btn-warning[disabled]:hover,\nfieldset[disabled] .btn-warning:hover,\n.btn-warning.disabled:focus,\n.btn-warning[disabled]:focus,\nfieldset[disabled] .btn-warning:focus,\n.btn-warning.disabled.focus,\n.btn-warning[disabled].focus,\nfieldset[disabled] .btn-warning.focus,\n.btn-warning.disabled:active,\n.btn-warning[disabled]:active,\nfieldset[disabled] .btn-warning:active,\n.btn-warning.disabled.active,\n.btn-warning[disabled].active,\nfieldset[disabled] .btn-warning.active {\n background-color: #f0ad4e;\n border-color: #eea236;\n}\n.btn-warning .badge {\n color: #f0ad4e;\n background-color: #ffffff;\n}\n.btn-danger {\n color: #ffffff;\n background-color: #d9534f;\n border-color: #d43f3a;\n}\n.btn-danger:hover,\n.btn-danger:focus,\n.btn-danger.focus,\n.btn-danger:active,\n.btn-danger.active,\n.open > .dropdown-toggle.btn-danger {\n color: #ffffff;\n background-color: #c9302c;\n border-color: #ac2925;\n}\n.btn-danger:active,\n.btn-danger.active,\n.open > .dropdown-toggle.btn-danger {\n background-image: none;\n}\n.btn-danger.disabled,\n.btn-danger[disabled],\nfieldset[disabled] .btn-danger,\n.btn-danger.disabled:hover,\n.btn-danger[disabled]:hover,\nfieldset[disabled] .btn-danger:hover,\n.btn-danger.disabled:focus,\n.btn-danger[disabled]:focus,\nfieldset[disabled] .btn-danger:focus,\n.btn-danger.disabled.focus,\n.btn-danger[disabled].focus,\nfieldset[disabled] .btn-danger.focus,\n.btn-danger.disabled:active,\n.btn-danger[disabled]:active,\nfieldset[disabled] .btn-danger:active,\n.btn-danger.disabled.active,\n.btn-danger[disabled].active,\nfieldset[disabled] .btn-danger.active {\n background-color: #d9534f;\n border-color: #d43f3a;\n}\n.btn-danger .badge {\n color: #d9534f;\n background-color: #ffffff;\n}\n.btn-link {\n color: #428bca;\n font-weight: normal;\n border-radius: 0;\n}\n.btn-link,\n.btn-link:active,\n.btn-link.active,\n.btn-link[disabled],\nfieldset[disabled] .btn-link {\n background-color: transparent;\n -webkit-box-shadow: none;\n box-shadow: none;\n}\n.btn-link,\n.btn-link:hover,\n.btn-link:focus,\n.btn-link:active {\n border-color: transparent;\n}\n.btn-link:hover,\n.btn-link:focus {\n color: #2a6496;\n text-decoration: underline;\n background-color: transparent;\n}\n.btn-link[disabled]:hover,\nfieldset[disabled] .btn-link:hover,\n.btn-link[disabled]:focus,\nfieldset[disabled] .btn-link:focus {\n color: #777777;\n text-decoration: none;\n}\n.btn-lg,\n.btn-group-lg > .btn {\n padding: 10px 16px;\n font-size: 18px;\n line-height: 1.33;\n border-radius: 6px;\n}\n.btn-sm,\n.btn-group-sm > .btn {\n padding: 5px 10px;\n font-size: 12px;\n line-height: 1.5;\n border-radius: 3px;\n}\n.btn-xs,\n.btn-group-xs > .btn {\n padding: 1px 5px;\n font-size: 12px;\n line-height: 1.5;\n border-radius: 3px;\n}\n.btn-block {\n display: block;\n width: 100%;\n}\n.btn-block + .btn-block {\n margin-top: 5px;\n}\ninput[type=\"submit\"].btn-block,\ninput[type=\"reset\"].btn-block,\ninput[type=\"button\"].btn-block {\n width: 100%;\n}\n.fade {\n opacity: 0;\n -webkit-transition: opacity 0.15s linear;\n -o-transition: opacity 0.15s linear;\n transition: opacity 0.15s linear;\n}\n.fade.in {\n opacity: 1;\n}\n.collapse {\n display: none;\n visibility: hidden;\n}\n.collapse.in {\n display: block;\n visibility: visible;\n}\ntr.collapse.in {\n display: table-row;\n}\ntbody.collapse.in {\n display: table-row-group;\n}\n.collapsing {\n position: relative;\n height: 0;\n overflow: hidden;\n -webkit-transition-property: height, visibility;\n transition-property: height, visibility;\n -webkit-transition-duration: 0.35s;\n transition-duration: 0.35s;\n -webkit-transition-timing-function: ease;\n transition-timing-function: ease;\n}\n.caret {\n display: inline-block;\n width: 0;\n height: 0;\n margin-left: 2px;\n vertical-align: middle;\n border-top: 4px solid;\n border-right: 4px solid transparent;\n border-left: 4px solid transparent;\n}\n.dropdown {\n position: relative;\n}\n.dropdown-toggle:focus {\n outline: 0;\n}\n.dropdown-menu {\n position: absolute;\n top: 100%;\n left: 0;\n z-index: 1000;\n display: none;\n float: left;\n min-width: 160px;\n padding: 5px 0;\n margin: 2px 0 0;\n list-style: none;\n font-size: 14px;\n text-align: left;\n background-color: #ffffff;\n border: 1px solid #cccccc;\n border: 1px solid rgba(0, 0, 0, 0.15);\n border-radius: 4px;\n -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);\n box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);\n background-clip: padding-box;\n}\n.dropdown-menu.pull-right {\n right: 0;\n left: auto;\n}\n.dropdown-menu .divider {\n height: 1px;\n margin: 9px 0;\n overflow: hidden;\n background-color: #e5e5e5;\n}\n.dropdown-menu > li > a {\n display: block;\n padding: 3px 20px;\n clear: both;\n font-weight: normal;\n line-height: 1.42857143;\n color: #333333;\n white-space: nowrap;\n}\n.dropdown-menu > li > a:hover,\n.dropdown-menu > li > a:focus {\n text-decoration: none;\n color: #262626;\n background-color: #f5f5f5;\n}\n.dropdown-menu > .active > a,\n.dropdown-menu > .active > a:hover,\n.dropdown-menu > .active > a:focus {\n color: #ffffff;\n text-decoration: none;\n outline: 0;\n background-color: #428bca;\n}\n.dropdown-menu > .disabled > a,\n.dropdown-menu > .disabled > a:hover,\n.dropdown-menu > .disabled > a:focus {\n color: #777777;\n}\n.dropdown-menu > .disabled > a:hover,\n.dropdown-menu > .disabled > a:focus {\n text-decoration: none;\n background-color: transparent;\n background-image: none;\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n cursor: not-allowed;\n}\n.open > .dropdown-menu {\n display: block;\n}\n.open > a {\n outline: 0;\n}\n.dropdown-menu-right {\n left: auto;\n right: 0;\n}\n.dropdown-menu-left {\n left: 0;\n right: auto;\n}\n.dropdown-header {\n display: block;\n padding: 3px 20px;\n font-size: 12px;\n line-height: 1.42857143;\n color: #777777;\n white-space: nowrap;\n}\n.dropdown-backdrop {\n position: fixed;\n left: 0;\n right: 0;\n bottom: 0;\n top: 0;\n z-index: 990;\n}\n.pull-right > .dropdown-menu {\n right: 0;\n left: auto;\n}\n.dropup .caret,\n.navbar-fixed-bottom .dropdown .caret {\n border-top: 0;\n border-bottom: 4px solid;\n content: \"\";\n}\n.dropup .dropdown-menu,\n.navbar-fixed-bottom .dropdown .dropdown-menu {\n top: auto;\n bottom: 100%;\n margin-bottom: 1px;\n}\n@media (min-width: 768px) {\n .navbar-right .dropdown-menu {\n left: auto;\n right: 0;\n }\n .navbar-right .dropdown-menu-left {\n left: 0;\n right: auto;\n }\n}\n.btn-group,\n.btn-group-vertical {\n position: relative;\n display: inline-block;\n vertical-align: middle;\n}\n.btn-group > .btn,\n.btn-group-vertical > .btn {\n position: relative;\n float: left;\n}\n.btn-group > .btn:hover,\n.btn-group-vertical > .btn:hover,\n.btn-group > .btn:focus,\n.btn-group-vertical > .btn:focus,\n.btn-group > .btn:active,\n.btn-group-vertical > .btn:active,\n.btn-group > .btn.active,\n.btn-group-vertical > .btn.active {\n z-index: 2;\n}\n.btn-group > .btn:focus,\n.btn-group-vertical > .btn:focus {\n outline: 0;\n}\n.btn-group .btn + .btn,\n.btn-group .btn + .btn-group,\n.btn-group .btn-group + .btn,\n.btn-group .btn-group + .btn-group {\n margin-left: -1px;\n}\n.btn-toolbar {\n margin-left: -5px;\n}\n.btn-toolbar .btn-group,\n.btn-toolbar .input-group {\n float: left;\n}\n.btn-toolbar > .btn,\n.btn-toolbar > .btn-group,\n.btn-toolbar > .input-group {\n margin-left: 5px;\n}\n.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {\n border-radius: 0;\n}\n.btn-group > .btn:first-child {\n margin-left: 0;\n}\n.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) {\n border-bottom-right-radius: 0;\n border-top-right-radius: 0;\n}\n.btn-group > .btn:last-child:not(:first-child),\n.btn-group > .dropdown-toggle:not(:first-child) {\n border-bottom-left-radius: 0;\n border-top-left-radius: 0;\n}\n.btn-group > .btn-group {\n float: left;\n}\n.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {\n border-radius: 0;\n}\n.btn-group > .btn-group:first-child > .btn:last-child,\n.btn-group > .btn-group:first-child > .dropdown-toggle {\n border-bottom-right-radius: 0;\n border-top-right-radius: 0;\n}\n.btn-group > .btn-group:last-child > .btn:first-child {\n border-bottom-left-radius: 0;\n border-top-left-radius: 0;\n}\n.btn-group .dropdown-toggle:active,\n.btn-group.open .dropdown-toggle {\n outline: 0;\n}\n.btn-group > .btn + .dropdown-toggle {\n padding-left: 8px;\n padding-right: 8px;\n}\n.btn-group > .btn-lg + .dropdown-toggle {\n padding-left: 12px;\n padding-right: 12px;\n}\n.btn-group.open .dropdown-toggle {\n -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n}\n.btn-group.open .dropdown-toggle.btn-link {\n -webkit-box-shadow: none;\n box-shadow: none;\n}\n.btn .caret {\n margin-left: 0;\n}\n.btn-lg .caret {\n border-width: 5px 5px 0;\n border-bottom-width: 0;\n}\n.dropup .btn-lg .caret {\n border-width: 0 5px 5px;\n}\n.btn-group-vertical > .btn,\n.btn-group-vertical > .btn-group,\n.btn-group-vertical > .btn-group > .btn {\n display: block;\n float: none;\n width: 100%;\n max-width: 100%;\n}\n.btn-group-vertical > .btn-group > .btn {\n float: none;\n}\n.btn-group-vertical > .btn + .btn,\n.btn-group-vertical > .btn + .btn-group,\n.btn-group-vertical > .btn-group + .btn,\n.btn-group-vertical > .btn-group + .btn-group {\n margin-top: -1px;\n margin-left: 0;\n}\n.btn-group-vertical > .btn:not(:first-child):not(:last-child) {\n border-radius: 0;\n}\n.btn-group-vertical > .btn:first-child:not(:last-child) {\n border-top-right-radius: 4px;\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n}\n.btn-group-vertical > .btn:last-child:not(:first-child) {\n border-bottom-left-radius: 4px;\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n}\n.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {\n border-radius: 0;\n}\n.btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child,\n.btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle {\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n}\n.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n}\n.btn-group-justified {\n display: table;\n width: 100%;\n table-layout: fixed;\n border-collapse: separate;\n}\n.btn-group-justified > .btn,\n.btn-group-justified > .btn-group {\n float: none;\n display: table-cell;\n width: 1%;\n}\n.btn-group-justified > .btn-group .btn {\n width: 100%;\n}\n.btn-group-justified > .btn-group .dropdown-menu {\n left: auto;\n}\n[data-toggle=\"buttons\"] > .btn input[type=\"radio\"],\n[data-toggle=\"buttons\"] > .btn-group > .btn input[type=\"radio\"],\n[data-toggle=\"buttons\"] > .btn input[type=\"checkbox\"],\n[data-toggle=\"buttons\"] > .btn-group > .btn input[type=\"checkbox\"] {\n position: absolute;\n clip: rect(0, 0, 0, 0);\n pointer-events: none;\n}\n.input-group {\n position: relative;\n display: table;\n border-collapse: separate;\n}\n.input-group[class*=\"col-\"] {\n float: none;\n padding-left: 0;\n padding-right: 0;\n}\n.input-group .form-control {\n position: relative;\n z-index: 2;\n float: left;\n width: 100%;\n margin-bottom: 0;\n}\n.input-group-lg > .form-control,\n.input-group-lg > .input-group-addon,\n.input-group-lg > .input-group-btn > .btn {\n height: 46px;\n padding: 10px 16px;\n font-size: 18px;\n line-height: 1.33;\n border-radius: 6px;\n}\nselect.input-group-lg > .form-control,\nselect.input-group-lg > .input-group-addon,\nselect.input-group-lg > .input-group-btn > .btn {\n height: 46px;\n line-height: 46px;\n}\ntextarea.input-group-lg > .form-control,\ntextarea.input-group-lg > .input-group-addon,\ntextarea.input-group-lg > .input-group-btn > .btn,\nselect[multiple].input-group-lg > .form-control,\nselect[multiple].input-group-lg > .input-group-addon,\nselect[multiple].input-group-lg > .input-group-btn > .btn {\n height: auto;\n}\n.input-group-sm > .form-control,\n.input-group-sm > .input-group-addon,\n.input-group-sm > .input-group-btn > .btn {\n height: 30px;\n padding: 5px 10px;\n font-size: 12px;\n line-height: 1.5;\n border-radius: 3px;\n}\nselect.input-group-sm > .form-control,\nselect.input-group-sm > .input-group-addon,\nselect.input-group-sm > .input-group-btn > .btn {\n height: 30px;\n line-height: 30px;\n}\ntextarea.input-group-sm > .form-control,\ntextarea.input-group-sm > .input-group-addon,\ntextarea.input-group-sm > .input-group-btn > .btn,\nselect[multiple].input-group-sm > .form-control,\nselect[multiple].input-group-sm > .input-group-addon,\nselect[multiple].input-group-sm > .input-group-btn > .btn {\n height: auto;\n}\n.input-group-addon,\n.input-group-btn,\n.input-group .form-control {\n display: table-cell;\n}\n.input-group-addon:not(:first-child):not(:last-child),\n.input-group-btn:not(:first-child):not(:last-child),\n.input-group .form-control:not(:first-child):not(:last-child) {\n border-radius: 0;\n}\n.input-group-addon,\n.input-group-btn {\n width: 1%;\n white-space: nowrap;\n vertical-align: middle;\n}\n.input-group-addon {\n padding: 6px 12px;\n font-size: 14px;\n font-weight: normal;\n line-height: 1;\n color: #555555;\n text-align: center;\n background-color: #eeeeee;\n border: 1px solid #cccccc;\n border-radius: 4px;\n}\n.input-group-addon.input-sm {\n padding: 5px 10px;\n font-size: 12px;\n border-radius: 3px;\n}\n.input-group-addon.input-lg {\n padding: 10px 16px;\n font-size: 18px;\n border-radius: 6px;\n}\n.input-group-addon input[type=\"radio\"],\n.input-group-addon input[type=\"checkbox\"] {\n margin-top: 0;\n}\n.input-group .form-control:first-child,\n.input-group-addon:first-child,\n.input-group-btn:first-child > .btn,\n.input-group-btn:first-child > .btn-group > .btn,\n.input-group-btn:first-child > .dropdown-toggle,\n.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),\n.input-group-btn:last-child > .btn-group:not(:last-child) > .btn {\n border-bottom-right-radius: 0;\n border-top-right-radius: 0;\n}\n.input-group-addon:first-child {\n border-right: 0;\n}\n.input-group .form-control:last-child,\n.input-group-addon:last-child,\n.input-group-btn:last-child > .btn,\n.input-group-btn:last-child > .btn-group > .btn,\n.input-group-btn:last-child > .dropdown-toggle,\n.input-group-btn:first-child > .btn:not(:first-child),\n.input-group-btn:first-child > .btn-group:not(:first-child) > .btn {\n border-bottom-left-radius: 0;\n border-top-left-radius: 0;\n}\n.input-group-addon:last-child {\n border-left: 0;\n}\n.input-group-btn {\n position: relative;\n font-size: 0;\n white-space: nowrap;\n}\n.input-group-btn > .btn {\n position: relative;\n}\n.input-group-btn > .btn + .btn {\n margin-left: -1px;\n}\n.input-group-btn > .btn:hover,\n.input-group-btn > .btn:focus,\n.input-group-btn > .btn:active {\n z-index: 2;\n}\n.input-group-btn:first-child > .btn,\n.input-group-btn:first-child > .btn-group {\n margin-right: -1px;\n}\n.input-group-btn:last-child > .btn,\n.input-group-btn:last-child > .btn-group {\n margin-left: -1px;\n}\n.nav {\n margin-bottom: 0;\n padding-left: 0;\n list-style: none;\n}\n.nav > li {\n position: relative;\n display: block;\n}\n.nav > li > a {\n position: relative;\n display: block;\n padding: 10px 15px;\n}\n.nav > li > a:hover,\n.nav > li > a:focus {\n text-decoration: none;\n background-color: #eeeeee;\n}\n.nav > li.disabled > a {\n color: #777777;\n}\n.nav > li.disabled > a:hover,\n.nav > li.disabled > a:focus {\n color: #777777;\n text-decoration: none;\n background-color: transparent;\n cursor: not-allowed;\n}\n.nav .open > a,\n.nav .open > a:hover,\n.nav .open > a:focus {\n background-color: #eeeeee;\n border-color: #428bca;\n}\n.nav .nav-divider {\n height: 1px;\n margin: 9px 0;\n overflow: hidden;\n background-color: #e5e5e5;\n}\n.nav > li > a > img {\n max-width: none;\n}\n.nav-tabs {\n border-bottom: 1px solid #dddddd;\n}\n.nav-tabs > li {\n float: left;\n margin-bottom: -1px;\n}\n.nav-tabs > li > a {\n margin-right: 2px;\n line-height: 1.42857143;\n border: 1px solid transparent;\n border-radius: 4px 4px 0 0;\n}\n.nav-tabs > li > a:hover {\n border-color: #eeeeee #eeeeee #dddddd;\n}\n.nav-tabs > li.active > a,\n.nav-tabs > li.active > a:hover,\n.nav-tabs > li.active > a:focus {\n color: #555555;\n background-color: #ffffff;\n border: 1px solid #dddddd;\n border-bottom-color: transparent;\n cursor: default;\n}\n.nav-tabs.nav-justified {\n width: 100%;\n border-bottom: 0;\n}\n.nav-tabs.nav-justified > li {\n float: none;\n}\n.nav-tabs.nav-justified > li > a {\n text-align: center;\n margin-bottom: 5px;\n}\n.nav-tabs.nav-justified > .dropdown .dropdown-menu {\n top: auto;\n left: auto;\n}\n@media (min-width: 768px) {\n .nav-tabs.nav-justified > li {\n display: table-cell;\n width: 1%;\n }\n .nav-tabs.nav-justified > li > a {\n margin-bottom: 0;\n }\n}\n.nav-tabs.nav-justified > li > a {\n margin-right: 0;\n border-radius: 4px;\n}\n.nav-tabs.nav-justified > .active > a,\n.nav-tabs.nav-justified > .active > a:hover,\n.nav-tabs.nav-justified > .active > a:focus {\n border: 1px solid #dddddd;\n}\n@media (min-width: 768px) {\n .nav-tabs.nav-justified > li > a {\n border-bottom: 1px solid #dddddd;\n border-radius: 4px 4px 0 0;\n }\n .nav-tabs.nav-justified > .active > a,\n .nav-tabs.nav-justified > .active > a:hover,\n .nav-tabs.nav-justified > .active > a:focus {\n border-bottom-color: #ffffff;\n }\n}\n.nav-pills > li {\n float: left;\n}\n.nav-pills > li > a {\n border-radius: 4px;\n}\n.nav-pills > li + li {\n margin-left: 2px;\n}\n.nav-pills > li.active > a,\n.nav-pills > li.active > a:hover,\n.nav-pills > li.active > a:focus {\n color: #ffffff;\n background-color: #428bca;\n}\n.nav-stacked > li {\n float: none;\n}\n.nav-stacked > li + li {\n margin-top: 2px;\n margin-left: 0;\n}\n.nav-justified {\n width: 100%;\n}\n.nav-justified > li {\n float: none;\n}\n.nav-justified > li > a {\n text-align: center;\n margin-bottom: 5px;\n}\n.nav-justified > .dropdown .dropdown-menu {\n top: auto;\n left: auto;\n}\n@media (min-width: 768px) {\n .nav-justified > li {\n display: table-cell;\n width: 1%;\n }\n .nav-justified > li > a {\n margin-bottom: 0;\n }\n}\n.nav-tabs-justified {\n border-bottom: 0;\n}\n.nav-tabs-justified > li > a {\n margin-right: 0;\n border-radius: 4px;\n}\n.nav-tabs-justified > .active > a,\n.nav-tabs-justified > .active > a:hover,\n.nav-tabs-justified > .active > a:focus {\n border: 1px solid #dddddd;\n}\n@media (min-width: 768px) {\n .nav-tabs-justified > li > a {\n border-bottom: 1px solid #dddddd;\n border-radius: 4px 4px 0 0;\n }\n .nav-tabs-justified > .active > a,\n .nav-tabs-justified > .active > a:hover,\n .nav-tabs-justified > .active > a:focus {\n border-bottom-color: #ffffff;\n }\n}\n.tab-content > .tab-pane {\n display: none;\n visibility: hidden;\n}\n.tab-content > .active {\n display: block;\n visibility: visible;\n}\n.nav-tabs .dropdown-menu {\n margin-top: -1px;\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n}\n.navbar {\n position: relative;\n min-height: 50px;\n margin-bottom: 20px;\n border: 1px solid transparent;\n}\n@media (min-width: 768px) {\n .navbar {\n border-radius: 4px;\n }\n}\n@media (min-width: 768px) {\n .navbar-header {\n float: left;\n }\n}\n.navbar-collapse {\n overflow-x: visible;\n padding-right: 15px;\n padding-left: 15px;\n border-top: 1px solid transparent;\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);\n -webkit-overflow-scrolling: touch;\n}\n.navbar-collapse.in {\n overflow-y: auto;\n}\n@media (min-width: 768px) {\n .navbar-collapse {\n width: auto;\n border-top: 0;\n box-shadow: none;\n }\n .navbar-collapse.collapse {\n display: block !important;\n visibility: visible !important;\n height: auto !important;\n padding-bottom: 0;\n overflow: visible !important;\n }\n .navbar-collapse.in {\n overflow-y: visible;\n }\n .navbar-fixed-top .navbar-collapse,\n .navbar-static-top .navbar-collapse,\n .navbar-fixed-bottom .navbar-collapse {\n padding-left: 0;\n padding-right: 0;\n }\n}\n.navbar-fixed-top .navbar-collapse,\n.navbar-fixed-bottom .navbar-collapse {\n max-height: 340px;\n}\n@media (max-device-width: 480px) and (orientation: landscape) {\n .navbar-fixed-top .navbar-collapse,\n .navbar-fixed-bottom .navbar-collapse {\n max-height: 200px;\n }\n}\n.container > .navbar-header,\n.container-fluid > .navbar-header,\n.container > .navbar-collapse,\n.container-fluid > .navbar-collapse {\n margin-right: -15px;\n margin-left: -15px;\n}\n@media (min-width: 768px) {\n .container > .navbar-header,\n .container-fluid > .navbar-header,\n .container > .navbar-collapse,\n .container-fluid > .navbar-collapse {\n margin-right: 0;\n margin-left: 0;\n }\n}\n.navbar-static-top {\n z-index: 1000;\n border-width: 0 0 1px;\n}\n@media (min-width: 768px) {\n .navbar-static-top {\n border-radius: 0;\n }\n}\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n position: fixed;\n right: 0;\n left: 0;\n z-index: 1030;\n}\n@media (min-width: 768px) {\n .navbar-fixed-top,\n .navbar-fixed-bottom {\n border-radius: 0;\n }\n}\n.navbar-fixed-top {\n top: 0;\n border-width: 0 0 1px;\n}\n.navbar-fixed-bottom {\n bottom: 0;\n margin-bottom: 0;\n border-width: 1px 0 0;\n}\n.navbar-brand {\n float: left;\n padding: 15px 15px;\n font-size: 18px;\n line-height: 20px;\n height: 50px;\n}\n.navbar-brand:hover,\n.navbar-brand:focus {\n text-decoration: none;\n}\n.navbar-brand > img {\n display: block;\n}\n@media (min-width: 768px) {\n .navbar > .container .navbar-brand,\n .navbar > .container-fluid .navbar-brand {\n margin-left: -15px;\n }\n}\n.navbar-toggle {\n position: relative;\n float: right;\n margin-right: 15px;\n padding: 9px 10px;\n margin-top: 8px;\n margin-bottom: 8px;\n background-color: transparent;\n background-image: none;\n border: 1px solid transparent;\n border-radius: 4px;\n}\n.navbar-toggle:focus {\n outline: 0;\n}\n.navbar-toggle .icon-bar {\n display: block;\n width: 22px;\n height: 2px;\n border-radius: 1px;\n}\n.navbar-toggle .icon-bar + .icon-bar {\n margin-top: 4px;\n}\n@media (min-width: 768px) {\n .navbar-toggle {\n display: none;\n }\n}\n.navbar-nav {\n margin: 7.5px -15px;\n}\n.navbar-nav > li > a {\n padding-top: 10px;\n padding-bottom: 10px;\n line-height: 20px;\n}\n@media (max-width: 767px) {\n .navbar-nav .open .dropdown-menu {\n position: static;\n float: none;\n width: auto;\n margin-top: 0;\n background-color: transparent;\n border: 0;\n box-shadow: none;\n }\n .navbar-nav .open .dropdown-menu > li > a,\n .navbar-nav .open .dropdown-menu .dropdown-header {\n padding: 5px 15px 5px 25px;\n }\n .navbar-nav .open .dropdown-menu > li > a {\n line-height: 20px;\n }\n .navbar-nav .open .dropdown-menu > li > a:hover,\n .navbar-nav .open .dropdown-menu > li > a:focus {\n background-image: none;\n }\n}\n@media (min-width: 768px) {\n .navbar-nav {\n float: left;\n margin: 0;\n }\n .navbar-nav > li {\n float: left;\n }\n .navbar-nav > li > a {\n padding-top: 15px;\n padding-bottom: 15px;\n }\n}\n.navbar-form {\n margin-left: -15px;\n margin-right: -15px;\n padding: 10px 15px;\n border-top: 1px solid transparent;\n border-bottom: 1px solid transparent;\n -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);\n margin-top: 8px;\n margin-bottom: 8px;\n}\n@media (min-width: 768px) {\n .navbar-form .form-group {\n display: inline-block;\n margin-bottom: 0;\n vertical-align: middle;\n }\n .navbar-form .form-control {\n display: inline-block;\n width: auto;\n vertical-align: middle;\n }\n .navbar-form .form-control-static {\n display: inline-block;\n }\n .navbar-form .input-group {\n display: inline-table;\n vertical-align: middle;\n }\n .navbar-form .input-group .input-group-addon,\n .navbar-form .input-group .input-group-btn,\n .navbar-form .input-group .form-control {\n width: auto;\n }\n .navbar-form .input-group > .form-control {\n width: 100%;\n }\n .navbar-form .control-label {\n margin-bottom: 0;\n vertical-align: middle;\n }\n .navbar-form .radio,\n .navbar-form .checkbox {\n display: inline-block;\n margin-top: 0;\n margin-bottom: 0;\n vertical-align: middle;\n }\n .navbar-form .radio label,\n .navbar-form .checkbox label {\n padding-left: 0;\n }\n .navbar-form .radio input[type=\"radio\"],\n .navbar-form .checkbox input[type=\"checkbox\"] {\n position: relative;\n margin-left: 0;\n }\n .navbar-form .has-feedback .form-control-feedback {\n top: 0;\n }\n}\n@media (max-width: 767px) {\n .navbar-form .form-group {\n margin-bottom: 5px;\n }\n .navbar-form .form-group:last-child {\n margin-bottom: 0;\n }\n}\n@media (min-width: 768px) {\n .navbar-form {\n width: auto;\n border: 0;\n margin-left: 0;\n margin-right: 0;\n padding-top: 0;\n padding-bottom: 0;\n -webkit-box-shadow: none;\n box-shadow: none;\n }\n}\n.navbar-nav > li > .dropdown-menu {\n margin-top: 0;\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n}\n.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n}\n.navbar-btn {\n margin-top: 8px;\n margin-bottom: 8px;\n}\n.navbar-btn.btn-sm {\n margin-top: 10px;\n margin-bottom: 10px;\n}\n.navbar-btn.btn-xs {\n margin-top: 14px;\n margin-bottom: 14px;\n}\n.navbar-text {\n margin-top: 15px;\n margin-bottom: 15px;\n}\n@media (min-width: 768px) {\n .navbar-text {\n float: left;\n margin-left: 15px;\n margin-right: 15px;\n }\n}\n@media (min-width: 768px) {\n .navbar-left {\n float: left !important;\n }\n .navbar-right {\n float: right !important;\n margin-right: -15px;\n }\n .navbar-right ~ .navbar-right {\n margin-right: 0;\n }\n}\n.navbar-default {\n background-color: #f8f8f8;\n border-color: #e7e7e7;\n}\n.navbar-default .navbar-brand {\n color: #777777;\n}\n.navbar-default .navbar-brand:hover,\n.navbar-default .navbar-brand:focus {\n color: #5e5e5e;\n background-color: transparent;\n}\n.navbar-default .navbar-text {\n color: #777777;\n}\n.navbar-default .navbar-nav > li > a {\n color: #777777;\n}\n.navbar-default .navbar-nav > li > a:hover,\n.navbar-default .navbar-nav > li > a:focus {\n color: #333333;\n background-color: transparent;\n}\n.navbar-default .navbar-nav > .active > a,\n.navbar-default .navbar-nav > .active > a:hover,\n.navbar-default .navbar-nav > .active > a:focus {\n color: #555555;\n background-color: #e7e7e7;\n}\n.navbar-default .navbar-nav > .disabled > a,\n.navbar-default .navbar-nav > .disabled > a:hover,\n.navbar-default .navbar-nav > .disabled > a:focus {\n color: #cccccc;\n background-color: transparent;\n}\n.navbar-default .navbar-toggle {\n border-color: #dddddd;\n}\n.navbar-default .navbar-toggle:hover,\n.navbar-default .navbar-toggle:focus {\n background-color: #dddddd;\n}\n.navbar-default .navbar-toggle .icon-bar {\n background-color: #888888;\n}\n.navbar-default .navbar-collapse,\n.navbar-default .navbar-form {\n border-color: #e7e7e7;\n}\n.navbar-default .navbar-nav > .open > a,\n.navbar-default .navbar-nav > .open > a:hover,\n.navbar-default .navbar-nav > .open > a:focus {\n background-color: #e7e7e7;\n color: #555555;\n}\n@media (max-width: 767px) {\n .navbar-default .navbar-nav .open .dropdown-menu > li > a {\n color: #777777;\n }\n .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover,\n .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus {\n color: #333333;\n background-color: transparent;\n }\n .navbar-default .navbar-nav .open .dropdown-menu > .active > a,\n .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover,\n .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus {\n color: #555555;\n background-color: #e7e7e7;\n }\n .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a,\n .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover,\n .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus {\n color: #cccccc;\n background-color: transparent;\n }\n}\n.navbar-default .navbar-link {\n color: #777777;\n}\n.navbar-default .navbar-link:hover {\n color: #333333;\n}\n.navbar-default .btn-link {\n color: #777777;\n}\n.navbar-default .btn-link:hover,\n.navbar-default .btn-link:focus {\n color: #333333;\n}\n.navbar-default .btn-link[disabled]:hover,\nfieldset[disabled] .navbar-default .btn-link:hover,\n.navbar-default .btn-link[disabled]:focus,\nfieldset[disabled] .navbar-default .btn-link:focus {\n color: #cccccc;\n}\n.navbar-inverse {\n background-color: #222222;\n border-color: #080808;\n}\n.navbar-inverse .navbar-brand {\n color: #9d9d9d;\n}\n.navbar-inverse .navbar-brand:hover,\n.navbar-inverse .navbar-brand:focus {\n color: #ffffff;\n background-color: transparent;\n}\n.navbar-inverse .navbar-text {\n color: #9d9d9d;\n}\n.navbar-inverse .navbar-nav > li > a {\n color: #9d9d9d;\n}\n.navbar-inverse .navbar-nav > li > a:hover,\n.navbar-inverse .navbar-nav > li > a:focus {\n color: #ffffff;\n background-color: transparent;\n}\n.navbar-inverse .navbar-nav > .active > a,\n.navbar-inverse .navbar-nav > .active > a:hover,\n.navbar-inverse .navbar-nav > .active > a:focus {\n color: #ffffff;\n background-color: #080808;\n}\n.navbar-inverse .navbar-nav > .disabled > a,\n.navbar-inverse .navbar-nav > .disabled > a:hover,\n.navbar-inverse .navbar-nav > .disabled > a:focus {\n color: #444444;\n background-color: transparent;\n}\n.navbar-inverse .navbar-toggle {\n border-color: #333333;\n}\n.navbar-inverse .navbar-toggle:hover,\n.navbar-inverse .navbar-toggle:focus {\n background-color: #333333;\n}\n.navbar-inverse .navbar-toggle .icon-bar {\n background-color: #ffffff;\n}\n.navbar-inverse .navbar-collapse,\n.navbar-inverse .navbar-form {\n border-color: #101010;\n}\n.navbar-inverse .navbar-nav > .open > a,\n.navbar-inverse .navbar-nav > .open > a:hover,\n.navbar-inverse .navbar-nav > .open > a:focus {\n background-color: #080808;\n color: #ffffff;\n}\n@media (max-width: 767px) {\n .navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header {\n border-color: #080808;\n }\n .navbar-inverse .navbar-nav .open .dropdown-menu .divider {\n background-color: #080808;\n }\n .navbar-inverse .navbar-nav .open .dropdown-menu > li > a {\n color: #9d9d9d;\n }\n .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover,\n .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus {\n color: #ffffff;\n background-color: transparent;\n }\n .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a,\n .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover,\n .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus {\n color: #ffffff;\n background-color: #080808;\n }\n .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a,\n .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover,\n .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus {\n color: #444444;\n background-color: transparent;\n }\n}\n.navbar-inverse .navbar-link {\n color: #9d9d9d;\n}\n.navbar-inverse .navbar-link:hover {\n color: #ffffff;\n}\n.navbar-inverse .btn-link {\n color: #9d9d9d;\n}\n.navbar-inverse .btn-link:hover,\n.navbar-inverse .btn-link:focus {\n color: #ffffff;\n}\n.navbar-inverse .btn-link[disabled]:hover,\nfieldset[disabled] .navbar-inverse .btn-link:hover,\n.navbar-inverse .btn-link[disabled]:focus,\nfieldset[disabled] .navbar-inverse .btn-link:focus {\n color: #444444;\n}\n.breadcrumb {\n padding: 8px 15px;\n margin-bottom: 20px;\n list-style: none;\n background-color: #f5f5f5;\n border-radius: 4px;\n}\n.breadcrumb > li {\n display: inline-block;\n}\n.breadcrumb > li + li:before {\n content: \"/\\00a0\";\n padding: 0 5px;\n color: #cccccc;\n}\n.breadcrumb > .active {\n color: #777777;\n}\n.pagination {\n display: inline-block;\n padding-left: 0;\n margin: 20px 0;\n border-radius: 4px;\n}\n.pagination > li {\n display: inline;\n}\n.pagination > li > a,\n.pagination > li > span {\n position: relative;\n float: left;\n padding: 6px 12px;\n line-height: 1.42857143;\n text-decoration: none;\n color: #428bca;\n background-color: #ffffff;\n border: 1px solid #dddddd;\n margin-left: -1px;\n}\n.pagination > li:first-child > a,\n.pagination > li:first-child > span {\n margin-left: 0;\n border-bottom-left-radius: 4px;\n border-top-left-radius: 4px;\n}\n.pagination > li:last-child > a,\n.pagination > li:last-child > span {\n border-bottom-right-radius: 4px;\n border-top-right-radius: 4px;\n}\n.pagination > li > a:hover,\n.pagination > li > span:hover,\n.pagination > li > a:focus,\n.pagination > li > span:focus {\n color: #2a6496;\n background-color: #eeeeee;\n border-color: #dddddd;\n}\n.pagination > .active > a,\n.pagination > .active > span,\n.pagination > .active > a:hover,\n.pagination > .active > span:hover,\n.pagination > .active > a:focus,\n.pagination > .active > span:focus {\n z-index: 2;\n color: #ffffff;\n background-color: #428bca;\n border-color: #428bca;\n cursor: default;\n}\n.pagination > .disabled > span,\n.pagination > .disabled > span:hover,\n.pagination > .disabled > span:focus,\n.pagination > .disabled > a,\n.pagination > .disabled > a:hover,\n.pagination > .disabled > a:focus {\n color: #777777;\n background-color: #ffffff;\n border-color: #dddddd;\n cursor: not-allowed;\n}\n.pagination-lg > li > a,\n.pagination-lg > li > span {\n padding: 10px 16px;\n font-size: 18px;\n}\n.pagination-lg > li:first-child > a,\n.pagination-lg > li:first-child > span {\n border-bottom-left-radius: 6px;\n border-top-left-radius: 6px;\n}\n.pagination-lg > li:last-child > a,\n.pagination-lg > li:last-child > span {\n border-bottom-right-radius: 6px;\n border-top-right-radius: 6px;\n}\n.pagination-sm > li > a,\n.pagination-sm > li > span {\n padding: 5px 10px;\n font-size: 12px;\n}\n.pagination-sm > li:first-child > a,\n.pagination-sm > li:first-child > span {\n border-bottom-left-radius: 3px;\n border-top-left-radius: 3px;\n}\n.pagination-sm > li:last-child > a,\n.pagination-sm > li:last-child > span {\n border-bottom-right-radius: 3px;\n border-top-right-radius: 3px;\n}\n.pager {\n padding-left: 0;\n margin: 20px 0;\n list-style: none;\n text-align: center;\n}\n.pager li {\n display: inline;\n}\n.pager li > a,\n.pager li > span {\n display: inline-block;\n padding: 5px 14px;\n background-color: #ffffff;\n border: 1px solid #dddddd;\n border-radius: 15px;\n}\n.pager li > a:hover,\n.pager li > a:focus {\n text-decoration: none;\n background-color: #eeeeee;\n}\n.pager .next > a,\n.pager .next > span {\n float: right;\n}\n.pager .previous > a,\n.pager .previous > span {\n float: left;\n}\n.pager .disabled > a,\n.pager .disabled > a:hover,\n.pager .disabled > a:focus,\n.pager .disabled > span {\n color: #777777;\n background-color: #ffffff;\n cursor: not-allowed;\n}\n.label {\n display: inline;\n padding: .2em .6em .3em;\n font-size: 75%;\n font-weight: bold;\n line-height: 1;\n color: #ffffff;\n text-align: center;\n white-space: nowrap;\n vertical-align: baseline;\n border-radius: .25em;\n}\na.label:hover,\na.label:focus {\n color: #ffffff;\n text-decoration: none;\n cursor: pointer;\n}\n.label:empty {\n display: none;\n}\n.btn .label {\n position: relative;\n top: -1px;\n}\n.label-default {\n background-color: #777777;\n}\n.label-default[href]:hover,\n.label-default[href]:focus {\n background-color: #5e5e5e;\n}\n.label-primary {\n background-color: #428bca;\n}\n.label-primary[href]:hover,\n.label-primary[href]:focus {\n background-color: #3071a9;\n}\n.label-success {\n background-color: #5cb85c;\n}\n.label-success[href]:hover,\n.label-success[href]:focus {\n background-color: #449d44;\n}\n.label-info {\n background-color: #5bc0de;\n}\n.label-info[href]:hover,\n.label-info[href]:focus {\n background-color: #31b0d5;\n}\n.label-warning {\n background-color: #f0ad4e;\n}\n.label-warning[href]:hover,\n.label-warning[href]:focus {\n background-color: #ec971f;\n}\n.label-danger {\n background-color: #d9534f;\n}\n.label-danger[href]:hover,\n.label-danger[href]:focus {\n background-color: #c9302c;\n}\n.badge {\n display: inline-block;\n min-width: 10px;\n padding: 3px 7px;\n font-size: 12px;\n font-weight: bold;\n color: #ffffff;\n line-height: 1;\n vertical-align: baseline;\n white-space: nowrap;\n text-align: center;\n background-color: #777777;\n border-radius: 10px;\n}\n.badge:empty {\n display: none;\n}\n.btn .badge {\n position: relative;\n top: -1px;\n}\n.btn-xs .badge {\n top: 0;\n padding: 1px 5px;\n}\na.badge:hover,\na.badge:focus {\n color: #ffffff;\n text-decoration: none;\n cursor: pointer;\n}\na.list-group-item.active > .badge,\n.nav-pills > .active > a > .badge {\n color: #428bca;\n background-color: #ffffff;\n}\n.nav-pills > li > a > .badge {\n margin-left: 3px;\n}\n.jumbotron {\n padding: 30px 15px;\n margin-bottom: 30px;\n color: inherit;\n background-color: #eeeeee;\n}\n.jumbotron h1,\n.jumbotron .h1 {\n color: inherit;\n}\n.jumbotron p {\n margin-bottom: 15px;\n font-size: 21px;\n font-weight: 200;\n}\n.jumbotron > hr {\n border-top-color: #d5d5d5;\n}\n.container .jumbotron,\n.container-fluid .jumbotron {\n border-radius: 6px;\n}\n.jumbotron .container {\n max-width: 100%;\n}\n@media screen and (min-width: 768px) {\n .jumbotron {\n padding: 48px 0;\n }\n .container .jumbotron {\n padding-left: 60px;\n padding-right: 60px;\n }\n .jumbotron h1,\n .jumbotron .h1 {\n font-size: 63px;\n }\n}\n.thumbnail {\n display: block;\n padding: 4px;\n margin-bottom: 20px;\n line-height: 1.42857143;\n background-color: #ffffff;\n border: 1px solid #dddddd;\n border-radius: 4px;\n -webkit-transition: border 0.2s ease-in-out;\n -o-transition: border 0.2s ease-in-out;\n transition: border 0.2s ease-in-out;\n}\n.thumbnail > img,\n.thumbnail a > img {\n margin-left: auto;\n margin-right: auto;\n}\na.thumbnail:hover,\na.thumbnail:focus,\na.thumbnail.active {\n border-color: #428bca;\n}\n.thumbnail .caption {\n padding: 9px;\n color: #333333;\n}\n.alert {\n padding: 15px;\n margin-bottom: 20px;\n border: 1px solid transparent;\n border-radius: 4px;\n}\n.alert h4 {\n margin-top: 0;\n color: inherit;\n}\n.alert .alert-link {\n font-weight: bold;\n}\n.alert > p,\n.alert > ul {\n margin-bottom: 0;\n}\n.alert > p + p {\n margin-top: 5px;\n}\n.alert-dismissable,\n.alert-dismissible {\n padding-right: 35px;\n}\n.alert-dismissable .close,\n.alert-dismissible .close {\n position: relative;\n top: -2px;\n right: -21px;\n color: inherit;\n}\n.alert-success {\n background-color: #dff0d8;\n border-color: #d6e9c6;\n color: #3c763d;\n}\n.alert-success hr {\n border-top-color: #c9e2b3;\n}\n.alert-success .alert-link {\n color: #2b542c;\n}\n.alert-info {\n background-color: #d9edf7;\n border-color: #bce8f1;\n color: #31708f;\n}\n.alert-info hr {\n border-top-color: #a6e1ec;\n}\n.alert-info .alert-link {\n color: #245269;\n}\n.alert-warning {\n background-color: #fcf8e3;\n border-color: #faebcc;\n color: #8a6d3b;\n}\n.alert-warning hr {\n border-top-color: #f7e1b5;\n}\n.alert-warning .alert-link {\n color: #66512c;\n}\n.alert-danger {\n background-color: #f2dede;\n border-color: #ebccd1;\n color: #a94442;\n}\n.alert-danger hr {\n border-top-color: #e4b9c0;\n}\n.alert-danger .alert-link {\n color: #843534;\n}\n@-webkit-keyframes progress-bar-stripes {\n from {\n background-position: 40px 0;\n }\n to {\n background-position: 0 0;\n }\n}\n@keyframes progress-bar-stripes {\n from {\n background-position: 40px 0;\n }\n to {\n background-position: 0 0;\n }\n}\n.progress {\n overflow: hidden;\n height: 20px;\n margin-bottom: 20px;\n background-color: #f5f5f5;\n border-radius: 4px;\n -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);\n box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);\n}\n.progress-bar {\n float: left;\n width: 0%;\n height: 100%;\n font-size: 12px;\n line-height: 20px;\n color: #ffffff;\n text-align: center;\n background-color: #428bca;\n -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);\n box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);\n -webkit-transition: width 0.6s ease;\n -o-transition: width 0.6s ease;\n transition: width 0.6s ease;\n}\n.progress-striped .progress-bar,\n.progress-bar-striped {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-size: 40px 40px;\n}\n.progress.active .progress-bar,\n.progress-bar.active {\n -webkit-animation: progress-bar-stripes 2s linear infinite;\n -o-animation: progress-bar-stripes 2s linear infinite;\n animation: progress-bar-stripes 2s linear infinite;\n}\n.progress-bar-success {\n background-color: #5cb85c;\n}\n.progress-striped .progress-bar-success {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n.progress-bar-info {\n background-color: #5bc0de;\n}\n.progress-striped .progress-bar-info {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n.progress-bar-warning {\n background-color: #f0ad4e;\n}\n.progress-striped .progress-bar-warning {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n.progress-bar-danger {\n background-color: #d9534f;\n}\n.progress-striped .progress-bar-danger {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n.media {\n margin-top: 15px;\n}\n.media:first-child {\n margin-top: 0;\n}\n.media-right,\n.media > .pull-right {\n padding-left: 10px;\n}\n.media-left,\n.media > .pull-left {\n padding-right: 10px;\n}\n.media-left,\n.media-right,\n.media-body {\n display: table-cell;\n vertical-align: top;\n}\n.media-middle {\n vertical-align: middle;\n}\n.media-bottom {\n vertical-align: bottom;\n}\n.media-heading {\n margin-top: 0;\n margin-bottom: 5px;\n}\n.media-list {\n padding-left: 0;\n list-style: none;\n}\n.list-group {\n margin-bottom: 20px;\n padding-left: 0;\n}\n.list-group-item {\n position: relative;\n display: block;\n padding: 10px 15px;\n margin-bottom: -1px;\n background-color: #ffffff;\n border: 1px solid #dddddd;\n}\n.list-group-item:first-child {\n border-top-right-radius: 4px;\n border-top-left-radius: 4px;\n}\n.list-group-item:last-child {\n margin-bottom: 0;\n border-bottom-right-radius: 4px;\n border-bottom-left-radius: 4px;\n}\n.list-group-item > .badge {\n float: right;\n}\n.list-group-item > .badge + .badge {\n margin-right: 5px;\n}\na.list-group-item {\n color: #555555;\n}\na.list-group-item .list-group-item-heading {\n color: #333333;\n}\na.list-group-item:hover,\na.list-group-item:focus {\n text-decoration: none;\n color: #555555;\n background-color: #f5f5f5;\n}\n.list-group-item.disabled,\n.list-group-item.disabled:hover,\n.list-group-item.disabled:focus {\n background-color: #eeeeee;\n color: #777777;\n cursor: not-allowed;\n}\n.list-group-item.disabled .list-group-item-heading,\n.list-group-item.disabled:hover .list-group-item-heading,\n.list-group-item.disabled:focus .list-group-item-heading {\n color: inherit;\n}\n.list-group-item.disabled .list-group-item-text,\n.list-group-item.disabled:hover .list-group-item-text,\n.list-group-item.disabled:focus .list-group-item-text {\n color: #777777;\n}\n.list-group-item.active,\n.list-group-item.active:hover,\n.list-group-item.active:focus {\n z-index: 2;\n color: #ffffff;\n background-color: #428bca;\n border-color: #428bca;\n}\n.list-group-item.active .list-group-item-heading,\n.list-group-item.active:hover .list-group-item-heading,\n.list-group-item.active:focus .list-group-item-heading,\n.list-group-item.active .list-group-item-heading > small,\n.list-group-item.active:hover .list-group-item-heading > small,\n.list-group-item.active:focus .list-group-item-heading > small,\n.list-group-item.active .list-group-item-heading > .small,\n.list-group-item.active:hover .list-group-item-heading > .small,\n.list-group-item.active:focus .list-group-item-heading > .small {\n color: inherit;\n}\n.list-group-item.active .list-group-item-text,\n.list-group-item.active:hover .list-group-item-text,\n.list-group-item.active:focus .list-group-item-text {\n color: #e1edf7;\n}\n.list-group-item-success {\n color: #3c763d;\n background-color: #dff0d8;\n}\na.list-group-item-success {\n color: #3c763d;\n}\na.list-group-item-success .list-group-item-heading {\n color: inherit;\n}\na.list-group-item-success:hover,\na.list-group-item-success:focus {\n color: #3c763d;\n background-color: #d0e9c6;\n}\na.list-group-item-success.active,\na.list-group-item-success.active:hover,\na.list-group-item-success.active:focus {\n color: #fff;\n background-color: #3c763d;\n border-color: #3c763d;\n}\n.list-group-item-info {\n color: #31708f;\n background-color: #d9edf7;\n}\na.list-group-item-info {\n color: #31708f;\n}\na.list-group-item-info .list-group-item-heading {\n color: inherit;\n}\na.list-group-item-info:hover,\na.list-group-item-info:focus {\n color: #31708f;\n background-color: #c4e3f3;\n}\na.list-group-item-info.active,\na.list-group-item-info.active:hover,\na.list-group-item-info.active:focus {\n color: #fff;\n background-color: #31708f;\n border-color: #31708f;\n}\n.list-group-item-warning {\n color: #8a6d3b;\n background-color: #fcf8e3;\n}\na.list-group-item-warning {\n color: #8a6d3b;\n}\na.list-group-item-warning .list-group-item-heading {\n color: inherit;\n}\na.list-group-item-warning:hover,\na.list-group-item-warning:focus {\n color: #8a6d3b;\n background-color: #faf2cc;\n}\na.list-group-item-warning.active,\na.list-group-item-warning.active:hover,\na.list-group-item-warning.active:focus {\n color: #fff;\n background-color: #8a6d3b;\n border-color: #8a6d3b;\n}\n.list-group-item-danger {\n color: #a94442;\n background-color: #f2dede;\n}\na.list-group-item-danger {\n color: #a94442;\n}\na.list-group-item-danger .list-group-item-heading {\n color: inherit;\n}\na.list-group-item-danger:hover,\na.list-group-item-danger:focus {\n color: #a94442;\n background-color: #ebcccc;\n}\na.list-group-item-danger.active,\na.list-group-item-danger.active:hover,\na.list-group-item-danger.active:focus {\n color: #fff;\n background-color: #a94442;\n border-color: #a94442;\n}\n.list-group-item-heading {\n margin-top: 0;\n margin-bottom: 5px;\n}\n.list-group-item-text {\n margin-bottom: 0;\n line-height: 1.3;\n}\n.panel {\n margin-bottom: 20px;\n background-color: #ffffff;\n border: 1px solid transparent;\n border-radius: 4px;\n -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);\n box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);\n}\n.panel-body {\n padding: 15px;\n}\n.panel-heading {\n padding: 10px 15px;\n border-bottom: 1px solid transparent;\n border-top-right-radius: 3px;\n border-top-left-radius: 3px;\n}\n.panel-heading > .dropdown .dropdown-toggle {\n color: inherit;\n}\n.panel-title {\n margin-top: 0;\n margin-bottom: 0;\n font-size: 16px;\n color: inherit;\n}\n.panel-title > a {\n color: inherit;\n}\n.panel-footer {\n padding: 10px 15px;\n background-color: #f5f5f5;\n border-top: 1px solid #dddddd;\n border-bottom-right-radius: 3px;\n border-bottom-left-radius: 3px;\n}\n.panel > .list-group,\n.panel > .panel-collapse > .list-group {\n margin-bottom: 0;\n}\n.panel > .list-group .list-group-item,\n.panel > .panel-collapse > .list-group .list-group-item {\n border-width: 1px 0;\n border-radius: 0;\n}\n.panel > .list-group:first-child .list-group-item:first-child,\n.panel > .panel-collapse > .list-group:first-child .list-group-item:first-child {\n border-top: 0;\n border-top-right-radius: 3px;\n border-top-left-radius: 3px;\n}\n.panel > .list-group:last-child .list-group-item:last-child,\n.panel > .panel-collapse > .list-group:last-child .list-group-item:last-child {\n border-bottom: 0;\n border-bottom-right-radius: 3px;\n border-bottom-left-radius: 3px;\n}\n.panel-heading + .list-group .list-group-item:first-child {\n border-top-width: 0;\n}\n.list-group + .panel-footer {\n border-top-width: 0;\n}\n.panel > .table,\n.panel > .table-responsive > .table,\n.panel > .panel-collapse > .table {\n margin-bottom: 0;\n}\n.panel > .table caption,\n.panel > .table-responsive > .table caption,\n.panel > .panel-collapse > .table caption {\n padding-left: 15px;\n padding-right: 15px;\n}\n.panel > .table:first-child,\n.panel > .table-responsive:first-child > .table:first-child {\n border-top-right-radius: 3px;\n border-top-left-radius: 3px;\n}\n.panel > .table:first-child > thead:first-child > tr:first-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child {\n border-top-left-radius: 3px;\n border-top-right-radius: 3px;\n}\n.panel > .table:first-child > thead:first-child > tr:first-child td:first-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:first-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child td:first-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:first-child,\n.panel > .table:first-child > thead:first-child > tr:first-child th:first-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:first-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child th:first-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:first-child {\n border-top-left-radius: 3px;\n}\n.panel > .table:first-child > thead:first-child > tr:first-child td:last-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:last-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child td:last-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:last-child,\n.panel > .table:first-child > thead:first-child > tr:first-child th:last-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:last-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child th:last-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:last-child {\n border-top-right-radius: 3px;\n}\n.panel > .table:last-child,\n.panel > .table-responsive:last-child > .table:last-child {\n border-bottom-right-radius: 3px;\n border-bottom-left-radius: 3px;\n}\n.panel > .table:last-child > tbody:last-child > tr:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child {\n border-bottom-left-radius: 3px;\n border-bottom-right-radius: 3px;\n}\n.panel > .table:last-child > tbody:last-child > tr:last-child td:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:first-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child td:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:first-child,\n.panel > .table:last-child > tbody:last-child > tr:last-child th:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:first-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child th:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:first-child {\n border-bottom-left-radius: 3px;\n}\n.panel > .table:last-child > tbody:last-child > tr:last-child td:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:last-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child td:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:last-child,\n.panel > .table:last-child > tbody:last-child > tr:last-child th:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:last-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child th:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:last-child {\n border-bottom-right-radius: 3px;\n}\n.panel > .panel-body + .table,\n.panel > .panel-body + .table-responsive,\n.panel > .table + .panel-body,\n.panel > .table-responsive + .panel-body {\n border-top: 1px solid #dddddd;\n}\n.panel > .table > tbody:first-child > tr:first-child th,\n.panel > .table > tbody:first-child > tr:first-child td {\n border-top: 0;\n}\n.panel > .table-bordered,\n.panel > .table-responsive > .table-bordered {\n border: 0;\n}\n.panel > .table-bordered > thead > tr > th:first-child,\n.panel > .table-responsive > .table-bordered > thead > tr > th:first-child,\n.panel > .table-bordered > tbody > tr > th:first-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > th:first-child,\n.panel > .table-bordered > tfoot > tr > th:first-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > th:first-child,\n.panel > .table-bordered > thead > tr > td:first-child,\n.panel > .table-responsive > .table-bordered > thead > tr > td:first-child,\n.panel > .table-bordered > tbody > tr > td:first-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > td:first-child,\n.panel > .table-bordered > tfoot > tr > td:first-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > td:first-child {\n border-left: 0;\n}\n.panel > .table-bordered > thead > tr > th:last-child,\n.panel > .table-responsive > .table-bordered > thead > tr > th:last-child,\n.panel > .table-bordered > tbody > tr > th:last-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > th:last-child,\n.panel > .table-bordered > tfoot > tr > th:last-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > th:last-child,\n.panel > .table-bordered > thead > tr > td:last-child,\n.panel > .table-responsive > .table-bordered > thead > tr > td:last-child,\n.panel > .table-bordered > tbody > tr > td:last-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > td:last-child,\n.panel > .table-bordered > tfoot > tr > td:last-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > td:last-child {\n border-right: 0;\n}\n.panel > .table-bordered > thead > tr:first-child > td,\n.panel > .table-responsive > .table-bordered > thead > tr:first-child > td,\n.panel > .table-bordered > tbody > tr:first-child > td,\n.panel > .table-responsive > .table-bordered > tbody > tr:first-child > td,\n.panel > .table-bordered > thead > tr:first-child > th,\n.panel > .table-responsive > .table-bordered > thead > tr:first-child > th,\n.panel > .table-bordered > tbody > tr:first-child > th,\n.panel > .table-responsive > .table-bordered > tbody > tr:first-child > th {\n border-bottom: 0;\n}\n.panel > .table-bordered > tbody > tr:last-child > td,\n.panel > .table-responsive > .table-bordered > tbody > tr:last-child > td,\n.panel > .table-bordered > tfoot > tr:last-child > td,\n.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > td,\n.panel > .table-bordered > tbody > tr:last-child > th,\n.panel > .table-responsive > .table-bordered > tbody > tr:last-child > th,\n.panel > .table-bordered > tfoot > tr:last-child > th,\n.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > th {\n border-bottom: 0;\n}\n.panel > .table-responsive {\n border: 0;\n margin-bottom: 0;\n}\n.panel-group {\n margin-bottom: 20px;\n}\n.panel-group .panel {\n margin-bottom: 0;\n border-radius: 4px;\n}\n.panel-group .panel + .panel {\n margin-top: 5px;\n}\n.panel-group .panel-heading {\n border-bottom: 0;\n}\n.panel-group .panel-heading + .panel-collapse > .panel-body,\n.panel-group .panel-heading + .panel-collapse > .list-group {\n border-top: 1px solid #dddddd;\n}\n.panel-group .panel-footer {\n border-top: 0;\n}\n.panel-group .panel-footer + .panel-collapse .panel-body {\n border-bottom: 1px solid #dddddd;\n}\n.panel-default {\n border-color: #dddddd;\n}\n.panel-default > .panel-heading {\n color: #333333;\n background-color: #f5f5f5;\n border-color: #dddddd;\n}\n.panel-default > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #dddddd;\n}\n.panel-default > .panel-heading .badge {\n color: #f5f5f5;\n background-color: #333333;\n}\n.panel-default > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #dddddd;\n}\n.panel-primary {\n border-color: #428bca;\n}\n.panel-primary > .panel-heading {\n color: #ffffff;\n background-color: #428bca;\n border-color: #428bca;\n}\n.panel-primary > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #428bca;\n}\n.panel-primary > .panel-heading .badge {\n color: #428bca;\n background-color: #ffffff;\n}\n.panel-primary > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #428bca;\n}\n.panel-success {\n border-color: #d6e9c6;\n}\n.panel-success > .panel-heading {\n color: #3c763d;\n background-color: #dff0d8;\n border-color: #d6e9c6;\n}\n.panel-success > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #d6e9c6;\n}\n.panel-success > .panel-heading .badge {\n color: #dff0d8;\n background-color: #3c763d;\n}\n.panel-success > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #d6e9c6;\n}\n.panel-info {\n border-color: #bce8f1;\n}\n.panel-info > .panel-heading {\n color: #31708f;\n background-color: #d9edf7;\n border-color: #bce8f1;\n}\n.panel-info > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #bce8f1;\n}\n.panel-info > .panel-heading .badge {\n color: #d9edf7;\n background-color: #31708f;\n}\n.panel-info > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #bce8f1;\n}\n.panel-warning {\n border-color: #faebcc;\n}\n.panel-warning > .panel-heading {\n color: #8a6d3b;\n background-color: #fcf8e3;\n border-color: #faebcc;\n}\n.panel-warning > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #faebcc;\n}\n.panel-warning > .panel-heading .badge {\n color: #fcf8e3;\n background-color: #8a6d3b;\n}\n.panel-warning > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #faebcc;\n}\n.panel-danger {\n border-color: #ebccd1;\n}\n.panel-danger > .panel-heading {\n color: #a94442;\n background-color: #f2dede;\n border-color: #ebccd1;\n}\n.panel-danger > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #ebccd1;\n}\n.panel-danger > .panel-heading .badge {\n color: #f2dede;\n background-color: #a94442;\n}\n.panel-danger > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #ebccd1;\n}\n.embed-responsive {\n position: relative;\n display: block;\n height: 0;\n padding: 0;\n overflow: hidden;\n}\n.embed-responsive .embed-responsive-item,\n.embed-responsive iframe,\n.embed-responsive embed,\n.embed-responsive object,\n.embed-responsive video {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n height: 100%;\n width: 100%;\n border: 0;\n}\n.embed-responsive.embed-responsive-16by9 {\n padding-bottom: 56.25%;\n}\n.embed-responsive.embed-responsive-4by3 {\n padding-bottom: 75%;\n}\n.well {\n min-height: 20px;\n padding: 19px;\n margin-bottom: 20px;\n background-color: #f5f5f5;\n border: 1px solid #e3e3e3;\n border-radius: 4px;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);\n}\n.well blockquote {\n border-color: #ddd;\n border-color: rgba(0, 0, 0, 0.15);\n}\n.well-lg {\n padding: 24px;\n border-radius: 6px;\n}\n.well-sm {\n padding: 9px;\n border-radius: 3px;\n}\n.close {\n float: right;\n font-size: 21px;\n font-weight: bold;\n line-height: 1;\n color: #000000;\n text-shadow: 0 1px 0 #ffffff;\n opacity: 0.2;\n filter: alpha(opacity=20);\n}\n.close:hover,\n.close:focus {\n color: #000000;\n text-decoration: none;\n cursor: pointer;\n opacity: 0.5;\n filter: alpha(opacity=50);\n}\nbutton.close {\n padding: 0;\n cursor: pointer;\n background: transparent;\n border: 0;\n -webkit-appearance: none;\n}\n.modal-open {\n overflow: hidden;\n}\n.modal {\n display: none;\n overflow: hidden;\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1040;\n -webkit-overflow-scrolling: touch;\n outline: 0;\n}\n.modal.fade .modal-dialog {\n -webkit-transform: translate(0, -25%);\n -ms-transform: translate(0, -25%);\n -o-transform: translate(0, -25%);\n transform: translate(0, -25%);\n -webkit-transition: -webkit-transform 0.3s ease-out;\n -moz-transition: -moz-transform 0.3s ease-out;\n -o-transition: -o-transform 0.3s ease-out;\n transition: transform 0.3s ease-out;\n}\n.modal.in .modal-dialog {\n -webkit-transform: translate(0, 0);\n -ms-transform: translate(0, 0);\n -o-transform: translate(0, 0);\n transform: translate(0, 0);\n}\n.modal-open .modal {\n overflow-x: hidden;\n overflow-y: auto;\n}\n.modal-dialog {\n position: relative;\n width: auto;\n margin: 10px;\n}\n.modal-content {\n position: relative;\n background-color: #ffffff;\n border: 1px solid #999999;\n border: 1px solid rgba(0, 0, 0, 0.2);\n border-radius: 6px;\n -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);\n box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);\n background-clip: padding-box;\n outline: 0;\n}\n.modal-backdrop {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n background-color: #000000;\n}\n.modal-backdrop.fade {\n opacity: 0;\n filter: alpha(opacity=0);\n}\n.modal-backdrop.in {\n opacity: 0.5;\n filter: alpha(opacity=50);\n}\n.modal-header {\n padding: 15px;\n border-bottom: 1px solid #e5e5e5;\n min-height: 16.42857143px;\n}\n.modal-header .close {\n margin-top: -2px;\n}\n.modal-title {\n margin: 0;\n line-height: 1.42857143;\n}\n.modal-body {\n position: relative;\n padding: 15px;\n}\n.modal-footer {\n padding: 15px;\n text-align: right;\n border-top: 1px solid #e5e5e5;\n}\n.modal-footer .btn + .btn {\n margin-left: 5px;\n margin-bottom: 0;\n}\n.modal-footer .btn-group .btn + .btn {\n margin-left: -1px;\n}\n.modal-footer .btn-block + .btn-block {\n margin-left: 0;\n}\n.modal-scrollbar-measure {\n position: absolute;\n top: -9999px;\n width: 50px;\n height: 50px;\n overflow: scroll;\n}\n@media (min-width: 768px) {\n .modal-dialog {\n width: 600px;\n margin: 30px auto;\n }\n .modal-content {\n -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);\n box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);\n }\n .modal-sm {\n width: 300px;\n }\n}\n@media (min-width: 992px) {\n .modal-lg {\n width: 900px;\n }\n}\n.tooltip {\n position: absolute;\n z-index: 1070;\n display: block;\n visibility: visible;\n font-size: 12px;\n line-height: 1.4;\n opacity: 0;\n filter: alpha(opacity=0);\n}\n.tooltip.in {\n opacity: 0.9;\n filter: alpha(opacity=90);\n}\n.tooltip.top {\n margin-top: -3px;\n padding: 5px 0;\n}\n.tooltip.right {\n margin-left: 3px;\n padding: 0 5px;\n}\n.tooltip.bottom {\n margin-top: 3px;\n padding: 5px 0;\n}\n.tooltip.left {\n margin-left: -3px;\n padding: 0 5px;\n}\n.tooltip-inner {\n max-width: 200px;\n padding: 3px 8px;\n color: #ffffff;\n text-align: center;\n text-decoration: none;\n background-color: #000000;\n border-radius: 4px;\n}\n.tooltip-arrow {\n position: absolute;\n width: 0;\n height: 0;\n border-color: transparent;\n border-style: solid;\n}\n.tooltip.top .tooltip-arrow {\n bottom: 0;\n left: 50%;\n margin-left: -5px;\n border-width: 5px 5px 0;\n border-top-color: #000000;\n}\n.tooltip.top-left .tooltip-arrow {\n bottom: 0;\n left: 5px;\n border-width: 5px 5px 0;\n border-top-color: #000000;\n}\n.tooltip.top-right .tooltip-arrow {\n bottom: 0;\n right: 5px;\n border-width: 5px 5px 0;\n border-top-color: #000000;\n}\n.tooltip.right .tooltip-arrow {\n top: 50%;\n left: 0;\n margin-top: -5px;\n border-width: 5px 5px 5px 0;\n border-right-color: #000000;\n}\n.tooltip.left .tooltip-arrow {\n top: 50%;\n right: 0;\n margin-top: -5px;\n border-width: 5px 0 5px 5px;\n border-left-color: #000000;\n}\n.tooltip.bottom .tooltip-arrow {\n top: 0;\n left: 50%;\n margin-left: -5px;\n border-width: 0 5px 5px;\n border-bottom-color: #000000;\n}\n.tooltip.bottom-left .tooltip-arrow {\n top: 0;\n left: 5px;\n border-width: 0 5px 5px;\n border-bottom-color: #000000;\n}\n.tooltip.bottom-right .tooltip-arrow {\n top: 0;\n right: 5px;\n border-width: 0 5px 5px;\n border-bottom-color: #000000;\n}\n.popover {\n position: absolute;\n top: 0;\n left: 0;\n z-index: 1060;\n display: none;\n max-width: 276px;\n padding: 1px;\n font-size: 14px;\n font-weight: normal;\n line-height: 1.42857143;\n text-align: left;\n background-color: #ffffff;\n background-clip: padding-box;\n border: 1px solid #cccccc;\n border: 1px solid rgba(0, 0, 0, 0.2);\n border-radius: 6px;\n -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);\n box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);\n white-space: normal;\n}\n.popover.top {\n margin-top: -10px;\n}\n.popover.right {\n margin-left: 10px;\n}\n.popover.bottom {\n margin-top: 10px;\n}\n.popover.left {\n margin-left: -10px;\n}\n.popover-title {\n margin: 0;\n padding: 8px 14px;\n font-size: 14px;\n background-color: #f7f7f7;\n border-bottom: 1px solid #ebebeb;\n border-radius: 5px 5px 0 0;\n}\n.popover-content {\n padding: 9px 14px;\n}\n.popover > .arrow,\n.popover > .arrow:after {\n position: absolute;\n display: block;\n width: 0;\n height: 0;\n border-color: transparent;\n border-style: solid;\n}\n.popover > .arrow {\n border-width: 11px;\n}\n.popover > .arrow:after {\n border-width: 10px;\n content: \"\";\n}\n.popover.top > .arrow {\n left: 50%;\n margin-left: -11px;\n border-bottom-width: 0;\n border-top-color: #999999;\n border-top-color: rgba(0, 0, 0, 0.25);\n bottom: -11px;\n}\n.popover.top > .arrow:after {\n content: \" \";\n bottom: 1px;\n margin-left: -10px;\n border-bottom-width: 0;\n border-top-color: #ffffff;\n}\n.popover.right > .arrow {\n top: 50%;\n left: -11px;\n margin-top: -11px;\n border-left-width: 0;\n border-right-color: #999999;\n border-right-color: rgba(0, 0, 0, 0.25);\n}\n.popover.right > .arrow:after {\n content: \" \";\n left: 1px;\n bottom: -10px;\n border-left-width: 0;\n border-right-color: #ffffff;\n}\n.popover.bottom > .arrow {\n left: 50%;\n margin-left: -11px;\n border-top-width: 0;\n border-bottom-color: #999999;\n border-bottom-color: rgba(0, 0, 0, 0.25);\n top: -11px;\n}\n.popover.bottom > .arrow:after {\n content: \" \";\n top: 1px;\n margin-left: -10px;\n border-top-width: 0;\n border-bottom-color: #ffffff;\n}\n.popover.left > .arrow {\n top: 50%;\n right: -11px;\n margin-top: -11px;\n border-right-width: 0;\n border-left-color: #999999;\n border-left-color: rgba(0, 0, 0, 0.25);\n}\n.popover.left > .arrow:after {\n content: \" \";\n right: 1px;\n border-right-width: 0;\n border-left-color: #ffffff;\n bottom: -10px;\n}\n.carousel {\n position: relative;\n}\n.carousel-inner {\n position: relative;\n overflow: hidden;\n width: 100%;\n}\n.carousel-inner > .item {\n display: none;\n position: relative;\n -webkit-transition: 0.6s ease-in-out left;\n -o-transition: 0.6s ease-in-out left;\n transition: 0.6s ease-in-out left;\n}\n.carousel-inner > .item > img,\n.carousel-inner > .item > a > img {\n line-height: 1;\n}\n@media all and (transform-3d), (-webkit-transform-3d) {\n .carousel-inner > .item {\n transition: transform 0.6s ease-in-out;\n backface-visibility: hidden;\n perspective: 1000;\n }\n .carousel-inner > .item.next,\n .carousel-inner > .item.active.right {\n transform: translate3d(100%, 0, 0);\n left: 0;\n }\n .carousel-inner > .item.prev,\n .carousel-inner > .item.active.left {\n transform: translate3d(-100%, 0, 0);\n left: 0;\n }\n .carousel-inner > .item.next.left,\n .carousel-inner > .item.prev.right,\n .carousel-inner > .item.active {\n transform: translate3d(0, 0, 0);\n left: 0;\n }\n}\n.carousel-inner > .active,\n.carousel-inner > .next,\n.carousel-inner > .prev {\n display: block;\n}\n.carousel-inner > .active {\n left: 0;\n}\n.carousel-inner > .next,\n.carousel-inner > .prev {\n position: absolute;\n top: 0;\n width: 100%;\n}\n.carousel-inner > .next {\n left: 100%;\n}\n.carousel-inner > .prev {\n left: -100%;\n}\n.carousel-inner > .next.left,\n.carousel-inner > .prev.right {\n left: 0;\n}\n.carousel-inner > .active.left {\n left: -100%;\n}\n.carousel-inner > .active.right {\n left: 100%;\n}\n.carousel-control {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n width: 15%;\n opacity: 0.5;\n filter: alpha(opacity=50);\n font-size: 20px;\n color: #ffffff;\n text-align: center;\n text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);\n}\n.carousel-control.left {\n background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%);\n background-image: -o-linear-gradient(left, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%);\n background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);\n}\n.carousel-control.right {\n left: auto;\n right: 0;\n background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%);\n background-image: -o-linear-gradient(left, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%);\n background-image: linear-gradient(to right, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);\n}\n.carousel-control:hover,\n.carousel-control:focus {\n outline: 0;\n color: #ffffff;\n text-decoration: none;\n opacity: 0.9;\n filter: alpha(opacity=90);\n}\n.carousel-control .icon-prev,\n.carousel-control .icon-next,\n.carousel-control .glyphicon-chevron-left,\n.carousel-control .glyphicon-chevron-right {\n position: absolute;\n top: 50%;\n z-index: 5;\n display: inline-block;\n}\n.carousel-control .icon-prev,\n.carousel-control .glyphicon-chevron-left {\n left: 50%;\n margin-left: -10px;\n}\n.carousel-control .icon-next,\n.carousel-control .glyphicon-chevron-right {\n right: 50%;\n margin-right: -10px;\n}\n.carousel-control .icon-prev,\n.carousel-control .icon-next {\n width: 20px;\n height: 20px;\n margin-top: -10px;\n font-family: serif;\n}\n.carousel-control .icon-prev:before {\n content: '\\2039';\n}\n.carousel-control .icon-next:before {\n content: '\\203a';\n}\n.carousel-indicators {\n position: absolute;\n bottom: 10px;\n left: 50%;\n z-index: 15;\n width: 60%;\n margin-left: -30%;\n padding-left: 0;\n list-style: none;\n text-align: center;\n}\n.carousel-indicators li {\n display: inline-block;\n width: 10px;\n height: 10px;\n margin: 1px;\n text-indent: -999px;\n border: 1px solid #ffffff;\n border-radius: 10px;\n cursor: pointer;\n background-color: #000 \\9;\n background-color: rgba(0, 0, 0, 0);\n}\n.carousel-indicators .active {\n margin: 0;\n width: 12px;\n height: 12px;\n background-color: #ffffff;\n}\n.carousel-caption {\n position: absolute;\n left: 15%;\n right: 15%;\n bottom: 20px;\n z-index: 10;\n padding-top: 20px;\n padding-bottom: 20px;\n color: #ffffff;\n text-align: center;\n text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);\n}\n.carousel-caption .btn {\n text-shadow: none;\n}\n@media screen and (min-width: 768px) {\n .carousel-control .glyphicon-chevron-left,\n .carousel-control .glyphicon-chevron-right,\n .carousel-control .icon-prev,\n .carousel-control .icon-next {\n width: 30px;\n height: 30px;\n margin-top: -15px;\n font-size: 30px;\n }\n .carousel-control .glyphicon-chevron-left,\n .carousel-control .icon-prev {\n margin-left: -15px;\n }\n .carousel-control .glyphicon-chevron-right,\n .carousel-control .icon-next {\n margin-right: -15px;\n }\n .carousel-caption {\n left: 20%;\n right: 20%;\n padding-bottom: 30px;\n }\n .carousel-indicators {\n bottom: 20px;\n }\n}\n.clearfix:before,\n.clearfix:after,\n.dl-horizontal dd:before,\n.dl-horizontal dd:after,\n.container:before,\n.container:after,\n.container-fluid:before,\n.container-fluid:after,\n.row:before,\n.row:after,\n.form-horizontal .form-group:before,\n.form-horizontal .form-group:after,\n.btn-toolbar:before,\n.btn-toolbar:after,\n.btn-group-vertical > .btn-group:before,\n.btn-group-vertical > .btn-group:after,\n.nav:before,\n.nav:after,\n.navbar:before,\n.navbar:after,\n.navbar-header:before,\n.navbar-header:after,\n.navbar-collapse:before,\n.navbar-collapse:after,\n.pager:before,\n.pager:after,\n.panel-body:before,\n.panel-body:after,\n.modal-footer:before,\n.modal-footer:after {\n content: \" \";\n display: table;\n}\n.clearfix:after,\n.dl-horizontal dd:after,\n.container:after,\n.container-fluid:after,\n.row:after,\n.form-horizontal .form-group:after,\n.btn-toolbar:after,\n.btn-group-vertical > .btn-group:after,\n.nav:after,\n.navbar:after,\n.navbar-header:after,\n.navbar-collapse:after,\n.pager:after,\n.panel-body:after,\n.modal-footer:after {\n clear: both;\n}\n.center-block {\n display: block;\n margin-left: auto;\n margin-right: auto;\n}\n.pull-right {\n float: right !important;\n}\n.pull-left {\n float: left !important;\n}\n.hide {\n display: none !important;\n}\n.show {\n display: block !important;\n}\n.invisible {\n visibility: hidden;\n}\n.text-hide {\n font: 0/0 a;\n color: transparent;\n text-shadow: none;\n background-color: transparent;\n border: 0;\n}\n.hidden {\n display: none !important;\n visibility: hidden !important;\n}\n.affix {\n position: fixed;\n}\n@-ms-viewport {\n width: device-width;\n}\n.visible-xs,\n.visible-sm,\n.visible-md,\n.visible-lg {\n display: none !important;\n}\n.visible-xs-block,\n.visible-xs-inline,\n.visible-xs-inline-block,\n.visible-sm-block,\n.visible-sm-inline,\n.visible-sm-inline-block,\n.visible-md-block,\n.visible-md-inline,\n.visible-md-inline-block,\n.visible-lg-block,\n.visible-lg-inline,\n.visible-lg-inline-block {\n display: none !important;\n}\n@media (max-width: 767px) {\n .visible-xs {\n display: block !important;\n }\n table.visible-xs {\n display: table;\n }\n tr.visible-xs {\n display: table-row !important;\n }\n th.visible-xs,\n td.visible-xs {\n display: table-cell !important;\n }\n}\n@media (max-width: 767px) {\n .visible-xs-block {\n display: block !important;\n }\n}\n@media (max-width: 767px) {\n .visible-xs-inline {\n display: inline !important;\n }\n}\n@media (max-width: 767px) {\n .visible-xs-inline-block {\n display: inline-block !important;\n }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n .visible-sm {\n display: block !important;\n }\n table.visible-sm {\n display: table;\n }\n tr.visible-sm {\n display: table-row !important;\n }\n th.visible-sm,\n td.visible-sm {\n display: table-cell !important;\n }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n .visible-sm-block {\n display: block !important;\n }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n .visible-sm-inline {\n display: inline !important;\n }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n .visible-sm-inline-block {\n display: inline-block !important;\n }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n .visible-md {\n display: block !important;\n }\n table.visible-md {\n display: table;\n }\n tr.visible-md {\n display: table-row !important;\n }\n th.visible-md,\n td.visible-md {\n display: table-cell !important;\n }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n .visible-md-block {\n display: block !important;\n }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n .visible-md-inline {\n display: inline !important;\n }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n .visible-md-inline-block {\n display: inline-block !important;\n }\n}\n@media (min-width: 1200px) {\n .visible-lg {\n display: block !important;\n }\n table.visible-lg {\n display: table;\n }\n tr.visible-lg {\n display: table-row !important;\n }\n th.visible-lg,\n td.visible-lg {\n display: table-cell !important;\n }\n}\n@media (min-width: 1200px) {\n .visible-lg-block {\n display: block !important;\n }\n}\n@media (min-width: 1200px) {\n .visible-lg-inline {\n display: inline !important;\n }\n}\n@media (min-width: 1200px) {\n .visible-lg-inline-block {\n display: inline-block !important;\n }\n}\n@media (max-width: 767px) {\n .hidden-xs {\n display: none !important;\n }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n .hidden-sm {\n display: none !important;\n }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n .hidden-md {\n display: none !important;\n }\n}\n@media (min-width: 1200px) {\n .hidden-lg {\n display: none !important;\n }\n}\n.visible-print {\n display: none !important;\n}\n@media print {\n .visible-print {\n display: block !important;\n }\n table.visible-print {\n display: table;\n }\n tr.visible-print {\n display: table-row !important;\n }\n th.visible-print,\n td.visible-print {\n display: table-cell !important;\n }\n}\n.visible-print-block {\n display: none !important;\n}\n@media print {\n .visible-print-block {\n display: block !important;\n }\n}\n.visible-print-inline {\n display: none !important;\n}\n@media print {\n .visible-print-inline {\n display: inline !important;\n }\n}\n.visible-print-inline-block {\n display: none !important;\n}\n@media print {\n .visible-print-inline-block {\n display: inline-block !important;\n }\n}\n@media print {\n .hidden-print {\n display: none !important;\n }\n}\n/*# sourceMappingURL=bootstrap.css.map */","/*! normalize.css v3.0.2 | MIT License | git.io/normalize */\n\n//\n// 1. Set default font family to sans-serif.\n// 2. Prevent iOS text size adjust after orientation change, without disabling\n// user zoom.\n//\n\nhtml {\n font-family: sans-serif; // 1\n -ms-text-size-adjust: 100%; // 2\n -webkit-text-size-adjust: 100%; // 2\n}\n\n//\n// Remove default margin.\n//\n\nbody {\n margin: 0;\n}\n\n// HTML5 display definitions\n// ==========================================================================\n\n//\n// Correct `block` display not defined for any HTML5 element in IE 8/9.\n// Correct `block` display not defined for `details` or `summary` in IE 10/11\n// and Firefox.\n// Correct `block` display not defined for `main` in IE 11.\n//\n\narticle,\naside,\ndetails,\nfigcaption,\nfigure,\nfooter,\nheader,\nhgroup,\nmain,\nmenu,\nnav,\nsection,\nsummary {\n display: block;\n}\n\n//\n// 1. Correct `inline-block` display not defined in IE 8/9.\n// 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.\n//\n\naudio,\ncanvas,\nprogress,\nvideo {\n display: inline-block; // 1\n vertical-align: baseline; // 2\n}\n\n//\n// Prevent modern browsers from displaying `audio` without controls.\n// Remove excess height in iOS 5 devices.\n//\n\naudio:not([controls]) {\n display: none;\n height: 0;\n}\n\n//\n// Address `[hidden]` styling not present in IE 8/9/10.\n// Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22.\n//\n\n[hidden],\ntemplate {\n display: none;\n}\n\n// Links\n// ==========================================================================\n\n//\n// Remove the gray background color from active links in IE 10.\n//\n\na {\n background-color: transparent;\n}\n\n//\n// Improve readability when focused and also mouse hovered in all browsers.\n//\n\na:active,\na:hover {\n outline: 0;\n}\n\n// Text-level semantics\n// ==========================================================================\n\n//\n// Address styling not present in IE 8/9/10/11, Safari, and Chrome.\n//\n\nabbr[title] {\n border-bottom: 1px dotted;\n}\n\n//\n// Address style set to `bolder` in Firefox 4+, Safari, and Chrome.\n//\n\nb,\nstrong {\n font-weight: bold;\n}\n\n//\n// Address styling not present in Safari and Chrome.\n//\n\ndfn {\n font-style: italic;\n}\n\n//\n// Address variable `h1` font-size and margin within `section` and `article`\n// contexts in Firefox 4+, Safari, and Chrome.\n//\n\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\n\n//\n// Address styling not present in IE 8/9.\n//\n\nmark {\n background: #ff0;\n color: #000;\n}\n\n//\n// Address inconsistent and variable font size in all browsers.\n//\n\nsmall {\n font-size: 80%;\n}\n\n//\n// Prevent `sub` and `sup` affecting `line-height` in all browsers.\n//\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsup {\n top: -0.5em;\n}\n\nsub {\n bottom: -0.25em;\n}\n\n// Embedded content\n// ==========================================================================\n\n//\n// Remove border when inside `a` element in IE 8/9/10.\n//\n\nimg {\n border: 0;\n}\n\n//\n// Correct overflow not hidden in IE 9/10/11.\n//\n\nsvg:not(:root) {\n overflow: hidden;\n}\n\n// Grouping content\n// ==========================================================================\n\n//\n// Address margin not present in IE 8/9 and Safari.\n//\n\nfigure {\n margin: 1em 40px;\n}\n\n//\n// Address differences between Firefox and other browsers.\n//\n\nhr {\n -moz-box-sizing: content-box;\n box-sizing: content-box;\n height: 0;\n}\n\n//\n// Contain overflow in all browsers.\n//\n\npre {\n overflow: auto;\n}\n\n//\n// Address odd `em`-unit font size rendering in all browsers.\n//\n\ncode,\nkbd,\npre,\nsamp {\n font-family: monospace, monospace;\n font-size: 1em;\n}\n\n// Forms\n// ==========================================================================\n\n//\n// Known limitation: by default, Chrome and Safari on OS X allow very limited\n// styling of `select`, unless a `border` property is set.\n//\n\n//\n// 1. Correct color not being inherited.\n// Known issue: affects color of disabled elements.\n// 2. Correct font properties not being inherited.\n// 3. Address margins set differently in Firefox 4+, Safari, and Chrome.\n//\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n color: inherit; // 1\n font: inherit; // 2\n margin: 0; // 3\n}\n\n//\n// Address `overflow` set to `hidden` in IE 8/9/10/11.\n//\n\nbutton {\n overflow: visible;\n}\n\n//\n// Address inconsistent `text-transform` inheritance for `button` and `select`.\n// All other form control elements do not inherit `text-transform` values.\n// Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.\n// Correct `select` style inheritance in Firefox.\n//\n\nbutton,\nselect {\n text-transform: none;\n}\n\n//\n// 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`\n// and `video` controls.\n// 2. Correct inability to style clickable `input` types in iOS.\n// 3. Improve usability and consistency of cursor style between image-type\n// `input` and others.\n//\n\nbutton,\nhtml input[type=\"button\"], // 1\ninput[type=\"reset\"],\ninput[type=\"submit\"] {\n -webkit-appearance: button; // 2\n cursor: pointer; // 3\n}\n\n//\n// Re-set default cursor for disabled elements.\n//\n\nbutton[disabled],\nhtml input[disabled] {\n cursor: default;\n}\n\n//\n// Remove inner padding and border in Firefox 4+.\n//\n\nbutton::-moz-focus-inner,\ninput::-moz-focus-inner {\n border: 0;\n padding: 0;\n}\n\n//\n// Address Firefox 4+ setting `line-height` on `input` using `!important` in\n// the UA stylesheet.\n//\n\ninput {\n line-height: normal;\n}\n\n//\n// It's recommended that you don't attempt to style these elements.\n// Firefox's implementation doesn't respect box-sizing, padding, or width.\n//\n// 1. Address box sizing set to `content-box` in IE 8/9/10.\n// 2. Remove excess padding in IE 8/9/10.\n//\n\ninput[type=\"checkbox\"],\ninput[type=\"radio\"] {\n box-sizing: border-box; // 1\n padding: 0; // 2\n}\n\n//\n// Fix the cursor style for Chrome's increment/decrement buttons. For certain\n// `font-size` values of the `input`, it causes the cursor style of the\n// decrement button to change from `default` to `text`.\n//\n\ninput[type=\"number\"]::-webkit-inner-spin-button,\ninput[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\n\n//\n// 1. Address `appearance` set to `searchfield` in Safari and Chrome.\n// 2. Address `box-sizing` set to `border-box` in Safari and Chrome\n// (include `-moz` to future-proof).\n//\n\ninput[type=\"search\"] {\n -webkit-appearance: textfield; // 1\n -moz-box-sizing: content-box;\n -webkit-box-sizing: content-box; // 2\n box-sizing: content-box;\n}\n\n//\n// Remove inner padding and search cancel button in Safari and Chrome on OS X.\n// Safari (but not Chrome) clips the cancel button when the search input has\n// padding (and `textfield` appearance).\n//\n\ninput[type=\"search\"]::-webkit-search-cancel-button,\ninput[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n//\n// Define consistent border, margin, and padding.\n//\n\nfieldset {\n border: 1px solid #c0c0c0;\n margin: 0 2px;\n padding: 0.35em 0.625em 0.75em;\n}\n\n//\n// 1. Correct `color` not being inherited in IE 8/9/10/11.\n// 2. Remove padding so people aren't caught out if they zero out fieldsets.\n//\n\nlegend {\n border: 0; // 1\n padding: 0; // 2\n}\n\n//\n// Remove default vertical scrollbar in IE 8/9/10/11.\n//\n\ntextarea {\n overflow: auto;\n}\n\n//\n// Don't inherit the `font-weight` (applied by a rule above).\n// NOTE: the default cannot safely be changed in Chrome and Safari on OS X.\n//\n\noptgroup {\n font-weight: bold;\n}\n\n// Tables\n// ==========================================================================\n\n//\n// Remove most spacing between table cells.\n//\n\ntable {\n border-collapse: collapse;\n border-spacing: 0;\n}\n\ntd,\nth {\n padding: 0;\n}\n","/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */\n\n// ==========================================================================\n// Print styles.\n// Inlined to avoid the additional HTTP request: h5bp.com/r\n// ==========================================================================\n\n@media print {\n *,\n *:before,\n *:after {\n background: transparent !important;\n color: #000 !important; // Black prints faster: h5bp.com/s\n box-shadow: none !important;\n text-shadow: none !important;\n }\n\n a,\n a:visited {\n text-decoration: underline;\n }\n\n a[href]:after {\n content: \" (\" attr(href) \")\";\n }\n\n abbr[title]:after {\n content: \" (\" attr(title) \")\";\n }\n\n // Don't show links that are fragment identifiers,\n // or use the `javascript:` pseudo protocol\n a[href^=\"#\"]:after,\n a[href^=\"javascript:\"]:after {\n content: \"\";\n }\n\n pre,\n blockquote {\n border: 1px solid #999;\n page-break-inside: avoid;\n }\n\n thead {\n display: table-header-group; // h5bp.com/t\n }\n\n tr,\n img {\n page-break-inside: avoid;\n }\n\n img {\n max-width: 100% !important;\n }\n\n p,\n h2,\n h3 {\n orphans: 3;\n widows: 3;\n }\n\n h2,\n h3 {\n page-break-after: avoid;\n }\n\n // Bootstrap specific changes start\n //\n // Chrome (OSX) fix for https://github.com/twbs/bootstrap/issues/11245\n // Once fixed, we can just straight up remove this.\n select {\n background: #fff !important;\n }\n\n // Bootstrap components\n .navbar {\n display: none;\n }\n .btn,\n .dropup > .btn {\n > .caret {\n border-top-color: #000 !important;\n }\n }\n .label {\n border: 1px solid #000;\n }\n\n .table {\n border-collapse: collapse !important;\n\n td,\n th {\n background-color: #fff !important;\n }\n }\n .table-bordered {\n th,\n td {\n border: 1px solid #ddd !important;\n }\n }\n\n // Bootstrap specific changes end\n}\n","//\n// Glyphicons for Bootstrap\n//\n// Since icons are fonts, they can be placed anywhere text is placed and are\n// thus automatically sized to match the surrounding child. To use, create an\n// inline element with the appropriate classes, like so:\n//\n// Star\n\n// Import the fonts\n@font-face {\n font-family: 'Glyphicons Halflings';\n src: url('@{icon-font-path}@{icon-font-name}.eot');\n src: url('@{icon-font-path}@{icon-font-name}.eot?#iefix') format('embedded-opentype'),\n url('@{icon-font-path}@{icon-font-name}.woff') format('woff'),\n url('@{icon-font-path}@{icon-font-name}.ttf') format('truetype'),\n url('@{icon-font-path}@{icon-font-name}.svg#@{icon-font-svg-id}') format('svg');\n}\n\n// Catchall baseclass\n.glyphicon {\n position: relative;\n top: 1px;\n display: inline-block;\n font-family: 'Glyphicons Halflings';\n font-style: normal;\n font-weight: normal;\n line-height: 1;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n// Individual icons\n.glyphicon-asterisk { &:before { content: \"\\2a\"; } }\n.glyphicon-plus { &:before { content: \"\\2b\"; } }\n.glyphicon-euro,\n.glyphicon-eur { &:before { content: \"\\20ac\"; } }\n.glyphicon-minus { &:before { content: \"\\2212\"; } }\n.glyphicon-cloud { &:before { content: \"\\2601\"; } }\n.glyphicon-envelope { &:before { content: \"\\2709\"; } }\n.glyphicon-pencil { &:before { content: \"\\270f\"; } }\n.glyphicon-glass { &:before { content: \"\\e001\"; } }\n.glyphicon-music { &:before { content: \"\\e002\"; } }\n.glyphicon-search { &:before { content: \"\\e003\"; } }\n.glyphicon-heart { &:before { content: \"\\e005\"; } }\n.glyphicon-star { &:before { content: \"\\e006\"; } }\n.glyphicon-star-empty { &:before { content: \"\\e007\"; } }\n.glyphicon-user { &:before { content: \"\\e008\"; } }\n.glyphicon-film { &:before { content: \"\\e009\"; } }\n.glyphicon-th-large { &:before { content: \"\\e010\"; } }\n.glyphicon-th { &:before { content: \"\\e011\"; } }\n.glyphicon-th-list { &:before { content: \"\\e012\"; } }\n.glyphicon-ok { &:before { content: \"\\e013\"; } }\n.glyphicon-remove { &:before { content: \"\\e014\"; } }\n.glyphicon-zoom-in { &:before { content: \"\\e015\"; } }\n.glyphicon-zoom-out { &:before { content: \"\\e016\"; } }\n.glyphicon-off { &:before { content: \"\\e017\"; } }\n.glyphicon-signal { &:before { content: \"\\e018\"; } }\n.glyphicon-cog { &:before { content: \"\\e019\"; } }\n.glyphicon-trash { &:before { content: \"\\e020\"; } }\n.glyphicon-home { &:before { content: \"\\e021\"; } }\n.glyphicon-file { &:before { content: \"\\e022\"; } }\n.glyphicon-time { &:before { content: \"\\e023\"; } }\n.glyphicon-road { &:before { content: \"\\e024\"; } }\n.glyphicon-download-alt { &:before { content: \"\\e025\"; } }\n.glyphicon-download { &:before { content: \"\\e026\"; } }\n.glyphicon-upload { &:before { content: \"\\e027\"; } }\n.glyphicon-inbox { &:before { content: \"\\e028\"; } }\n.glyphicon-play-circle { &:before { content: \"\\e029\"; } }\n.glyphicon-repeat { &:before { content: \"\\e030\"; } }\n.glyphicon-refresh { &:before { content: \"\\e031\"; } }\n.glyphicon-list-alt { &:before { content: \"\\e032\"; } }\n.glyphicon-lock { &:before { content: \"\\e033\"; } }\n.glyphicon-flag { &:before { content: \"\\e034\"; } }\n.glyphicon-headphones { &:before { content: \"\\e035\"; } }\n.glyphicon-volume-off { &:before { content: \"\\e036\"; } }\n.glyphicon-volume-down { &:before { content: \"\\e037\"; } }\n.glyphicon-volume-up { &:before { content: \"\\e038\"; } }\n.glyphicon-qrcode { &:before { content: \"\\e039\"; } }\n.glyphicon-barcode { &:before { content: \"\\e040\"; } }\n.glyphicon-tag { &:before { content: \"\\e041\"; } }\n.glyphicon-tags { &:before { content: \"\\e042\"; } }\n.glyphicon-book { &:before { content: \"\\e043\"; } }\n.glyphicon-bookmark { &:before { content: \"\\e044\"; } }\n.glyphicon-print { &:before { content: \"\\e045\"; } }\n.glyphicon-camera { &:before { content: \"\\e046\"; } }\n.glyphicon-font { &:before { content: \"\\e047\"; } }\n.glyphicon-bold { &:before { content: \"\\e048\"; } }\n.glyphicon-italic { &:before { content: \"\\e049\"; } }\n.glyphicon-text-height { &:before { content: \"\\e050\"; } }\n.glyphicon-text-width { &:before { content: \"\\e051\"; } }\n.glyphicon-align-left { &:before { content: \"\\e052\"; } }\n.glyphicon-align-center { &:before { content: \"\\e053\"; } }\n.glyphicon-align-right { &:before { content: \"\\e054\"; } }\n.glyphicon-align-justify { &:before { content: \"\\e055\"; } }\n.glyphicon-list { &:before { content: \"\\e056\"; } }\n.glyphicon-indent-left { &:before { content: \"\\e057\"; } }\n.glyphicon-indent-right { &:before { content: \"\\e058\"; } }\n.glyphicon-facetime-video { &:before { content: \"\\e059\"; } }\n.glyphicon-picture { &:before { content: \"\\e060\"; } }\n.glyphicon-map-marker { &:before { content: \"\\e062\"; } }\n.glyphicon-adjust { &:before { content: \"\\e063\"; } }\n.glyphicon-tint { &:before { content: \"\\e064\"; } }\n.glyphicon-edit { &:before { content: \"\\e065\"; } }\n.glyphicon-share { &:before { content: \"\\e066\"; } }\n.glyphicon-check { &:before { content: \"\\e067\"; } }\n.glyphicon-move { &:before { content: \"\\e068\"; } }\n.glyphicon-step-backward { &:before { content: \"\\e069\"; } }\n.glyphicon-fast-backward { &:before { content: \"\\e070\"; } }\n.glyphicon-backward { &:before { content: \"\\e071\"; } }\n.glyphicon-play { &:before { content: \"\\e072\"; } }\n.glyphicon-pause { &:before { content: \"\\e073\"; } }\n.glyphicon-stop { &:before { content: \"\\e074\"; } }\n.glyphicon-forward { &:before { content: \"\\e075\"; } }\n.glyphicon-fast-forward { &:before { content: \"\\e076\"; } }\n.glyphicon-step-forward { &:before { content: \"\\e077\"; } }\n.glyphicon-eject { &:before { content: \"\\e078\"; } }\n.glyphicon-chevron-left { &:before { content: \"\\e079\"; } }\n.glyphicon-chevron-right { &:before { content: \"\\e080\"; } }\n.glyphicon-plus-sign { &:before { content: \"\\e081\"; } }\n.glyphicon-minus-sign { &:before { content: \"\\e082\"; } }\n.glyphicon-remove-sign { &:before { content: \"\\e083\"; } }\n.glyphicon-ok-sign { &:before { content: \"\\e084\"; } }\n.glyphicon-question-sign { &:before { content: \"\\e085\"; } }\n.glyphicon-info-sign { &:before { content: \"\\e086\"; } }\n.glyphicon-screenshot { &:before { content: \"\\e087\"; } }\n.glyphicon-remove-circle { &:before { content: \"\\e088\"; } }\n.glyphicon-ok-circle { &:before { content: \"\\e089\"; } }\n.glyphicon-ban-circle { &:before { content: \"\\e090\"; } }\n.glyphicon-arrow-left { &:before { content: \"\\e091\"; } }\n.glyphicon-arrow-right { &:before { content: \"\\e092\"; } }\n.glyphicon-arrow-up { &:before { content: \"\\e093\"; } }\n.glyphicon-arrow-down { &:before { content: \"\\e094\"; } }\n.glyphicon-share-alt { &:before { content: \"\\e095\"; } }\n.glyphicon-resize-full { &:before { content: \"\\e096\"; } }\n.glyphicon-resize-small { &:before { content: \"\\e097\"; } }\n.glyphicon-exclamation-sign { &:before { content: \"\\e101\"; } }\n.glyphicon-gift { &:before { content: \"\\e102\"; } }\n.glyphicon-leaf { &:before { content: \"\\e103\"; } }\n.glyphicon-fire { &:before { content: \"\\e104\"; } }\n.glyphicon-eye-open { &:before { content: \"\\e105\"; } }\n.glyphicon-eye-close { &:before { content: \"\\e106\"; } }\n.glyphicon-warning-sign { &:before { content: \"\\e107\"; } }\n.glyphicon-plane { &:before { content: \"\\e108\"; } }\n.glyphicon-calendar { &:before { content: \"\\e109\"; } }\n.glyphicon-random { &:before { content: \"\\e110\"; } }\n.glyphicon-comment { &:before { content: \"\\e111\"; } }\n.glyphicon-magnet { &:before { content: \"\\e112\"; } }\n.glyphicon-chevron-up { &:before { content: \"\\e113\"; } }\n.glyphicon-chevron-down { &:before { content: \"\\e114\"; } }\n.glyphicon-retweet { &:before { content: \"\\e115\"; } }\n.glyphicon-shopping-cart { &:before { content: \"\\e116\"; } }\n.glyphicon-folder-close { &:before { content: \"\\e117\"; } }\n.glyphicon-folder-open { &:before { content: \"\\e118\"; } }\n.glyphicon-resize-vertical { &:before { content: \"\\e119\"; } }\n.glyphicon-resize-horizontal { &:before { content: \"\\e120\"; } }\n.glyphicon-hdd { &:before { content: \"\\e121\"; } }\n.glyphicon-bullhorn { &:before { content: \"\\e122\"; } }\n.glyphicon-bell { &:before { content: \"\\e123\"; } }\n.glyphicon-certificate { &:before { content: \"\\e124\"; } }\n.glyphicon-thumbs-up { &:before { content: \"\\e125\"; } }\n.glyphicon-thumbs-down { &:before { content: \"\\e126\"; } }\n.glyphicon-hand-right { &:before { content: \"\\e127\"; } }\n.glyphicon-hand-left { &:before { content: \"\\e128\"; } }\n.glyphicon-hand-up { &:before { content: \"\\e129\"; } }\n.glyphicon-hand-down { &:before { content: \"\\e130\"; } }\n.glyphicon-circle-arrow-right { &:before { content: \"\\e131\"; } }\n.glyphicon-circle-arrow-left { &:before { content: \"\\e132\"; } }\n.glyphicon-circle-arrow-up { &:before { content: \"\\e133\"; } }\n.glyphicon-circle-arrow-down { &:before { content: \"\\e134\"; } }\n.glyphicon-globe { &:before { content: \"\\e135\"; } }\n.glyphicon-wrench { &:before { content: \"\\e136\"; } }\n.glyphicon-tasks { &:before { content: \"\\e137\"; } }\n.glyphicon-filter { &:before { content: \"\\e138\"; } }\n.glyphicon-briefcase { &:before { content: \"\\e139\"; } }\n.glyphicon-fullscreen { &:before { content: \"\\e140\"; } }\n.glyphicon-dashboard { &:before { content: \"\\e141\"; } }\n.glyphicon-paperclip { &:before { content: \"\\e142\"; } }\n.glyphicon-heart-empty { &:before { content: \"\\e143\"; } }\n.glyphicon-link { &:before { content: \"\\e144\"; } }\n.glyphicon-phone { &:before { content: \"\\e145\"; } }\n.glyphicon-pushpin { &:before { content: \"\\e146\"; } }\n.glyphicon-usd { &:before { content: \"\\e148\"; } }\n.glyphicon-gbp { &:before { content: \"\\e149\"; } }\n.glyphicon-sort { &:before { content: \"\\e150\"; } }\n.glyphicon-sort-by-alphabet { &:before { content: \"\\e151\"; } }\n.glyphicon-sort-by-alphabet-alt { &:before { content: \"\\e152\"; } }\n.glyphicon-sort-by-order { &:before { content: \"\\e153\"; } }\n.glyphicon-sort-by-order-alt { &:before { content: \"\\e154\"; } }\n.glyphicon-sort-by-attributes { &:before { content: \"\\e155\"; } }\n.glyphicon-sort-by-attributes-alt { &:before { content: \"\\e156\"; } }\n.glyphicon-unchecked { &:before { content: \"\\e157\"; } }\n.glyphicon-expand { &:before { content: \"\\e158\"; } }\n.glyphicon-collapse-down { &:before { content: \"\\e159\"; } }\n.glyphicon-collapse-up { &:before { content: \"\\e160\"; } }\n.glyphicon-log-in { &:before { content: \"\\e161\"; } }\n.glyphicon-flash { &:before { content: \"\\e162\"; } }\n.glyphicon-log-out { &:before { content: \"\\e163\"; } }\n.glyphicon-new-window { &:before { content: \"\\e164\"; } }\n.glyphicon-record { &:before { content: \"\\e165\"; } }\n.glyphicon-save { &:before { content: \"\\e166\"; } }\n.glyphicon-open { &:before { content: \"\\e167\"; } }\n.glyphicon-saved { &:before { content: \"\\e168\"; } }\n.glyphicon-import { &:before { content: \"\\e169\"; } }\n.glyphicon-export { &:before { content: \"\\e170\"; } }\n.glyphicon-send { &:before { content: \"\\e171\"; } }\n.glyphicon-floppy-disk { &:before { content: \"\\e172\"; } }\n.glyphicon-floppy-saved { &:before { content: \"\\e173\"; } }\n.glyphicon-floppy-remove { &:before { content: \"\\e174\"; } }\n.glyphicon-floppy-save { &:before { content: \"\\e175\"; } }\n.glyphicon-floppy-open { &:before { content: \"\\e176\"; } }\n.glyphicon-credit-card { &:before { content: \"\\e177\"; } }\n.glyphicon-transfer { &:before { content: \"\\e178\"; } }\n.glyphicon-cutlery { &:before { content: \"\\e179\"; } }\n.glyphicon-header { &:before { content: \"\\e180\"; } }\n.glyphicon-compressed { &:before { content: \"\\e181\"; } }\n.glyphicon-earphone { &:before { content: \"\\e182\"; } }\n.glyphicon-phone-alt { &:before { content: \"\\e183\"; } }\n.glyphicon-tower { &:before { content: \"\\e184\"; } }\n.glyphicon-stats { &:before { content: \"\\e185\"; } }\n.glyphicon-sd-video { &:before { content: \"\\e186\"; } }\n.glyphicon-hd-video { &:before { content: \"\\e187\"; } }\n.glyphicon-subtitles { &:before { content: \"\\e188\"; } }\n.glyphicon-sound-stereo { &:before { content: \"\\e189\"; } }\n.glyphicon-sound-dolby { &:before { content: \"\\e190\"; } }\n.glyphicon-sound-5-1 { &:before { content: \"\\e191\"; } }\n.glyphicon-sound-6-1 { &:before { content: \"\\e192\"; } }\n.glyphicon-sound-7-1 { &:before { content: \"\\e193\"; } }\n.glyphicon-copyright-mark { &:before { content: \"\\e194\"; } }\n.glyphicon-registration-mark { &:before { content: \"\\e195\"; } }\n.glyphicon-cloud-download { &:before { content: \"\\e197\"; } }\n.glyphicon-cloud-upload { &:before { content: \"\\e198\"; } }\n.glyphicon-tree-conifer { &:before { content: \"\\e199\"; } }\n.glyphicon-tree-deciduous { &:before { content: \"\\e200\"; } }\n","//\n// Scaffolding\n// --------------------------------------------------\n\n\n// Reset the box-sizing\n//\n// Heads up! This reset may cause conflicts with some third-party widgets.\n// For recommendations on resolving such conflicts, see\n// http://getbootstrap.com/getting-started/#third-box-sizing\n* {\n .box-sizing(border-box);\n}\n*:before,\n*:after {\n .box-sizing(border-box);\n}\n\n\n// Body reset\n\nhtml {\n font-size: 10px;\n -webkit-tap-highlight-color: rgba(0,0,0,0);\n}\n\nbody {\n font-family: @font-family-base;\n font-size: @font-size-base;\n line-height: @line-height-base;\n color: @text-color;\n background-color: @body-bg;\n}\n\n// Reset fonts for relevant elements\ninput,\nbutton,\nselect,\ntextarea {\n font-family: inherit;\n font-size: inherit;\n line-height: inherit;\n}\n\n\n// Links\n\na {\n color: @link-color;\n text-decoration: none;\n\n &:hover,\n &:focus {\n color: @link-hover-color;\n text-decoration: @link-hover-decoration;\n }\n\n &:focus {\n .tab-focus();\n }\n}\n\n\n// Figures\n//\n// We reset this here because previously Normalize had no `figure` margins. This\n// ensures we don't break anyone's use of the element.\n\nfigure {\n margin: 0;\n}\n\n\n// Images\n\nimg {\n vertical-align: middle;\n}\n\n// Responsive images (ensure images don't scale beyond their parents)\n.img-responsive {\n .img-responsive();\n}\n\n// Rounded corners\n.img-rounded {\n border-radius: @border-radius-large;\n}\n\n// Image thumbnails\n//\n// Heads up! This is mixin-ed into thumbnails.less for `.thumbnail`.\n.img-thumbnail {\n padding: @thumbnail-padding;\n line-height: @line-height-base;\n background-color: @thumbnail-bg;\n border: 1px solid @thumbnail-border;\n border-radius: @thumbnail-border-radius;\n .transition(all .2s ease-in-out);\n\n // Keep them at most 100% wide\n .img-responsive(inline-block);\n}\n\n// Perfect circle\n.img-circle {\n border-radius: 50%; // set radius in percents\n}\n\n\n// Horizontal rules\n\nhr {\n margin-top: @line-height-computed;\n margin-bottom: @line-height-computed;\n border: 0;\n border-top: 1px solid @hr-border;\n}\n\n\n// Only display content to screen readers\n//\n// See: http://a11yproject.com/posts/how-to-hide-content/\n\n.sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip: rect(0,0,0,0);\n border: 0;\n}\n\n// Use in conjunction with .sr-only to only display content when it's focused.\n// Useful for \"Skip to main content\" links; see http://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1\n// Credit: HTML5 Boilerplate\n\n.sr-only-focusable {\n &:active,\n &:focus {\n position: static;\n width: auto;\n height: auto;\n margin: 0;\n overflow: visible;\n clip: auto;\n }\n}\n","// Vendor Prefixes\n//\n// All vendor mixins are deprecated as of v3.2.0 due to the introduction of\n// Autoprefixer in our Gruntfile. They will be removed in v4.\n\n// - Animations\n// - Backface visibility\n// - Box shadow\n// - Box sizing\n// - Content columns\n// - Hyphens\n// - Placeholder text\n// - Transformations\n// - Transitions\n// - User Select\n\n\n// Animations\n.animation(@animation) {\n -webkit-animation: @animation;\n -o-animation: @animation;\n animation: @animation;\n}\n.animation-name(@name) {\n -webkit-animation-name: @name;\n animation-name: @name;\n}\n.animation-duration(@duration) {\n -webkit-animation-duration: @duration;\n animation-duration: @duration;\n}\n.animation-timing-function(@timing-function) {\n -webkit-animation-timing-function: @timing-function;\n animation-timing-function: @timing-function;\n}\n.animation-delay(@delay) {\n -webkit-animation-delay: @delay;\n animation-delay: @delay;\n}\n.animation-iteration-count(@iteration-count) {\n -webkit-animation-iteration-count: @iteration-count;\n animation-iteration-count: @iteration-count;\n}\n.animation-direction(@direction) {\n -webkit-animation-direction: @direction;\n animation-direction: @direction;\n}\n.animation-fill-mode(@fill-mode) {\n -webkit-animation-fill-mode: @fill-mode;\n animation-fill-mode: @fill-mode;\n}\n\n// Backface visibility\n// Prevent browsers from flickering when using CSS 3D transforms.\n// Default value is `visible`, but can be changed to `hidden`\n\n.backface-visibility(@visibility){\n -webkit-backface-visibility: @visibility;\n -moz-backface-visibility: @visibility;\n backface-visibility: @visibility;\n}\n\n// Drop shadows\n//\n// Note: Deprecated `.box-shadow()` as of v3.1.0 since all of Bootstrap's\n// supported browsers that have box shadow capabilities now support it.\n\n.box-shadow(@shadow) {\n -webkit-box-shadow: @shadow; // iOS <4.3 & Android <4.1\n box-shadow: @shadow;\n}\n\n// Box sizing\n.box-sizing(@boxmodel) {\n -webkit-box-sizing: @boxmodel;\n -moz-box-sizing: @boxmodel;\n box-sizing: @boxmodel;\n}\n\n// CSS3 Content Columns\n.content-columns(@column-count; @column-gap: @grid-gutter-width) {\n -webkit-column-count: @column-count;\n -moz-column-count: @column-count;\n column-count: @column-count;\n -webkit-column-gap: @column-gap;\n -moz-column-gap: @column-gap;\n column-gap: @column-gap;\n}\n\n// Optional hyphenation\n.hyphens(@mode: auto) {\n word-wrap: break-word;\n -webkit-hyphens: @mode;\n -moz-hyphens: @mode;\n -ms-hyphens: @mode; // IE10+\n -o-hyphens: @mode;\n hyphens: @mode;\n}\n\n// Placeholder text\n.placeholder(@color: @input-color-placeholder) {\n // Firefox\n &::-moz-placeholder {\n color: @color;\n opacity: 1; // See https://github.com/twbs/bootstrap/pull/11526\n }\n &:-ms-input-placeholder { color: @color; } // Internet Explorer 10+\n &::-webkit-input-placeholder { color: @color; } // Safari and Chrome\n}\n\n// Transformations\n.scale(@ratio) {\n -webkit-transform: scale(@ratio);\n -ms-transform: scale(@ratio); // IE9 only\n -o-transform: scale(@ratio);\n transform: scale(@ratio);\n}\n.scale(@ratioX; @ratioY) {\n -webkit-transform: scale(@ratioX, @ratioY);\n -ms-transform: scale(@ratioX, @ratioY); // IE9 only\n -o-transform: scale(@ratioX, @ratioY);\n transform: scale(@ratioX, @ratioY);\n}\n.scaleX(@ratio) {\n -webkit-transform: scaleX(@ratio);\n -ms-transform: scaleX(@ratio); // IE9 only\n -o-transform: scaleX(@ratio);\n transform: scaleX(@ratio);\n}\n.scaleY(@ratio) {\n -webkit-transform: scaleY(@ratio);\n -ms-transform: scaleY(@ratio); // IE9 only\n -o-transform: scaleY(@ratio);\n transform: scaleY(@ratio);\n}\n.skew(@x; @y) {\n -webkit-transform: skewX(@x) skewY(@y);\n -ms-transform: skewX(@x) skewY(@y); // See https://github.com/twbs/bootstrap/issues/4885; IE9+\n -o-transform: skewX(@x) skewY(@y);\n transform: skewX(@x) skewY(@y);\n}\n.translate(@x; @y) {\n -webkit-transform: translate(@x, @y);\n -ms-transform: translate(@x, @y); // IE9 only\n -o-transform: translate(@x, @y);\n transform: translate(@x, @y);\n}\n.translate3d(@x; @y; @z) {\n -webkit-transform: translate3d(@x, @y, @z);\n transform: translate3d(@x, @y, @z);\n}\n.rotate(@degrees) {\n -webkit-transform: rotate(@degrees);\n -ms-transform: rotate(@degrees); // IE9 only\n -o-transform: rotate(@degrees);\n transform: rotate(@degrees);\n}\n.rotateX(@degrees) {\n -webkit-transform: rotateX(@degrees);\n -ms-transform: rotateX(@degrees); // IE9 only\n -o-transform: rotateX(@degrees);\n transform: rotateX(@degrees);\n}\n.rotateY(@degrees) {\n -webkit-transform: rotateY(@degrees);\n -ms-transform: rotateY(@degrees); // IE9 only\n -o-transform: rotateY(@degrees);\n transform: rotateY(@degrees);\n}\n.perspective(@perspective) {\n -webkit-perspective: @perspective;\n -moz-perspective: @perspective;\n perspective: @perspective;\n}\n.perspective-origin(@perspective) {\n -webkit-perspective-origin: @perspective;\n -moz-perspective-origin: @perspective;\n perspective-origin: @perspective;\n}\n.transform-origin(@origin) {\n -webkit-transform-origin: @origin;\n -moz-transform-origin: @origin;\n -ms-transform-origin: @origin; // IE9 only\n transform-origin: @origin;\n}\n\n\n// Transitions\n\n.transition(@transition) {\n -webkit-transition: @transition;\n -o-transition: @transition;\n transition: @transition;\n}\n.transition-property(@transition-property) {\n -webkit-transition-property: @transition-property;\n transition-property: @transition-property;\n}\n.transition-delay(@transition-delay) {\n -webkit-transition-delay: @transition-delay;\n transition-delay: @transition-delay;\n}\n.transition-duration(@transition-duration) {\n -webkit-transition-duration: @transition-duration;\n transition-duration: @transition-duration;\n}\n.transition-timing-function(@timing-function) {\n -webkit-transition-timing-function: @timing-function;\n transition-timing-function: @timing-function;\n}\n.transition-transform(@transition) {\n -webkit-transition: -webkit-transform @transition;\n -moz-transition: -moz-transform @transition;\n -o-transition: -o-transform @transition;\n transition: transform @transition;\n}\n\n\n// User select\n// For selecting text on the page\n\n.user-select(@select) {\n -webkit-user-select: @select;\n -moz-user-select: @select;\n -ms-user-select: @select; // IE10+\n user-select: @select;\n}\n","// WebKit-style focus\n\n.tab-focus() {\n // Default\n outline: thin dotted;\n // WebKit\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: -2px;\n}\n","// Image Mixins\n// - Responsive image\n// - Retina image\n\n\n// Responsive image\n//\n// Keep images from scaling beyond the width of their parents.\n.img-responsive(@display: block) {\n display: @display;\n max-width: 100%; // Part 1: Set a maximum relative to the parent\n height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching\n}\n\n\n// Retina image\n//\n// Short retina mixin for setting background-image and -size. Note that the\n// spelling of `min--moz-device-pixel-ratio` is intentional.\n.img-retina(@file-1x; @file-2x; @width-1x; @height-1x) {\n background-image: url(\"@{file-1x}\");\n\n @media\n only screen and (-webkit-min-device-pixel-ratio: 2),\n only screen and ( min--moz-device-pixel-ratio: 2),\n only screen and ( -o-min-device-pixel-ratio: 2/1),\n only screen and ( min-device-pixel-ratio: 2),\n only screen and ( min-resolution: 192dpi),\n only screen and ( min-resolution: 2dppx) {\n background-image: url(\"@{file-2x}\");\n background-size: @width-1x @height-1x;\n }\n}\n","//\n// Typography\n// --------------------------------------------------\n\n\n// Headings\n// -------------------------\n\nh1, h2, h3, h4, h5, h6,\n.h1, .h2, .h3, .h4, .h5, .h6 {\n font-family: @headings-font-family;\n font-weight: @headings-font-weight;\n line-height: @headings-line-height;\n color: @headings-color;\n\n small,\n .small {\n font-weight: normal;\n line-height: 1;\n color: @headings-small-color;\n }\n}\n\nh1, .h1,\nh2, .h2,\nh3, .h3 {\n margin-top: @line-height-computed;\n margin-bottom: (@line-height-computed / 2);\n\n small,\n .small {\n font-size: 65%;\n }\n}\nh4, .h4,\nh5, .h5,\nh6, .h6 {\n margin-top: (@line-height-computed / 2);\n margin-bottom: (@line-height-computed / 2);\n\n small,\n .small {\n font-size: 75%;\n }\n}\n\nh1, .h1 { font-size: @font-size-h1; }\nh2, .h2 { font-size: @font-size-h2; }\nh3, .h3 { font-size: @font-size-h3; }\nh4, .h4 { font-size: @font-size-h4; }\nh5, .h5 { font-size: @font-size-h5; }\nh6, .h6 { font-size: @font-size-h6; }\n\n\n// Body text\n// -------------------------\n\np {\n margin: 0 0 (@line-height-computed / 2);\n}\n\n.lead {\n margin-bottom: @line-height-computed;\n font-size: floor((@font-size-base * 1.15));\n font-weight: 300;\n line-height: 1.4;\n\n @media (min-width: @screen-sm-min) {\n font-size: (@font-size-base * 1.5);\n }\n}\n\n\n// Emphasis & misc\n// -------------------------\n\n// Ex: (12px small font / 14px base font) * 100% = about 85%\nsmall,\n.small {\n font-size: floor((100% * @font-size-small / @font-size-base));\n}\n\nmark,\n.mark {\n background-color: @state-warning-bg;\n padding: .2em;\n}\n\n// Alignment\n.text-left { text-align: left; }\n.text-right { text-align: right; }\n.text-center { text-align: center; }\n.text-justify { text-align: justify; }\n.text-nowrap { white-space: nowrap; }\n\n// Transformation\n.text-lowercase { text-transform: lowercase; }\n.text-uppercase { text-transform: uppercase; }\n.text-capitalize { text-transform: capitalize; }\n\n// Contextual colors\n.text-muted {\n color: @text-muted;\n}\n.text-primary {\n .text-emphasis-variant(@brand-primary);\n}\n.text-success {\n .text-emphasis-variant(@state-success-text);\n}\n.text-info {\n .text-emphasis-variant(@state-info-text);\n}\n.text-warning {\n .text-emphasis-variant(@state-warning-text);\n}\n.text-danger {\n .text-emphasis-variant(@state-danger-text);\n}\n\n// Contextual backgrounds\n// For now we'll leave these alongside the text classes until v4 when we can\n// safely shift things around (per SemVer rules).\n.bg-primary {\n // Given the contrast here, this is the only class to have its color inverted\n // automatically.\n color: #fff;\n .bg-variant(@brand-primary);\n}\n.bg-success {\n .bg-variant(@state-success-bg);\n}\n.bg-info {\n .bg-variant(@state-info-bg);\n}\n.bg-warning {\n .bg-variant(@state-warning-bg);\n}\n.bg-danger {\n .bg-variant(@state-danger-bg);\n}\n\n\n// Page header\n// -------------------------\n\n.page-header {\n padding-bottom: ((@line-height-computed / 2) - 1);\n margin: (@line-height-computed * 2) 0 @line-height-computed;\n border-bottom: 1px solid @page-header-border-color;\n}\n\n\n// Lists\n// -------------------------\n\n// Unordered and Ordered lists\nul,\nol {\n margin-top: 0;\n margin-bottom: (@line-height-computed / 2);\n ul,\n ol {\n margin-bottom: 0;\n }\n}\n\n// List options\n\n// Unstyled keeps list items block level, just removes default browser padding and list-style\n.list-unstyled {\n padding-left: 0;\n list-style: none;\n}\n\n// Inline turns list items into inline-block\n.list-inline {\n .list-unstyled();\n margin-left: -5px;\n\n > li {\n display: inline-block;\n padding-left: 5px;\n padding-right: 5px;\n }\n}\n\n// Description Lists\ndl {\n margin-top: 0; // Remove browser default\n margin-bottom: @line-height-computed;\n}\ndt,\ndd {\n line-height: @line-height-base;\n}\ndt {\n font-weight: bold;\n}\ndd {\n margin-left: 0; // Undo browser default\n}\n\n// Horizontal description lists\n//\n// Defaults to being stacked without any of the below styles applied, until the\n// grid breakpoint is reached (default of ~768px).\n\n.dl-horizontal {\n dd {\n &:extend(.clearfix all); // Clear the floated `dt` if an empty `dd` is present\n }\n\n @media (min-width: @grid-float-breakpoint) {\n dt {\n float: left;\n width: (@dl-horizontal-offset - 20);\n clear: left;\n text-align: right;\n .text-overflow();\n }\n dd {\n margin-left: @dl-horizontal-offset;\n }\n }\n}\n\n\n// Misc\n// -------------------------\n\n// Abbreviations and acronyms\nabbr[title],\n// Add data-* attribute to help out our tooltip plugin, per https://github.com/twbs/bootstrap/issues/5257\nabbr[data-original-title] {\n cursor: help;\n border-bottom: 1px dotted @abbr-border-color;\n}\n.initialism {\n font-size: 90%;\n text-transform: uppercase;\n}\n\n// Blockquotes\nblockquote {\n padding: (@line-height-computed / 2) @line-height-computed;\n margin: 0 0 @line-height-computed;\n font-size: @blockquote-font-size;\n border-left: 5px solid @blockquote-border-color;\n\n p,\n ul,\n ol {\n &:last-child {\n margin-bottom: 0;\n }\n }\n\n // Note: Deprecated small and .small as of v3.1.0\n // Context: https://github.com/twbs/bootstrap/issues/11660\n footer,\n small,\n .small {\n display: block;\n font-size: 80%; // back to default font-size\n line-height: @line-height-base;\n color: @blockquote-small-color;\n\n &:before {\n content: '\\2014 \\00A0'; // em dash, nbsp\n }\n }\n}\n\n// Opposite alignment of blockquote\n//\n// Heads up: `blockquote.pull-right` has been deprecated as of v3.1.0.\n.blockquote-reverse,\nblockquote.pull-right {\n padding-right: 15px;\n padding-left: 0;\n border-right: 5px solid @blockquote-border-color;\n border-left: 0;\n text-align: right;\n\n // Account for citation\n footer,\n small,\n .small {\n &:before { content: ''; }\n &:after {\n content: '\\00A0 \\2014'; // nbsp, em dash\n }\n }\n}\n\n// Addresses\naddress {\n margin-bottom: @line-height-computed;\n font-style: normal;\n line-height: @line-height-base;\n}\n","// Typography\n\n.text-emphasis-variant(@color) {\n color: @color;\n a&:hover {\n color: darken(@color, 10%);\n }\n}\n","// Contextual backgrounds\n\n.bg-variant(@color) {\n background-color: @color;\n a&:hover {\n background-color: darken(@color, 10%);\n }\n}\n","// Text overflow\n// Requires inline-block or block for proper styling\n\n.text-overflow() {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n","//\n// Code (inline and block)\n// --------------------------------------------------\n\n\n// Inline and block code styles\ncode,\nkbd,\npre,\nsamp {\n font-family: @font-family-monospace;\n}\n\n// Inline code\ncode {\n padding: 2px 4px;\n font-size: 90%;\n color: @code-color;\n background-color: @code-bg;\n border-radius: @border-radius-base;\n}\n\n// User input typically entered via keyboard\nkbd {\n padding: 2px 4px;\n font-size: 90%;\n color: @kbd-color;\n background-color: @kbd-bg;\n border-radius: @border-radius-small;\n box-shadow: inset 0 -1px 0 rgba(0,0,0,.25);\n\n kbd {\n padding: 0;\n font-size: 100%;\n font-weight: bold;\n box-shadow: none;\n }\n}\n\n// Blocks of code\npre {\n display: block;\n padding: ((@line-height-computed - 1) / 2);\n margin: 0 0 (@line-height-computed / 2);\n font-size: (@font-size-base - 1); // 14px to 13px\n line-height: @line-height-base;\n word-break: break-all;\n word-wrap: break-word;\n color: @pre-color;\n background-color: @pre-bg;\n border: 1px solid @pre-border-color;\n border-radius: @border-radius-base;\n\n // Account for some code outputs that place code tags in pre tags\n code {\n padding: 0;\n font-size: inherit;\n color: inherit;\n white-space: pre-wrap;\n background-color: transparent;\n border-radius: 0;\n }\n}\n\n// Enable scrollable blocks of code\n.pre-scrollable {\n max-height: @pre-scrollable-max-height;\n overflow-y: scroll;\n}\n","//\n// Grid system\n// --------------------------------------------------\n\n\n// Container widths\n//\n// Set the container width, and override it for fixed navbars in media queries.\n\n.container {\n .container-fixed();\n\n @media (min-width: @screen-sm-min) {\n width: @container-sm;\n }\n @media (min-width: @screen-md-min) {\n width: @container-md;\n }\n @media (min-width: @screen-lg-min) {\n width: @container-lg;\n }\n}\n\n\n// Fluid container\n//\n// Utilizes the mixin meant for fixed width containers, but without any defined\n// width for fluid, full width layouts.\n\n.container-fluid {\n .container-fixed();\n}\n\n\n// Row\n//\n// Rows contain and clear the floats of your columns.\n\n.row {\n .make-row();\n}\n\n\n// Columns\n//\n// Common styles for small and large grid columns\n\n.make-grid-columns();\n\n\n// Extra small grid\n//\n// Columns, offsets, pushes, and pulls for extra small devices like\n// smartphones.\n\n.make-grid(xs);\n\n\n// Small grid\n//\n// Columns, offsets, pushes, and pulls for the small device range, from phones\n// to tablets.\n\n@media (min-width: @screen-sm-min) {\n .make-grid(sm);\n}\n\n\n// Medium grid\n//\n// Columns, offsets, pushes, and pulls for the desktop device range.\n\n@media (min-width: @screen-md-min) {\n .make-grid(md);\n}\n\n\n// Large grid\n//\n// Columns, offsets, pushes, and pulls for the large desktop device range.\n\n@media (min-width: @screen-lg-min) {\n .make-grid(lg);\n}\n","// Grid system\n//\n// Generate semantic grid columns with these mixins.\n\n// Centered container element\n.container-fixed(@gutter: @grid-gutter-width) {\n margin-right: auto;\n margin-left: auto;\n padding-left: (@gutter / 2);\n padding-right: (@gutter / 2);\n &:extend(.clearfix all);\n}\n\n// Creates a wrapper for a series of columns\n.make-row(@gutter: @grid-gutter-width) {\n margin-left: (@gutter / -2);\n margin-right: (@gutter / -2);\n &:extend(.clearfix all);\n}\n\n// Generate the extra small columns\n.make-xs-column(@columns; @gutter: @grid-gutter-width) {\n position: relative;\n float: left;\n width: percentage((@columns / @grid-columns));\n min-height: 1px;\n padding-left: (@gutter / 2);\n padding-right: (@gutter / 2);\n}\n.make-xs-column-offset(@columns) {\n margin-left: percentage((@columns / @grid-columns));\n}\n.make-xs-column-push(@columns) {\n left: percentage((@columns / @grid-columns));\n}\n.make-xs-column-pull(@columns) {\n right: percentage((@columns / @grid-columns));\n}\n\n// Generate the small columns\n.make-sm-column(@columns; @gutter: @grid-gutter-width) {\n position: relative;\n min-height: 1px;\n padding-left: (@gutter / 2);\n padding-right: (@gutter / 2);\n\n @media (min-width: @screen-sm-min) {\n float: left;\n width: percentage((@columns / @grid-columns));\n }\n}\n.make-sm-column-offset(@columns) {\n @media (min-width: @screen-sm-min) {\n margin-left: percentage((@columns / @grid-columns));\n }\n}\n.make-sm-column-push(@columns) {\n @media (min-width: @screen-sm-min) {\n left: percentage((@columns / @grid-columns));\n }\n}\n.make-sm-column-pull(@columns) {\n @media (min-width: @screen-sm-min) {\n right: percentage((@columns / @grid-columns));\n }\n}\n\n// Generate the medium columns\n.make-md-column(@columns; @gutter: @grid-gutter-width) {\n position: relative;\n min-height: 1px;\n padding-left: (@gutter / 2);\n padding-right: (@gutter / 2);\n\n @media (min-width: @screen-md-min) {\n float: left;\n width: percentage((@columns / @grid-columns));\n }\n}\n.make-md-column-offset(@columns) {\n @media (min-width: @screen-md-min) {\n margin-left: percentage((@columns / @grid-columns));\n }\n}\n.make-md-column-push(@columns) {\n @media (min-width: @screen-md-min) {\n left: percentage((@columns / @grid-columns));\n }\n}\n.make-md-column-pull(@columns) {\n @media (min-width: @screen-md-min) {\n right: percentage((@columns / @grid-columns));\n }\n}\n\n// Generate the large columns\n.make-lg-column(@columns; @gutter: @grid-gutter-width) {\n position: relative;\n min-height: 1px;\n padding-left: (@gutter / 2);\n padding-right: (@gutter / 2);\n\n @media (min-width: @screen-lg-min) {\n float: left;\n width: percentage((@columns / @grid-columns));\n }\n}\n.make-lg-column-offset(@columns) {\n @media (min-width: @screen-lg-min) {\n margin-left: percentage((@columns / @grid-columns));\n }\n}\n.make-lg-column-push(@columns) {\n @media (min-width: @screen-lg-min) {\n left: percentage((@columns / @grid-columns));\n }\n}\n.make-lg-column-pull(@columns) {\n @media (min-width: @screen-lg-min) {\n right: percentage((@columns / @grid-columns));\n }\n}\n","// Framework grid generation\n//\n// Used only by Bootstrap to generate the correct number of grid classes given\n// any value of `@grid-columns`.\n\n.make-grid-columns() {\n // Common styles for all sizes of grid columns, widths 1-12\n .col(@index) when (@index = 1) { // initial\n @item: ~\".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}\";\n .col((@index + 1), @item);\n }\n .col(@index, @list) when (@index =< @grid-columns) { // general; \"=<\" isn't a typo\n @item: ~\".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}\";\n .col((@index + 1), ~\"@{list}, @{item}\");\n }\n .col(@index, @list) when (@index > @grid-columns) { // terminal\n @{list} {\n position: relative;\n // Prevent columns from collapsing when empty\n min-height: 1px;\n // Inner gutter via padding\n padding-left: (@grid-gutter-width / 2);\n padding-right: (@grid-gutter-width / 2);\n }\n }\n .col(1); // kickstart it\n}\n\n.float-grid-columns(@class) {\n .col(@index) when (@index = 1) { // initial\n @item: ~\".col-@{class}-@{index}\";\n .col((@index + 1), @item);\n }\n .col(@index, @list) when (@index =< @grid-columns) { // general\n @item: ~\".col-@{class}-@{index}\";\n .col((@index + 1), ~\"@{list}, @{item}\");\n }\n .col(@index, @list) when (@index > @grid-columns) { // terminal\n @{list} {\n float: left;\n }\n }\n .col(1); // kickstart it\n}\n\n.calc-grid-column(@index, @class, @type) when (@type = width) and (@index > 0) {\n .col-@{class}-@{index} {\n width: percentage((@index / @grid-columns));\n }\n}\n.calc-grid-column(@index, @class, @type) when (@type = push) and (@index > 0) {\n .col-@{class}-push-@{index} {\n left: percentage((@index / @grid-columns));\n }\n}\n.calc-grid-column(@index, @class, @type) when (@type = push) and (@index = 0) {\n .col-@{class}-push-0 {\n left: auto;\n }\n}\n.calc-grid-column(@index, @class, @type) when (@type = pull) and (@index > 0) {\n .col-@{class}-pull-@{index} {\n right: percentage((@index / @grid-columns));\n }\n}\n.calc-grid-column(@index, @class, @type) when (@type = pull) and (@index = 0) {\n .col-@{class}-pull-0 {\n right: auto;\n }\n}\n.calc-grid-column(@index, @class, @type) when (@type = offset) {\n .col-@{class}-offset-@{index} {\n margin-left: percentage((@index / @grid-columns));\n }\n}\n\n// Basic looping in LESS\n.loop-grid-columns(@index, @class, @type) when (@index >= 0) {\n .calc-grid-column(@index, @class, @type);\n // next iteration\n .loop-grid-columns((@index - 1), @class, @type);\n}\n\n// Create grid for specific class\n.make-grid(@class) {\n .float-grid-columns(@class);\n .loop-grid-columns(@grid-columns, @class, width);\n .loop-grid-columns(@grid-columns, @class, pull);\n .loop-grid-columns(@grid-columns, @class, push);\n .loop-grid-columns(@grid-columns, @class, offset);\n}\n","//\n// Tables\n// --------------------------------------------------\n\n\ntable {\n background-color: @table-bg;\n}\ncaption {\n padding-top: @table-cell-padding;\n padding-bottom: @table-cell-padding;\n color: @text-muted;\n text-align: left;\n}\nth {\n text-align: left;\n}\n\n\n// Baseline styles\n\n.table {\n width: 100%;\n max-width: 100%;\n margin-bottom: @line-height-computed;\n // Cells\n > thead,\n > tbody,\n > tfoot {\n > tr {\n > th,\n > td {\n padding: @table-cell-padding;\n line-height: @line-height-base;\n vertical-align: top;\n border-top: 1px solid @table-border-color;\n }\n }\n }\n // Bottom align for column headings\n > thead > tr > th {\n vertical-align: bottom;\n border-bottom: 2px solid @table-border-color;\n }\n // Remove top border from thead by default\n > caption + thead,\n > colgroup + thead,\n > thead:first-child {\n > tr:first-child {\n > th,\n > td {\n border-top: 0;\n }\n }\n }\n // Account for multiple tbody instances\n > tbody + tbody {\n border-top: 2px solid @table-border-color;\n }\n\n // Nesting\n .table {\n background-color: @body-bg;\n }\n}\n\n\n// Condensed table w/ half padding\n\n.table-condensed {\n > thead,\n > tbody,\n > tfoot {\n > tr {\n > th,\n > td {\n padding: @table-condensed-cell-padding;\n }\n }\n }\n}\n\n\n// Bordered version\n//\n// Add borders all around the table and between all the columns.\n\n.table-bordered {\n border: 1px solid @table-border-color;\n > thead,\n > tbody,\n > tfoot {\n > tr {\n > th,\n > td {\n border: 1px solid @table-border-color;\n }\n }\n }\n > thead > tr {\n > th,\n > td {\n border-bottom-width: 2px;\n }\n }\n}\n\n\n// Zebra-striping\n//\n// Default zebra-stripe styles (alternating gray and transparent backgrounds)\n\n.table-striped {\n > tbody > tr:nth-child(odd) {\n background-color: @table-bg-accent;\n }\n}\n\n\n// Hover effect\n//\n// Placed here since it has to come after the potential zebra striping\n\n.table-hover {\n > tbody > tr:hover {\n background-color: @table-bg-hover;\n }\n}\n\n\n// Table cell sizing\n//\n// Reset default table behavior\n\ntable col[class*=\"col-\"] {\n position: static; // Prevent border hiding in Firefox and IE9/10 (see https://github.com/twbs/bootstrap/issues/11623)\n float: none;\n display: table-column;\n}\ntable {\n td,\n th {\n &[class*=\"col-\"] {\n position: static; // Prevent border hiding in Firefox and IE9/10 (see https://github.com/twbs/bootstrap/issues/11623)\n float: none;\n display: table-cell;\n }\n }\n}\n\n\n// Table backgrounds\n//\n// Exact selectors below required to override `.table-striped` and prevent\n// inheritance to nested tables.\n\n// Generate the contextual variants\n.table-row-variant(active; @table-bg-active);\n.table-row-variant(success; @state-success-bg);\n.table-row-variant(info; @state-info-bg);\n.table-row-variant(warning; @state-warning-bg);\n.table-row-variant(danger; @state-danger-bg);\n\n\n// Responsive tables\n//\n// Wrap your tables in `.table-responsive` and we'll make them mobile friendly\n// by enabling horizontal scrolling. Only applies <768px. Everything above that\n// will display normally.\n\n.table-responsive {\n overflow-x: auto;\n min-height: 0.01%; // Workaround for IE9 bug (see https://github.com/twbs/bootstrap/issues/14837)\n\n @media screen and (max-width: @screen-xs-max) {\n width: 100%;\n margin-bottom: (@line-height-computed * 0.75);\n overflow-y: hidden;\n -ms-overflow-style: -ms-autohiding-scrollbar;\n border: 1px solid @table-border-color;\n\n // Tighten up spacing\n > .table {\n margin-bottom: 0;\n\n // Ensure the content doesn't wrap\n > thead,\n > tbody,\n > tfoot {\n > tr {\n > th,\n > td {\n white-space: nowrap;\n }\n }\n }\n }\n\n // Special overrides for the bordered tables\n > .table-bordered {\n border: 0;\n\n // Nuke the appropriate borders so that the parent can handle them\n > thead,\n > tbody,\n > tfoot {\n > tr {\n > th:first-child,\n > td:first-child {\n border-left: 0;\n }\n > th:last-child,\n > td:last-child {\n border-right: 0;\n }\n }\n }\n\n // Only nuke the last row's bottom-border in `tbody` and `tfoot` since\n // chances are there will be only one `tr` in a `thead` and that would\n // remove the border altogether.\n > tbody,\n > tfoot {\n > tr:last-child {\n > th,\n > td {\n border-bottom: 0;\n }\n }\n }\n\n }\n }\n}\n","// Tables\n\n.table-row-variant(@state; @background) {\n // Exact selectors below required to override `.table-striped` and prevent\n // inheritance to nested tables.\n .table > thead > tr,\n .table > tbody > tr,\n .table > tfoot > tr {\n > td.@{state},\n > th.@{state},\n &.@{state} > td,\n &.@{state} > th {\n background-color: @background;\n }\n }\n\n // Hover states for `.table-hover`\n // Note: this is not available for cells or rows within `thead` or `tfoot`.\n .table-hover > tbody > tr {\n > td.@{state}:hover,\n > th.@{state}:hover,\n &.@{state}:hover > td,\n &:hover > .@{state},\n &.@{state}:hover > th {\n background-color: darken(@background, 5%);\n }\n }\n}\n","//\n// Forms\n// --------------------------------------------------\n\n\n// Normalize non-controls\n//\n// Restyle and baseline non-control form elements.\n\nfieldset {\n padding: 0;\n margin: 0;\n border: 0;\n // Chrome and Firefox set a `min-width: min-content;` on fieldsets,\n // so we reset that to ensure it behaves more like a standard block element.\n // See https://github.com/twbs/bootstrap/issues/12359.\n min-width: 0;\n}\n\nlegend {\n display: block;\n width: 100%;\n padding: 0;\n margin-bottom: @line-height-computed;\n font-size: (@font-size-base * 1.5);\n line-height: inherit;\n color: @legend-color;\n border: 0;\n border-bottom: 1px solid @legend-border-color;\n}\n\nlabel {\n display: inline-block;\n max-width: 100%; // Force IE8 to wrap long content (see https://github.com/twbs/bootstrap/issues/13141)\n margin-bottom: 5px;\n font-weight: bold;\n}\n\n\n// Normalize form controls\n//\n// While most of our form styles require extra classes, some basic normalization\n// is required to ensure optimum display with or without those classes to better\n// address browser inconsistencies.\n\n// Override content-box in Normalize (* isn't specific enough)\ninput[type=\"search\"] {\n .box-sizing(border-box);\n}\n\n// Position radios and checkboxes better\ninput[type=\"radio\"],\ninput[type=\"checkbox\"] {\n margin: 4px 0 0;\n margin-top: 1px \\9; // IE8-9\n line-height: normal;\n}\n\n// Set the height of file controls to match text inputs\ninput[type=\"file\"] {\n display: block;\n}\n\n// Make range inputs behave like textual form controls\ninput[type=\"range\"] {\n display: block;\n width: 100%;\n}\n\n// Make multiple select elements height not fixed\nselect[multiple],\nselect[size] {\n height: auto;\n}\n\n// Focus for file, radio, and checkbox\ninput[type=\"file\"]:focus,\ninput[type=\"radio\"]:focus,\ninput[type=\"checkbox\"]:focus {\n .tab-focus();\n}\n\n// Adjust output element\noutput {\n display: block;\n padding-top: (@padding-base-vertical + 1);\n font-size: @font-size-base;\n line-height: @line-height-base;\n color: @input-color;\n}\n\n\n// Common form controls\n//\n// Shared size and type resets for form controls. Apply `.form-control` to any\n// of the following form controls:\n//\n// select\n// textarea\n// input[type=\"text\"]\n// input[type=\"password\"]\n// input[type=\"datetime\"]\n// input[type=\"datetime-local\"]\n// input[type=\"date\"]\n// input[type=\"month\"]\n// input[type=\"time\"]\n// input[type=\"week\"]\n// input[type=\"number\"]\n// input[type=\"email\"]\n// input[type=\"url\"]\n// input[type=\"search\"]\n// input[type=\"tel\"]\n// input[type=\"color\"]\n\n.form-control {\n display: block;\n width: 100%;\n height: @input-height-base; // Make inputs at least the height of their button counterpart (base line-height + padding + border)\n padding: @padding-base-vertical @padding-base-horizontal;\n font-size: @font-size-base;\n line-height: @line-height-base;\n color: @input-color;\n background-color: @input-bg;\n background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214\n border: 1px solid @input-border;\n border-radius: @input-border-radius;\n .box-shadow(inset 0 1px 1px rgba(0,0,0,.075));\n .transition(~\"border-color ease-in-out .15s, box-shadow ease-in-out .15s\");\n\n // Customize the `:focus` state to imitate native WebKit styles.\n .form-control-focus();\n\n // Placeholder\n .placeholder();\n\n // Disabled and read-only inputs\n //\n // HTML5 says that controls under a fieldset > legend:first-child won't be\n // disabled if the fieldset is disabled. Due to implementation difficulty, we\n // don't honor that edge case; we style them as disabled anyway.\n &[disabled],\n &[readonly],\n fieldset[disabled] & {\n cursor: @cursor-disabled;\n background-color: @input-bg-disabled;\n opacity: 1; // iOS fix for unreadable disabled content\n }\n\n // Reset height for `textarea`s\n textarea& {\n height: auto;\n }\n}\n\n\n// Search inputs in iOS\n//\n// This overrides the extra rounded corners on search inputs in iOS so that our\n// `.form-control` class can properly style them. Note that this cannot simply\n// be added to `.form-control` as it's not specific enough. For details, see\n// https://github.com/twbs/bootstrap/issues/11586.\n\ninput[type=\"search\"] {\n -webkit-appearance: none;\n}\n\n\n// Special styles for iOS temporal inputs\n//\n// In Mobile Safari, setting `display: block` on temporal inputs causes the\n// text within the input to become vertically misaligned.\n// As a workaround, we set a pixel line-height that matches the\n// given height of the input. Since this fucks up everything else, we have to\n// appropriately reset it for Internet Explorer and the size variations.\n\ninput[type=\"date\"],\ninput[type=\"time\"],\ninput[type=\"datetime-local\"],\ninput[type=\"month\"] {\n line-height: @input-height-base;\n // IE8+ misaligns the text within date inputs, so we reset\n line-height: @line-height-base ~\"\\0\";\n\n &.input-sm {\n line-height: @input-height-small;\n line-height: @line-height-small ~\"\\0\";\n }\n &.input-lg {\n line-height: @input-height-large;\n line-height: @line-height-large ~\"\\0\";\n }\n}\n\n// IE 11 hack to reverse the iOS temporal input hack.\n_:-ms-fullscreen, :root input[type=\"date\"],\n_:-ms-fullscreen, :root input[type=\"time\"],\n_:-ms-fullscreen, :root input[type=\"datetime-local\"],\n_:-ms-fullscreen, :root input[type=\"month\"] {\n line-height: @line-height-base;\n\n &.input-sm {\n line-height: @line-height-small;\n }\n &.input-lg {\n line-height: @line-height-large;\n }\n}\n\n\n// Form groups\n//\n// Designed to help with the organization and spacing of vertical forms. For\n// horizontal forms, use the predefined grid classes.\n\n.form-group {\n margin-bottom: 15px;\n}\n\n\n// Checkboxes and radios\n//\n// Indent the labels to position radios/checkboxes as hanging controls.\n\n.radio,\n.checkbox {\n position: relative;\n display: block;\n margin-top: 10px;\n margin-bottom: 10px;\n\n label {\n min-height: @line-height-computed; // Ensure the input doesn't jump when there is no text\n padding-left: 20px;\n margin-bottom: 0;\n font-weight: normal;\n cursor: pointer;\n }\n}\n.radio input[type=\"radio\"],\n.radio-inline input[type=\"radio\"],\n.checkbox input[type=\"checkbox\"],\n.checkbox-inline input[type=\"checkbox\"] {\n position: absolute;\n margin-left: -20px;\n margin-top: 4px \\9;\n}\n\n.radio + .radio,\n.checkbox + .checkbox {\n margin-top: -5px; // Move up sibling radios or checkboxes for tighter spacing\n}\n\n// Radios and checkboxes on same line\n.radio-inline,\n.checkbox-inline {\n display: inline-block;\n padding-left: 20px;\n margin-bottom: 0;\n vertical-align: middle;\n font-weight: normal;\n cursor: pointer;\n}\n.radio-inline + .radio-inline,\n.checkbox-inline + .checkbox-inline {\n margin-top: 0;\n margin-left: 10px; // space out consecutive inline controls\n}\n\n// Apply same disabled cursor tweak as for inputs\n// Some special care is needed because
                  ',v.defaults={content:'
                  loading..
                  ',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 diff --git a/源码/src/main/webapp/resource/js/artDialog/artDialog.source.js b/源码/src/main/webapp/resource/js/artDialog/artDialog.source.js new file mode 100644 index 0000000..ff61708 --- /dev/null +++ b/源码/src/main/webapp/resource/js/artDialog/artDialog.source.js @@ -0,0 +1,2078 @@ +/*! + * 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; + }, + + /** + * 读写样式
                  + * css(name) 访问第一个匹配元素的样式属性
                  + * css(properties) 把一个"名/值对"对象设置为所有匹配元素的样式属性
                  + * css(name, value) 在所有匹配的元素中,设置一个样式属性的值
                  + */ + 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( + ''); + + 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内部 + // + _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 = +'
                  ' ++ '' ++ '' ++ '' ++ '' ++ '' ++ '' ++ '' ++ '' ++ '' ++ '' ++ '' ++ '' ++ '' ++ '' ++ '' ++ '' ++ '' ++ '' ++ '
                  ' ++ '
                  ' ++ '' ++ '' ++ '' ++ '' ++ '' ++ '' ++ '' ++ '' ++ '' ++ '' ++ '' ++ '' ++ '' ++ '
                  ' ++ '
                  ' ++ '
                  ' ++ '' ++ '\xd7' ++ '' ++ '
                  ' ++ '
                  ' ++ '
                  ' ++ '
                  ' ++ '
                  ' ++ '
                  ' ++ '
                  ' ++ '
                  ' ++'
                  '; + + + +/** + * 默认配置 + */ +artDialog.defaults = { + // 消息内容 + content: '
                  loading..
                  ', + 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)); + diff --git a/源码/src/main/webapp/resource/js/artDialog/index.html b/源码/src/main/webapp/resource/js/artDialog/index.html new file mode 100644 index 0000000..15caf96 --- /dev/null +++ b/源码/src/main/webapp/resource/js/artDialog/index.html @@ -0,0 +1,162 @@ + + + + +artDialog + + + + + + + + + + + + + +
                  + +
                  +
                  artDialog是一个基于javascript编写的对话框组件,它拥有精致的界面与友好的接口
                  +
                  +
                  自适应内容
                  +
                  artDialog的特殊UI框架能够适应内容变化,甚至连外部程序动态插入的内容它仍然能自适应,因此你不必去考虑消息内容尺寸使用它。它的消息容器甚至能够根据宽度让文本居中或居左对齐——这一切全是XHTML+CSS原生实现。
                  +
                  完善的接口
                  +
                  它的接口完善,可以轻易与外部程序配合使用。如异步写入消息、控制位置、尺寸、显示与隐藏、关闭等。
                  +
                  细致的体验
                  +
                  如果不是在输入状态,它支持Esc快捷键关闭;可指定在元素附近弹出,让操作更便捷;智能给按钮添加焦点;黄金比例垂直居中;超大响应区域特别为ipad等触屏设备优化;预先缓存皮肤图片更快响应……
                  +
                  跨平台兼容
                  +
                  兼容:IE6+、Firefox、Chrome、Safari、Opera以及iPad等移动设备。并且IE6下也能支持现代浏览器的静止定位(fixed)、覆盖下拉控件、alpha通道png背景。
                  +
                  +

                  快速入门

                  +

                  一、使用传统的参数

                  +

                  art.dialog(content, ok, cancel)

                  +
                  +
                  art.dialog('简单愉悦的接口,强大的表现力,优雅的内部实现', function(){alert('yes');});
                  +
                  +

                  + +

                  +

                  二、使用字面量传参

                  +

                  art.dialog(options)

                  +
                  +
                  var dialog = art.dialog({
                  +    title: '欢迎',
                  +	content: '欢迎使用artDialog对话框组件!',
                  +	icon: 'succeed',
                  +    follow: document.getElementById('btn2'),
                  +    ok: function(){
                  +        this.title('警告').content('请注意artDialog两秒后将关闭!').lock().time(2);
                  +        return false;
                  +    }
                  +});
                  +
                  +
                  +

                  + +

                  +

                  更多配置参数用法请查阅API文档: ./_doc/API.html#options

                  +

                  三、扩展方法

                  +

                  需要对弹出后的对话框操作?artDialog简单实用的扩展方法可以使这一切变得简单。

                  +

                  如在ajax异步操作中,我们可以先定义一个变量引用对话框返回的扩展方法:

                  +
                  var myDialog = art.dialog();// 初始化一个带有loading图标的空对话框
                  +jQuery.ajax({
                  +	url: 'http://web5.qq.com/content?id=1',
                  +    success: function (data) {
                  +        myDialog.content(data);// 填充对话框内容
                  +    }
                  +});
                  +
                  +

                  如果需要使用程序控制关闭,可以使用"close"方法关闭对话框:

                  +
                  myDialog.close();
                  +

                  更多扩展方法用法请查阅API文档: ./_doc/API.html#API

                  +

                  插件:框架应用工具

                  +

                  artDialog针对CMS类的框架应用提供了专属插件,如穿越框架、iframe、AJAX、跨框架传值操作等。

                  +

                  例: 使用open方法嵌入页面,并使用data方法在各个iframe间传递数据:

                  +
                  +
                  var val = document.getElementById('demoInput04-3').value;
                  +art.dialog.data('test', val);
                  +art.dialog.data('homeDemoPath', './_doc/');
                  +
                  +// 此时 iframeA.html 页面可以使用 art.dialog.data('test') 获取到数据,如:
                  +// document.getElementById('aInput').value = art.dialog.data('test');
                  +art.dialog.open('./_doc/iframeA.html');
                  +
                  +
                  +

                  请输入测试文字: + + +

                  +

                  插件更多功能请查阅API文档: ./iframeTop.html

                  +

                  jQuery + artDialog

                  +

                  artDialog提供了一个jQuery版本,功能与标准版一致,调用只需要把art前缀改成jQuery的命名空间。

                  +
                  // 普通调用
                  +$.dialog({content:'hello world!'});
                  +
                  +// 使用选择器方式,此时自动使用绑定了live click事件,同时启用follow模式
                  +$('#main .test').dialog({content: 'hello world'});
                  +

                  (最低兼容jquery1.3.2,但框架应用插件需要jquery1.4+运行[?])

                  +

                  联系

                  + + +
                  注意!artDialog4+即将停止维护,在框架满天飞的时代结束后,其历史使命已经完成。新版本artDialog 5+很小,却依然动人。若要迁移,请抛弃iframe,使用ajax技术。
                  + +

                  如果你对artDialog有什么意见建议可以用下面任意一种联系方式找到作者。artDialog一直在不断完善自身,这个愉悦的过程中感谢有你的参与~

                  +

                  提交BUG必备项:1、浏览器名称,版本 2、artDialog版本号(只支持4+版本) 3、简明扼要的描述信息 4、建议提取一份BUG DEMO,这样解决问题的概率增加300%

                  +

                  如果对使用问题有疑惑,可以前往由 artDialog 爱好者建立的QQ群寻求帮助(前提是先自己阅读文档): 44030323

                  +

                  作者:糖饼
                  + 邮箱: (仅用作bug提交)
                  + 网站:PlaneArt.Cn
                  + 微博:t.qq.com/tangbin

                  +

                  捐赠

                  +

                  artDialog就是你一直想要的对话框么?哇~那么我非常期待您能够热情的提供15元或者其他金额的捐赠鼓励~正如您支持其他开源项目一样。

                  +

                  支付宝: https://me.alipay.com/planeart

                  +

                  您因如果使用artDialog而受益或者感到愉悦,您还可以这样帮助artDialog成长:

                  +

                  1、共同参与并完善artDialog或用blog/微博/Twitter把它分享它给更多的人。

                  +

                  2、如artDialog有幸被用在你的项目,请您联系我,我后续将在artDialog主页展示您项目/企业的LOGO(目前有盛大phpCMS、腾讯、中国电信等企业使用它)。

                  +
                  + +
                  + + + + diff --git a/源码/src/main/webapp/resource/js/artDialog/jquery.artDialog.js b/源码/src/main/webapp/resource/js/artDialog/jquery.artDialog.js new file mode 100644 index 0000000..3f681b6 --- /dev/null +++ b/源码/src/main/webapp/resource/js/artDialog/jquery.artDialog.js @@ -0,0 +1,10 @@ +/*! + * 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=To&&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(''),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
                  ',v.defaults={content:'
                  loading..
                  ',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 diff --git a/源码/src/main/webapp/resource/js/artDialog/jquery.artDialog.source.js b/源码/src/main/webapp/resource/js/artDialog/jquery.artDialog.source.js new file mode 100644 index 0000000..8114c2a --- /dev/null +++ b/源码/src/main/webapp/resource/js/artDialog/jquery.artDialog.source.js @@ -0,0 +1,1261 @@ +/*! + * 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( + ''); + + 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内部 + // + _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 = +'
                  ' ++ '' ++ '' ++ '' ++ '' ++ '' ++ '' ++ '' ++ '' ++ '' ++ '' ++ '' ++ '' ++ '' ++ '' ++ '' ++ '' ++ '' ++ '' ++ '
                  ' ++ '
                  ' ++ '' ++ '' ++ '' ++ '' ++ '' ++ '' ++ '' ++ '' ++ '' ++ '' ++ '' ++ '' ++ '' ++ '
                  ' ++ '
                  ' ++ '
                  ' ++ '' ++ '\xd7' ++ '' ++ '
                  ' ++ '
                  ' ++ '
                  ' ++ '
                  ' ++ '
                  ' ++ '
                  ' ++ '
                  ' ++ '
                  ' ++'
                  '; + + + +/** + * 默认配置 + */ +artDialog.defaults = { + // 消息内容 + content: '
                  loading..
                  ', + 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)); + diff --git a/源码/src/main/webapp/resource/js/artDialog/license.txt b/源码/src/main/webapp/resource/js/artDialog/license.txt new file mode 100644 index 0000000..02bbb60 --- /dev/null +++ b/源码/src/main/webapp/resource/js/artDialog/license.txt @@ -0,0 +1,165 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. \ No newline at end of file diff --git a/源码/src/main/webapp/resource/js/artDialog/plugins/iframeTools.js b/源码/src/main/webapp/resource/js/artDialog/plugins/iframeTools.js new file mode 100644 index 0000000..54d4d00 --- /dev/null +++ b/源码/src/main/webapp/resource/js/artDialog/plugins/iframeTools.js @@ -0,0 +1,10 @@ +/*! + * 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:["",D,"","","",""].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(""+B+"").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 diff --git a/源码/src/main/webapp/resource/js/artDialog/plugins/iframeTools.source.js b/源码/src/main/webapp/resource/js/artDialog/plugins/iframeTools.source.js new file mode 100644 index 0000000..8be76f1 --- /dev/null +++ b/源码/src/main/webapp/resource/js/artDialog/plugins/iframeTools.source.js @@ -0,0 +1,468 @@ +/*! + * 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: [ + '
                  ', + content, + '
                  ', + '
                  ', + '', + '
                  ' + ].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('
                  ' + content + '
                  ') + .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); + diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/aero.css b/源码/src/main/webapp/resource/js/artDialog/skins/aero.css new file mode 100644 index 0000000..3b11a2a --- /dev/null +++ b/源码/src/main/webapp/resource/js/artDialog/skins/aero.css @@ -0,0 +1,61 @@ +@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 diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/aero/aero_s.png b/源码/src/main/webapp/resource/js/artDialog/skins/aero/aero_s.png new file mode 100644 index 0000000..ff3a379 Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/aero/aero_s.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/aero/aero_s2.png b/源码/src/main/webapp/resource/js/artDialog/skins/aero/aero_s2.png new file mode 100644 index 0000000..6fda697 Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/aero/aero_s2.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/aero/ie6/aui_close.hover.png b/源码/src/main/webapp/resource/js/artDialog/skins/aero/ie6/aui_close.hover.png new file mode 100644 index 0000000..d424838 Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/aero/ie6/aui_close.hover.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/aero/ie6/aui_close.png b/源码/src/main/webapp/resource/js/artDialog/skins/aero/ie6/aui_close.png new file mode 100644 index 0000000..6aef1a8 Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/aero/ie6/aui_close.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/aero/ie6/aui_e.png b/源码/src/main/webapp/resource/js/artDialog/skins/aero/ie6/aui_e.png new file mode 100644 index 0000000..413cd23 Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/aero/ie6/aui_e.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/aero/ie6/aui_n.png b/源码/src/main/webapp/resource/js/artDialog/skins/aero/ie6/aui_n.png new file mode 100644 index 0000000..5b0b0cd Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/aero/ie6/aui_n.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/aero/ie6/aui_ne.png b/源码/src/main/webapp/resource/js/artDialog/skins/aero/ie6/aui_ne.png new file mode 100644 index 0000000..23e82f6 Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/aero/ie6/aui_ne.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/aero/ie6/aui_nw.png b/源码/src/main/webapp/resource/js/artDialog/skins/aero/ie6/aui_nw.png new file mode 100644 index 0000000..8212d5a Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/aero/ie6/aui_nw.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/aero/ie6/aui_s.png b/源码/src/main/webapp/resource/js/artDialog/skins/aero/ie6/aui_s.png new file mode 100644 index 0000000..4e24a73 Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/aero/ie6/aui_s.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/aero/ie6/aui_se.png b/源码/src/main/webapp/resource/js/artDialog/skins/aero/ie6/aui_se.png new file mode 100644 index 0000000..668bd83 Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/aero/ie6/aui_se.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/aero/ie6/aui_sw.png b/源码/src/main/webapp/resource/js/artDialog/skins/aero/ie6/aui_sw.png new file mode 100644 index 0000000..539584e Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/aero/ie6/aui_sw.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/aero/ie6/aui_title_icon.png b/源码/src/main/webapp/resource/js/artDialog/skins/aero/ie6/aui_title_icon.png new file mode 100644 index 0000000..149aba4 Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/aero/ie6/aui_title_icon.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/aero/ie6/aui_w.png b/源码/src/main/webapp/resource/js/artDialog/skins/aero/ie6/aui_w.png new file mode 100644 index 0000000..a00691b Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/aero/ie6/aui_w.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/black.css b/源码/src/main/webapp/resource/js/artDialog/skins/black.css new file mode 100644 index 0000000..94ec943 --- /dev/null +++ b/源码/src/main/webapp/resource/js/artDialog/skins/black.css @@ -0,0 +1,79 @@ +@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 diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/black/bg.png b/源码/src/main/webapp/resource/js/artDialog/skins/black/bg.png new file mode 100644 index 0000000..6d42b89 Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/black/bg.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/black/bg2.png b/源码/src/main/webapp/resource/js/artDialog/skins/black/bg2.png new file mode 100644 index 0000000..8f5568d Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/black/bg2.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/black/bg_css3.png b/源码/src/main/webapp/resource/js/artDialog/skins/black/bg_css3.png new file mode 100644 index 0000000..32cc89d Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/black/bg_css3.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/black/bg_css3_2.png b/源码/src/main/webapp/resource/js/artDialog/skins/black/bg_css3_2.png new file mode 100644 index 0000000..4e5801b Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/black/bg_css3_2.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/black/ie6/close.hover.png b/源码/src/main/webapp/resource/js/artDialog/skins/black/ie6/close.hover.png new file mode 100644 index 0000000..73b02c4 Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/black/ie6/close.hover.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/black/ie6/close.png b/源码/src/main/webapp/resource/js/artDialog/skins/black/ie6/close.png new file mode 100644 index 0000000..d18600b Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/black/ie6/close.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/black/ie6/e.png b/源码/src/main/webapp/resource/js/artDialog/skins/black/ie6/e.png new file mode 100644 index 0000000..0dbe769 Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/black/ie6/e.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/black/ie6/n.png b/源码/src/main/webapp/resource/js/artDialog/skins/black/ie6/n.png new file mode 100644 index 0000000..67ba731 Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/black/ie6/n.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/black/ie6/ne.png b/源码/src/main/webapp/resource/js/artDialog/skins/black/ie6/ne.png new file mode 100644 index 0000000..7f34d69 Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/black/ie6/ne.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/black/ie6/nw.png b/源码/src/main/webapp/resource/js/artDialog/skins/black/ie6/nw.png new file mode 100644 index 0000000..74b5285 Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/black/ie6/nw.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/black/ie6/s.png b/源码/src/main/webapp/resource/js/artDialog/skins/black/ie6/s.png new file mode 100644 index 0000000..aadc5bc Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/black/ie6/s.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/black/ie6/se.png b/源码/src/main/webapp/resource/js/artDialog/skins/black/ie6/se.png new file mode 100644 index 0000000..6a4ac96 Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/black/ie6/se.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/black/ie6/sw.png b/源码/src/main/webapp/resource/js/artDialog/skins/black/ie6/sw.png new file mode 100644 index 0000000..5637896 Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/black/ie6/sw.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/black/ie6/w.png b/源码/src/main/webapp/resource/js/artDialog/skins/black/ie6/w.png new file mode 100644 index 0000000..910b3a1 Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/black/ie6/w.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/blue.css b/源码/src/main/webapp/resource/js/artDialog/skins/blue.css new file mode 100644 index 0000000..35f8042 --- /dev/null +++ b/源码/src/main/webapp/resource/js/artDialog/skins/blue.css @@ -0,0 +1,79 @@ +@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 diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/blue/bg.png b/源码/src/main/webapp/resource/js/artDialog/skins/blue/bg.png new file mode 100644 index 0000000..52c1c01 Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/blue/bg.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/blue/bg2.png b/源码/src/main/webapp/resource/js/artDialog/skins/blue/bg2.png new file mode 100644 index 0000000..834c17a Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/blue/bg2.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/blue/bg_css3.png b/源码/src/main/webapp/resource/js/artDialog/skins/blue/bg_css3.png new file mode 100644 index 0000000..8f55b85 Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/blue/bg_css3.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/blue/bg_css3_2.png b/源码/src/main/webapp/resource/js/artDialog/skins/blue/bg_css3_2.png new file mode 100644 index 0000000..b8f66eb Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/blue/bg_css3_2.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/blue/ie6/close.hover.png b/源码/src/main/webapp/resource/js/artDialog/skins/blue/ie6/close.hover.png new file mode 100644 index 0000000..40de707 Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/blue/ie6/close.hover.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/blue/ie6/close.png b/源码/src/main/webapp/resource/js/artDialog/skins/blue/ie6/close.png new file mode 100644 index 0000000..72c7157 Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/blue/ie6/close.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/blue/ie6/e.png b/源码/src/main/webapp/resource/js/artDialog/skins/blue/ie6/e.png new file mode 100644 index 0000000..d892f02 Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/blue/ie6/e.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/blue/ie6/n.png b/源码/src/main/webapp/resource/js/artDialog/skins/blue/ie6/n.png new file mode 100644 index 0000000..28c2ff5 Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/blue/ie6/n.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/blue/ie6/ne.png b/源码/src/main/webapp/resource/js/artDialog/skins/blue/ie6/ne.png new file mode 100644 index 0000000..eaa3cb4 Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/blue/ie6/ne.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/blue/ie6/nw.png b/源码/src/main/webapp/resource/js/artDialog/skins/blue/ie6/nw.png new file mode 100644 index 0000000..45bb037 Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/blue/ie6/nw.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/blue/ie6/s.png b/源码/src/main/webapp/resource/js/artDialog/skins/blue/ie6/s.png new file mode 100644 index 0000000..ee9ab02 Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/blue/ie6/s.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/blue/ie6/se.png b/源码/src/main/webapp/resource/js/artDialog/skins/blue/ie6/se.png new file mode 100644 index 0000000..1e181ab Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/blue/ie6/se.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/blue/ie6/sw.png b/源码/src/main/webapp/resource/js/artDialog/skins/blue/ie6/sw.png new file mode 100644 index 0000000..b2193e3 Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/blue/ie6/sw.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/blue/ie6/w.png b/源码/src/main/webapp/resource/js/artDialog/skins/blue/ie6/w.png new file mode 100644 index 0000000..6c4472d Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/blue/ie6/w.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/chrome.css b/源码/src/main/webapp/resource/js/artDialog/skins/chrome.css new file mode 100644 index 0000000..78e4c34 --- /dev/null +++ b/源码/src/main/webapp/resource/js/artDialog/skins/chrome.css @@ -0,0 +1,61 @@ +@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; } diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/chrome/border.png b/源码/src/main/webapp/resource/js/artDialog/skins/chrome/border.png new file mode 100644 index 0000000..db3bdcd Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/chrome/border.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/chrome/chrome_s.png b/源码/src/main/webapp/resource/js/artDialog/skins/chrome/chrome_s.png new file mode 100644 index 0000000..3f62b86 Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/chrome/chrome_s.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/default.css b/源码/src/main/webapp/resource/js/artDialog/skins/default.css new file mode 100644 index 0000000..d0d8df2 --- /dev/null +++ b/源码/src/main/webapp/resource/js/artDialog/skins/default.css @@ -0,0 +1,67 @@ +@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 diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/green.css b/源码/src/main/webapp/resource/js/artDialog/skins/green.css new file mode 100644 index 0000000..48ea491 --- /dev/null +++ b/源码/src/main/webapp/resource/js/artDialog/skins/green.css @@ -0,0 +1,79 @@ +@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 diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/green/bg.png b/源码/src/main/webapp/resource/js/artDialog/skins/green/bg.png new file mode 100644 index 0000000..7919c88 Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/green/bg.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/green/bg2.png b/源码/src/main/webapp/resource/js/artDialog/skins/green/bg2.png new file mode 100644 index 0000000..3faa0c8 Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/green/bg2.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/green/bg_css3.png b/源码/src/main/webapp/resource/js/artDialog/skins/green/bg_css3.png new file mode 100644 index 0000000..aa255e4 Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/green/bg_css3.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/green/bg_css3_2.png b/源码/src/main/webapp/resource/js/artDialog/skins/green/bg_css3_2.png new file mode 100644 index 0000000..4e5801b Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/green/bg_css3_2.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/green/color_bg.png b/源码/src/main/webapp/resource/js/artDialog/skins/green/color_bg.png new file mode 100644 index 0000000..7919c88 Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/green/color_bg.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/green/ie6/close.hover.png b/源码/src/main/webapp/resource/js/artDialog/skins/green/ie6/close.hover.png new file mode 100644 index 0000000..46fc9d7 Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/green/ie6/close.hover.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/green/ie6/close.png b/源码/src/main/webapp/resource/js/artDialog/skins/green/ie6/close.png new file mode 100644 index 0000000..932e597 Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/green/ie6/close.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/green/ie6/e.png b/源码/src/main/webapp/resource/js/artDialog/skins/green/ie6/e.png new file mode 100644 index 0000000..c3fc738 Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/green/ie6/e.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/green/ie6/n.png b/源码/src/main/webapp/resource/js/artDialog/skins/green/ie6/n.png new file mode 100644 index 0000000..8742f20 Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/green/ie6/n.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/green/ie6/ne.png b/源码/src/main/webapp/resource/js/artDialog/skins/green/ie6/ne.png new file mode 100644 index 0000000..57e8e62 Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/green/ie6/ne.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/green/ie6/nw.png b/源码/src/main/webapp/resource/js/artDialog/skins/green/ie6/nw.png new file mode 100644 index 0000000..a210191 Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/green/ie6/nw.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/green/ie6/s.png b/源码/src/main/webapp/resource/js/artDialog/skins/green/ie6/s.png new file mode 100644 index 0000000..67fcd94 Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/green/ie6/s.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/green/ie6/se.png b/源码/src/main/webapp/resource/js/artDialog/skins/green/ie6/se.png new file mode 100644 index 0000000..c6d9744 Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/green/ie6/se.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/green/ie6/sw.png b/源码/src/main/webapp/resource/js/artDialog/skins/green/ie6/sw.png new file mode 100644 index 0000000..d135dcd Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/green/ie6/sw.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/green/ie6/w.png b/源码/src/main/webapp/resource/js/artDialog/skins/green/ie6/w.png new file mode 100644 index 0000000..4337826 Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/green/ie6/w.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/icons/error.png b/源码/src/main/webapp/resource/js/artDialog/skins/icons/error.png new file mode 100644 index 0000000..4929a2e Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/icons/error.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/icons/face-sad.png b/源码/src/main/webapp/resource/js/artDialog/skins/icons/face-sad.png new file mode 100644 index 0000000..5d819d8 Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/icons/face-sad.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/icons/face-smile.png b/源码/src/main/webapp/resource/js/artDialog/skins/icons/face-smile.png new file mode 100644 index 0000000..f952c13 Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/icons/face-smile.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/icons/loading.gif b/源码/src/main/webapp/resource/js/artDialog/skins/icons/loading.gif new file mode 100644 index 0000000..e8c2892 Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/icons/loading.gif differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/icons/question.png b/源码/src/main/webapp/resource/js/artDialog/skins/icons/question.png new file mode 100644 index 0000000..941a4c9 Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/icons/question.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/icons/succeed.png b/源码/src/main/webapp/resource/js/artDialog/skins/icons/succeed.png new file mode 100644 index 0000000..c78d40b Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/icons/succeed.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/icons/warning.png b/源码/src/main/webapp/resource/js/artDialog/skins/icons/warning.png new file mode 100644 index 0000000..bcaab1e Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/icons/warning.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/idialog.css b/源码/src/main/webapp/resource/js/artDialog/skins/idialog.css new file mode 100644 index 0000000..23c6d87 --- /dev/null +++ b/源码/src/main/webapp/resource/js/artDialog/skins/idialog.css @@ -0,0 +1,71 @@ +@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; } +} diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/idialog/idialog_s.png b/源码/src/main/webapp/resource/js/artDialog/skins/idialog/idialog_s.png new file mode 100644 index 0000000..d86d054 Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/idialog/idialog_s.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/idialog/idialog_s2.png b/源码/src/main/webapp/resource/js/artDialog/skins/idialog/idialog_s2.png new file mode 100644 index 0000000..7be06ad Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/idialog/idialog_s2.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/idialog/ie6/aui_close.hover.png b/源码/src/main/webapp/resource/js/artDialog/skins/idialog/ie6/aui_close.hover.png new file mode 100644 index 0000000..dd00dde Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/idialog/ie6/aui_close.hover.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/idialog/ie6/aui_close.png b/源码/src/main/webapp/resource/js/artDialog/skins/idialog/ie6/aui_close.png new file mode 100644 index 0000000..04ed8be Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/idialog/ie6/aui_close.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/idialog/ie6/aui_e.png b/源码/src/main/webapp/resource/js/artDialog/skins/idialog/ie6/aui_e.png new file mode 100644 index 0000000..b96ff2f Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/idialog/ie6/aui_e.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/idialog/ie6/aui_n.png b/源码/src/main/webapp/resource/js/artDialog/skins/idialog/ie6/aui_n.png new file mode 100644 index 0000000..34871be Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/idialog/ie6/aui_n.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/idialog/ie6/aui_ne.png b/源码/src/main/webapp/resource/js/artDialog/skins/idialog/ie6/aui_ne.png new file mode 100644 index 0000000..3644944 Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/idialog/ie6/aui_ne.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/idialog/ie6/aui_nw.png b/源码/src/main/webapp/resource/js/artDialog/skins/idialog/ie6/aui_nw.png new file mode 100644 index 0000000..dea0b9a Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/idialog/ie6/aui_nw.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/idialog/ie6/aui_s.png b/源码/src/main/webapp/resource/js/artDialog/skins/idialog/ie6/aui_s.png new file mode 100644 index 0000000..62746ee Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/idialog/ie6/aui_s.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/idialog/ie6/aui_se.png b/源码/src/main/webapp/resource/js/artDialog/skins/idialog/ie6/aui_se.png new file mode 100644 index 0000000..32247e8 Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/idialog/ie6/aui_se.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/idialog/ie6/aui_sw.png b/源码/src/main/webapp/resource/js/artDialog/skins/idialog/ie6/aui_sw.png new file mode 100644 index 0000000..478f609 Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/idialog/ie6/aui_sw.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/idialog/ie6/aui_w.png b/源码/src/main/webapp/resource/js/artDialog/skins/idialog/ie6/aui_w.png new file mode 100644 index 0000000..c4df489 Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/idialog/ie6/aui_w.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/opera.css b/源码/src/main/webapp/resource/js/artDialog/skins/opera.css new file mode 100644 index 0000000..06b6c8f --- /dev/null +++ b/源码/src/main/webapp/resource/js/artDialog/skins/opera.css @@ -0,0 +1,62 @@ +@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 diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/opera/ie6/aui_close.hover.png b/源码/src/main/webapp/resource/js/artDialog/skins/opera/ie6/aui_close.hover.png new file mode 100644 index 0000000..8e942f0 Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/opera/ie6/aui_close.hover.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/opera/ie6/aui_close.png b/源码/src/main/webapp/resource/js/artDialog/skins/opera/ie6/aui_close.png new file mode 100644 index 0000000..9442e41 Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/opera/ie6/aui_close.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/opera/ie6/aui_e.png b/源码/src/main/webapp/resource/js/artDialog/skins/opera/ie6/aui_e.png new file mode 100644 index 0000000..de6faba Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/opera/ie6/aui_e.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/opera/ie6/aui_n.png b/源码/src/main/webapp/resource/js/artDialog/skins/opera/ie6/aui_n.png new file mode 100644 index 0000000..840358d Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/opera/ie6/aui_n.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/opera/ie6/aui_ne.png b/源码/src/main/webapp/resource/js/artDialog/skins/opera/ie6/aui_ne.png new file mode 100644 index 0000000..fa30a50 Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/opera/ie6/aui_ne.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/opera/ie6/aui_nw.png b/源码/src/main/webapp/resource/js/artDialog/skins/opera/ie6/aui_nw.png new file mode 100644 index 0000000..6d09929 Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/opera/ie6/aui_nw.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/opera/ie6/aui_s.png b/源码/src/main/webapp/resource/js/artDialog/skins/opera/ie6/aui_s.png new file mode 100644 index 0000000..c031841 Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/opera/ie6/aui_s.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/opera/ie6/aui_se.png b/源码/src/main/webapp/resource/js/artDialog/skins/opera/ie6/aui_se.png new file mode 100644 index 0000000..8679228 Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/opera/ie6/aui_se.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/opera/ie6/aui_sw.png b/源码/src/main/webapp/resource/js/artDialog/skins/opera/ie6/aui_sw.png new file mode 100644 index 0000000..9866db3 Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/opera/ie6/aui_sw.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/opera/ie6/aui_w.png b/源码/src/main/webapp/resource/js/artDialog/skins/opera/ie6/aui_w.png new file mode 100644 index 0000000..519cf11 Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/opera/ie6/aui_w.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/opera/s1.png b/源码/src/main/webapp/resource/js/artDialog/skins/opera/s1.png new file mode 100644 index 0000000..e6941c1 Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/opera/s1.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/opera/s2.png b/源码/src/main/webapp/resource/js/artDialog/skins/opera/s2.png new file mode 100644 index 0000000..0debda0 Binary files /dev/null and b/源码/src/main/webapp/resource/js/artDialog/skins/opera/s2.png differ diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/simple.css b/源码/src/main/webapp/resource/js/artDialog/skins/simple.css new file mode 100644 index 0000000..690b16c --- /dev/null +++ b/源码/src/main/webapp/resource/js/artDialog/skins/simple.css @@ -0,0 +1,55 @@ +@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; } +} diff --git a/源码/src/main/webapp/resource/js/artDialog/skins/twitter.css b/源码/src/main/webapp/resource/js/artDialog/skins/twitter.css new file mode 100644 index 0000000..aeeaf8e --- /dev/null +++ b/源码/src/main/webapp/resource/js/artDialog/skins/twitter.css @@ -0,0 +1,59 @@ +@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; } diff --git a/源码/src/main/webapp/resource/js/bootstrap.file-input.js b/源码/src/main/webapp/resource/js/bootstrap.file-input.js new file mode 100644 index 0000000..e98f18d --- /dev/null +++ b/源码/src/main/webapp/resource/js/bootstrap.file-input.js @@ -0,0 +1,122 @@ +/* + Bootstrap - File Input + ====================== + + This is meant to convert all file input tags into a set of elements that displays consistently in all browsers. + + Converts all + + into Bootstrap buttons + Browse + +*/ +$(function() { + +$.fn.bootstrapFileInput = function() { + + this.each(function(i,elem){ + + var $elem = $(elem); + + // Maybe some fields don't need to be standardized. + if (typeof $elem.attr('data-bfi-disabled') != 'undefined') { + return; + } + + // Set the word to be displayed on the button + var buttonWord = 'Browse'; + + if (typeof $elem.attr('title') != 'undefined') { + buttonWord = $elem.attr('title'); + } + + // Start by getting the HTML of the input element. + // Thanks for the tip http://stackoverflow.com/a/1299069 + var input = $('
                  ').append( $elem.eq(0).clone() ).html(); + var className = ''; + + if (!!$elem.attr('class')) { + className = ' ' + $elem.attr('class'); + } + + // Now we're going to replace that input field with a Bootstrap button. + // The input will actually still be there, it will just be float above and transparent (done with the CSS). + $elem.replaceWith(''+buttonWord+input+''); + }) + + // After we have found all of the file inputs let's apply a listener for tracking the mouse movement. + // This is important because the in order to give the illusion that this is a button in FF we actually need to move the button from the file input under the cursor. Ugh. + .promise().done( function(){ + + // As the cursor moves over our new Bootstrap button we need to adjust the position of the invisible file input Browse button to be under the cursor. + // This gives us the pointer cursor that FF denies us + $('.file-input-wrapper').mousemove(function(cursor) { + + var input, wrapper, + wrapperX, wrapperY, + inputWidth, inputHeight, + cursorX, cursorY; + + // This wrapper element (the button surround this file input) + wrapper = $(this); + // The invisible file input element + input = wrapper.find("input"); + // The left-most position of the wrapper + wrapperX = wrapper.offset().left; + // The top-most position of the wrapper + wrapperY = wrapper.offset().top; + // The with of the browsers input field + inputWidth= input.width(); + // The height of the browsers input field + inputHeight= input.height(); + //The position of the cursor in the wrapper + cursorX = cursor.pageX; + cursorY = cursor.pageY; + + //The positions we are to move the invisible file input + // The 20 at the end is an arbitrary number of pixels that we can shift the input such that cursor is not pointing at the end of the Browse button but somewhere nearer the middle + moveInputX = cursorX - wrapperX - inputWidth + 20; + // Slides the invisible input Browse button to be positioned middle under the cursor + moveInputY = cursorY- wrapperY - (inputHeight/2); + + // Apply the positioning styles to actually move the invisible file input + input.css({ + left:moveInputX, + top:moveInputY + }); + }); + + $('.file-input-wrapper input[type=file]').change(function(){ + + var fileName; + fileName = $(this).val(); + + // Remove any previous file names + $(this).parent().next('.file-input-name').remove(); + if (!!$(this).prop('files') && $(this).prop('files').length > 1) { + fileName = $(this)[0].files.length+' files'; + //$(this).parent().after(''+$(this)[0].files.length+' files'); + } + else { + // var fakepath = 'C:\\fakepath\\'; + // fileName = $(this).val().replace('C:\\fakepath\\',''); + fileName = fileName.substring(fileName.lastIndexOf('\\')+1,fileName.length); + } + + $(this).parent().after(''+fileName+''); + }); + + }); + +}; + +// Add the styles before the first stylesheet +// This ensures they can be easily overridden with developer styles +var cssHtml = ''; +$('link[rel=stylesheet]').eq(0).before(cssHtml); + +}); diff --git a/源码/src/main/webapp/resource/js/bootstrap.js b/源码/src/main/webapp/resource/js/bootstrap.js new file mode 100644 index 0000000..643e71c --- /dev/null +++ b/源码/src/main/webapp/resource/js/bootstrap.js @@ -0,0 +1,2280 @@ +/* =================================================== + * bootstrap-transition.js v2.3.2 + * http://twitter.github.com/bootstrap/javascript.html#transitions + * =================================================== + * Copyright 2012 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ========================================================== */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* CSS TRANSITION SUPPORT (http://www.modernizr.com/) + * ======================================================= */ + + $(function () { + + $.support.transition = (function () { + + var transitionEnd = (function () { + + var el = document.createElement('bootstrap') + , transEndEventNames = { + 'WebkitTransition' : 'webkitTransitionEnd' + , 'MozTransition' : 'transitionend' + , 'OTransition' : 'oTransitionEnd otransitionend' + , 'transition' : 'transitionend' + } + , name + + for (name in transEndEventNames){ + if (el.style[name] !== undefined) { + return transEndEventNames[name] + } + } + + }()) + + return transitionEnd && { + end: transitionEnd + } + + })() + + }) + +}(window.jQuery);/* ========================================================== + * bootstrap-alert.js v2.3.2 + * http://twitter.github.com/bootstrap/javascript.html#alerts + * ========================================================== + * Copyright 2012 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ========================================================== */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* ALERT CLASS DEFINITION + * ====================== */ + + var dismiss = '[data-dismiss="alert"]' + , Alert = function (el) { + $(el).on('click', dismiss, this.close) + } + + Alert.prototype.close = function (e) { + var $this = $(this) + , selector = $this.attr('data-target') + , $parent + + if (!selector) { + selector = $this.attr('href') + selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 + } + + $parent = $(selector) + + e && e.preventDefault() + + $parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent()) + + $parent.trigger(e = $.Event('close')) + + if (e.isDefaultPrevented()) return + + $parent.removeClass('in') + + function removeElement() { + $parent + .trigger('closed') + .remove() + } + + $.support.transition && $parent.hasClass('fade') ? + $parent.on($.support.transition.end, removeElement) : + removeElement() + } + + + /* ALERT PLUGIN DEFINITION + * ======================= */ + + var old = $.fn.alert + + $.fn.alert = function (option) { + return this.each(function () { + var $this = $(this) + , data = $this.data('alert') + if (!data) $this.data('alert', (data = new Alert(this))) + if (typeof option == 'string') data[option].call($this) + }) + } + + $.fn.alert.Constructor = Alert + + + /* ALERT NO CONFLICT + * ================= */ + + $.fn.alert.noConflict = function () { + $.fn.alert = old + return this + } + + + /* ALERT DATA-API + * ============== */ + + $(document).on('click.alert.data-api', dismiss, Alert.prototype.close) + +}(window.jQuery);/* ============================================================ + * bootstrap-button.js v2.3.2 + * http://twitter.github.com/bootstrap/javascript.html#buttons + * ============================================================ + * Copyright 2012 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================ */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* BUTTON PUBLIC CLASS DEFINITION + * ============================== */ + + var Button = function (element, options) { + this.$element = $(element) + this.options = $.extend({}, $.fn.button.defaults, options) + } + + Button.prototype.setState = function (state) { + var d = 'disabled' + , $el = this.$element + , data = $el.data() + , val = $el.is('input') ? 'val' : 'html' + + state = state + 'Text' + data.resetText || $el.data('resetText', $el[val]()) + + $el[val](data[state] || this.options[state]) + + // push to event loop to allow forms to submit + setTimeout(function () { + state == 'loadingText' ? + $el.addClass(d).attr(d, d) : + $el.removeClass(d).removeAttr(d) + }, 0) + } + + Button.prototype.toggle = function () { + var $parent = this.$element.closest('[data-toggle="buttons-radio"]') + + $parent && $parent + .find('.active') + .removeClass('active') + + this.$element.toggleClass('active') + } + + + /* BUTTON PLUGIN DEFINITION + * ======================== */ + + var old = $.fn.button + + $.fn.button = function (option) { + return this.each(function () { + var $this = $(this) + , data = $this.data('button') + , options = typeof option == 'object' && option + if (!data) $this.data('button', (data = new Button(this, options))) + if (option == 'toggle') data.toggle() + else if (option) data.setState(option) + }) + } + + $.fn.button.defaults = { + loadingText: 'loading...' + } + + $.fn.button.Constructor = Button + + + /* BUTTON NO CONFLICT + * ================== */ + + $.fn.button.noConflict = function () { + $.fn.button = old + return this + } + + + /* BUTTON DATA-API + * =============== */ + + $(document).on('click.button.data-api', '[data-toggle^=button]', function (e) { + var $btn = $(e.target) + if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') + $btn.button('toggle') + }) + +}(window.jQuery);/* ========================================================== + * bootstrap-carousel.js v2.3.2 + * http://twitter.github.com/bootstrap/javascript.html#carousel + * ========================================================== + * Copyright 2012 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ========================================================== */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* CAROUSEL CLASS DEFINITION + * ========================= */ + + var Carousel = function (element, options) { + this.$element = $(element) + this.$indicators = this.$element.find('.carousel-indicators') + this.options = options + this.options.pause == 'hover' && this.$element + .on('mouseenter', $.proxy(this.pause, this)) + .on('mouseleave', $.proxy(this.cycle, this)) + } + + Carousel.prototype = { + + cycle: function (e) { + if (!e) this.paused = false + if (this.interval) clearInterval(this.interval); + this.options.interval + && !this.paused + && (this.interval = setInterval($.proxy(this.next, this), this.options.interval)) + return this + } + + , getActiveIndex: function () { + this.$active = this.$element.find('.item.active') + this.$items = this.$active.parent().children() + return this.$items.index(this.$active) + } + + , to: function (pos) { + var activeIndex = this.getActiveIndex() + , that = this + + if (pos > (this.$items.length - 1) || pos < 0) return + + if (this.sliding) { + return this.$element.one('slid', function () { + that.to(pos) + }) + } + + if (activeIndex == pos) { + return this.pause().cycle() + } + + return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos])) + } + + , pause: function (e) { + if (!e) this.paused = true + if (this.$element.find('.next, .prev').length && $.support.transition.end) { + this.$element.trigger($.support.transition.end) + this.cycle(true) + } + clearInterval(this.interval) + this.interval = null + return this + } + + , next: function () { + if (this.sliding) return + return this.slide('next') + } + + , prev: function () { + if (this.sliding) return + return this.slide('prev') + } + + , slide: function (type, next) { + var $active = this.$element.find('.item.active') + , $next = next || $active[type]() + , isCycling = this.interval + , direction = type == 'next' ? 'left' : 'right' + , fallback = type == 'next' ? 'first' : 'last' + , that = this + , e + + this.sliding = true + + isCycling && this.pause() + + $next = $next.length ? $next : this.$element.find('.item')[fallback]() + + e = $.Event('slide', { + relatedTarget: $next[0] + , direction: direction + }) + + if ($next.hasClass('active')) return + + if (this.$indicators.length) { + this.$indicators.find('.active').removeClass('active') + this.$element.one('slid', function () { + var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()]) + $nextIndicator && $nextIndicator.addClass('active') + }) + } + + if ($.support.transition && this.$element.hasClass('slide')) { + this.$element.trigger(e) + if (e.isDefaultPrevented()) return + $next.addClass(type) + $next[0].offsetWidth // force reflow + $active.addClass(direction) + $next.addClass(direction) + this.$element.one($.support.transition.end, function () { + $next.removeClass([type, direction].join(' ')).addClass('active') + $active.removeClass(['active', direction].join(' ')) + that.sliding = false + setTimeout(function () { that.$element.trigger('slid') }, 0) + }) + } else { + this.$element.trigger(e) + if (e.isDefaultPrevented()) return + $active.removeClass('active') + $next.addClass('active') + this.sliding = false + this.$element.trigger('slid') + } + + isCycling && this.cycle() + + return this + } + + } + + + /* CAROUSEL PLUGIN DEFINITION + * ========================== */ + + var old = $.fn.carousel + + $.fn.carousel = function (option) { + return this.each(function () { + var $this = $(this) + , data = $this.data('carousel') + , options = $.extend({}, $.fn.carousel.defaults, typeof option == 'object' && option) + , action = typeof option == 'string' ? option : options.slide + if (!data) $this.data('carousel', (data = new Carousel(this, options))) + if (typeof option == 'number') data.to(option) + else if (action) data[action]() + else if (options.interval) data.pause().cycle() + }) + } + + $.fn.carousel.defaults = { + interval: 5000 + , pause: 'hover' + } + + $.fn.carousel.Constructor = Carousel + + + /* CAROUSEL NO CONFLICT + * ==================== */ + + $.fn.carousel.noConflict = function () { + $.fn.carousel = old + return this + } + + /* CAROUSEL DATA-API + * ================= */ + + $(document).on('click.carousel.data-api', '[data-slide], [data-slide-to]', function (e) { + var $this = $(this), href + , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7 + , options = $.extend({}, $target.data(), $this.data()) + , slideIndex + + $target.carousel(options) + + if (slideIndex = $this.attr('data-slide-to')) { + $target.data('carousel').pause().to(slideIndex).cycle() + } + + e.preventDefault() + }) + +}(window.jQuery);/* ============================================================= + * bootstrap-collapse.js v2.3.2 + * http://twitter.github.com/bootstrap/javascript.html#collapse + * ============================================================= + * Copyright 2012 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================ */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* COLLAPSE PUBLIC CLASS DEFINITION + * ================================ */ + + var Collapse = function (element, options) { + this.$element = $(element) + this.options = $.extend({}, $.fn.collapse.defaults, options) + + if (this.options.parent) { + this.$parent = $(this.options.parent) + } + + this.options.toggle && this.toggle() + } + + Collapse.prototype = { + + constructor: Collapse + + , dimension: function () { + var hasWidth = this.$element.hasClass('width') + return hasWidth ? 'width' : 'height' + } + + , show: function () { + var dimension + , scroll + , actives + , hasData + + if (this.transitioning || this.$element.hasClass('in')) return + + dimension = this.dimension() + scroll = $.camelCase(['scroll', dimension].join('-')) + actives = this.$parent && this.$parent.find('> .accordion-group > .in') + + if (actives && actives.length) { + hasData = actives.data('collapse') + if (hasData && hasData.transitioning) return + actives.collapse('hide') + hasData || actives.data('collapse', null) + } + + this.$element[dimension](0) + this.transition('addClass', $.Event('show'), 'shown') + $.support.transition && this.$element[dimension](this.$element[0][scroll]) + } + + , hide: function () { + var dimension + if (this.transitioning || !this.$element.hasClass('in')) return + dimension = this.dimension() + this.reset(this.$element[dimension]()) + this.transition('removeClass', $.Event('hide'), 'hidden') + this.$element[dimension](0) + } + + , reset: function (size) { + var dimension = this.dimension() + + this.$element + .removeClass('collapse') + [dimension](size || 'auto') + [0].offsetWidth + + this.$element[size !== null ? 'addClass' : 'removeClass']('collapse') + + return this + } + + , transition: function (method, startEvent, completeEvent) { + var that = this + , complete = function () { + if (startEvent.type == 'show') that.reset() + that.transitioning = 0 + that.$element.trigger(completeEvent) + } + + this.$element.trigger(startEvent) + + if (startEvent.isDefaultPrevented()) return + + this.transitioning = 1 + + this.$element[method]('in') + + $.support.transition && this.$element.hasClass('collapse') ? + this.$element.one($.support.transition.end, complete) : + complete() + } + + , toggle: function () { + this[this.$element.hasClass('in') ? 'hide' : 'show']() + } + + } + + + /* COLLAPSE PLUGIN DEFINITION + * ========================== */ + + var old = $.fn.collapse + + $.fn.collapse = function (option) { + return this.each(function () { + var $this = $(this) + , data = $this.data('collapse') + , options = $.extend({}, $.fn.collapse.defaults, $this.data(), typeof option == 'object' && option) + if (!data) $this.data('collapse', (data = new Collapse(this, options))) + if (typeof option == 'string') data[option]() + }) + } + + $.fn.collapse.defaults = { + toggle: true + } + + $.fn.collapse.Constructor = Collapse + + + /* COLLAPSE NO CONFLICT + * ==================== */ + + $.fn.collapse.noConflict = function () { + $.fn.collapse = old + return this + } + + + /* COLLAPSE DATA-API + * ================= */ + + $(document).on('click.collapse.data-api', '[data-toggle=collapse]', function (e) { + var $this = $(this), href + , target = $this.attr('data-target') + || e.preventDefault() + || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7 + , option = $(target).data('collapse') ? 'toggle' : $this.data() + $this[$(target).hasClass('in') ? 'addClass' : 'removeClass']('collapsed') + $(target).collapse(option) + }) + +}(window.jQuery);/* ============================================================ + * bootstrap-dropdown.js v2.3.2 + * http://twitter.github.com/bootstrap/javascript.html#dropdowns + * ============================================================ + * Copyright 2012 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================ */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* DROPDOWN CLASS DEFINITION + * ========================= */ + + var toggle = '[data-toggle=dropdown]' + , Dropdown = function (element) { + var $el = $(element).on('click.dropdown.data-api', this.toggle) + $('html').on('click.dropdown.data-api', function () { + $el.parent().removeClass('open') + }) + } + + Dropdown.prototype = { + + constructor: Dropdown + + , toggle: function (e) { + var $this = $(this) + , $parent + , isActive + + if ($this.is('.disabled, :disabled')) return + + $parent = getParent($this) + + isActive = $parent.hasClass('open') + + clearMenus() + + if (!isActive) { + if ('ontouchstart' in document.documentElement) { + // if mobile we we use a backdrop because click events don't delegate + $('